@micromag/viewer-build 0.3.474 → 0.3.477
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.
- package/build/asset-manifest.json +23 -23
- package/build/index.html +1 -1
- package/build/static/js/101.370dc920.chunk.js +1 -0
- package/build/static/js/110.f8dfd454.chunk.js +1 -0
- package/build/static/js/170.d58d9899.chunk.js +1 -0
- package/build/static/js/269.442a4a52.chunk.js +1 -0
- package/build/static/js/312.b144c987.chunk.js +1 -0
- package/build/static/js/328.0c9a66a7.chunk.js +1 -0
- package/build/static/js/377.e18ec07b.chunk.js +1 -0
- package/build/static/js/490.5dcc394f.chunk.js +1 -0
- package/build/static/js/525.3e219ea4.js +2 -0
- package/build/static/js/544.c39f2028.chunk.js +1 -0
- package/build/static/js/66.c72532b7.chunk.js +2 -0
- package/build/static/js/763.2e34f58e.chunk.js +1 -0
- package/build/static/js/90.d13e94a4.chunk.js +1 -0
- package/build/static/js/939.60db97aa.chunk.js +1 -0
- package/build/static/js/96.dbeb97ca.chunk.js +2 -0
- package/build/static/js/972.26ea9886.chunk.js +1 -0
- package/build/static/js/990.797c408d.chunk.js +1 -0
- package/build/static/js/998.310c35e6.chunk.js +1 -0
- package/build/static/js/main.2ae2417b.js +2 -0
- package/build/static/js/runtime~main.43faca21.js +1 -0
- package/package.json +6 -6
- package/build/static/js/101.2e46a68e.chunk.js +0 -1
- package/build/static/js/110.97f6466e.chunk.js +0 -1
- package/build/static/js/170.521231d8.chunk.js +0 -1
- package/build/static/js/212.4dead6eb.js +0 -2
- package/build/static/js/269.93a0e94e.chunk.js +0 -1
- package/build/static/js/312.89ce3861.chunk.js +0 -1
- package/build/static/js/328.b8a2c3b7.chunk.js +0 -1
- package/build/static/js/377.c2ae2cae.chunk.js +0 -1
- package/build/static/js/490.afe84570.chunk.js +0 -1
- package/build/static/js/544.c6e33d23.chunk.js +0 -1
- package/build/static/js/66.e8eaa59a.chunk.js +0 -2
- package/build/static/js/763.7dcb377d.chunk.js +0 -1
- package/build/static/js/90.9c41e456.chunk.js +0 -1
- package/build/static/js/939.adcc064e.chunk.js +0 -1
- package/build/static/js/96.f15fcbb9.chunk.js +0 -2
- package/build/static/js/972.1828ddb5.chunk.js +0 -1
- package/build/static/js/990.d9598426.chunk.js +0 -1
- package/build/static/js/998.8b31cc77.chunk.js +0 -1
- package/build/static/js/main.e4f2b684.js +0 -2
- package/build/static/js/runtime~main.5c0faae5.js +0 -1
- /package/build/static/js/{212.4dead6eb.js.LICENSE.txt → 525.3e219ea4.js.LICENSE.txt} +0 -0
- /package/build/static/js/{66.e8eaa59a.chunk.js.LICENSE.txt → 66.c72532b7.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{96.f15fcbb9.chunk.js.LICENSE.txt → 96.dbeb97ca.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.e4f2b684.js.LICENSE.txt → main.2ae2417b.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[269],{456:function(e){class t extends Error{constructor(){super("Authorization required"),this.name="AuthError",this.isAuthError=!0}}e.exports=t},4799:function(e,t,i){var r=i(9568);const s=i(6934);e.exports=class extends s{constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" "),this.pluginId=this.opts.pluginId,this.tokenKey=`companion-${this.pluginId}-auth-token`,this.companionKeysParams=this.opts.companionKeysParams,this.preAuthToken=null}headers(){return Promise.all([super.headers(),this.getAuthToken()]).then((e=>{let[t,i]=e;const r={};return i&&(r["uppy-auth-token"]=i),this.companionKeysParams&&(r["uppy-credentials-params"]=btoa(JSON.stringify({params:this.companionKeysParams}))),{...t,...r}}))}onReceiveResponse(e){e=super.onReceiveResponse(e);const t=this.uppy.getPlugin(this.pluginId),i=t.getPluginState().authenticated?401!==e.status:e.status<400;return t.setPluginState({authenticated:i}),e}setAuthToken(e){return this.uppy.getPlugin(this.pluginId).storage.setItem(this.tokenKey,e)}getAuthToken(){return this.uppy.getPlugin(this.pluginId).storage.getItem(this.tokenKey)}async ensurePreAuth(){if(this.companionKeysParams&&!this.preAuthToken&&(await this.fetchPreAuthToken(),!this.preAuthToken))throw new Error("Could not load authentication data required for third-party login. Please try again later.")}authUrl(e){void 0===e&&(e={});const t=new URLSearchParams(e);return this.preAuthToken&&t.set("uppyPreAuthToken",this.preAuthToken),`${this.hostname}/${this.id}/connect?${t}`}fileUrl(e){return`${this.hostname}/${this.id}/get/${e}`}async fetchPreAuthToken(){if(this.companionKeysParams)try{const e=await this.post(`${this.id}/preauth/`,{params:this.companionKeysParams});this.preAuthToken=e.token}catch(e){this.uppy.log(`[CompanionClient] unable to fetch preAuthToken ${e}`,"warning")}}list(e){return this.get(`${this.id}/list/${e||""}`)}logout(){return this.get(`${this.id}/logout`).then((e=>Promise.all([e,this.uppy.getPlugin(this.pluginId).storage.removeItem(this.tokenKey)]))).then((e=>{let[t]=e;return t}))}static initPlugin(e,t,i){if(e.type="acquirer",e.files=[],i&&(e.opts={...i,...t}),t.serverUrl||t.serverPattern)throw new Error("`serverUrl` and `serverPattern` have been renamed to `companionUrl` and `companionAllowedHosts` respectively in the 0.30.5 release. Please consult the docs (for example, https://uppy.io/docs/instagram/ for the Instagram plugin) and use the updated options.`");if(t.companionAllowedHosts){const i=t.companionAllowedHosts;if(!("string"==typeof i||Array.isArray(i)||i instanceof RegExp))throw new TypeError(`${e.id}: the option "companionAllowedHosts" must be one of string, Array, RegExp`);e.opts.companionAllowedHosts=i}else/^(?!https?:\/\/).*$/i.test(t.companionUrl)?e.opts.companionAllowedHosts=`https://${t.companionUrl.replace(/^\/\//,"")}`:e.opts.companionAllowedHosts=new URL(t.companionUrl).origin;e.storage=e.opts.storage||r}}},6934:function(e,t,i){let r;function s(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 o(e){return"__private_"+n+++"_"+e}const l=i(2019),a=i(9518),h=i(456);async function c(e){if(401===e.status)throw new h;const t=e.json();if(e.status<200||e.status>300){let i=`Failed request with status: ${e.status}. ${e.statusText}`;try{const e=await t;i=e.message?`${i} message: ${e.message}`:i,i=e.requestId?`${i} request-Id: ${e.requestId}`:i}finally{throw new Error(i)}}return t}var u=o("companionHeaders"),p=o("getPostResponseFunc"),d=o("getUrl"),g=o("errorHandler");r=Symbol.for("uppy test: getCompanionHeaders");class m{constructor(e,t){Object.defineProperty(this,g,{value:f}),Object.defineProperty(this,d,{value:y}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,p,{writable:!0,value:e=>t=>e?t:this.onReceiveResponse(t)}),this.uppy=e,this.opts=t,this.onReceiveResponse=this.onReceiveResponse.bind(this),this.allowedHeaders=["accept","content-type","uppy-auth-token"],this.preflightDone=!1,s(this,u)[u]=null==t?void 0:t.companionHeaders}setCompanionHeaders(e){s(this,u)[u]=e}[r](){return s(this,u)[u]}get hostname(){const{companion:e}=this.uppy.getState(),t=this.opts.companionUrl;return(e&&e[t]?e[t]:t).replace(/\/$/,"")}headers(){return Promise.resolve({...m.defaultHeaders,...s(this,u)[u]})}onReceiveResponse(e){const t=this.uppy.getState().companion||{},i=this.opts.companionUrl,{headers:r}=e;return r.has("i-am")&&r.get("i-am")!==t[i]&&this.uppy.setState({companion:{...t,[i]:r.get("i-am")}}),e}preflight(e){return this.preflightDone?Promise.resolve(this.allowedHeaders.slice()):fetch(s(this,d)[d](e),{method:"OPTIONS"}).then((e=>(e.headers.has("access-control-allow-headers")&&(this.allowedHeaders=e.headers.get("access-control-allow-headers").split(",").map((e=>e.trim().toLowerCase()))),this.preflightDone=!0,this.allowedHeaders.slice()))).catch((e=>(this.uppy.log(`[CompanionClient] unable to make preflight request ${e}`,"warning"),this.preflightDone=!0,this.allowedHeaders.slice())))}preflightAndHeaders(e){return Promise.all([this.preflight(e),this.headers()]).then((e=>{let[t,i]=e;return Object.keys(i).forEach((e=>{t.includes(e.toLowerCase())||(this.uppy.log(`[CompanionClient] excluding disallowed header ${e}`),delete i[e])})),i}))}get(e,t){return this.preflightAndHeaders(e).then((t=>l(s(this,d)[d](e),{method:"get",headers:t,credentials:this.opts.companionCookiesRule||"same-origin"}))).then(s(this,p)[p](t)).then(c).catch(s(this,g)[g]("get",e))}post(e,t,i){const r="post";return this.preflightAndHeaders(e).then((i=>l(s(this,d)[d](e),{method:r,headers:i,credentials:this.opts.companionCookiesRule||"same-origin",body:JSON.stringify(t)}))).then(s(this,p)[p](i)).then(c).catch(s(this,g)[g](r,e))}delete(e,t,i){const r="delete";return this.preflightAndHeaders(e).then((i=>l(`${this.hostname}/${e}`,{method:r,headers:i,credentials:this.opts.companionCookiesRule||"same-origin",body:t?JSON.stringify(t):null}))).then(s(this,p)[p](i)).then(c).catch(s(this,g)[g](r,e))}}function y(e){return/^(https?:|)\/\//.test(e)?e:`${this.hostname}/${e}`}function f(e,t){return i=>{var r;return null!=(r=i)&&r.isAuthError||(i=new a(`Could not ${e} ${s(this,d)[d](t)}`,{cause:i})),Promise.reject(i)}}m.VERSION="2.2.2",m.defaultHeaders={Accept:"application/json","Content-Type":"application/json","Uppy-Versions":`@uppy/companion-client=${m.VERSION}`},e.exports=m},7339:function(e,t,i){const r=i(6934);e.exports=class extends r{constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" "),this.pluginId=this.opts.pluginId}fileUrl(e){return`${this.hostname}/search/${this.id}/get/${e}`}search(e,t){return this.get(`search/${this.id}/list?q=${encodeURIComponent(e)}${t?`&${t}`:""}`)}}},7727:function(e,t,i){let r,s;function n(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var o=0;function l(e){return"__private_"+o+++"_"+e}const a=i(2162);var h=l("queued"),c=l("emitter"),u=l("isOpen"),p=l("socket"),d=l("handleMessage");r=Symbol.for("uppy test: getSocket"),s=Symbol.for("uppy test: getQueued"),e.exports=class{constructor(e){Object.defineProperty(this,h,{writable:!0,value:[]}),Object.defineProperty(this,c,{writable:!0,value:a()}),Object.defineProperty(this,u,{writable:!0,value:!1}),Object.defineProperty(this,p,{writable:!0,value:void 0}),Object.defineProperty(this,d,{writable:!0,value:e=>{try{const t=JSON.parse(e.data);this.emit(t.action,t.payload)}catch(e){console.log(e)}}}),this.opts=e,e&&!1===e.autoOpen||this.open()}get isOpen(){return n(this,u)[u]}[r](){return n(this,p)[p]}[s](){return n(this,h)[h]}open(){n(this,p)[p]=new WebSocket(this.opts.target),n(this,p)[p].onopen=()=>{for(n(this,u)[u]=!0;n(this,h)[h].length>0&&n(this,u)[u];){const e=n(this,h)[h].shift();this.send(e.action,e.payload)}},n(this,p)[p].onclose=()=>{n(this,u)[u]=!1},n(this,p)[p].onmessage=n(this,d)[d]}close(){var e;null==(e=n(this,p)[p])||e.close()}send(e,t){n(this,u)[u]?n(this,p)[p].send(JSON.stringify({action:e,payload:t})):n(this,h)[h].push({action:e,payload:t})}on(e,t){n(this,c)[c].on(e,t)}emit(e,t){n(this,c)[c].emit(e,t)}once(e,t){n(this,c)[c].once(e,t)}}},7372:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Socket=t.SearchProvider=t.RequestClient=t.Provider=void 0;const r=i(6934);t.RequestClient=r;const s=i(4799);t.Provider=s;const n=i(7339);t.SearchProvider=n;const o=i(7727);t.Socket=o},9568:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getItem=function(e){return Promise.resolve(localStorage.getItem(e))},t.removeItem=function(e){return new Promise((t=>{localStorage.removeItem(e),t()}))},t.setItem=function(e,t){return new Promise((i=>{localStorage.setItem(e,t),i()}))}},8858:function(e,t,i){var r=i(5181);const s=e=>{const{getFolder:t,title:i,isLast:s}=e;return(0,r.h)(r.Fragment,null,(0,r.h)("button",{type:"button",className:"uppy-u-reset",onClick:t},i),s?"":" / ")};e.exports=e=>{const{getFolder:t,title:i,breadcrumbsIcon:n,directories:o}=e;return(0,r.h)("div",{className:"uppy-Provider-breadcrumbs"},(0,r.h)("div",{className:"uppy-Provider-breadcrumbsIcon"},n),o.map(((e,n)=>(0,r.h)(s,{key:e.id,getFolder:()=>t(e.id),title:0===n?i:e.title,isLast:n+1===o.length}))))}},1640:function(e,t,i){var r=i(5181);const s=i(3373),n=i(8592),o=i(9936),l=i(6686),a=i(1654);e.exports=function(e){const{currentSelection:t,folders:i,files:h,uppyFiles:c,viewType:u,headerComponent:p,showBreadcrumbs:d,isChecked:g,toggleCheckbox:m,recordShiftKeyPress:y,handleScroll:f,showTitles:v,i18n:P,validateRestrictions:w,showFilter:b,filterQuery:S,filterInput:k,getNextFolder:I,cancel:x,done:F,columns:C}=e,N=t.length;return(0,r.h)("div",{className:s("uppy-ProviderBrowser",`uppy-ProviderBrowser-viewType--${u}`)},(0,r.h)("div",{className:"uppy-ProviderBrowser-header"},(0,r.h)("div",{className:s("uppy-ProviderBrowser-headerBar",!d&&"uppy-ProviderBrowser-headerBar--simple")},p)),b&&(0,r.h)(o,{i18n:P,filterQuery:S,filterInput:k}),i.length||h.length?(0,r.h)("div",{className:"uppy-ProviderBrowser-body"},(0,r.h)("ul",{className:"uppy-ProviderBrowser-list",onScroll:f,role:"listbox",tabIndex:"-1"},i.map((e=>{var t;return a({columns:C,showTitles:v,viewType:u,i18n:P,id:e.id,title:e.name,getItemIcon:()=>e.icon,isChecked:g(e),toggleCheckbox:t=>m(t,e),recordShiftKeyPress:y,type:"folder",isDisabled:null==(t=g(e))?void 0:t.loading,isCheckboxDisabled:"shared-with-me"===e.id,handleFolderClick:()=>I(e)})})),h.map((e=>{const i=w(n(e),[...c,...t]);return a({id:e.id,title:e.name,author:e.author,getItemIcon:()=>e.icon,isChecked:g(e),toggleCheckbox:t=>m(t,e),recordShiftKeyPress:y,columns:C,showTitles:v,viewType:u,i18n:P,type:"file",isDisabled:!i.result&&!g(e),restrictionReason:i.reason})})))):(0,r.h)("div",{className:"uppy-Provider-empty"},P("noFilesFound")),N>0&&(0,r.h)(l,{selected:N,done:F,cancel:x,i18n:P}))}},3873:function(e,t,i){var r=i(5181);class s extends r.Component{componentWillUnmount(){const{onUnmount:e}=this.props;e()}render(){const{children:e}=this.props;return(0,r.toChildArray)(e)[0]}}e.exports=s},9936:function(e,t,i){var r=i(5181);class s extends r.Component{constructor(e){super(e),this.preventEnterPress=this.preventEnterPress.bind(this)}preventEnterPress(e){13===e.keyCode&&(e.stopPropagation(),e.preventDefault())}render(){const{i18n:e,filterInput:t,filterQuery:i}=this.props;return(0,r.h)("div",{className:"uppy-ProviderBrowser-filter"},(0,r.h)("input",{className:"uppy-u-reset uppy-ProviderBrowser-filterInput",type:"text",placeholder:e("filter"),"aria-label":e("filter"),onKeyUp:this.preventEnterPress,onKeyDown:this.preventEnterPress,onKeyPress:this.preventEnterPress,onInput:e=>i(e),value:t}),(0,r.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-ProviderBrowser-filterIcon",width:"12",height:"12",viewBox:"0 0 12 12"},(0,r.h)("path",{d:"M8.638 7.99l3.172 3.172a.492.492 0 1 1-.697.697L7.91 8.656a4.977 4.977 0 0 1-2.983.983C2.206 9.639 0 7.481 0 4.819 0 2.158 2.206 0 4.927 0c2.721 0 4.927 2.158 4.927 4.82a4.74 4.74 0 0 1-1.216 3.17zm-3.71.685c2.176 0 3.94-1.726 3.94-3.856 0-2.129-1.764-3.855-3.94-3.855C2.75.964.984 2.69.984 4.819c0 2.13 1.765 3.856 3.942 3.856z"})),t&&(0,r.h)("button",{className:"uppy-u-reset uppy-ProviderBrowser-filterClose",type:"button","aria-label":e("resetFilter"),title:e("resetFilter"),onClick:i},(0,r.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",viewBox:"0 0 19 19"},(0,r.h)("path",{d:"M17.318 17.232L9.94 9.854 9.586 9.5l-.354.354-7.378 7.378h.707l-.62-.62v.706L9.318 9.94l.354-.354-.354-.354L1.94 1.854v.707l.62-.62h-.706l7.378 7.378.354.354.354-.354 7.378-7.378h-.707l.622.62v-.706L9.854 9.232l-.354.354.354.354 7.378 7.378.708-.707-7.38-7.378v.708l7.38-7.38.353-.353-.353-.353-.622-.622-.353-.353-.354.352-7.378 7.38h.708L2.56 1.23 2.208.88l-.353.353-.622.62-.353.355.352.353 7.38 7.38v-.708l-7.38 7.38-.353.353.352.353.622.622.353.353.354-.353 7.38-7.38h-.708l7.38 7.38z"}))))}}e.exports=s},6686:function(e,t,i){var r=i(5181);e.exports=e=>{let{cancel:t,done:i,i18n:s,selected:n}=e;return(0,r.h)("div",{className:"uppy-ProviderBrowser-footer"},(0,r.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary",onClick:i,type:"button"},s("selectX",{smart_count:n})),(0,r.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-link",onClick:t,type:"button"},s("cancel")))}},128:function(e,t,i){var r=i(5181);e.exports=function(e){const{className:t,isDisabled:i,restrictionReason:s,isChecked:n,title:o,itemIconEl:l,showTitles:a,toggleCheckbox:h,recordShiftKeyPress:c,id:u,children:p}=e;return(0,r.h)("li",{className:t,title:i?s:null},(0,r.h)("input",{type:"checkbox",className:`uppy-u-reset uppy-ProviderBrowserItem-checkbox ${n?"uppy-ProviderBrowserItem-checkbox--is-checked":""} uppy-ProviderBrowserItem-checkbox--grid`,onChange:h,onKeyDown:c,name:"listitem",id:u,checked:n,disabled:i,"data-uppy-super-focusable":!0}),(0,r.h)("label",{htmlFor:u,"aria-label":o,className:"uppy-u-reset uppy-ProviderBrowserItem-inner"},(0,r.h)("span",{className:"uppy-ProviderBrowserItem-inner-relative"},l,a&&o,p)))}},7941:function(e,t,i){var r=i(5181);function s(){return(0,r.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:11,height:14.5,viewBox:"0 0 44 58"},(0,r.h)("path",{d:"M27.437.517a1 1 0 0 0-.094.03H4.25C2.037.548.217 2.368.217 4.58v48.405c0 2.212 1.82 4.03 4.03 4.03H39.03c2.21 0 4.03-1.818 4.03-4.03V15.61a1 1 0 0 0-.03-.28 1 1 0 0 0 0-.093 1 1 0 0 0-.03-.032 1 1 0 0 0 0-.03 1 1 0 0 0-.032-.063 1 1 0 0 0-.03-.063 1 1 0 0 0-.032 0 1 1 0 0 0-.03-.063 1 1 0 0 0-.032-.03 1 1 0 0 0-.03-.063 1 1 0 0 0-.063-.062l-14.593-14a1 1 0 0 0-.062-.062A1 1 0 0 0 28 .708a1 1 0 0 0-.374-.157 1 1 0 0 0-.156 0 1 1 0 0 0-.03-.03l-.003-.003zM4.25 2.547h22.218v9.97c0 2.21 1.82 4.03 4.03 4.03h10.564v36.438a2.02 2.02 0 0 1-2.032 2.032H4.25c-1.13 0-2.032-.9-2.032-2.032V4.58c0-1.13.902-2.032 2.03-2.032zm24.218 1.345l10.375 9.937.75.718H30.5c-1.13 0-2.032-.9-2.032-2.03V3.89z"}))}function n(){return(0,r.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",style:{minWidth:16,marginRight:3},viewBox:"0 0 276.157 276.157"},(0,r.h)("path",{d:"M273.08 101.378c-3.3-4.65-8.86-7.32-15.254-7.32h-24.34V67.59c0-10.2-8.3-18.5-18.5-18.5h-85.322c-3.63 0-9.295-2.875-11.436-5.805l-6.386-8.735c-4.982-6.814-15.104-11.954-23.546-11.954H58.73c-9.292 0-18.638 6.608-21.737 15.372l-2.033 5.752c-.958 2.71-4.72 5.37-7.596 5.37H18.5C8.3 49.09 0 57.39 0 67.59v167.07c0 .886.16 1.73.443 2.52.152 3.306 1.18 6.424 3.053 9.064 3.3 4.652 8.86 7.32 15.255 7.32h188.487c11.395 0 23.27-8.425 27.035-19.18l40.677-116.188c2.11-6.035 1.43-12.164-1.87-16.816zM18.5 64.088h8.864c9.295 0 18.64-6.607 21.738-15.37l2.032-5.75c.96-2.712 4.722-5.373 7.597-5.373h29.565c3.63 0 9.295 2.876 11.437 5.806l6.386 8.735c4.982 6.815 15.104 11.954 23.546 11.954h85.322c1.898 0 3.5 1.602 3.5 3.5v26.47H69.34c-11.395 0-23.27 8.423-27.035 19.178L15 191.23V67.59c0-1.898 1.603-3.5 3.5-3.5zm242.29 49.15l-40.676 116.188c-1.674 4.78-7.812 9.135-12.877 9.135H18.75c-1.447 0-2.576-.372-3.02-.997-.442-.625-.422-1.814.057-3.18l40.677-116.19c1.674-4.78 7.812-9.134 12.877-9.134h188.487c1.448 0 2.577.372 3.02.997.443.625.423 1.814-.056 3.18z"}))}function o(){return(0,r.h)("svg",{"aria-hidden":"true",focusable:"false",style:{width:16,marginRight:4},viewBox:"0 0 58 58"},(0,r.h)("path",{d:"M36.537 28.156l-11-7a1.005 1.005 0 0 0-1.02-.033C24.2 21.3 24 21.635 24 22v14a1 1 0 0 0 1.537.844l11-7a1.002 1.002 0 0 0 0-1.688zM26 34.18V23.82L34.137 29 26 34.18z"}),(0,r.h)("path",{d:"M57 6H1a1 1 0 0 0-1 1v44a1 1 0 0 0 1 1h56a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1zM10 28H2v-9h8v9zm-8 2h8v9H2v-9zm10 10V8h34v42H12V40zm44-12h-8v-9h8v9zm-8 2h8v9h-8v-9zm8-22v9h-8V8h8zM2 8h8v9H2V8zm0 42v-9h8v9H2zm54 0h-8v-9h8v9z"}))}e.exports=e=>{const{itemIconString:t}=e;if(null!==t)switch(t){case"file":return(0,r.h)(s,null);case"folder":return(0,r.h)(n,null);case"video":return(0,r.h)(o,null);default:{const{alt:i}=e;return(0,r.h)("img",{src:t,alt:i})}}}},4504:function(e,t,i){var r=i(5181);e.exports=function(e){const{className:t,isDisabled:i,restrictionReason:s,isCheckboxDisabled:n,isChecked:o,toggleCheckbox:l,recordShiftKeyPress:a,type:h,id:c,itemIconEl:u,title:p,handleFolderClick:d,showTitles:g,i18n:m}=e;return(0,r.h)("li",{className:t,title:i?s:null},n?null:(0,r.h)("input",{type:"checkbox",className:"uppy-u-reset uppy-ProviderBrowserItem-checkbox "+(o?"uppy-ProviderBrowserItem-checkbox--is-checked":""),onChange:l,onKeyDown:a,name:"listitem",id:c,checked:o,"aria-label":"file"===h?null:m("allFilesFromFolderNamed",{name:p}),disabled:i,"data-uppy-super-focusable":!0}),"file"===h?(0,r.h)("label",{htmlFor:c,className:"uppy-u-reset uppy-ProviderBrowserItem-inner"},(0,r.h)("div",{className:"uppy-ProviderBrowserItem-iconWrap"},u),g&&p):(0,r.h)("button",{type:"button",className:"uppy-u-reset uppy-ProviderBrowserItem-inner",onClick:d,"aria-label":m("openFolderNamed",{name:p})},(0,r.h)("div",{className:"uppy-ProviderBrowserItem-iconWrap"},u),g&&(0,r.h)("span",null,p)))}},1654:function(e,t,i){var r=i(5181);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},s.apply(this,arguments)}const n=i(3373),o=i(7941),l=i(128),a=i(4504);e.exports=e=>{const{author:t,getItemIcon:i,isChecked:h,isDisabled:c,viewType:u}=e,p=i(),d=n("uppy-ProviderBrowserItem",{"uppy-ProviderBrowserItem--selected":h},{"uppy-ProviderBrowserItem--disabled":c},{"uppy-ProviderBrowserItem--noPreview":"video"===p}),g=(0,r.h)(o,{itemIconString:p});switch(u){case"grid":return(0,r.h)(l,s({},e,{className:d,itemIconEl:g}));case"list":return(0,r.h)(a,s({},e,{className:d,itemIconEl:g}));case"unsplash":return(0,r.h)(l,s({},e,{className:d,itemIconEl:g}),(0,r.h)("a",{href:`${t.url}?utm_source=Companion&utm_medium=referral`,target:"_blank",rel:"noopener noreferrer",className:"uppy-ProviderBrowserItem-author"},t.name));default:throw new Error(`There is no such type ${u}`)}}},9649:function(e,t,i){var r=i(5181);e.exports=e=>{let{i18n:t}=e;return(0,r.h)("div",{className:"uppy-Provider-loading"},(0,r.h)("span",null,t("loading")))}},3946:function(e,t,i){var r=i(5181);function s(){return(0,r.h)("svg",{width:"26",height:"26",viewBox:"0 0 26 26",xmlns:"http://www.w3.org/2000/svg"},(0,r.h)("g",{fill:"none","fill-rule":"evenodd"},(0,r.h)("circle",{fill:"#FFF",cx:"13",cy:"13",r:"13"}),(0,r.h)("path",{d:"M21.64 13.205c0-.639-.057-1.252-.164-1.841H13v3.481h4.844a4.14 4.14 0 01-1.796 2.716v2.259h2.908c1.702-1.567 2.684-3.875 2.684-6.615z",fill:"#4285F4","fill-rule":"nonzero"}),(0,r.h)("path",{d:"M13 22c2.43 0 4.467-.806 5.956-2.18l-2.908-2.259c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H4.957v2.332A8.997 8.997 0 0013 22z",fill:"#34A853","fill-rule":"nonzero"}),(0,r.h)("path",{d:"M7.964 14.71A5.41 5.41 0 017.682 13c0-.593.102-1.17.282-1.71V8.958H4.957A8.996 8.996 0 004 13c0 1.452.348 2.827.957 4.042l3.007-2.332z",fill:"#FBBC05","fill-rule":"nonzero"}),(0,r.h)("path",{d:"M13 7.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C17.463 4.891 15.426 4 13 4a8.997 8.997 0 00-8.043 4.958l3.007 2.332C8.672 9.163 10.656 7.58 13 7.58z",fill:"#EA4335","fill-rule":"nonzero"}),(0,r.h)("path",{d:"M4 4h18v18H4z"})))}e.exports=function(e){const{pluginName:t,pluginIcon:i,i18nArray:n,handleAuth:o}=e,l="Google Drive"===t,a=(0,r.h)("span",{className:"uppy-Provider-authTitleName"},t,(0,r.h)("br",null));return(0,r.h)("div",{className:"uppy-Provider-auth"},(0,r.h)("div",{className:"uppy-Provider-authIcon"},i()),(0,r.h)("div",{className:"uppy-Provider-authTitle"},n("authenticateWithTitle",{pluginName:a})),l?(0,r.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn uppy-Provider-btn-google",onClick:o,"data-uppy-super-focusable":!0},(0,r.h)(s,null),n("signInWithGoogle")):(0,r.h)("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn",onClick:o,"data-uppy-super-focusable":!0},n("authenticateWith",{pluginName:t})))}},8728:function(e,t,i){const r=i(1254),s=i(8858);e.exports=e=>{const t=[];return e.showBreadcrumbs&&t.push(s({getFolder:e.getFolder,directories:e.directories,breadcrumbsIcon:e.pluginIcon&&e.pluginIcon(),title:e.title})),t.push(r({logout:e.logout,username:e.username,i18n:e.i18n})),t}},2149:function(e,t,i){var r=i(5181);function s(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 o(e){return"__private_"+n+++"_"+e}const l=i(3946),a=i(8728),h=i(1640),c=i(9649),u=i(3873),p=i(7683);function d(e){return"string"==typeof e?new RegExp(`^${e}$`):e instanceof RegExp?e:void 0}var g=o("updateFilesAndFolders");class m extends p{constructor(e,t){super(e,t),Object.defineProperty(this,g,{value:y}),this.opts={viewType:"list",showTitles:!0,showFilter:!0,showBreadcrumbs:!0,...t},this.filterQuery=this.filterQuery.bind(this),this.getFolder=this.getFolder.bind(this),this.getNextFolder=this.getNextFolder.bind(this),this.logout=this.logout.bind(this),this.handleAuth=this.handleAuth.bind(this),this.handleScroll=this.handleScroll.bind(this),this.listAllFiles=this.listAllFiles.bind(this),this.donePicking=this.donePicking.bind(this),this.render=this.render.bind(this),this.plugin.setPluginState({authenticated:!1,files:[],folders:[],directories:[],filterInput:"",isSearchVisible:!1,currentSelection:[]})}tearDown(){}getFolder(e,t){return this.sharedHandler.loaderWrapper(this.provider.list(e),(i=>{let r;const n=this.plugin.getPluginState(),o=n.directories.findIndex((t=>e===t.id));r=-1!==o?n.directories.slice(0,o+1):n.directories.concat([{id:e,title:t}]),this.username=i.username||this.username,s(this,g)[g](i,[],[]),this.plugin.setPluginState({directories:r})}),this.handleError)}getNextFolder(e){this.getFolder(e.requestPath,e.name),this.lastCheckbox=void 0}logout(){this.provider.logout().then((e=>{if(e.ok){if(!e.revoked){const t=this.plugin.uppy.i18n("companionUnauthorizeHint",{provider:this.plugin.title,url:e.manual_revoke_url});this.plugin.uppy.info(t,"info",7e3)}const t={authenticated:!1,files:[],folders:[],directories:[]};this.plugin.setPluginState(t)}})).catch(this.handleError)}filterQuery(e){const t=this.plugin.getPluginState();this.plugin.setPluginState({...t,filterInput:e?e.target.value:""})}addFolder(e){const t=this.providerFileToId(e),i={...this.plugin.getPluginState().selectedFolders};if(!(t in i)||!i[t].loading)return i[t]={loading:!0,files:[]},this.plugin.setPluginState({selectedFolders:{...i}}),this.listAllFiles(e.requestPath).then((r=>{let s=0;r.forEach((e=>{const t=this.providerFileToId(e);this.plugin.uppy.checkIfFileAlreadyExists(t)||s++})),s>0&&r.forEach((e=>this.addFile(e)));const n=r.map(this.providerFileToId);let o;i[t]={loading:!1,files:n},this.plugin.setPluginState({selectedFolders:i}),o=0===s?this.plugin.uppy.i18n("folderAlreadyAdded",{folder:e.name}):r.length?this.plugin.uppy.i18n("folderAdded",{smart_count:s,folder:e.name}):this.plugin.uppy.i18n("emptyFolderAdded"),this.plugin.uppy.info(o)})).catch((e=>{const i={...this.plugin.getPluginState().selectedFolders};delete i[t],this.plugin.setPluginState({selectedFolders:i}),this.handleError(e)}))}async handleAuth(){await this.provider.ensurePreAuth();const e=btoa(JSON.stringify({origin:location.origin})),t=`@uppy/provider-views=${m.VERSION}`,i=this.provider.authUrl({state:e,uppyVersions:t}),r=window.open(i,"_blank"),s=e=>{if(e.source!==r)return void this.plugin.uppy.log("rejecting event from unknown source");var t,i;t=e.origin,i=this.plugin.opts.companionAllowedHosts,(Array.isArray(i)?i.map(d):[d(i)]).some((e=>(null==e?void 0:e.test(t))||(null==e?void 0:e.test(`${t}/`))))&&e.source===r||this.plugin.uppy.log(`rejecting event from ${e.origin} vs allowed pattern ${this.plugin.opts.companionAllowedHosts}`);const n="string"==typeof e.data?JSON.parse(e.data):e.data;if(n.error){this.plugin.uppy.log("auth aborted","warning");const{uppy:e}=this.plugin,t=e.i18n("authAborted");e.info({message:t},"warning",5e3)}else n.token?(r.close(),window.removeEventListener("message",s),this.provider.setAuthToken(n.token),this.preFirstRender()):this.plugin.uppy.log("did not receive token from auth window","error")};window.addEventListener("message",s)}async handleScroll(e){const t=this.nextPagePath||null;if(this.shouldHandleScroll(e)&&t){this.isHandlingScroll=!0;try{const e=await this.provider.list(t),{files:i,folders:r}=this.plugin.getPluginState();s(this,g)[g](e,i,r)}catch(e){this.handleError(e)}finally{this.isHandlingScroll=!1}}}async listAllFiles(e,t){void 0===t&&(t=null),t=t||[];const i=await this.provider.list(e);i.items.forEach((e=>{e.isFolder?this.addFolder(e):t.push(e)}));const r=i.nextPagePath;return r?this.listAllFiles(r,t):t}donePicking(){const{currentSelection:e}=this.plugin.getPluginState(),t=e.map((e=>e.isFolder?this.addFolder(e):this.addFile(e)));this.sharedHandler.loaderWrapper(Promise.all(t),(()=>{this.clearSelection()}),(()=>{}))}render(e,t){var i=this;void 0===t&&(t={});const{authenticated:s,didFirstRender:n}=this.plugin.getPluginState();n||this.preFirstRender();const o={...this.opts,...t},{files:p,folders:d,filterInput:g,loading:m,currentSelection:y}=this.plugin.getPluginState(),{isChecked:f,toggleCheckbox:v,recordShiftKeyPress:P,filterItems:w}=this.sharedHandler,b=""!==g,S={showBreadcrumbs:o.showBreadcrumbs,getFolder:this.getFolder,directories:this.plugin.getPluginState().directories,pluginIcon:this.plugin.icon,title:this.plugin.title,logout:this.logout,username:this.username,i18n:this.plugin.uppy.i18n},k={isChecked:f,toggleCheckbox:v,recordShiftKeyPress:P,currentSelection:y,files:b?w(p):p,folders:b?w(d):d,username:this.username,getNextFolder:this.getNextFolder,getFolder:this.getFolder,filterItems:this.sharedHandler.filterItems,filterQuery:this.filterQuery,logout:this.logout,handleScroll:this.handleScroll,listAllFiles:this.listAllFiles,done:this.donePicking,cancel:this.cancelPicking,headerComponent:a(S),title:this.plugin.title,viewType:o.viewType,showTitles:o.showTitles,showFilter:o.showFilter,showBreadcrumbs:o.showBreadcrumbs,pluginIcon:this.plugin.icon,i18n:this.plugin.uppy.i18n,uppyFiles:this.plugin.uppy.getFiles(),validateRestrictions:function(){return i.plugin.uppy.validateRestrictions(...arguments)}};return m?(0,r.h)(u,{onUnmount:this.clearSelection},(0,r.h)(c,{i18n:this.plugin.uppy.i18n})):s?(0,r.h)(u,{onUnmount:this.clearSelection},(0,r.h)(h,k)):(0,r.h)(u,{onUnmount:this.clearSelection},(0,r.h)(l,{pluginName:this.plugin.title,pluginIcon:this.plugin.icon,handleAuth:this.handleAuth,i18n:this.plugin.uppy.i18n,i18nArray:this.plugin.uppy.i18nArray}))}}function y(e,t,i){this.nextPagePath=e.nextPagePath,e.items.forEach((e=>{e.isFolder?i.push(e):t.push(e)})),this.plugin.setPluginState({folders:i,files:t})}m.VERSION="2.1.3",e.exports=m},1254:function(e,t,i){var r=i(5181);e.exports=e=>{let{i18n:t,logout:i,username:s}=e;return[(0,r.h)("span",{className:"uppy-ProviderBrowser-user",key:"username"},s),(0,r.h)("button",{type:"button",onClick:i,className:"uppy-u-reset uppy-ProviderBrowser-userLogout",key:"logout"},t("logOut"))]}},3601:function(e,t,i){e.exports=i(2149)},7268:function(e,t,i){var r=i(5181);e.exports=e=>{const{searchTerm:t,i18n:i,search:s}=e;return(0,r.h)("div",{class:"uppy-ProviderBrowser-search"},(0,r.h)("input",{class:"uppy-u-reset uppy-ProviderBrowser-searchInput",type:"text",placeholder:i("search"),"aria-label":i("search"),value:t,onKeyUp:e=>{13===e.keyCode&&(e.stopPropagation(),e.preventDefault(),s(e.target.value))},"data-uppy-super-focusable":!0}),(0,r.h)("svg",{"aria-hidden":"true",focusable:"false",class:"uppy-c-icon uppy-ProviderBrowser-searchIcon",width:"12",height:"12",viewBox:"0 0 12 12"},(0,r.h)("path",{d:"M8.638 7.99l3.172 3.172a.492.492 0 1 1-.697.697L7.91 8.656a4.977 4.977 0 0 1-2.983.983C2.206 9.639 0 7.481 0 4.819 0 2.158 2.206 0 4.927 0c2.721 0 4.927 2.158 4.927 4.82a4.74 4.74 0 0 1-1.216 3.17zm-3.71.685c2.176 0 3.94-1.726 3.94-3.856 0-2.129-1.764-3.855-3.94-3.855C2.75.964.984 2.69.984 4.819c0 2.13 1.765 3.856 3.942 3.856z"})))}},1864:function(e,t,i){var r=i(5181);e.exports=e=>{let t,{i18n:i,search:s}=e;const n=()=>{t.value&&s(t.value)};return(0,r.h)("div",{className:"uppy-SearchProvider"},(0,r.h)("input",{className:"uppy-u-reset uppy-c-textInput uppy-SearchProvider-input",type:"search","aria-label":i("enterTextToSearch"),placeholder:i("enterTextToSearch"),onKeyUp:e=>{13===e.keyCode&&n()},ref:e=>{t=e},"data-uppy-super-focusable":!0}),(0,r.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-SearchProvider-searchButton",type:"button",onClick:n},i("searchImages")))}},9689:function(e,t,i){var r=i(5181);function s(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 o(e){return"__private_"+n+++"_"+e}const l=i(1864),a=i(1640),h=i(9649),c=i(7268),u=i(3873),p=i(7683);var d=o("updateFilesAndInputMode");class g extends p{constructor(e,t){super(e,t),Object.defineProperty(this,d,{value:m}),this.opts={viewType:"grid",showTitles:!1,showFilter:!1,showBreadcrumbs:!1,...t},this.search=this.search.bind(this),this.triggerSearchInput=this.triggerSearchInput.bind(this),this.addFile=this.addFile.bind(this),this.handleScroll=this.handleScroll.bind(this),this.donePicking=this.donePicking.bind(this),this.render=this.render.bind(this),this.plugin.setPluginState({isInputMode:!0,files:[],folders:[],directories:[],filterInput:"",currentSelection:[],searchTerm:null})}tearDown(){}clearSelection(){this.plugin.setPluginState({currentSelection:[],isInputMode:!0,files:[],searchTerm:null})}search(e){const{searchTerm:t}=this.plugin.getPluginState();if(!e||e!==t)return this.sharedHandler.loaderWrapper(this.provider.search(e),(e=>{s(this,d)[d](e,[])}),this.handleError)}triggerSearchInput(){this.plugin.setPluginState({isInputMode:!0})}async handleScroll(e){const t=this.nextPageQuery||null;if(this.shouldHandleScroll(e)&&t){this.isHandlingScroll=!0;try{const{files:e,searchTerm:i}=this.plugin.getPluginState(),r=await this.provider.search(i,t);s(this,d)[d](r,e)}catch(e){this.handleError(e)}finally{this.isHandlingScroll=!1}}}donePicking(){const{currentSelection:e}=this.plugin.getPluginState(),t=e.map((e=>this.addFile(e)));this.sharedHandler.loaderWrapper(Promise.all(t),(()=>{this.clearSelection()}),(()=>{}))}render(e,t){var i=this;void 0===t&&(t={});const{didFirstRender:s,isInputMode:n,searchTerm:o}=this.plugin.getPluginState();s||this.preFirstRender();const p={...this.opts,...t},{files:d,folders:g,filterInput:m,loading:y,currentSelection:f}=this.plugin.getPluginState(),{isChecked:v,toggleCheckbox:P,filterItems:w}=this.sharedHandler,b=""!==m,S={isChecked:v,toggleCheckbox:P,currentSelection:f,files:b?w(d):d,folders:b?w(g):g,handleScroll:this.handleScroll,done:this.donePicking,cancel:this.cancelPicking,headerComponent:c({search:this.search,i18n:this.plugin.uppy.i18n,searchTerm:o}),title:this.plugin.title,viewType:p.viewType,showTitles:p.showTitles,showFilter:p.showFilter,showBreadcrumbs:p.showBreadcrumbs,pluginIcon:this.plugin.icon,i18n:this.plugin.uppy.i18n,uppyFiles:this.plugin.uppy.getFiles(),validateRestrictions:function(){return i.plugin.uppy.validateRestrictions(...arguments)}};return y?(0,r.h)(u,{onUnmount:this.clearSelection},(0,r.h)(h,{i18n:this.plugin.uppy.i18n})):n?(0,r.h)(u,{onUnmount:this.clearSelection},(0,r.h)(l,{search:this.search,i18n:this.plugin.uppy.i18n})):(0,r.h)(u,{onUnmount:this.clearSelection},(0,r.h)(a,S))}}function m(e,t){this.nextPageQuery=e.nextPageQuery,e.items.forEach((e=>{t.push(e)})),this.plugin.setPluginState({isInputMode:!1,files:t,searchTerm:e.searchedFor})}g.VERSION="2.1.3",e.exports=g},197:function(e,t,i){e.exports=i(9689)},3843:function(e,t,i){const r=i(8592);e.exports=class{constructor(e){this.plugin=e,this.filterItems=this.filterItems.bind(this),this.toggleCheckbox=this.toggleCheckbox.bind(this),this.recordShiftKeyPress=this.recordShiftKeyPress.bind(this),this.isChecked=this.isChecked.bind(this),this.loaderWrapper=this.loaderWrapper.bind(this)}filterItems(e){const t=this.plugin.getPluginState();return t.filterInput&&""!==t.filterInput?e.filter((e=>-1!==e.name.toLowerCase().indexOf(t.filterInput.toLowerCase()))):e}recordShiftKeyPress(e){this.isShiftKeyPressed=e.shiftKey}toggleCheckbox(e,t){e.stopPropagation(),e.preventDefault(),e.currentTarget.focus();const{folders:i,files:s}=this.plugin.getPluginState(),n=this.filterItems(i.concat(s));if(this.lastCheckbox&&this.isShiftKeyPressed){const e=n.indexOf(this.lastCheckbox),i=n.indexOf(t),s=e<i?n.slice(e,i+1):n.slice(i,e+1),o=[];for(const e of s){const{uppy:t}=this.plugin,i=t.validateRestrictions(r(e),[...t.getFiles(),...o]);i.result?o.push(e):t.info({message:i.reason},"error",t.opts.infoTimeout)}return void this.plugin.setPluginState({currentSelection:o})}this.lastCheckbox=t;const{currentSelection:o}=this.plugin.getPluginState();this.isChecked(t)?this.plugin.setPluginState({currentSelection:o.filter((e=>e.id!==t.id))}):this.plugin.setPluginState({currentSelection:o.concat([t])})}isChecked(e){const{currentSelection:t}=this.plugin.getPluginState();return t.some((t=>t.id===e.id))}loaderWrapper(e,t,i){e.then((e=>{this.plugin.setPluginState({loading:!1}),t(e)})).catch((e=>{this.plugin.setPluginState({loading:!1}),i(e)})),this.plugin.setPluginState({loading:!0})}}},7683:function(e,t,i){const r=i(5569),s=i(537),n=i(6063),o=i(3843);e.exports=class{constructor(e,t){this.plugin=e,this.provider=t.provider,this.sharedHandler=new o(e),this.isHandlingScroll=!1,this.preFirstRender=this.preFirstRender.bind(this),this.handleError=this.handleError.bind(this),this.addFile=this.addFile.bind(this),this.clearSelection=this.clearSelection.bind(this),this.cancelPicking=this.cancelPicking.bind(this)}providerFileToId(e){return n({data:e,name:e.name||e.id,type:e.mimetype})}preFirstRender(){this.plugin.setPluginState({didFirstRender:!0}),this.plugin.onFirstRender()}shouldHandleScroll(e){const{scrollHeight:t,scrollTop:i,offsetHeight:r}=e.target;return t-(i+r)<50&&!this.isHandlingScroll}clearSelection(){this.plugin.setPluginState({currentSelection:[]})}cancelPicking(){this.clearSelection();const e=this.plugin.uppy.getPlugin("Dashboard");e&&e.hideAllPanels()}handleError(e){const{uppy:t}=this.plugin,i=t.i18n("companionError");t.log(e.toString()),e.isAuthError||t.info({message:i,details:e.toString()},"error",5e3)}addFile(e){const t={id:this.providerFileToId(e),source:this.plugin.id,data:e,name:e.name||e.id,type:e.mimeType,isRemote:!0,meta:{},body:{fileId:e.id},remote:{companionUrl:this.plugin.opts.companionUrl,url:`${this.provider.fileUrl(e.requestPath)}`,body:{fileId:e.id},providerOptions:this.provider.opts,providerName:this.provider.name}},i=r(t);i&&s(i)&&(t.preview=e.thumbnail),e.author&&(null!=e.author.name&&(t.meta.authorName=String(e.author.name)),e.author.url&&(t.meta.authorUrl=e.author.url)),this.plugin.uppy.log("Adding remote file");try{return this.plugin.uppy.addFile(t),!0}catch(e){return e.isRestriction||this.plugin.uppy.log(e),!1}}}},1628:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SearchProviderViews=t.ProviderViews=void 0;const r=i(3601);t.ProviderViews=r;const s=i(197);t.SearchProviderViews=s},9518:function(e,t,i){const r=i(766);class s extends Error{constructor(e,t){void 0===t&&(t={}),super(e),this.cause=t.cause,this.cause&&r(this.cause,"isNetworkError")&&(this.isNetworkError=this.cause.isNetworkError)}}e.exports=s},5891:function(e){class t extends Error{constructor(e,t){void 0===t&&(t=null),super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=e,this.isNetworkError=!0,this.request=t}}e.exports=t},2019:function(e,t,i){const r=i(5891);e.exports=function(){return fetch(...arguments).catch((e=>{throw"AbortError"===e.name?e:new r(e)}))}},537:function(e){e.exports=function(e){return!!e&&/^[^/]+\/(jpe?g|gif|png|svg|svg\+xml|bmp|webp|avif)$/.test(e)}},8592:function(e,t,i){const r=i(7476);e.exports=function(e){return{...e,type:e.mimeType,extension:e.name?r(e.name).extension:null}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[312],{5318:function(i,e,t){var o=t(5377),s=t(7372),r=t(1628),n=t(5181);const h=t(2196);class l extends o.UIPlugin{constructor(i,e){super(i,e),this.id=this.opts.id||"Dropbox",s.Provider.initPlugin(this,e),this.title=this.opts.title||"Dropbox",this.icon=()=>(0,n.h)("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},(0,n.h)("g",{fill:"none",fillRule:"evenodd"},(0,n.h)("rect",{className:"uppy-ProviderIconBg",fill:"#0D2481",width:"32",height:"32",rx:"16"}),(0,n.h)("path",{d:"M11 8l5 3.185-5 3.186-5-3.186L11 8zm10 0l5 3.185-5 3.186-5-3.186L21 8zM6 17.556l5-3.185 5 3.185-5 3.186-5-3.186zm15-3.185l5 3.185-5 3.186-5-3.186 5-3.185zm-10 7.432l5-3.185 5 3.185-5 3.186-5-3.186z",fill:"#FFF",fillRule:"nonzero"}))),this.provider=new s.Provider(i,{companionUrl:this.opts.companionUrl,companionHeaders:this.opts.companionHeaders,companionKeysParams:this.opts.companionKeysParams,companionCookiesRule:this.opts.companionCookiesRule,provider:"dropbox",pluginId:this.id}),this.defaultLocale=h,this.i18nInit(),this.title=this.i18n("pluginNameDropbox"),this.onFirstRender=this.onFirstRender.bind(this),this.render=this.render.bind(this)}install(){this.view=new r.ProviderViews(this,{provider:this.provider});const{target:i}=this.opts;i&&this.mount(i,this)}uninstall(){this.view.tearDown(),this.unmount()}onFirstRender(){return Promise.all([this.provider.fetchPreAuthToken(),this.view.getFolder()])}render(i){return this.view.render(i)}}l.VERSION="2.0.8",i.exports=l},5312:function(i,e,t){i.exports=t(5318)},2196:function(i){i.exports={strings:{pluginNameDropbox:"Dropbox"}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[328],{9328:function(e){const r={pluralize(e){return 1===e?0:1},strings:{addBulkFilesFailed:{0:"L'ajout de %{smart_count} fichier a échoué",1:"L'ajout de %{smart_count} fichiers a échoué"},addMore:"Ajouter d'autres",addMoreFiles:"Ajouter d'autres fichiers",addingMoreFiles:"En train d'ajouter des fichiers",allFilesFromFolderNamed:"Tous les fichiers du dossier %{name}",allowAccessDescription:"Pour prendre des photos ou enregistrer une vidéo avec votre caméra, veuillez autoriser l'accès à votre caméra pour ce site.",allowAccessTitle:"Veuillez autoriser l'accès à votre caméra",authAborted:"Authentification interrompue",authenticateWith:"Se connecter à %{pluginName}",authenticateWithTitle:"Veuillez vous authentifier avec %{pluginName} pour sélectionner les fichiers",back:"Retour",browse:"naviguer",browseFiles:"naviguer",cancel:"Annuler",cancelUpload:"Annuler téléchargement",chooseFiles:"Choisir des fichiers",closeModal:"Fermer Fenêtre",companionError:"Connexion à Companion a échoué",companionUnauthorizeHint:"Pour vous déconnecter de votre compte %{provider}, veuillez aller à %{url}",complete:"Terminé",compressedX:"%{size} économisé(s) par la compression",compressingImages:"Compression des images...",connectedToInternet:"Connecté à Internet",copyLink:"Copier lien",copyLinkToClipboardFallback:"Copier le lien ci-dessous",copyLinkToClipboardSuccess:"Lien copié",creatingAssembly:"Préparation du téléchargement...",creatingAssemblyFailed:"Transloadit: Impossible de créer Assembly",dashboardTitle:"Téléchargeur de fichier",dashboardWindowTitle:"Fenêtre de téléchargeur de fichier (Appuyez sur echap pour fermer)",dataUploadedOfTotal:"%{complete} sur %{total}",done:"Terminé",dropHereOr:"Déposer les fichiers ici ou %{browse}",dropHint:"Déposez vos fichiers ici",dropPasteBoth:"Déposer les fichiers ici, coller ou %{browse}",dropPasteFiles:"Déposer les fichiers ici, coller ou %{browse}",dropPasteFolders:"Déposer les fichiers ici, coller ou %{browse}",dropPasteImportBoth:"Déposer les fichiers ici, coller, %{browse} ou importer de",dropPasteImportFiles:"Déposer les fichiers ici, coller, %{browse} ou importer de",dropPasteImportFolders:"Déposer les fichiers ici, coller, %{browse} ou importer de",editFile:"Modifier le fichier",editFileWithFilename:"Modifier le fichier %{file}",editing:"Modification en cours de %{file}",emptyFolderAdded:"Aucun fichier n'a été ajouté depuis un dossier vide",encoding:"Traitement...",enterCorrectUrl:"Lien incorrect: Assurez-vous que vous entrez un lien direct vers le fichier",enterUrlToImport:"Entrez le lien pour importer un fichier",exceedsSize:"Ce fichier dépasse la taille maximale autorisée de %{size}",failedToFetch:"Companion a échoué à récupérer ce lien, assurez-vous qu'il est correct",failedToUpload:"Le téléchargement de %{file} a échoué",fileSource:"Fichier source: %{name}",filesUploadedOfTotal:{0:"%{complete} sur %{smart_count} fichier téléchargé",1:"%{complete} sur %{smart_count} fichiers téléchargés",2:"%{complete} sur %{smart_count} fichiers téléchargés"},filter:"Filtrer",finishEditingFile:"Terminer l'édition du fichier",folderAdded:{0:"%{smart_count} fichier ajouté de %{folder}",1:"%{smart_count} fichiers ajoutés de %{folder}",2:"%{smart_count} fichiers ajoutés de %{folder}"},generatingThumbnails:"Generating thumbnails...",import:"Importer",importFrom:"Importer de %{name}",loading:"Chargement...",logOut:"Déconnexion",micDisabled:"Accès au micro refusé par l'utilisateur",myDevice:"Mon Appareil",noDuplicates:'Impossible d\'ajouter le fichier "%{fileName}", il existe déjà',noFilesFound:"Vous n'avez aucun fichier ou dossier ici",noInternetConnection:"Pas de connexion à Internet",noMoreFilesAllowed:"Impossible d'ajouter de nouveaux fichiers: en cours de chargement ",openFolderNamed:"Ouvrir %{name}",pause:"Pause",pauseUpload:"Mettre en pause le téléchargement",paused:"En pause",poweredBy:"Propulsé par %{uppy}",processingXFiles:{0:"Traitement de %{smart_count} fichier",1:"Traitement de %{smart_count} fichiers",2:"Traitement de %{smart_count} fichiers"},recording:"Enregistrement",recordingLength:"Durée d'enregistrement %{recording_length}",recordingStoppedMaxSize:"L'enregistrement s'est arrété car la taille du fichier dépasse la limite",removeFile:"Effacer le fichier %{file}",resetFilter:"Réinitialiser filtre",resume:"Reprendre",resumeUpload:"Reprendre le téléchargement",retry:"Réessayer",retryUpload:"Réessayer le téléchargement",save:"Sauvegarder",saveChanges:"Sauvegarder les modifications",selectFileNamed:"Sélectionner le fichier %{name}",selectX:{0:"Sélectionner %{smart_count}",1:"Sélectionner %{smart_count}",2:"Sélectionner %{smart_count}"},smile:"Souriez !",startRecording:"Commencer l'enregistrement vidéo",stopRecording:"Arrêter l'enregistrement vidéo",streamActive:"Stream actif",streamPassive:"Stream passif",submitRecordedFile:"Envoyer la vidéo enregistrée",takePicture:"Prendre une photo",timedOut:"Téléchargement bloqué durant %{seconds} secondes, annulation.",unselectFileNamed:"Désélectionner le fichier %{name}",upload:"Télécharger",uploadComplete:"Téléchargement terminé",uploadFailed:"Le téléchargement a échoué",uploadPaused:"Téléchargement mis en pause",uploadXFiles:{0:"Télécharger %{smart_count} fichier",1:"Télécharger %{smart_count} fichiers",2:"Télécharger %{smart_count} fichiers"},uploadXNewFiles:{0:"Télécharger +%{smart_count} fichier",1:"Télécharger +%{smart_count} fichiers",2:"Télécharger +%{smart_count} fichiers"},uploading:"Téléchargement en cours",uploadingXFiles:{0:"Téléchargement de %{smart_count} fichier",1:"Téléchargement de %{smart_count} fichiers",2:"Téléchargement de %{smart_count} fichiers"},xFilesSelected:{0:"%{smart_count} fichier sélectionné",1:"%{smart_count} fichiers sélectionnés",2:"%{smart_count} fichiers sélectionnés"},xMoreFilesAdded:{0:"%{smart_count} autre fichier ajouté",1:"%{smart_count} autres fichiers ajoutés",2:"%{smart_count} autres fichiers ajoutés"},xTimeLeft:"%{time} restantes",youCanOnlyUploadFileTypes:"Vous pouvez seulement télécharger: %{types}",youCanOnlyUploadX:{0:"Vous pouvez seulement télécharger %{smart_count} fichier",1:"Vous pouvez seulement télécharger %{smart_count} fichiers",2:"Vous pouvez seulement télécharger %{smart_count} fichiers"},youHaveToAtLeastSelectX:{0:"Vous devez sélectionner au moins %{smart_count} fichier",1:"Vous devez sélectionner au moins %{smart_count} fichiers",2:"Vous devez sélectionner au moins %{smart_count} fichiers"}}};"undefined"!=typeof Uppy&&(globalThis.Uppy.locales.fr_FR=r),e.exports=r}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[377],{8761: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}},1566:function(e,t,i){var s=i(8496),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}},8496: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,r=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<r;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 n in s={},e)this.match(n)&&(s[n]=e[n]);return s},e.exports=function(e,i,s){var o=new t(e,s||/[\/\.]/);return void 0!==i?o.match(i):o}},5181:function(e,t,i){"use strict";i.r(t),i.d(t,{Component:function(){return S},Fragment:function(){return w},cloneElement:function(){return G},createContext:function(){return H},createElement:function(){return v},createRef:function(){return b},h:function(){return v},hydrate:function(){return W},isValidElement:function(){return n},options:function(){return o},render:function(){return q},toChildArray:function(){return C}});var s,o,r,n,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,r,n,l={};for(n in t)"key"==n?o=t[n]:"ref"==n?r=t[n]:l[n]=t[n];if(arguments.length>2&&(l.children=arguments.length>3?s.call(arguments,2):i),"function"==typeof e&&null!=e.defaultProps)for(n in e.defaultProps)void 0===l[n]&&(l[n]=e.defaultProps[n]);return y(e,l,o,r,null)}function y(e,t,i,s,n){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==n?++r:n,__i:-1,__u:0};return null==n&&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,t,i){var s,r=e.__v,n=r.__e,l=e.__P;if(l)return(s=_({},r)).__v=r.__v+1,o.vnode&&o.vnode(s),I(l,s,r,e.__n,void 0!==l.ownerSVGElement,32&r.__u?[n]:null,t,null==n?x(r):n,!!(32&r.__u),i),s.__v=r.__v,s.__.__k[s.__i]=s,s.__d=void 0,s.__e!=n&&F(s),s}function F(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 F(e)}}function O(e){(!e.__d&&(e.__d=!0)&&l.push(e)&&!U.__r++||a!==o.debounceRendering)&&((a=o.debounceRendering)||u)(U)}function U(){var e,t,i,s=[],r=[];for(l.sort(d);e=l.shift();)e.__d&&(i=l.length,t=P(e,s,r)||t,0===i||l.length>i?(R(s,t,r),r.length=s.length=0,t=void 0,l.sort(d)):t&&o.__c&&o.__c(t,h));t&&R(s,t,r),U.__r=0}function k(e,t,i,s,o,r,n,l,a,u,d){var c,f,g,_,m,v=s&&s.__k||h,y=t.length;for(i.__d=a,E(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,I(e,g,f,o,r,n,l,a,u,d),_=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&z(f.ref,null,g),d.push(g.ref,g.__c||_,g)),null==m&&null!=_&&(m=_),65536&g.__u||f.__k===g.__k?a=T(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 E(e,t,i){var s,o,r,n,l,a=t.length,u=i.length,d=u,c=0;for(e.__k=[],s=0;s<a;s++)n=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=A(o,i,n,d),o.__i=l,r=null,-1!==l&&(d--,(r=i[l])&&(r.__u|=131072)),null==r||null===r.__v?(-1==l&&c--,"function"!=typeof o.type&&(o.__u|=65536)):l!==n&&(l===n+1?c++:l>n?d>a-n?c+=l-n:c--:l<n?l==n-1&&(c=l-n):c=0,l!==s+c&&(o.__u|=65536))):(r=i[n])&&null==r.key&&r.__e&&0==(131072&r.__u)&&(r.__e==e.__d&&(e.__d=x(r)),D(r,r,!1),i[n]=null,d--);if(d)for(s=0;s<u;s++)null!=(r=i[s])&&0==(131072&r.__u)&&(r.__e==e.__d&&(e.__d=x(r)),D(r,r))}function T(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=T(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 C(e,t){return t=t||[],null==e||"boolean"==typeof e||(g(e)?e.some((function(e){C(e,t)})):t.push(e)),t}function A(e,t,i,s){var o=e.key,r=e.type,n=i-1,l=i+1,a=t[i];if(null===a||a&&o==a.key&&r===a.type&&0==(131072&a.__u))return i;if(s>(null!=a&&0==(131072&a.__u)?1:0))for(;n>=0||l<t.length;){if(n>=0){if((a=t[n])&&0==(131072&a.__u)&&o==a.key&&r===a.type)return n;n--}if(l<t.length){if((a=t[l])&&0==(131072&a.__u)&&o==a.key&&r===a.type)return l;l++}}return-1}function j(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 $(e,t,i,s,o){var r;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||j(e.style,t,"");if(i)for(t in i)s&&i[t]===s[t]||j(e.style,t,i[t])}else if("o"===t[0]&&"n"===t[1])r=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=i,i?s?i.u=s.u:(i.u=Date.now(),e.addEventListener(t,r?N:M,r)):e.removeEventListener(t,r?N:M,r);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 M(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 N(e){if(this.l)return this.l[e.type+!0](o.event?o.event(e):e)}function I(e,t,i,s,r,n,l,a,u,d){var c,p,h,f,m,v,y,b,x,P,F,O,U,E,T,C=t.type;if(void 0!==t.constructor)return null;128&i.__u&&(u=!!(32&i.__u),n=[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=B),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,U=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&&++U<25);p.state=p.__s,null!=p.getChildContext&&(s=_(_({},s),p.getChildContext())),h||null==p.getSnapshotBeforeUpdate||(v=p.getSnapshotBeforeUpdate(f,m)),k(e,g(T=null!=c&&c.type===w&&null==c.key?c.props.children:c)?T:[T],t,i,s,r,n,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!=n?(t.__e=a,t.__u|=u?160:32,n[n.indexOf(a)]=null):(t.__e=i.__e,t.__k=i.__k),o.__e(e,t,i)}else null==n&&t.__v===i.__v?(t.__k=i.__k,t.__e=i.__e):t.__e=L(i.__e,t,i,s,r,n,l,u,d);(c=o.diffed)&&c(t)}function R(e,t,i){for(var s=0;s<i.length;s++)z(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 L(e,t,i,o,r,n,l,a,u){var d,c,h,f,_,v,y,b=i.props,w=t.props,S=t.type;if("svg"===S&&(r=!0),null!=n)for(d=0;d<n.length;d++)if((_=n[d])&&"setAttribute"in _==!!S&&(S?_.localName===S:3===_.nodeType)){e=_,n[d]=null;break}if(null==e){if(null===S)return document.createTextNode(w);e=r?document.createElementNS("http://www.w3.org/2000/svg",S):document.createElement(S,w.is&&w),n=null,a=!1}if(null===S)b===w||a&&e.data===w||(e.data=w);else{if(n=n&&s.call(e.childNodes),b=i.props||p,!a&&null!=n)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||$(e,d,null,_,r));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]===_||$(e,d,_,b[d],r);if(c)a||h&&(c.__html===h.__html||c.__html===e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(h&&(e.innerHTML=""),k(e,g(f)?f:[f],t,i,o,r&&"foreignObject"!==S,n,l,n?n[0]:i.__k&&x(i,0),a,u),null!=n)for(d=n.length;d--;)null!=n[d]&&m(n[d]);a||(d="value",void 0!==v&&(v!==e[d]||"progress"===S&&!v||"option"===S&&v!==b[d])&&$(e,d,v,b[d],!1),d="checked",void 0!==y&&y!==e[d]&&$(e,d,y,b[d],!1))}return e}function z(e,t,i){try{"function"==typeof e?e(t):e.current=t}catch(e){o.__e(e,i)}}function D(e,t,i){var s,r;if(o.unmount&&o.unmount(e),(s=e.ref)&&(s.current&&s.current!==e.__e||z(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(r=0;r<s.length;r++)s[r]&&D(s[r],t,i||"function"!=typeof e.type);i||null==e.__e||m(e.__e),e.__=e.__e=e.__d=void 0}function B(e,t,i){return this.constructor(e,i)}function q(e,t,i){var r,n,l,a;o.__&&o.__(e,t),n=(r="function"==typeof i)?null:i&&i.__k||t.__k,l=[],a=[],I(t,e=(!r&&i||t).__k=v(w,null,[e]),n||p,p,void 0!==t.ownerSVGElement,!r&&i?[i]:n?null:t.firstChild?s.call(t.childNodes):null,l,!r&&i?i:n?n.__e:t.firstChild,r,a),e.__d=void 0,R(l,e,a)}function W(e,t){q(e,t,W)}function G(e,t,i){var o,r,n,l,a=_({},e.props);for(n in e.type&&e.type.defaultProps&&(l=e.type.defaultProps),t)"key"==n?o=t[n]:"ref"==n?r=t[n]:a[n]=void 0===t[n]&&void 0!==l?l[n]:t[n];return arguments.length>2&&(a.children=arguments.length>3?s.call(arguments,2):i),y(e.type,a,o||e.key,r||e.ref,null)}function H(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,O(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,r,n;t=t.__;)if((o=t.__c)&&!o.__)try{if((r=o.constructor)&&null!=r.getDerivedStateFromError&&(o.setState(r.getDerivedStateFromError(e)),n=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,s||{}),n=o.__d),n)return o.__E=o}catch(t){e=t}throw e}},r=0,n=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),O(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),O(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},U.__r=0,c=0},3982:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=t.RestrictionError=t.Restricter=void 0;const s=i(8761),o=i(1566);t.defaultOptions={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class r extends Error{constructor(){super(...arguments),this.isRestriction=!0}}t.RestrictionError=r,"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:n,maxTotalFileSize:l,maxNumberOfFiles:a,allowedFileTypes:u}=this.getOpts().restrictions;if(a&&t.filter((e=>!e.isGhost)).length+1>a)throw new r(`${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 r(this.i18n("youCanOnlyUploadFileTypes",{types:e}))}if(l&&null!=e.size&&t.reduce(((e,t)=>e+t.size),e.size)>l)throw new r(this.i18n("exceedsSize",{size:s(l),file:e.name}));if(i&&null!=e.size&&e.size>i)throw new r(this.i18n("exceedsSize",{size:s(i),file:e.name}));if(n&&null!=e.size&&e.size<n)throw new r(this.i18n("inferiorSize",{size:s(n)}))}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(Object.keys(e).length<t)throw new r(this.i18n("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new r(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}}}},4780: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 r=0;function n(e){return"__private_"+r+++"_"+e}const l=i(7324),a=i(5727),u=i(2291);var d=n("updateUI");class c extends u{constructor(){super(...arguments),Object.defineProperty(this,d,{writable:!0,value:void 0})}mount(e,t){const i=t.id,r=l(e);if(r){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),r=0;r<s;r++)o[r]=arguments[r];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&&(r.innerHTML=""),(0,s.render)(this.render(this.uppy.getState()),t),this.el=t,r.appendChild(t),t.dir=this.opts.direction||a(t)||"ltr",this.onMount(),this.el}let n;if("object"==typeof e&&e instanceof c)n=e;else if("function"==typeof e){const t=e;this.uppy.iteratePlugins((e=>{e instanceof t&&(n=e)}))}if(n)return this.uppy.log(`Installing ${i} to ${n.id}`),this.parent=n,this.el=n.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},3051:function(e,t,i){"use strict";var s=i(945),o=i(5716),r=i(3982);let n,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(2653),p=i(2162),h=i(3871),f=i(8783),g=i(5569),_=i(7476),m=i(6063),v=i(7195),y=i(5104),b=i(1163);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");n=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:r.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 r.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})),r=s.filter((e=>!e.progress.uploadStarted)),n=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:r,startedFiles:n,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},r={...s},n=Object.create(null);function l(e){return void 0===n[e]}e.forEach((e=>{i[e]&&(n[e]=i[e],delete o[e])})),Object.keys(r).forEach((e=>{const t=s[e].fileIDs.filter(l);if(0===t.length)return void delete r[e];const{capabilities:i}=this.getState();if(t.length!==s[e].fileIDs.length&&!i.individualCancellation)throw new Error("individualCancellation is disabled");r[e]={...s[e],fileIDs:t}}));const a={currentUploads:r,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(n);u.forEach((e=>{this.emit("file-removed",n[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 r=0;t.forEach((e=>{r+=e.progress.bytesUploaded})),i.forEach((e=>{r+=o*(e.progress.percentage||0)/100}));let n=0===s?0:Math.round(r/s*100);n>100&&(n=100),this.setState({totalProgress:n}),this.emit("progress",n)}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}}[n](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 r.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 r.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,n=Boolean(t.isRemote),l=m({...t,type:i});if(this.checkIfFileAlreadyExists(l)){const e=new r.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:n,remote:t.remote||"",preview:t.preview};const p=this.opts.onBeforeFileAdded(c,e);if(!1===p){const e=new r.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:r}=this.getState();if(!o&&!i)throw new Error("Cannot create a new upload: already uploading.");const n=(0,s.nanoid)();return this.emit("upload",{id:n,fileIDs:e}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:{...r,[n]:{fileIDs:e,step:0,result:{}}}}),n}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 r=s;r<o.length&&i;r++){const s=o[r],n={...i,step:r};this.setState({currentUploads:{...t,[e]:n}}),await s(n.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)),r=s.filter((e=>e.error));await this.addResultData(e,{successful:o,failed:r,uploadID:e}),t=this.getState().currentUploads,i=t[e]}let r;return i&&(r=i.result,this.emit("complete",r),a(this,R)[R](e)),null==r&&this.log(`Not setting result for an upload that has been removed: ${e}`),r}z.VERSION="2.3.4",e.exports=z},5104: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"}},5377: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(5716);e.exports=i(3051);const o=i(4780);t.UIPlugin=o;const r=i(2291);t.BasePlugin=r;const n=i(3051);t.Uppy=n;const l=i(4780),a=i(2291);n.Uppy=n,n.UIPlugin=l,n.BasePlugin=a,n.debugLogger=s.debugLogger},1163: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}"}}}},5716:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.justErrorsLogger=t.debugLogger=void 0;const s=i(2167),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 r={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=r},7195: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}},8783: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:r}),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 r(){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(6039);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}},7476: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)}}},5569:function(e,t,i){"use strict";const s=i(7476),o=i(9838);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"}},5727: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}},2167: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())}`}},6039:function(e){"use strict";e.exports=function(e){return(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE}},9838: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"}},945: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}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[490],{6490:function(t,n,i){var e;!function(){function o(t,n,i){return t.call.apply(t.bind,arguments)}function a(t,n,i){if(!t)throw Error();if(2<arguments.length){var e=Array.prototype.slice.call(arguments,2);return function(){var i=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(i,e),t.apply(n,i)}}return function(){return t.apply(n,arguments)}}function s(t,n,i){return(s=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?o:a).apply(null,arguments)}var r=Date.now||function(){return+new Date};function c(t,n){this.a=t,this.o=n||t,this.c=this.o.document}var f=!!window.FontFace;function h(t,n,i,e){if(n=t.c.createElement(n),i)for(var o in i)i.hasOwnProperty(o)&&("style"==o?n.style.cssText=i[o]:n.setAttribute(o,i[o]));return e&&n.appendChild(t.c.createTextNode(e)),n}function l(t,n,i){(t=t.c.getElementsByTagName(n)[0])||(t=document.documentElement),t.insertBefore(i,t.lastChild)}function u(t){t.parentNode&&t.parentNode.removeChild(t)}function p(t,n,i){n=n||[],i=i||[];for(var e=t.className.split(/\s+/),o=0;o<n.length;o+=1){for(var a=!1,s=0;s<e.length;s+=1)if(n[o]===e[s]){a=!0;break}a||e.push(n[o])}for(n=[],o=0;o<e.length;o+=1){for(a=!1,s=0;s<i.length;s+=1)if(e[o]===i[s]){a=!0;break}a||n.push(e[o])}t.className=n.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function g(t,n){for(var i=t.className.split(/\s+/),e=0,o=i.length;e<o;e++)if(i[e]==n)return!0;return!1}function d(t,n,i){function e(){r&&o&&a&&(r(s),r=null)}n=h(t,"link",{rel:"stylesheet",href:n,media:"all"});var o=!1,a=!0,s=null,r=i||null;f?(n.onload=function(){o=!0,e()},n.onerror=function(){o=!0,s=Error("Stylesheet failed to load"),e()}):setTimeout((function(){o=!0,e()}),0),l(t,"head",n)}function v(t,n,i,e){var o=t.c.getElementsByTagName("head")[0];if(o){var a=h(t,"script",{src:n}),s=!1;return a.onload=a.onreadystatechange=function(){s||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(s=!0,i&&i(null),a.onload=a.onreadystatechange=null,"HEAD"==a.parentNode.tagName&&o.removeChild(a))},o.appendChild(a),setTimeout((function(){s||(s=!0,i&&i(Error("Script load timeout")))}),e||5e3),a}return null}function m(){this.a=0,this.c=null}function w(t){return t.a++,function(){t.a--,b(t)}}function y(t,n){t.c=n,b(t)}function b(t){0==t.a&&t.c&&(t.c(),t.c=null)}function _(t){this.a=t||"-"}function x(t,n){this.c=t,this.f=4,this.a="n";var i=(n||"n4").match(/^([nio])([1-9])$/i);i&&(this.a=i[1],this.f=parseInt(i[2],10))}function j(t){var n=[];t=t.split(/,\s*/);for(var i=0;i<t.length;i++){var e=t[i].replace(/['"]/g,"");-1!=e.indexOf(" ")||/^\d/.test(e)?n.push("'"+e+"'"):n.push(e)}return n.join(",")}function k(t){return t.a+t.f}function T(t){var n="normal";return"o"===t.a?n="oblique":"i"===t.a&&(n="italic"),n}function S(t){var n=4,i="n",e=null;return t&&((e=t.match(/(normal|oblique|italic)/i))&&e[1]&&(i=e[1].substr(0,1).toLowerCase()),(e=t.match(/([1-9]00|normal|bold)/i))&&e[1]&&(/bold/i.test(e[1])?n=7:/[1-9]00/.test(e[1])&&(n=parseInt(e[1].substr(0,1),10)))),i+n}function C(t,n){this.c=t,this.f=t.o.document.documentElement,this.h=n,this.a=new _("-"),this.j=!1!==n.events,this.g=!1!==n.classes}function A(t){if(t.g){var n=g(t.f,t.a.c("wf","active")),i=[],e=[t.a.c("wf","loading")];n||i.push(t.a.c("wf","inactive")),p(t.f,i,e)}N(t,"inactive")}function N(t,n,i){t.j&&t.h[n]&&(i?t.h[n](i.c,k(i)):t.h[n]())}function E(){this.c={}}function I(t,n){this.c=t,this.f=n,this.a=h(this.c,"span",{"aria-hidden":"true"},this.f)}function O(t){l(t.c,"body",t.a)}function P(t){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+j(t.c)+";font-style:"+T(t)+";font-weight:"+t.f+"00;"}function W(t,n,i,e,o,a){this.g=t,this.j=n,this.a=e,this.c=i,this.f=o||3e3,this.h=a||void 0}function B(t,n,i,e,o,a,s){this.v=t,this.B=n,this.c=i,this.a=e,this.s=s||"BESbswy",this.f={},this.w=o||3e3,this.u=a||null,this.m=this.j=this.h=this.g=null,this.g=new I(this.c,this.s),this.h=new I(this.c,this.s),this.j=new I(this.c,this.s),this.m=new I(this.c,this.s),t=P(t=new x(this.a.c+",serif",k(this.a))),this.g.a.style.cssText=t,t=P(t=new x(this.a.c+",sans-serif",k(this.a))),this.h.a.style.cssText=t,t=P(t=new x("serif",k(this.a))),this.j.a.style.cssText=t,t=P(t=new x("sans-serif",k(this.a))),this.m.a.style.cssText=t,O(this.g),O(this.h),O(this.j),O(this.m)}_.prototype.c=function(t){for(var n=[],i=0;i<arguments.length;i++)n.push(arguments[i].replace(/[\W_]+/g,"").toLowerCase());return n.join(this.a)},W.prototype.start=function(){var t=this.c.o.document,n=this,i=r(),e=new Promise((function(e,o){!function a(){r()-i>=n.f?o():t.fonts.load(function(t){return T(t)+" "+t.f+"00 300px "+j(t.c)}(n.a),n.h).then((function(t){1<=t.length?e():setTimeout(a,25)}),(function(){o()}))}()})),o=null,a=new Promise((function(t,i){o=setTimeout(i,n.f)}));Promise.race([a,e]).then((function(){o&&(clearTimeout(o),o=null),n.g(n.a)}),(function(){n.j(n.a)}))};var F={D:"serif",C:"sans-serif"},L=null;function D(){if(null===L){var t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);L=!!t&&(536>parseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))}return L}function $(t,n,i){for(var e in F)if(F.hasOwnProperty(e)&&n===t.f[F[e]]&&i===t.f[F[e]])return!0;return!1}function q(t){var n,i=t.g.a.offsetWidth,e=t.h.a.offsetWidth;(n=i===t.f.serif&&e===t.f["sans-serif"])||(n=D()&&$(t,i,e)),n?r()-t.A>=t.w?D()&&$(t,i,e)&&(null===t.u||t.u.hasOwnProperty(t.a.c))?H(t,t.v):H(t,t.B):function(t){setTimeout(s((function(){q(this)}),t),50)}(t):H(t,t.v)}function H(t,n){setTimeout(s((function(){u(this.g.a),u(this.h.a),u(this.j.a),u(this.m.a),n(this.a)}),t),0)}function M(t,n,i){this.c=t,this.a=n,this.f=0,this.m=this.j=!1,this.s=i}B.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=r(),q(this)};var z=null;function G(t){0==--t.f&&t.j&&(t.m?((t=t.a).g&&p(t.f,[t.a.c("wf","active")],[t.a.c("wf","loading"),t.a.c("wf","inactive")]),N(t,"active")):A(t.a))}function K(t){this.j=t,this.a=new E,this.h=0,this.f=this.g=!0}function R(t,n,i,e,o){var a=0==--t.h;(t.f||t.g)&&setTimeout((function(){var t=o||null,r=e||{};if(0===i.length&&a)A(n.a);else{n.f+=i.length,a&&(n.j=a);var c,f=[];for(c=0;c<i.length;c++){var h=i[c],l=r[h.c],u=n.a,g=h;if(u.g&&p(u.f,[u.a.c("wf",g.c,k(g).toString(),"loading")]),N(u,"fontloading",g),u=null,null===z)if(window.FontFace){g=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var d=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);z=g?42<parseInt(g[1],10):!d}else z=!1;u=z?new W(s(n.g,n),s(n.h,n),n.c,h,n.s,l):new B(s(n.g,n),s(n.h,n),n.c,h,n.s,t,l),f.push(u)}for(c=0;c<f.length;c++)f[c].start()}}),0)}function U(t,n){this.c=t,this.a=n}function V(t,n){this.c=t,this.a=n}function X(t,n){this.c=t||J,this.a=[],this.f=[],this.g=n||""}M.prototype.g=function(t){var n=this.a;n.g&&p(n.f,[n.a.c("wf",t.c,k(t).toString(),"active")],[n.a.c("wf",t.c,k(t).toString(),"loading"),n.a.c("wf",t.c,k(t).toString(),"inactive")]),N(n,"fontactive",t),this.m=!0,G(this)},M.prototype.h=function(t){var n=this.a;if(n.g){var i=g(n.f,n.a.c("wf",t.c,k(t).toString(),"active")),e=[],o=[n.a.c("wf",t.c,k(t).toString(),"loading")];i||e.push(n.a.c("wf",t.c,k(t).toString(),"inactive")),p(n.f,e,o)}N(n,"fontinactive",t),G(this)},K.prototype.load=function(t){this.c=new c(this.j,t.context||this.j),this.g=!1!==t.events,this.f=!1!==t.classes,function(t,n,i){var e=[],o=i.timeout;!function(t){t.g&&p(t.f,[t.a.c("wf","loading")]),N(t,"loading")}(n),e=function(t,n,i){var e,o=[];for(e in n)if(n.hasOwnProperty(e)){var a=t.c[e];a&&o.push(a(n[e],i))}return o}(t.a,i,t.c);var a=new M(t.c,n,o);for(t.h=e.length,n=0,i=e.length;n<i;n++)e[n].load((function(n,i,e){R(t,a,n,i,e)}))}(this,new C(this.c,t),t)},U.prototype.load=function(t){function n(){if(a["__mti_fntLst"+e]){var i,o=a["__mti_fntLst"+e](),s=[];if(o)for(var r=0;r<o.length;r++){var c=o[r].fontfamily;null!=o[r].fontStyle&&null!=o[r].fontWeight?(i=o[r].fontStyle+o[r].fontWeight,s.push(new x(c,i))):s.push(new x(c))}t(s)}else setTimeout((function(){n()}),50)}var i=this,e=i.a.projectId,o=i.a.version;if(e){var a=i.c.o;v(this.c,(i.a.api||"https://fast.fonts.net/jsapi")+"/"+e+".js"+(o?"?v="+o:""),(function(o){o?t([]):(a["__MonotypeConfiguration__"+e]=function(){return i.a},n())})).id="__MonotypeAPIScript__"+e}else t([])},V.prototype.load=function(t){var n,i,e=this.a.urls||[],o=this.a.families||[],a=this.a.testStrings||{},s=new m;for(n=0,i=e.length;n<i;n++)d(this.c,e[n],w(s));var r=[];for(n=0,i=o.length;n<i;n++)if((e=o[n].split(":"))[1])for(var c=e[1].split(","),f=0;f<c.length;f+=1)r.push(new x(e[0],c[f]));else r.push(new x(e[0]));y(s,(function(){t(r,a)}))};var J="https://fonts.googleapis.com/css";function Q(t){this.f=t,this.a=[],this.c={}}var Y={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},Z={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},tt={i:"i",italic:"i",n:"n",normal:"n"},nt=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function it(t,n){this.c=t,this.a=n}var et={Arimo:!0,Cousine:!0,Tinos:!0};function ot(t,n){this.c=t,this.a=n}function at(t,n){this.c=t,this.f=n,this.a=[]}it.prototype.load=function(t){var n=new m,i=this.c,e=new X(this.a.api,this.a.text),o=this.a.families;!function(t,n){for(var i=n.length,e=0;e<i;e++){var o=n[e].split(":");3==o.length&&t.f.push(o.pop());var a="";2==o.length&&""!=o[1]&&(a=":"),t.a.push(o.join(a))}}(e,o);var a=new Q(o);!function(t){for(var n=t.f.length,i=0;i<n;i++){var e=t.f[i].split(":"),o=e[0].replace(/\+/g," "),a=["n4"];if(2<=e.length){var s;if(s=[],r=e[1])for(var r,c=(r=r.split(",")).length,f=0;f<c;f++){var h;if((h=r[f]).match(/^[\w-]+$/))if(null==(l=nt.exec(h.toLowerCase())))h="";else{if(h=null==(h=l[2])||""==h?"n":tt[h],null==(l=l[1])||""==l)l="4";else var l=Z[l]||(isNaN(l)?"4":l.substr(0,1));h=[h,l].join("")}else h="";h&&s.push(h)}0<s.length&&(a=s),3==e.length&&(s=[],0<(e=(e=e[2])?e.split(","):s).length&&(e=Y[e[0]])&&(t.c[o]=e))}for(t.c[o]||(e=Y[o])&&(t.c[o]=e),e=0;e<a.length;e+=1)t.a.push(new x(o,a[e]))}}(a),d(i,function(t){if(0==t.a.length)throw Error("No fonts to load!");if(-1!=t.c.indexOf("kit="))return t.c;for(var n=t.a.length,i=[],e=0;e<n;e++)i.push(t.a[e].replace(/ /g,"+"));return n=t.c+"?family="+i.join("%7C"),0<t.f.length&&(n+="&subset="+t.f.join(",")),0<t.g.length&&(n+="&text="+encodeURIComponent(t.g)),n}(e),w(n)),y(n,(function(){t(a.a,a.c,et)}))},ot.prototype.load=function(t){var n=this.a.id,i=this.c.o;n?v(this.c,(this.a.api||"https://use.typekit.net")+"/"+n+".js",(function(n){if(n)t([]);else if(i.Typekit&&i.Typekit.config&&i.Typekit.config.fn){n=i.Typekit.config.fn;for(var e=[],o=0;o<n.length;o+=2)for(var a=n[o],s=n[o+1],r=0;r<s.length;r++)e.push(new x(a,s[r]));try{i.Typekit.load({events:!1,classes:!1,async:!0})}catch(t){}t(e)}}),2e3):t([])},at.prototype.load=function(t){var n=this.f.id,i=this.c.o,e=this;n?(i.__webfontfontdeckmodule__||(i.__webfontfontdeckmodule__={}),i.__webfontfontdeckmodule__[n]=function(n,i){for(var o=0,a=i.fonts.length;o<a;++o){var s=i.fonts[o];e.a.push(new x(s.name,S("font-weight:"+s.weight+";font-style:"+s.style)))}t(e.a)},v(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+function(t){return t.o.location.hostname||t.a.location.hostname}(this.c)+"/"+n+".js",(function(n){n&&t([])}))):t([])};var st=new K(window);st.a.c.custom=function(t,n){return new V(n,t)},st.a.c.fontdeck=function(t,n){return new at(n,t)},st.a.c.monotype=function(t,n){return new U(n,t)},st.a.c.typekit=function(t,n){return new ot(n,t)},st.a.c.google=function(t,n){return new it(n,t)};var rt={load:s(st.load,st)};void 0===(e=function(){return rt}.call(n,i,n,t))||(t.exports=e)}()}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[544],{456:function(t){class e extends Error{constructor(){super("Authorization required"),this.name="AuthError",this.isAuthError=!0}}t.exports=e},4799:function(t,e,i){var s=i(9568);const r=i(6934);t.exports=class extends r{constructor(t,e){super(t,e),this.provider=e.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map((t=>t.charAt(0).toUpperCase()+t.slice(1))).join(" "),this.pluginId=this.opts.pluginId,this.tokenKey=`companion-${this.pluginId}-auth-token`,this.companionKeysParams=this.opts.companionKeysParams,this.preAuthToken=null}headers(){return Promise.all([super.headers(),this.getAuthToken()]).then((t=>{let[e,i]=t;const s={};return i&&(s["uppy-auth-token"]=i),this.companionKeysParams&&(s["uppy-credentials-params"]=btoa(JSON.stringify({params:this.companionKeysParams}))),{...e,...s}}))}onReceiveResponse(t){t=super.onReceiveResponse(t);const e=this.uppy.getPlugin(this.pluginId),i=e.getPluginState().authenticated?401!==t.status:t.status<400;return e.setPluginState({authenticated:i}),t}setAuthToken(t){return this.uppy.getPlugin(this.pluginId).storage.setItem(this.tokenKey,t)}getAuthToken(){return this.uppy.getPlugin(this.pluginId).storage.getItem(this.tokenKey)}async ensurePreAuth(){if(this.companionKeysParams&&!this.preAuthToken&&(await this.fetchPreAuthToken(),!this.preAuthToken))throw new Error("Could not load authentication data required for third-party login. Please try again later.")}authUrl(t){void 0===t&&(t={});const e=new URLSearchParams(t);return this.preAuthToken&&e.set("uppyPreAuthToken",this.preAuthToken),`${this.hostname}/${this.id}/connect?${e}`}fileUrl(t){return`${this.hostname}/${this.id}/get/${t}`}async fetchPreAuthToken(){if(this.companionKeysParams)try{const t=await this.post(`${this.id}/preauth/`,{params:this.companionKeysParams});this.preAuthToken=t.token}catch(t){this.uppy.log(`[CompanionClient] unable to fetch preAuthToken ${t}`,"warning")}}list(t){return this.get(`${this.id}/list/${t||""}`)}logout(){return this.get(`${this.id}/logout`).then((t=>Promise.all([t,this.uppy.getPlugin(this.pluginId).storage.removeItem(this.tokenKey)]))).then((t=>{let[e]=t;return e}))}static initPlugin(t,e,i){if(t.type="acquirer",t.files=[],i&&(t.opts={...i,...e}),e.serverUrl||e.serverPattern)throw new Error("`serverUrl` and `serverPattern` have been renamed to `companionUrl` and `companionAllowedHosts` respectively in the 0.30.5 release. Please consult the docs (for example, https://uppy.io/docs/instagram/ for the Instagram plugin) and use the updated options.`");if(e.companionAllowedHosts){const i=e.companionAllowedHosts;if(!("string"==typeof i||Array.isArray(i)||i instanceof RegExp))throw new TypeError(`${t.id}: the option "companionAllowedHosts" must be one of string, Array, RegExp`);t.opts.companionAllowedHosts=i}else/^(?!https?:\/\/).*$/i.test(e.companionUrl)?t.opts.companionAllowedHosts=`https://${e.companionUrl.replace(/^\/\//,"")}`:t.opts.companionAllowedHosts=new URL(e.companionUrl).origin;t.storage=t.opts.storage||s}}},6934:function(t,e,i){let s;function r(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var o=0;function n(t){return"__private_"+o+++"_"+t}const a=i(2019),h=i(9518),u=i(456);async function l(t){if(401===t.status)throw new u;const e=t.json();if(t.status<200||t.status>300){let i=`Failed request with status: ${t.status}. ${t.statusText}`;try{const t=await e;i=t.message?`${i} message: ${t.message}`:i,i=t.requestId?`${i} request-Id: ${t.requestId}`:i}finally{throw new Error(i)}}return e}var c=n("companionHeaders"),p=n("getPostResponseFunc"),d=n("getUrl"),m=n("errorHandler");s=Symbol.for("uppy test: getCompanionHeaders");class f{constructor(t,e){Object.defineProperty(this,m,{value:g}),Object.defineProperty(this,d,{value:y}),Object.defineProperty(this,c,{writable:!0,value:void 0}),Object.defineProperty(this,p,{writable:!0,value:t=>e=>t?e:this.onReceiveResponse(e)}),this.uppy=t,this.opts=e,this.onReceiveResponse=this.onReceiveResponse.bind(this),this.allowedHeaders=["accept","content-type","uppy-auth-token"],this.preflightDone=!1,r(this,c)[c]=null==e?void 0:e.companionHeaders}setCompanionHeaders(t){r(this,c)[c]=t}[s](){return r(this,c)[c]}get hostname(){const{companion:t}=this.uppy.getState(),e=this.opts.companionUrl;return(t&&t[e]?t[e]:e).replace(/\/$/,"")}headers(){return Promise.resolve({...f.defaultHeaders,...r(this,c)[c]})}onReceiveResponse(t){const e=this.uppy.getState().companion||{},i=this.opts.companionUrl,{headers:s}=t;return s.has("i-am")&&s.get("i-am")!==e[i]&&this.uppy.setState({companion:{...e,[i]:s.get("i-am")}}),t}preflight(t){return this.preflightDone?Promise.resolve(this.allowedHeaders.slice()):fetch(r(this,d)[d](t),{method:"OPTIONS"}).then((t=>(t.headers.has("access-control-allow-headers")&&(this.allowedHeaders=t.headers.get("access-control-allow-headers").split(",").map((t=>t.trim().toLowerCase()))),this.preflightDone=!0,this.allowedHeaders.slice()))).catch((t=>(this.uppy.log(`[CompanionClient] unable to make preflight request ${t}`,"warning"),this.preflightDone=!0,this.allowedHeaders.slice())))}preflightAndHeaders(t){return Promise.all([this.preflight(t),this.headers()]).then((t=>{let[e,i]=t;return Object.keys(i).forEach((t=>{e.includes(t.toLowerCase())||(this.uppy.log(`[CompanionClient] excluding disallowed header ${t}`),delete i[t])})),i}))}get(t,e){return this.preflightAndHeaders(t).then((e=>a(r(this,d)[d](t),{method:"get",headers:e,credentials:this.opts.companionCookiesRule||"same-origin"}))).then(r(this,p)[p](e)).then(l).catch(r(this,m)[m]("get",t))}post(t,e,i){const s="post";return this.preflightAndHeaders(t).then((i=>a(r(this,d)[d](t),{method:s,headers:i,credentials:this.opts.companionCookiesRule||"same-origin",body:JSON.stringify(e)}))).then(r(this,p)[p](i)).then(l).catch(r(this,m)[m](s,t))}delete(t,e,i){const s="delete";return this.preflightAndHeaders(t).then((i=>a(`${this.hostname}/${t}`,{method:s,headers:i,credentials:this.opts.companionCookiesRule||"same-origin",body:e?JSON.stringify(e):null}))).then(r(this,p)[p](i)).then(l).catch(r(this,m)[m](s,t))}}function y(t){return/^(https?:|)\/\//.test(t)?t:`${this.hostname}/${t}`}function g(t,e){return i=>{var s;return null!=(s=i)&&s.isAuthError||(i=new h(`Could not ${t} ${r(this,d)[d](e)}`,{cause:i})),Promise.reject(i)}}f.VERSION="2.2.2",f.defaultHeaders={Accept:"application/json","Content-Type":"application/json","Uppy-Versions":`@uppy/companion-client=${f.VERSION}`},t.exports=f},7339:function(t,e,i){const s=i(6934);t.exports=class extends s{constructor(t,e){super(t,e),this.provider=e.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map((t=>t.charAt(0).toUpperCase()+t.slice(1))).join(" "),this.pluginId=this.opts.pluginId}fileUrl(t){return`${this.hostname}/search/${this.id}/get/${t}`}search(t,e){return this.get(`search/${this.id}/list?q=${encodeURIComponent(t)}${e?`&${e}`:""}`)}}},7727:function(t,e,i){let s,r;function o(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var n=0;function a(t){return"__private_"+n+++"_"+t}const h=i(2162);var u=a("queued"),l=a("emitter"),c=a("isOpen"),p=a("socket"),d=a("handleMessage");s=Symbol.for("uppy test: getSocket"),r=Symbol.for("uppy test: getQueued"),t.exports=class{constructor(t){Object.defineProperty(this,u,{writable:!0,value:[]}),Object.defineProperty(this,l,{writable:!0,value:h()}),Object.defineProperty(this,c,{writable:!0,value:!1}),Object.defineProperty(this,p,{writable:!0,value:void 0}),Object.defineProperty(this,d,{writable:!0,value:t=>{try{const e=JSON.parse(t.data);this.emit(e.action,e.payload)}catch(t){console.log(t)}}}),this.opts=t,t&&!1===t.autoOpen||this.open()}get isOpen(){return o(this,c)[c]}[s](){return o(this,p)[p]}[r](){return o(this,u)[u]}open(){o(this,p)[p]=new WebSocket(this.opts.target),o(this,p)[p].onopen=()=>{for(o(this,c)[c]=!0;o(this,u)[u].length>0&&o(this,c)[c];){const t=o(this,u)[u].shift();this.send(t.action,t.payload)}},o(this,p)[p].onclose=()=>{o(this,c)[c]=!1},o(this,p)[p].onmessage=o(this,d)[d]}close(){var t;null==(t=o(this,p)[p])||t.close()}send(t,e){o(this,c)[c]?o(this,p)[p].send(JSON.stringify({action:t,payload:e})):o(this,u)[u].push({action:t,payload:e})}on(t,e){o(this,l)[l].on(t,e)}emit(t,e){o(this,l)[l].emit(t,e)}once(t,e){o(this,l)[l].once(t,e)}}},7372:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=e.SearchProvider=e.RequestClient=e.Provider=void 0;const s=i(6934);e.RequestClient=s;const r=i(4799);e.Provider=r;const o=i(7339);e.SearchProvider=o;const n=i(7727);e.Socket=n},9568:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.getItem=function(t){return Promise.resolve(localStorage.getItem(t))},e.removeItem=function(t){return new Promise((e=>{localStorage.removeItem(t),e()}))},e.setItem=function(t,e){return new Promise((i=>{localStorage.setItem(t,e),i()}))}},9518:function(t,e,i){const s=i(766);class r extends Error{constructor(t,e){void 0===e&&(e={}),super(t),this.cause=e.cause,this.cause&&s(this.cause,"isNetworkError")&&(this.isNetworkError=this.cause.isNetworkError)}}t.exports=r},9295:function(t){function e(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var i=0;function s(t){return"__private_"+i+++"_"+t}var r=s("emitter"),o=s("events");t.exports=class{constructor(t){Object.defineProperty(this,r,{writable:!0,value:void 0}),Object.defineProperty(this,o,{writable:!0,value:[]}),e(this,r)[r]=t}on(t,i){return e(this,o)[o].push([t,i]),e(this,r)[r].on(t,i)}remove(){for(const[t,i]of e(this,o)[o].splice(0))e(this,r)[r].off(t,i)}}},5891:function(t){class e extends Error{constructor(t,e){void 0===e&&(e=null),super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=t,this.isNetworkError=!0,this.request=e}}t.exports=e},3672:function(t,e){function i(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}Object.defineProperty(e,"__esModule",{value:!0}),e.internalRateLimitedQueue=e.RateLimitedQueue=void 0;var s=0;function r(t){return"__private_"+s+++"_"+t}var o=r("activeRequests"),n=r("queuedHandlers"),a=r("paused"),h=r("pauseTimer"),u=r("downLimit"),l=r("upperLimit"),c=r("rateLimitingTimer"),p=r("call"),d=r("queueNext"),m=r("next"),f=r("queue"),y=r("dequeue"),g=r("resume"),v=r("increaseLimit");function w(t){i(this,o)[o]+=1;let e,s=!1;try{e=t()}catch(t){throw i(this,o)[o]-=1,t}return{abort:()=>{s||(s=!0,i(this,o)[o]-=1,e(),i(this,d)[d]())},done:()=>{s||(s=!0,i(this,o)[o]-=1,i(this,d)[d]())}}}function b(){queueMicrotask((()=>i(this,m)[m]()))}function P(){if(i(this,a)[a]||i(this,o)[o]>=this.limit)return;if(0===i(this,n)[n].length)return;const t=i(this,n)[n].shift(),e=i(this,p)[p](t.fn);t.abort=e.abort,t.done=e.done}function O(t,e){void 0===e&&(e={});const s={fn:t,priority:e.priority||0,abort:()=>{i(this,y)[y](s)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},r=i(this,n)[n].findIndex((t=>s.priority>t.priority));return-1===r?i(this,n)[n].push(s):i(this,n)[n].splice(r,0,s),s}function k(t){const e=i(this,n)[n].indexOf(t);-1!==e&&i(this,n)[n].splice(e,1)}e.RateLimitedQueue=class{constructor(t){Object.defineProperty(this,y,{value:k}),Object.defineProperty(this,f,{value:O}),Object.defineProperty(this,m,{value:P}),Object.defineProperty(this,d,{value:b}),Object.defineProperty(this,p,{value:w}),Object.defineProperty(this,o,{writable:!0,value:0}),Object.defineProperty(this,n,{writable:!0,value:[]}),Object.defineProperty(this,a,{writable:!0,value:!1}),Object.defineProperty(this,h,{writable:!0,value:void 0}),Object.defineProperty(this,u,{writable:!0,value:1}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,c,{writable:!0,value:void 0}),Object.defineProperty(this,g,{writable:!0,value:()=>this.resume()}),Object.defineProperty(this,v,{writable:!0,value:()=>{if(i(this,a)[a])i(this,c)[c]=setTimeout(i(this,v)[v],0);else{i(this,u)[u]=this.limit,this.limit=Math.ceil((i(this,l)[l]+i(this,u)[u])/2);for(let t=i(this,u)[u];t<=this.limit;t++)i(this,d)[d]();i(this,l)[l]-i(this,u)[u]>3?i(this,c)[c]=setTimeout(i(this,v)[v],2e3):i(this,u)[u]=Math.floor(i(this,u)[u]/2)}}}),this.limit="number"!=typeof t||0===t?1/0:t}run(t,e){return!i(this,a)[a]&&i(this,o)[o]<this.limit?i(this,p)[p](t):i(this,f)[f](t,e)}wrapPromiseFunction(t,e){var i=this;return function(){for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];let n;const a=new Promise(((s,o)=>{n=i.run((()=>{let e,i;try{i=Promise.resolve(t(...r))}catch(t){i=Promise.reject(t)}return i.then((t=>{e?o(e):(n.done(),s(t))}),(t=>{e?o(e):(n.done(),o(t))})),()=>{e=new Error("Cancelled")}}),e)}));return a.abort=()=>{n.abort()},a}}resume(){i(this,a)[a]=!1,clearTimeout(i(this,h)[h]);for(let t=0;t<this.limit;t++)i(this,d)[d]()}pause(t){void 0===t&&(t=null),i(this,a)[a]=!0,clearTimeout(i(this,h)[h]),null!=t&&(i(this,h)[h]=setTimeout(i(this,g)[g],t))}rateLimit(t){clearTimeout(i(this,c)[c]),this.pause(t),this.limit>1&&Number.isFinite(this.limit)&&(i(this,l)[l]=this.limit-1,this.limit=i(this,u)[u],i(this,c)[c]=setTimeout(i(this,v)[v],t))}get isPaused(){return i(this,a)[a]}};const $=Symbol("__queue");e.internalRateLimitedQueue=$},1098:function(t,e,i){const s=i(3871);t.exports=s((function(t,e,i){const{progress:s,bytesUploaded:r,bytesTotal:o}=e;s&&(t.uppy.log(`Upload progress: ${s}`),t.uppy.emit("upload-progress",i,{uploader:t,bytesUploaded:r,bytesTotal:o}))}),300,{leading:!0,trailing:!0})},2019:function(t,e,i){const s=i(5891);t.exports=function(){return fetch(...arguments).catch((t=>{throw"AbortError"===t.name?t:new s(t)}))}},5064:function(t){t.exports=function(t){const e=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/i.exec(t)[1];return`${/^http:\/\//i.test(t)?"ws":"wss"}://${e}`}},539:function(t){t.exports=function(t){return!!t&&(0!==t.readyState&&4!==t.readyState||0===t.status)}},336:function(t){t.exports=function(t){const e=[],i=[];function s(t){e.push(t)}function r(t){i.push(t)}return Promise.all(t.map((t=>t.then(s,r)))).then((()=>({successful:e,failed:i})))}}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 66.e8eaa59a.chunk.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[66],{8066: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 j(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(_([])));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 j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function _(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:j,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:_(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,j="undefined"!=typeof window&&void 0!==window.postMessage;if(!(w||T&&j))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var _="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:_);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=_)[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","chapters","chromecast","color","colors","controls","dnt","fullscreen","height","id","interactive_params","keyboard","loop","maxheight","maxwidth","muted","play_button_position","playsinline","portrait","progress_bar","quality_selector","responsive","speed","texttrack","title","transcript","transparent","url","vimeo_logo","volume","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}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[763],{7153:function(e){e.exports=function(e,t,i){return new Promise((o=>{e.toBlob(o,t,i)}))}},7284:function(e){const t={"audio/mp3":"mp3","audio/mp4":"mp4","audio/ogg":"ogg","audio/webm":"webm","image/gif":"gif","image/heic":"heic","image/heif":"heif","image/jpeg":"jpg","image/png":"png","image/svg+xml":"svg","video/mp4":"mp4","video/ogg":"ogv","video/quicktime":"mov","video/webm":"webm","video/x-matroska":"mkv","video/x-msvideo":"avi"};e.exports=function(e){return[e]=e.split(";",1),t[e]||null}},8393:function(e,t,i){var o=i(5181);e.exports=()=>(0,o.h)("svg",{"aria-hidden":"true",focusable:"false",fill:"#0097DC",width:"66",height:"55",viewBox:"0 0 66 55"},(0,o.h)("path",{d:"M57.3 8.433c4.59 0 8.1 3.51 8.1 8.1v29.7c0 4.59-3.51 8.1-8.1 8.1H8.7c-4.59 0-8.1-3.51-8.1-8.1v-29.7c0-4.59 3.51-8.1 8.1-8.1h9.45l4.59-7.02c.54-.54 1.35-1.08 2.16-1.08h16.2c.81 0 1.62.54 2.16 1.08l4.59 7.02h9.45zM33 14.64c-8.62 0-15.393 6.773-15.393 15.393 0 8.62 6.773 15.393 15.393 15.393 8.62 0 15.393-6.773 15.393-15.393 0-8.62-6.773-15.393-15.393-15.393zM33 40c-5.648 0-9.966-4.319-9.966-9.967 0-5.647 4.318-9.966 9.966-9.966s9.966 4.319 9.966 9.966C42.966 35.681 38.648 40 33 40z",fillRule:"evenodd"}))},8992:function(e,t,i){var o=i(5181);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e},s.apply(this,arguments)}const r=i(1660),n=i(5748),c=i(7520),a=i(4249),d=i(8019),h=i(1029);function u(e,t){return-1!==e.indexOf(t)}class p extends o.Component{componentDidMount(){const{onFocus:e}=this.props;e()}componentWillUnmount(){const{onStop:e}=this.props;e()}render(){const{src:e,recordedVideo:t,recording:i,modes:p,supportsRecording:l,videoSources:g,showVideoSourceDropdown:m,showRecordingLength:v,onSubmit:f,i18n:b,mirror:y,onSnapshot:w,onStartRecording:S,onStopRecording:R,onDiscardRecordedVideo:C,recordingLengthSeconds:x}=this.props,P=!!t,k=!P&&l&&(u(p,"video-only")||u(p,"audio-only")||u(p,"video-audio")),I=!P&&u(p,"picture"),M=l&&v&&!P,T=m&&g&&g.length>1,V={playsinline:!0};return t?(V.muted=!1,V.controls=!0,V.src=t,this.videoElement&&(this.videoElement.srcObject=void 0)):(V.muted=!0,V.autoplay=!0,V.srcObject=e),(0,o.h)("div",{className:"uppy uppy-Webcam-container"},(0,o.h)("div",{className:"uppy-Webcam-videoContainer"},(0,o.h)("video",s({ref:e=>this.videoElement=e,className:"uppy-Webcam-video "+(y?"uppy-Webcam-video--mirrored":"")},V))),(0,o.h)("div",{className:"uppy-Webcam-footer"},(0,o.h)("div",{className:"uppy-Webcam-videoSourceContainer"},T?a(this.props):null),(0,o.h)("div",{className:"uppy-Webcam-buttonContainer"},I&&(0,o.h)(r,{onSnapshot:w,i18n:b}),k&&(0,o.h)(n,{recording:i,onStartRecording:S,onStopRecording:R,i18n:b}),P&&(0,o.h)(d,{onSubmit:f,i18n:b}),P&&(0,o.h)(h,{onDiscard:C,i18n:b})),(0,o.h)("div",{className:"uppy-Webcam-recordingLength"},M&&(0,o.h)(c,{recordingLengthSeconds:x,i18n:b}))))}}e.exports=p},1029:function(e,t,i){var o=i(5181);e.exports=function(e){let{onDiscard:t,i18n:i}=e;return(0,o.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-Webcam-button uppy-Webcam-button--discard",type:"button",title:i("discardRecordedFile"),"aria-label":i("discardRecordedFile"),onClick:t,"data-uppy-super-focusable":!0},(0,o.h)("svg",{width:"13",height:"13",viewBox:"0 0 13 13",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",className:"uppy-c-icon"},(0,o.h)("g",{fill:"#FFF",fillRule:"evenodd"},(0,o.h)("path",{d:"M.496 11.367L11.103.76l1.414 1.414L1.911 12.781z"}),(0,o.h)("path",{d:"M11.104 12.782L.497 2.175 1.911.76l10.607 10.606z"}))))}},6119:function(e,t,i){var o=i(5181);e.exports=e=>{let{icon:t,i18n:i,hasCamera:s}=e;return(0,o.h)("div",{className:"uppy-Webcam-permissons"},(0,o.h)("div",{className:"uppy-Webcam-permissonsIcon"},t()),(0,o.h)("h1",{className:"uppy-Webcam-title"},i(s?"allowAccessTitle":"noCameraTitle")),(0,o.h)("p",null,i(s?"allowAccessDescription":"noCameraDescription")))}},5748:function(e,t,i){var o=i(5181);e.exports=function(e){let{recording:t,onStartRecording:i,onStopRecording:s,i18n:r}=e;return t?(0,o.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-Webcam-button",type:"button",title:r("stopRecording"),"aria-label":r("stopRecording"),onClick:s,"data-uppy-super-focusable":!0},(0,o.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"100",height:"100",viewBox:"0 0 100 100"},(0,o.h)("rect",{x:"15",y:"15",width:"70",height:"70"}))):(0,o.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-Webcam-button",type:"button",title:r("startRecording"),"aria-label":r("startRecording"),onClick:i,"data-uppy-super-focusable":!0},(0,o.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"100",height:"100",viewBox:"0 0 100 100"},(0,o.h)("circle",{cx:"50",cy:"50",r:"40"})))}},7520:function(e,t,i){var o=i(5181);const s=i(8975);e.exports=function(e){let{recordingLengthSeconds:t,i18n:i}=e;const r=s(t);return(0,o.h)("span",{"aria-label":i("recordingLength",{recording_length:r})},r)}},1660:function(e,t,i){var o=i(5181);const s=i(8393);e.exports=e=>{let{onSnapshot:t,i18n:i}=e;return(0,o.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-Webcam-button uppy-Webcam-button--picture",type:"button",title:i("takePicture"),"aria-label":i("takePicture"),onClick:t,"data-uppy-super-focusable":!0},s())}},8019:function(e,t,i){var o=i(5181);e.exports=function(e){let{onSubmit:t,i18n:i}=e;return(0,o.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-Webcam-button uppy-Webcam-button--submit",type:"button",title:i("submitRecordedFile"),"aria-label":i("submitRecordedFile"),onClick:t,"data-uppy-super-focusable":!0},(0,o.h)("svg",{width:"12",height:"9",viewBox:"0 0 12 9",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",className:"uppy-c-icon"},(0,o.h)("path",{fill:"#fff",fillRule:"nonzero",d:"M10.66 0L12 1.31 4.136 9 0 4.956l1.34-1.31L4.136 6.38z"})))}},4249:function(e,t,i){var o=i(5181);e.exports=e=>{let{currentDeviceId:t,videoSources:i,onChangeVideoSource:s}=e;return(0,o.h)("div",{className:"uppy-Webcam-videoSource"},(0,o.h)("select",{className:"uppy-u-reset uppy-Webcam-videoSource-select",onChange:e=>{s(e.target.value)}},i.map((e=>(0,o.h)("option",{key:e.deviceId,value:e.deviceId,selected:e.deviceId===t},e.label)))))}},8110:function(e,t,i){var o=i(5181),s=i(5377);function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e},r.apply(this,arguments)}function n(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var c=0;function a(e){return"__private_"+c+++"_"+e}const d=i(7284),h=i(9838),u=i(7153),p=i(4329),l=i(8393),g=i(8992),m=i(6119),v=i(2509);function f(e){return"."===e[0]?h[e.slice(1)]:e}function b(e){return/^video\/[^*]+$/.test(e)}function y(e){return/^image\/[^*]+$/.test(e)}var w=a("enableMirror");class S extends s.UIPlugin{constructor(e,t){super(e,t),Object.defineProperty(this,w,{writable:!0,value:void 0}),this.mediaDevices=navigator.mediaDevices,this.supportsUserMedia=!!this.mediaDevices,this.protocol=location.protocol.match(/https/i)?"https":"http",this.id=this.opts.id||"Webcam",this.type="acquirer",this.capturedMediaFile=null,this.icon=()=>(0,o.h)("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},(0,o.h)("g",{fill:"none",fillRule:"evenodd"},(0,o.h)("rect",{className:"uppy-ProviderIconBg",fill:"#03BFEF",width:"32",height:"32",rx:"16"}),(0,o.h)("path",{d:"M22 11c1.133 0 2 .867 2 2v7.333c0 1.134-.867 2-2 2H10c-1.133 0-2-.866-2-2V13c0-1.133.867-2 2-2h2.333l1.134-1.733C13.6 9.133 13.8 9 14 9h4c.2 0 .4.133.533.267L19.667 11H22zm-6 1.533a3.764 3.764 0 0 0-3.8 3.8c0 2.129 1.672 3.801 3.8 3.801s3.8-1.672 3.8-3.8c0-2.13-1.672-3.801-3.8-3.801zm0 6.261c-1.395 0-2.46-1.066-2.46-2.46 0-1.395 1.065-2.461 2.46-2.461s2.46 1.066 2.46 2.46c0 1.395-1.065 2.461-2.46 2.461z",fill:"#FFF",fillRule:"nonzero"}))),this.defaultLocale=v;const i={onBeforeSnapshot:()=>Promise.resolve(),countdown:!1,modes:["video-audio","video-only","audio-only","picture"],mirror:!0,showVideoSourceDropdown:!1,facingMode:"user",preferredImageMimeType:null,preferredVideoMimeType:null,showRecordingLength:!1};this.opts={...i,...t},this.i18nInit(),this.title=this.i18n("pluginNameCamera"),n(this,w)[w]=this.opts.mirror,this.install=this.install.bind(this),this.setPluginState=this.setPluginState.bind(this),this.render=this.render.bind(this),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.takeSnapshot=this.takeSnapshot.bind(this),this.startRecording=this.startRecording.bind(this),this.stopRecording=this.stopRecording.bind(this),this.discardRecordedVideo=this.discardRecordedVideo.bind(this),this.submit=this.submit.bind(this),this.oneTwoThreeSmile=this.oneTwoThreeSmile.bind(this),this.focus=this.focus.bind(this),this.changeVideoSource=this.changeVideoSource.bind(this),this.webcamActive=!1,this.opts.countdown&&(this.opts.onBeforeSnapshot=this.oneTwoThreeSmile),this.setPluginState({hasCamera:!1,cameraReady:!1,cameraError:null,recordingLengthSeconds:0,videoSources:[],currentDeviceId:null})}setOptions(e){super.setOptions({...e,videoConstraints:{...this.opts.videoConstraints,...null==e?void 0:e.videoConstraints}})}hasCameraCheck(){return this.mediaDevices?this.mediaDevices.enumerateDevices().then((e=>e.some((e=>"videoinput"===e.kind)))):Promise.resolve(!1)}isAudioOnly(){return 1===this.opts.modes.length&&"audio-only"===this.opts.modes[0]}getConstraints(e){void 0===e&&(e=null);const t=-1!==this.opts.modes.indexOf("video-audio")||-1!==this.opts.modes.indexOf("audio-only"),i=!this.isAudioOnly()&&(-1!==this.opts.modes.indexOf("video-audio")||-1!==this.opts.modes.indexOf("video-only")||-1!==this.opts.modes.indexOf("picture")),o={...this.opts.videoConstraints||{facingMode:this.opts.facingMode},...e?{deviceId:e,facingMode:null}:{}};return{audio:t,video:!!i&&o}}start(e){if(void 0===e&&(e=null),!this.supportsUserMedia)return Promise.reject(new Error("Webcam access not supported"));this.webcamActive=!0,this.opts.mirror&&(n(this,w)[w]=!0);const t=this.getConstraints(e&&e.deviceId?e.deviceId:null);this.hasCameraCheck().then((i=>(this.setPluginState({hasCamera:i}),this.mediaDevices.getUserMedia(t).then((t=>{this.stream=t;let i=null;const o=this.isAudioOnly()?t.getAudioTracks():t.getVideoTracks();e&&e.deviceId?o.forEach((t=>{t.getSettings().deviceId===e.deviceId&&(i=t.getSettings().deviceId)})):i=o[0].getSettings().deviceId,this.updateVideoSources(),this.setPluginState({currentDeviceId:i,cameraReady:!0})})).catch((e=>{this.setPluginState({cameraReady:!1,cameraError:e}),this.uppy.info(e.message,"error")})))))}getMediaRecorderOptions(){const e={};if(MediaRecorder.isTypeSupported){const{restrictions:t}=this.uppy.opts;let i=[];this.opts.preferredVideoMimeType?i=[this.opts.preferredVideoMimeType]:t.allowedFileTypes&&(i=t.allowedFileTypes.map(f).filter(b));const o=e=>MediaRecorder.isTypeSupported(e)&&d(e),s=i.filter(o);s.length>0&&(e.mimeType=s[0])}return e}startRecording(){this.recorder=new MediaRecorder(this.stream,this.getMediaRecorderOptions()),this.recordingChunks=[];let e=!1;this.recorder.addEventListener("dataavailable",(t=>{this.recordingChunks.push(t.data);const{restrictions:i}=this.uppy.opts;if(this.recordingChunks.length>1&&null!=i.maxFileSize&&!e){const t=this.recordingChunks.reduce(((e,t)=>e+t.size),0),o=(t-this.recordingChunks[0].size)/(this.recordingChunks.length-1)*3;t>Math.max(0,i.maxFileSize-o)&&(e=!0,this.uppy.info(this.i18n("recordingStoppedMaxSize"),"warning",4e3),this.stopRecording())}})),this.recorder.start(500),this.opts.showRecordingLength&&(this.recordingLengthTimer=setInterval((()=>{const e=this.getPluginState().recordingLengthSeconds;this.setPluginState({recordingLengthSeconds:e+1})}),1e3)),this.setPluginState({isRecording:!0})}stopRecording(){return new Promise((e=>{this.recorder.addEventListener("stop",(()=>{e()})),this.recorder.stop(),this.opts.showRecordingLength&&(clearInterval(this.recordingLengthTimer),this.setPluginState({recordingLengthSeconds:0}))})).then((()=>(this.setPluginState({isRecording:!1}),this.getVideo()))).then((e=>{try{this.capturedMediaFile=e,this.setPluginState({recordedVideo:URL.createObjectURL(e.data)}),n(this,w)[w]=!1}catch(e){e.isRestriction||this.uppy.log(e)}})).then((()=>{this.recordingChunks=null,this.recorder=null}),(e=>{throw this.recordingChunks=null,this.recorder=null,e}))}discardRecordedVideo(){this.setPluginState({recordedVideo:null}),this.opts.mirror&&(n(this,w)[w]=!0),this.capturedMediaFile=null}submit(){try{this.capturedMediaFile&&this.uppy.addFile(this.capturedMediaFile)}catch(e){e.isRestriction||this.uppy.log(e,"error")}}async stop(){if(this.stream){const e=this.stream.getAudioTracks(),t=this.stream.getVideoTracks();e.concat(t).forEach((e=>e.stop()))}this.recorder&&await new Promise((e=>{this.recorder.addEventListener("stop",e,{once:!0}),this.recorder.stop(),this.opts.showRecordingLength&&clearInterval(this.recordingLengthTimer)})),this.recordingChunks=null,this.recorder=null,this.webcamActive=!1,this.stream=null,this.setPluginState({recordedVideo:null,isRecording:!1,recordingLengthSeconds:0})}getVideoElement(){return this.el.querySelector(".uppy-Webcam-video")}oneTwoThreeSmile(){return new Promise(((e,t)=>{let i=this.opts.countdown;const o=setInterval((()=>{if(!this.webcamActive)return clearInterval(o),this.captureInProgress=!1,t(new Error("Webcam is not active"));i>0?(this.uppy.info(`${i}...`,"warning",800),i--):(clearInterval(o),this.uppy.info(this.i18n("smile"),"success",1500),setTimeout((()=>e()),1500))}),1e3)}))}takeSnapshot(){this.captureInProgress||(this.captureInProgress=!0,this.opts.onBeforeSnapshot().catch((e=>{const t="object"==typeof e?e.message:e;return this.uppy.info(t,"error",5e3),Promise.reject(new Error(`onBeforeSnapshot: ${t}`))})).then((()=>this.getImage())).then((e=>{this.captureInProgress=!1;try{this.uppy.addFile(e)}catch(e){e.isRestriction||this.uppy.log(e)}}),(e=>{throw this.captureInProgress=!1,e})))}getImage(){const e=this.getVideoElement();if(!e)return Promise.reject(new Error("No video element found, likely due to the Webcam tab being closed."));const t=e.videoWidth,i=e.videoHeight,o=document.createElement("canvas");o.width=t,o.height=i,o.getContext("2d").drawImage(e,0,0);const{restrictions:s}=this.uppy.opts;let r=[];this.opts.preferredImageMimeType?r=[this.opts.preferredImageMimeType]:s.allowedFileTypes&&(r=s.allowedFileTypes.map(f).filter(y));const n=r[0]||"image/jpeg",c=d(n)||"jpg",a=`cam-${Date.now()}.${c}`;return u(o,n).then((e=>({source:this.id,name:a,data:new Blob([e],{type:n}),type:n})))}getVideo(){const e=this.recordingChunks.find((e=>{var t;return(null==(t=e.type)?void 0:t.length)>0})).type,t=d(e);if(!t)return Promise.reject(new Error(`Could not retrieve recording: Unsupported media type "${e}"`));const i=`webcam-${Date.now()}.${t}`,o=new Blob(this.recordingChunks,{type:e}),s={source:this.id,name:i,data:new Blob([o],{type:e}),type:e};return Promise.resolve(s)}focus(){this.opts.countdown&&setTimeout((()=>{this.uppy.info(this.i18n("smile"),"success",1500)}),1e3)}changeVideoSource(e){this.stop(),this.start({deviceId:e})}updateVideoSources(){this.mediaDevices.enumerateDevices().then((e=>{this.setPluginState({videoSources:e.filter((e=>"videoinput"===e.kind))})}))}render(){this.webcamActive||this.start();const e=this.getPluginState();return e.cameraReady&&e.hasCamera?(0,o.h)(g,r({},e,{onChangeVideoSource:this.changeVideoSource,onSnapshot:this.takeSnapshot,onStartRecording:this.startRecording,onStopRecording:this.stopRecording,onDiscardRecordedVideo:this.discardRecordedVideo,onSubmit:this.submit,onFocus:this.focus,onStop:this.stop,i18n:this.i18n,modes:this.opts.modes,showRecordingLength:this.opts.showRecordingLength,showVideoSourceDropdown:this.opts.showVideoSourceDropdown,supportsRecording:p(),recording:e.isRecording,mirror:n(this,w)[w],src:this.stream})):(0,o.h)(m,{icon:l,i18n:this.i18n,hasCamera:e.hasCamera})}install(){this.setPluginState({cameraReady:!1,recordingLengthSeconds:0});const{target:e}=this.opts;e&&this.mount(e,this),this.mediaDevices&&(this.updateVideoSources(),this.mediaDevices.ondevicechange=()=>{if(this.updateVideoSources(),this.stream){let e=!0;const{videoSources:t,currentDeviceId:i}=this.getPluginState();t.forEach((t=>{i===t.deviceId&&(e=!1)})),e&&(this.stop(),this.start())}})}uninstall(){this.stop(),this.unmount()}onUnmount(){this.stop()}}S.VERSION="2.2.2",e.exports=S},8975:function(e){e.exports=function(e){return`${Math.floor(e/60)}:${String(e%60).padStart(2,0)}`}},3763:function(e,t,i){e.exports=i(8110)},2509:function(e){e.exports={strings:{pluginNameCamera:"Camera",noCameraTitle:"Camera Not Available",noCameraDescription:"In order to take pictures or record video, please connect a camera device",recordingStoppedMaxSize:"Recording stopped because the file size is about to exceed the limit",submitRecordedFile:"Submit recorded file",discardRecordedFile:"Discard recorded file",smile:"Smile!",takePicture:"Take a picture",startRecording:"Begin video recording",stopRecording:"Stop video recording",recordingLength:"Recording length %{recording_length}",allowAccessTitle:"Please allow access to your camera",allowAccessDescription:"In order to take pictures or record video with your camera, please allow camera access for this site."}}},4329:function(e){e.exports=function(){return"function"==typeof MediaRecorder&&!!MediaRecorder.prototype&&"function"==typeof MediaRecorder.prototype.start}}}]);
|