@micromag/viewer-build 0.3.461 → 0.3.463

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.
Files changed (35) hide show
  1. package/build/asset-manifest.json +23 -23
  2. package/build/index.html +1 -1
  3. package/build/static/js/{910.6bdc0d76.chunk.js → 132.70dbc667.chunk.js} +1 -1
  4. package/build/static/js/{278.7ce2d1fd.chunk.js → 136.46047610.chunk.js} +1 -1
  5. package/build/static/js/{310.232aaeef.chunk.js → 176.1814880f.chunk.js} +1 -1
  6. package/build/static/js/220.cd918c32.js +2 -0
  7. package/build/static/js/{955.2e663733.chunk.js → 308.c559389d.chunk.js} +1 -1
  8. package/build/static/js/{466.b2545363.chunk.js → 352.a97f0465.chunk.js} +1 -1
  9. package/build/static/js/{399.8df2833f.chunk.js → 361.abf7eeba.chunk.js} +1 -1
  10. package/build/static/js/384.02cf3911.chunk.js +1 -0
  11. package/build/static/js/408.4cb30b4b.chunk.js +1 -0
  12. package/build/static/js/{348.2f3ae826.chunk.js → 448.5015f630.chunk.js} +1 -1
  13. package/build/static/js/452.9a175451.chunk.js +2 -0
  14. package/build/static/js/{50.8b4607c9.chunk.js.LICENSE.txt → 452.9a175451.chunk.js.LICENSE.txt} +1 -1
  15. package/build/static/js/52.b1372f55.chunk.js +1 -0
  16. package/build/static/js/540.cde8b46e.chunk.js +1 -0
  17. package/build/static/js/{690.6d43fefc.chunk.js → 544.63e945b9.chunk.js} +1 -1
  18. package/build/static/js/{525.1f6a8715.chunk.js → 564.d96a10b9.chunk.js} +1 -1
  19. package/build/static/js/600.51a837b6.chunk.js +1 -0
  20. package/build/static/js/{645.df9a2aa9.chunk.js → 848.6e27d6eb.chunk.js} +2 -2
  21. package/build/static/js/{536.bf000a63.chunk.js → 868.be66637a.chunk.js} +1 -1
  22. package/build/static/js/main.45811d20.js +2 -0
  23. package/build/static/js/{runtime~main.569a9d1b.js → runtime~main.28553115.js} +1 -1
  24. package/package.json +6 -6
  25. package/build/static/js/127.62d3ad58.chunk.js +0 -1
  26. package/build/static/js/175.22f3c6d5.chunk.js +0 -1
  27. package/build/static/js/224.a93d4351.chunk.js +0 -1
  28. package/build/static/js/50.8b4607c9.chunk.js +0 -2
  29. package/build/static/js/610.48218718.js +0 -2
  30. package/build/static/js/838.bf67a5f2.chunk.js +0 -1
  31. package/build/static/js/969.2db36558.chunk.js +0 -1
  32. package/build/static/js/main.009f13d3.js +0 -2
  33. /package/build/static/js/{610.48218718.js.LICENSE.txt → 220.cd918c32.js.LICENSE.txt} +0 -0
  34. /package/build/static/js/{645.df9a2aa9.chunk.js.LICENSE.txt → 848.6e27d6eb.chunk.js.LICENSE.txt} +0 -0
  35. /package/build/static/js/{main.009f13d3.js.LICENSE.txt → main.45811d20.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[838],{886:function(e){class t extends Error{constructor(){super("Authorization required"),this.name="AuthError",this.isAuthError=!0}}e.exports=t},1415:function(e,t,i){var r=i(8816);const s=i(167);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}}},167: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(9286),a=i(3411),h=i(886);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},7655:function(e,t,i){const r=i(167);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}`:""}`)}}},2797: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(5450);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)}}},8729:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Socket=t.SearchProvider=t.RequestClient=t.Provider=void 0;const r=i(167);t.RequestClient=r;const s=i(1415);t.Provider=s;const n=i(7655);t.SearchProvider=n;const o=i(2797);t.Socket=o},8816: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()}))}},2146:function(e,t,i){var r=i(3847);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}))))}},3762:function(e,t,i){var r=i(3847);const s=i(2779),n=i(8027),o=i(2282),l=i(8736),a=i(4195);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}))}},7194:function(e,t,i){var r=i(3847);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},2282:function(e,t,i){var r=i(3847);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},8736:function(e,t,i){var r=i(3847);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")))}},9492:function(e,t,i){var r=i(3847);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)))}},6087:function(e,t,i){var r=i(3847);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})}}}},3274:function(e,t,i){var r=i(3847);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)))}},4195:function(e,t,i){var r=i(3847);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(2779),o=i(6087),l=i(9492),a=i(3274);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}`)}}},5657:function(e,t,i){var r=i(3847);e.exports=e=>{let{i18n:t}=e;return(0,r.h)("div",{className:"uppy-Provider-loading"},(0,r.h)("span",null,t("loading")))}},6137:function(e,t,i){var r=i(3847);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})))}},9986:function(e,t,i){const r=i(4312),s=i(2146);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}},4291:function(e,t,i){var r=i(3847);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(6137),a=i(9986),h=i(3762),c=i(5657),u=i(7194),p=i(2791);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},4312:function(e,t,i){var r=i(3847);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"))]}},8376:function(e,t,i){e.exports=i(4291)},5232:function(e,t,i){var r=i(3847);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"})))}},4817:function(e,t,i){var r=i(3847);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")))}},2771:function(e,t,i){var r=i(3847);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(4817),a=i(3762),h=i(5657),c=i(5232),u=i(7194),p=i(2791);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},8847:function(e,t,i){e.exports=i(2771)},8309:function(e,t,i){const r=i(8027);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})}}},2791:function(e,t,i){const r=i(573),s=i(4958),n=i(9246),o=i(8309);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}}}},516:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SearchProviderViews=t.ProviderViews=void 0;const r=i(8376);t.ProviderViews=r;const s=i(8847);t.SearchProviderViews=s},3411:function(e,t,i){const r=i(8410);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},5018: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},9286:function(e,t,i){const r=i(5018);e.exports=function(){return fetch(...arguments).catch((e=>{throw"AbortError"===e.name?e:new r(e)}))}},4958:function(e){e.exports=function(e){return!!e&&/^[^/]+\/(jpe?g|gif|png|svg|svg\+xml|bmp|webp|avif)$/.test(e)}},8027:function(e,t,i){const r=i(3734);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([[969],{6180:function(e){e.exports=function(e,t,i){return new Promise((o=>{e.toBlob(o,t,i)}))}},1688: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}},5441:function(e,t,i){var o=i(3847);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"}))},7689:function(e,t,i){var o=i(3847);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(9473),n=i(2153),c=i(5836),a=i(9831),d=i(5332),h=i(1981);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},1981:function(e,t,i){var o=i(3847);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"}))))}},2338:function(e,t,i){var o=i(3847);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")))}},2153:function(e,t,i){var o=i(3847);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"})))}},5836:function(e,t,i){var o=i(3847);const s=i(3834);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)}},9473:function(e,t,i){var o=i(3847);const s=i(5441);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())}},5332:function(e,t,i){var o=i(3847);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"})))}},9831:function(e,t,i){var o=i(3847);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)))))}},2497:function(e,t,i){var o=i(3847),s=i(2127);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(1688),h=i(7467),u=i(6180),p=i(1380),l=i(5441),g=i(7689),m=i(2338),v=i(9641);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},3834:function(e){e.exports=function(e){return`${Math.floor(e/60)}:${String(e%60).padStart(2,0)}`}},969:function(e,t,i){e.exports=i(2497)},9641: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."}}},1380:function(e){e.exports=function(){return"function"==typeof MediaRecorder&&!!MediaRecorder.prototype&&"function"==typeof MediaRecorder.prototype.start}}}]);