@uploadcare/file-uploader 1.25.0-alpha.0 → 1.25.0-alpha.1
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/dist/env.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/index.ssr.js +1 -1
- package/package.json +1 -1
- package/web/file-uploader.iife.min.d.ts +2 -1
- package/web/file-uploader.iife.min.js +1 -1
- package/web/file-uploader.min.d.ts +2 -1
- package/web/file-uploader.min.js +1 -1
- package/web/uc-cloud-image-editor.min.d.ts +2 -1
- package/web/uc-cloud-image-editor.min.js +1 -1
- package/web/uc-file-uploader-inline.min.d.ts +2 -1
- package/web/uc-file-uploader-inline.min.js +1 -1
- package/web/uc-file-uploader-minimal.min.d.ts +2 -1
- package/web/uc-file-uploader-minimal.min.js +1 -1
- package/web/uc-file-uploader-regular.min.d.ts +2 -1
- package/web/uc-file-uploader-regular.min.js +1 -1
- package/web/uc-img.min.js +1 -1
package/dist/env.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { PubSub } from '@symbiotejs/symbiote';
|
|
|
2
2
|
export { PubSub as Data, PubSub, UID } from '@symbiotejs/symbiote';
|
|
3
3
|
export { loadFileUploaderFrom } from './abstract/loadFileUploaderFrom.js';
|
|
4
4
|
import * as lit_html from 'lit-html';
|
|
5
|
+
import * as lit_html_directives_ref_js from 'lit-html/directives/ref.js';
|
|
5
6
|
import { nothing, LitElement, PropertyValues, TemplateResult } from 'lit';
|
|
6
7
|
import { TelemetryRequest } from '@uploadcare/quality-insights';
|
|
7
8
|
import * as _uploadcare_upload_client from '@uploadcare/upload-client';
|
|
@@ -1348,7 +1349,7 @@ declare class LitBlock extends LitBlockBase {
|
|
|
1348
1349
|
declare class Modal extends LitBlock {
|
|
1349
1350
|
static styleAttrs: string[];
|
|
1350
1351
|
private _mouseDownTarget;
|
|
1351
|
-
|
|
1352
|
+
protected dialogEl: lit_html_directives_ref_js.Ref<HTMLDialogElement>;
|
|
1352
1353
|
handleModalOpen: ModalCb;
|
|
1353
1354
|
handleModalClose: ModalCb;
|
|
1354
1355
|
handleModalCloseAll: ModalCb;
|
package/dist/index.js
CHANGED
package/dist/index.ssr.js
CHANGED
|
@@ -892,7 +892,7 @@ export const ModalEvents = {
|
|
|
892
892
|
DESTROY: "modal:destroy",
|
|
893
893
|
};
|
|
894
894
|
export const PACKAGE_NAME = `blocks`;
|
|
895
|
-
export const PACKAGE_VERSION = `1.25.0-alpha.
|
|
895
|
+
export const PACKAGE_VERSION = `1.25.0-alpha.1`;
|
|
896
896
|
export const PresenceToggle = class {
|
|
897
897
|
static elementProperties = {};
|
|
898
898
|
static styleAttrs = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PubSub } from '@symbiotejs/symbiote';
|
|
2
2
|
export { PubSub as Data, PubSub, UID } from '@symbiotejs/symbiote';
|
|
3
3
|
import * as lit_html from 'lit-html';
|
|
4
|
+
import * as lit_html_directives_ref_js from 'lit-html/directives/ref.js';
|
|
4
5
|
import { nothing, LitElement, PropertyValues, TemplateResult } from 'lit';
|
|
5
6
|
import { TelemetryRequest } from '@uploadcare/quality-insights';
|
|
6
7
|
import * as _uploadcare_upload_client from '@uploadcare/upload-client';
|
|
@@ -1359,7 +1360,7 @@ declare class LitBlock extends LitBlockBase {
|
|
|
1359
1360
|
declare class Modal extends LitBlock {
|
|
1360
1361
|
static styleAttrs: string[];
|
|
1361
1362
|
private _mouseDownTarget;
|
|
1362
|
-
|
|
1363
|
+
protected dialogEl: lit_html_directives_ref_js.Ref<HTMLDialogElement>;
|
|
1363
1364
|
handleModalOpen: ModalCb;
|
|
1364
1365
|
handleModalClose: ModalCb;
|
|
1365
1366
|
handleModalCloseAll: ModalCb;
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
*/
|
|
26
26
|
"use strict";var UC=(()=>{var Zt=Object.defineProperty;var fo=Object.getOwnPropertyDescriptor;var rl=Object.getOwnPropertyNames;var sl=Object.prototype.hasOwnProperty;var n=(s,i)=>Zt(s,"name",{value:i,configurable:!0});var ol=(s,i)=>{for(var e in i)Zt(s,e,{get:i[e],enumerable:!0})},nl=(s,i,e,t)=>{if(i&&typeof i=="object"||typeof i=="function")for(let r of rl(i))!sl.call(s,r)&&r!==e&&Zt(s,r,{get:()=>i[r],enumerable:!(t=fo(i,r))||t.enumerable});return s};var al=s=>nl(Zt({},"__esModule",{value:!0}),s),h=(s,i,e,t)=>{for(var r=t>1?void 0:t?fo(i,e):i,o=s.length-1,a;o>=0;o--)(a=s[o])&&(r=(t?a(i,e,r):a(r))||r);return t&&r&&Zt(i,e,r),r};var xu={};ol(xu,{ActivityBlock:()=>_,ActivityHeader:()=>mr,Block:()=>T,BtnUi:()=>_e,CameraSource:()=>V,CloudImageEditor:()=>Qr,CloudImageEditorActivity:()=>xi,CloudImageEditorBlock:()=>N,Config:()=>Ai,Copyright:()=>$r,CropFrame:()=>vi,Data:()=>D,DropArea:()=>we,EditorAspectRatioButtonControl:()=>yi,EditorCropButtonControl:()=>bi,EditorFilterControl:()=>Ge,EditorFreeformButtonControl:()=>Or,EditorImageCropper:()=>Ci,EditorImageFader:()=>Mr,EditorOperationControl:()=>Ti,EditorScroller:()=>Rr,EditorSlider:()=>wi,EditorToolbar:()=>de,ExternalSource:()=>me,ExternalUploadSource:()=>xe,FileItem:()=>Fr,FileUploaderInline:()=>Mi,FileUploaderMinimal:()=>at,FileUploaderRegular:()=>Ri,FormInput:()=>Nr,Icon:()=>Kt,Img:()=>Kr,LineLoaderUi:()=>Ei,Modal:()=>Gr,ModalEvents:()=>j,PACKAGE_NAME:()=>je,PACKAGE_VERSION:()=>Ke,PresenceToggle:()=>zt,ProgressBar:()=>qt,ProgressBarCommon:()=>Wt,PubSub:()=>D,Select:()=>Et,SimpleBtn:()=>Xt,SliderUi:()=>Le,SolutionBlock:()=>Pe,SourceBtn:()=>xt,SourceList:()=>ki,Spinner:()=>qr,StartFrom:()=>Wr,Thumb:()=>St,UID:()=>ve,UploadCtxProvider:()=>Zr,UploadList:()=>Se,UploadSource:()=>z,UploaderBlock:()=>P,UrlSource:()=>Oi,defineComponents:()=>Li,defineLocale:()=>is,loadFileUploaderFrom:()=>yo,toKebabCase:()=>Ht});var Y={BIND_ATTR:"bind",ATTR_BIND_PX:"@",SHARED_CTX_PX:"*",PARENT_CTX_PX:"^",NAMED_CTX_SPLTR:"/",COMPUTED_PX:"+",CSS_DATA_PX:"--",CTX_NAME_ATTR:"ctx",CTX_OWNER_ATTR:"ctx-owner",CSS_CTX_PROP:"--ctx",EL_REF_ATTR:"ref",AUTO_TAG_PX:"sym",LIST_ATTR:"itemize",LIST_ITEM_TAG_ATTR:"item-tag",SET_LATER_KEY:"__toSetLater__",USE_TPL_ATTR:"use-template",DEFAULT_SLOT_KEY:"__default__",TEXT_NODE_SKIP_ATTR:"skip-text-nodes",TEXT_NODE_OPEN_TOKEN:"{{",TEXT_NODE_CLOSE_TOKEN:"}}"};function ll(s){let i=n(e=>{for(let t in e)e[t]?.constructor===Object&&(e[t]=i(e[t]));return{...e}},"clone");return i(s)}n(ll,"cloneObj");var D=class s{static{n(this,"PubSub")}#i;#r;#e;constructor(i){i.constructor===Object?this.store=ll(i):(this.#e=!0,this.store=i),this.callbackMap=Object.create(null)}static#t(i,e){console.warn(`Symbiote PubSub: cannot ${i}. Prop name: `+e)}read(i){if(!this.#e&&!this.store.hasOwnProperty(i))return s.#t("read",i),null;if(typeof i=="string"&&i.startsWith(Y.COMPUTED_PX)){let e=this.store[i];if(e?.constructor!==Function){s.#t("compute",i);return}this.__computedMap||(this.__computedMap={});let t=e();return Object.keys(this.__computedMap).includes(i)||(this.__computedMap[i]=t,this.notify(i)),t}else return this.store[i]}has(i){return this.#e?this.store[i]!==void 0:this.store.hasOwnProperty(i)}add(i,e,t=!1){!t&&Object.keys(this.store).includes(i)||(this.store[i]=e,this.notify(i))}pub(i,e){if(!this.#e&&!this.store.hasOwnProperty(i)){s.#t("publish",i);return}if(i?.startsWith(Y.COMPUTED_PX)&&e.constructor!==Function){s.#t("publish computed",i);return}!(this.store[i]===null||e===null)&&typeof this.store[i]!=typeof e&&console.warn(`Symbiote PubSub: type warning for "${i}" [${typeof this.store[i]} -> ${typeof e}]`),this.store[i]=e,this.notify(i)}get proxy(){if(!this.#r){let i=Object.create(null);this.#r=new Proxy(i,{set:n((e,t,r)=>(this.pub(t,r),!0),"set"),get:n((e,t)=>{this.read(t)},"get")})}return this.#r}multiPub(i){for(let e in i)this.pub(e,i[e])}static#s(i,e){this.globalStore.forEach(t=>{t.__computedMap&&Object.keys(t.__computedMap).forEach(r=>{if(t===i&&e===r)return;let o=`__${r}_timeout`;t[o]&&window.clearTimeout(t[o]),t[o]=window.setTimeout(()=>{let a=t.read(r);a!==t.__computedMap[r]&&(t.__computedMap[r]=a,t.notify(r))})})})}notify(i){let e=i?.startsWith(Y.COMPUTED_PX);if(this.callbackMap[i]){let t=this.read(i);this.callbackMap[i].forEach(r=>{r(t)}),e&&(this.__computedMap[i]=t)}!e&&s.#s(this,i)}sub(i,e,t=!0){return!this.#e&&!this.store.hasOwnProperty(i)?(s.#t("subscribe",i),null):(this.callbackMap[i]||(this.callbackMap[i]=new Set),this.callbackMap[i].add(e),t&&e(this.read(i)),{remove:n(()=>{this.callbackMap[i].delete(e),this.callbackMap[i].size||delete this.callbackMap[i]},"remove"),callback:e})}set uid(i){!this.#i&&(this.#i=i)}get uid(){return this.#i}static registerCtx(i,e=Symbol()){let t=s.globalStore.get(e);return t?console.warn('PubSub: context UID "'+e+'" is already in use'):(t=new s(i),t.uid=e,s.globalStore.set(e,t)),t}static deleteCtx(i){s.globalStore.delete(i)}static getCtx(i,e=!0){return s.globalStore.get(i)||(e&&console.warn('PubSub: wrong context UID - "'+i+'"'),null)}};D.globalStore=new Map;var go="1234567890QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm",cl=go.length-1,ve=class{static{n(this,"UID")}static generate(i="XXXXXXXXX-XXX"){let e="";for(let t=0;t<i.length;t++)e+=i[t]==="-"?i[t]:go.charAt(Math.random()*cl);return e}};var Qu=[Y.LIST_ATTR,Y.LIST_ITEM_TAG_ATTR,Y.EL_REF_ATTR,Y.USE_TPL_ATTR,Y.CTX_NAME_ATTR,Y.CTX_OWNER_ATTR];function Te(s,...i){let e="",t=new CSSStyleSheet;return s.forEach((r,o)=>{e+=r+i[o]}),Te.processors.forEach(r=>{e=r(e)}),Te.clearProcessors(),t.replaceSync(e),t}n(Te,"css");Te.processors=[];Te.clearProcessors=function(){Te.processors=[]};Te.useProcessor=function(...s){return Te.processors=[...Te.processors,...s],Te};function Qt(s,i){for(let e in i)e.includes("-")?s.style.setProperty(e,i[e]):s.style[e]=i[e]}n(Qt,"applyStyles");var pl=["UploaderBlock","ActivityBlock","Block","SolutionBlock"];function Li(s){for(let i in s){if(pl.includes(i))continue;let e=[...i].reduce((t,r)=>(r.toUpperCase()===r&&(r=`-${r.toLowerCase()}`),t+=r,t),"");e.startsWith("-")&&(e=e.replace("-","")),e.startsWith("uc-")||(e=`uc-${e}`),s[i].reg&&s[i].reg(e)}}n(Li,"defineComponents");var es="UC";function yo(s,i=!1){return new Promise((e,t)=>{if(typeof document!="object"){e(null);return}if(typeof window=="object"&&window[es]){e(window[es]);return}let r=document.createElement("script");r.async=!0,r.src=s,r.onerror=()=>{t()},r.onload=()=>{let o=window[es];i&&Li(o),e(o)},document.head.appendChild(r)})}n(yo,"loadFileUploaderFrom");var Yt={"locale-id":"en","social-source-lang":"en","upload-file":"Upload file","upload-files":"Upload files","choose-file":"Choose file","choose-files":"Choose files","drop-files-here":"Drop files here","select-file-source":"Select file source",selected:"Selected",upload:"Upload","add-more":"Add more",cancel:"Cancel","start-from-cancel":"Cancel",clear:"Clear","camera-shot":"Shot","upload-url":"Import","upload-url-placeholder":"Paste link here","edit-image":"Edit image","edit-detail":"Details",back:"Back",done:"Done",ok:"Ok","remove-from-list":"Remove",no:"No",yes:"Yes","confirm-your-action":"Confirm your action","are-you-sure":"Are you sure?","selected-count":"{{count}} of {{total}} selected","select-all":"Select all","deselect-all":"Deselect all","upload-error":"Upload error","validation-error":"Validation error","no-files":"No files selected",browse:"Browse","not-uploaded-yet":"Not uploaded yet...",file__one:"file",file__other:"files",error__one:"error",error__other:"errors","header-uploading":"Uploading {{count}} {{plural:file(count)}}","header-failed":"{{count}} {{plural:error(count)}}","header-succeed":"{{count}} {{plural:file(count)}} uploaded","header-total":"{{count}} {{plural:file(count)}} selected","src-type-local":"From device","src-type-from-url":"From link","src-type-camera":"Camera","src-type-mobile-video-camera":"Video","src-type-mobile-photo-camera":"Photo","src-type-draw":"Draw","src-type-facebook":"Facebook","src-type-dropbox":"Dropbox","src-type-gdrive":"Google Drive","src-type-ngdrive":"Google Drive","src-type-gphotos":"Google Photos","src-type-flickr":"Flickr","src-type-vk":"VK","src-type-evernote":"Evernote","src-type-box":"Box","src-type-onedrive":"OneDrive","src-type-huddle":"Huddle","src-type-other":"Other","caption-from-url":"Import from link","caption-camera":"Camera","caption-draw":"Draw","caption-edit-file":"Edit file","file-no-name":"No name...","toggle-fullscreen":"Toggle fullscreen","toggle-guides":"Toggle guides",rotate:"Rotate","flip-vertical":"Flip vertical","flip-horizontal":"Flip horizontal",apply:"Apply",brightness:"Brightness",contrast:"Contrast",saturation:"Saturation",exposure:"Exposure",gamma:"Gamma",vibrance:"Vibrance",warmth:"Warmth",enhance:"Enhance",original:"Original",resize:"Resize image",crop:"Crop","select-color":"Select color",text:"Text",draw:"Draw","cancel-edit":"Cancel edit","tab-view":"Preview","tab-details":"Details","file-name":"Name","file-size":"Size","cdn-url":"CDN URL","file-size-unknown":"Unknown","camera-permissions-denied":"Camera access denied","camera-permissions-prompt":"Please allow access to the camera","camera-permissions-request":"Request access","files-count-limit-error-title":"Files count limit overflow","files-count-limit-error-too-few":"You\u2019ve chosen {{total}} {{plural:file(total)}}. At least {{min}} {{plural:file(min)}} required.","files-count-limit-error-too-many":"You\u2019ve chosen too many files. {{max}} {{plural:file(max)}} is maximum.","files-max-size-limit-error":"File is too big. Max file size is {{maxFileSize}}.","has-validation-errors":"File validation error occurred. Please, check your files before upload.","images-only-accepted":"Only image files are accepted.","file-type-not-allowed":"Uploading of these file types is not allowed.","some-files-were-not-uploaded":"Some files were not uploaded.","file-item-edit-button":"Edit","file-item-remove-button":"Remove","a11y-editor-tab-filters":"Filters","a11y-editor-tab-tuning":"Tuning","a11y-editor-tab-crop":"Crop","a11y-activity-header-button-close":"Close",flip:"Flip",mirror:"Mirror","a11y-cloud-editor-apply-filter":"Apply {{name}} filter","a11y-cloud-editor-apply-crop":"Apply {{name}} operation","a11y-cloud-editor-apply-tuning":"Apply {{name}} tuning","a11y-cloud-editor-apply-aspect-ratio":"Apply operation {{name}} {{value}}",finished:"Finished",failed:"Failed",uploading:"Uploading",idle:"Idle","a11y-file-item-status":"File {{fileName}} in status {{status}}","waiting-for":"Waiting for {{source}}","queued-uploading":"Queued for upload","queued-validation":"Queued for validation",validation:"Validating","crop-to-shape":"Crop to {{value}}",custom:"Freeform","freeform-crop":"Freeform crop"};var Pi=new Map,ts=new Map,bo=n((s,i)=>{Pi.has(s)&&console.log(`Locale ${s} is already defined. Overwriting...`),Pi.set(s,{...Yt,...i})},"defineLocaleSync"),hl=n((s,i)=>{ts.set(s,i)},"defineLocaleAsync"),is=n((s,i)=>{typeof i=="function"?hl(s,i):bo(s,i)},"defineLocale"),_o=n(async s=>{if(!Pi.has(s)){if(!ts.has(s))throw new Error(`Locale ${s} is not defined`);let e=await ts.get(s)();bo(s,e)}return Pi.get(s)},"resolveLocaleDefinition");is("en",Yt);var j=Object.freeze({ADD:"modal:add",DELETE:"modal:delete",OPEN:"modal:open",CLOSE:"modal:close",CLOSE_ALL:"modal:closeAll",DESTROY:"modal:destroy"}),$i=class{constructor(i){this._modals=new Map;this._activeModals=new Set;this._subscribers=new Map;this._block=i}static{n(this,"ModalManager")}_debugPrint(...i){this._block.debugPrint("[modal-manager]",...i)}registerModal(i,e){this._modals.set(i,e),this._notify(j.ADD,{id:i,modal:e})}deleteModal(i){if(!this._modals.has(i))return!1;let e=this._modals.get(i);return this._modals.delete(i),this._activeModals.delete(i),this._notify(j.DELETE,{id:i,modal:e}),!0}open(i){if(!this._modals.has(i))return this._debugPrint(`Modal with ID "${i}" not found`),!1;let e=this._modals.get(i);return this._activeModals.add(i),this._notify(j.OPEN,{modal:e,id:i}),!0}close(i){if(!this._modals.has(i)||!this._activeModals.has(i))return this._debugPrint(`Modal with ID "${i}" not found or not active`),!1;let e=this._modals.get(i);return this._activeModals.delete(i),this._notify(j.CLOSE,{id:i,modal:e}),!0}toggle(i){return this._modals.has(i)?this._activeModals.has(i)?this.close(i):this.open(i):(this._debugPrint(`Modal with ID "${i}" not found`),!1)}get hasActiveModals(){return this._activeModals.size>0}back(){if(this._activeModals.size===0)return this._debugPrint("No active modals to go back from"),!1;let i=Array.from(this._activeModals).pop();return i?this.close(i):!1}closeAll(){let i=this._activeModals.size;return this._activeModals.clear(),this._notify(j.CLOSE_ALL,{}),i}subscribe(i,e){return this._subscribers.has(i)||this._subscribers.set(i,new Set),this._subscribers.get(i)?.add(e),()=>this.unsubscribe(i,e)}unsubscribe(i,e){this._subscribers.has(i)&&this._subscribers.get(i)?.delete(e)}_notify(i,e){if(this._subscribers.has(i))for(let t of this._subscribers.get(i)??new Set)try{t(e)}catch(r){this._block.telemetryManager.sendEventError(r,"modal subscriber"),this._debugPrint("Error in modal subscriber:",r)}}destroy(){this.closeAll(),this._modals.clear(),this._subscribers.clear(),this._notify(j.DESTROY,{})}};function wo(s){return Object.prototype.toString.call(s)==="[object Object]"}n(wo,"isObject");var ml=/\W|_/g;function fl(s){return s.split(ml).map((i,e)=>i.charAt(0)[e>0?"toUpperCase":"toLowerCase"]()+i.slice(1)).join("")}n(fl,"camelizeString");function Co(s,{ignoreKeys:i}={ignoreKeys:[]}){return Array.isArray(s)?s.map(e=>Ve(e,{ignoreKeys:i})):s}n(Co,"camelizeArrayItems");function Ve(s,{ignoreKeys:i}={ignoreKeys:[]}){if(Array.isArray(s))return Co(s,{ignoreKeys:i});if(!wo(s))return s;let e={};for(let t of Object.keys(s)){let r=s[t];if(i.includes(t)){e[t]=r;continue}wo(r)?r=Ve(r,{ignoreKeys:i}):Array.isArray(r)&&(r=Co(r,{ignoreKeys:i})),e[fl(t)]=r}return e}n(Ve,"camelizeKeys");var gl=n(s=>new Promise(i=>setTimeout(i,s)),"delay");function cs({libraryName:s,libraryVersion:i,userAgent:e,publicKey:t="",integration:r=""}){let o="JavaScript";if(typeof e=="string")return e;if(typeof e=="function")return e({publicKey:t,libraryName:s,libraryVersion:i,languageName:o,integration:r});let a=[s,i,t].filter(Boolean).join("/"),l=[o,r].filter(Boolean).join("; ");return`${a} (${l})`}n(cs,"getUserAgent$1");var vl={factor:2,time:100};function yl(s,i=vl){let e=0;function t(r){let o=Math.round(i.time*i.factor**e);return r({attempt:e,retry:n(l=>gl(l??o).then(()=>(e+=1,t(r))),"retry")})}return n(t,"runAttempt"),t(s)}n(yl,"retrier");var ct=class extends Error{static{n(this,"UploadcareError")}},At=class s extends ct{static{n(this,"NetworkError")}originalProgressEvent;constructor(i){super(),this.name="NetworkError",this.message="Network error",Object.setPrototypeOf(this,s.prototype),this.originalProgressEvent=i}},Ui=n((s,i)=>{s&&(s.aborted?Promise.resolve().then(i):s.addEventListener("abort",()=>i(),{once:!0}))},"onCancel"),qe=class s extends ct{static{n(this,"CancelError")}isCancel=!0;constructor(i="Request canceled"){super(i),this.name="CancelError",Object.setPrototypeOf(this,s.prototype)}},bl=500,Eo=n(({check:s,interval:i=bl,timeout:e,signal:t})=>new Promise((r,o)=>{let a,l;Ui(t,()=>{a&&clearTimeout(a),o(new qe("Poll cancelled"))}),e&&(l=setTimeout(()=>{a&&clearTimeout(a),o(new qe("Timed out"))},e));let c=n(()=>{try{Promise.resolve(s(t)).then(d=>{d?(l&&clearTimeout(l),r(d)):a=setTimeout(c,i)}).catch(d=>{l&&clearTimeout(l),o(d)})}catch(d){l&&clearTimeout(l),o(d)}},"tick");a=setTimeout(c,0)}),"poll"),R={baseCDN:"https://ucarecdn.com",baseURL:"https://upload.uploadcare.com",maxContentLength:50*1024*1024,retryThrottledRequestMaxTimes:1,retryNetworkErrorMaxTimes:3,multipartMinFileSize:25*1024*1024,multipartChunkSize:5*1024*1024,multipartMinLastPartSize:1024*1024,maxConcurrentRequests:4,pollingTimeoutMilliseconds:1e4,pusherKey:"79ae88bd931ea68464d9"},Di="application/octet-stream",xo="original",Xe=n(({method:s,url:i,data:e,headers:t={},signal:r,onProgress:o})=>new Promise((a,l)=>{let c=new XMLHttpRequest,d=s?.toUpperCase()||"GET",p=!1;c.open(d,i,!0),t&&Object.entries(t).forEach(u=>{let[m,f]=u;typeof f<"u"&&!Array.isArray(f)&&c.setRequestHeader(m,f)}),c.responseType="text",Ui(r,()=>{p=!0,c.abort(),l(new qe)}),c.onload=()=>{if(c.status!=200)l(new Error(`Error ${c.status}: ${c.statusText}`));else{let u={method:d,url:i,data:e,headers:t||void 0,signal:r,onProgress:o},m=c.getAllResponseHeaders().trim().split(/[\r\n]+/),f={};m.forEach(function(C){let E=C.split(": "),x=E.shift(),M=E.join(": ");x&&typeof x<"u"&&(f[x]=M)});let g=c.response,w=c.status;a({request:u,data:g,headers:f,status:w})}},c.onerror=u=>{p||l(new At(u))},o&&typeof o=="function"&&(c.upload.onprogress=u=>{u.lengthComputable?o({isComputable:!0,value:u.loaded/u.total}):o({isComputable:!1})}),e?c.send(e):c.send()}),"request");function _l(s,...i){return s}n(_l,"identity");var wl=n(({name:s})=>s?[s]:[],"getFileOptions"),Cl=_l,Tl=n(()=>new FormData,"getFormData"),So=n(s=>!1,"isBuffer"),Vi=n(s=>typeof Blob<"u"&&s instanceof Blob,"isBlob"),Fi=n(s=>typeof File<"u"&&s instanceof File,"isFile"),Ni=n(s=>!!s&&typeof s=="object"&&!Array.isArray(s)&&"uri"in s&&typeof s.uri=="string","isReactNativeAsset"),It=n(s=>Vi(s)||Fi(s)||So()||Ni(s),"isFileData"),El=n(s=>typeof s=="string"||typeof s=="number"||typeof s>"u","isSimpleValue"),xl=n(s=>!!s&&typeof s=="object"&&!Array.isArray(s),"isObjectValue"),Sl=n(s=>!!s&&typeof s=="object"&&"data"in s&&It(s.data),"isFileValue");function Ao(s,i,e){if(Array.isArray(e))for(let t of e)Ao(s,`${i}[]`,t);else if(Sl(e)){let{name:t,contentType:r}=e,o=Cl(e.data,t,r??Di),a=wl({name:t,contentType:r});s.push([i,o,...a])}else if(xl(e))for(let[t,r]of Object.entries(e))typeof r<"u"&&s.push([`${i}[${t}]`,String(r)]);else El(e)&&e&&s.push([i,e.toString()])}n(Ao,"collectParams");function Al(s){let i=[];for(let[e,t]of Object.entries(s))Ao(i,e,t);return i}n(Al,"getFormDataParams");function Bi(s){let i=Tl(),e=Al(s);for(let t of e){let[r,o,...a]=t;i.append(r,o,...a)}return i}n(Bi,"buildFormData");var ee=class s extends ct{static{n(this,"UploadError")}code;request;response;headers;constructor(i,e,t,r,o){super(),this.name="UploadError",this.message=i,this.code=e,this.request=t,this.response=r,this.headers=o,Object.setPrototypeOf(this,s.prototype)}},Il=n(s=>{let i=new URLSearchParams;for(let[e,t]of Object.entries(s))t&&typeof t=="object"&&!Array.isArray(t)?Object.entries(t).filter(r=>r[1]??!1).forEach(r=>i.set(`${e}[${r[0]}]`,String(r[1]))):Array.isArray(t)?t.forEach(r=>{i.append(`${e}[]`,r)}):typeof t=="string"&&t?i.set(e,t):typeof t=="number"&&i.set(e,t.toString());return i.toString()},"buildSearchParams"),Ue=n((s,i,e)=>{let t=new URL(s);return t.pathname=(t.pathname+i).replace("//","/"),e&&(t.search=Il(e)),t.toString()},"getUrl"),kl="6.18.2",Ol="UploadcareUploadClient",Ml=kl;function dt(s){return cs({libraryName:Ol,libraryVersion:Ml,...s})}n(dt,"getUserAgent");var Rl="RequestThrottledError",To=15e3,Ll=1e3;function Pl(s){let{headers:i}=s||{};if(!i||typeof i["retry-after"]!="string")return To;let e=parseInt(i["retry-after"],10);return Number.isFinite(e)?e*1e3:To}n(Pl,"getTimeoutFromThrottledRequest");function Ze(s,i){let{retryThrottledRequestMaxTimes:e,retryNetworkErrorMaxTimes:t}=i;return yl(({attempt:r,retry:o})=>s().catch(a=>{if("response"in a&&a?.code===Rl&&r<e)return o(Pl(a));if(a instanceof At&&r<t)return o((r+1)*Ll);throw a}))}n(Ze,"retryIfFailed");var Io=n(s=>{let i="";return(Vi(s)||Fi(s)||Ni(s))&&(i=s.type),i||Di},"getContentType"),ko=n(s=>{let i="";return Fi(s)&&s.name?i=s.name:Vi(s)||So()?i="":Ni(s)&&s.name&&(i=s.name),i||xo},"getFileName");function ds(s){return typeof s>"u"||s==="auto"?"auto":s?"1":"0"}n(ds,"getStoreValue");function $l(s,{publicKey:i,fileName:e,contentType:t,baseURL:r=R.baseURL,secureSignature:o,secureExpire:a,store:l,signal:c,onProgress:d,source:p="local",integration:u,userAgent:m,retryThrottledRequestMaxTimes:f=R.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:g=R.retryNetworkErrorMaxTimes,metadata:w}){return Ze(()=>Xe({method:"POST",url:Ue(r,"/base/",{jsonerrors:1}),headers:{"X-UC-User-Agent":dt({publicKey:i,integration:u,userAgent:m})},data:Bi({file:{data:s,name:e||ko(s),contentType:t||Io(s)},UPLOADCARE_PUB_KEY:i,UPLOADCARE_STORE:ds(l),signature:o,expire:a,source:p,metadata:w}),signal:c,onProgress:d}).then(({data:C,headers:E,request:x})=>{let M=Ve(JSON.parse(C));if("error"in M)throw new ee(M.error.content,M.error.errorCode,x,M,E);return M}),{retryNetworkErrorMaxTimes:g,retryThrottledRequestMaxTimes:f})}n($l,"base");var os;(function(s){s.Token="token",s.FileInfo="file_info"})(os||(os={}));function Ul(s,{publicKey:i,baseURL:e=R.baseURL,store:t,fileName:r,checkForUrlDuplicates:o,saveUrlForRecurrentUploads:a,secureSignature:l,secureExpire:c,source:d="url",signal:p,integration:u,userAgent:m,retryThrottledRequestMaxTimes:f=R.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:g=R.retryNetworkErrorMaxTimes,metadata:w}){return Ze(()=>Xe({method:"POST",headers:{"X-UC-User-Agent":dt({publicKey:i,integration:u,userAgent:m})},url:Ue(e,"/from_url/",{jsonerrors:1,pub_key:i,source_url:s,store:ds(t),filename:r,check_URL_duplicates:o?1:void 0,save_URL_duplicates:a?1:void 0,signature:l,expire:c,source:d,metadata:w}),signal:p}).then(({data:C,headers:E,request:x})=>{let M=Ve(JSON.parse(C));if("error"in M)throw new ee(M.error.content,M.error.errorCode,x,M,E);return M}),{retryNetworkErrorMaxTimes:g,retryThrottledRequestMaxTimes:f})}n(Ul,"fromUrl");var ae;(function(s){s.Unknown="unknown",s.Waiting="waiting",s.Progress="progress",s.Error="error",s.Success="success"})(ae||(ae={}));var Dl=n(s=>"status"in s&&s.status===ae.Error,"isErrorResponse");function Vl(s,{publicKey:i,baseURL:e=R.baseURL,signal:t,integration:r,userAgent:o,retryThrottledRequestMaxTimes:a=R.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:l=R.retryNetworkErrorMaxTimes}={}){return Ze(()=>Xe({method:"GET",headers:i?{"X-UC-User-Agent":dt({publicKey:i,integration:r,userAgent:o})}:void 0,url:Ue(e,"/from_url/status/",{jsonerrors:1,token:s}),signal:t}).then(({data:c,headers:d,request:p})=>{let u=Ve(JSON.parse(c));if("error"in u&&!Dl(u))throw new ee(u.error.content,u.error.errorCode,p,u,d);return u}),{retryNetworkErrorMaxTimes:l,retryThrottledRequestMaxTimes:a})}n(Vl,"fromUrlStatus");function Fl(s,{publicKey:i,baseURL:e=R.baseURL,jsonpCallback:t,secureSignature:r,secureExpire:o,signal:a,source:l,integration:c,userAgent:d,retryThrottledRequestMaxTimes:p=R.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:u=R.retryNetworkErrorMaxTimes}){return Ze(()=>Xe({method:"POST",headers:{"X-UC-User-Agent":dt({publicKey:i,integration:c,userAgent:d})},url:Ue(e,"/group/",{jsonerrors:1}),data:Bi({files:s,callback:t,pub_key:i,signature:r,expire:o,source:l}),signal:a}).then(({data:m,headers:f,request:g})=>{let w=Ve(JSON.parse(m));if("error"in w)throw new ee(w.error.content,w.error.errorCode,g,w,f);return w}),{retryNetworkErrorMaxTimes:u,retryThrottledRequestMaxTimes:p})}n(Fl,"group");function Oo(s,{publicKey:i,baseURL:e=R.baseURL,signal:t,source:r,integration:o,userAgent:a,retryThrottledRequestMaxTimes:l=R.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:c=R.retryNetworkErrorMaxTimes}){return Ze(()=>Xe({method:"GET",headers:{"X-UC-User-Agent":dt({publicKey:i,integration:o,userAgent:a})},url:Ue(e,"/info/",{jsonerrors:1,pub_key:i,file_id:s,source:r}),signal:t}).then(({data:d,headers:p,request:u})=>{let m=Ve(JSON.parse(d));if("error"in m)throw new ee(m.error.content,m.error.errorCode,u,m,p);return m}),{retryThrottledRequestMaxTimes:l,retryNetworkErrorMaxTimes:c})}n(Oo,"info");function Nl(s,{publicKey:i,contentType:e,fileName:t,multipartChunkSize:r=R.multipartChunkSize,baseURL:o="",secureSignature:a,secureExpire:l,store:c,signal:d,source:p="local",integration:u,userAgent:m,retryThrottledRequestMaxTimes:f=R.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:g=R.retryNetworkErrorMaxTimes,metadata:w}){return Ze(()=>Xe({method:"POST",url:Ue(o,"/multipart/start/",{jsonerrors:1}),headers:{"X-UC-User-Agent":dt({publicKey:i,integration:u,userAgent:m})},data:Bi({filename:t||xo,size:s,content_type:e||Di,part_size:r,UPLOADCARE_STORE:ds(c),UPLOADCARE_PUB_KEY:i,signature:a,expire:l,source:p,metadata:w}),signal:d}).then(({data:C,headers:E,request:x})=>{let M=Ve(JSON.parse(C));if("error"in M)throw new ee(M.error.content,M.error.errorCode,x,M,E);return M.parts=Object.keys(M.parts).map(fe=>M.parts[Number(fe)]),M}),{retryThrottledRequestMaxTimes:f,retryNetworkErrorMaxTimes:g})}n(Nl,"multipartStart");function Bl(s,i,{contentType:e,signal:t,onProgress:r,retryThrottledRequestMaxTimes:o=R.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:a=R.retryNetworkErrorMaxTimes}){return Ze(()=>Xe({method:"PUT",url:i,data:s,onProgress:r,signal:t,headers:{"Content-Type":e||Di}}).then(l=>(r&&r({isComputable:!0,value:1}),l)).then(({status:l})=>({code:l})),{retryThrottledRequestMaxTimes:o,retryNetworkErrorMaxTimes:a})}n(Bl,"multipartUpload");function zl(s,{publicKey:i,baseURL:e=R.baseURL,source:t="local",signal:r,integration:o,userAgent:a,retryThrottledRequestMaxTimes:l=R.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:c=R.retryNetworkErrorMaxTimes}){return Ze(()=>Xe({method:"POST",url:Ue(e,"/multipart/complete/",{jsonerrors:1}),headers:{"X-UC-User-Agent":dt({publicKey:i,integration:o,userAgent:a})},data:Bi({uuid:s,UPLOADCARE_PUB_KEY:i,source:t}),signal:r}).then(({data:d,headers:p,request:u})=>{let m=Ve(JSON.parse(d));if("error"in m)throw new ee(m.error.content,m.error.errorCode,u,m,p);return m}),{retryThrottledRequestMaxTimes:l,retryNetworkErrorMaxTimes:c})}n(zl,"multipartComplete");function us(s,{publicKey:i,baseURL:e,source:t,integration:r,userAgent:o,retryThrottledRequestMaxTimes:a,retryNetworkErrorMaxTimes:l,signal:c,onProgress:d}){return Eo({check:n(p=>Oo(s,{publicKey:i,baseURL:e,signal:p,source:t,integration:r,userAgent:o,retryThrottledRequestMaxTimes:a,retryNetworkErrorMaxTimes:l}).then(u=>u.isReady?u:(d&&d({isComputable:!0,value:1}),!1)),"check"),signal:c})}n(us,"isReadyPoll");function Hl(s){return"defaultEffects"in s}n(Hl,"isGroupFileInfo");var De=class{static{n(this,"UploadcareFile")}uuid;name;size;isStored;isImage;mimeType;cdnUrl;s3Url;originalFilename;imageInfo;videoInfo;contentInfo;metadata;s3Bucket;defaultEffects=null;constructor(i,{baseCDN:e=R.baseCDN,fileName:t}={}){let{uuid:r,s3Bucket:o}=i,a=Ue(e,`${r}/`),l=o?Ue(`https://${o}.s3.amazonaws.com/`,`${r}/${i.filename}`):null;this.uuid=r,this.name=t||i.filename,this.size=i.size,this.isStored=i.isStored,this.isImage=i.isImage,this.mimeType=i.mimeType,this.cdnUrl=a,this.originalFilename=i.originalFilename,this.imageInfo=i.imageInfo,this.videoInfo=i.videoInfo,this.contentInfo=i.contentInfo,this.metadata=i.metadata||null,this.s3Bucket=o||null,this.s3Url=l,Hl(i)&&(this.defaultEffects=i.defaultEffects)}},jl=n((s,{publicKey:i,fileName:e,baseURL:t,secureSignature:r,secureExpire:o,store:a,contentType:l,signal:c,onProgress:d,source:p,integration:u,userAgent:m,retryThrottledRequestMaxTimes:f,retryNetworkErrorMaxTimes:g,baseCDN:w,metadata:C})=>$l(s,{publicKey:i,fileName:e,contentType:l,baseURL:t,secureSignature:r,secureExpire:o,store:a,signal:c,onProgress:d,source:p,integration:u,userAgent:m,retryThrottledRequestMaxTimes:f,retryNetworkErrorMaxTimes:g,metadata:C}).then(({file:E})=>us(E,{publicKey:i,baseURL:t,source:p,integration:u,userAgent:m,retryThrottledRequestMaxTimes:f,retryNetworkErrorMaxTimes:g,onProgress:d,signal:c})).then(E=>new De(E,{baseCDN:w})),"uploadDirect"),Kl=n((s,{publicKey:i,fileName:e,baseURL:t,signal:r,onProgress:o,source:a,integration:l,userAgent:c,retryThrottledRequestMaxTimes:d,retryNetworkErrorMaxTimes:p,baseCDN:u})=>Oo(s,{publicKey:i,baseURL:t,signal:r,source:a,integration:l,userAgent:c,retryThrottledRequestMaxTimes:d,retryNetworkErrorMaxTimes:p}).then(m=>new De(m,{baseCDN:u,fileName:e})).then(m=>(o&&o({isComputable:!0,value:1}),m)),"uploadFromUploaded"),Gl=n((s,{signal:i}={})=>{let e=null,t=null,r=s.map(()=>new AbortController),o=n(a=>()=>{t=a,r.forEach((l,c)=>c!==a&&l.abort())},"createStopRaceCallback");return Ui(i,()=>{r.forEach(a=>a.abort())}),Promise.all(s.map((a,l)=>{let c=o(l);return Promise.resolve().then(()=>a({stopRace:c,signal:r[l].signal})).then(d=>(c(),d)).catch(d=>(e=d,null))})).then(a=>{if(t===null)throw e;return a[t]})},"race"),ql=window.WebSocket,ns=class{static{n(this,"Events")}events=Object.create({});emit(i,e){this.events[i]?.forEach(t=>t(e))}on(i,e){this.events[i]=this.events[i]||[],this.events[i].push(e)}off(i,e){e?this.events[i]=this.events[i].filter(t=>t!==e):this.events[i]=[]}},Wl=n((s,i)=>s==="success"?{status:ae.Success,...i}:s==="progress"?{status:ae.Progress,...i}:{status:ae.Error,...i},"response"),as=class{static{n(this,"Pusher")}key;disconnectTime;ws=void 0;queue=[];isConnected=!1;subscribers=0;emmitter=new ns;disconnectTimeoutId=null;constructor(i,e=3e4){this.key=i,this.disconnectTime=e}connect(){if(this.disconnectTimeoutId&&clearTimeout(this.disconnectTimeoutId),!this.isConnected&&!this.ws){let i=`wss://ws.pusherapp.com/app/${this.key}?protocol=5&client=js&version=1.12.2`;this.ws=new ql(i),this.ws.addEventListener("error",e=>{this.emmitter.emit("error",new Error(e.message))}),this.emmitter.on("connected",()=>{this.isConnected=!0,this.queue.forEach(e=>this.send(e.event,e.data)),this.queue=[]}),this.ws.addEventListener("message",e=>{let t=JSON.parse(e.data.toString());switch(t.event){case"pusher:connection_established":{this.emmitter.emit("connected",void 0);break}case"pusher:ping":{this.send("pusher:pong",{});break}case"progress":case"success":case"fail":this.emmitter.emit(t.channel,Wl(t.event,JSON.parse(t.data)))}})}}disconnect(){let i=n(()=>{this.ws?.close(),this.ws=void 0,this.isConnected=!1},"actualDisconect");this.disconnectTime?this.disconnectTimeoutId=setTimeout(()=>{i()},this.disconnectTime):i()}send(i,e){let t=JSON.stringify({event:i,data:e});this.ws?.send(t)}subscribe(i,e){this.subscribers+=1,this.connect();let t=`task-status-${i}`,r={event:"pusher:subscribe",data:{channel:t}};this.emmitter.on(t,e),this.isConnected?this.send(r.event,r.data):this.queue.push(r)}unsubscribe(i){this.subscribers-=1;let e=`task-status-${i}`,t={event:"pusher:unsubscribe",data:{channel:e}};this.emmitter.off(e),this.isConnected?this.send(t.event,t.data):this.queue=this.queue.filter(r=>r.data.channel!==e),this.subscribers===0&&this.disconnect()}onError(i){return this.emmitter.on("error",i),()=>this.emmitter.off("error",i)}},rs=null,ps=n(s=>{if(!rs){let i=typeof window>"u"?0:3e4;rs=new as(s,i)}return rs},"getPusher"),Xl=n(s=>{ps(s).connect()},"preconnect");function Zl({token:s,publicKey:i,baseURL:e,integration:t,userAgent:r,retryThrottledRequestMaxTimes:o,retryNetworkErrorMaxTimes:a,onProgress:l,signal:c}){return Eo({check:n(d=>Vl(s,{publicKey:i,baseURL:e,integration:t,userAgent:r,retryThrottledRequestMaxTimes:o,retryNetworkErrorMaxTimes:a,signal:d}).then(p=>{switch(p.status){case ae.Error:return new ee(p.error,p.errorCode);case ae.Waiting:return!1;case ae.Unknown:return new ee(`Token "${s}" was not found.`);case ae.Progress:return l&&(p.total==="unknown"?l({isComputable:!1}):l({isComputable:!0,value:p.done/p.total})),!1;case ae.Success:return l&&l({isComputable:!0,value:p.done/p.total}),p;default:throw new Error("Unknown status")}}),"check"),signal:c})}n(Zl,"pollStrategy");var Ql=n(({token:s,pusherKey:i,signal:e,onProgress:t})=>new Promise((r,o)=>{let a=ps(i),l=a.onError(o),c=n(()=>{l(),a.unsubscribe(s)},"destroy");Ui(e,()=>{c(),o(new qe("pusher cancelled"))}),a.subscribe(s,d=>{switch(d.status){case ae.Progress:{t&&(d.total==="unknown"?t({isComputable:!1}):t({isComputable:!0,value:d.done/d.total}));break}case ae.Success:{c(),t&&t({isComputable:!0,value:d.done/d.total}),r(d);break}case ae.Error:c(),o(new ee(d.msg,d.error_code))}})}),"pushStrategy"),Yl=n((s,{publicKey:i,fileName:e,baseURL:t,baseCDN:r,checkForUrlDuplicates:o,saveUrlForRecurrentUploads:a,secureSignature:l,secureExpire:c,store:d,signal:p,onProgress:u,source:m,integration:f,userAgent:g,retryThrottledRequestMaxTimes:w,pusherKey:C=R.pusherKey,metadata:E})=>Promise.resolve(Xl(C)).then(()=>Ul(s,{publicKey:i,fileName:e,baseURL:t,checkForUrlDuplicates:o,saveUrlForRecurrentUploads:a,secureSignature:l,secureExpire:c,store:d,signal:p,source:m,integration:f,userAgent:g,retryThrottledRequestMaxTimes:w,metadata:E})).catch(x=>(ps(C)?.disconnect(),Promise.reject(x))).then(x=>x.type===os.FileInfo?x:Gl([({signal:M})=>Zl({token:x.token,publicKey:i,baseURL:t,integration:f,userAgent:g,retryThrottledRequestMaxTimes:w,onProgress:u,signal:M}),({signal:M})=>Ql({token:x.token,pusherKey:C,signal:M,onProgress:u})],{signal:p})).then(x=>{if(x instanceof ee)throw x;return x}).then(x=>us(x.uuid,{publicKey:i,baseURL:t,integration:f,userAgent:g,retryThrottledRequestMaxTimes:w,onProgress:u,signal:p})).then(x=>new De(x,{baseCDN:r})),"uploadFromUrl"),ss=new WeakMap,Jl=n(async s=>{if(ss.has(s))return ss.get(s);let i=await fetch(s.uri).then(e=>e.blob());return ss.set(s,i),i},"getBlobFromReactNativeAsset"),Mo=n(async s=>{if(Fi(s)||Vi(s))return s.size;if(Ni(s))return(await Jl(s)).size;throw new Error("Unknown file type. Cannot determine file size.")},"getFileSize"),ec=n((s,i=R.multipartMinFileSize)=>s>=i,"isMultipart"),Ro=n(s=>{let i="[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}",e=new RegExp(i);return!It(s)&&e.test(s)},"isUuid"),hs=n(s=>{let i="^(?:\\w+:)?\\/\\/([^\\s\\.]+\\.\\S{2}|localhost[\\:?\\d]*)\\S*$",e=new RegExp(i);return!It(s)&&e.test(s)},"isUrl"),tc=n((s,i)=>new Promise((e,t)=>{let r=[],o=!1,a=i.length,l=[...i],c=n(()=>{let d=i.length-l.length,p=l.shift();p&&p().then(u=>{o||(r[d]=u,a-=1,a?c():e(r))}).catch(u=>{o=!0,t(u)})},"run");for(let d=0;d<s;d++)c()}),"runWithConcurrency"),ic=n((s,i,e,t)=>{let r=t*i,o=Math.min(r+t,e);return s.slice(r,o)},"sliceChunk"),rc=n(async(s,i,e)=>t=>ic(s,t,i,e),"prepareChunks"),sc=n((s,i,{publicKey:e,contentType:t,onProgress:r,signal:o,integration:a,retryThrottledRequestMaxTimes:l,retryNetworkErrorMaxTimes:c})=>Bl(s,i,{publicKey:e,contentType:t,onProgress:r,signal:o,integration:a,retryThrottledRequestMaxTimes:l,retryNetworkErrorMaxTimes:c}),"uploadPart"),oc=n(async(s,{publicKey:i,fileName:e,fileSize:t,baseURL:r,secureSignature:o,secureExpire:a,store:l,signal:c,onProgress:d,source:p,integration:u,userAgent:m,retryThrottledRequestMaxTimes:f,retryNetworkErrorMaxTimes:g,contentType:w,multipartChunkSize:C=R.multipartChunkSize,maxConcurrentRequests:E=R.maxConcurrentRequests,baseCDN:x,metadata:M})=>{let fe=t??await Mo(s),ge,lt=n((Z,ne)=>{if(!d)return;ge||(ge=Array(Z).fill(0));let Ce=n(Ae=>Ae.reduce(($e,Jr)=>$e+Jr,0),"sum");return Ae=>{Ae.isComputable&&(ge[ne]=Ae.value,d({isComputable:!0,value:Ce(ge)/Z}))}},"createProgressHandler");return w||=Io(s),Nl(fe,{publicKey:i,contentType:w,fileName:e||ko(s),baseURL:r,secureSignature:o,secureExpire:a,store:l,signal:c,source:p,integration:u,userAgent:m,retryThrottledRequestMaxTimes:f,retryNetworkErrorMaxTimes:g,metadata:M,multipartChunkSize:C}).then(async({uuid:Z,parts:ne})=>{let Ce=await rc(s,fe,C);return Promise.all([Z,tc(E,ne.map((Ae,$e)=>()=>sc(Ce($e),Ae,{publicKey:i,contentType:w,onProgress:lt(ne.length,$e),signal:c,integration:u,retryThrottledRequestMaxTimes:f,retryNetworkErrorMaxTimes:g})))])}).then(([Z])=>zl(Z,{publicKey:i,baseURL:r,source:p,integration:u,userAgent:m,retryThrottledRequestMaxTimes:f,retryNetworkErrorMaxTimes:g})).then(Z=>Z.isReady?Z:us(Z.uuid,{publicKey:i,baseURL:r,source:p,integration:u,userAgent:m,retryThrottledRequestMaxTimes:f,retryNetworkErrorMaxTimes:g,onProgress:d,signal:c})).then(Z=>new De(Z,{baseCDN:x}))},"uploadMultipart");async function ms(s,{publicKey:i,fileName:e,baseURL:t=R.baseURL,secureSignature:r,secureExpire:o,store:a,signal:l,onProgress:c,source:d,integration:p,userAgent:u,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,contentType:g,multipartMinFileSize:w,multipartChunkSize:C,maxConcurrentRequests:E,baseCDN:x=R.baseCDN,checkForUrlDuplicates:M,saveUrlForRecurrentUploads:fe,pusherKey:ge,metadata:lt}){if(It(s)){let Z=await Mo(s);return ec(Z,w)?oc(s,{publicKey:i,contentType:g,multipartChunkSize:C,fileSize:Z,fileName:e,baseURL:t,secureSignature:r,secureExpire:o,store:a,signal:l,onProgress:c,source:d,integration:p,userAgent:u,maxConcurrentRequests:E,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,baseCDN:x,metadata:lt}):jl(s,{publicKey:i,fileName:e,contentType:g,baseURL:t,secureSignature:r,secureExpire:o,store:a,signal:l,onProgress:c,source:d,integration:p,userAgent:u,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,baseCDN:x,metadata:lt})}if(hs(s))return Yl(s,{publicKey:i,fileName:e,baseURL:t,baseCDN:x,checkForUrlDuplicates:M,saveUrlForRecurrentUploads:fe,secureSignature:r,secureExpire:o,store:a,signal:l,onProgress:c,source:d,integration:p,userAgent:u,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,pusherKey:ge,metadata:lt});if(Ro(s))return Kl(s,{publicKey:i,fileName:e,baseURL:t,signal:l,onProgress:c,source:d,integration:p,userAgent:u,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,baseCDN:x});throw new TypeError(`File uploading from "${s}" is not supported`)}n(ms,"uploadFile");var ls=class{static{n(this,"UploadcareGroup")}uuid;filesCount;totalSize;isStored;isImage;cdnUrl;files;createdAt;storedAt=null;constructor(i,{baseCDN:e=R.baseCDN}={}){this.uuid=i.id,this.filesCount=i.filesCount;let t=i.files.filter(Boolean);this.totalSize=Object.values(t).reduce((r,o)=>r+o.size,0),this.isStored=!!i.datetimeStored,this.isImage=!!Object.values(t).filter(r=>r.isImage).length,this.cdnUrl=i.cdnUrl,this.files=t.map(r=>new De(r,{baseCDN:e})),this.createdAt=i.datetimeCreated,this.storedAt=i.datetimeStored}},nc=n(s=>{for(let i of s)if(!It(i))return!1;return!0},"isFileDataArray"),ac=n(s=>{for(let i of s)if(!Ro(i))return!1;return!0},"isUuidArray"),lc=n(s=>{for(let i of s)if(!hs(i))return!1;return!0},"isUrlArray");function Lo(s,{publicKey:i,fileName:e,baseURL:t=R.baseURL,secureSignature:r,secureExpire:o,store:a,signal:l,onProgress:c,source:d,integration:p,userAgent:u,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,contentType:g,multipartChunkSize:w=R.multipartChunkSize,baseCDN:C=R.baseCDN,checkForUrlDuplicates:E,saveUrlForRecurrentUploads:x,jsonpCallback:M}){if(!nc(s)&&!lc(s)&&!ac(s))throw new TypeError(`Group uploading from "${s}" is not supported`);let fe,ge=!0,lt=s.length,Z=n((ne,Ce)=>{if(!c)return;fe||(fe=Array(ne).fill(0));let Ae=n($e=>$e.reduce((Jr,il)=>Jr+il)/ne,"normalize");return $e=>{if(!$e.isComputable||!ge){ge=!1,c({isComputable:!1});return}fe[Ce]=$e.value,c({isComputable:!0,value:Ae(fe)})}},"createProgressHandler");return Promise.all(s.map((ne,Ce)=>It(ne)||hs(ne)?ms(ne,{publicKey:i,fileName:e,baseURL:t,secureSignature:r,secureExpire:o,store:a,signal:l,onProgress:Z(lt,Ce),source:d,integration:p,userAgent:u,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,contentType:g,multipartChunkSize:w,baseCDN:C,checkForUrlDuplicates:E,saveUrlForRecurrentUploads:x}).then(Ae=>Ae.uuid):ne)).then(ne=>Fl(ne,{publicKey:i,baseURL:t,jsonpCallback:M,secureSignature:r,secureExpire:o,signal:l,source:d,integration:p,userAgent:u,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f}).then(Ce=>new ls(Ce,{baseCDN:C})).then(Ce=>(c&&c({isComputable:!0,value:1}),Ce)))}n(Lo,"uploadFileGroup");var We=class{static{n(this,"Queue")}_concurrency=1;_pending=[];_running=0;_resolvers=new Map;_rejectors=new Map;constructor(i){this._concurrency=i}run(){let i=this._concurrency-this._running;for(let e=0;e<i;e++){let t=this._pending.shift();if(!t)return;let r=this._resolvers.get(t),o=this._rejectors.get(t);if(!r||!o)throw new Error("Unexpected behavior: resolver or rejector is undefined");this._running+=1,t().finally(()=>{this._resolvers.delete(t),this._rejectors.delete(t),this._running-=1,this.run()}).then(a=>r(a)).catch(a=>o(a))}}add(i,{autoRun:e}={autoRun:!0}){return new Promise((t,r)=>{this._resolvers.set(i,t),this._rejectors.set(i,r),this._pending.push(i),e&&this.run()})}get pending(){return this._pending.length}get running(){return this._running}set concurrency(i){this._concurrency=i,this.run()}get concurrency(){return this._concurrency}};var fs=n(()=>({}),"blockCtx"),gs=n(s=>({...fs(),"*currentActivity":null,"*currentActivityParams":{},"*history":[],"*historyBack":null,"*closeModal":n(()=>{s.modalManager?.close(s.$["*currentActivity"]),s.set$({"*currentActivity":null})},"*closeModal")}),"activityBlockCtx"),vs=n(s=>({...gs(s),"*commonProgress":0,"*uploadList":[],"*uploadQueue":new We(1),"*collectionErrors":[],"*collectionState":null,"*groupInfo":null,"*uploadTrigger":new Set,"*secureUploadsManager":null}),"uploaderBlockCtx"),Po=n(s=>({...vs(s),"*solution":null}),"solutionBlockCtx");var U=Object.freeze({INIT_SOLUTION:"init-solution",CHANGE_CONFIG:"change-config",ACTION_EVENT:"action-event",ERROR_EVENT:"error-event"}),k=Object.freeze({FILE_ADDED:"file-added",FILE_REMOVED:"file-removed",FILE_UPLOAD_START:"file-upload-start",FILE_UPLOAD_PROGRESS:"file-upload-progress",FILE_UPLOAD_SUCCESS:"file-upload-success",FILE_UPLOAD_FAILED:"file-upload-failed",FILE_URL_CHANGED:"file-url-changed",MODAL_OPEN:"modal-open",MODAL_CLOSE:"modal-close",DONE_CLICK:"done-click",UPLOAD_CLICK:"upload-click",ACTIVITY_CHANGE:"activity-change",COMMON_UPLOAD_START:"common-upload-start",COMMON_UPLOAD_PROGRESS:"common-upload-progress",COMMON_UPLOAD_SUCCESS:"common-upload-success",COMMON_UPLOAD_FAILED:"common-upload-failed",CHANGE:"change",GROUP_CREATED:"group-created"}),zi=class{constructor(i){this._timeoutStore=new Map;this._targets=new Set;this._debugPrint=null;this._debugPrint=i}static{n(this,"EventEmitter")}bindTarget(i){this._targets.add(i)}unbindTarget(i){this._targets.delete(i)}_dispatch(i,e){for(let t of this._targets)t.dispatchEvent(new CustomEvent(i,{detail:e}));this._debugPrint?.(()=>{let t=e&&typeof e=="object"?{...e}:e;return[`event "${i}"`,t]})}emit(i,e,t={}){let{debounce:r}=t;if(typeof r!="number"&&!r){this._dispatch(i,typeof e=="function"?e():e);return}this._timeoutStore.has(i)&&window.clearTimeout(this._timeoutStore.get(i));let o=typeof r=="number"?r:20,a=window.setTimeout(()=>{this._dispatch(i,typeof e=="function"?e():e),this._timeoutStore.delete(i)},o);this._timeoutStore.set(i,a)}};function $(s,i){let e,t=n(((...r)=>{e&&clearTimeout(e),e=setTimeout(()=>s(...r),i)}),"debounced");return t.cancel=()=>{e&&clearTimeout(e)},t}n($,"debounce");var Hi=globalThis,Ki=Hi.ShadowRoot&&(Hi.ShadyCSS===void 0||Hi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Uo=Symbol(),$o=new WeakMap,ji=class{static{n(this,"n")}constructor(i,e,t){if(this._$cssResult$=!0,t!==Uo)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=i,this.t=e}get styleSheet(){let i=this.o,e=this.t;if(Ki&&i===void 0){let t=e!==void 0&&e.length===1;t&&(i=$o.get(e)),i===void 0&&((this.o=i=new CSSStyleSheet).replaceSync(this.cssText),t&&$o.set(e,i))}return i}toString(){return this.cssText}},Do=n(s=>new ji(typeof s=="string"?s:s+"",void 0,Uo),"r");var Vo=n((s,i)=>{if(Ki)s.adoptedStyleSheets=i.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of i){let t=document.createElement("style"),r=Hi.litNonce;r!==void 0&&t.setAttribute("nonce",r),t.textContent=e.cssText,s.appendChild(t)}},"S"),ys=Ki?s=>s:s=>s instanceof CSSStyleSheet?(i=>{let e="";for(let t of i.cssRules)e+=t.cssText;return Do(e)})(s):s;var{is:cc,defineProperty:dc,getOwnPropertyDescriptor:uc,getOwnPropertyNames:pc,getOwnPropertySymbols:hc,getPrototypeOf:mc}=Object,Gi=globalThis,Fo=Gi.trustedTypes,fc=Fo?Fo.emptyScript:"",gc=Gi.reactiveElementPolyfillSupport,Jt=n((s,i)=>s,"d"),ei={toAttribute(s,i){switch(i){case Boolean:s=s?fc:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,i){let e=s;switch(i){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},qi=n((s,i)=>!cc(s,i),"f"),No={attribute:!0,type:String,converter:ei,reflect:!1,useDefault:!1,hasChanged:qi};Symbol.metadata??=Symbol("metadata"),Gi.litPropertyMetadata??=new WeakMap;var Fe=class extends HTMLElement{static{n(this,"y")}static addInitializer(i){this._$Ei(),(this.l??=[]).push(i)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(i,e=No){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(i)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(i,e),!e.noAccessor){let t=Symbol(),r=this.getPropertyDescriptor(i,t,e);r!==void 0&&dc(this.prototype,i,r)}}static getPropertyDescriptor(i,e,t){let{get:r,set:o}=uc(this.prototype,i)??{get(){return this[e]},set(a){this[e]=a}};return{get:r,set(a){let l=r?.call(this);o?.call(this,a),this.requestUpdate(i,l,t)},configurable:!0,enumerable:!0}}static getPropertyOptions(i){return this.elementProperties.get(i)??No}static _$Ei(){if(this.hasOwnProperty(Jt("elementProperties")))return;let i=mc(this);i.finalize(),i.l!==void 0&&(this.l=[...i.l]),this.elementProperties=new Map(i.elementProperties)}static finalize(){if(this.hasOwnProperty(Jt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Jt("properties"))){let e=this.properties,t=[...pc(e),...hc(e)];for(let r of t)this.createProperty(r,e[r])}let i=this[Symbol.metadata];if(i!==null){let e=litPropertyMetadata.get(i);if(e!==void 0)for(let[t,r]of e)this.elementProperties.set(t,r)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let r=this._$Eu(e,t);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(i){let e=[];if(Array.isArray(i)){let t=new Set(i.flat(1/0).reverse());for(let r of t)e.unshift(ys(r))}else i!==void 0&&e.push(ys(i));return e}static _$Eu(i,e){let t=e.attribute;return t===!1?void 0:typeof t=="string"?t:typeof i=="string"?i.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((i=>this.enableUpdating=i)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((i=>i(this)))}addController(i){(this._$EO??=new Set).add(i),this.renderRoot!==void 0&&this.isConnected&&i.hostConnected?.()}removeController(i){this._$EO?.delete(i)}_$E_(){let i=new Map,e=this.constructor.elementProperties;for(let t of e.keys())this.hasOwnProperty(t)&&(i.set(t,this[t]),delete this[t]);i.size>0&&(this._$Ep=i)}createRenderRoot(){let i=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Vo(i,this.constructor.elementStyles),i}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((i=>i.hostConnected?.()))}enableUpdating(i){}disconnectedCallback(){this._$EO?.forEach((i=>i.hostDisconnected?.()))}attributeChangedCallback(i,e,t){this._$AK(i,t)}_$ET(i,e){let t=this.constructor.elementProperties.get(i),r=this.constructor._$Eu(i,t);if(r!==void 0&&t.reflect===!0){let o=(t.converter?.toAttribute!==void 0?t.converter:ei).toAttribute(e,t.type);this._$Em=i,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(i,e){let t=this.constructor,r=t._$Eh.get(i);if(r!==void 0&&this._$Em!==r){let o=t.getPropertyOptions(r),a=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:ei;this._$Em=r;let l=a.fromAttribute(e,o.type);this[r]=l??this._$Ej?.get(r)??l,this._$Em=null}}requestUpdate(i,e,t){if(i!==void 0){let r=this.constructor,o=this[i];if(t??=r.getPropertyOptions(i),!((t.hasChanged??qi)(o,e)||t.useDefault&&t.reflect&&o===this._$Ej?.get(i)&&!this.hasAttribute(r._$Eu(i,t))))return;this.C(i,e,t)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(i,e,{useDefault:t,reflect:r,wrapped:o},a){t&&!(this._$Ej??=new Map).has(i)&&(this._$Ej.set(i,a??e??this[i]),o!==!0||a!==void 0)||(this._$AL.has(i)||(this.hasUpdated||t||(e=void 0),this._$AL.set(i,e)),r===!0&&this._$Em!==i&&(this._$Eq??=new Set).add(i))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let i=this.scheduleUpdate();return i!=null&&await i,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,o]of this._$Ep)this[r]=o;this._$Ep=void 0}let t=this.constructor.elementProperties;if(t.size>0)for(let[r,o]of t){let{wrapped:a}=o,l=this[r];a!==!0||this._$AL.has(r)||l===void 0||this.C(r,void 0,o,l)}}let i=!1,e=this._$AL;try{i=this.shouldUpdate(e),i?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(t){throw i=!1,this._$EM(),t}i&&this._$AE(e)}willUpdate(i){}_$AE(i){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(i)),this.updated(i)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(i){return!0}update(i){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(i){}firstUpdated(i){}};Fe.elementStyles=[],Fe.shadowRootOptions={mode:"open"},Fe[Jt("elementProperties")]=new Map,Fe[Jt("finalized")]=new Map,gc?.({ReactiveElement:Fe}),(Gi.reactiveElementVersions??=[]).push("2.1.1");var _s=globalThis,Wi=_s.trustedTypes,Bo=Wi?Wi.createPolicy("lit-html",{createHTML:n(s=>s,"createHTML")}):void 0,ws="$lit$",Ne=`lit$${Math.random().toFixed(9).slice(2)}$`,Cs="?"+Ne,vc=`<${Cs}>`,ht=document,ii=n(()=>ht.createComment(""),"l"),ri=n(s=>s===null||typeof s!="object"&&typeof s!="function","c"),Ts=Array.isArray,qo=n(s=>Ts(s)||typeof s?.[Symbol.iterator]=="function","u"),bs=`[ \f\r]`,ti=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,zo=/-->/g,Ho=/>/g,ut=RegExp(`>|${bs}(?:([^\\s"'>=/]+)(${bs}*=${bs}*(?:[^
|
|
27
27
|
\f\r"'\`<>=]|("|')|))|$)`,"g"),jo=/'/g,Ko=/"/g,Wo=/^(?:script|style|textarea|title)$/i,Es=n(s=>(i,...e)=>({_$litType$:s,strings:i,values:e}),"y"),y=Es(1),bh=Es(2),_h=Es(3),te=Symbol.for("lit-noChange"),L=Symbol.for("lit-nothing"),Go=new WeakMap,pt=ht.createTreeWalker(ht,129);function Xo(s,i){if(!Ts(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Bo!==void 0?Bo.createHTML(i):i}n(Xo,"P");var Zo=n((s,i)=>{let e=s.length-1,t=[],r,o=i===2?"<svg>":i===3?"<math>":"",a=ti;for(let l=0;l<e;l++){let c=s[l],d,p,u=-1,m=0;for(;m<c.length&&(a.lastIndex=m,p=a.exec(c),p!==null);)m=a.lastIndex,a===ti?p[1]==="!--"?a=zo:p[1]!==void 0?a=Ho:p[2]!==void 0?(Wo.test(p[2])&&(r=RegExp("</"+p[2],"g")),a=ut):p[3]!==void 0&&(a=ut):a===ut?p[0]===">"?(a=r??ti,u=-1):p[1]===void 0?u=-2:(u=a.lastIndex-p[2].length,d=p[1],a=p[3]===void 0?ut:p[3]==='"'?Ko:jo):a===Ko||a===jo?a=ut:a===zo||a===Ho?a=ti:(a=ut,r=void 0);let f=a===ut&&s[l+1].startsWith("/>")?" ":"";o+=a===ti?c+vc:u>=0?(t.push(d),c.slice(0,u)+ws+c.slice(u)+Ne+f):c+Ne+(u===-2?l:f)}return[Xo(s,o+(s[e]||"<?>")+(i===2?"</svg>":i===3?"</math>":"")),t]},"V"),si=class s{static{n(this,"N")}constructor({strings:i,_$litType$:e},t){let r;this.parts=[];let o=0,a=0,l=i.length-1,c=this.parts,[d,p]=Zo(i,e);if(this.el=s.createElement(d,t),pt.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(r=pt.nextNode())!==null&&c.length<l;){if(r.nodeType===1){if(r.hasAttributes())for(let u of r.getAttributeNames())if(u.endsWith(ws)){let m=p[a++],f=r.getAttribute(u).split(Ne),g=/([.?@])?(.*)/.exec(m);c.push({type:1,index:o,name:g[2],strings:f,ctor:g[1]==="."?Zi:g[1]==="?"?Qi:g[1]==="@"?Yi:ft}),r.removeAttribute(u)}else u.startsWith(Ne)&&(c.push({type:6,index:o}),r.removeAttribute(u));if(Wo.test(r.tagName)){let u=r.textContent.split(Ne),m=u.length-1;if(m>0){r.textContent=Wi?Wi.emptyScript:"";for(let f=0;f<m;f++)r.append(u[f],ii()),pt.nextNode(),c.push({type:2,index:++o});r.append(u[m],ii())}}}else if(r.nodeType===8)if(r.data===Cs)c.push({type:2,index:o});else{let u=-1;for(;(u=r.data.indexOf(Ne,u+1))!==-1;)c.push({type:7,index:o}),u+=Ne.length-1}o++}}static createElement(i,e){let t=ht.createElement("template");return t.innerHTML=i,t}};function mt(s,i,e=s,t){if(i===te)return i;let r=t!==void 0?e._$Co?.[t]:e._$Cl,o=ri(i)?void 0:i._$litDirective$;return r?.constructor!==o&&(r?._$AO?.(!1),o===void 0?r=void 0:(r=new o(s),r._$AT(s,e,t)),t!==void 0?(e._$Co??=[])[t]=r:e._$Cl=r),r!==void 0&&(i=mt(s,r._$AS(s,i.values),r,t)),i}n(mt,"S");var Xi=class{static{n(this,"M")}constructor(i,e){this._$AV=[],this._$AN=void 0,this._$AD=i,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(i){let{el:{content:e},parts:t}=this._$AD,r=(i?.creationScope??ht).importNode(e,!0);pt.currentNode=r;let o=pt.nextNode(),a=0,l=0,c=t[0];for(;c!==void 0;){if(a===c.index){let d;c.type===2?d=new kt(o,o.nextSibling,this,i):c.type===1?d=new c.ctor(o,c.name,c.strings,this,i):c.type===6&&(d=new Ji(o,this,i)),this._$AV.push(d),c=t[++l]}a!==c?.index&&(o=pt.nextNode(),a++)}return pt.currentNode=ht,r}p(i){let e=0;for(let t of this._$AV)t!==void 0&&(t.strings!==void 0?(t._$AI(i,t,e),e+=t.strings.length-2):t._$AI(i[e])),e++}},kt=class s{static{n(this,"R")}get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(i,e,t,r){this.type=2,this._$AH=L,this._$AN=void 0,this._$AA=i,this._$AB=e,this._$AM=t,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let i=this._$AA.parentNode,e=this._$AM;return e!==void 0&&i?.nodeType===11&&(i=e.parentNode),i}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(i,e=this){i=mt(this,i,e),ri(i)?i===L||i==null||i===""?(this._$AH!==L&&this._$AR(),this._$AH=L):i!==this._$AH&&i!==te&&this._(i):i._$litType$!==void 0?this.$(i):i.nodeType!==void 0?this.T(i):qo(i)?this.k(i):this._(i)}O(i){return this._$AA.parentNode.insertBefore(i,this._$AB)}T(i){this._$AH!==i&&(this._$AR(),this._$AH=this.O(i))}_(i){this._$AH!==L&&ri(this._$AH)?this._$AA.nextSibling.data=i:this.T(ht.createTextNode(i)),this._$AH=i}$(i){let{values:e,_$litType$:t}=i,r=typeof t=="number"?this._$AC(i):(t.el===void 0&&(t.el=si.createElement(Xo(t.h,t.h[0]),this.options)),t);if(this._$AH?._$AD===r)this._$AH.p(e);else{let o=new Xi(r,this),a=o.u(this.options);o.p(e),this.T(a),this._$AH=o}}_$AC(i){let e=Go.get(i.strings);return e===void 0&&Go.set(i.strings,e=new si(i)),e}k(i){Ts(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,t,r=0;for(let o of i)r===e.length?e.push(t=new s(this.O(ii()),this.O(ii()),this,this.options)):t=e[r],t._$AI(o),r++;r<e.length&&(this._$AR(t&&t._$AB.nextSibling,r),e.length=r)}_$AR(i=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);i!==this._$AB;){let t=i.nextSibling;i.remove(),i=t}}setConnected(i){this._$AM===void 0&&(this._$Cv=i,this._$AP?.(i))}},ft=class{static{n(this,"k")}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(i,e,t,r,o){this.type=1,this._$AH=L,this._$AN=void 0,this.element=i,this.name=e,this._$AM=r,this.options=o,t.length>2||t[0]!==""||t[1]!==""?(this._$AH=Array(t.length-1).fill(new String),this.strings=t):this._$AH=L}_$AI(i,e=this,t,r){let o=this.strings,a=!1;if(o===void 0)i=mt(this,i,e,0),a=!ri(i)||i!==this._$AH&&i!==te,a&&(this._$AH=i);else{let l=i,c,d;for(i=o[0],c=0;c<o.length-1;c++)d=mt(this,l[t+c],e,c),d===te&&(d=this._$AH[c]),a||=!ri(d)||d!==this._$AH[c],d===L?i=L:i!==L&&(i+=(d??"")+o[c+1]),this._$AH[c]=d}a&&!r&&this.j(i)}j(i){i===L?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,i??"")}},Zi=class extends ft{static{n(this,"H")}constructor(){super(...arguments),this.type=3}j(i){this.element[this.name]=i===L?void 0:i}},Qi=class extends ft{static{n(this,"I")}constructor(){super(...arguments),this.type=4}j(i){this.element.toggleAttribute(this.name,!!i&&i!==L)}},Yi=class extends ft{static{n(this,"L")}constructor(i,e,t,r,o){super(i,e,t,r,o),this.type=5}_$AI(i,e=this){if((i=mt(this,i,e,0)??L)===te)return;let t=this._$AH,r=i===L&&t!==L||i.capture!==t.capture||i.once!==t.once||i.passive!==t.passive,o=i!==L&&(t===L||r);r&&this.element.removeEventListener(this.name,this,t),o&&this.element.addEventListener(this.name,this,i),this._$AH=i}handleEvent(i){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,i):this._$AH.handleEvent(i)}},Ji=class{static{n(this,"z")}constructor(i,e,t){this.element=i,this.type=6,this._$AN=void 0,this._$AM=e,this.options=t}get _$AU(){return this._$AM._$AU}_$AI(i){mt(this,i)}},Qo={M:ws,P:Ne,A:Cs,C:1,L:Zo,R:Xi,D:qo,V:mt,I:kt,H:ft,N:Qi,U:Yi,B:Zi,F:Ji},yc=_s.litHtmlPolyfillSupport;yc?.(si,kt),(_s.litHtmlVersions??=[]).push("3.3.1");var Yo=n((s,i,e)=>{let t=e?.renderBefore??i,r=t._$litPart$;if(r===void 0){let o=e?.renderBefore??null;t._$litPart$=r=new kt(i.insertBefore(ii(),o),o,void 0,e??{})}return r._$AI(s),r},"B");var xs=globalThis,Ie=class extends Fe{static{n(this,"i")}constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let i=super.createRenderRoot();return this.renderOptions.renderBefore??=i.firstChild,i}update(i){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(i),this._$Do=Yo(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return te}};Ie._$litElement$=!0,Ie.finalized=!0,xs.litElementHydrateSupport?.({LitElement:Ie});var bc=xs.litElementPolyfillSupport;bc?.({LitElement:Ie});(xs.litElementVersions??=[]).push("4.2.1");var _c={button:["toolbar"],checkbox:["toolbar"],menuitem:["menu","menubar"],option:["listbox"],tab:["tablist"]};function oi(s,i){i.tabIndex=0,i.focus(),s.tabIndex=-1}n(oi,"focus");function Ss(s){let i=s.role||s.type||s.tagName;if(!i)return null;let e=_c[i.toLowerCase()];if(!e)return null;for(let t of e){let r=s.closest(`[role=${t}]`);if(r)return r}}n(Ss,"findGroupNodeByEventTarget");function As(s,i){return i.role==="toolbar"?wc(i):i.querySelectorAll(`[role=${s.role}]`)}n(As,"getItems");function wc(s){return[...s.querySelectorAll("*")].filter(e=>e.role==="button"||e.type==="button"||e.role==="checkbox"||e.type==="checkbox")}n(wc,"getToolbarItems");function Cc(s){let i=s.getAttribute("aria-orientation");if(i==="vertical")return!1;if(i==="horizontal")return!0;let e=s.role;return e==="menubar"||e==="tablist"||e==="toolbar"}n(Cc,"isHorizontalOrientation");function Jo(s){return i=>{let e=!1,t=s?.searchDelayMs||300,r=0,o="";function a(u){let m=Ss(u.target);if(!m){l();return}let f=As(u.target,m),g=Array.from(f).indexOf(u.target),w="ArrowDown",C="ArrowUp";if(Cc(m)&&(i.document.dir==="rtl"?(w="ArrowLeft",C="ArrowRight"):(w="ArrowRight",C="ArrowLeft")),u.key===w)u.preventDefault(),oi(u.target,f[g+1]||f[0]);else if(u.key===C)u.preventDefault(),oi(u.target,f[g-1]||f[f.length-1]);else if(u.key==="Home")u.preventDefault(),oi(u.target,f[0]);else if(u.key==="End")u.preventDefault(),oi(u.target,f[f.length-1]);else if(u.key.length===1&&m.role!=="tablist"){let E=Date.now();E-r<=t?o+=u.key.toLowerCase():o=u.key.toLowerCase(),r=E;let x=Array.from(f).find(M=>M.textContent?.trim()?.toLowerCase()?.startsWith(o));x&&(u.preventDefault(),oi(u.target,x))}}n(a,"keyDown");function l(){e=!1,i.removeEventListener("keydown",a)}n(l,"stop");function c(u){let m=Ss(u.target);if(m){e||(e=!0,i.addEventListener("keydown",a));let f=As(u.target,m);for(let g of f)g!==u.target&&g.setAttribute("tabindex",-1)}else e&&l()}n(c,"focusIn");function d(u){(!u.relatedTarget||u.relatedTarget===i.document)&&l()}n(d,"focusOut");function p(u){let m=Ss(u.target);if(m){let f=As(u.target,m);for(let g of f)g!==u.target&&g.setAttribute("tabindex",-1);u.target.setAttribute("tabindex",0)}}return n(p,"click"),i.addEventListener("click",p),i.addEventListener("focusin",c),i.addEventListener("focusout",d),()=>{l(),i.removeEventListener("click",p),i.removeEventListener("focusin",c),i.removeEventListener("focusout",d)}}}n(Jo,"focusGroupKeyUX");function en(){return s=>{let i,e;function t(o){if(o.target.getAttribute("aria-hidden")==="true"){i=o.target,i.setAttribute("aria-hidden","false"),e=i.hidden,e&&(i.hidden=!1);let a=o.target.querySelector('a, button, select, textarea, input:not([type=radio]), [type=radio]:checked, [tabindex]:not([tabindex="-1"])');a&&(a.tabIndex=0)}}n(t,"jump");function r(o){i&&i.contains(o.target)&&(!o.relatedTarget||!i.contains(o.relatedTarget))&&(o.target.tabIndex=-1,i.setAttribute("aria-hidden","true"),e&&(i.hidden=!0),i=null)}return n(r,"focusOut"),s.addEventListener("keyuxJump",t),s.addEventListener("focusout",r),()=>{s.removeEventListener("keyuxJump",t),s.removeEventListener("focusout",r)}}}n(en,"hiddenKeyUX");function tn(){return s=>{let i=[];function e(c){let d=s.document.activeElement;d&&d!==s.document.body&&i.push(new WeakRef(d)),c.focus({focusVisible:!0})}n(e,"focus");function t(){let c=i.pop();if(!c){s.document.activeElement.blur();return}let d=c.deref();d&&d.isConnected?d.focus():t()}n(t,"back");let r=0,o;function a(c){clearInterval(o);let d=c.getAttribute("aria-controls");o=setInterval(()=>{if(r++>50){clearInterval(o);return}let p=s.document.getElementById(d);if(p){let u=p.querySelector('a, button, select, textarea, input:not([type=radio]), [type=radio]:checked, [tabindex]:not([tabindex="-1"])');u&&(clearInterval(o),p.dispatchEvent(new s.CustomEvent("keyuxJump",{bubbles:!0})),e(u))}},50)}n(a,"jump");function l(c){c.target.getAttribute("aria-controls")&&c.key==="Enter"&&a(c.target),c.key==="Escape"&&t()}return n(l,"keyDown"),s.addEventListener("keydown",l),()=>{s.removeEventListener("keydown",l)}}}n(tn,"jumpKeyUX");function rn(s){let i,e=s.split(" "),t;function r(l){l.key==="Enter"&&(l.target.tagName==="BUTTON"||l.target.tagName==="A")&&(o(),l.target.classList.add(...e),i=l.target,t=l.target)}n(r,"keyDown");function o(){i&&i.classList.remove(...e),t=null}n(o,"keyUp");function a(l){l.clientX===0&&l.clientY===0&&t!==l.target&&(o(),l.target.classList.add(...e),i=l.target)}return n(a,"click"),l=>(l.addEventListener("click",a),l.addEventListener("keydown",r),l.addEventListener("keyup",o),()=>{l.removeEventListener("click",a),l.removeEventListener("keydown",r),l.removeEventListener("keyup",o)})}n(rn,"pressKeyUX");function sn(s,i){let e=i.map(t=>t(s));return()=>{e.forEach(t=>t())}}n(sn,"startKeyUX");var Is=class{constructor(){this._listeners=new Map;this._scope=[]}static{n(this,"ScopedMinimalWindow")}addEventListener(i,e){let t=n(r=>{let o=r.target;o instanceof Node&&this._scope.some(a=>a===o||a.contains(o))&&e(r)},"wrappedListener");this._listeners.set(e,t),window.addEventListener(i,t)}removeEventListener(i,e){let t=this._listeners.get(e);t&&window.removeEventListener(i,t),this._listeners.delete(e)}get CustomEvent(){return window.CustomEvent}get document(){return window.document}get navigator(){return window.navigator}registerScope(i){this._scope.push(i)}destroy(){this._scope=[];for(let i of this._listeners.values())window.removeEventListener("keydown",i),window.removeEventListener("keyup",i);this._listeners.clear()}},er=class{static{n(this,"A11y")}constructor(){this._scopedWindow=new Is,this._destroyKeyUX=sn(this._scopedWindow,[Jo(),rn("is-pressed"),tn(),en()])}registerBlock(i){this._scopedWindow.registerScope(i)}destroy(){this._destroyKeyUX?.(),this._scopedWindow.destroy()}};var Qe=n(s=>`*l10n/${s}`,"localeStateKey"),Tc="en",tr=class{constructor(i){this._blockInstance=null;this._localeName="";this._blockInstance=i;for(let[e,t]of Object.entries(Yt)){let r=this._blockInstance.has(Qe(e))?!this._blockInstance.$[Qe(e)]:!0;this._blockInstance.add(Qe(e),t,r)}setTimeout(()=>{i.subConfigValue("localeName",async e=>{if(!this._blockInstance||!e)return;this._localeName=e;let t=await _o(e);if(e!==Tc&&this._localeName!==e)return;let r=this._blockInstance.cfg.localeDefinitionOverride?.[e];for(let[o,a]of Object.entries(t)){let l=r?.[o];this._blockInstance.add(Qe(o),l??a,!0)}}),i.subConfigValue("localeDefinitionOverride",e=>{if(!e)return;let t=e[this._localeName];if(t)for(let[r,o]of Object.entries(t))this._blockInstance?.add(Qe(r),o,!0)})})}static{n(this,"LocaleManager")}};function Ec(s){return s.replace(/[A-Z]/g,i=>`_${i.toLowerCase()}`).replace(/__/g,"_")}n(Ec,"i");function Os(s){return Array.isArray(s)?s.map(i=>typeof i=="object"&&i!==null?Os(i):i):typeof s!="object"||s===null?s:Object.fromEntries(Object.entries(s).map(([i,e])=>{let t=Ec(i);return typeof e=="object"&&e!==null?[t,Os(e)]:[t,e]}))}n(Os,"c");function xc(s){return{ok:!0,value:s}}n(xc,"u");function ks(s){return{ok:!1,error:s}}n(ks,"a");var Sc="https://tlm.uploadcare.com/api/",Ms=class{static{n(this,"y")}constructor(i=Sc){this.baseUrl=i}async base(i,e={}){let t=`${this.baseUrl}${i}`;try{let r=await fetch(t,e);if(!r.ok)return ks(new Error(`Got non-200 response from "${t}". Status: ${r.status.toString()}`));try{let o=await r.json();return xc(o)}catch(o){return ks(new Error(`Error parsing JSON from "${t}". Error: ${o}`))}}catch(r){return ks(new Error(`Error fetching data from "${t}". Error: ${r}`))}}async post(i,e,t={}){return await this.base(i,{...t,method:"POST",body:JSON.stringify(Os(e)),headers:{"Content-Type":"application/json",...t.headers||{}}})}async get(i,e={}){return await this.base(i,{method:"GET",...e})}},Ac=n(async(s,i)=>({success:!0,data:i}),"f"),ir=class extends Ms{static{n(this,"p")}constructor(){super()}async sendEvent(i,e){let t=await Ac(void 0,i);if(!t.success)throw console.error("TelemetryAPIService: events: body is invalid",t.error),new Error("TelemetryAPIService: events: body is invalid");return this.post("v1/events",i,e)}};var le=n(s=>s?s.split(",").map(i=>i.trim()).filter(Boolean):[],"deserializeCsv"),Be=n(s=>s.join(","),"serializeCsv");var on=n(s=>{if(typeof s!="string"||!s)return"";let i=s.trim();return i.startsWith("-/")?i=i.slice(2):i.startsWith("/")&&(i=i.slice(1)),i.endsWith("/")&&(i=i.slice(0,i.length-1)),i},"normalizeCdnOperation"),rr=n((...s)=>s.filter(i=>typeof i=="string"&&!!i).map(i=>on(i)).join("/-/"),"joinCdnOperations"),ie=n((...s)=>{let i=rr(...s);return i?`-/${i}/`:""},"createCdnUrlModifiers");function sr(s){let i=new URL(s),e=i.pathname+i.search+i.hash,t=e.lastIndexOf("http"),r=e.lastIndexOf("/"),o="";return t>=0?o=e.slice(t):r>=0&&(o=e.slice(r+1)),o}n(sr,"extractFilename");function or(s){let i=new URL(s),{pathname:e}=i,t=e.indexOf("/"),r=e.indexOf("/",t+1);return e.substring(t+1,r)}n(or,"extractUuid");function Rs(s){let i=nn(s),e=new URL(i),t=e.pathname.indexOf("/-/");return t===-1?"":e.pathname.substring(t).slice(1)}n(Rs,"extractCdnUrlModifiers");function Ls(s){return Rs(s).split("/-/").filter(Boolean).map(e=>on(e))}n(Ls,"extractOperations");function nn(s){let i=new URL(s),e=sr(s),t=an(e)?ln(e).pathname:e;return i.pathname=i.pathname.replace(t,""),i.search="",i.hash="",i.toString()}n(nn,"trimFilename");function an(s){return s.startsWith("http")}n(an,"isFileUrl");function ln(s){let i=new URL(s);return{pathname:`${i.origin}${i.pathname??""}`,search:i.search??"",hash:i.hash??""}}n(ln,"splitFileUrl");var G=n((s,i,e)=>{let t=new URL(nn(s)),r=e??sr(s),o=i??"";if(t.pathname.startsWith("//")&&(t.pathname=t.pathname.replace("//","/")),r&&an(r)){let a=ln(r);t.pathname=`${t.pathname}${o}${a.pathname||""}`,t.search=a.search,t.hash=a.hash}else t.pathname=`${t.pathname}${o}${r||""}`;return t.toString()},"createCdnUrl"),Ye=n((s,i)=>{let e=new URL(s);return e.pathname=`${i}/`,e.toString()},"createOriginalUrl");var q=n((s,i=",")=>s.trim().split(i).map(e=>e.trim()).filter(e=>e.length>0),"stringToArray");var ni=Object.freeze({brightness:0,exposure:0,gamma:100,contrast:0,saturation:0,vibrance:0,warmth:0,enhance:0,filter:0,rotate:0,mirror:!1,flip:!1,crop:void 0}),dn=["enhance","brightness","exposure","gamma","contrast","saturation","vibrance","warmth","filter","mirror","flip","rotate","crop"];function Ic(s,i){if(typeof i=="number"){let e=i;return ni[s]!==e?`${s}/${e}`:""}if(typeof i=="boolean"){let e=i;return ni[s]!==e?`${s}`:""}if(s==="filter"&&i){let{name:e,amount:t}=i;return ni.filter===t?"":`${s}/${e}/${t}`}if(s==="crop"&&i){let{dimensions:e,coords:t}=i;return`${s}/${e.join("x")}/${t.join(",")}`}return""}n(Ic,"transformationToStr");function Je(s){return rr(...dn.filter(i=>typeof s[i]<"u"&&s[i]!==null).map(i=>{let e=s[i];return Ic(i,e)}).filter(i=>!!i))}n(Je,"transformationsToOperations");var nr=rr("format/auto","progressive/yes"),ze=n(([s])=>typeof s<"u"?Number(s):void 0,"asNumber"),cn=n(()=>!0,"asBoolean"),kc=n(([s,i])=>({name:s,amount:typeof i<"u"?Number(i):100}),"asFilter"),Oc=n(([s,i])=>{if(!/\d+x\d+/.test(s)||!/\d+,\d+/.test(i))throw new Error("Crop by aspect ratio, percentage or alignment shortcuts is not supported.");return{dimensions:q(s,"x").map(Number),coords:q(i).map(Number)}},"asCrop"),Mc=Object.freeze({enhance:ze,brightness:ze,exposure:ze,gamma:ze,contrast:ze,saturation:ze,vibrance:ze,warmth:ze,filter:kc,mirror:cn,flip:cn,rotate:ze,crop:n(s=>{let[i,e]=s,{dimensions:t,coords:r}=Oc([i,e]);return{dimensions:t,coords:r}},"crop")});function Ps(s){let i={};for(let e of s){let[t,...r]=e.split("/");if(!t||!dn.includes(t))continue;let o=t,a=Mc[o];try{let l=a(r);i[o]=l}catch(l){console.warn([`Failed to parse URL operation "${e}". It will be ignored.`,l instanceof Error?`Error message: "${l.message}"`:l,"If you need this functionality, please feel free to open an issue at https://github.com/uploadcare/blocks/issues/new"].join(`
|
|
28
|
-
`))}}return i}n(Ps,"operationsToTransformations");var B=Object.freeze({CROP:"crop",TUNING:"tuning",FILTERS:"filters"}),re=Object.freeze([B.CROP,B.TUNING,B.FILTERS]),un=Object.freeze(["brightness","exposure","gamma","contrast","saturation","vibrance","warmth","enhance"]),pn=Object.freeze(["adaris","briaril","calarel","carris","cynarel","cyren","elmet","elonni","enzana","erydark","fenralan","ferand","galen","gavin","gethriel","iorill","iothari","iselva","jadis","lavra","misiara","namala","nerion","nethari","pamaya","sarnar","sedis","sewen","sorahel","sorlen","tarian","thellassan","varriel","varven","vevera","virkas","yedis","yllara","zatvel","zevcen"]),hn=Object.freeze(["rotate","mirror","flip"]),He=ni,Ee=Object.freeze({brightness:{zero:He.brightness,range:[-100,100],keypointsNumber:2},exposure:{zero:He.exposure,range:[-500,500],keypointsNumber:2},gamma:{zero:He.gamma,range:[0,1e3],keypointsNumber:2},contrast:{zero:He.contrast,range:[-100,500],keypointsNumber:2},saturation:{zero:He.saturation,range:[-100,500],keypointsNumber:1},vibrance:{zero:He.vibrance,range:[-100,500],keypointsNumber:1},warmth:{zero:He.warmth,range:[-100,100],keypointsNumber:1},enhance:{zero:He.enhance,range:[0,100],keypointsNumber:1},filter:{zero:He.filter,range:[0,100],keypointsNumber:1}});var ai="https://ucarecdn.com",Rc="https://upload.uploadcare.com",Lc="https://social.uploadcare.com",Pc="https://ucarecd.net",$c={pubkey:"",multiple:!0,multipleMin:0,multipleMax:Number.MAX_SAFE_INTEGER,confirmUpload:!1,imgOnly:!1,accept:"",externalSourcesPreferredTypes:"",externalSourcesEmbedCss:"",store:"auto",cameraMirror:!1,cameraCapture:"",sourceList:"local, url, camera, dropbox, gdrive",topLevelOrigin:"",cloudImageEditorTabs:Be(re),maxLocalFileSizeBytes:0,thumbSize:76,showEmptyList:!1,useLocalImageEditor:!1,useCloudImageEditor:!0,removeCopyright:!1,cropPreset:"",imageShrink:"",modalScrollLock:!0,modalBackdropStrokes:!1,sourceListWrap:!0,remoteTabSessionKey:"",cdnCname:ai,cdnCnamePrefixed:Pc,baseUrl:Rc,socialBaseUrl:Lc,secureSignature:"",secureExpire:"",secureDeliveryProxy:"",retryThrottledRequestMaxTimes:10,retryNetworkErrorMaxTimes:3,multipartMinFileSize:26214400,multipartChunkSize:5242880,maxConcurrentRequests:10,multipartMaxConcurrentRequests:4,multipartMaxAttempts:3,checkForUrlDuplicates:!1,saveUrlForRecurrentUploads:!1,groupOutput:!1,userAgentIntegration:"",debug:!1,metadata:null,localeName:"en",localeDefinitionOverride:null,secureUploadsExpireThreshold:600*1e3,secureUploadsSignatureResolver:null,secureDeliveryProxyUrlResolver:null,iconHrefResolver:null,fileValidators:[],collectionValidators:[],validationTimeout:15*1e3,validationConcurrency:100,cameraModes:"photo, video",defaultCameraMode:null,enableAudioRecording:!0,enableVideoRecording:null,maxVideoRecordingDuration:null,mediaRecorderOptions:null,filesViewMode:"list",gridShowFileNames:!1,cloudImageEditorAutoOpen:!1,cloudImageEditorMaskHref:null,testMode:!1,qualityInsights:!0},ce=Object.freeze($c);var mn="1.25.0-alpha.
|
|
28
|
+
`))}}return i}n(Ps,"operationsToTransformations");var B=Object.freeze({CROP:"crop",TUNING:"tuning",FILTERS:"filters"}),re=Object.freeze([B.CROP,B.TUNING,B.FILTERS]),un=Object.freeze(["brightness","exposure","gamma","contrast","saturation","vibrance","warmth","enhance"]),pn=Object.freeze(["adaris","briaril","calarel","carris","cynarel","cyren","elmet","elonni","enzana","erydark","fenralan","ferand","galen","gavin","gethriel","iorill","iothari","iselva","jadis","lavra","misiara","namala","nerion","nethari","pamaya","sarnar","sedis","sewen","sorahel","sorlen","tarian","thellassan","varriel","varven","vevera","virkas","yedis","yllara","zatvel","zevcen"]),hn=Object.freeze(["rotate","mirror","flip"]),He=ni,Ee=Object.freeze({brightness:{zero:He.brightness,range:[-100,100],keypointsNumber:2},exposure:{zero:He.exposure,range:[-500,500],keypointsNumber:2},gamma:{zero:He.gamma,range:[0,1e3],keypointsNumber:2},contrast:{zero:He.contrast,range:[-100,500],keypointsNumber:2},saturation:{zero:He.saturation,range:[-100,500],keypointsNumber:1},vibrance:{zero:He.vibrance,range:[-100,500],keypointsNumber:1},warmth:{zero:He.warmth,range:[-100,100],keypointsNumber:1},enhance:{zero:He.enhance,range:[0,100],keypointsNumber:1},filter:{zero:He.filter,range:[0,100],keypointsNumber:1}});var ai="https://ucarecdn.com",Rc="https://upload.uploadcare.com",Lc="https://social.uploadcare.com",Pc="https://ucarecd.net",$c={pubkey:"",multiple:!0,multipleMin:0,multipleMax:Number.MAX_SAFE_INTEGER,confirmUpload:!1,imgOnly:!1,accept:"",externalSourcesPreferredTypes:"",externalSourcesEmbedCss:"",store:"auto",cameraMirror:!1,cameraCapture:"",sourceList:"local, url, camera, dropbox, gdrive",topLevelOrigin:"",cloudImageEditorTabs:Be(re),maxLocalFileSizeBytes:0,thumbSize:76,showEmptyList:!1,useLocalImageEditor:!1,useCloudImageEditor:!0,removeCopyright:!1,cropPreset:"",imageShrink:"",modalScrollLock:!0,modalBackdropStrokes:!1,sourceListWrap:!0,remoteTabSessionKey:"",cdnCname:ai,cdnCnamePrefixed:Pc,baseUrl:Rc,socialBaseUrl:Lc,secureSignature:"",secureExpire:"",secureDeliveryProxy:"",retryThrottledRequestMaxTimes:10,retryNetworkErrorMaxTimes:3,multipartMinFileSize:26214400,multipartChunkSize:5242880,maxConcurrentRequests:10,multipartMaxConcurrentRequests:4,multipartMaxAttempts:3,checkForUrlDuplicates:!1,saveUrlForRecurrentUploads:!1,groupOutput:!1,userAgentIntegration:"",debug:!1,metadata:null,localeName:"en",localeDefinitionOverride:null,secureUploadsExpireThreshold:600*1e3,secureUploadsSignatureResolver:null,secureDeliveryProxyUrlResolver:null,iconHrefResolver:null,fileValidators:[],collectionValidators:[],validationTimeout:15*1e3,validationConcurrency:100,cameraModes:"photo, video",defaultCameraMode:null,enableAudioRecording:!0,enableVideoRecording:null,maxVideoRecordingDuration:null,mediaRecorderOptions:null,filesViewMode:"list",gridShowFileNames:!1,cloudImageEditorAutoOpen:!1,cloudImageEditorMaskHref:null,testMode:!1,qualityInsights:!0},ce=Object.freeze($c);var mn="1.25.0-alpha.1";var je="blocks",Ke=mn;var ar=class{constructor(i){this._sessionId=crypto.randomUUID();this._config=structuredClone(ce);this._initialized=!1;this._lastPayload=null;this._block=i,this._telemetryInstance=new ir,this._queue=new We(10);for(let e of Object.keys(this._config))this._block.subConfigValue(e,t=>{this._initialized&&this._config[e]!==t&&this.sendEvent({eventType:U.CHANGE_CONFIG}),this._setConfig(e,t)})}static{n(this,"TelemetryManager")}_init(i){i===U.INIT_SOLUTION&&!this._initialized&&(this._initialized=!0)}_setConfig(i,e){this._config[i]!==e&&(this._config[i]=e)}_formattingPayload(i){let e=i.payload?{...i.payload}:{};e.activity&&(e.activity=void 0);let t={...i};return(i.eventType===U.INIT_SOLUTION||i.eventType===U.CHANGE_CONFIG)&&(t.config=this._config),{...t,appVersion:Ke,appName:je,sessionId:this._sessionId,component:this._solution,activity:this._activity,projectPubkey:this._config.pubkey,userAgent:navigator.userAgent,eventType:t.eventType??"",eventTimestamp:this._timestamp,payload:{location:this._location,...e}}}_excludedEvents(i){return!!(i&&[k.CHANGE,k.COMMON_UPLOAD_PROGRESS,k.FILE_ADDED,k.FILE_REMOVED,k.FILE_UPLOAD_START,k.FILE_UPLOAD_PROGRESS,k.FILE_UPLOAD_SUCCESS,k.FILE_UPLOAD_FAILED].includes(i))}sendEvent(i){let e=this._formattingPayload({eventType:i.eventType,payload:i.payload,config:i.config});this._init(i.eventType),!(this._excludedEvents(i.eventType)||this._lastPayload&&this._checkObj(this._lastPayload,e))&&this._queue.add(async()=>{this._lastPayload=e,await this._telemetryInstance.sendEvent(e)})}sendEventError(i,e="unknown"){this.sendEvent({eventType:U.ERROR_EVENT,payload:{metadata:{event:"error",text:`Error in ${e}`,error:i.message}}})}sendEventCloudImageEditor(i,e,t={}){this.sendEvent({eventType:U.ACTION_EVENT,payload:{metadata:{tabId:e,node:i.currentTarget?.tagName,event:i.type,...t}}})}_checkObj(i,e){if(JSON.stringify(i)===JSON.stringify(e))return!0;if(typeof i!="object"||typeof e!="object"||i==null||e==null)return!1;let t=Object.keys(i),r=Object.keys(e);if(t.length!==r.length)return!1;for(let o of t)if(!Object.hasOwn(e,o)||!this._checkObj(i[o],e[o]))return!1;return!0}get _timestamp(){return Date.now()}get _solution(){if(!this._block.has("*solution"))return null;let i=this._block.$["*solution"];return i?i.toLowerCase():null}get _activity(){return this._block.has("*currentActivity")?this._block.$["*currentActivity"]??null:null}get _location(){return location.origin}};var Q=n(s=>`*cfg/${s}`,"sharedConfigKey");var fn=n(s=>{let i=new Intl.Locale(s),e="ltr",t=i.getTextInfo?.().direction;return t?e=t:i.textInfo?.direction&&(e=i.textInfo.direction),e},"getLocaleDirection");var lr=n((s,i)=>new Intl.PluralRules(s).select(i),"getPluralForm");var Dc=n(s=>s,"DEFAULT_TRANSFORMER"),$s="{{",vn="}}",gn="plural:";function li(s,i={},e={}){let{openToken:t=$s,closeToken:r=vn,transform:o=Dc}=e;for(let a in i){let l=i[a],c=l?.toString(),d=typeof c=="string"?o(c):String(c);s=s.replaceAll(t+a+r,d)}return s}n(li,"applyTemplateData");function yn(s){let i=[],e=s.indexOf($s);for(;e!==-1;){let t=s.indexOf(vn,e);if(t===-1)break;let r=s.substring(e+2,t);if(r.startsWith(gn)){let o=s.substring(e+2,t).replace(gn,""),a=o.substring(0,o.indexOf("(")),l=o.substring(o.indexOf("(")+1,o.indexOf(")"));i.push({variable:r,pluralKey:a,countVariable:l})}e=s.indexOf($s,t)}return i}n(yn,"getPluralObjects");var bn="--uploadcare-blocks-window-height",ci=class s{static{n(this,"WindowHeightTracker")}static{this.clientsRegistry=new Set}static{this.flush=$(()=>{document.documentElement.style.setProperty(bn,`${window.innerHeight}px`)},100)}static registerClient(i){s.clientsRegistry.size===0&&s.attachTracker(),s.clientsRegistry.add(i)}static unregisterClient(i){s.clientsRegistry.delete(i),s.clientsRegistry.size===0&&s.detachTracker()}static attachTracker(){window.addEventListener("resize",s.flush,{passive:!0,capture:!0}),s.flush()}static detachTracker(){window.removeEventListener("resize",s.flush,{capture:!0}),document.documentElement.style.removeProperty(bn)}};var Vc=/\\([0-9a-fA-F]{1,6} ?)/g;function Fc(s){return s.length<2?!1:(s[0]==='"'||s[0]==="'")&&(s[s.length-1]==='"'||s[s.length-1]==="'")}n(Fc,"hasLeadingTrailingQuotes");function Nc(s){let i=s;return(i[0]==='"'||i[0]==="'")&&(i=i.slice(1)),(i[i.length-1]==='"'||i[i.length-1]==="'")&&(i=i.slice(0,-1)),i}n(Nc,"trimQuotes");function Bc(s){let i="",e="";for(let t=0;t<s.length;t++){let r=s[t+1];s[t]==="\\"&&r==='"'?(i+='\\"',t++):s[t]==='"'&&e!=="\\"?i+='\\"':i+=s[t],e=s[t]??""}return i}n(Bc,"escapeQuotes");function _n(s){let i=s;Fc(s)&&(i=Nc(i),i=i.replace(Vc,(e,t)=>String.fromCodePoint(parseInt(t.trim(),16))),i=i.replaceAll(`\\
|
|
29
29
|
`,"\\n"),i=Bc(i),i='"'+i+'"');try{return JSON.parse(i)}catch{return}}n(_n,"parseCssPropertyValue");function cr(s){class i extends s{constructor(){super(...arguments);this.cssDataCache=null;this.computedStyle=null}static{n(this,"CssDataMixinClass")}getCssData(r,o=!1){let a=this.cssDataCache??Object.create(null);if(!Object.keys(a).includes(r)||!a[r]){this.computedStyle||(this.computedStyle=window.getComputedStyle(this));let l=this.computedStyle.getPropertyValue(r).trim();try{a[r]=_n(l)}catch(c){o||console.warn(`CSS Data error: ${r}`,c),a[r]=null}}return this.cssDataCache=a,a[r]}}return i}n(cr,"CssDataMixin");function wn(s){class i extends s{constructor(){super(...arguments);this.__slots={};this.__willYield=!0;this.__initialLightDomChildren=null;this.__hasAdoptedChildren=!1}static{n(this,"LightDomMixinClass")}createRenderRoot(){return this}connectedCallback(){this.__initialLightDomChildren||(this.__initialLightDomChildren=Array.from(this.childNodes)),super.connectedCallback()}__adoptChildren(){if(this.__hasAdoptedChildren)return;this.__hasAdoptedChildren=!0,this.__slots={};let r=Array.from(this.childNodes),o=r.length?r:this.__initialLightDomChildren??[];for(let a of o){let l=this.__getSlotNameForChild(a),c=this.__slots[l]??[];a instanceof Element&&(a.removeAttribute("slot"),a.removeAttribute("content-for")),c.push(a),this.__slots[l]=c}this.__initialLightDomChildren=null}__getSlotNameForChild(r){return r instanceof Comment&&r.nextSibling instanceof Element?this.__getSlotNameForChild(r.nextSibling):"contentFor"in r?r.contentFor||"":r instanceof Element&&r.hasAttribute("content-for")&&r.getAttribute("content-for")||""}__isTextNodeEmpty(r){return!r.textContent||!r.textContent.trim()}__isSlotEmpty(r){let o=this.__slots[r];return!o||o.every(a=>a instanceof Comment||a instanceof Text&&this.__isTextNodeEmpty(a))}update(r){!this.hasUpdated&&this.__willYield&&this.__adoptChildren(),super.update(r)}yield(r,o){if(r===""&&!this.__slots[r]&&!this.__hasAdoptedChildren&&this.__initialLightDomChildren?.length){let l=[];for(let c of this.__initialLightDomChildren)c instanceof Element&&(c.removeAttribute("slot"),c.removeAttribute("content-for")),l.push(c);this.__slots[r]=l,this.__hasAdoptedChildren=!0,this.__initialLightDomChildren=null}let a=this.__slots[r];return y`
|
|
30
30
|
${a}
|
|
31
31
|
${this.__isSlotEmpty(r)?o:void 0}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PubSub } from '@symbiotejs/symbiote';
|
|
2
2
|
export { PubSub as Data, PubSub, UID } from '@symbiotejs/symbiote';
|
|
3
3
|
import * as lit_html from 'lit-html';
|
|
4
|
+
import * as lit_html_directives_ref_js from 'lit-html/directives/ref.js';
|
|
4
5
|
import { nothing, LitElement, PropertyValues, TemplateResult } from 'lit';
|
|
5
6
|
import { TelemetryRequest } from '@uploadcare/quality-insights';
|
|
6
7
|
import * as _uploadcare_upload_client from '@uploadcare/upload-client';
|
|
@@ -1359,7 +1360,7 @@ declare class LitBlock extends LitBlockBase {
|
|
|
1359
1360
|
declare class Modal extends LitBlock {
|
|
1360
1361
|
static styleAttrs: string[];
|
|
1361
1362
|
private _mouseDownTarget;
|
|
1362
|
-
|
|
1363
|
+
protected dialogEl: lit_html_directives_ref_js.Ref<HTMLDialogElement>;
|
|
1363
1364
|
handleModalOpen: ModalCb;
|
|
1364
1365
|
handleModalClose: ModalCb;
|
|
1365
1366
|
handleModalCloseAll: ModalCb;
|
package/web/file-uploader.min.js
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
*
|
|
25
25
|
*/
|
|
26
26
|
var yo=Object.defineProperty;var bo=Object.getOwnPropertyDescriptor;var Ln=Object.getOwnPropertyNames;var Rn=Object.prototype.hasOwnProperty;var vo=(o,i,e,t)=>{if(i&&typeof i=="object"||typeof i=="function")for(let r of Ln(i))!Rn.call(o,r)&&r!==e&&yo(o,r,{get:()=>i[r],enumerable:!(t=bo(i,r))||t.enumerable});return o},v=(o,i,e)=>(vo(o,i,"default"),e&&vo(e,i,"default"));var h=(o,i,e,t)=>{for(var r=t>1?void 0:t?bo(i,e):i,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(t?n(i,e,r):n(r))||r);return t&&r&&yo(i,e,r),r};var X={BIND_ATTR:"bind",ATTR_BIND_PX:"@",SHARED_CTX_PX:"*",PARENT_CTX_PX:"^",NAMED_CTX_SPLTR:"/",COMPUTED_PX:"+",CSS_DATA_PX:"--",CTX_NAME_ATTR:"ctx",CTX_OWNER_ATTR:"ctx-owner",CSS_CTX_PROP:"--ctx",EL_REF_ATTR:"ref",AUTO_TAG_PX:"sym",LIST_ATTR:"itemize",LIST_ITEM_TAG_ATTR:"item-tag",SET_LATER_KEY:"__toSetLater__",USE_TPL_ATTR:"use-template",DEFAULT_SLOT_KEY:"__default__",TEXT_NODE_SKIP_ATTR:"skip-text-nodes",TEXT_NODE_OPEN_TOKEN:"{{",TEXT_NODE_CLOSE_TOKEN:"}}"};function Pn(o){let i=e=>{for(let t in e)e[t]?.constructor===Object&&(e[t]=i(e[t]));return{...e}};return i(o)}var U=class o{#i;#r;#e;constructor(i){i.constructor===Object?this.store=Pn(i):(this.#e=!0,this.store=i),this.callbackMap=Object.create(null)}static#t(i,e){console.warn(`Symbiote PubSub: cannot ${i}. Prop name: `+e)}read(i){if(!this.#e&&!this.store.hasOwnProperty(i))return o.#t("read",i),null;if(typeof i=="string"&&i.startsWith(X.COMPUTED_PX)){let e=this.store[i];if(e?.constructor!==Function){o.#t("compute",i);return}this.__computedMap||(this.__computedMap={});let t=e();return Object.keys(this.__computedMap).includes(i)||(this.__computedMap[i]=t,this.notify(i)),t}else return this.store[i]}has(i){return this.#e?this.store[i]!==void 0:this.store.hasOwnProperty(i)}add(i,e,t=!1){!t&&Object.keys(this.store).includes(i)||(this.store[i]=e,this.notify(i))}pub(i,e){if(!this.#e&&!this.store.hasOwnProperty(i)){o.#t("publish",i);return}if(i?.startsWith(X.COMPUTED_PX)&&e.constructor!==Function){o.#t("publish computed",i);return}!(this.store[i]===null||e===null)&&typeof this.store[i]!=typeof e&&console.warn(`Symbiote PubSub: type warning for "${i}" [${typeof this.store[i]} -> ${typeof e}]`),this.store[i]=e,this.notify(i)}get proxy(){if(!this.#r){let i=Object.create(null);this.#r=new Proxy(i,{set:(e,t,r)=>(this.pub(t,r),!0),get:(e,t)=>{this.read(t)}})}return this.#r}multiPub(i){for(let e in i)this.pub(e,i[e])}static#o(i,e){this.globalStore.forEach(t=>{t.__computedMap&&Object.keys(t.__computedMap).forEach(r=>{if(t===i&&e===r)return;let s=`__${r}_timeout`;t[s]&&window.clearTimeout(t[s]),t[s]=window.setTimeout(()=>{let n=t.read(r);n!==t.__computedMap[r]&&(t.__computedMap[r]=n,t.notify(r))})})})}notify(i){let e=i?.startsWith(X.COMPUTED_PX);if(this.callbackMap[i]){let t=this.read(i);this.callbackMap[i].forEach(r=>{r(t)}),e&&(this.__computedMap[i]=t)}!e&&o.#o(this,i)}sub(i,e,t=!0){return!this.#e&&!this.store.hasOwnProperty(i)?(o.#t("subscribe",i),null):(this.callbackMap[i]||(this.callbackMap[i]=new Set),this.callbackMap[i].add(e),t&&e(this.read(i)),{remove:()=>{this.callbackMap[i].delete(e),this.callbackMap[i].size||delete this.callbackMap[i]},callback:e})}set uid(i){!this.#i&&(this.#i=i)}get uid(){return this.#i}static registerCtx(i,e=Symbol()){let t=o.globalStore.get(e);return t?console.warn('PubSub: context UID "'+e+'" is already in use'):(t=new o(i),t.uid=e,o.globalStore.set(e,t)),t}static deleteCtx(i){o.globalStore.delete(i)}static getCtx(i,e=!0){return o.globalStore.get(i)||(e&&console.warn('PubSub: wrong context UID - "'+i+'"'),null)}};U.globalStore=new Map;var _o="1234567890QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm",Un=_o.length-1,ge=class{static generate(i="XXXXXXXXX-XXX"){let e="";for(let t=0;t<i.length;t++)e+=i[t]==="-"?i[t]:_o.charAt(Math.random()*Un);return e}};var Zc=[X.LIST_ATTR,X.LIST_ITEM_TAG_ATTR,X.EL_REF_ATTR,X.USE_TPL_ATTR,X.CTX_NAME_ATTR,X.CTX_OWNER_ATTR];function ve(o,...i){let e="",t=new CSSStyleSheet;return o.forEach((r,s)=>{e+=r+i[s]}),ve.processors.forEach(r=>{e=r(e)}),ve.clearProcessors(),t.replaceSync(e),t}ve.processors=[];ve.clearProcessors=function(){ve.processors=[]};ve.useProcessor=function(...o){return ve.processors=[...ve.processors,...o],ve};function kt(o,i){for(let e in i)e.includes("-")?o.style.setProperty(e,i[e]):o.style[e]=i[e]}var Vn=["UploaderBlock","ActivityBlock","Block","SolutionBlock"];function tr(o){for(let i in o){if(Vn.includes(i))continue;let e=[...i].reduce((t,r)=>(r.toUpperCase()===r&&(r=`-${r.toLowerCase()}`),t+=r,t),"");e.startsWith("-")&&(e=e.replace("-","")),e.startsWith("uc-")||(e=`uc-${e}`),o[i].reg&&o[i].reg(e)}}var ir="UC";function Fn(o,i=!1){return new Promise((e,t)=>{if(typeof document!="object"){e(null);return}if(typeof window=="object"&&window[ir]){e(window[ir]);return}let r=document.createElement("script");r.async=!0,r.src=o,r.onerror=()=>{t()},r.onload=()=>{let s=window[ir];i&&tr(s),e(s)},document.head.appendChild(r)})}var Ot={"locale-id":"en","social-source-lang":"en","upload-file":"Upload file","upload-files":"Upload files","choose-file":"Choose file","choose-files":"Choose files","drop-files-here":"Drop files here","select-file-source":"Select file source",selected:"Selected",upload:"Upload","add-more":"Add more",cancel:"Cancel","start-from-cancel":"Cancel",clear:"Clear","camera-shot":"Shot","upload-url":"Import","upload-url-placeholder":"Paste link here","edit-image":"Edit image","edit-detail":"Details",back:"Back",done:"Done",ok:"Ok","remove-from-list":"Remove",no:"No",yes:"Yes","confirm-your-action":"Confirm your action","are-you-sure":"Are you sure?","selected-count":"{{count}} of {{total}} selected","select-all":"Select all","deselect-all":"Deselect all","upload-error":"Upload error","validation-error":"Validation error","no-files":"No files selected",browse:"Browse","not-uploaded-yet":"Not uploaded yet...",file__one:"file",file__other:"files",error__one:"error",error__other:"errors","header-uploading":"Uploading {{count}} {{plural:file(count)}}","header-failed":"{{count}} {{plural:error(count)}}","header-succeed":"{{count}} {{plural:file(count)}} uploaded","header-total":"{{count}} {{plural:file(count)}} selected","src-type-local":"From device","src-type-from-url":"From link","src-type-camera":"Camera","src-type-mobile-video-camera":"Video","src-type-mobile-photo-camera":"Photo","src-type-draw":"Draw","src-type-facebook":"Facebook","src-type-dropbox":"Dropbox","src-type-gdrive":"Google Drive","src-type-ngdrive":"Google Drive","src-type-gphotos":"Google Photos","src-type-flickr":"Flickr","src-type-vk":"VK","src-type-evernote":"Evernote","src-type-box":"Box","src-type-onedrive":"OneDrive","src-type-huddle":"Huddle","src-type-other":"Other","caption-from-url":"Import from link","caption-camera":"Camera","caption-draw":"Draw","caption-edit-file":"Edit file","file-no-name":"No name...","toggle-fullscreen":"Toggle fullscreen","toggle-guides":"Toggle guides",rotate:"Rotate","flip-vertical":"Flip vertical","flip-horizontal":"Flip horizontal",apply:"Apply",brightness:"Brightness",contrast:"Contrast",saturation:"Saturation",exposure:"Exposure",gamma:"Gamma",vibrance:"Vibrance",warmth:"Warmth",enhance:"Enhance",original:"Original",resize:"Resize image",crop:"Crop","select-color":"Select color",text:"Text",draw:"Draw","cancel-edit":"Cancel edit","tab-view":"Preview","tab-details":"Details","file-name":"Name","file-size":"Size","cdn-url":"CDN URL","file-size-unknown":"Unknown","camera-permissions-denied":"Camera access denied","camera-permissions-prompt":"Please allow access to the camera","camera-permissions-request":"Request access","files-count-limit-error-title":"Files count limit overflow","files-count-limit-error-too-few":"You\u2019ve chosen {{total}} {{plural:file(total)}}. At least {{min}} {{plural:file(min)}} required.","files-count-limit-error-too-many":"You\u2019ve chosen too many files. {{max}} {{plural:file(max)}} is maximum.","files-max-size-limit-error":"File is too big. Max file size is {{maxFileSize}}.","has-validation-errors":"File validation error occurred. Please, check your files before upload.","images-only-accepted":"Only image files are accepted.","file-type-not-allowed":"Uploading of these file types is not allowed.","some-files-were-not-uploaded":"Some files were not uploaded.","file-item-edit-button":"Edit","file-item-remove-button":"Remove","a11y-editor-tab-filters":"Filters","a11y-editor-tab-tuning":"Tuning","a11y-editor-tab-crop":"Crop","a11y-activity-header-button-close":"Close",flip:"Flip",mirror:"Mirror","a11y-cloud-editor-apply-filter":"Apply {{name}} filter","a11y-cloud-editor-apply-crop":"Apply {{name}} operation","a11y-cloud-editor-apply-tuning":"Apply {{name}} tuning","a11y-cloud-editor-apply-aspect-ratio":"Apply operation {{name}} {{value}}",finished:"Finished",failed:"Failed",uploading:"Uploading",idle:"Idle","a11y-file-item-status":"File {{fileName}} in status {{status}}","waiting-for":"Waiting for {{source}}","queued-uploading":"Queued for upload","queued-validation":"Queued for validation",validation:"Validating","crop-to-shape":"Crop to {{value}}",custom:"Freeform","freeform-crop":"Freeform crop"};var Zt=new Map,rr=new Map,Co=(o,i)=>{Zt.has(o)&&console.log(`Locale ${o} is already defined. Overwriting...`),Zt.set(o,{...Ot,...i})},Nn=(o,i)=>{rr.set(o,i)},To=(o,i)=>{typeof i=="function"?Nn(o,i):Co(o,i)},Eo=async o=>{if(!Zt.has(o)){if(!rr.has(o))throw new Error(`Locale ${o} is not defined`);let e=await rr.get(o)();Co(o,e)}return Zt.get(o)};To("en",Ot);var z=Object.freeze({ADD:"modal:add",DELETE:"modal:delete",OPEN:"modal:open",CLOSE:"modal:close",CLOSE_ALL:"modal:closeAll",DESTROY:"modal:destroy"}),Qt=class{constructor(i){this._modals=new Map;this._activeModals=new Set;this._subscribers=new Map;this._block=i}_debugPrint(...i){this._block.debugPrint("[modal-manager]",...i)}registerModal(i,e){this._modals.set(i,e),this._notify(z.ADD,{id:i,modal:e})}deleteModal(i){if(!this._modals.has(i))return!1;let e=this._modals.get(i);return this._modals.delete(i),this._activeModals.delete(i),this._notify(z.DELETE,{id:i,modal:e}),!0}open(i){if(!this._modals.has(i))return this._debugPrint(`Modal with ID "${i}" not found`),!1;let e=this._modals.get(i);return this._activeModals.add(i),this._notify(z.OPEN,{modal:e,id:i}),!0}close(i){if(!this._modals.has(i)||!this._activeModals.has(i))return this._debugPrint(`Modal with ID "${i}" not found or not active`),!1;let e=this._modals.get(i);return this._activeModals.delete(i),this._notify(z.CLOSE,{id:i,modal:e}),!0}toggle(i){return this._modals.has(i)?this._activeModals.has(i)?this.close(i):this.open(i):(this._debugPrint(`Modal with ID "${i}" not found`),!1)}get hasActiveModals(){return this._activeModals.size>0}back(){if(this._activeModals.size===0)return this._debugPrint("No active modals to go back from"),!1;let i=Array.from(this._activeModals).pop();return i?this.close(i):!1}closeAll(){let i=this._activeModals.size;return this._activeModals.clear(),this._notify(z.CLOSE_ALL,{}),i}subscribe(i,e){return this._subscribers.has(i)||this._subscribers.set(i,new Set),this._subscribers.get(i)?.add(e),()=>this.unsubscribe(i,e)}unsubscribe(i,e){this._subscribers.has(i)&&this._subscribers.get(i)?.delete(e)}_notify(i,e){if(this._subscribers.has(i))for(let t of this._subscribers.get(i)??new Set)try{t(e)}catch(r){this._block.telemetryManager.sendEventError(r,"modal subscriber"),this._debugPrint("Error in modal subscriber:",r)}}destroy(){this.closeAll(),this._modals.clear(),this._subscribers.clear(),this._notify(z.DESTROY,{})}};function xo(o){return Object.prototype.toString.call(o)==="[object Object]"}var Bn=/\W|_/g;function zn(o){return o.split(Bn).map((i,e)=>i.charAt(0)[e>0?"toUpperCase":"toLowerCase"]()+i.slice(1)).join("")}function So(o,{ignoreKeys:i}={ignoreKeys:[]}){return Array.isArray(o)?o.map(e=>Oe(e,{ignoreKeys:i})):o}function Oe(o,{ignoreKeys:i}={ignoreKeys:[]}){if(Array.isArray(o))return So(o,{ignoreKeys:i});if(!xo(o))return o;let e={};for(let t of Object.keys(o)){let r=o[t];if(i.includes(t)){e[t]=r;continue}xo(r)?r=Oe(r,{ignoreKeys:i}):Array.isArray(r)&&(r=So(r,{ignoreKeys:i})),e[zn(t)]=r}return e}var Hn=o=>new Promise(i=>setTimeout(i,o));function dr({libraryName:o,libraryVersion:i,userAgent:e,publicKey:t="",integration:r=""}){let s="JavaScript";if(typeof e=="string")return e;if(typeof e=="function")return e({publicKey:t,libraryName:o,libraryVersion:i,languageName:s,integration:r});let n=[o,i,t].filter(Boolean).join("/"),a=[s,r].filter(Boolean).join("; ");return`${n} (${a})`}var jn={factor:2,time:100};function Kn(o,i=jn){let e=0;function t(r){let s=Math.round(i.time*i.factor**e);return r({attempt:e,retry:a=>Hn(a??s).then(()=>(e+=1,t(r)))})}return t(o)}var Ye=class extends Error{},lt=class o extends Ye{originalProgressEvent;constructor(i){super(),this.name="NetworkError",this.message="Network error",Object.setPrototypeOf(this,o.prototype),this.originalProgressEvent=i}},Yt=(o,i)=>{o&&(o.aborted?Promise.resolve().then(i):o.addEventListener("abort",()=>i(),{once:!0}))},$e=class o extends Ye{isCancel=!0;constructor(i="Request canceled"){super(i),this.name="CancelError",Object.setPrototypeOf(this,o.prototype)}},Gn=500,Io=({check:o,interval:i=Gn,timeout:e,signal:t})=>new Promise((r,s)=>{let n,a;Yt(t,()=>{n&&clearTimeout(n),s(new $e("Poll cancelled"))}),e&&(a=setTimeout(()=>{n&&clearTimeout(n),s(new $e("Timed out"))},e));let l=()=>{try{Promise.resolve(o(t)).then(d=>{d?(a&&clearTimeout(a),r(d)):n=setTimeout(l,i)}).catch(d=>{a&&clearTimeout(a),s(d)})}catch(d){a&&clearTimeout(a),s(d)}};n=setTimeout(l,0)}),O={baseCDN:"https://ucarecdn.com",baseURL:"https://upload.uploadcare.com",maxContentLength:50*1024*1024,retryThrottledRequestMaxTimes:1,retryNetworkErrorMaxTimes:3,multipartMinFileSize:25*1024*1024,multipartChunkSize:5*1024*1024,multipartMinLastPartSize:1024*1024,maxConcurrentRequests:4,pollingTimeoutMilliseconds:1e4,pusherKey:"79ae88bd931ea68464d9"},Jt="application/octet-stream",ko="original",Ve=({method:o,url:i,data:e,headers:t={},signal:r,onProgress:s})=>new Promise((n,a)=>{let l=new XMLHttpRequest,d=o?.toUpperCase()||"GET",u=!1;l.open(d,i,!0),t&&Object.entries(t).forEach(p=>{let[f,g]=p;typeof g<"u"&&!Array.isArray(g)&&l.setRequestHeader(f,g)}),l.responseType="text",Yt(r,()=>{u=!0,l.abort(),a(new $e)}),l.onload=()=>{if(l.status!=200)a(new Error(`Error ${l.status}: ${l.statusText}`));else{let p={method:d,url:i,data:e,headers:t||void 0,signal:r,onProgress:s},f=l.getAllResponseHeaders().trim().split(/[\r\n]+/),g={};f.forEach(function(C){let E=C.split(": "),x=E.shift(),k=E.join(": ");x&&typeof x<"u"&&(g[x]=k)});let y=l.response,w=l.status;n({request:p,data:y,headers:g,status:w})}},l.onerror=p=>{u||a(new lt(p))},s&&typeof s=="function"&&(l.upload.onprogress=p=>{p.lengthComputable?s({isComputable:!0,value:p.loaded/p.total}):s({isComputable:!1})}),e?l.send(e):l.send()});function Wn(o,...i){return o}var qn=({name:o})=>o?[o]:[],Xn=Wn,Zn=()=>new FormData,Oo=o=>!1,ei=o=>typeof Blob<"u"&&o instanceof Blob,ti=o=>typeof File<"u"&&o instanceof File,ii=o=>!!o&&typeof o=="object"&&!Array.isArray(o)&&"uri"in o&&typeof o.uri=="string",ct=o=>ei(o)||ti(o)||Oo()||ii(o),Qn=o=>typeof o=="string"||typeof o=="number"||typeof o>"u",Yn=o=>!!o&&typeof o=="object"&&!Array.isArray(o),Jn=o=>!!o&&typeof o=="object"&&"data"in o&&ct(o.data);function Mo(o,i,e){if(Array.isArray(e))for(let t of e)Mo(o,`${i}[]`,t);else if(Jn(e)){let{name:t,contentType:r}=e,s=Xn(e.data,t,r??Jt),n=qn({name:t,contentType:r});o.push([i,s,...n])}else if(Yn(e))for(let[t,r]of Object.entries(e))typeof r<"u"&&o.push([`${i}[${t}]`,String(r)]);else Qn(e)&&e&&o.push([i,e.toString()])}function ea(o){let i=[];for(let[e,t]of Object.entries(o))Mo(i,e,t);return i}function ri(o){let i=Zn(),e=ea(o);for(let t of e){let[r,s,...n]=t;i.append(r,s,...n)}return i}var Q=class o extends Ye{code;request;response;headers;constructor(i,e,t,r,s){super(),this.name="UploadError",this.message=i,this.code=e,this.request=t,this.response=r,this.headers=s,Object.setPrototypeOf(this,o.prototype)}},ta=o=>{let i=new URLSearchParams;for(let[e,t]of Object.entries(o))t&&typeof t=="object"&&!Array.isArray(t)?Object.entries(t).filter(r=>r[1]??!1).forEach(r=>i.set(`${e}[${r[0]}]`,String(r[1]))):Array.isArray(t)?t.forEach(r=>{i.append(`${e}[]`,r)}):typeof t=="string"&&t?i.set(e,t):typeof t=="number"&&i.set(e,t.toString());return i.toString()},Ie=(o,i,e)=>{let t=new URL(o);return t.pathname=(t.pathname+i).replace("//","/"),e&&(t.search=ta(e)),t.toString()},ia="6.18.2",ra="UploadcareUploadClient",oa=ia;function Je(o){return dr({libraryName:ra,libraryVersion:oa,...o})}var sa="RequestThrottledError",Ao=15e3,na=1e3;function aa(o){let{headers:i}=o||{};if(!i||typeof i["retry-after"]!="string")return Ao;let e=parseInt(i["retry-after"],10);return Number.isFinite(e)?e*1e3:Ao}function Fe(o,i){let{retryThrottledRequestMaxTimes:e,retryNetworkErrorMaxTimes:t}=i;return Kn(({attempt:r,retry:s})=>o().catch(n=>{if("response"in n&&n?.code===sa&&r<e)return s(aa(n));if(n instanceof lt&&r<t)return s((r+1)*na);throw n}))}var Lo=o=>{let i="";return(ei(o)||ti(o)||ii(o))&&(i=o.type),i||Jt},Ro=o=>{let i="";return ti(o)&&o.name?i=o.name:ei(o)||Oo()?i="":ii(o)&&o.name&&(i=o.name),i||ko};function ur(o){return typeof o>"u"||o==="auto"?"auto":o?"1":"0"}function la(o,{publicKey:i,fileName:e,contentType:t,baseURL:r=O.baseURL,secureSignature:s,secureExpire:n,store:a,signal:l,onProgress:d,source:u="local",integration:p,userAgent:f,retryThrottledRequestMaxTimes:g=O.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:y=O.retryNetworkErrorMaxTimes,metadata:w}){return Fe(()=>Ve({method:"POST",url:Ie(r,"/base/",{jsonerrors:1}),headers:{"X-UC-User-Agent":Je({publicKey:i,integration:p,userAgent:f})},data:ri({file:{data:o,name:e||Ro(o),contentType:t||Lo(o)},UPLOADCARE_PUB_KEY:i,UPLOADCARE_STORE:ur(a),signature:s,expire:n,source:u,metadata:w}),signal:l,onProgress:d}).then(({data:C,headers:E,request:x})=>{let k=Oe(JSON.parse(C));if("error"in k)throw new Q(k.error.content,k.error.errorCode,x,k,E);return k}),{retryNetworkErrorMaxTimes:y,retryThrottledRequestMaxTimes:g})}var nr;(function(o){o.Token="token",o.FileInfo="file_info"})(nr||(nr={}));function ca(o,{publicKey:i,baseURL:e=O.baseURL,store:t,fileName:r,checkForUrlDuplicates:s,saveUrlForRecurrentUploads:n,secureSignature:a,secureExpire:l,source:d="url",signal:u,integration:p,userAgent:f,retryThrottledRequestMaxTimes:g=O.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:y=O.retryNetworkErrorMaxTimes,metadata:w}){return Fe(()=>Ve({method:"POST",headers:{"X-UC-User-Agent":Je({publicKey:i,integration:p,userAgent:f})},url:Ie(e,"/from_url/",{jsonerrors:1,pub_key:i,source_url:o,store:ur(t),filename:r,check_URL_duplicates:s?1:void 0,save_URL_duplicates:n?1:void 0,signature:a,expire:l,source:d,metadata:w}),signal:u}).then(({data:C,headers:E,request:x})=>{let k=Oe(JSON.parse(C));if("error"in k)throw new Q(k.error.content,k.error.errorCode,x,k,E);return k}),{retryNetworkErrorMaxTimes:y,retryThrottledRequestMaxTimes:g})}var re;(function(o){o.Unknown="unknown",o.Waiting="waiting",o.Progress="progress",o.Error="error",o.Success="success"})(re||(re={}));var da=o=>"status"in o&&o.status===re.Error;function ua(o,{publicKey:i,baseURL:e=O.baseURL,signal:t,integration:r,userAgent:s,retryThrottledRequestMaxTimes:n=O.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:a=O.retryNetworkErrorMaxTimes}={}){return Fe(()=>Ve({method:"GET",headers:i?{"X-UC-User-Agent":Je({publicKey:i,integration:r,userAgent:s})}:void 0,url:Ie(e,"/from_url/status/",{jsonerrors:1,token:o}),signal:t}).then(({data:l,headers:d,request:u})=>{let p=Oe(JSON.parse(l));if("error"in p&&!da(p))throw new Q(p.error.content,p.error.errorCode,u,p,d);return p}),{retryNetworkErrorMaxTimes:a,retryThrottledRequestMaxTimes:n})}function pa(o,{publicKey:i,baseURL:e=O.baseURL,jsonpCallback:t,secureSignature:r,secureExpire:s,signal:n,source:a,integration:l,userAgent:d,retryThrottledRequestMaxTimes:u=O.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:p=O.retryNetworkErrorMaxTimes}){return Fe(()=>Ve({method:"POST",headers:{"X-UC-User-Agent":Je({publicKey:i,integration:l,userAgent:d})},url:Ie(e,"/group/",{jsonerrors:1}),data:ri({files:o,callback:t,pub_key:i,signature:r,expire:s,source:a}),signal:n}).then(({data:f,headers:g,request:y})=>{let w=Oe(JSON.parse(f));if("error"in w)throw new Q(w.error.content,w.error.errorCode,y,w,g);return w}),{retryNetworkErrorMaxTimes:p,retryThrottledRequestMaxTimes:u})}function Po(o,{publicKey:i,baseURL:e=O.baseURL,signal:t,source:r,integration:s,userAgent:n,retryThrottledRequestMaxTimes:a=O.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:l=O.retryNetworkErrorMaxTimes}){return Fe(()=>Ve({method:"GET",headers:{"X-UC-User-Agent":Je({publicKey:i,integration:s,userAgent:n})},url:Ie(e,"/info/",{jsonerrors:1,pub_key:i,file_id:o,source:r}),signal:t}).then(({data:d,headers:u,request:p})=>{let f=Oe(JSON.parse(d));if("error"in f)throw new Q(f.error.content,f.error.errorCode,p,f,u);return f}),{retryThrottledRequestMaxTimes:a,retryNetworkErrorMaxTimes:l})}function ha(o,{publicKey:i,contentType:e,fileName:t,multipartChunkSize:r=O.multipartChunkSize,baseURL:s="",secureSignature:n,secureExpire:a,store:l,signal:d,source:u="local",integration:p,userAgent:f,retryThrottledRequestMaxTimes:g=O.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:y=O.retryNetworkErrorMaxTimes,metadata:w}){return Fe(()=>Ve({method:"POST",url:Ie(s,"/multipart/start/",{jsonerrors:1}),headers:{"X-UC-User-Agent":Je({publicKey:i,integration:p,userAgent:f})},data:ri({filename:t||ko,size:o,content_type:e||Jt,part_size:r,UPLOADCARE_STORE:ur(l),UPLOADCARE_PUB_KEY:i,signature:n,expire:a,source:u,metadata:w}),signal:d}).then(({data:C,headers:E,request:x})=>{let k=Oe(JSON.parse(C));if("error"in k)throw new Q(k.error.content,k.error.errorCode,x,k,E);return k.parts=Object.keys(k.parts).map(ue=>k.parts[Number(ue)]),k}),{retryThrottledRequestMaxTimes:g,retryNetworkErrorMaxTimes:y})}function ma(o,i,{contentType:e,signal:t,onProgress:r,retryThrottledRequestMaxTimes:s=O.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:n=O.retryNetworkErrorMaxTimes}){return Fe(()=>Ve({method:"PUT",url:i,data:o,onProgress:r,signal:t,headers:{"Content-Type":e||Jt}}).then(a=>(r&&r({isComputable:!0,value:1}),a)).then(({status:a})=>({code:a})),{retryThrottledRequestMaxTimes:s,retryNetworkErrorMaxTimes:n})}function fa(o,{publicKey:i,baseURL:e=O.baseURL,source:t="local",signal:r,integration:s,userAgent:n,retryThrottledRequestMaxTimes:a=O.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:l=O.retryNetworkErrorMaxTimes}){return Fe(()=>Ve({method:"POST",url:Ie(e,"/multipart/complete/",{jsonerrors:1}),headers:{"X-UC-User-Agent":Je({publicKey:i,integration:s,userAgent:n})},data:ri({uuid:o,UPLOADCARE_PUB_KEY:i,source:t}),signal:r}).then(({data:d,headers:u,request:p})=>{let f=Oe(JSON.parse(d));if("error"in f)throw new Q(f.error.content,f.error.errorCode,p,f,u);return f}),{retryThrottledRequestMaxTimes:a,retryNetworkErrorMaxTimes:l})}function pr(o,{publicKey:i,baseURL:e,source:t,integration:r,userAgent:s,retryThrottledRequestMaxTimes:n,retryNetworkErrorMaxTimes:a,signal:l,onProgress:d}){return Io({check:u=>Po(o,{publicKey:i,baseURL:e,signal:u,source:t,integration:r,userAgent:s,retryThrottledRequestMaxTimes:n,retryNetworkErrorMaxTimes:a}).then(p=>p.isReady?p:(d&&d({isComputable:!0,value:1}),!1)),signal:l})}function ga(o){return"defaultEffects"in o}var ke=class{uuid;name;size;isStored;isImage;mimeType;cdnUrl;s3Url;originalFilename;imageInfo;videoInfo;contentInfo;metadata;s3Bucket;defaultEffects=null;constructor(i,{baseCDN:e=O.baseCDN,fileName:t}={}){let{uuid:r,s3Bucket:s}=i,n=Ie(e,`${r}/`),a=s?Ie(`https://${s}.s3.amazonaws.com/`,`${r}/${i.filename}`):null;this.uuid=r,this.name=t||i.filename,this.size=i.size,this.isStored=i.isStored,this.isImage=i.isImage,this.mimeType=i.mimeType,this.cdnUrl=n,this.originalFilename=i.originalFilename,this.imageInfo=i.imageInfo,this.videoInfo=i.videoInfo,this.contentInfo=i.contentInfo,this.metadata=i.metadata||null,this.s3Bucket=s||null,this.s3Url=a,ga(i)&&(this.defaultEffects=i.defaultEffects)}},va=(o,{publicKey:i,fileName:e,baseURL:t,secureSignature:r,secureExpire:s,store:n,contentType:a,signal:l,onProgress:d,source:u,integration:p,userAgent:f,retryThrottledRequestMaxTimes:g,retryNetworkErrorMaxTimes:y,baseCDN:w,metadata:C})=>la(o,{publicKey:i,fileName:e,contentType:a,baseURL:t,secureSignature:r,secureExpire:s,store:n,signal:l,onProgress:d,source:u,integration:p,userAgent:f,retryThrottledRequestMaxTimes:g,retryNetworkErrorMaxTimes:y,metadata:C}).then(({file:E})=>pr(E,{publicKey:i,baseURL:t,source:u,integration:p,userAgent:f,retryThrottledRequestMaxTimes:g,retryNetworkErrorMaxTimes:y,onProgress:d,signal:l})).then(E=>new ke(E,{baseCDN:w})),ya=(o,{publicKey:i,fileName:e,baseURL:t,signal:r,onProgress:s,source:n,integration:a,userAgent:l,retryThrottledRequestMaxTimes:d,retryNetworkErrorMaxTimes:u,baseCDN:p})=>Po(o,{publicKey:i,baseURL:t,signal:r,source:n,integration:a,userAgent:l,retryThrottledRequestMaxTimes:d,retryNetworkErrorMaxTimes:u}).then(f=>new ke(f,{baseCDN:p,fileName:e})).then(f=>(s&&s({isComputable:!0,value:1}),f)),ba=(o,{signal:i}={})=>{let e=null,t=null,r=o.map(()=>new AbortController),s=n=>()=>{t=n,r.forEach((a,l)=>l!==n&&a.abort())};return Yt(i,()=>{r.forEach(n=>n.abort())}),Promise.all(o.map((n,a)=>{let l=s(a);return Promise.resolve().then(()=>n({stopRace:l,signal:r[a].signal})).then(d=>(l(),d)).catch(d=>(e=d,null))})).then(n=>{if(t===null)throw e;return n[t]})},_a=window.WebSocket,ar=class{events=Object.create({});emit(i,e){this.events[i]?.forEach(t=>t(e))}on(i,e){this.events[i]=this.events[i]||[],this.events[i].push(e)}off(i,e){e?this.events[i]=this.events[i].filter(t=>t!==e):this.events[i]=[]}},wa=(o,i)=>o==="success"?{status:re.Success,...i}:o==="progress"?{status:re.Progress,...i}:{status:re.Error,...i},lr=class{key;disconnectTime;ws=void 0;queue=[];isConnected=!1;subscribers=0;emmitter=new ar;disconnectTimeoutId=null;constructor(i,e=3e4){this.key=i,this.disconnectTime=e}connect(){if(this.disconnectTimeoutId&&clearTimeout(this.disconnectTimeoutId),!this.isConnected&&!this.ws){let i=`wss://ws.pusherapp.com/app/${this.key}?protocol=5&client=js&version=1.12.2`;this.ws=new _a(i),this.ws.addEventListener("error",e=>{this.emmitter.emit("error",new Error(e.message))}),this.emmitter.on("connected",()=>{this.isConnected=!0,this.queue.forEach(e=>this.send(e.event,e.data)),this.queue=[]}),this.ws.addEventListener("message",e=>{let t=JSON.parse(e.data.toString());switch(t.event){case"pusher:connection_established":{this.emmitter.emit("connected",void 0);break}case"pusher:ping":{this.send("pusher:pong",{});break}case"progress":case"success":case"fail":this.emmitter.emit(t.channel,wa(t.event,JSON.parse(t.data)))}})}}disconnect(){let i=()=>{this.ws?.close(),this.ws=void 0,this.isConnected=!1};this.disconnectTime?this.disconnectTimeoutId=setTimeout(()=>{i()},this.disconnectTime):i()}send(i,e){let t=JSON.stringify({event:i,data:e});this.ws?.send(t)}subscribe(i,e){this.subscribers+=1,this.connect();let t=`task-status-${i}`,r={event:"pusher:subscribe",data:{channel:t}};this.emmitter.on(t,e),this.isConnected?this.send(r.event,r.data):this.queue.push(r)}unsubscribe(i){this.subscribers-=1;let e=`task-status-${i}`,t={event:"pusher:unsubscribe",data:{channel:e}};this.emmitter.off(e),this.isConnected?this.send(t.event,t.data):this.queue=this.queue.filter(r=>r.data.channel!==e),this.subscribers===0&&this.disconnect()}onError(i){return this.emmitter.on("error",i),()=>this.emmitter.off("error",i)}},or=null,hr=o=>{if(!or){let i=typeof window>"u"?0:3e4;or=new lr(o,i)}return or},Ca=o=>{hr(o).connect()};function Ta({token:o,publicKey:i,baseURL:e,integration:t,userAgent:r,retryThrottledRequestMaxTimes:s,retryNetworkErrorMaxTimes:n,onProgress:a,signal:l}){return Io({check:d=>ua(o,{publicKey:i,baseURL:e,integration:t,userAgent:r,retryThrottledRequestMaxTimes:s,retryNetworkErrorMaxTimes:n,signal:d}).then(u=>{switch(u.status){case re.Error:return new Q(u.error,u.errorCode);case re.Waiting:return!1;case re.Unknown:return new Q(`Token "${o}" was not found.`);case re.Progress:return a&&(u.total==="unknown"?a({isComputable:!1}):a({isComputable:!0,value:u.done/u.total})),!1;case re.Success:return a&&a({isComputable:!0,value:u.done/u.total}),u;default:throw new Error("Unknown status")}}),signal:l})}var Ea=({token:o,pusherKey:i,signal:e,onProgress:t})=>new Promise((r,s)=>{let n=hr(i),a=n.onError(s),l=()=>{a(),n.unsubscribe(o)};Yt(e,()=>{l(),s(new $e("pusher cancelled"))}),n.subscribe(o,d=>{switch(d.status){case re.Progress:{t&&(d.total==="unknown"?t({isComputable:!1}):t({isComputable:!0,value:d.done/d.total}));break}case re.Success:{l(),t&&t({isComputable:!0,value:d.done/d.total}),r(d);break}case re.Error:l(),s(new Q(d.msg,d.error_code))}})}),xa=(o,{publicKey:i,fileName:e,baseURL:t,baseCDN:r,checkForUrlDuplicates:s,saveUrlForRecurrentUploads:n,secureSignature:a,secureExpire:l,store:d,signal:u,onProgress:p,source:f,integration:g,userAgent:y,retryThrottledRequestMaxTimes:w,pusherKey:C=O.pusherKey,metadata:E})=>Promise.resolve(Ca(C)).then(()=>ca(o,{publicKey:i,fileName:e,baseURL:t,checkForUrlDuplicates:s,saveUrlForRecurrentUploads:n,secureSignature:a,secureExpire:l,store:d,signal:u,source:f,integration:g,userAgent:y,retryThrottledRequestMaxTimes:w,metadata:E})).catch(x=>(hr(C)?.disconnect(),Promise.reject(x))).then(x=>x.type===nr.FileInfo?x:ba([({signal:k})=>Ta({token:x.token,publicKey:i,baseURL:t,integration:g,userAgent:y,retryThrottledRequestMaxTimes:w,onProgress:p,signal:k}),({signal:k})=>Ea({token:x.token,pusherKey:C,signal:k,onProgress:p})],{signal:u})).then(x=>{if(x instanceof Q)throw x;return x}).then(x=>pr(x.uuid,{publicKey:i,baseURL:t,integration:g,userAgent:y,retryThrottledRequestMaxTimes:w,onProgress:p,signal:u})).then(x=>new ke(x,{baseCDN:r})),sr=new WeakMap,Sa=async o=>{if(sr.has(o))return sr.get(o);let i=await fetch(o.uri).then(e=>e.blob());return sr.set(o,i),i},Uo=async o=>{if(ti(o)||ei(o))return o.size;if(ii(o))return(await Sa(o)).size;throw new Error("Unknown file type. Cannot determine file size.")},Aa=(o,i=O.multipartMinFileSize)=>o>=i,$o=o=>{let i="[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}",e=new RegExp(i);return!ct(o)&&e.test(o)},mr=o=>{let i="^(?:\\w+:)?\\/\\/([^\\s\\.]+\\.\\S{2}|localhost[\\:?\\d]*)\\S*$",e=new RegExp(i);return!ct(o)&&e.test(o)},Ia=(o,i)=>new Promise((e,t)=>{let r=[],s=!1,n=i.length,a=[...i],l=()=>{let d=i.length-a.length,u=a.shift();u&&u().then(p=>{s||(r[d]=p,n-=1,n?l():e(r))}).catch(p=>{s=!0,t(p)})};for(let d=0;d<o;d++)l()}),ka=(o,i,e,t)=>{let r=t*i,s=Math.min(r+t,e);return o.slice(r,s)},Oa=async(o,i,e)=>t=>ka(o,t,i,e),Ma=(o,i,{publicKey:e,contentType:t,onProgress:r,signal:s,integration:n,retryThrottledRequestMaxTimes:a,retryNetworkErrorMaxTimes:l})=>ma(o,i,{publicKey:e,contentType:t,onProgress:r,signal:s,integration:n,retryThrottledRequestMaxTimes:a,retryNetworkErrorMaxTimes:l}),La=async(o,{publicKey:i,fileName:e,fileSize:t,baseURL:r,secureSignature:s,secureExpire:n,store:a,signal:l,onProgress:d,source:u,integration:p,userAgent:f,retryThrottledRequestMaxTimes:g,retryNetworkErrorMaxTimes:y,contentType:w,multipartChunkSize:C=O.multipartChunkSize,maxConcurrentRequests:E=O.maxConcurrentRequests,baseCDN:x,metadata:k})=>{let ue=t??await Uo(o),pe,Qe=(W,ie)=>{if(!d)return;pe||(pe=Array(W).fill(0));let fe=we=>we.reduce((Ae,er)=>Ae+er,0);return we=>{we.isComputable&&(pe[ie]=we.value,d({isComputable:!0,value:fe(pe)/W}))}};return w||=Lo(o),ha(ue,{publicKey:i,contentType:w,fileName:e||Ro(o),baseURL:r,secureSignature:s,secureExpire:n,store:a,signal:l,source:u,integration:p,userAgent:f,retryThrottledRequestMaxTimes:g,retryNetworkErrorMaxTimes:y,metadata:k,multipartChunkSize:C}).then(async({uuid:W,parts:ie})=>{let fe=await Oa(o,ue,C);return Promise.all([W,Ia(E,ie.map((we,Ae)=>()=>Ma(fe(Ae),we,{publicKey:i,contentType:w,onProgress:Qe(ie.length,Ae),signal:l,integration:p,retryThrottledRequestMaxTimes:g,retryNetworkErrorMaxTimes:y})))])}).then(([W])=>fa(W,{publicKey:i,baseURL:r,source:u,integration:p,userAgent:f,retryThrottledRequestMaxTimes:g,retryNetworkErrorMaxTimes:y})).then(W=>W.isReady?W:pr(W.uuid,{publicKey:i,baseURL:r,source:u,integration:p,userAgent:f,retryThrottledRequestMaxTimes:g,retryNetworkErrorMaxTimes:y,onProgress:d,signal:l})).then(W=>new ke(W,{baseCDN:x}))};async function fr(o,{publicKey:i,fileName:e,baseURL:t=O.baseURL,secureSignature:r,secureExpire:s,store:n,signal:a,onProgress:l,source:d,integration:u,userAgent:p,retryThrottledRequestMaxTimes:f,retryNetworkErrorMaxTimes:g,contentType:y,multipartMinFileSize:w,multipartChunkSize:C,maxConcurrentRequests:E,baseCDN:x=O.baseCDN,checkForUrlDuplicates:k,saveUrlForRecurrentUploads:ue,pusherKey:pe,metadata:Qe}){if(ct(o)){let W=await Uo(o);return Aa(W,w)?La(o,{publicKey:i,contentType:y,multipartChunkSize:C,fileSize:W,fileName:e,baseURL:t,secureSignature:r,secureExpire:s,store:n,signal:a,onProgress:l,source:d,integration:u,userAgent:p,maxConcurrentRequests:E,retryThrottledRequestMaxTimes:f,retryNetworkErrorMaxTimes:g,baseCDN:x,metadata:Qe}):va(o,{publicKey:i,fileName:e,contentType:y,baseURL:t,secureSignature:r,secureExpire:s,store:n,signal:a,onProgress:l,source:d,integration:u,userAgent:p,retryThrottledRequestMaxTimes:f,retryNetworkErrorMaxTimes:g,baseCDN:x,metadata:Qe})}if(mr(o))return xa(o,{publicKey:i,fileName:e,baseURL:t,baseCDN:x,checkForUrlDuplicates:k,saveUrlForRecurrentUploads:ue,secureSignature:r,secureExpire:s,store:n,signal:a,onProgress:l,source:d,integration:u,userAgent:p,retryThrottledRequestMaxTimes:f,retryNetworkErrorMaxTimes:g,pusherKey:pe,metadata:Qe});if($o(o))return ya(o,{publicKey:i,fileName:e,baseURL:t,signal:a,onProgress:l,source:d,integration:u,userAgent:p,retryThrottledRequestMaxTimes:f,retryNetworkErrorMaxTimes:g,baseCDN:x});throw new TypeError(`File uploading from "${o}" is not supported`)}var cr=class{uuid;filesCount;totalSize;isStored;isImage;cdnUrl;files;createdAt;storedAt=null;constructor(i,{baseCDN:e=O.baseCDN}={}){this.uuid=i.id,this.filesCount=i.filesCount;let t=i.files.filter(Boolean);this.totalSize=Object.values(t).reduce((r,s)=>r+s.size,0),this.isStored=!!i.datetimeStored,this.isImage=!!Object.values(t).filter(r=>r.isImage).length,this.cdnUrl=i.cdnUrl,this.files=t.map(r=>new ke(r,{baseCDN:e})),this.createdAt=i.datetimeCreated,this.storedAt=i.datetimeStored}},Ra=o=>{for(let i of o)if(!ct(i))return!1;return!0},Pa=o=>{for(let i of o)if(!$o(i))return!1;return!0},Ua=o=>{for(let i of o)if(!mr(i))return!1;return!0};function Do(o,{publicKey:i,fileName:e,baseURL:t=O.baseURL,secureSignature:r,secureExpire:s,store:n,signal:a,onProgress:l,source:d,integration:u,userAgent:p,retryThrottledRequestMaxTimes:f,retryNetworkErrorMaxTimes:g,contentType:y,multipartChunkSize:w=O.multipartChunkSize,baseCDN:C=O.baseCDN,checkForUrlDuplicates:E,saveUrlForRecurrentUploads:x,jsonpCallback:k}){if(!Ra(o)&&!Ua(o)&&!Pa(o))throw new TypeError(`Group uploading from "${o}" is not supported`);let ue,pe=!0,Qe=o.length,W=(ie,fe)=>{if(!l)return;ue||(ue=Array(ie).fill(0));let we=Ae=>Ae.reduce((er,Mn)=>er+Mn)/ie;return Ae=>{if(!Ae.isComputable||!pe){pe=!1,l({isComputable:!1});return}ue[fe]=Ae.value,l({isComputable:!0,value:we(ue)})}};return Promise.all(o.map((ie,fe)=>ct(ie)||mr(ie)?fr(ie,{publicKey:i,fileName:e,baseURL:t,secureSignature:r,secureExpire:s,store:n,signal:a,onProgress:W(Qe,fe),source:d,integration:u,userAgent:p,retryThrottledRequestMaxTimes:f,retryNetworkErrorMaxTimes:g,contentType:y,multipartChunkSize:w,baseCDN:C,checkForUrlDuplicates:E,saveUrlForRecurrentUploads:x}).then(we=>we.uuid):ie)).then(ie=>pa(ie,{publicKey:i,baseURL:t,jsonpCallback:k,secureSignature:r,secureExpire:s,signal:a,source:d,integration:u,userAgent:p,retryThrottledRequestMaxTimes:f,retryNetworkErrorMaxTimes:g}).then(fe=>new cr(fe,{baseCDN:C})).then(fe=>(l&&l({isComputable:!0,value:1}),fe)))}var De=class{_concurrency=1;_pending=[];_running=0;_resolvers=new Map;_rejectors=new Map;constructor(i){this._concurrency=i}run(){let i=this._concurrency-this._running;for(let e=0;e<i;e++){let t=this._pending.shift();if(!t)return;let r=this._resolvers.get(t),s=this._rejectors.get(t);if(!r||!s)throw new Error("Unexpected behavior: resolver or rejector is undefined");this._running+=1,t().finally(()=>{this._resolvers.delete(t),this._rejectors.delete(t),this._running-=1,this.run()}).then(n=>r(n)).catch(n=>s(n))}}add(i,{autoRun:e}={autoRun:!0}){return new Promise((t,r)=>{this._resolvers.set(i,t),this._rejectors.set(i,r),this._pending.push(i),e&&this.run()})}get pending(){return this._pending.length}get running(){return this._running}set concurrency(i){this._concurrency=i,this.run()}get concurrency(){return this._concurrency}};var gr=()=>({}),vr=o=>({...gr(),"*currentActivity":null,"*currentActivityParams":{},"*history":[],"*historyBack":null,"*closeModal":()=>{o.modalManager?.close(o.$["*currentActivity"]),o.set$({"*currentActivity":null})}}),yr=o=>({...vr(o),"*commonProgress":0,"*uploadList":[],"*uploadQueue":new De(1),"*collectionErrors":[],"*collectionState":null,"*groupInfo":null,"*uploadTrigger":new Set,"*secureUploadsManager":null}),Vo=o=>({...yr(o),"*solution":null});var P=Object.freeze({INIT_SOLUTION:"init-solution",CHANGE_CONFIG:"change-config",ACTION_EVENT:"action-event",ERROR_EVENT:"error-event"}),I=Object.freeze({FILE_ADDED:"file-added",FILE_REMOVED:"file-removed",FILE_UPLOAD_START:"file-upload-start",FILE_UPLOAD_PROGRESS:"file-upload-progress",FILE_UPLOAD_SUCCESS:"file-upload-success",FILE_UPLOAD_FAILED:"file-upload-failed",FILE_URL_CHANGED:"file-url-changed",MODAL_OPEN:"modal-open",MODAL_CLOSE:"modal-close",DONE_CLICK:"done-click",UPLOAD_CLICK:"upload-click",ACTIVITY_CHANGE:"activity-change",COMMON_UPLOAD_START:"common-upload-start",COMMON_UPLOAD_PROGRESS:"common-upload-progress",COMMON_UPLOAD_SUCCESS:"common-upload-success",COMMON_UPLOAD_FAILED:"common-upload-failed",CHANGE:"change",GROUP_CREATED:"group-created"}),oi=class{constructor(i){this._timeoutStore=new Map;this._targets=new Set;this._debugPrint=null;this._debugPrint=i}bindTarget(i){this._targets.add(i)}unbindTarget(i){this._targets.delete(i)}_dispatch(i,e){for(let t of this._targets)t.dispatchEvent(new CustomEvent(i,{detail:e}));this._debugPrint?.(()=>{let t=e&&typeof e=="object"?{...e}:e;return[`event "${i}"`,t]})}emit(i,e,t={}){let{debounce:r}=t;if(typeof r!="number"&&!r){this._dispatch(i,typeof e=="function"?e():e);return}this._timeoutStore.has(i)&&window.clearTimeout(this._timeoutStore.get(i));let s=typeof r=="number"?r:20,n=window.setTimeout(()=>{this._dispatch(i,typeof e=="function"?e():e),this._timeoutStore.delete(i)},s);this._timeoutStore.set(i,n)}};function L(o,i){let e,t=((...r)=>{e&&clearTimeout(e),e=setTimeout(()=>o(...r),i)});return t.cancel=()=>{e&&clearTimeout(e)},t}var m={};v(m,Yd);v(m,Jd);import"@lit/reactive-element";import"lit-html";import*as Yd from"lit-element/lit-element.js";import*as Jd from"lit-html/is-server.js";var $a={button:["toolbar"],checkbox:["toolbar"],menuitem:["menu","menubar"],option:["listbox"],tab:["tablist"]};function Mt(o,i){i.tabIndex=0,i.focus(),o.tabIndex=-1}function br(o){let i=o.role||o.type||o.tagName;if(!i)return null;let e=$a[i.toLowerCase()];if(!e)return null;for(let t of e){let r=o.closest(`[role=${t}]`);if(r)return r}}function _r(o,i){return i.role==="toolbar"?Da(i):i.querySelectorAll(`[role=${o.role}]`)}function Da(o){return[...o.querySelectorAll("*")].filter(e=>e.role==="button"||e.type==="button"||e.role==="checkbox"||e.type==="checkbox")}function Va(o){let i=o.getAttribute("aria-orientation");if(i==="vertical")return!1;if(i==="horizontal")return!0;let e=o.role;return e==="menubar"||e==="tablist"||e==="toolbar"}function Fo(o){return i=>{let e=!1,t=o?.searchDelayMs||300,r=0,s="";function n(p){let f=br(p.target);if(!f){a();return}let g=_r(p.target,f),y=Array.from(g).indexOf(p.target),w="ArrowDown",C="ArrowUp";if(Va(f)&&(i.document.dir==="rtl"?(w="ArrowLeft",C="ArrowRight"):(w="ArrowRight",C="ArrowLeft")),p.key===w)p.preventDefault(),Mt(p.target,g[y+1]||g[0]);else if(p.key===C)p.preventDefault(),Mt(p.target,g[y-1]||g[g.length-1]);else if(p.key==="Home")p.preventDefault(),Mt(p.target,g[0]);else if(p.key==="End")p.preventDefault(),Mt(p.target,g[g.length-1]);else if(p.key.length===1&&f.role!=="tablist"){let E=Date.now();E-r<=t?s+=p.key.toLowerCase():s=p.key.toLowerCase(),r=E;let x=Array.from(g).find(k=>k.textContent?.trim()?.toLowerCase()?.startsWith(s));x&&(p.preventDefault(),Mt(p.target,x))}}function a(){e=!1,i.removeEventListener("keydown",n)}function l(p){let f=br(p.target);if(f){e||(e=!0,i.addEventListener("keydown",n));let g=_r(p.target,f);for(let y of g)y!==p.target&&y.setAttribute("tabindex",-1)}else e&&a()}function d(p){(!p.relatedTarget||p.relatedTarget===i.document)&&a()}function u(p){let f=br(p.target);if(f){let g=_r(p.target,f);for(let y of g)y!==p.target&&y.setAttribute("tabindex",-1);p.target.setAttribute("tabindex",0)}}return i.addEventListener("click",u),i.addEventListener("focusin",l),i.addEventListener("focusout",d),()=>{a(),i.removeEventListener("click",u),i.removeEventListener("focusin",l),i.removeEventListener("focusout",d)}}}function No(){return o=>{let i,e;function t(s){if(s.target.getAttribute("aria-hidden")==="true"){i=s.target,i.setAttribute("aria-hidden","false"),e=i.hidden,e&&(i.hidden=!1);let n=s.target.querySelector('a, button, select, textarea, input:not([type=radio]), [type=radio]:checked, [tabindex]:not([tabindex="-1"])');n&&(n.tabIndex=0)}}function r(s){i&&i.contains(s.target)&&(!s.relatedTarget||!i.contains(s.relatedTarget))&&(s.target.tabIndex=-1,i.setAttribute("aria-hidden","true"),e&&(i.hidden=!0),i=null)}return o.addEventListener("keyuxJump",t),o.addEventListener("focusout",r),()=>{o.removeEventListener("keyuxJump",t),o.removeEventListener("focusout",r)}}}function Bo(){return o=>{let i=[];function e(l){let d=o.document.activeElement;d&&d!==o.document.body&&i.push(new WeakRef(d)),l.focus({focusVisible:!0})}function t(){let l=i.pop();if(!l){o.document.activeElement.blur();return}let d=l.deref();d&&d.isConnected?d.focus():t()}let r=0,s;function n(l){clearInterval(s);let d=l.getAttribute("aria-controls");s=setInterval(()=>{if(r++>50){clearInterval(s);return}let u=o.document.getElementById(d);if(u){let p=u.querySelector('a, button, select, textarea, input:not([type=radio]), [type=radio]:checked, [tabindex]:not([tabindex="-1"])');p&&(clearInterval(s),u.dispatchEvent(new o.CustomEvent("keyuxJump",{bubbles:!0})),e(p))}},50)}function a(l){l.target.getAttribute("aria-controls")&&l.key==="Enter"&&n(l.target),l.key==="Escape"&&t()}return o.addEventListener("keydown",a),()=>{o.removeEventListener("keydown",a)}}}function zo(o){let i,e=o.split(" "),t;function r(a){a.key==="Enter"&&(a.target.tagName==="BUTTON"||a.target.tagName==="A")&&(s(),a.target.classList.add(...e),i=a.target,t=a.target)}function s(){i&&i.classList.remove(...e),t=null}function n(a){a.clientX===0&&a.clientY===0&&t!==a.target&&(s(),a.target.classList.add(...e),i=a.target)}return a=>(a.addEventListener("click",n),a.addEventListener("keydown",r),a.addEventListener("keyup",s),()=>{a.removeEventListener("click",n),a.removeEventListener("keydown",r),a.removeEventListener("keyup",s)})}function Ho(o,i){let e=i.map(t=>t(o));return()=>{e.forEach(t=>t())}}var wr=class{constructor(){this._listeners=new Map;this._scope=[]}addEventListener(i,e){let t=r=>{let s=r.target;s instanceof Node&&this._scope.some(n=>n===s||n.contains(s))&&e(r)};this._listeners.set(e,t),window.addEventListener(i,t)}removeEventListener(i,e){let t=this._listeners.get(e);t&&window.removeEventListener(i,t),this._listeners.delete(e)}get CustomEvent(){return window.CustomEvent}get document(){return window.document}get navigator(){return window.navigator}registerScope(i){this._scope.push(i)}destroy(){this._scope=[];for(let i of this._listeners.values())window.removeEventListener("keydown",i),window.removeEventListener("keyup",i);this._listeners.clear()}},si=class{constructor(){this._scopedWindow=new wr,this._destroyKeyUX=Ho(this._scopedWindow,[Fo(),zo("is-pressed"),Bo(),No()])}registerBlock(i){this._scopedWindow.registerScope(i)}destroy(){this._destroyKeyUX?.(),this._scopedWindow.destroy()}};var Ne=o=>`*l10n/${o}`,Fa="en",ni=class{constructor(i){this._blockInstance=null;this._localeName="";this._blockInstance=i;for(let[e,t]of Object.entries(Ot)){let r=this._blockInstance.has(Ne(e))?!this._blockInstance.$[Ne(e)]:!0;this._blockInstance.add(Ne(e),t,r)}setTimeout(()=>{i.subConfigValue("localeName",async e=>{if(!this._blockInstance||!e)return;this._localeName=e;let t=await Eo(e);if(e!==Fa&&this._localeName!==e)return;let r=this._blockInstance.cfg.localeDefinitionOverride?.[e];for(let[s,n]of Object.entries(t)){let a=r?.[s];this._blockInstance.add(Ne(s),a??n,!0)}}),i.subConfigValue("localeDefinitionOverride",e=>{if(!e)return;let t=e[this._localeName];if(t)for(let[r,s]of Object.entries(t))this._blockInstance?.add(Ne(r),s,!0)})})}};function Na(o){return o.replace(/[A-Z]/g,i=>`_${i.toLowerCase()}`).replace(/__/g,"_")}function Tr(o){return Array.isArray(o)?o.map(i=>typeof i=="object"&&i!==null?Tr(i):i):typeof o!="object"||o===null?o:Object.fromEntries(Object.entries(o).map(([i,e])=>{let t=Na(i);return typeof e=="object"&&e!==null?[t,Tr(e)]:[t,e]}))}function Ba(o){return{ok:!0,value:o}}function Cr(o){return{ok:!1,error:o}}var za="https://tlm.uploadcare.com/api/",Er=class{constructor(i=za){this.baseUrl=i}async base(i,e={}){let t=`${this.baseUrl}${i}`;try{let r=await fetch(t,e);if(!r.ok)return Cr(new Error(`Got non-200 response from "${t}". Status: ${r.status.toString()}`));try{let s=await r.json();return Ba(s)}catch(s){return Cr(new Error(`Error parsing JSON from "${t}". Error: ${s}`))}}catch(r){return Cr(new Error(`Error fetching data from "${t}". Error: ${r}`))}}async post(i,e,t={}){return await this.base(i,{...t,method:"POST",body:JSON.stringify(Tr(e)),headers:{"Content-Type":"application/json",...t.headers||{}}})}async get(i,e={}){return await this.base(i,{method:"GET",...e})}},Ha=async(o,i)=>({success:!0,data:i}),ai=class extends Er{constructor(){super()}async sendEvent(i,e){let t=await Ha(void 0,i);if(!t.success)throw console.error("TelemetryAPIService: events: body is invalid",t.error),new Error("TelemetryAPIService: events: body is invalid");return this.post("v1/events",i,e)}};var oe=o=>o?o.split(",").map(i=>i.trim()).filter(Boolean):[],Me=o=>o.join(",");var jo=o=>{if(typeof o!="string"||!o)return"";let i=o.trim();return i.startsWith("-/")?i=i.slice(2):i.startsWith("/")&&(i=i.slice(1)),i.endsWith("/")&&(i=i.slice(0,i.length-1)),i},li=(...o)=>o.filter(i=>typeof i=="string"&&!!i).map(i=>jo(i)).join("/-/"),Y=(...o)=>{let i=li(...o);return i?`-/${i}/`:""};function ci(o){let i=new URL(o),e=i.pathname+i.search+i.hash,t=e.lastIndexOf("http"),r=e.lastIndexOf("/"),s="";return t>=0?s=e.slice(t):r>=0&&(s=e.slice(r+1)),s}function di(o){let i=new URL(o),{pathname:e}=i,t=e.indexOf("/"),r=e.indexOf("/",t+1);return e.substring(t+1,r)}function xr(o){let i=Ko(o),e=new URL(i),t=e.pathname.indexOf("/-/");return t===-1?"":e.pathname.substring(t).slice(1)}function Sr(o){return xr(o).split("/-/").filter(Boolean).map(e=>jo(e))}function Ko(o){let i=new URL(o),e=ci(o),t=Go(e)?Wo(e).pathname:e;return i.pathname=i.pathname.replace(t,""),i.search="",i.hash="",i.toString()}function Go(o){return o.startsWith("http")}function Wo(o){let i=new URL(o);return{pathname:`${i.origin}${i.pathname??""}`,search:i.search??"",hash:i.hash??""}}var H=(o,i,e)=>{let t=new URL(Ko(o)),r=e??ci(o),s=i??"";if(t.pathname.startsWith("//")&&(t.pathname=t.pathname.replace("//","/")),r&&Go(r)){let n=Wo(r);t.pathname=`${t.pathname}${s}${n.pathname||""}`,t.search=n.search,t.hash=n.hash}else t.pathname=`${t.pathname}${s}${r||""}`;return t.toString()},Be=(o,i)=>{let e=new URL(o);return e.pathname=`${i}/`,e.toString()};var j=(o,i=",")=>o.trim().split(i).map(e=>e.trim()).filter(e=>e.length>0);var Lt=Object.freeze({brightness:0,exposure:0,gamma:100,contrast:0,saturation:0,vibrance:0,warmth:0,enhance:0,filter:0,rotate:0,mirror:!1,flip:!1,crop:void 0}),Xo=["enhance","brightness","exposure","gamma","contrast","saturation","vibrance","warmth","filter","mirror","flip","rotate","crop"];function ja(o,i){if(typeof i=="number"){let e=i;return Lt[o]!==e?`${o}/${e}`:""}if(typeof i=="boolean"){let e=i;return Lt[o]!==e?`${o}`:""}if(o==="filter"&&i){let{name:e,amount:t}=i;return Lt.filter===t?"":`${o}/${e}/${t}`}if(o==="crop"&&i){let{dimensions:e,coords:t}=i;return`${o}/${e.join("x")}/${t.join(",")}`}return""}function ze(o){return li(...Xo.filter(i=>typeof o[i]<"u"&&o[i]!==null).map(i=>{let e=o[i];return ja(i,e)}).filter(i=>!!i))}var ui=li("format/auto","progressive/yes"),Le=([o])=>typeof o<"u"?Number(o):void 0,qo=()=>!0,Ka=([o,i])=>({name:o,amount:typeof i<"u"?Number(i):100}),Ga=([o,i])=>{if(!/\d+x\d+/.test(o)||!/\d+,\d+/.test(i))throw new Error("Crop by aspect ratio, percentage or alignment shortcuts is not supported.");return{dimensions:j(o,"x").map(Number),coords:j(i).map(Number)}},Wa=Object.freeze({enhance:Le,brightness:Le,exposure:Le,gamma:Le,contrast:Le,saturation:Le,vibrance:Le,warmth:Le,filter:Ka,mirror:qo,flip:qo,rotate:Le,crop:o=>{let[i,e]=o,{dimensions:t,coords:r}=Ga([i,e]);return{dimensions:t,coords:r}}});function Ar(o){let i={};for(let e of o){let[t,...r]=e.split("/");if(!t||!Xo.includes(t))continue;let s=t,n=Wa[s];try{let a=n(r);i[s]=a}catch(a){console.warn([`Failed to parse URL operation "${e}". It will be ignored.`,a instanceof Error?`Error message: "${a.message}"`:a,"If you need this functionality, please feel free to open an issue at https://github.com/uploadcare/blocks/issues/new"].join(`
|
|
27
|
-
`))}}return i}var V=Object.freeze({CROP:"crop",TUNING:"tuning",FILTERS:"filters"}),J=Object.freeze([V.CROP,V.TUNING,V.FILTERS]),Zo=Object.freeze(["brightness","exposure","gamma","contrast","saturation","vibrance","warmth","enhance"]),Qo=Object.freeze(["adaris","briaril","calarel","carris","cynarel","cyren","elmet","elonni","enzana","erydark","fenralan","ferand","galen","gavin","gethriel","iorill","iothari","iselva","jadis","lavra","misiara","namala","nerion","nethari","pamaya","sarnar","sedis","sewen","sorahel","sorlen","tarian","thellassan","varriel","varven","vevera","virkas","yedis","yllara","zatvel","zevcen"]),Yo=Object.freeze(["rotate","mirror","flip"]),Re=Lt,ye=Object.freeze({brightness:{zero:Re.brightness,range:[-100,100],keypointsNumber:2},exposure:{zero:Re.exposure,range:[-500,500],keypointsNumber:2},gamma:{zero:Re.gamma,range:[0,1e3],keypointsNumber:2},contrast:{zero:Re.contrast,range:[-100,500],keypointsNumber:2},saturation:{zero:Re.saturation,range:[-100,500],keypointsNumber:1},vibrance:{zero:Re.vibrance,range:[-100,500],keypointsNumber:1},warmth:{zero:Re.warmth,range:[-100,100],keypointsNumber:1},enhance:{zero:Re.enhance,range:[0,100],keypointsNumber:1},filter:{zero:Re.filter,range:[0,100],keypointsNumber:1}});var Rt="https://ucarecdn.com",qa="https://upload.uploadcare.com",Xa="https://social.uploadcare.com",Za="https://ucarecd.net",Qa={pubkey:"",multiple:!0,multipleMin:0,multipleMax:Number.MAX_SAFE_INTEGER,confirmUpload:!1,imgOnly:!1,accept:"",externalSourcesPreferredTypes:"",externalSourcesEmbedCss:"",store:"auto",cameraMirror:!1,cameraCapture:"",sourceList:"local, url, camera, dropbox, gdrive",topLevelOrigin:"",cloudImageEditorTabs:Me(J),maxLocalFileSizeBytes:0,thumbSize:76,showEmptyList:!1,useLocalImageEditor:!1,useCloudImageEditor:!0,removeCopyright:!1,cropPreset:"",imageShrink:"",modalScrollLock:!0,modalBackdropStrokes:!1,sourceListWrap:!0,remoteTabSessionKey:"",cdnCname:Rt,cdnCnamePrefixed:Za,baseUrl:qa,socialBaseUrl:Xa,secureSignature:"",secureExpire:"",secureDeliveryProxy:"",retryThrottledRequestMaxTimes:10,retryNetworkErrorMaxTimes:3,multipartMinFileSize:26214400,multipartChunkSize:5242880,maxConcurrentRequests:10,multipartMaxConcurrentRequests:4,multipartMaxAttempts:3,checkForUrlDuplicates:!1,saveUrlForRecurrentUploads:!1,groupOutput:!1,userAgentIntegration:"",debug:!1,metadata:null,localeName:"en",localeDefinitionOverride:null,secureUploadsExpireThreshold:600*1e3,secureUploadsSignatureResolver:null,secureDeliveryProxyUrlResolver:null,iconHrefResolver:null,fileValidators:[],collectionValidators:[],validationTimeout:15*1e3,validationConcurrency:100,cameraModes:"photo, video",defaultCameraMode:null,enableAudioRecording:!0,enableVideoRecording:null,maxVideoRecordingDuration:null,mediaRecorderOptions:null,filesViewMode:"list",gridShowFileNames:!1,cloudImageEditorAutoOpen:!1,cloudImageEditorMaskHref:null,testMode:!1,qualityInsights:!0},se=Object.freeze(Qa);var Jo="1.25.0-alpha.
|
|
27
|
+
`))}}return i}var V=Object.freeze({CROP:"crop",TUNING:"tuning",FILTERS:"filters"}),J=Object.freeze([V.CROP,V.TUNING,V.FILTERS]),Zo=Object.freeze(["brightness","exposure","gamma","contrast","saturation","vibrance","warmth","enhance"]),Qo=Object.freeze(["adaris","briaril","calarel","carris","cynarel","cyren","elmet","elonni","enzana","erydark","fenralan","ferand","galen","gavin","gethriel","iorill","iothari","iselva","jadis","lavra","misiara","namala","nerion","nethari","pamaya","sarnar","sedis","sewen","sorahel","sorlen","tarian","thellassan","varriel","varven","vevera","virkas","yedis","yllara","zatvel","zevcen"]),Yo=Object.freeze(["rotate","mirror","flip"]),Re=Lt,ye=Object.freeze({brightness:{zero:Re.brightness,range:[-100,100],keypointsNumber:2},exposure:{zero:Re.exposure,range:[-500,500],keypointsNumber:2},gamma:{zero:Re.gamma,range:[0,1e3],keypointsNumber:2},contrast:{zero:Re.contrast,range:[-100,500],keypointsNumber:2},saturation:{zero:Re.saturation,range:[-100,500],keypointsNumber:1},vibrance:{zero:Re.vibrance,range:[-100,500],keypointsNumber:1},warmth:{zero:Re.warmth,range:[-100,100],keypointsNumber:1},enhance:{zero:Re.enhance,range:[0,100],keypointsNumber:1},filter:{zero:Re.filter,range:[0,100],keypointsNumber:1}});var Rt="https://ucarecdn.com",qa="https://upload.uploadcare.com",Xa="https://social.uploadcare.com",Za="https://ucarecd.net",Qa={pubkey:"",multiple:!0,multipleMin:0,multipleMax:Number.MAX_SAFE_INTEGER,confirmUpload:!1,imgOnly:!1,accept:"",externalSourcesPreferredTypes:"",externalSourcesEmbedCss:"",store:"auto",cameraMirror:!1,cameraCapture:"",sourceList:"local, url, camera, dropbox, gdrive",topLevelOrigin:"",cloudImageEditorTabs:Me(J),maxLocalFileSizeBytes:0,thumbSize:76,showEmptyList:!1,useLocalImageEditor:!1,useCloudImageEditor:!0,removeCopyright:!1,cropPreset:"",imageShrink:"",modalScrollLock:!0,modalBackdropStrokes:!1,sourceListWrap:!0,remoteTabSessionKey:"",cdnCname:Rt,cdnCnamePrefixed:Za,baseUrl:qa,socialBaseUrl:Xa,secureSignature:"",secureExpire:"",secureDeliveryProxy:"",retryThrottledRequestMaxTimes:10,retryNetworkErrorMaxTimes:3,multipartMinFileSize:26214400,multipartChunkSize:5242880,maxConcurrentRequests:10,multipartMaxConcurrentRequests:4,multipartMaxAttempts:3,checkForUrlDuplicates:!1,saveUrlForRecurrentUploads:!1,groupOutput:!1,userAgentIntegration:"",debug:!1,metadata:null,localeName:"en",localeDefinitionOverride:null,secureUploadsExpireThreshold:600*1e3,secureUploadsSignatureResolver:null,secureDeliveryProxyUrlResolver:null,iconHrefResolver:null,fileValidators:[],collectionValidators:[],validationTimeout:15*1e3,validationConcurrency:100,cameraModes:"photo, video",defaultCameraMode:null,enableAudioRecording:!0,enableVideoRecording:null,maxVideoRecordingDuration:null,mediaRecorderOptions:null,filesViewMode:"list",gridShowFileNames:!1,cloudImageEditorAutoOpen:!1,cloudImageEditorMaskHref:null,testMode:!1,qualityInsights:!0},se=Object.freeze(Qa);var Jo="1.25.0-alpha.1";var He="blocks",je=Jo;var pi=class{constructor(i){this._sessionId=crypto.randomUUID();this._config=structuredClone(se);this._initialized=!1;this._lastPayload=null;this._block=i,this._telemetryInstance=new ai,this._queue=new De(10);for(let e of Object.keys(this._config))this._block.subConfigValue(e,t=>{this._initialized&&this._config[e]!==t&&this.sendEvent({eventType:P.CHANGE_CONFIG}),this._setConfig(e,t)})}_init(i){i===P.INIT_SOLUTION&&!this._initialized&&(this._initialized=!0)}_setConfig(i,e){this._config[i]!==e&&(this._config[i]=e)}_formattingPayload(i){let e=i.payload?{...i.payload}:{};e.activity&&(e.activity=void 0);let t={...i};return(i.eventType===P.INIT_SOLUTION||i.eventType===P.CHANGE_CONFIG)&&(t.config=this._config),{...t,appVersion:je,appName:He,sessionId:this._sessionId,component:this._solution,activity:this._activity,projectPubkey:this._config.pubkey,userAgent:navigator.userAgent,eventType:t.eventType??"",eventTimestamp:this._timestamp,payload:{location:this._location,...e}}}_excludedEvents(i){return!!(i&&[I.CHANGE,I.COMMON_UPLOAD_PROGRESS,I.FILE_ADDED,I.FILE_REMOVED,I.FILE_UPLOAD_START,I.FILE_UPLOAD_PROGRESS,I.FILE_UPLOAD_SUCCESS,I.FILE_UPLOAD_FAILED].includes(i))}sendEvent(i){let e=this._formattingPayload({eventType:i.eventType,payload:i.payload,config:i.config});this._init(i.eventType),!(this._excludedEvents(i.eventType)||this._lastPayload&&this._checkObj(this._lastPayload,e))&&this._queue.add(async()=>{this._lastPayload=e,await this._telemetryInstance.sendEvent(e)})}sendEventError(i,e="unknown"){this.sendEvent({eventType:P.ERROR_EVENT,payload:{metadata:{event:"error",text:`Error in ${e}`,error:i.message}}})}sendEventCloudImageEditor(i,e,t={}){this.sendEvent({eventType:P.ACTION_EVENT,payload:{metadata:{tabId:e,node:i.currentTarget?.tagName,event:i.type,...t}}})}_checkObj(i,e){if(JSON.stringify(i)===JSON.stringify(e))return!0;if(typeof i!="object"||typeof e!="object"||i==null||e==null)return!1;let t=Object.keys(i),r=Object.keys(e);if(t.length!==r.length)return!1;for(let s of t)if(!Object.hasOwn(e,s)||!this._checkObj(i[s],e[s]))return!1;return!0}get _timestamp(){return Date.now()}get _solution(){if(!this._block.has("*solution"))return null;let i=this._block.$["*solution"];return i?i.toLowerCase():null}get _activity(){return this._block.has("*currentActivity")?this._block.$["*currentActivity"]??null:null}get _location(){return location.origin}};var q=o=>`*cfg/${o}`;var es=o=>{let i=new Intl.Locale(o),e="ltr",t=i.getTextInfo?.().direction;return t?e=t:i.textInfo?.direction&&(e=i.textInfo.direction),e};var hi=(o,i)=>new Intl.PluralRules(o).select(i);var Ja=o=>o;var ts="plural:";function Pt(o,i={},e={}){let{openToken:t="{{",closeToken:r="}}",transform:s=Ja}=e;for(let n in i){let a=i[n],l=a?.toString(),d=typeof l=="string"?s(l):String(l);o=o.replaceAll(t+n+r,d)}return o}function is(o){let i=[],e=o.indexOf("{{");for(;e!==-1;){let t=o.indexOf("}}",e);if(t===-1)break;let r=o.substring(e+2,t);if(r.startsWith(ts)){let s=o.substring(e+2,t).replace(ts,""),n=s.substring(0,s.indexOf("(")),a=s.substring(s.indexOf("(")+1,s.indexOf(")"));i.push({variable:r,pluralKey:n,countVariable:a})}e=o.indexOf("{{",t)}return i}var rs="--uploadcare-blocks-window-height",Ut=class o{static{this.clientsRegistry=new Set}static{this.flush=L(()=>{document.documentElement.style.setProperty(rs,`${window.innerHeight}px`)},100)}static registerClient(i){o.clientsRegistry.size===0&&o.attachTracker(),o.clientsRegistry.add(i)}static unregisterClient(i){o.clientsRegistry.delete(i),o.clientsRegistry.size===0&&o.detachTracker()}static attachTracker(){window.addEventListener("resize",o.flush,{passive:!0,capture:!0}),o.flush()}static detachTracker(){window.removeEventListener("resize",o.flush,{capture:!0}),document.documentElement.style.removeProperty(rs)}};var el=/\\([0-9a-fA-F]{1,6} ?)/g;function tl(o){return o.length<2?!1:(o[0]==='"'||o[0]==="'")&&(o[o.length-1]==='"'||o[o.length-1]==="'")}function il(o){let i=o;return(i[0]==='"'||i[0]==="'")&&(i=i.slice(1)),(i[i.length-1]==='"'||i[i.length-1]==="'")&&(i=i.slice(0,-1)),i}function rl(o){let i="",e="";for(let t=0;t<o.length;t++){let r=o[t+1];o[t]==="\\"&&r==='"'?(i+='\\"',t++):o[t]==='"'&&e!=="\\"?i+='\\"':i+=o[t],e=o[t]??""}return i}function os(o){let i=o;tl(o)&&(i=il(i),i=i.replace(el,(e,t)=>String.fromCodePoint(parseInt(t.trim(),16))),i=i.replaceAll(`\\
|
|
28
28
|
`,"\\n"),i=rl(i),i='"'+i+'"');try{return JSON.parse(i)}catch{return}}function mi(o){class i extends o{constructor(){super(...arguments);this.cssDataCache=null;this.computedStyle=null}getCssData(r,s=!1){let n=this.cssDataCache??Object.create(null);if(!Object.keys(n).includes(r)||!n[r]){this.computedStyle||(this.computedStyle=window.getComputedStyle(this));let a=this.computedStyle.getPropertyValue(r).trim();try{n[r]=os(a)}catch(l){s||console.warn(`CSS Data error: ${r}`,l),n[r]=null}}return this.cssDataCache=n,n[r]}}return i}function ss(o){class i extends o{constructor(){super(...arguments);this.__slots={};this.__willYield=!0;this.__initialLightDomChildren=null;this.__hasAdoptedChildren=!1}createRenderRoot(){return this}connectedCallback(){this.__initialLightDomChildren||(this.__initialLightDomChildren=Array.from(this.childNodes)),super.connectedCallback()}__adoptChildren(){if(this.__hasAdoptedChildren)return;this.__hasAdoptedChildren=!0,this.__slots={};let r=Array.from(this.childNodes),s=r.length?r:this.__initialLightDomChildren??[];for(let n of s){let a=this.__getSlotNameForChild(n),l=this.__slots[a]??[];n instanceof Element&&(n.removeAttribute("slot"),n.removeAttribute("content-for")),l.push(n),this.__slots[a]=l}this.__initialLightDomChildren=null}__getSlotNameForChild(r){return r instanceof Comment&&r.nextSibling instanceof Element?this.__getSlotNameForChild(r.nextSibling):"contentFor"in r?r.contentFor||"":r instanceof Element&&r.hasAttribute("content-for")&&r.getAttribute("content-for")||""}__isTextNodeEmpty(r){return!r.textContent||!r.textContent.trim()}__isSlotEmpty(r){let s=this.__slots[r];return!s||s.every(n=>n instanceof Comment||n instanceof Text&&this.__isTextNodeEmpty(n))}update(r){!this.hasUpdated&&this.__willYield&&this.__adoptChildren(),super.update(r)}yield(r,s){if(r===""&&!this.__slots[r]&&!this.__hasAdoptedChildren&&this.__initialLightDomChildren?.length){let a=[];for(let l of this.__initialLightDomChildren)l instanceof Element&&(l.removeAttribute("slot"),l.removeAttribute("content-for")),a.push(l);this.__slots[r]=a,this.__hasAdoptedChildren=!0,this.__initialLightDomChildren=null}let n=this.__slots[r];return m.html`
|
|
29
29
|
${n}
|
|
30
30
|
${this.__isSlotEmpty(r)?s:void 0}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as lit_html from 'lit-html';
|
|
2
2
|
import { LitElement, PropertyValues, TemplateResult } from 'lit';
|
|
3
3
|
import { PubSub } from '@symbiotejs/symbiote';
|
|
4
|
+
import * as lit_html_directives_ref_js from 'lit-html/directives/ref.js';
|
|
4
5
|
import { TelemetryRequest } from '@uploadcare/quality-insights';
|
|
5
6
|
import * as _uploadcare_upload_client from '@uploadcare/upload-client';
|
|
6
7
|
import { UploadcareFile, Metadata, UploadError, NetworkError, UploadcareGroup, FileFromOptions } from '@uploadcare/upload-client';
|
|
@@ -25,7 +26,7 @@ declare class LocaleManager {
|
|
|
25
26
|
declare class Modal extends LitBlock {
|
|
26
27
|
static styleAttrs: string[];
|
|
27
28
|
private _mouseDownTarget;
|
|
28
|
-
|
|
29
|
+
protected dialogEl: lit_html_directives_ref_js.Ref<HTMLDialogElement>;
|
|
29
30
|
handleModalOpen: ModalCb;
|
|
30
31
|
handleModalClose: ModalCb;
|
|
31
32
|
handleModalCloseAll: ModalCb;
|