@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20251226.0 → 0.0.0-nightly-next-20251226.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/build/uploadcare.js +1 -1
  2. package/dist/index.js +3 -3
  3. package/dist/translations/af.js +1 -1
  4. package/dist/translations/af.umd.js +1 -1
  5. package/dist/translations/ar.js +1 -1
  6. package/dist/translations/ar.umd.js +1 -1
  7. package/dist/translations/ast.js +1 -1
  8. package/dist/translations/ast.umd.js +1 -1
  9. package/dist/translations/az.js +1 -1
  10. package/dist/translations/az.umd.js +1 -1
  11. package/dist/translations/be.js +1 -1
  12. package/dist/translations/be.umd.js +1 -1
  13. package/dist/translations/bg.js +1 -1
  14. package/dist/translations/bg.umd.js +1 -1
  15. package/dist/translations/bn.js +1 -1
  16. package/dist/translations/bn.umd.js +1 -1
  17. package/dist/translations/bs.js +1 -1
  18. package/dist/translations/bs.umd.js +1 -1
  19. package/dist/translations/ca.js +1 -1
  20. package/dist/translations/ca.umd.js +1 -1
  21. package/dist/translations/cs.js +1 -1
  22. package/dist/translations/cs.umd.js +1 -1
  23. package/dist/translations/da.js +1 -1
  24. package/dist/translations/da.umd.js +1 -1
  25. package/dist/translations/de-ch.js +1 -1
  26. package/dist/translations/de-ch.umd.js +1 -1
  27. package/dist/translations/de.js +1 -1
  28. package/dist/translations/de.umd.js +1 -1
  29. package/dist/translations/el.js +1 -1
  30. package/dist/translations/el.umd.js +1 -1
  31. package/dist/translations/en-au.js +1 -1
  32. package/dist/translations/en-au.umd.js +1 -1
  33. package/dist/translations/en-gb.js +1 -1
  34. package/dist/translations/en-gb.umd.js +1 -1
  35. package/dist/translations/en.js +1 -1
  36. package/dist/translations/en.umd.js +1 -1
  37. package/dist/translations/eo.js +1 -1
  38. package/dist/translations/eo.umd.js +1 -1
  39. package/dist/translations/es-co.js +1 -1
  40. package/dist/translations/es-co.umd.js +1 -1
  41. package/dist/translations/es.js +1 -1
  42. package/dist/translations/es.umd.js +1 -1
  43. package/dist/translations/et.js +1 -1
  44. package/dist/translations/et.umd.js +1 -1
  45. package/dist/translations/eu.js +1 -1
  46. package/dist/translations/eu.umd.js +1 -1
  47. package/dist/translations/fa.js +1 -1
  48. package/dist/translations/fa.umd.js +1 -1
  49. package/dist/translations/fi.js +1 -1
  50. package/dist/translations/fi.umd.js +1 -1
  51. package/dist/translations/fr.js +1 -1
  52. package/dist/translations/fr.umd.js +1 -1
  53. package/dist/translations/gl.js +1 -1
  54. package/dist/translations/gl.umd.js +1 -1
  55. package/dist/translations/gu.js +1 -1
  56. package/dist/translations/gu.umd.js +1 -1
  57. package/dist/translations/he.js +1 -1
  58. package/dist/translations/he.umd.js +1 -1
  59. package/dist/translations/hi.js +1 -1
  60. package/dist/translations/hi.umd.js +1 -1
  61. package/dist/translations/hr.js +1 -1
  62. package/dist/translations/hr.umd.js +1 -1
  63. package/dist/translations/hu.js +1 -1
  64. package/dist/translations/hu.umd.js +1 -1
  65. package/dist/translations/hy.js +1 -1
  66. package/dist/translations/hy.umd.js +1 -1
  67. package/dist/translations/id.js +1 -1
  68. package/dist/translations/id.umd.js +1 -1
  69. package/dist/translations/it.js +1 -1
  70. package/dist/translations/it.umd.js +1 -1
  71. package/dist/translations/ja.js +1 -1
  72. package/dist/translations/ja.umd.js +1 -1
  73. package/dist/translations/jv.js +1 -1
  74. package/dist/translations/jv.umd.js +1 -1
  75. package/dist/translations/kk.js +1 -1
  76. package/dist/translations/kk.umd.js +1 -1
  77. package/dist/translations/km.js +1 -1
  78. package/dist/translations/km.umd.js +1 -1
  79. package/dist/translations/kn.js +1 -1
  80. package/dist/translations/kn.umd.js +1 -1
  81. package/dist/translations/ko.js +1 -1
  82. package/dist/translations/ko.umd.js +1 -1
  83. package/dist/translations/ku.js +1 -1
  84. package/dist/translations/ku.umd.js +1 -1
  85. package/dist/translations/lt.js +1 -1
  86. package/dist/translations/lt.umd.js +1 -1
  87. package/dist/translations/lv.js +1 -1
  88. package/dist/translations/lv.umd.js +1 -1
  89. package/dist/translations/ms.js +1 -1
  90. package/dist/translations/ms.umd.js +1 -1
  91. package/dist/translations/nb.js +1 -1
  92. package/dist/translations/nb.umd.js +1 -1
  93. package/dist/translations/ne.js +1 -1
  94. package/dist/translations/ne.umd.js +1 -1
  95. package/dist/translations/nl.js +1 -1
  96. package/dist/translations/nl.umd.js +1 -1
  97. package/dist/translations/no.js +1 -1
  98. package/dist/translations/no.umd.js +1 -1
  99. package/dist/translations/oc.js +1 -1
  100. package/dist/translations/oc.umd.js +1 -1
  101. package/dist/translations/pl.js +1 -1
  102. package/dist/translations/pl.umd.js +1 -1
  103. package/dist/translations/pt-br.js +1 -1
  104. package/dist/translations/pt-br.umd.js +1 -1
  105. package/dist/translations/pt.js +1 -1
  106. package/dist/translations/pt.umd.js +1 -1
  107. package/dist/translations/ro.js +1 -1
  108. package/dist/translations/ro.umd.js +1 -1
  109. package/dist/translations/ru.js +1 -1
  110. package/dist/translations/ru.umd.js +1 -1
  111. package/dist/translations/si.js +1 -1
  112. package/dist/translations/si.umd.js +1 -1
  113. package/dist/translations/sk.js +1 -1
  114. package/dist/translations/sk.umd.js +1 -1
  115. package/dist/translations/sl.js +1 -1
  116. package/dist/translations/sl.umd.js +1 -1
  117. package/dist/translations/sq.js +1 -1
  118. package/dist/translations/sq.umd.js +1 -1
  119. package/dist/translations/sr-latn.js +1 -1
  120. package/dist/translations/sr-latn.umd.js +1 -1
  121. package/dist/translations/sr.js +1 -1
  122. package/dist/translations/sr.umd.js +1 -1
  123. package/dist/translations/sv.js +1 -1
  124. package/dist/translations/sv.umd.js +1 -1
  125. package/dist/translations/th.js +1 -1
  126. package/dist/translations/th.umd.js +1 -1
  127. package/dist/translations/ti.js +1 -1
  128. package/dist/translations/ti.umd.js +1 -1
  129. package/dist/translations/tk.js +1 -1
  130. package/dist/translations/tk.umd.js +1 -1
  131. package/dist/translations/tr.js +1 -1
  132. package/dist/translations/tr.umd.js +1 -1
  133. package/dist/translations/tt.js +1 -1
  134. package/dist/translations/tt.umd.js +1 -1
  135. package/dist/translations/ug.js +1 -1
  136. package/dist/translations/ug.umd.js +1 -1
  137. package/dist/translations/uk.js +1 -1
  138. package/dist/translations/uk.umd.js +1 -1
  139. package/dist/translations/ur.js +1 -1
  140. package/dist/translations/ur.umd.js +1 -1
  141. package/dist/translations/uz.js +1 -1
  142. package/dist/translations/uz.umd.js +1 -1
  143. package/dist/translations/vi.js +1 -1
  144. package/dist/translations/vi.umd.js +1 -1
  145. package/dist/translations/zh-cn.js +1 -1
  146. package/dist/translations/zh-cn.umd.js +1 -1
  147. package/dist/translations/zh.js +1 -1
  148. package/dist/translations/zh.umd.js +1 -1
  149. package/package.json +9 -9
  150. package/src/index.js +1 -1
  151. package/src/ui/uploadcarecontroller.js +2 -2
  152. package/src/ui/uploadcareformview.js +1 -1
  153. package/src/uploadcare.js +1 -1
  154. package/src/uploadcarecommand.js +1 -1
  155. package/src/uploadcareconfig.js +1 -1
  156. package/src/uploadcareediting.js +1 -1
  157. package/src/uploadcareimageedit/ui/uploadcareimageeditcontroller.js +2 -2
  158. package/src/uploadcareimageedit/ui/uploadcareimageeditformeditingview.js +1 -1
  159. package/src/uploadcareimageedit/ui/uploadcareimageeditformerrorview.js +1 -1
  160. package/src/uploadcareimageedit/ui/uploadcareimageeditformloadingview.js +1 -1
  161. package/src/uploadcareimageedit/ui/uploadcareimageeditformview.js +1 -1
  162. package/src/uploadcareimageedit/uploadcareimageeditcommand.js +1 -1
  163. package/src/uploadcareimageedit/uploadcareimageeditediting.js +1 -1
  164. package/src/uploadcareimageedit/uploadcareimageeditui.js +1 -1
  165. package/src/uploadcareimageedit/uploadcareimagereplacecommand.js +1 -1
  166. package/src/uploadcareimageedit.js +1 -1
  167. package/src/uploadcareui.js +1 -1
  168. package/src/uploadcareuploadadapter.js +1 -1
  169. package/src/utils/common-translations.js +1 -1
  170. package/src/utils/dialogfocusmanagerview.js +1 -1
  171. package/src/utils/editingutils.js +1 -1
  172. package/src/utils/isancestor.js +1 -1
  173. package/src/utils/uploadutils.js +1 -1
@@ -2,4 +2,4 @@
2
2
  /*!
3
3
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
4
4
  * For licensing, see LICENSE.md.
5
- */(()=>{var t={102:t=>{"use strict";var e={};t.exports=function(t,r){var o=function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}(t);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(r)}},106:t=>{"use strict";t.exports=function(t){return t[1]}},123:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(r){t.setAttribute(r,e[r])})}},184:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var o=r(106),i=r.n(o),n=r(779),a=r.n(n)()(i());a.push([t.id,':root{--ck-image-processing-highlight-color:#f9fafa;--ck-image-processing-background-color:#e3e5e8}.ck.ck-editor__editable .image-inline.image-processing picture,.ck.ck-editor__editable .image.image-processing picture{display:block;height:100%;position:relative;width:100%}.ck.ck-editor__editable .image-inline.image-processing picture:before,.ck.ck-editor__editable .image.image-processing picture:before{animation:ck-image-processing-animation 2s linear infinite;background:linear-gradient(90deg,var(--ck-image-processing-background-color),var(--ck-image-processing-highlight-color),var(--ck-image-processing-background-color));background-size:200% 100%;content:"";height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.ck.ck-editor__editable .image-inline.image-processing picture img,.ck.ck-editor__editable .image.image-processing picture img{height:100%}.ck.ck-editor__editable .image-inline.image-processing-blur,.ck.ck-editor__editable .image.image-processing-blur{clip-path:inset(0);filter:blur(1.6rem)}@keyframes ck-image-processing-animation{0%{background-position:200% 0}to{background-position:-200% 0}}',""]);const s=a},237:t=>{"use strict";t.exports=CKEditor5.dll},260:(t,e,r)=>{t.exports=r(237)("./src/upload.js")},297:t=>{"use strict";var e,r=(e=[],function(t,r){return e[t]=r,e.filter(Boolean).join("\n")});function o(t,e,o,i){var n;if(o)n="";else{n="",i.supports&&(n+="@supports (".concat(i.supports,") {")),i.media&&(n+="@media ".concat(i.media," {"));var a=void 0!==i.layer;a&&(n+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),n+=i.css,a&&(n+="}"),i.media&&(n+="}"),i.supports&&(n+="}")}if(t.styleSheet)t.styleSheet.cssText=r(e,n);else{var s=document.createTextNode(n),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(s,c[e]):t.appendChild(s)}}var i={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=i.singletonCounter++,r=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){o(r,e,!1,t)},remove:function(t){o(r,e,!0,t)}}}},311:(t,e,r)=>{t.exports=r(237)("./src/ui.js")},355:(t,e,r)=>{t.exports=r(237)("./src/icons.js")},387:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var o=r(106),i=r.n(o),n=r(779),a=r.n(n)()(i());a.push([t.id,".ck-uploadcare-theme{--uc-font-size:13px;--uc-radius:2px;--uc-padding:0.9em;--uc-primary-oklch-light:54.45% 0.182 263.76;--uc-foreground-light:#333;--uc-secondary-foreground-light:#333;--uc-muted-foreground-light:#333;--uc-border-light:#ccced1}",""]);const s=a},474:t=>{"use strict";t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},584:(t,e,r)=>{t.exports=r(237)("./src/utils.js")},621:(t,e,r)=>{"use strict";r.d(e,{A:()=>h});var o=r(106),i=r.n(o),n=r(779),a=r.n(n),s=r(474),c=r.n(s),l=new URL(r(659),r.b),u=a()(i()),d=c()(l);u.push([t.id,`@keyframes fake-progress-animation{0%{transform:translate(-100%)}to{transform:translate(calc(100/var(--l-fake-progress-width)*100*1%))}}@keyframes uc-spinner-keyframes{0%{transform:rotate(0)}to{transform:rotate(1turn)}}uc-activity-header:not(#\\#){color:var(--uc-foreground);display:flex;font-size:1em;font-weight:500;gap:var(--uc-padding);justify-content:space-between;padding:var(--uc-padding)}uc-activity-header:not(#\\#)>*{align-items:center;display:flex}uc-camera-source:not(#\\#){background-color:var(--uc-background);border-radius:var(--uc-radius);display:flex;flex-direction:column;height:100%;max-height:100%;overflow:hidden;position:relative;width:100%}[uc-modal]:not(#\\#)>dialog:has(uc-camera-source[active]){height:100%;width:100%}uc-camera-source:not(.uc-initialized):not(#\\#) .uc-controls{display:none}uc-camera-source:not(#\\#) video{background-color:var(--uc-muted);border-radius:var(--uc-radius);display:block;max-height:100%;object-fit:contain;object-position:center center;width:100%}uc-camera-source:not(#\\#) .uc-toolbar{background-color:var(--uc-background);bottom:0;display:flex;justify-content:space-between;padding:var(--uc-padding);position:absolute;width:100%}uc-camera-source:not(#\\#) .uc-content{display:flex;flex:1;height:100%;justify-content:center;overflow:hidden;padding:var(--uc-padding);padding-top:0;width:100%}uc-camera-source:not(#\\#) .uc-message-box{display:flex;flex-direction:column;grid-gap:40px;align-items:center;color:var(--uc-foreground);justify-content:center;padding:40px 40px 0}uc-camera-source:not(#\\#) .uc-message-box button{background-color:var(--uc-primary);color:var(--uc-primary-foreground)}uc-camera-source:not(#\\#) .uc-shot-btn{background-color:var(--uc-primary-light);border-radius:50%;color:var(--uc-background);height:58px;opacity:.85;transition:bottom var(--uc-transition),opacity var(--uc-transition),transform var(--uc-transition);width:58px}uc-camera-source:not(#\\#) .uc-shot-btn:hover{opacity:1;transform:scale(1.05)}uc-camera-source:not(#\\#) .uc-shot-btn:active{opacity:1;transform:scale(1)}uc-camera-source:not(#\\#) .uc-shot-btn[disabled]{bottom:-80px}uc-camera-source:not(#\\#) .uc-shot-btn uc-icon svg{height:20px;width:20px}uc-camera-source:not(#\\#) .uc-controls{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;min-height:74px;padding:0 var(--uc-padding) var(--uc-padding);position:relative}uc-camera-source:not(#\\#) .uc-switcher{display:flex;gap:calc(var(--uc-padding)/2)}uc-camera-source:not(#\\#) .uc-switch.uc-active{background-color:var(--uc-secondary)}uc-camera-source:not(#\\#) .uc-camera-actions{align-items:center;display:flex;gap:5px;justify-content:center}uc-camera-source:not(#\\#) .uc-stop-record{background-color:var(--uc-destructive-foreground-light);opacity:1}:where(uc-camera-source:is(.uc-recording)):not(#\\#) .uc-recording-timer uc-icon{display:none}:where(uc-camera-source:is(.uc-recording)):not(#\\#) .uc-recording-timer{pointer-events:none}uc-camera-source:not(#\\#) .uc-recording-timer{overflow:hidden;position:relative;z-index:1}:where(uc-camera-source):not(#\\#) .uc-recording-timer uc-icon{height:10px;margin-right:10px;width:10px}uc-camera-source:not(#\\#) .uc-recording-timer .uc-line{background-color:var(--uc-foreground-light);bottom:0;content:"";height:2px;left:0;position:absolute;right:0;transform:scaleX(0);transform-origin:left;transition:transform var(--uc-transition)}uc-camera-source:not(#\\#) .uc-btn-microphone{z-index:1}uc-camera-source:not(#\\#) .uc-select{display:flex}uc-camera-source:not(#\\#) .uc-audio-select{width:98px}uc-camera-source:not(#\\#) .uc-audio-select select{width:100%}uc-camera-source:not(#\\#) .uc-camera-action{inset:0 var(--uc-padding) var(--uc-padding);margin:0 auto;position:absolute}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#){--color-primary-accent:var(--uc-primary);--color-text-base:var(--uc-foreground);--color-text-accent-contrast:var(--uc-background);--color-fill-contrast:var(--uc-background);--color-modal-backdrop:oklch(0 0 0/.1);--color-image-background:var(--uc-muted);--color-focus-ring:var(--color-primary-accent);--color-crop-guides:var(--uc-foreground);--font-size-ui:var(--uc-font-size);--size-touch-area:var(--uc-button-size);--size-panel-heading:calc(var(--uc-button-size) + var(--uc-padding)*2);--size-ui-min-width:130px;--size-line-width:1px;--size-modal-width:650px;--size-icon:calc(var(--uc-button-size)/2);--border-radius-editor:var(--uc-radius);--border-radius-thumb:var(--uc-radius);--border-radius-ui:var(--uc-radius);--border-radius-base:var(--uc-radius);--cldtr-gap-min:5px;--cldtr-gap-mid-1:10px;--cldtr-gap-mid-2:15px;--cldtr-gap-max:20px;--transition-duration-2:var(--transition-duration-all,.2s);--transition-duration-3:var(--transition-duration-all,.3s);--transition-duration-4:var(--transition-duration-all,.4s);--transition-duration-5:var(--transition-duration-all,.5s);--modal-header-opacity:1;--modal-header-height:var(--size-panel-heading);--modal-toolbar-height:var(--size-panel-heading);--transparent-pixel:url(${d});display:block;height:100%;max-height:100%;width:100%}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) :is([can-handle-paste]:hover,[can-handle-paste]:focus){--can-handle-paste:"true"}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) :is([tabindex][focus-visible],[tabindex]:hover,[with-effects][focus-visible],[with-effects]:hover){--filter-effect:var(--hover-filter)!important;--opacity-effect:var(--hover-opacity)!important;--color-effect:var(--hover-color-rgb)!important;--background-effect:var(--hover-background)!important}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) :is([tabindex]:active,[with-effects]:active){--filter-effect:var(--down-filter)!important;--opacity-effect:var(--down-opacity)!important;--color-effect:var(--down-color-rgb)!important;--background-effect:var(--down-background)!important}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) :is([tabindex][active],[with-effects][active]){--filter-effect:var(--active-filter)!important;--opacity-effect:var(--active-opacity)!important;--color-effect:var(--active-color-rgb)!important;--background-effect:var(--active-background)!important}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) [hidden-scrollbar]::-webkit-scrollbar{display:none}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) [hidden-scrollbar]{-ms-overflow-style:none;scrollbar-width:none}[uc-cloud-image-editor].uc-editor_ON:not(#\\#):not(#\\#):not(#\\#){--modal-header-opacity:0;--modal-header-height:0px;--modal-toolbar-height:calc(var(--size-panel-heading)*2)}[uc-cloud-image-editor].uc-editor_OFF:not(#\\#):not(#\\#):not(#\\#){--modal-header-opacity:1;--modal-header-height:var(--size-panel-heading);--modal-toolbar-height:var(--size-panel-heading)}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper{--l-min-img-height:var(--modal-toolbar-height);--l-max-img-height:100%;--l-edit-button-width:120px;--l-toolbar-horizontal-padding:var(--cldtr-gap-mid-1);display:grid;grid-template-rows:minmax(var(--l-min-img-height),var(--l-max-img-height)) minmax(var(--modal-toolbar-height),auto);height:100%;overflow:hidden;overflow-y:auto;position:relative}@media only screen and (max-width:800px){[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper{--l-edit-button-width:70px;--l-toolbar-horizontal-padding:var(--cldtr-gap-min)}}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport{align-items:center;display:flex;justify-content:center;overflow:hidden}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image{--viewer-image-opacity:1;background-color:var(--color-image-background);box-sizing:border-box;display:block;height:100%;left:0;object-fit:scale-down;opacity:var(--viewer-image-opacity);pointer-events:auto;position:absolute;top:0;transform:scale(1);user-select:none;width:100%;z-index:10}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image.uc-image_visible_viewer{transition:opacity var(--transition-duration-3) ease-in-out,transform var(--transition-duration-4)}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image.uc-image_hidden_to_cropper{--viewer-image-opacity:0;background-image:var(--transparent-pixel);pointer-events:none;transform:scale(1);transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) step-end}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image.uc-image_hidden_effects{--viewer-image-opacity:0;pointer-events:none;transform:scale(1);transition:opacity var(--transition-duration-3) cubic-bezier(.5,0,1,1),transform var(--transition-duration-4)}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-image_container{background-color:var(--color-image-background);display:block;height:100%;position:relative;transition:var(--transition-duration-3);width:100%}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-toolbar{position:relative;transition:.3s}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-toolbar>.uc-toolbar_content{background-color:var(--color-fill-contrast);bottom:0;box-sizing:border-box;height:var(--modal-toolbar-height);left:0;min-height:var(--size-panel-heading);position:absolute;width:100%}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-toolbar>.uc-toolbar_content.uc-toolbar_content__viewer{align-items:center;display:flex;height:var(--size-panel-heading);justify-content:space-between;padding-left:var(--l-toolbar-horizontal-padding);padding-right:var(--l-toolbar-horizontal-padding)}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-toolbar>.uc-toolbar_content.uc-toolbar_content__editor{display:flex}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-info_pan{position:absolute;user-select:none}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-file_type_outer{display:flex;max-width:120px;position:absolute;transform:translate(-40px);user-select:none;z-index:2}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-file_type_outer>.uc-file_type{padding:4px .8em}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-network_problems_splash{background-color:var(--color-fill-contrast);display:flex;flex-direction:column;height:100%;position:absolute;width:100%;z-index:4}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_content{align-items:center;display:flex;flex:1;flex-direction:column;justify-content:center}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_content>.uc-network_problems_icon{align-items:center;background-color:var(--uc-muted);border-radius:50%;color:var(--uc-foreground);display:flex;height:40px;justify-content:center;width:40px}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_content>.uc-network_problems_text{color:var(--uc-foreground);font-size:var(--font-size-ui);margin-top:var(--cldtr-gap-max)}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_footer{align-items:center;display:flex;height:var(--size-panel-heading);justify-content:center}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#)>.uc-svg{border-top-left-radius:var(--border-radius-base);border-top-right-radius:var(--border-radius-base);height:100%;left:0;opacity:inherit;position:absolute;top:0;transition:var(--transition-duration-3);width:100%;z-index:2}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#)>.uc-thumb{--idle-color-rgb:var(--color-text-base);--hover-color-rgb:var(--color-primary-accent);--focus-color-rgb:var(--color-primary-accent);--down-color-rgb:var(--color-primary-accent);--color-effect:var(--idle-color-rgb);color:var(--color-effect);transition:color var(--transition-duration-3),opacity var(--transition-duration-3)}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-thumb--visible{opacity:1;pointer-events:auto}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-thumb--hidden{opacity:0;pointer-events:none}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-guides{transition:var(--transition-duration-3)}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-guides--hidden{opacity:0}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-guides--semi-hidden{opacity:.2}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-guides--visible{opacity:1}uc-editor-aspect-ratio-button-control:not(#\\#):not(#\\#):not(#\\#),uc-editor-button-control:not(#\\#):not(#\\#):not(#\\#),uc-editor-crop-button-control:not(#\\#):not(#\\#):not(#\\#),uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#),uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#),uc-editor-operation-control:not(#\\#):not(#\\#):not(#\\#){--l-base-min-width:var(--uc-button-size);--l-base-height:var(--uc-button-size);--opacity-effect:var(--idle-opacity);--color-effect:var(--idle-color-rgb);--background-effect:var(--idle-background);--filter-effect:var(--idle-filter);--idle-color-rgb:var(--uc-secondary-foreground);--idle-opacity:1;--idle-filter:1;--idle-background:var(--uc-secondary);--hover-color-rgb:var(--uc-secondary-foreground);--hover-opacity:1;--hover-filter:.8;--hover-background:var(--uc-secondary-hover);--down-color-rgb:var(--hover-color-rgb);--down-opacity:1;--down-filter:.6;--down-background:var(--uc-secondary);border-radius:var(--uc-radius)}uc-editor-aspect-ratio-button-control:not(#\\#):not(#\\#):not(#\\#)>button,uc-editor-button-control:not(#\\#):not(#\\#):not(#\\#)>button,uc-editor-crop-button-control:not(#\\#):not(#\\#):not(#\\#)>button,uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>button,uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button,uc-editor-operation-control:not(#\\#):not(#\\#):not(#\\#)>button{all:unset;align-items:center;color:var(--color-effect);cursor:pointer;display:grid;grid-template-columns:var(--l-base-min-width) auto;grid-template-rows:100%;height:var(--l-base-height);opacity:var(--opacity-effect);position:relative;transition:var(--l-width-transition)}uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button{grid-template-columns:auto var(--l-base-min-width)}uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button>uc-icon{margin-left:var(--cldtr-gap-mid-1);width:10px}:where(uc-editor-button-control,uc-editor-crop-button-control,uc-editor-aspect-ratio-button-control,uc-editor-freeform-button-control,uc-editor-filter-control,uc-editor-operation-control):not(#\\#):not(#\\#):not(#\\#)>uc-icon>svg{height:var(--size-icon);width:var(--size-icon)}uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>uc-icon.uc-original-icon>svg{height:100%;width:100%}uc-editor-aspect-ratio-button-control.uc-active:not(#\\#):not(#\\#):not(#\\#),uc-editor-button-control.uc-active:not(#\\#):not(#\\#):not(#\\#),uc-editor-crop-button-control.uc-active:not(#\\#):not(#\\#):not(#\\#),uc-editor-filter-control.uc-active:not(#\\#):not(#\\#):not(#\\#),uc-editor-freeform-button-control.uc-active:not(#\\#):not(#\\#):not(#\\#),uc-editor-operation-control.uc-active:not(#\\#):not(#\\#):not(#\\#){--idle-color-rgb:var(--uc-primary-foreground);--idle-background:var(--uc-primary);--idle-opacity:1;--hover-color-rgb:var(--uc-primary-foreground);--hover-background:var(--uc-primary);--hover-opacity:1}uc-editor-filter-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#) .uc-preview[loaded]{opacity:1}uc-editor-filter-control.uc-active:not(#\\#):not(#\\#):not(#\\#) .uc-preview{opacity:0}uc-editor-aspect-ratio-button-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#),uc-editor-button-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#),uc-editor-crop-button-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#),uc-editor-filter-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#),uc-editor-freeform-button-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#),uc-editor-operation-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#){--idle-color-rgb:var(--uc-secondary-foreground)}:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-aspect-ratio-button-control.uc-not_active,:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-button-control.uc-not_active,:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-crop-button-control.uc-not_active,:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-filter-control.uc-not_active,:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-freeform-button-control.uc-not_active,:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-operation-control.uc-not_active{--idle-background:transparent;--hover-background:var(--uc-secondary);outline:1px solid var(--uc-border);outline-offset:-1px}uc-editor-aspect-ratio-button-control:not(#\\#):not(#\\#):not(#\\#)>button:before,uc-editor-button-control:not(#\\#):not(#\\#):not(#\\#)>button:before,uc-editor-crop-button-control:not(#\\#):not(#\\#):not(#\\#)>button:before,uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>button:before,uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button:before,uc-editor-operation-control:not(#\\#):not(#\\#):not(#\\#)>button:before{background-color:var(--background-effect);border-radius:var(--border-radius-editor);content:"";height:100%;left:0;position:absolute;right:0;transition:var(--transition-duration-3);width:100%;z-index:-1}uc-editor-aspect-ratio-button-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title,uc-editor-button-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title,uc-editor-crop-button-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title,uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title,uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title,uc-editor-operation-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title{font-size:.7em;letter-spacing:1.004px;padding-right:var(--cldtr-gap-mid-1);text-transform:uppercase}uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title{padding-left:var(--cldtr-gap-mid-1);padding-right:0}uc-editor-aspect-ratio-button-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon,uc-editor-button-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon,uc-editor-crop-button-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon,uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon,uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon,uc-editor-operation-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon{pointer-events:none}uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-preview{background-repeat:no-repeat;background-size:contain;border-radius:var(--border-radius-editor);filter:brightness(var(--filter-effect));height:var(--l-base-height);left:0;opacity:0;position:absolute;right:0;transition:var(--transition-duration-3);width:100%;z-index:-1}uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>.uc-original-icon{color:var(--color-effect);opacity:.3}uc-editor-image-cropper:not(#\\#):not(#\\#):not(#\\#){color:var(--color-crop-guides);display:block;height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;touch-action:none;width:100%;z-index:10}uc-editor-image-cropper.uc-active_from_editor:not(#\\#):not(#\\#):not(#\\#),uc-editor-image-cropper.uc-active_from_viewer:not(#\\#):not(#\\#):not(#\\#){opacity:1;pointer-events:auto;transform:scale(1) translate(0);transition:transform var(--transition-duration-4) cubic-bezier(.37,0,.63,1) .4s,opacity var(--transition-duration-3)}uc-editor-image-cropper.uc-inactive_to_editor:not(#\\#):not(#\\#):not(#\\#){opacity:0;pointer-events:none;transition:transform var(--transition-duration-4) cubic-bezier(.37,0,.63,1),opacity var(--transition-duration-3) calc(var(--transition-duration-3) + .05s)}uc-editor-image-cropper:not(#\\#):not(#\\#):not(#\\#)>.uc-canvas{z-index:1}uc-editor-image-cropper:not(#\\#):not(#\\#):not(#\\#)>.uc-canvas,uc-editor-image-fader:not(#\\#):not(#\\#):not(#\\#){display:block;height:100%;left:0;position:absolute;top:0;width:100%}uc-editor-image-fader.uc-active_from_viewer:not(#\\#):not(#\\#):not(#\\#){opacity:1;pointer-events:auto;transform:scale(1);transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) step-start;z-index:3}uc-editor-image-fader.uc-active_from_cropper:not(#\\#):not(#\\#):not(#\\#){opacity:1;pointer-events:auto;transform:scale(1);transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) step-end;z-index:3}uc-editor-image-fader.uc-inactive_to_cropper:not(#\\#):not(#\\#):not(#\\#){opacity:0;pointer-events:none;transform:scale(1);transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) step-end;z-index:3}uc-editor-image-fader:not(#\\#):not(#\\#):not(#\\#) .uc-fader-image{content-visibility:auto;display:block;height:100%;left:0;object-fit:scale-down;position:absolute;top:0;transform:scale(1);user-select:none;width:100%}uc-editor-image-fader:not(#\\#):not(#\\#):not(#\\#) .uc-fader-image--preview{background-color:var(--color-image-background);border-top-left-radius:var(--border-radius-base);border-top-right-radius:var(--border-radius-base);opacity:0;transform:scale(1);transition:var(--transition-duration-3)}uc-editor-scroller:not(#\\#):not(#\\#):not(#\\#){align-items:center;display:flex;height:100%;overflow-x:scroll;width:100%}uc-editor-slider:not(#\\#):not(#\\#):not(#\\#){align-items:center;display:flex;height:var(--size-panel-heading);justify-content:center;width:100%}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#){height:100%;position:relative;width:100%}@media only screen and (max-width:600px){uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#){--l-tab-gap:var(--cldtr-gap-mid-1);--l-slider-padding:var(--uc-padding);--l-controls-padding:var(--uc-padding)}}@media only screen and (min-width:601px){uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#){--l-tab-gap:var(--cldtr-gap-max);--l-slider-padding:var(--uc-padding);--l-controls-padding:var(--uc-padding)}}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container{height:100%;overflow:hidden;position:relative;width:100%}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar{background-color:var(--color-fill-contrast);display:grid;grid-template-rows:1fr 1fr;height:100%;position:absolute;transition:opacity var(--transition-duration-3) ease-in-out,transform var(--transition-duration-3) ease-in-out,visibility var(--transition-duration-3) ease-in-out;width:100%}.uc-sub-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-list-aspect-ratio-container>.uc-list-aspect-ratio{align-items:center;display:grid;gap:6px;grid-auto-flow:column;height:var(--size-panel-heading);justify-content:center}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar.uc-sub-toolbar--visible{opacity:1;pointer-events:auto;transform:translateY(0)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar.uc-sub-toolbar--top-hidden{opacity:0;pointer-events:none;transform:translateY(100%)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar.uc-sub-toolbar--bottom-hidden{opacity:0;pointer-events:none;transform:translateY(-100%)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row{align-items:center;display:flex;justify-content:space-between;padding-left:var(--l-controls-padding);padding-right:var(--l-controls-padding)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles{display:grid;grid-auto-flow:column;position:relative;grid-gap:0 var(--l-tab-gap);align-items:center;height:100%}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggles_indicator{background-color:var(--uc-secondary-foreground);bottom:0;height:2px;left:0;position:absolute;transform:translate(0);transition:transform var(--transition-duration-3);width:var(--size-touch-area)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row{position:relative}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content{content-visibility:auto;display:flex;height:100%;left:0;opacity:0;overflow:hidden;position:absolute;top:0;width:100%}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content.uc-tab-content--visible{opacity:1;pointer-events:auto}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content.uc-tab-content--hidden{opacity:0;pointer-events:none}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle.uc-tab-toggle--visible{display:contents}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles.uc-tab-toggles--hidden,uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle.uc-tab-toggle--hidden{display:none}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle>uc-btn-ui{width:var(--uc-button-size)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle>uc-btn-ui>uc-icon>svg{height:var(--size-icon);width:var(--size-icon)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content .uc-controls-list_align{box-sizing:border-box;display:grid;grid-template-areas:". inner .";grid-template-columns:1fr auto 1fr;min-width:100%;padding-left:var(--uc-padding)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content .uc-controls-list_inner{display:grid;gap:6px;grid-area:inner;grid-auto-flow:column}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content .uc-controls-list_inner:last-child{padding-right:var(--uc-padding)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-controls-list_last-item{margin-right:var(--cldtr-gap-max)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-info-tooltip_container{align-items:flex-start;display:flex;height:100%;justify-content:center;position:absolute;width:100%}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-info-tooltip_wrapper{display:flex;flex-direction:column;height:100%;justify-content:flex-end;pointer-events:none;position:absolute;top:calc(-100% - var(--cldtr-gap-mid-2))}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-info-tooltip{background-color:var(--color-text-accent-contrast);border-radius:var(--border-radius-editor);color:var(--color-text-base);font-size:.7em;letter-spacing:1px;opacity:0;padding:3px 6px;text-transform:uppercase;transform:translateY(100%);transition:var(--transition-duration-3);z-index:3}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-info-tooltip_visible{opacity:1;transform:translateY(0)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-slider{padding-left:var(--l-slider-padding);padding-right:var(--l-slider-padding)}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#)>button{--filter-effect:var(--idle-brightness);--opacity-effect:var(--idle-opacity);--color-effect:var(--idle-color-rgb);--background-effect:var(--idle-background);--l-transition-effect:var( --css-transition,color var(--transition-duration-2),background-color var(--transition-duration-2),filter var(--transition-duration-2) );all:unset;align-items:center;background-color:var(--background-effect);border-radius:var(--uc-radius);box-sizing:var(--css-box-sizing,border-box);color:var(--color-effect);cursor:pointer;display:inline-flex;filter:brightness(var(--filter-effect));font-size:1em;height:var(--css-height,var(--uc-button-size));opacity:var(--opacity-effect);padding-left:var(--css-padding-left,14px);padding-right:var(--css-padding-right,14px);transition:var(--l-transition-effect);user-select:none}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#)>button>uc-icon{pointer-events:none}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-text{white-space:nowrap}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-icon{align-items:center;color:var(--color-effect);display:flex;filter:brightness(var(--filter-effect));justify-content:center;transition:var(--l-transition-effect)}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-icon_left{margin-left:0;margin-right:var(--cldtr-gap-mid-1)}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-icon_right{margin-left:var(--cldtr-gap-mid-1);margin-right:0}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-icon_single{margin-left:0;margin-right:0}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-icon_hidden{display:none;margin:0}uc-btn-ui.uc-primary:not(#\\#):not(#\\#):not(#\\#)>button{--idle-color-rgb:var(--uc-primary-foreground);--idle-brightness:1;--idle-opacity:1;--idle-background:var(--uc-primary);--hover-color-rgb:var(--uc-primary-foreground);--hover-brightness:1;--hover-opacity:1;--hover-background:var(--uc-primary-hover);--down-color-rgb:var(--uc-primary-foreground);--down-brightness:.75;--down-opacity:1;--down-background:var(--uc-primary);--active-color-rgb:var(--uc-primary-foreground);--active-brightness:1;--active-opacity:1;--active-background:var(--uc-primary)}uc-btn-ui.uc-primary-icon:not(#\\#):not(#\\#):not(#\\#)>button{--idle-color-rgb:var(--uc-primary);--idle-brightness:1;--idle-opacity:1;--idle-background:transparent;--hover-color-rgb:var(--uc-primary);--hover-brightness:1;--hover-opacity:1;--hover-background:var(--uc-primary-transparent);--down-color-rgb:var(--uc-primary);--down-brightness:.75;--down-opacity:1;--down-background:var(--uc-primary-transparent);--active-color-rgb:var(--uc-primary-foreground);--active-brightness:1;--active-opacity:1;--active-background:var(--uc-primary);padding:0;width:var(--uc-button-size)}uc-btn-ui.uc-secondary:not(#\\#):not(#\\#):not(#\\#)>button{--idle-color-rgb:var(--uc-secondary-foreground);--idle-brightness:1;--idle-opacity:1;--idle-background:var(--uc-secondary);--hover-color-rgb:var(--uc-secondary-foreground);--hover-brightness:1;--hover-opacity:1;--hover-background:var(--uc-secondary-hover);--down-color-rgb:var(--uc-secondary-foreground);--down-brightness:1;--down-opacity:1;--down-background:var(--uc-secondary-hover);--active-color-rgb:var(--uc-secondary-foreground);--active-brightness:1;--active-opacity:1;--active-background:transparent}:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-btn-ui.uc-secondary>button{border:1px solid var(--uc-border)}uc-btn-ui.uc-secondary-icon:not(#\\#):not(#\\#):not(#\\#)>button,uc-btn-ui.uc-tab:not(#\\#):not(#\\#):not(#\\#)>button{--idle-color-rgb:var(--uc-secondary-foreground);--idle-brightness:1;--idle-opacity:1;--idle-background:transparent;--hover-color-rgb:var(--uc-secondary-foreground);--hover-brightness:1;--hover-opacity:1;--hover-background:var(--uc-secondary);--down-color-rgb:var(--uc-secondary-foreground);--down-brightness:1;--down-opacity:1;--down-background:var(--uc-secondary);--active-color-rgb:var(--uc-secondary-foreground);--active-brightness:1;--active-opacity:1;--active-background:transparent;padding:0;width:var(--uc-button-size)}uc-btn-ui.uc-default:not(#\\#):not(#\\#):not(#\\#)>button{--idle-color-rgb:var(--uc-secondary-foreground);--idle-brightness:1;--idle-opacity:1;--idle-background:var(--uc-secondary);--hover-color-rgb:var(--uc-secondary-foreground);--hover-brightness:1;--hover-opacity:1;--hover-background:var(--uc-secondary-hover);--down-color-rgb:var(--uc-secondary-foreground);--down-brightness:.75;--down-opacity:1;--down-background:var(--uc-secondary);--active-color-rgb:var(--uc-primary);--active-brightness:1;--active-opacity:1;--active-background:var(--uc-primary-transparent)}:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-btn-ui.uc-default>button{--idle-background:transparent;--hover-background:var(--uc-secondary);--active-background:var(--uc-foreground);--active-color-rgb:var(--uc-background)}uc-line-loader-ui:not(#\\#):not(#\\#):not(#\\#){height:2px;left:0;opacity:.5;position:absolute;top:0;width:100%;z-index:9999}uc-line-loader-ui:not(#\\#):not(#\\#):not(#\\#) .uc-inner{height:100%;max-width:200px;width:25%}uc-line-loader-ui:not(#\\#):not(#\\#):not(#\\#) .uc-line{background-color:var(--uc-primary);height:100%;transform:translate(-101%);transition:transform 1s;width:100%}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#){--l-thumb-size:24px;--l-zero-dot-size:5px;--l-zero-dot-offset:2px;--idle-color-rgb:var(--uc-foreground);--hover-color-rgb:var(--uc-primary);--down-color-rgb:var(--uc-primary);--color-effect:var(--idle-color-rgb);--l-color:var(--color-effect);align-items:center;display:flex;height:calc(var(--l-thumb-size) + (var(--l-zero-dot-size) + var(--l-zero-dot-offset))*2);justify-content:center;position:relative;width:100%}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-thumb{background-color:var(--l-color);border-radius:50%;height:var(--l-thumb-size);left:0;opacity:1;position:absolute;transform:translate(0);transition:opacity var(--transition-duration-2),background-color var(--transition-duration-2);width:var(--l-thumb-size)}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-steps{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding-left:calc(var(--l-thumb-size)/2);padding-right:calc(var(--l-thumb-size)/2);position:absolute;width:100%}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-border-step{border-right:1px solid var(--uc-foreground);height:10px;opacity:1;transition:border-color var(--transition-duration-2);width:0}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-minor-step{border-right:1px solid var(--uc-foreground);height:4px;opacity:.6;transition:border-color var(--transition-duration-2);width:0}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-zero-dot{background-color:var(--color-primary-accent);border-radius:50%;height:var(--l-zero-dot-size);left:calc(var(--l-thumb-size)/2 - var(--l-zero-dot-size)/2);opacity:0;position:absolute;top:calc(100% - var(--l-zero-dot-offset)*2);transition:var(--transition-duration-3);width:var(--l-zero-dot-size)}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-input{cursor:pointer;height:100%;margin:0;opacity:0;position:absolute;width:calc(100% - 10px)}uc-presence-toggle.uc-transition:not(#\\#):not(#\\#):not(#\\#){transition:opacity var(--transition-duration-3),visibility var(--transition-duration-3)}uc-presence-toggle.uc-visible:not(#\\#):not(#\\#):not(#\\#){opacity:1;pointer-events:inherit}uc-presence-toggle.uc-hidden:not(#\\#):not(#\\#):not(#\\#){opacity:0;pointer-events:none}uc-presence-toggle.uc-initial:not(#\\#):not(#\\#):not(#\\#){display:none!important;transition:none!important}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) [role=button]:focus-visible,[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) button:focus-visible{outline:1px auto Highlight;outline:1px auto -webkit-focus-ring-color}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) .uc-cloud-mask{pointer-events:none}[uc-aspect-ratio-freeform]:not(#\\#):not(#\\#):not(#\\#) button{display:flex}[uc-aspect-ratio-freeform]:not(#\\#):not(#\\#):not(#\\#) uc-icon{display:none}[uc-aspect-ratio-freeform]:not(#\\#):not(#\\#):not(#\\#) .uc-title{padding-left:var(--cldtr-gap-mid-1)}:where(uc-editor-freeform-button-control,uc-editor-aspect-ratio-button-control:last-of-type):not(#\\#):not(#\\#):not(#\\#){margin-right:calc(var(--cldtr-gap-mid-1)*3)}:where([uc-cloud-image-editor]):not(#\\#):not(#\\#):not(#\\#) uc-icon{display:flex;height:100%;justify-content:center;width:100%}:where([uc-cloud-image-editor]):not(#\\#):not(#\\#):not(#\\#) uc-icon svg{height:calc(var(--uc-button-size)/2);width:calc(var(--uc-button-size)/2)}uc-cloud-image-editor-activity:not(#\\#){background-color:var(--uc-background);display:flex;height:100%;overflow:hidden;position:relative;width:100%}[uc-modal]:not(#\\#)>dialog:has(uc-cloud-image-editor-activity[active]){height:100%;width:100%}uc-config:not(#\\#){display:none}uc-copyright:not(#\\#){display:flex;justify-content:center;width:100%}uc-copyright:not(#\\#) .uc-credits{all:unset;background-color:var(--uc-background);border-radius:6px;bottom:12px;color:var(--uc-muted-foreground);cursor:pointer;font-size:12px;font-weight:400;opacity:.9;padding:2px 5px;position:absolute;transition:opacity var(--uc-transition),background-color var(--uc-transition)}uc-copyright:not(#\\#) .uc-credits:focus-visible{outline:1px auto Highlight;outline:1px auto -webkit-focus-ring-color}uc-copyright:not(#\\#) .uc-credits:hover{background-color:var(--uc-muted);opacity:1}:where([uc-drop-area]):not(#\\#){border:1px dashed var(--uc-border);border-radius:calc(var(--uc-radius)*1.75);overflow:hidden;padding:2px;transition:border var(--uc-transition),border-radius var(--uc-transition)}:where([uc-drop-area]):not(#\\#),:where([uc-drop-area]):not(#\\#) .uc-content-wrapper{align-items:center;display:flex;height:100%;justify-content:center;width:100%}:where([uc-drop-area]):not(#\\#) .uc-text{color:var(--uc-muted-foreground);margin:var(--uc-padding);position:relative;transition:color var(--uc-transition)}:where([uc-drop-area])[ghost][drag-state=inactive]:not(#\\#){display:none}:where([uc-drop-area])[ghost]:not([fullscreen]):is([drag-state=active],[drag-state=near],[drag-state=over]):not(#\\#){background:var(--uc-background)}:where([uc-drop-area]):is([drag-state=active],[drag-state=near],[drag-state=over],:hover):not(#\\#){background:var(--uc-primary-transparent);border-color:var(--uc-primary-transparent)}:where(.uc-contrast):not(#\\#) :where([uc-drop-area]):is([drag-state=active],[drag-state=near],[drag-state=over],:hover){background:transparent;border-color:var(--uc-foreground);border-style:solid;border-width:2px;color:var(--uc-foreground)}:where([uc-drop-area]):is([drag-state=active],[drag-state=near]):not(#\\#){opacity:1}:where([uc-drop-area])[drag-state=over]:not(#\\#){border-color:var(--uc-primary);opacity:1}:where([uc-drop-area])[with-icon]:not(#\\#){min-height:180px}:where([uc-drop-area])[with-icon]:not(#\\#) .uc-content-wrapper{display:flex;flex-direction:column}:where([uc-drop-area])[with-icon]:not(#\\#) .uc-text{color:var(--uc-foreground);font-size:1.1em;font-weight:500}:where([uc-drop-area])[with-icon]:not(#\\#) .uc-icon-container{background-color:var(--uc-muted);border-radius:50%;color:var(--uc-foreground);height:64px;margin:var(--uc-padding);overflow:hidden;position:relative;transition:color var(--uc-transition),background-color var(--uc-transition);width:64px}:where([uc-drop-area])[with-icon]:not(#\\#) uc-icon{height:32px;left:calc(50% - 16px);position:absolute;top:calc(50% - 16px);transition:transform var(--uc-transition);width:32px}:where([uc-drop-area])[with-icon]:not(#\\#) uc-icon:last-child{transform:translateY(48px)}:where(.uc-contrast):not(#\\#) :where([uc-drop-area])[with-icon]:hover .uc-icon-container,:where(.uc-contrast):not(#\\#) :where([uc-drop-area])[with-icon]:hover .uc-text{color:var(--uc-foreground)}:where([uc-drop-area])[with-icon]:hover:not(#\\#) .uc-icon-container{background-color:var(--uc-primary-transparent)}:where(.uc-contrast):not(#\\#) :where([uc-drop-area])[with-icon]:hover .uc-icon-container{background-color:var(--uc-muted)}:where([uc-drop-area])[with-icon]:not(#\\#)>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) .uc-icon-container{background-color:var(--uc-primary);color:var(--uc-primary-foreground)}:where([uc-drop-area])[with-icon]:not(#\\#)>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) .uc-text{color:var(--uc-foreground)}:where(.uc-contrast):not(#\\#) :where([uc-drop-area])[with-icon]>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) .uc-text{color:var(--uc-foreground)}:where([uc-drop-area])[with-icon]:not(#\\#)>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) uc-icon:first-child{transform:translateY(-48px)}:where([uc-drop-area])[with-icon]:not(#\\#)>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) uc-icon:last-child{transform:translateY(0)}:where([uc-drop-area])[with-icon]:not(#\\#)>.uc-content-wrapper[drag-state=near] uc-icon:last-child{transform:scale(1.3)}:where([uc-drop-area])[with-icon]:not(#\\#)>.uc-content-wrapper[drag-state=over] uc-icon:last-child{transform:scale(1.5)}:where([uc-drop-area])[fullscreen]:not(#\\#){align-items:center;display:flex;height:calc(100vh - var(--uc-padding)*2);inset:0;justify-content:center;margin:var(--uc-padding);position:fixed;width:calc(100vw - var(--uc-padding)*2);z-index:2147483647}:where([uc-drop-area])[fullscreen]:not(#\\#) .uc-content-wrapper{background-color:var(--uc-background);border-radius:calc(var(--uc-radius)*1.75);box-shadow:var(--uc-dialog-shadow);color:var(--uc-foreground);height:180px;max-width:calc(var(--uc-dialog-width)*.8);transition:color var(--uc-transition),background-color var(--uc-transition),box-shadow var(--uc-transition),border-radius var(--uc-transition),transform var(--uc-transition);width:100%}:where([uc-drop-area])[with-icon][fullscreen][drag-state=active]:not(#\\#)>.uc-content-wrapper,:where([uc-drop-area])[with-icon][fullscreen][drag-state=near]:not(#\\#)>.uc-content-wrapper{opacity:0;transform:translateY(10px)}:where([uc-drop-area])[with-icon][fullscreen][drag-state=over]:not(#\\#)>.uc-content-wrapper{opacity:1;transform:translateY(0)}:is(:where([uc-drop-area])[with-icon][fullscreen]):not(#\\#)>.uc-content-wrapper uc-icon:first-child{transform:translateY(-48px)}:where([uc-drop-area])[clickable]:not(#\\#){cursor:pointer}uc-external-source:not(#\\#){background-color:var(--uc-background);display:flex;flex-direction:column;height:100%;overflow:hidden;position:relative;width:100%}[uc-modal]:not(#\\#)>dialog:has(uc-external-source[active]){height:100%;width:100%}uc-external-source:not(#\\#)>.uc-content{display:grid;flex:1;grid-template-rows:1fr min-content;position:relative}uc-external-source:not(#\\#) iframe{border:none;display:block;height:100%;width:100%}uc-external-source:not(#\\#) .uc-iframe-wrapper{overflow:hidden}uc-external-source:not(#\\#) .uc-toolbar{display:flex;width:100%;grid-gap:var(--uc-padding);align-items:center;border-top:1px solid var(--uc-border);justify-content:space-between;padding:var(--uc-padding)}uc-external-source:not(#\\#) .uc-back-btn{padding-left:0}uc-external-source:not(#\\#) .uc-selection-status-box{align-items:center;color:var(--uc-foreground);display:flex;flex-direction:column;justify-content:center}uc-external-source:not(#\\#) .uc-selection-status-box button{background:none;color:var(--uc-primary);height:auto;padding:0}uc-external-source:not(#\\#) .uc-selection-status-box button:hover{text-decoration:underline}uc-external-source:not(#\\#) uc-activity-header{justify-content:flex-end;left:0;pointer-events:none;position:absolute;right:0;top:0;width:100%;z-index:1}uc-external-source:not(#\\#) uc-activity-header .uc-close-btn{pointer-events:auto}uc-external-source:not(#\\#) .uc-done-btn>span.uc-hidden{pointer-events:none;visibility:hidden}uc-external-source:not(#\\#) .uc-done-btn>uc-spinner{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;width:100%}uc-file-item:not(#\\#){--uc-file-item-gap:4px;--uc-file-item-height:calc(var(--uc-preview-size) + var(--uc-padding)*2 + var(--uc-file-item-gap));display:block;min-height:var(--uc-file-item-height);overflow:hidden}uc-file-item:last-of-type:not(#\\#){--uc-file-item-gap:0}uc-file-item:not(#\\#)>.uc-inner{align-items:center;background-color:var(--uc-muted);border-radius:var(--uc-radius);display:grid;font-size:.925em;gap:2px;grid-template-columns:var(--uc-preview-size) 1fr max-content;margin-bottom:var(--uc-file-item-gap);overflow:hidden;padding:var(--uc-padding);position:relative;transition:background-color var(--uc-transition)}uc-file-item:not(#\\#)>.uc-inner[focused]{background-color:transparent}uc-file-item:not(#\\#)>.uc-inner[uploading] .uc-edit-btn{display:none}uc-file-item:not(#\\#)>:where(.uc-inner[failed],.uc-inner[limit-overflow]){background-color:var(--uc-destructive)}uc-file-item:not(#\\#) .uc-thumb{background-color:var(--uc-secondary);background-position:50%;background-repeat:no-repeat;background-size:cover;border-radius:var(--uc-radius);display:inline-flex;height:var(--uc-preview-size);position:relative;width:var(--uc-preview-size)}uc-file-item:not(#\\#) .uc-file-name-wrapper{align-items:flex-start;color:var(--uc-muted-foreground);display:flex;flex-direction:column;justify-content:center;max-width:100%;overflow:hidden;padding-left:var(--uc-padding);padding-right:var(--uc-padding);text-align:left}uc-file-item:not(#\\#) .uc-file-name{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}uc-file-item:not(#\\#) .uc-file-error{color:var(--uc-destructive-foreground);display:none;font-size:.85em;z-index:2}uc-file-item:not(#\\#) button.uc-edit-btn,uc-file-item:not(#\\#) button.uc-remove-btn{color:var(--uc-muted-foreground)}uc-file-item:not(#\\#) button svg{pointer-events:none}uc-file-item:not(#\\#) button.uc-upload-btn{display:none}uc-file-item:not(#\\#) .uc-badge{align-items:center;background-color:var(--uc-foreground);border-radius:50%;bottom:2px;color:var(--uc-background);display:flex;height:14px;justify-content:center;opacity:0;position:absolute;right:2px;transform:scale(.3);transition:opacity var(--uc-transition),transform var(--uc-transition);width:14px}uc-file-item:not(#\\#)>.uc-inner:where([failed],[limit-overflow],[finished]) .uc-badge{opacity:1;transform:scale(1)}uc-file-item:not(#\\#)>.uc-inner:where([failed],[limit-overflow]) .uc-badge{background-color:var(--uc-destructive-foreground)}uc-file-item:not(#\\#)>.uc-inner:where([failed],[limit-overflow]) .uc-file-error{display:block}uc-file-item:not(#\\#) .uc-badge uc-icon,uc-file-item:not(#\\#) .uc-badge uc-icon svg{height:100%;width:100%}uc-file-item:not(#\\#) .uc-progress-bar{height:2px;opacity:.7;top:calc(100% - 2px)}:where(.uc-contrast):not(#\\#) uc-file-item .uc-progress-bar{opacity:1}uc-file-item:not(#\\#) .uc-file-actions{align-items:center;display:flex;gap:2px;justify-content:center}uc-file-item[mode=grid]:not(#\\#){min-height:auto;overflow:visible}uc-file-item[mode=grid]:not(#\\#) .uc-inner{background-color:transparent;border-radius:0;grid-template-columns:1fr;grid-template-rows:1fr max-content;height:100%;margin-bottom:0;padding:0}uc-file-item[mode=grid]:not(#\\#) .uc-inner[failed] .uc-badge{display:none}uc-file-item[mode=grid]:not(#\\#) .uc-thumb{height:100%;width:100%}uc-file-item[mode=grid]:not(#\\#) .uc-badge{bottom:var(--uc-padding);right:var(--uc-padding)}uc-file-item[mode=grid]:not(#\\#) .uc-file-name-wrapper{padding:0}uc-file-item[mode=grid]:not(#\\#) .uc-file-name:not([hidden])+.uc-file-error{bottom:calc(var(--uc-padding) + var(--uc-font-size))}uc-file-item[mode=grid]:not(#\\#) .uc-file-error{background-color:var(--uc-destructive-foreground);bottom:var(--uc-padding);color:var(--uc-background)}uc-file-item[mode=grid]:not(#\\#) .uc-file-error,uc-file-item[mode=grid]:not(#\\#) .uc-file-hint{border-radius:var(--uc-radius);left:var(--uc-padding);padding:calc(var(--uc-padding)/2) var(--uc-padding);position:absolute;right:var(--uc-padding)}uc-file-item[mode=grid]:not(#\\#) .uc-file-hint{background-color:var(--uc-background);bottom:calc(var(--uc-padding)*2);color:var(--uc-foreground)}uc-file-item[mode=grid]:not(#\\#) .uc-file-actions{position:absolute;right:var(--uc-padding);top:var(--uc-padding)}uc-file-item[mode=grid]:not(#\\#) button{background-color:var(--uc-background)}uc-file-item[mode=grid]:not(#\\#) button:hover{background-color:var(--uc-muted)}uc-file-item[mode=grid]:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#) .uc-progress-bar{height:4px!important;top:auto!important}uc-file-item[mode=grid]:not(#\\#) .uc-progress-bar{background-color:var(--uc-background);border-radius:var(--uc-radius);bottom:var(--uc-padding);left:var(--uc-padding);right:var(--uc-padding);transition:background-color .3s,opacity .3s;width:auto;z-index:1}uc-file-item[mode=grid]:not(#\\#) .uc-progress-bar :is(.uc-fake-progress,.uc-progress){background-color:var(--uc-primary)}uc-file-item[mode=grid]:not(#\\#) .uc-progress-bar[hasfilename]{bottom:calc(var(--uc-padding) + var(--uc-font-size))}uc-icon:not(#\\#){align-items:center;display:inline-flex;height:var(--uc-button-size);justify-content:center;width:var(--uc-button-size)}uc-icon:not(#\\#) svg{height:calc(var(--uc-button-size)/2);overflow:visible;width:calc(var(--uc-button-size)/2)}@supports selector(dialog::backdrop){:where([uc-modal]):not(#\\#)>dialog::backdrop{background-color:#0000001a}:where([uc-modal])[strokes]:not(#\\#)>dialog::backdrop{background-image:var(--modal-backdrop-background-image)}}:where([uc-modal]):not(#\\#)>dialog[open]{opacity:1;transform:translateY(0);visibility:visible}:where([uc-modal]):not(#\\#)>dialog:not([open]){opacity:0;transform:translateY(20px);visibility:hidden}:where([uc-modal]):not(#\\#)>dialog{background-color:var(--uc-background);border:0;border-radius:calc(var(--uc-radius)*1.75);box-shadow:var(--uc-dialog-shadow);display:flex;flex-direction:column;margin:auto;max-height:min(calc(100% - var(--uc-padding)*2),var(--uc-dialog-max-height));max-width:min(calc(100% - var(--uc-padding)*2),var(--uc-dialog-max-width));min-height:var(--uc-button-size);overflow:hidden;padding:0;transition:transform .4s ease,opacity .4s ease;width:min(var(--uc-dialog-width),100%)}:where(.uc-contrast):not(#\\#) :where([uc-modal])>dialog{outline:1px solid var(--uc-border)}uc-progress-bar:not(#\\#){--l-progress-value:0;bottom:0;height:100%;left:0;opacity:1;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:opacity .3s;width:100%}uc-progress-bar.uc-progress-bar--hidden:not(#\\#){opacity:0}uc-progress-bar:not(#\\#) .uc-progress{background-color:var(--uc-primary);height:100%;opacity:1;position:absolute;transform:translate(0);transition:width .6s,opacity .3s;width:calc(var(--l-progress-value)*1%)}uc-progress-bar:not(#\\#) .uc-progress--hidden{opacity:0}uc-progress-bar:not(#\\#) .uc-fake-progress{--l-fake-progress-width:30;animation:fake-progress-animation 1s ease-in-out infinite;background-color:var(--uc-primary);height:100%;opacity:1;position:absolute;transition:opacity .3s;width:calc(var(--l-fake-progress-width)*1%);z-index:1}uc-progress-bar:not(#\\#) .uc-fake-progress--hidden{animation:none;opacity:0}uc-progress-bar-common:not(#\\#){background-color:var(--uc-background);bottom:0;display:block;height:10px;left:0;position:fixed;right:0;transition:opacity .3s;z-index:10000}uc-progress-bar-common:not([active]):not(#\\#){opacity:0;pointer-events:none}uc-select:not(#\\#){display:inline-flex}uc-select:not(#\\#) select{align-items:center;background-color:var(--uc-secondary);border:none;border-radius:var(--uc-radius);color:var(--uc-secondary-foreground);cursor:pointer;display:inline-flex;font-family:inherit;font-size:1em;height:var(--uc-button-size);justify-content:center;padding:0 14px;position:relative;transition:background-color var(--uc-transition);user-select:none;white-space:nowrap}:where([uc-simple-btn]):not(#\\#){display:inline-flex;position:relative}:where([uc-simple-btn]):not(#\\#) button{background-color:var(--uc-simple-btn);color:var(--uc-simple-btn-foreground);font-family:var(--uc-simple-btn-font-family);font-size:var(--uc-simple-btn-font-size);gap:.5em;height:auto;padding:var(--uc-simple-btn-padding)}:where([uc-simple-btn]):not(#\\#) button uc-icon{height:auto;width:auto}:where([uc-simple-btn]):not(#\\#) button uc-icon svg{height:.9em;width:.9em}:where([uc-simple-btn]):not(#\\#) button:hover{background-color:var(--uc-simple-btn-hover)}:where([uc-simple-btn]):not(#\\#)>uc-drop-area{display:contents}:where([uc-simple-btn]):not(#\\#) .uc-visual-drop-area{align-items:center;background-color:transparent;border:1px dashed var(--uc-simple-btn-foreground);border-radius:inherit;color:transparent;display:flex;font-size:var(--uc-simple-btn-font-size);height:100%;justify-content:center;left:0;opacity:0;padding:var(--uc-simple-btn-padding);position:absolute;top:0;transition:opacity var(--uc-transition);width:100%}:where([uc-simple-btn]):not(#\\#)>uc-drop-area[drag-state=active] .uc-visual-drop-area{opacity:1}:where([uc-simple-btn]):not(#\\#)>uc-drop-area[drag-state=inactive] .uc-visual-drop-area{opacity:0}:where([uc-simple-btn]):not(#\\#)>uc-drop-area[drag-state=near] .uc-visual-drop-area{opacity:1}:where([uc-simple-btn]):not(#\\#)>uc-drop-area[drag-state=over] .uc-visual-drop-area{opacity:1}uc-source-btn:not(#\\#)>button{align-items:center;background-color:unset;border-radius:var(--uc-radius);color:var(--uc-foreground);cursor:pointer;display:flex;height:unset;margin-bottom:2px;padding:2px var(--uc-padding);transition:background-color var(--uc-transition),color var(--uc-transition);user-select:none;width:100%}uc-source-btn:last-child:not(#\\#)>button{margin-bottom:0}uc-source-btn:not(#\\#)>button:hover{background-color:var(--uc-primary-transparent)}:where(.uc-contrast):not(#\\#) uc-source-btn>button:hover{background-color:var(--uc-secondary);color:var(--uc-foreground)}uc-source-btn:not(#\\#) uc-icon{display:inline-flex;flex-grow:1;justify-content:center;margin-right:var(--uc-padding);min-width:var(--uc-button-size);opacity:.8}:where(.uc-contrast):not(#\\#) uc-source-btn uc-icon{opacity:1}uc-source-btn:not(#\\#) .uc-txt{align-items:center;border:none;box-sizing:border-box;display:flex;height:var(--uc-button-size);padding:0;white-space:nowrap;width:100%}.uc-spinner:not(#\\#){animation:uc-spinner-keyframes .4s linear infinite;border-color:currentcolor transparent transparent currentcolor;border-radius:50%;border-style:solid;border-width:2px;height:1em;width:1em}uc-start-from:not(#\\#){display:block;overflow-y:auto}uc-start-from:not(#\\#) .uc-content{background-color:var(--uc-background);display:grid;gap:calc(var(--uc-padding)*2);grid-auto-flow:row;height:100%;padding:calc(var(--uc-padding)*2);width:100%}[uc-modal]:not(#\\#)>dialog:has(uc-start-from[active]){width:var(--uc-dialog-width)}[uc-modal]:not(#\\#) uc-start-from uc-drop-area{border-radius:var(--uc-radius)}@media only screen and (max-width:430px){[uc-modal]:not(#\\#) uc-start-from uc-drop-area{display:none}}uc-thumb:not(#\\#){height:100%;width:100%}uc-upload-list:not(#\\#){background-color:var(--uc-background);display:flex;flex-direction:column;height:max-content;overflow:hidden;position:relative;transition:opacity var(--uc-transition);width:100%}uc-upload-list:not(#\\#) .uc-no-files{height:32px;padding:20px}uc-upload-list:not(#\\#) .uc-files{display:block;flex:1;min-height:32px;overflow:auto;padding:0 var(--uc-padding)}uc-upload-list:not(#\\#) .uc-files-wrapper{display:contents}uc-upload-list:not(#\\#) .uc-toolbar{background-color:var(--uc-background);display:flex;gap:4px;justify-content:space-between;padding:var(--uc-padding)}uc-upload-list:not(#\\#) .uc-toolbar-spacer{flex:1}uc-upload-list:not(#\\#) uc-drop-area{border-radius:var(--uc-radius);height:calc(100% - var(--uc-padding)*2);left:0;margin:var(--uc-padding);position:absolute;top:0;width:calc(100% - var(--uc-padding)*2)}uc-upload-list:not(#\\#) uc-activity-header>.uc-header-text{padding:0 var(--uc-padding)}uc-upload-list:not(#\\#) .uc-common-error{align-items:center;background-color:var(--uc-destructive);border-radius:var(--uc-radius);color:var(--uc-destructive-foreground);display:flex;font-size:.925em;justify-content:center;margin:4px var(--uc-padding) 0 var(--uc-padding);padding:var(--uc-padding)}uc-upload-list:not(#\\#) .uc-add-more-btn uc-icon{display:none}uc-upload-list[mode=grid]:not(#\\#) .uc-files{display:flex;flex-wrap:wrap;gap:var(--uc-grid-gap)}uc-upload-list:not(#\\#) .uc-files .uc-add-more-btn,uc-upload-list[mode=grid]:not(#\\#) uc-file-item{aspect-ratio:var(--uc-grid-aspect-ratio);flex:0 0 calc((100% - var(--uc-grid-gap)*(var(--uc-grid-col) - 1))/var(--uc-grid-col));height:var(--uc-grid-preview-image-height);max-width:calc((100% - var(--uc-grid-gap)*(var(--uc-grid-col) - 1))/var(--uc-grid-col))}uc-upload-list:not(#\\#) .uc-files .uc-add-more-btn{display:none}uc-url-source:not(#\\#){background-color:var(--uc-background);display:block}uc-url-source:not(#\\#)>.uc-content{display:grid;grid-gap:4px;grid-template-columns:1fr min-content;padding:var(--uc-padding);padding-top:0}uc-url-source:not(#\\#) .uc-url-input{display:flex}[uc-file-uploader-inline]:not(#\\#):not(#\\#):not(#\\#) uc-start-from{container-type:inline-size;height:100%}[uc-file-uploader-inline]:not(#\\#):not(#\\#):not(#\\#){--cfg-done-activity:"start-from";--cfg-init-activity:"start-from";flex:1}[uc-file-uploader-inline]:not(#\\#):not(#\\#):not(#\\#) uc-activity-header:after{content:"";height:var(--uc-button-size);width:var(--uc-button-size)}[uc-file-uploader-inline]:not(#\\#):not(#\\#):not(#\\#) uc-activity-header .uc-close-btn{display:none}[uc-file-uploader-inline]:not(#\\#):not(#\\#):not(#\\#) uc-copyright .uc-credits{position:static}@container (min-width: 500px){[uc-file-uploader-inline]:not(#\\#):not(#\\#):not(#\\#) uc-start-from .uc-content{grid-template-columns:1fr max-content;height:100%}[uc-file-uploader-inline]:not(#\\#):not(#\\#):not(#\\#) uc-start-from uc-copyright{grid-column:2}[uc-file-uploader-inline]:not(#\\#):not(#\\#):not(#\\#) uc-start-from uc-drop-area{grid-row:span 3}[uc-file-uploader-inline]:not(#\\#):not(#\\#):not(#\\#) uc-start-from:has(uc-copyright[hidden]) uc-drop-area{grid-row:span 2}[uc-file-uploader-inline]:not(#\\#):not(#\\#):not(#\\#) uc-start-from:has(.uc-cancel-btn[hidden]) uc-drop-area{grid-row:span 2}[uc-file-uploader-inline]:not(#\\#):not(#\\#):not(#\\#) uc-start-from:has(uc-copyright[hidden]):has(.uc-cancel-btn[hidden]) uc-drop-area{grid-row:span 1}}:where([uc-file-uploader-minimal]):not(#\\#):not(#\\#):not(#\\#){--cfg-init-activity:"start-from";--cfg-done-activity:"upload-list";display:block;position:relative}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#)>uc-start-from .uc-content{align-items:center;background-color:transparent;display:flex;flex-direction:column;gap:4px;overflow:hidden;padding:0}:where([uc-file-uploader-minimal]>uc-start-from uc-drop-area):not(#\\#):not(#\\#):not(#\\#){align-items:center;background-color:var(--uc-muted);border-radius:calc(var(--uc-radius)*1.75);display:flex;justify-content:center;min-height:calc(var(--uc-preview-size) + var(--uc-padding)*2 + 8px);padding:0;position:relative;text-align:center;width:100%}:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) :where([uc-file-uploader-minimal]>uc-start-from uc-drop-area){background-color:transparent}:where([uc-file-uploader-minimal]>uc-start-from uc-drop-area):not(#\\#):not(#\\#):not(#\\#):before{background-color:var(--uc-background);content:"";height:100%;position:absolute;width:100%;z-index:-1}:where([uc-file-uploader-minimal]:has([single])>uc-start-from uc-drop-area):not(#\\#):not(#\\#):not(#\\#){aspect-ratio:var(--uc-grid-aspect-ratio)}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list uc-activity-header{display:none}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list>.uc-toolbar{background-color:transparent}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list{background-color:var(--uc-background);border:1px dashed var(--uc-border);border-radius:calc(var(--uc-radius)*1.75);height:unset;padding:4px;width:100%}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-files{padding:0}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-toolbar{display:block;padding:0}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-toolbar .uc-cancel-btn,[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-toolbar .uc-done-btn,[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-toolbar .uc-upload-btn{display:none}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-toolbar .uc-add-more-btn{height:calc(var(--uc-preview-size) + var(--uc-padding)*2);margin-top:4px;width:100%}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-toolbar .uc-add-more-btn>span,[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-toolbar .uc-add-more-btn[disabled]{display:none}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-toolbar .uc-add-more-btn>uc-icon{display:flex}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-file-item uc-progress-bar{height:100%!important;top:0!important}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-file-item uc-progress-bar .uc-fake-progress,[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-file-item uc-progress-bar .uc-progress{background-color:var(--uc-primary-transparent);border-radius:var(--uc-radius)}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list uc-drop-area{border-radius:calc(var(--uc-radius)*1.75);height:100%;margin:0;width:100%}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-common-error{margin:4px 0 0}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-copyright .uc-credits{position:static}[uc-file-uploader-minimal][mode=grid]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-toolbar .uc-add-more-btn{display:none}[uc-file-uploader-minimal][mode=grid]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-files .uc-add-more-btn{display:flex}[uc-file-uploader-minimal][mode=grid]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-files .uc-add-more-btn>span{display:none}[uc-file-uploader-minimal][mode=grid]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-files .uc-add-more-btn>uc-icon{display:flex}:where([uc-wgt-common]){--cfg-init-activity:"start-from";--cfg-done-activity:""}:where([uc-wgt-common]){--uc-font-family:system-ui;--uc-font-size:14px;--uc-line-height:normal;--uc-simple-btn-font-family:system-ui;--uc-simple-btn-font-size:14px;--uc-button-size:32px;--uc-preview-size:32px;--uc-padding:10px;--uc-radius:8px;--uc-transition:.2s ease;--uc-dialog-width:430px;--uc-dialog-max-width:920px;--uc-dialog-max-height:675px;--uc-simple-btn-padding:7px 14px;--uc-grid-col:3;--uc-grid-preview-image-height:auto;--uc-grid-gap:calc(var(--uc-padding)/2);--uc-grid-aspect-ratio:1/1;--uc-background:var(--uc-background-light);--uc-foreground:var(--uc-foreground-light);--uc-primary:var(--uc-primary-light);--uc-primary-hover:var(--uc-primary-hover-light);--uc-primary-transparent:var(--uc-primary-transparent-light);--uc-primary-foreground:var(--uc-primary-foreground-light);--uc-secondary:var(--uc-secondary-light);--uc-secondary-hover:var(--uc-secondary-hover-light);--uc-secondary-foreground:var(--uc-secondary-foreground-light);--uc-muted:var(--uc-muted-light);--uc-muted-foreground:var(--uc-muted-foreground-light);--uc-destructive:var(--uc-destructive-light);--uc-destructive-foreground:var(--uc-destructive-foreground-light);--uc-border:var(--uc-border-light);--uc-dialog-shadow:var(--uc-dialog-shadow-light);--uc-simple-btn:var(--uc-simple-btn-light);--uc-simple-btn-hover:var(--uc-simple-btn-hover-light);--uc-simple-btn-foreground:var(--uc-simple-btn-foreground-light)}@supports not (color:oklch(0% 0 0)){:where([uc-wgt-common]){--uc-primary-rgb-light:23 75 215;--uc-primary-light:rgb(var(--uc-primary-rgb-light));--uc-primary-hover-light:rgb(var(--uc-primary-rgb-light)/90%);--uc-primary-transparent-light:rgb(var(--uc-primary-rgb-light)/10%);--uc-background-light:#fff;--uc-foreground-light:#181818;--uc-primary-foreground-light:#fff;--uc-secondary-light:hsla(0,0%,9%,.05);--uc-secondary-hover-light:hsla(0,0%,9%,.08);--uc-secondary-foreground-light:#181818;--uc-muted-light:#f5f5f5;--uc-muted-foreground-light:#717171;--uc-destructive-light:rgb(232 19 20/5%);--uc-destructive-foreground-light:#e81314;--uc-border-light:#e4e4e8;--uc-dialog-shadow-light:0px 6px 20px rgba(0,0,0,.1);--uc-simple-btn-light:#ebebeb;--uc-simple-btn-hover-light:#e4e4e4;--uc-simple-btn-foreground-light:#181818;--uc-primary-rgb-dark:87 154 255;--uc-primary-dark:rgb(var(--uc-primary-rgb-dark));--uc-primary-hover-dark:rgb(var(--uc-primary-rgb-dark)/90%);--uc-primary-transparent-dark:rgb(var(--uc-primary-rgb-dark)/7%);--uc-background-dark:#1b1b1b;--uc-foreground-dark:#e1e1e1;--uc-primary-foreground-dark:#000;--uc-secondary-dark:hsla(0,0%,88%,.07);--uc-secondary-hover-dark:hsla(0,0%,88%,.1);--uc-secondary-foreground-dark:#e1e1e1;--uc-muted-dark:#242424;--uc-muted-foreground-dark:#989898;--uc-destructive-dark:rgba(244,90,79,.1);--uc-destructive-foreground-dark:#f45a4f;--uc-border-dark:#3d3d3d;--uc-dialog-shadow-dark:0px 6px 20px rgba(0,0,0,.25);--uc-simple-btn-dark:#242424;--uc-simple-btn-hover-dark:#2b2b2b;--uc-simple-btn-foreground-dark:#fff}}@supports (color:oklch(0% 0 0)){:where([uc-wgt-common]){--uc-primary-oklch-light:47% .22 264;--uc-primary-light:oklch(var(--uc-primary-oklch-light));--uc-primary-hover-light:oklch(var(--uc-primary-oklch-light)/90%);--uc-primary-transparent-light:oklch(var(--uc-primary-oklch-light)/7%);--uc-background-light:oklch(100% 0 0);--uc-foreground-light:oklch(21% 0 0);--uc-primary-foreground-light:oklch(100% 0 0);--uc-secondary-light:oklch(21% 0 0/.05);--uc-secondary-hover-light:oklch(21% 0 0/.08);--uc-secondary-foreground-light:oklch(21% 0 0);--uc-muted-light:oklch(97% 0 0);--uc-muted-foreground-light:oklch(40% 0 0);--uc-destructive-light:oklch(59% .235 28.5/.05);--uc-destructive-foreground-light:oklch(59% .235 28.5);--uc-border-light:oklch(92% 0 0);--uc-dialog-shadow-light:0px 6px 20px oklch(0% 0 0/.1);--uc-simple-btn-light:oklch(94% 0 0);--uc-simple-btn-hover-light:oklch(92% 0 0);--uc-simple-btn-foreground-light:oklch(20% 0 0);--uc-primary-oklch-dark:69% .1768 258.4;--uc-primary-dark:oklch(var(--uc-primary-oklch-dark));--uc-primary-hover-dark:oklch(var(--uc-primary-oklch-dark)/90%);--uc-primary-transparent-dark:oklch(var(--uc-primary-oklch-dark)/7%);--uc-background-dark:oklch(22% 0 0);--uc-foreground-dark:oklch(91% 0 0);--uc-primary-foreground-dark:oklch(0% 0 0);--uc-secondary-dark:oklch(91% 0 0/.07);--uc-secondary-hover-dark:oklch(91% 0 0/.1);--uc-secondary-foreground-dark:oklch(91% 0 0);--uc-muted-dark:oklch(26% 0 0);--uc-muted-foreground-dark:oklch(68% 0 0);--uc-destructive-dark:oklch(67% .191 27.5/.1);--uc-destructive-foreground-dark:oklch(67% .191 27.5);--uc-border-dark:oklch(36% 0 0);--uc-dialog-shadow-dark:0px 6px 20px oklch(0% 0 0/.25);--uc-simple-btn-dark:oklch(26% 0 0);--uc-simple-btn-hover-dark:oklch(29% 0 0);--uc-simple-btn-foreground-dark:oklch(100% 0 0)}}@media only screen and (max-height:600px){:where([uc-wgt-common]){--uc-dialog-max-height:100%}}@media only screen and (max-width:680px){:where([uc-wgt-common]){--uc-grid-col:2}}@media only screen and (max-width:430px){:where([uc-wgt-common]){--uc-dialog-max-width:100vw;--uc-dialog-max-height:var(--uploadcare-blocks-window-height);--uc-grid-col:1}}@media (prefers-color-scheme:light){:where([uc-wgt-common]){--uc-background:var(--uc-background-light);--uc-foreground:var(--uc-foreground-light);--uc-primary:var(--uc-primary-light);--uc-primary-hover:var(--uc-primary-hover-light);--uc-primary-transparent:var(--uc-primary-transparent-light);--uc-primary-foreground:var(--uc-primary-foreground-light);--uc-secondary:var(--uc-secondary-light);--uc-secondary-hover:var(--uc-secondary-hover-light);--uc-secondary-foreground:var(--uc-secondary-foreground-light);--uc-muted:var(--uc-muted-light);--uc-muted-foreground:var(--uc-muted-foreground-light);--uc-destructive:var(--uc-destructive-light);--uc-destructive-foreground:var(--uc-destructive-foreground-light);--uc-border:var(--uc-border-light);--uc-dialog-shadow:var(--uc-dialog-shadow-light);--uc-simple-btn:var(--uc-simple-btn-light);--uc-simple-btn-hover:var(--uc-simple-btn-hover-light);--uc-simple-btn-foreground:var(--uc-simple-btn-foreground-light)}}@media (prefers-color-scheme:dark){:where([uc-wgt-common]){--uc-background:var(--uc-background-dark);--uc-foreground:var(--uc-foreground-dark);--uc-primary:var(--uc-primary-dark);--uc-primary-hover:var(--uc-primary-hover-dark);--uc-primary-transparent:var(--uc-primary-transparent-dark);--uc-primary-foreground:var(--uc-primary-foreground-dark);--uc-secondary:var(--uc-secondary-dark);--uc-secondary-hover:var(--uc-secondary-hover-dark);--uc-secondary-foreground:var(--uc-secondary-foreground-dark);--uc-muted:var(--uc-muted-dark);--uc-muted-foreground:var(--uc-muted-foreground-dark);--uc-destructive:var(--uc-destructive-dark);--uc-destructive-foreground:var(--uc-destructive-foreground-dark);--uc-border:var(--uc-border-dark);--uc-dialog-shadow:var(--uc-dialog-shadow-dark);--uc-simple-btn:var(--uc-simple-btn-dark);--uc-simple-btn-hover:var(--uc-simple-btn-hover-dark);--uc-simple-btn-foreground:var(--uc-simple-btn-foreground-dark)}}:where(.uc-light){--uc-background:var(--uc-background-light);--uc-foreground:var(--uc-foreground-light);--uc-primary:var(--uc-primary-light);--uc-primary-hover:var(--uc-primary-hover-light);--uc-primary-transparent:var(--uc-primary-transparent-light);--uc-primary-foreground:var(--uc-primary-foreground-light);--uc-secondary:var(--uc-secondary-light);--uc-secondary-hover:var(--uc-secondary-hover-light);--uc-secondary-foreground:var(--uc-secondary-foreground-light);--uc-muted:var(--uc-muted-light);--uc-muted-foreground:var(--uc-muted-foreground-light);--uc-destructive:var(--uc-destructive-light);--uc-destructive-foreground:var(--uc-destructive-foreground-light);--uc-border:var(--uc-border-light);--uc-dialog-shadow:var(--uc-dialog-shadow-light);--uc-simple-btn:var(--uc-simple-btn-light);--uc-simple-btn-hover:var(--uc-simple-btn-hover-light);--uc-simple-btn-foreground:var(--uc-simple-btn-foreground-light)}:where(.uc-dark){--uc-background:var(--uc-background-dark);--uc-foreground:var(--uc-foreground-dark);--uc-primary:var(--uc-primary-dark);--uc-primary-hover:var(--uc-primary-hover-dark);--uc-primary-transparent:var(--uc-primary-transparent-dark);--uc-primary-foreground:var(--uc-primary-foreground-dark);--uc-secondary:var(--uc-secondary-dark);--uc-secondary-hover:var(--uc-secondary-hover-dark);--uc-secondary-foreground:var(--uc-secondary-foreground-dark);--uc-muted:var(--uc-muted-dark);--uc-muted-foreground:var(--uc-muted-foreground-dark);--uc-destructive:var(--uc-destructive-dark);--uc-destructive-foreground:var(--uc-destructive-foreground-dark);--uc-border:var(--uc-border-dark);--uc-dialog-shadow:var(--uc-dialog-shadow-dark);--uc-simple-btn:var(--uc-simple-btn-dark);--uc-simple-btn-hover:var(--uc-simple-btn-hover-dark);--uc-simple-btn-foreground:var(--uc-simple-btn-foreground-dark)}:where(.uc-purple){--uc-primary-oklch-light:47% .22 300;--uc-primary-oklch-dark:69% .1768 300}:where(.uc-red){--uc-primary-oklch-light:47% .21 21;--uc-primary-oklch-dark:71% .1768 21}:where(.uc-orange){--uc-primary-oklch-light:47% .1376 51.88;--uc-primary-oklch-dark:69% .1768 51.88}:where(.uc-green){--uc-primary-oklch-light:45% .14 130;--uc-primary-oklch-dark:69% .1768 130}:where(.uc-turquoise){--uc-primary-oklch-light:45% .0854 174;--uc-primary-oklch-dark:69% .1768 174}:where(.uc-gray){--uc-primary-oklch-light:10% 0 0;--uc-primary-oklch-dark:97% 0 0}:where(.uc-contrast){--uc-border-light:oklch(50% 0 0);--uc-border-dark:oklch(50% 0 0);--uc-muted-light:oklch(98% 0 0);--uc-muted-dark:oklch(16% 0 0);--uc-muted-foreground-light:oklch(20% 0 0);--uc-muted-foreground-dark:oklch(80% 0 0);--uc-background-light:oklch(100% 0 0);--uc-foreground-light:oklch(0% 0 0);--uc-background-dark:oklch(10% 0 0);--uc-foreground-dark:oklch(100% 0 0)}:where([uc-wgt-common]){color:var(--uc-foreground);font-family:var(--uc-font-family);font-size:var(--uc-font-size);line-height:var(--uc-line-height)}:where([uc-wgt-common]) *{box-sizing:border-box}:where([uc-wgt-common]) button{align-items:center;border:none;border-radius:var(--uc-radius);cursor:pointer;display:flex;font-family:inherit;font-size:1em;height:var(--uc-button-size);justify-content:center;padding-left:14px;padding-right:14px;transition:background-color var(--uc-transition);user-select:none;white-space:nowrap}:where([uc-wgt-common]) button:focus-visible{outline-offset:2px}:where([uc-wgt-common]) button.uc-primary-btn{background-color:var(--uc-primary);color:var(--uc-primary-foreground)}:where([uc-wgt-common]) button.uc-primary-btn:hover{background-color:var(--uc-primary-hover)}:where([uc-wgt-common]) button.uc-secondary-btn{background-color:var(--uc-secondary);color:var(--uc-secondary-foreground)}:where([uc-wgt-common]) button.uc-secondary-btn:hover{background-color:var(--uc-secondary-hover)}:where([uc-wgt-common].uc-contrast) button.uc-secondary-btn{border:1px solid var(--uc-border)}:where([uc-wgt-common]) button.uc-mini-btn{background-color:transparent;color:var(--uc-secondary-foreground);height:var(--uc-button-size);padding:0}:where([uc-wgt-common]) button.uc-mini-btn:hover{background-color:var(--uc-secondary)}:where([uc-wgt-common]) :is(button[disabled],button.uc-primary-btn[disabled],button.uc-secondary-btn[disabled]){opacity:.5;pointer-events:none}:where([uc-wgt-common]) a{color:var(--uc-primary);text-decoration:none}:where([uc-wgt-common]) a[disabled]{pointer-events:none}:where([uc-wgt-common]) input[type=text]{background-color:var(--uc-background);border:1px solid var(--uc-border);border-radius:var(--uc-radius);color:var(--uc-foreground);display:flex;font-family:inherit;font-size:1em;height:var(--uc-button-size);outline:1px solid transparent;padding-left:10px;padding-right:10px;transition:border-color var(--uc-transition),outline-color var(--uc-transition);width:100%}:where([uc-wgt-common]) input[type=text]::placeholder{color:var(--uc-muted-foreground)}:where([uc-wgt-common]) input[type=text]:focus{border-color:var(--uc-primary-hover);outline-color:var(--uc-primary-hover)}:where([uc-wgt-common]) input[disabled]{opacity:.6;pointer-events:none}:where([uc-wgt-common]) select[disabled],:where([uc-wgt-common]) uc-select[disabled]{opacity:.6;pointer-events:none}:where([uc-wgt-common]):not(#\\#):not(#\\#) [hidden]{display:none}:where([uc-wgt-common]):not(#\\#):not(#\\#) [activity]:not([active],.active){display:none}:where([uc-wgt-common]):not(#\\#):not(#\\#) dialog:not([open]) [activity]{display:none}:where([uc-wgt-common]):not(#\\#):not(#\\#):not(#\\#):not(#\\#) uc-source-btn[type]{all:unset}`,""]);const h=u},659:t=>{"use strict";t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="},741:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},779:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var r="",o=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),o&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),o&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r}).join("")},e.i=function(t,r,o,i,n){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(o)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(a[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);o&&a[u[0]]||(void 0!==n&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=n),r&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=r):u[2]=r),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),e.push(u))}},e}},782:(t,e,r)=>{t.exports=r(237)("./src/core.js")},908:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var o=r(106),i=r.n(o),n=r(779),a=r.n(n)()(i());a.push([t.id,":root{--ck-uploadcare-form-view-width:700px;--ck-uploadcare-external-source-view-height:350px;--ck-uploadcare-color-image-background:oklch(0.97 0 0);--ck-uploadcare-color-icon-error:#db3700;--ck-uploadcare-color-skeleton:#fafafa}.ck .ck-uploadcare-form,.ck .ck-uploadcare-form:not(#\\#){max-width:100%;width:var(--ck-uploadcare-form-view-width)}.ck .ck-uploadcare-form .ck-uploadcare-form__loading .ck-uploadcare-form__loading-spinner,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__loading .ck-uploadcare-form__loading-spinner{align-items:center;background-color:var(--ck-uploadcare-color-image-background);display:flex;flex-direction:column;height:var(--ck-uploadcare-external-source-view-height);justify-content:center;width:100%}.ck .ck-uploadcare-form .ck-uploadcare-form__loading .ck-uploadcare-form__loading-spinner .ck-spinner-container,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__loading .ck-uploadcare-form__loading-spinner .ck-spinner-container{margin-bottom:10px}.ck .ck-uploadcare-form .ck-uploadcare-form__error .ck-uploadcare-form__error-contents,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__error .ck-uploadcare-form__error-contents{align-items:center;background-color:var(--ck-uploadcare-color-image-background);display:flex;flex-direction:column;gap:5px;height:var(--ck-uploadcare-external-source-view-height);justify-content:center;width:100%}.ck .ck-uploadcare-form .ck-uploadcare-form__error .ck-uploadcare-form__error-contents h3,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__error .ck-uploadcare-form__error-contents h3{font-weight:700;margin:0;padding:0}.ck .ck-uploadcare-form .ck-uploadcare-form__error .ck-uploadcare-form__error-contents .ck-icon,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__error .ck-uploadcare-form__error-contents .ck-icon{color:var(--ck-uploadcare-color-icon-error)}.ck .ck-uploadcare-form .ck-uploadcare-form__error .ck-uploadcare-form__error-contents .ck-button,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__error .ck-uploadcare-form__error-contents .ck-button{margin-top:10px}.ck .ck-uploadcare-form .ck-uploadcare-form__skeleton,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__skeleton{height:115px;width:100%}.ck .ck-uploadcare-form .ck-uploadcare-form__skeleton div,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__skeleton div{align-items:center;box-sizing:border-box;display:flex;flex-direction:row;height:50%;justify-content:center;min-width:100%}.ck .ck-uploadcare-form .ck-uploadcare-form__skeleton div span,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__skeleton div span{background-color:var(--ck-uploadcare-color-skeleton);display:block;height:32px;width:32px}.ck .ck-uploadcare-form .ck-uploadcare-form__skeleton div+div,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__skeleton div+div{gap:20px}.ck .ck-uploadcare-form .ck-uploadcare-form__skeleton div+div span:first-child,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__skeleton div+div span:first-child{left:8px;position:absolute;width:80px}.ck .ck-uploadcare-form .ck-uploadcare-form__skeleton div+div span:last-child,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__skeleton div+div span:last-child{position:absolute;right:8px;width:80px}.ck .ck-uploadcare-form .ck-uploadcare-form__skeleton div:first-child,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__skeleton div:first-child{gap:4px}.ck .ck-uploadcare-form .mini-btn,.ck .ck-uploadcare-form:not(#\\#) .mini-btn{display:none}.ck .ck-uploadcare-form .uc-viewport,.ck .ck-uploadcare-form:not(#\\#) .uc-viewport{height:var(--ck-uploadcare-external-source-view-height)}.ck .ck-uploadcare-form .uc-primary-btn,.ck .ck-uploadcare-form .uc-secondary-btn,.ck .ck-uploadcare-form uc-btn-ui button,.ck .ck-uploadcare-form:not(#\\#) .uc-primary-btn,.ck .ck-uploadcare-form:not(#\\#) .uc-secondary-btn,.ck .ck-uploadcare-form:not(#\\#) uc-btn-ui button{min-height:var(--ck-ui-component-min-height);min-width:var(--ck-ui-component-min-height);padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}.ck .ck-uploadcare-form .uc-primary-btn,.ck .ck-uploadcare-form uc-btn-ui.uc-primary button,.ck .ck-uploadcare-form:not(#\\#) .uc-primary-btn,.ck .ck-uploadcare-form:not(#\\#) uc-btn-ui.uc-primary button{background:var(--ck-color-button-action-background)}.ck .ck-uploadcare-form .uc-primary-btn:not(.ck-disabled):hover,.ck .ck-uploadcare-form uc-btn-ui.uc-primary button:not(.ck-disabled):hover,.ck .ck-uploadcare-form:not(#\\#) .uc-primary-btn:not(.ck-disabled):hover,.ck .ck-uploadcare-form:not(#\\#) uc-btn-ui.uc-primary button:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck .ck-uploadcare-form .uc-primary-btn:not(.ck-disabled):active,.ck .ck-uploadcare-form uc-btn-ui.uc-primary button:not(.ck-disabled):active,.ck .ck-uploadcare-form:not(#\\#) .uc-primary-btn:not(.ck-disabled):active,.ck .ck-uploadcare-form:not(#\\#) uc-btn-ui.uc-primary button:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background)}.ck .ck-uploadcare-form .uc-primary-btn.ck-disabled,.ck .ck-uploadcare-form uc-btn-ui.uc-primary button.ck-disabled,.ck .ck-uploadcare-form:not(#\\#) .uc-primary-btn.ck-disabled,.ck .ck-uploadcare-form:not(#\\#) uc-btn-ui.uc-primary button.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck .ck-uploadcare-form .uc-secondary-btn,.ck .ck-uploadcare-form uc-btn-ui.uc-secondary button,.ck .ck-uploadcare-form:not(#\\#) .uc-secondary-btn,.ck .ck-uploadcare-form:not(#\\#) uc-btn-ui.uc-secondary button{background:var(--ck-color-button-default-background)}.ck .ck-uploadcare-form .uc-secondary-btn:not(.ck-disabled):hover,.ck .ck-uploadcare-form uc-btn-ui.uc-secondary button:not(.ck-disabled):hover,.ck .ck-uploadcare-form:not(#\\#) .uc-secondary-btn:not(.ck-disabled):hover,.ck .ck-uploadcare-form:not(#\\#) uc-btn-ui.uc-secondary button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck .ck-uploadcare-form .uc-secondary-btn:not(.ck-disabled):active,.ck .ck-uploadcare-form uc-btn-ui.uc-secondary button:not(.ck-disabled):active,.ck .ck-uploadcare-form:not(#\\#) .uc-secondary-btn:not(.ck-disabled):active,.ck .ck-uploadcare-form:not(#\\#) uc-btn-ui.uc-secondary button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background)}.ck .ck-uploadcare-form .uc-secondary-btn.ck-disabled,.ck .ck-uploadcare-form uc-btn-ui.uc-secondary button.ck-disabled,.ck .ck-uploadcare-form:not(#\\#) .uc-secondary-btn.ck-disabled,.ck .ck-uploadcare-form:not(#\\#) uc-btn-ui.uc-secondary button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck .ck-uploadcare-form uc-upload-list .uc-toolbar,.ck .ck-uploadcare-form:not(#\\#) uc-upload-list .uc-toolbar{gap:var(--ck-spacing-large)}.ck .ck-uploadcare-form uc-upload-list .uc-files,.ck .ck-uploadcare-form:not(#\\#) uc-upload-list .uc-files{max-height:var(--ck-uploadcare-external-source-view-height);overflow-y:auto;padding-top:var(--ck-spacing-large)}.ck .ck-uploadcare-form .uc-content,.ck .ck-uploadcare-form:not(#\\#) .uc-content{gap:var(--ck-spacing-large);padding:var(--ck-spacing-large)}.ck .ck-uploadcare-form .uc-content>.uc-iframe-wrapper,.ck .ck-uploadcare-form:not(#\\#) .uc-content>.uc-iframe-wrapper{height:var(--ck-uploadcare-external-source-view-height)}.ck .ck-uploadcare-form .uc-content>.uc-toolbar,.ck .ck-uploadcare-form:not(#\\#) .uc-content>.uc-toolbar{padding:var(--ck-spacing-large) 0 0}.ck .ck-uploadcare-form uc-start-from .uc-content,.ck .ck-uploadcare-form:not(#\\#) uc-start-from .uc-content{gap:0}.ck .ck-uploadcare-form uc-file-item>.uc-inner,.ck .ck-uploadcare-form:not(#\\#) uc-file-item>.uc-inner{font-size:1em}.ck .ck-uploadcare-form uc-file-item>.uc-inner:where([finished]) .uc-badge,.ck .ck-uploadcare-form:not(#\\#) uc-file-item>.uc-inner:where([finished]) .uc-badge{background:var(--ck-color-button-action-active-background)}.ck .ck-uploadcare-form uc-external-source .uc-cancel-btn,.ck .ck-uploadcare-form:not(#\\#) uc-external-source .uc-cancel-btn{pointer-events:none;visibility:hidden}.ck .ck-uploadcare-form uc-activity-header,.ck .ck-uploadcare-form uc-source-list,.ck .ck-uploadcare-form:not(#\\#) uc-activity-header,.ck .ck-uploadcare-form:not(#\\#) uc-source-list{display:none}.ck .ck-uploadcare-form uc-cloud-image-editor-block [icon=closeMax] .uc-icon_left,.ck .ck-uploadcare-form:not(#\\#) uc-cloud-image-editor-block [icon=closeMax] .uc-icon_left{transform:rotate(90deg)}",""]);const s=a},929:t=>{"use strict";var e=[];function r(t){for(var r=-1,o=0;o<e.length;o++)if(e[o].identifier===t){r=o;break}return r}function o(t,o){for(var n={},a=[],s=0;s<t.length;s++){var c=t[s],l=o.base?c[0]+o.base:c[0],u=n[l]||0,d="".concat(l," ").concat(u);n[l]=u+1;var h=r(d),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)e[h].references++,e[h].updater(p);else{var g=i(p,o);o.byIndex=s,e.splice(s,0,{identifier:d,updater:g,references:1})}a.push(d)}return a}function i(t,e){var r=e.domAPI(e);r.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;r.update(t=e)}else r.remove()}}t.exports=function(t,i){var n=o(t=t||[],i=i||{});return function(t){t=t||[];for(var a=0;a<n.length;a++){var s=r(n[a]);e[s].references--}for(var c=o(t,i),l=0;l<n.length;l++){var u=r(n[l]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}n=c}}},947:(t,e,r)=>{"use strict";r.d(e,{A:()=>h});var o=r(106),i=r.n(o),n=r(779),a=r.n(n),s=r(474),c=r.n(s),l=new URL(r(659),r.b),u=a()(i()),d=c()(l);u.push([t.id,`:where([uc-wgt-common]){--uc-font-family:system-ui;--uc-font-size:14px;--uc-line-height:normal;--uc-simple-btn-font-family:system-ui;--uc-simple-btn-font-size:14px;--uc-button-size:32px;--uc-preview-size:32px;--uc-padding:10px;--uc-radius:8px;--uc-transition:.2s ease;--uc-dialog-width:430px;--uc-dialog-max-width:920px;--uc-dialog-max-height:675px;--uc-simple-btn-padding:7px 14px;--uc-grid-col:3;--uc-grid-preview-image-height:auto;--uc-grid-gap:calc(var(--uc-padding)/2);--uc-grid-aspect-ratio:1/1;--uc-background:var(--uc-background-light);--uc-foreground:var(--uc-foreground-light);--uc-primary:var(--uc-primary-light);--uc-primary-hover:var(--uc-primary-hover-light);--uc-primary-transparent:var(--uc-primary-transparent-light);--uc-primary-foreground:var(--uc-primary-foreground-light);--uc-secondary:var(--uc-secondary-light);--uc-secondary-hover:var(--uc-secondary-hover-light);--uc-secondary-foreground:var(--uc-secondary-foreground-light);--uc-muted:var(--uc-muted-light);--uc-muted-foreground:var(--uc-muted-foreground-light);--uc-destructive:var(--uc-destructive-light);--uc-destructive-foreground:var(--uc-destructive-foreground-light);--uc-border:var(--uc-border-light);--uc-dialog-shadow:var(--uc-dialog-shadow-light);--uc-simple-btn:var(--uc-simple-btn-light);--uc-simple-btn-hover:var(--uc-simple-btn-hover-light);--uc-simple-btn-foreground:var(--uc-simple-btn-foreground-light)}@supports not (color:oklch(0% 0 0)){:where([uc-wgt-common]){--uc-primary-rgb-light:23 75 215;--uc-primary-light:rgb(var(--uc-primary-rgb-light));--uc-primary-hover-light:rgb(var(--uc-primary-rgb-light)/90%);--uc-primary-transparent-light:rgb(var(--uc-primary-rgb-light)/10%);--uc-background-light:#fff;--uc-foreground-light:#181818;--uc-primary-foreground-light:#fff;--uc-secondary-light:hsla(0,0%,9%,.05);--uc-secondary-hover-light:hsla(0,0%,9%,.08);--uc-secondary-foreground-light:#181818;--uc-muted-light:#f5f5f5;--uc-muted-foreground-light:#717171;--uc-destructive-light:rgb(232 19 20/5%);--uc-destructive-foreground-light:#e81314;--uc-border-light:#e4e4e8;--uc-dialog-shadow-light:0px 6px 20px rgba(0,0,0,.1);--uc-simple-btn-light:#ebebeb;--uc-simple-btn-hover-light:#e4e4e4;--uc-simple-btn-foreground-light:#181818;--uc-primary-rgb-dark:87 154 255;--uc-primary-dark:rgb(var(--uc-primary-rgb-dark));--uc-primary-hover-dark:rgb(var(--uc-primary-rgb-dark)/90%);--uc-primary-transparent-dark:rgb(var(--uc-primary-rgb-dark)/7%);--uc-background-dark:#1b1b1b;--uc-foreground-dark:#e1e1e1;--uc-primary-foreground-dark:#000;--uc-secondary-dark:hsla(0,0%,88%,.07);--uc-secondary-hover-dark:hsla(0,0%,88%,.1);--uc-secondary-foreground-dark:#e1e1e1;--uc-muted-dark:#242424;--uc-muted-foreground-dark:#989898;--uc-destructive-dark:rgba(244,90,79,.1);--uc-destructive-foreground-dark:#f45a4f;--uc-border-dark:#3d3d3d;--uc-dialog-shadow-dark:0px 6px 20px rgba(0,0,0,.25);--uc-simple-btn-dark:#242424;--uc-simple-btn-hover-dark:#2b2b2b;--uc-simple-btn-foreground-dark:#fff}}@supports (color:oklch(0% 0 0)){:where([uc-wgt-common]){--uc-primary-oklch-light:47% .22 264;--uc-primary-light:oklch(var(--uc-primary-oklch-light));--uc-primary-hover-light:oklch(var(--uc-primary-oklch-light)/90%);--uc-primary-transparent-light:oklch(var(--uc-primary-oklch-light)/7%);--uc-background-light:oklch(100% 0 0);--uc-foreground-light:oklch(21% 0 0);--uc-primary-foreground-light:oklch(100% 0 0);--uc-secondary-light:oklch(21% 0 0/.05);--uc-secondary-hover-light:oklch(21% 0 0/.08);--uc-secondary-foreground-light:oklch(21% 0 0);--uc-muted-light:oklch(97% 0 0);--uc-muted-foreground-light:oklch(40% 0 0);--uc-destructive-light:oklch(59% .235 28.5/.05);--uc-destructive-foreground-light:oklch(59% .235 28.5);--uc-border-light:oklch(92% 0 0);--uc-dialog-shadow-light:0px 6px 20px oklch(0% 0 0/.1);--uc-simple-btn-light:oklch(94% 0 0);--uc-simple-btn-hover-light:oklch(92% 0 0);--uc-simple-btn-foreground-light:oklch(20% 0 0);--uc-primary-oklch-dark:69% .1768 258.4;--uc-primary-dark:oklch(var(--uc-primary-oklch-dark));--uc-primary-hover-dark:oklch(var(--uc-primary-oklch-dark)/90%);--uc-primary-transparent-dark:oklch(var(--uc-primary-oklch-dark)/7%);--uc-background-dark:oklch(22% 0 0);--uc-foreground-dark:oklch(91% 0 0);--uc-primary-foreground-dark:oklch(0% 0 0);--uc-secondary-dark:oklch(91% 0 0/.07);--uc-secondary-hover-dark:oklch(91% 0 0/.1);--uc-secondary-foreground-dark:oklch(91% 0 0);--uc-muted-dark:oklch(26% 0 0);--uc-muted-foreground-dark:oklch(68% 0 0);--uc-destructive-dark:oklch(67% .191 27.5/.1);--uc-destructive-foreground-dark:oklch(67% .191 27.5);--uc-border-dark:oklch(36% 0 0);--uc-dialog-shadow-dark:0px 6px 20px oklch(0% 0 0/.25);--uc-simple-btn-dark:oklch(26% 0 0);--uc-simple-btn-hover-dark:oklch(29% 0 0);--uc-simple-btn-foreground-dark:oklch(100% 0 0)}}@media only screen and (max-height:600px){:where([uc-wgt-common]){--uc-dialog-max-height:100%}}@media only screen and (max-width:680px){:where([uc-wgt-common]){--uc-grid-col:2}}@media only screen and (max-width:430px){:where([uc-wgt-common]){--uc-dialog-max-width:100vw;--uc-dialog-max-height:var(--uploadcare-blocks-window-height);--uc-grid-col:1}}@media (prefers-color-scheme:light){:where([uc-wgt-common]){--uc-background:var(--uc-background-light);--uc-foreground:var(--uc-foreground-light);--uc-primary:var(--uc-primary-light);--uc-primary-hover:var(--uc-primary-hover-light);--uc-primary-transparent:var(--uc-primary-transparent-light);--uc-primary-foreground:var(--uc-primary-foreground-light);--uc-secondary:var(--uc-secondary-light);--uc-secondary-hover:var(--uc-secondary-hover-light);--uc-secondary-foreground:var(--uc-secondary-foreground-light);--uc-muted:var(--uc-muted-light);--uc-muted-foreground:var(--uc-muted-foreground-light);--uc-destructive:var(--uc-destructive-light);--uc-destructive-foreground:var(--uc-destructive-foreground-light);--uc-border:var(--uc-border-light);--uc-dialog-shadow:var(--uc-dialog-shadow-light);--uc-simple-btn:var(--uc-simple-btn-light);--uc-simple-btn-hover:var(--uc-simple-btn-hover-light);--uc-simple-btn-foreground:var(--uc-simple-btn-foreground-light)}}@media (prefers-color-scheme:dark){:where([uc-wgt-common]){--uc-background:var(--uc-background-dark);--uc-foreground:var(--uc-foreground-dark);--uc-primary:var(--uc-primary-dark);--uc-primary-hover:var(--uc-primary-hover-dark);--uc-primary-transparent:var(--uc-primary-transparent-dark);--uc-primary-foreground:var(--uc-primary-foreground-dark);--uc-secondary:var(--uc-secondary-dark);--uc-secondary-hover:var(--uc-secondary-hover-dark);--uc-secondary-foreground:var(--uc-secondary-foreground-dark);--uc-muted:var(--uc-muted-dark);--uc-muted-foreground:var(--uc-muted-foreground-dark);--uc-destructive:var(--uc-destructive-dark);--uc-destructive-foreground:var(--uc-destructive-foreground-dark);--uc-border:var(--uc-border-dark);--uc-dialog-shadow:var(--uc-dialog-shadow-dark);--uc-simple-btn:var(--uc-simple-btn-dark);--uc-simple-btn-hover:var(--uc-simple-btn-hover-dark);--uc-simple-btn-foreground:var(--uc-simple-btn-foreground-dark)}}:where(.uc-light){--uc-background:var(--uc-background-light);--uc-foreground:var(--uc-foreground-light);--uc-primary:var(--uc-primary-light);--uc-primary-hover:var(--uc-primary-hover-light);--uc-primary-transparent:var(--uc-primary-transparent-light);--uc-primary-foreground:var(--uc-primary-foreground-light);--uc-secondary:var(--uc-secondary-light);--uc-secondary-hover:var(--uc-secondary-hover-light);--uc-secondary-foreground:var(--uc-secondary-foreground-light);--uc-muted:var(--uc-muted-light);--uc-muted-foreground:var(--uc-muted-foreground-light);--uc-destructive:var(--uc-destructive-light);--uc-destructive-foreground:var(--uc-destructive-foreground-light);--uc-border:var(--uc-border-light);--uc-dialog-shadow:var(--uc-dialog-shadow-light);--uc-simple-btn:var(--uc-simple-btn-light);--uc-simple-btn-hover:var(--uc-simple-btn-hover-light);--uc-simple-btn-foreground:var(--uc-simple-btn-foreground-light)}:where(.uc-dark){--uc-background:var(--uc-background-dark);--uc-foreground:var(--uc-foreground-dark);--uc-primary:var(--uc-primary-dark);--uc-primary-hover:var(--uc-primary-hover-dark);--uc-primary-transparent:var(--uc-primary-transparent-dark);--uc-primary-foreground:var(--uc-primary-foreground-dark);--uc-secondary:var(--uc-secondary-dark);--uc-secondary-hover:var(--uc-secondary-hover-dark);--uc-secondary-foreground:var(--uc-secondary-foreground-dark);--uc-muted:var(--uc-muted-dark);--uc-muted-foreground:var(--uc-muted-foreground-dark);--uc-destructive:var(--uc-destructive-dark);--uc-destructive-foreground:var(--uc-destructive-foreground-dark);--uc-border:var(--uc-border-dark);--uc-dialog-shadow:var(--uc-dialog-shadow-dark);--uc-simple-btn:var(--uc-simple-btn-dark);--uc-simple-btn-hover:var(--uc-simple-btn-hover-dark);--uc-simple-btn-foreground:var(--uc-simple-btn-foreground-dark)}:where(.uc-purple){--uc-primary-oklch-light:47% .22 300;--uc-primary-oklch-dark:69% .1768 300}:where(.uc-red){--uc-primary-oklch-light:47% .21 21;--uc-primary-oklch-dark:71% .1768 21}:where(.uc-orange){--uc-primary-oklch-light:47% .1376 51.88;--uc-primary-oklch-dark:69% .1768 51.88}:where(.uc-green){--uc-primary-oklch-light:45% .14 130;--uc-primary-oklch-dark:69% .1768 130}:where(.uc-turquoise){--uc-primary-oklch-light:45% .0854 174;--uc-primary-oklch-dark:69% .1768 174}:where(.uc-gray){--uc-primary-oklch-light:10% 0 0;--uc-primary-oklch-dark:97% 0 0}:where(.uc-contrast){--uc-border-light:oklch(50% 0 0);--uc-border-dark:oklch(50% 0 0);--uc-muted-light:oklch(98% 0 0);--uc-muted-dark:oklch(16% 0 0);--uc-muted-foreground-light:oklch(20% 0 0);--uc-muted-foreground-dark:oklch(80% 0 0);--uc-background-light:oklch(100% 0 0);--uc-foreground-light:oklch(0% 0 0);--uc-background-dark:oklch(10% 0 0);--uc-foreground-dark:oklch(100% 0 0)}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#){--color-primary-accent:var(--uc-primary);--color-text-base:var(--uc-foreground);--color-text-accent-contrast:var(--uc-background);--color-fill-contrast:var(--uc-background);--color-modal-backdrop:oklch(0 0 0/.1);--color-image-background:var(--uc-muted);--color-focus-ring:var(--color-primary-accent);--color-crop-guides:var(--uc-foreground);--font-size-ui:var(--uc-font-size);--size-touch-area:var(--uc-button-size);--size-panel-heading:calc(var(--uc-button-size) + var(--uc-padding)*2);--size-ui-min-width:130px;--size-line-width:1px;--size-modal-width:650px;--size-icon:calc(var(--uc-button-size)/2);--border-radius-editor:var(--uc-radius);--border-radius-thumb:var(--uc-radius);--border-radius-ui:var(--uc-radius);--border-radius-base:var(--uc-radius);--cldtr-gap-min:5px;--cldtr-gap-mid-1:10px;--cldtr-gap-mid-2:15px;--cldtr-gap-max:20px;--transition-duration-2:var(--transition-duration-all,.2s);--transition-duration-3:var(--transition-duration-all,.3s);--transition-duration-4:var(--transition-duration-all,.4s);--transition-duration-5:var(--transition-duration-all,.5s);--modal-header-opacity:1;--modal-header-height:var(--size-panel-heading);--modal-toolbar-height:var(--size-panel-heading);--transparent-pixel:url(${d});display:block;height:100%;max-height:100%;width:100%}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) :is([can-handle-paste]:hover,[can-handle-paste]:focus){--can-handle-paste:"true"}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) :is([tabindex][focus-visible],[tabindex]:hover,[with-effects][focus-visible],[with-effects]:hover){--filter-effect:var(--hover-filter)!important;--opacity-effect:var(--hover-opacity)!important;--color-effect:var(--hover-color-rgb)!important;--background-effect:var(--hover-background)!important}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) :is([tabindex]:active,[with-effects]:active){--filter-effect:var(--down-filter)!important;--opacity-effect:var(--down-opacity)!important;--color-effect:var(--down-color-rgb)!important;--background-effect:var(--down-background)!important}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) :is([tabindex][active],[with-effects][active]){--filter-effect:var(--active-filter)!important;--opacity-effect:var(--active-opacity)!important;--color-effect:var(--active-color-rgb)!important;--background-effect:var(--active-background)!important}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) [hidden-scrollbar]::-webkit-scrollbar{display:none}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) [hidden-scrollbar]{-ms-overflow-style:none;scrollbar-width:none}[uc-cloud-image-editor].uc-editor_ON:not(#\\#):not(#\\#):not(#\\#){--modal-header-opacity:0;--modal-header-height:0px;--modal-toolbar-height:calc(var(--size-panel-heading)*2)}[uc-cloud-image-editor].uc-editor_OFF:not(#\\#):not(#\\#):not(#\\#){--modal-header-opacity:1;--modal-header-height:var(--size-panel-heading);--modal-toolbar-height:var(--size-panel-heading)}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper{--l-min-img-height:var(--modal-toolbar-height);--l-max-img-height:100%;--l-edit-button-width:120px;--l-toolbar-horizontal-padding:var(--cldtr-gap-mid-1);display:grid;grid-template-rows:minmax(var(--l-min-img-height),var(--l-max-img-height)) minmax(var(--modal-toolbar-height),auto);height:100%;overflow:hidden;overflow-y:auto;position:relative}@media only screen and (max-width:800px){[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper{--l-edit-button-width:70px;--l-toolbar-horizontal-padding:var(--cldtr-gap-min)}}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport{align-items:center;display:flex;justify-content:center;overflow:hidden}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image{--viewer-image-opacity:1;background-color:var(--color-image-background);box-sizing:border-box;display:block;height:100%;left:0;object-fit:scale-down;opacity:var(--viewer-image-opacity);pointer-events:auto;position:absolute;top:0;transform:scale(1);user-select:none;width:100%;z-index:10}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image.uc-image_visible_viewer{transition:opacity var(--transition-duration-3) ease-in-out,transform var(--transition-duration-4)}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image.uc-image_hidden_to_cropper{--viewer-image-opacity:0;background-image:var(--transparent-pixel);pointer-events:none;transform:scale(1);transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) step-end}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image.uc-image_hidden_effects{--viewer-image-opacity:0;pointer-events:none;transform:scale(1);transition:opacity var(--transition-duration-3) cubic-bezier(.5,0,1,1),transform var(--transition-duration-4)}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-image_container{background-color:var(--color-image-background);display:block;height:100%;position:relative;transition:var(--transition-duration-3);width:100%}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-toolbar{position:relative;transition:.3s}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-toolbar>.uc-toolbar_content{background-color:var(--color-fill-contrast);bottom:0;box-sizing:border-box;height:var(--modal-toolbar-height);left:0;min-height:var(--size-panel-heading);position:absolute;width:100%}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-toolbar>.uc-toolbar_content.uc-toolbar_content__viewer{align-items:center;display:flex;height:var(--size-panel-heading);justify-content:space-between;padding-left:var(--l-toolbar-horizontal-padding);padding-right:var(--l-toolbar-horizontal-padding)}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-toolbar>.uc-toolbar_content.uc-toolbar_content__editor{display:flex}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-info_pan{position:absolute;user-select:none}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-file_type_outer{display:flex;max-width:120px;position:absolute;transform:translate(-40px);user-select:none;z-index:2}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-file_type_outer>.uc-file_type{padding:4px .8em}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-network_problems_splash{background-color:var(--color-fill-contrast);display:flex;flex-direction:column;height:100%;position:absolute;width:100%;z-index:4}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_content{align-items:center;display:flex;flex:1;flex-direction:column;justify-content:center}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_content>.uc-network_problems_icon{align-items:center;background-color:var(--uc-muted);border-radius:50%;color:var(--uc-foreground);display:flex;height:40px;justify-content:center;width:40px}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_content>.uc-network_problems_text{color:var(--uc-foreground);font-size:var(--font-size-ui);margin-top:var(--cldtr-gap-max)}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_footer{align-items:center;display:flex;height:var(--size-panel-heading);justify-content:center}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#)>.uc-svg{border-top-left-radius:var(--border-radius-base);border-top-right-radius:var(--border-radius-base);height:100%;left:0;opacity:inherit;position:absolute;top:0;transition:var(--transition-duration-3);width:100%;z-index:2}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#)>.uc-thumb{--idle-color-rgb:var(--color-text-base);--hover-color-rgb:var(--color-primary-accent);--focus-color-rgb:var(--color-primary-accent);--down-color-rgb:var(--color-primary-accent);--color-effect:var(--idle-color-rgb);color:var(--color-effect);transition:color var(--transition-duration-3),opacity var(--transition-duration-3)}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-thumb--visible{opacity:1;pointer-events:auto}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-thumb--hidden{opacity:0;pointer-events:none}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-guides{transition:var(--transition-duration-3)}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-guides--hidden{opacity:0}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-guides--semi-hidden{opacity:.2}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-guides--visible{opacity:1}uc-editor-aspect-ratio-button-control:not(#\\#):not(#\\#):not(#\\#),uc-editor-button-control:not(#\\#):not(#\\#):not(#\\#),uc-editor-crop-button-control:not(#\\#):not(#\\#):not(#\\#),uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#),uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#),uc-editor-operation-control:not(#\\#):not(#\\#):not(#\\#){--l-base-min-width:var(--uc-button-size);--l-base-height:var(--uc-button-size);--opacity-effect:var(--idle-opacity);--color-effect:var(--idle-color-rgb);--background-effect:var(--idle-background);--filter-effect:var(--idle-filter);--idle-color-rgb:var(--uc-secondary-foreground);--idle-opacity:1;--idle-filter:1;--idle-background:var(--uc-secondary);--hover-color-rgb:var(--uc-secondary-foreground);--hover-opacity:1;--hover-filter:.8;--hover-background:var(--uc-secondary-hover);--down-color-rgb:var(--hover-color-rgb);--down-opacity:1;--down-filter:.6;--down-background:var(--uc-secondary);border-radius:var(--uc-radius)}uc-editor-aspect-ratio-button-control:not(#\\#):not(#\\#):not(#\\#)>button,uc-editor-button-control:not(#\\#):not(#\\#):not(#\\#)>button,uc-editor-crop-button-control:not(#\\#):not(#\\#):not(#\\#)>button,uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>button,uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button,uc-editor-operation-control:not(#\\#):not(#\\#):not(#\\#)>button{all:unset;align-items:center;color:var(--color-effect);cursor:pointer;display:grid;grid-template-columns:var(--l-base-min-width) auto;grid-template-rows:100%;height:var(--l-base-height);opacity:var(--opacity-effect);position:relative;transition:var(--l-width-transition)}uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button{grid-template-columns:auto var(--l-base-min-width)}uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button>uc-icon{margin-left:var(--cldtr-gap-mid-1);width:10px}:where(uc-editor-button-control,uc-editor-crop-button-control,uc-editor-aspect-ratio-button-control,uc-editor-freeform-button-control,uc-editor-filter-control,uc-editor-operation-control):not(#\\#):not(#\\#):not(#\\#)>uc-icon>svg{height:var(--size-icon);width:var(--size-icon)}uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>uc-icon.uc-original-icon>svg{height:100%;width:100%}uc-editor-aspect-ratio-button-control.uc-active:not(#\\#):not(#\\#):not(#\\#),uc-editor-button-control.uc-active:not(#\\#):not(#\\#):not(#\\#),uc-editor-crop-button-control.uc-active:not(#\\#):not(#\\#):not(#\\#),uc-editor-filter-control.uc-active:not(#\\#):not(#\\#):not(#\\#),uc-editor-freeform-button-control.uc-active:not(#\\#):not(#\\#):not(#\\#),uc-editor-operation-control.uc-active:not(#\\#):not(#\\#):not(#\\#){--idle-color-rgb:var(--uc-primary-foreground);--idle-background:var(--uc-primary);--idle-opacity:1;--hover-color-rgb:var(--uc-primary-foreground);--hover-background:var(--uc-primary);--hover-opacity:1}uc-editor-filter-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#) .uc-preview[loaded]{opacity:1}uc-editor-filter-control.uc-active:not(#\\#):not(#\\#):not(#\\#) .uc-preview{opacity:0}uc-editor-aspect-ratio-button-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#),uc-editor-button-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#),uc-editor-crop-button-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#),uc-editor-filter-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#),uc-editor-freeform-button-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#),uc-editor-operation-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#){--idle-color-rgb:var(--uc-secondary-foreground)}:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-aspect-ratio-button-control.uc-not_active,:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-button-control.uc-not_active,:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-crop-button-control.uc-not_active,:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-filter-control.uc-not_active,:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-freeform-button-control.uc-not_active,:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-operation-control.uc-not_active{--idle-background:transparent;--hover-background:var(--uc-secondary);outline:1px solid var(--uc-border);outline-offset:-1px}uc-editor-aspect-ratio-button-control:not(#\\#):not(#\\#):not(#\\#)>button:before,uc-editor-button-control:not(#\\#):not(#\\#):not(#\\#)>button:before,uc-editor-crop-button-control:not(#\\#):not(#\\#):not(#\\#)>button:before,uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>button:before,uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button:before,uc-editor-operation-control:not(#\\#):not(#\\#):not(#\\#)>button:before{background-color:var(--background-effect);border-radius:var(--border-radius-editor);content:"";height:100%;left:0;position:absolute;right:0;transition:var(--transition-duration-3);width:100%;z-index:-1}uc-editor-aspect-ratio-button-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title,uc-editor-button-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title,uc-editor-crop-button-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title,uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title,uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title,uc-editor-operation-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title{font-size:.7em;letter-spacing:1.004px;padding-right:var(--cldtr-gap-mid-1);text-transform:uppercase}uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title{padding-left:var(--cldtr-gap-mid-1);padding-right:0}uc-editor-aspect-ratio-button-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon,uc-editor-button-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon,uc-editor-crop-button-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon,uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon,uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon,uc-editor-operation-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon{pointer-events:none}uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-preview{background-repeat:no-repeat;background-size:contain;border-radius:var(--border-radius-editor);filter:brightness(var(--filter-effect));height:var(--l-base-height);left:0;opacity:0;position:absolute;right:0;transition:var(--transition-duration-3);width:100%;z-index:-1}uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>.uc-original-icon{color:var(--color-effect);opacity:.3}uc-editor-image-cropper:not(#\\#):not(#\\#):not(#\\#){color:var(--color-crop-guides);display:block;height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;touch-action:none;width:100%;z-index:10}uc-editor-image-cropper.uc-active_from_editor:not(#\\#):not(#\\#):not(#\\#),uc-editor-image-cropper.uc-active_from_viewer:not(#\\#):not(#\\#):not(#\\#){opacity:1;pointer-events:auto;transform:scale(1) translate(0);transition:transform var(--transition-duration-4) cubic-bezier(.37,0,.63,1) .4s,opacity var(--transition-duration-3)}uc-editor-image-cropper.uc-inactive_to_editor:not(#\\#):not(#\\#):not(#\\#){opacity:0;pointer-events:none;transition:transform var(--transition-duration-4) cubic-bezier(.37,0,.63,1),opacity var(--transition-duration-3) calc(var(--transition-duration-3) + .05s)}uc-editor-image-cropper:not(#\\#):not(#\\#):not(#\\#)>.uc-canvas{z-index:1}uc-editor-image-cropper:not(#\\#):not(#\\#):not(#\\#)>.uc-canvas,uc-editor-image-fader:not(#\\#):not(#\\#):not(#\\#){display:block;height:100%;left:0;position:absolute;top:0;width:100%}uc-editor-image-fader.uc-active_from_viewer:not(#\\#):not(#\\#):not(#\\#){opacity:1;pointer-events:auto;transform:scale(1);transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) step-start;z-index:3}uc-editor-image-fader.uc-active_from_cropper:not(#\\#):not(#\\#):not(#\\#){opacity:1;pointer-events:auto;transform:scale(1);transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) step-end;z-index:3}uc-editor-image-fader.uc-inactive_to_cropper:not(#\\#):not(#\\#):not(#\\#){opacity:0;pointer-events:none;transform:scale(1);transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) step-end;z-index:3}uc-editor-image-fader:not(#\\#):not(#\\#):not(#\\#) .uc-fader-image{content-visibility:auto;display:block;height:100%;left:0;object-fit:scale-down;position:absolute;top:0;transform:scale(1);user-select:none;width:100%}uc-editor-image-fader:not(#\\#):not(#\\#):not(#\\#) .uc-fader-image--preview{background-color:var(--color-image-background);border-top-left-radius:var(--border-radius-base);border-top-right-radius:var(--border-radius-base);opacity:0;transform:scale(1);transition:var(--transition-duration-3)}uc-editor-scroller:not(#\\#):not(#\\#):not(#\\#){align-items:center;display:flex;height:100%;overflow-x:scroll;width:100%}uc-editor-slider:not(#\\#):not(#\\#):not(#\\#){align-items:center;display:flex;height:var(--size-panel-heading);justify-content:center;width:100%}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#){height:100%;position:relative;width:100%}@media only screen and (max-width:600px){uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#){--l-tab-gap:var(--cldtr-gap-mid-1);--l-slider-padding:var(--uc-padding);--l-controls-padding:var(--uc-padding)}}@media only screen and (min-width:601px){uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#){--l-tab-gap:var(--cldtr-gap-max);--l-slider-padding:var(--uc-padding);--l-controls-padding:var(--uc-padding)}}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container{height:100%;overflow:hidden;position:relative;width:100%}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar{background-color:var(--color-fill-contrast);display:grid;grid-template-rows:1fr 1fr;height:100%;position:absolute;transition:opacity var(--transition-duration-3) ease-in-out,transform var(--transition-duration-3) ease-in-out,visibility var(--transition-duration-3) ease-in-out;width:100%}.uc-sub-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-list-aspect-ratio-container>.uc-list-aspect-ratio{align-items:center;display:grid;gap:6px;grid-auto-flow:column;height:var(--size-panel-heading);justify-content:center}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar.uc-sub-toolbar--visible{opacity:1;pointer-events:auto;transform:translateY(0)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar.uc-sub-toolbar--top-hidden{opacity:0;pointer-events:none;transform:translateY(100%)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar.uc-sub-toolbar--bottom-hidden{opacity:0;pointer-events:none;transform:translateY(-100%)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row{align-items:center;display:flex;justify-content:space-between;padding-left:var(--l-controls-padding);padding-right:var(--l-controls-padding)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles{display:grid;grid-auto-flow:column;position:relative;grid-gap:0 var(--l-tab-gap);align-items:center;height:100%}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggles_indicator{background-color:var(--uc-secondary-foreground);bottom:0;height:2px;left:0;position:absolute;transform:translate(0);transition:transform var(--transition-duration-3);width:var(--size-touch-area)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row{position:relative}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content{content-visibility:auto;display:flex;height:100%;left:0;opacity:0;overflow:hidden;position:absolute;top:0;width:100%}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content.uc-tab-content--visible{opacity:1;pointer-events:auto}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content.uc-tab-content--hidden{opacity:0;pointer-events:none}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle.uc-tab-toggle--visible{display:contents}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles.uc-tab-toggles--hidden,uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle.uc-tab-toggle--hidden{display:none}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle>uc-btn-ui{width:var(--uc-button-size)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle>uc-btn-ui>uc-icon>svg{height:var(--size-icon);width:var(--size-icon)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content .uc-controls-list_align{box-sizing:border-box;display:grid;grid-template-areas:". inner .";grid-template-columns:1fr auto 1fr;min-width:100%;padding-left:var(--uc-padding)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content .uc-controls-list_inner{display:grid;gap:6px;grid-area:inner;grid-auto-flow:column}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content .uc-controls-list_inner:last-child{padding-right:var(--uc-padding)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-controls-list_last-item{margin-right:var(--cldtr-gap-max)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-info-tooltip_container{align-items:flex-start;display:flex;height:100%;justify-content:center;position:absolute;width:100%}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-info-tooltip_wrapper{display:flex;flex-direction:column;height:100%;justify-content:flex-end;pointer-events:none;position:absolute;top:calc(-100% - var(--cldtr-gap-mid-2))}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-info-tooltip{background-color:var(--color-text-accent-contrast);border-radius:var(--border-radius-editor);color:var(--color-text-base);font-size:.7em;letter-spacing:1px;opacity:0;padding:3px 6px;text-transform:uppercase;transform:translateY(100%);transition:var(--transition-duration-3);z-index:3}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-info-tooltip_visible{opacity:1;transform:translateY(0)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-slider{padding-left:var(--l-slider-padding);padding-right:var(--l-slider-padding)}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#)>button{--filter-effect:var(--idle-brightness);--opacity-effect:var(--idle-opacity);--color-effect:var(--idle-color-rgb);--background-effect:var(--idle-background);--l-transition-effect:var( --css-transition,color var(--transition-duration-2),background-color var(--transition-duration-2),filter var(--transition-duration-2) );all:unset;align-items:center;background-color:var(--background-effect);border-radius:var(--uc-radius);box-sizing:var(--css-box-sizing,border-box);color:var(--color-effect);cursor:pointer;display:inline-flex;filter:brightness(var(--filter-effect));font-size:1em;height:var(--css-height,var(--uc-button-size));opacity:var(--opacity-effect);padding-left:var(--css-padding-left,14px);padding-right:var(--css-padding-right,14px);transition:var(--l-transition-effect);user-select:none}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#)>button>uc-icon{pointer-events:none}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-text{white-space:nowrap}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-icon{align-items:center;color:var(--color-effect);display:flex;filter:brightness(var(--filter-effect));justify-content:center;transition:var(--l-transition-effect)}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-icon_left{margin-left:0;margin-right:var(--cldtr-gap-mid-1)}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-icon_right{margin-left:var(--cldtr-gap-mid-1);margin-right:0}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-icon_single{margin-left:0;margin-right:0}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-icon_hidden{display:none;margin:0}uc-btn-ui.uc-primary:not(#\\#):not(#\\#):not(#\\#)>button{--idle-color-rgb:var(--uc-primary-foreground);--idle-brightness:1;--idle-opacity:1;--idle-background:var(--uc-primary);--hover-color-rgb:var(--uc-primary-foreground);--hover-brightness:1;--hover-opacity:1;--hover-background:var(--uc-primary-hover);--down-color-rgb:var(--uc-primary-foreground);--down-brightness:.75;--down-opacity:1;--down-background:var(--uc-primary);--active-color-rgb:var(--uc-primary-foreground);--active-brightness:1;--active-opacity:1;--active-background:var(--uc-primary)}uc-btn-ui.uc-primary-icon:not(#\\#):not(#\\#):not(#\\#)>button{--idle-color-rgb:var(--uc-primary);--idle-brightness:1;--idle-opacity:1;--idle-background:transparent;--hover-color-rgb:var(--uc-primary);--hover-brightness:1;--hover-opacity:1;--hover-background:var(--uc-primary-transparent);--down-color-rgb:var(--uc-primary);--down-brightness:.75;--down-opacity:1;--down-background:var(--uc-primary-transparent);--active-color-rgb:var(--uc-primary-foreground);--active-brightness:1;--active-opacity:1;--active-background:var(--uc-primary);padding:0;width:var(--uc-button-size)}uc-btn-ui.uc-secondary:not(#\\#):not(#\\#):not(#\\#)>button{--idle-color-rgb:var(--uc-secondary-foreground);--idle-brightness:1;--idle-opacity:1;--idle-background:var(--uc-secondary);--hover-color-rgb:var(--uc-secondary-foreground);--hover-brightness:1;--hover-opacity:1;--hover-background:var(--uc-secondary-hover);--down-color-rgb:var(--uc-secondary-foreground);--down-brightness:1;--down-opacity:1;--down-background:var(--uc-secondary-hover);--active-color-rgb:var(--uc-secondary-foreground);--active-brightness:1;--active-opacity:1;--active-background:transparent}:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-btn-ui.uc-secondary>button{border:1px solid var(--uc-border)}uc-btn-ui.uc-secondary-icon:not(#\\#):not(#\\#):not(#\\#)>button,uc-btn-ui.uc-tab:not(#\\#):not(#\\#):not(#\\#)>button{--idle-color-rgb:var(--uc-secondary-foreground);--idle-brightness:1;--idle-opacity:1;--idle-background:transparent;--hover-color-rgb:var(--uc-secondary-foreground);--hover-brightness:1;--hover-opacity:1;--hover-background:var(--uc-secondary);--down-color-rgb:var(--uc-secondary-foreground);--down-brightness:1;--down-opacity:1;--down-background:var(--uc-secondary);--active-color-rgb:var(--uc-secondary-foreground);--active-brightness:1;--active-opacity:1;--active-background:transparent;padding:0;width:var(--uc-button-size)}uc-btn-ui.uc-default:not(#\\#):not(#\\#):not(#\\#)>button{--idle-color-rgb:var(--uc-secondary-foreground);--idle-brightness:1;--idle-opacity:1;--idle-background:var(--uc-secondary);--hover-color-rgb:var(--uc-secondary-foreground);--hover-brightness:1;--hover-opacity:1;--hover-background:var(--uc-secondary-hover);--down-color-rgb:var(--uc-secondary-foreground);--down-brightness:.75;--down-opacity:1;--down-background:var(--uc-secondary);--active-color-rgb:var(--uc-primary);--active-brightness:1;--active-opacity:1;--active-background:var(--uc-primary-transparent)}:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-btn-ui.uc-default>button{--idle-background:transparent;--hover-background:var(--uc-secondary);--active-background:var(--uc-foreground);--active-color-rgb:var(--uc-background)}uc-line-loader-ui:not(#\\#):not(#\\#):not(#\\#){height:2px;left:0;opacity:.5;position:absolute;top:0;width:100%;z-index:9999}uc-line-loader-ui:not(#\\#):not(#\\#):not(#\\#) .uc-inner{height:100%;max-width:200px;width:25%}uc-line-loader-ui:not(#\\#):not(#\\#):not(#\\#) .uc-line{background-color:var(--uc-primary);height:100%;transform:translate(-101%);transition:transform 1s;width:100%}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#){--l-thumb-size:24px;--l-zero-dot-size:5px;--l-zero-dot-offset:2px;--idle-color-rgb:var(--uc-foreground);--hover-color-rgb:var(--uc-primary);--down-color-rgb:var(--uc-primary);--color-effect:var(--idle-color-rgb);--l-color:var(--color-effect);align-items:center;display:flex;height:calc(var(--l-thumb-size) + (var(--l-zero-dot-size) + var(--l-zero-dot-offset))*2);justify-content:center;position:relative;width:100%}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-thumb{background-color:var(--l-color);border-radius:50%;height:var(--l-thumb-size);left:0;opacity:1;position:absolute;transform:translate(0);transition:opacity var(--transition-duration-2),background-color var(--transition-duration-2);width:var(--l-thumb-size)}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-steps{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding-left:calc(var(--l-thumb-size)/2);padding-right:calc(var(--l-thumb-size)/2);position:absolute;width:100%}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-border-step{border-right:1px solid var(--uc-foreground);height:10px;opacity:1;transition:border-color var(--transition-duration-2);width:0}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-minor-step{border-right:1px solid var(--uc-foreground);height:4px;opacity:.6;transition:border-color var(--transition-duration-2);width:0}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-zero-dot{background-color:var(--color-primary-accent);border-radius:50%;height:var(--l-zero-dot-size);left:calc(var(--l-thumb-size)/2 - var(--l-zero-dot-size)/2);opacity:0;position:absolute;top:calc(100% - var(--l-zero-dot-offset)*2);transition:var(--transition-duration-3);width:var(--l-zero-dot-size)}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-input{cursor:pointer;height:100%;margin:0;opacity:0;position:absolute;width:calc(100% - 10px)}uc-presence-toggle.uc-transition:not(#\\#):not(#\\#):not(#\\#){transition:opacity var(--transition-duration-3),visibility var(--transition-duration-3)}uc-presence-toggle.uc-visible:not(#\\#):not(#\\#):not(#\\#){opacity:1;pointer-events:inherit}uc-presence-toggle.uc-hidden:not(#\\#):not(#\\#):not(#\\#){opacity:0;pointer-events:none}uc-presence-toggle.uc-initial:not(#\\#):not(#\\#):not(#\\#){display:none!important;transition:none!important}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) [role=button]:focus-visible,[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) button:focus-visible{outline:1px auto Highlight;outline:1px auto -webkit-focus-ring-color}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) .uc-cloud-mask{pointer-events:none}[uc-aspect-ratio-freeform]:not(#\\#):not(#\\#):not(#\\#) button{display:flex}[uc-aspect-ratio-freeform]:not(#\\#):not(#\\#):not(#\\#) uc-icon{display:none}[uc-aspect-ratio-freeform]:not(#\\#):not(#\\#):not(#\\#) .uc-title{padding-left:var(--cldtr-gap-mid-1)}:where(uc-editor-freeform-button-control,uc-editor-aspect-ratio-button-control:last-of-type):not(#\\#):not(#\\#):not(#\\#){margin-right:calc(var(--cldtr-gap-mid-1)*3)}:where([uc-cloud-image-editor]):not(#\\#):not(#\\#):not(#\\#) uc-icon{display:flex;height:100%;justify-content:center;width:100%}:where([uc-cloud-image-editor]):not(#\\#):not(#\\#):not(#\\#) uc-icon svg{height:calc(var(--uc-button-size)/2);width:calc(var(--uc-button-size)/2)}uc-config:not(#\\#){display:none}uc-icon:not(#\\#){align-items:center;display:inline-flex;height:var(--uc-button-size);justify-content:center;width:var(--uc-button-size)}uc-icon:not(#\\#) svg{height:calc(var(--uc-button-size)/2);overflow:visible;width:calc(var(--uc-button-size)/2)}`,""]);const h=u}},e={};function r(o){var i=e[o];if(void 0!==i)return i.exports;var n=e[o]={id:o,exports:{}};return t[o](n,n.exports,r),n.exports}r.m=t,r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.b="undefined"!=typeof document&&document.baseURI||self.location.href;var o={};(()=>{"use strict";r.r(o),r.d(o,{Uploadcare:()=>xc,UploadcareCommand:()=>nt,UploadcareEditing:()=>be,UploadcareImageEdit:()=>Jc,UploadcareImageEditCommand:()=>Nc,UploadcareImageEditEditing:()=>qc,UploadcareImageEditUI:()=>Wc,UploadcareUI:()=>$,UploadcareUploadAdapter:()=>he});var t={};r.r(t),r.d(t,{ActivityBlock:()=>tn,ActivityHeader:()=>ua,BaseComponent:()=>Ne,Block:()=>Yi,BtnUi:()=>ja,CameraSource:()=>fa,CloudImageEditor:()=>mc,CloudImageEditorActivity:()=>Za,CloudImageEditorBlock:()=>ka,Config:()=>bs,Copyright:()=>vs,CropFrame:()=>xa,Data:()=>we,DropArea:()=>As,EditorAspectRatioButtonControl:()=>Ta,EditorCropButtonControl:()=>Aa,EditorFilterControl:()=>La,EditorFreeformButtonControl:()=>Ea,EditorImageCropper:()=>Pa,EditorImageFader:()=>za,EditorOperationControl:()=>Fa,EditorScroller:()=>Va,EditorSlider:()=>$a,EditorToolbar:()=>Ba,ExternalSource:()=>Ns,ExternalUploadSource:()=>wn,FileItem:()=>Vs,FileUploaderInline:()=>fc,FileUploaderMinimal:()=>vc,FileUploaderRegular:()=>yc,FormInput:()=>Bs,Icon:()=>js,Img:()=>Js,LineLoaderUi:()=>Ha,Modal:()=>tc,ModalEvents:()=>Hi,PACKAGE_NAME:()=>Ki,PACKAGE_VERSION:()=>Gi,PresenceToggle:()=>Wa,ProgressBar:()=>ec,ProgressBarCommon:()=>rc,Select:()=>oc,SimpleBtn:()=>ic,SliderUi:()=>Xa,SolutionBlock:()=>nn,SourceBtn:()=>nc,SourceList:()=>ac,Spinner:()=>sc,StartFrom:()=>cc,Thumb:()=>dc,UID:()=>xe,UploadCtxProvider:()=>hc,UploadList:()=>pc,UploadSource:()=>kn,UploaderBlock:()=>la,UrlSource:()=>gc,defineComponents:()=>en,defineLocale:()=>Ni,loadFileUploaderFrom:()=>on,toKebabCase:()=>Ya});var e,i,n,a=r(782),s=r(355),c=r(311);function l(t,e){var r=u();return(l=function(t,e){return r[t-=405]})(t,e)}function u(){var t=["488228AOUBjJ","7236AKLSYI","3007314kScGUB","316071IxDpSK","1930194mJLZZF","Dropbox","local","OneDrive","80pQniiS","12JqQtpV","5VePxxJ","gdrive","url","GPhotos","1656FnvaMv","54YdriDD","96FcOArd","facebook","URL","Local","dropbox","GDrive","onedrive","726836CHavMz","Facebook","19537QKtArX","gphotos"];return(u=function(){return t})()}function d(t,r,o){const i=t.t,n=t.t;switch(r){case e.Local:return{text:n("Insert"===o?"Upload from computer":"Replace from computer"),shortText:n("From computer")};case e.URL:return{text:"Insert"===o?n("Insert via URL"):i("Replace via URL"),shortText:n("Via URL")};case e.Dropbox:return{text:i("Insert"===o?"Insert with Dropbox":"Replace with Dropbox"),shortText:i("With Dropbox")};case e.Facebook:return{text:i("Insert"===o?"Insert with Facebook":"Replace with Facebook"),shortText:i("With Facebook")};case e.GDrive:return{text:i("Insert"===o?"Insert with Google Drive":"Replace with Google Drive"),shortText:i("With Google Drive")};case e.GPhotos:return{text:i("Insert"===o?"Insert with Google Photos":"Replace with Google Photos"),shortText:i("With Google Photos")};case e.OneDrive:return{text:i("Insert"===o?"Insert with OneDrive":"Replace with OneDrive"),shortText:i("With OneDrive")};default:return r}}!function(t){for(var e=l,r=t();;)try{if(343667===-parseInt(e(419))/1*(-parseInt(e(405))/2)+-parseInt(e(407))/3*(parseInt(e(413))/4)+parseInt(e(414))/5*(parseInt(e(406))/6)+-parseInt(e(429))/7*(-parseInt(e(418))/8)+parseInt(e(408))/9+parseInt(e(412))/10*(-parseInt(e(427))/11)+-parseInt(e(420))/12*(parseInt(e(431))/13))break;r.push(r.shift())}catch(t){r.push(r.shift())}}(u),(i=e||(e={}))[(n=l)(423)]=n(410),i[n(422)]=n(416),i[n(409)]=n(424),i[n(425)]=n(415),i[n(428)]=n(421),i[n(417)]=n(430),i[n(411)]=n(426);var h=r(929),p=r.n(h),g=r(297),m=r.n(g),f=r(102),b=r.n(f),v=r(123),y=r.n(v),w=r(741),_=r.n(w),k=r(621),x={attributes:{"data-cke":!0}};x.setAttributes=y(),x.insert=b().bind(null,"head"),x.domAPI=m(),x.insertStyleElement=_();p()(k.A,x);k.A&&k.A.locals&&k.A.locals;var C=r(387),E={attributes:{"data-cke":!0}};E.setAttributes=y(),E.insert=b().bind(null,"head"),E.domAPI=m(),E.insertStyleElement=_();p()(C.A,E);C.A&&C.A.locals&&C.A.locals;var T=r(184),A={attributes:{"data-cke":!0}};A.setAttributes=y(),A.insert=b().bind(null,"head"),A.domAPI=m(),A.insertStyleElement=_();p()(T.A,A);T.A&&T.A.locals&&T.A.locals;const I=S;function S(t,e){const r=M();return(S=function(t,e){return r[t-=413]})(t,e)}function M(){const t=["upload","get","reduce","_createButton","entries","withText","ImageInsertUI","isImageSelected","_createDropdownButtons","582KtReqk","uploadcareLicenseKeyEvaluationLimit","init","trialLimit","forEach","715314OsxzMB","uploadcareLicenseKeyUsageLimit","_showLicenseError","plugins","GDrive","URL","isOfficialPlugin","UploadcareUI","uploadcareLicenseKeyInvalid","uploadcareLicenseKeyValid","featureNotAllowed","execute","GPhotos","editor","config","42eeOyKp","bind","_getIntegrationKey","text","domainLimit","isPremiumPlugin","invalid","uploadcare","evaluationLimit","usageLimit","Facebook","expired","5209512VEKZMS","Dropbox","4642955DkkcZj","tooltip","isEnabled","shortText","uploadcareLicenseKeyTrialLimit","map","uploadcareLicenseKeyDomainLimit","_createMenuBarButtons","assetManager","15364dMPwyV","uploadcareLicenseKeyExpired","registerIntegration","Insert","1674108UcvnvQ","locale","_normalizeConfigSourceList","pluginName","push","commands","30436XZTymn","uploadcareLicenseKeyNotAllowed","Local","7676260OsYpet","label","licenseKey","has","icon","url","Uploadcare","OneDrive","Replace","afterInit","uploadcare.uploader.sourceList","type","destroy","_createToolbarButton","14aHYoSF","_licenseKeyCheckInterval"];return(M=function(){return t})()}!function(t){const e=S,r=t();for(;;)try{if(519730===-parseInt(e(416))/1*(-parseInt(e(449))/2)+-parseInt(e(477))/3*(-parseInt(e(439))/4)+-parseInt(e(430))/5+parseInt(e(482))/6*(-parseInt(e(466))/7)+-parseInt(e(428))/8+parseInt(e(443))/9+parseInt(e(452))/10)break;r.push(r.shift())}catch(t){r.push(r.shift())}}(M);class $ extends a.Plugin{[I(454)];[I(467)];static get[I(446)](){return I(489)}static get[I(488)](){return!0}static get[I(421)](){return!0}[I(479)](){const t=I;this[t(454)]=this[t(414)][t(415)][t(469)](t(454));const e=this[t(414)];this[t(467)]=setInterval(()=>{const r=t;let o;for(const t in e){const i=t,n=e[i];if(r(491)==n||r(490)==n||r(440)==n||r(436)==n||r(450)==n||r(478)==n||r(434)==n||r(483)==n){delete e[i],o=n,clearInterval(this[r(467)]),this[r(467)]=void 0;break}}r(490)==o&&e[r(484)](r(422)),r(440)==o&&e[r(484)](r(427)),r(436)==o&&e[r(484)](r(420)),r(450)==o&&e[r(484)](r(492),r(458)),r(478)==o&&e[r(484)](r(424)),r(434)==o&&e[r(484)](r(480)),r(483)==o&&e[r(484)](r(425))},1e3)}[I(461)](){const t=I,{editor:e}=this,r=e[t(448)][t(469)](t(423));if(!r)return;const o=this[t(445)](e[t(415)][t(469)](t(462)))[t(470)]((e,r)=>{const o=t,i=this[o(418)](r[o(463)]);return e[i]||(e[i]=[]),e[i][o(447)](r),e},{});e[t(485)][t(455)](t(474))&&e[t(448)][t(469)](t(423))&&Object[t(472)](o)[t(481)](([o,i])=>{const n=t;e[n(485)][n(469)](n(474))[n(441)]({name:o,observable:()=>r,buttonViewCreator:()=>this[n(465)](i),formViewCreator:()=>this[n(476)](i),menuBarButtonViewCreator:()=>this[n(437)](i),override:n(438)!==o})})}[I(464)](){const t=I;super[t(464)](),this[t(467)]&&clearInterval(this[t(467)])}[I(445)](t){const r=I,{locale:o}=this[r(414)];return t[r(435)](t=>{const i=r,n=d(o,t,i(442));switch(t){case e[i(451)]:return{icon:s.IconUploadcareImageUpload,type:e[i(451)],...n};case e[i(487)]:return{icon:s.IconUploadcareLink,type:e[i(487)],...n};case e[i(429)]:return{icon:s.IconDropbox,type:e[i(429)],...n};case e[i(426)]:return{icon:s.IconFacebook,type:e[i(426)],...n};case e[i(486)]:return{icon:s.IconGoogleDrive,type:e[i(486)],...n};case e[i(413)]:return{icon:s.IconGooglePhotos,type:e[i(413)],...n};case e[i(459)]:return{icon:s.IconOneDrive,type:e[i(459)],...n}}})}[I(418)](t){const r=I;switch(t){case e[r(451)]:return r(468);case e[r(487)]:return r(457);default:return r(438)}}[I(471)](t,e){const r=I,o=this[r(414)],i=new t(o[r(444)]),n=o[r(448)][r(469)](r(423));return i[r(417)](r(432)).to(n),i.on(r(493),()=>{n[r(493)](e)}),i}[I(465)](t){const e=I,{locale:r}=this[e(414)],o=this[e(414)][e(485)][e(469)](e(474)),i=t[0],n=this[e(471)](c.ButtonView,i[e(463)]);return n[e(456)]=i[e(456)],n[e(417)](e(453)).to(o,e(475),t=>d(r,i[e(463)],e(t?460:442))[e(419)]),n[e(431)]=!0,n}[I(476)](t){const e=I,{locale:r}=this[e(414)],o=this[e(414)][e(485)][e(469)](e(474));return t[e(435)](t=>{const i=e,n=this[i(471)](c.ButtonView,t[i(463)]);return n[i(473)]=!0,n[i(456)]=t[i(456)],n[i(417)](i(453)).to(o,i(475),e=>d(r,t[i(463)],i(e?460:442))[i(419)]),n})}[I(437)](t){const e=I;return t[e(435)](t=>{const r=e,o=this[r(471)](c.MenuBarMenuListItemButtonView,t[r(463)]);return o[r(456)]=t[r(456)],o[r(453)]=t[r(433)],o})}}var O=r(584),L=r(908),R={attributes:{"data-cke":!0}};R.setAttributes=y(),R.insert=b().bind(null,"head"),R.domAPI=m(),R.insertStyleElement=_();p()(L.A,R);L.A&&L.A.locals&&L.A.locals;var U=N;function P(){var t=["232dmYavf","focusTracker","16792srjFSe","30iBvwiP","45RfNQTv","7634638JrEIwO","bindTemplate","749623wdVXCE","true","2dWTKLD","586238GQQVQO","2950370EqxioZ","forwardCycle","focusCycler","getFocusableElement","205731OQgvJw","div","fire","26780KFbpkJ","createCollection"];return(P=function(){return t})()}function N(t,e){var r=P();return(N=function(t,e){return r[t-=181]})(t,e)}!function(t){for(var e=N,r=t();;)try{if(364164===-parseInt(e(185))/1*(-parseInt(e(184))/2)+-parseInt(e(190))/3+parseInt(e(195))/4*(parseInt(e(193))/5)+parseInt(e(198))/6*(parseInt(e(182))/7)+-parseInt(e(197))/8*(parseInt(e(199))/9)+-parseInt(e(186))/10+-parseInt(e(200))/11)break;r.push(r.shift())}catch(t){r.push(r.shift())}}(P);class D extends c.View{[U(196)];[U(188)];constructor(t){var e=U;super(t),this[e(196)]=new O.FocusTracker,this[e(188)]=new c.FocusCycler({focusables:this[e(194)](),focusTracker:this[e(196)]})}[U(189)](){var t=U;return{tag:t(191),attributes:{"aria-hidden":t(183),tabindex:"0"},on:{focus:this[t(181)].to(()=>{var e=t;this[e(188)][e(192)](e(187))})}}}}var z=V;function F(){var t=["3883Nioowk","div","ck-uploadcare-form","uc-light","ck-uploadcare-theme","9312xSjhTh","setTemplate","getFocusableElement","29813ocsooN","776840WFLLzQ","17290stPdBT","6543LSSicO","485YUckPU","focus","144izckuR","uploader-","uc-file-uploader-inline","303021DDvdNp","element","55956MVIjam","ck-reset_all-excluded","16JSJNON"];return(F=function(){return t})()}function V(t,e){var r=F();return(V=function(t,e){return r[t-=170]})(t,e)}!function(t){for(var e=V,r=t();;)try{if(101428===parseInt(e(182))/1+-parseInt(e(177))/2*(parseInt(e(174))/3)+-parseInt(e(172))/4+parseInt(e(175))/5*(-parseInt(e(190))/6)+parseInt(e(171))/7+parseInt(e(184))/8*(-parseInt(e(180))/9)+-parseInt(e(173))/10*(-parseInt(e(185))/11))break;r.push(r.shift())}catch(t){r.push(r.shift())}}(F);class B extends D{constructor(t,e){var r=V;super(t),this[r(191)]({tag:r(186),attributes:{class:["ck",r(183),r(187)],tabindex:"-1"},children:[{tag:r(179),attributes:{class:[r(188),r(189)],"ctx-name":r(178)+e}},this[r(170)]()]})}[z(176)](){var t=z;this[t(181)][t(176)]()}}function j(){const t=["imageInline","get","aspect-ratio","element","domConverter","48260iuNHlX","some","stopListening","width","plugins","origin","2777985ySOmVH","viewToDom","ImageUtils","findViewImgElement","295572UXgIOR","1160721hQRvHE","load","(max-width: ","editing","9340816zeuywz","match","filter","replace","addClass","getAttribute","change","36PRqwEX","image-processing","height","setStyle","src","554MBMMYD","7fbldIp","map","80csEIdQ","baseURI","x/ ","mapper","removeClass","1001xujuty","/-/resize/","hasAttribute","view","538044UAaBCd","imageBlock","px) 100vw, ","document","join","toViewElement","1061iZXqhw","uploadcareImageId","removeStyle","window","listenTo","isArray","function","image/webp","location"];return(j=function(){return t})()}function H(t,e){const r=G,o=[320,480,768,1024,1200,1600,1920,2400][r(400)](t=>t<=e)[r(412)](e=>t[r(401)](/\/$/,"")+r(419)+e+r(415)+e+"w");return{imageFallbackUrl:t,imageSources:[{srcset:o[r(426)](", "),sizes:r(396)+e+r(424)+e+"px",type:r(376)}]}}function q(t,e,r){const o=t[G(399)](/\/crop\/(\d+)x(\d+)\//);return{width:o?parseInt(o[1],10):e,height:o?parseInt(o[2],10):r}}function K(t,e){const r=G,o=new((0,O.DomEmitterMixin)()),i=t[r(387)][r(379)](r(391)),n=t[r(397)][r(416)][r(427)](e),a=i[r(392)](n),s=t[r(397)][r(421)][r(382)][r(390)](a),c=e[r(403)](r(386)),l=e[r(403)](r(407)),u=r(406);t[r(397)][r(421)][r(404)](t=>{const e=r;t[e(402)](u,n),t[e(408)](e(380),c+"/"+l,a)}),o[r(432)](s,r(395),()=>{const e=r;o[e(385)](s,e(395)),t[e(397)][e(421)][e(404)](t=>{const r=e;t[r(417)](u,n),t[r(430)](r(380),a)})})}function G(t,e){const r=j();return(G=function(t,e){return r[t-=376]})(t,e)}function W(t){const e=G;if(Array[e(433)](t)){const r=t[e(412)](W);return t=>r[e(384)](e=>e(t))}if(e(388)==t){const t=O.global[e(431)][e(377)][e(388)];return r=>new URL(r,O.global[e(425)][e(414)])[e(388)]==t}return e(434)==typeof t?t:t instanceof RegExp?r=>!(!r[e(399)](t)&&!r[e(401)](/^https?:\/\//,"")[e(399)](t)):()=>!1}function X(t,e){var r=Z;return(0,O.getAncestors)(t[r(225)])[r(226)](e)}function Z(t,e){var r=Y();return(Z=function(t,e){return r[t-=221]})(t,e)}function Y(){var t=["5739690fqujSZ","3832392Oqxqgd","1273560BNohiN","1282944CCzjVw","3290739GoKpoY","3KzFsZW","717088kibKTP","target","includes","4093474EsXVvN"];return(Y=function(){return t})()}!function(t){const e=G,r=t();for(;;)try{if(766573===parseInt(e(428))/1*(-parseInt(e(410))/2)+parseInt(e(389))/3+-parseInt(e(405))/4*(-parseInt(e(383))/5)+parseInt(e(422))/6+-parseInt(e(411))/7*(-parseInt(e(398))/8)+-parseInt(e(394))/9*(-parseInt(e(413))/10)+parseInt(e(418))/11*(-parseInt(e(393))/12))break;r.push(r.shift())}catch(t){r.push(r.shift())}}(j),function(t){for(var e=Z,r=t();;)try{if(741274===parseInt(e(223))/1*(-parseInt(e(224))/2)+parseInt(e(222))/3+-parseInt(e(229))/4+parseInt(e(228))/5+-parseInt(e(221))/6+parseInt(e(227))/7+parseInt(e(230))/8)break;r.push(r.shift())}catch(t){r.push(r.shift())}}(Y);const J=tt;function Q(){const t=["uuid","allEntries","ucContextId","element","_dialog","view","width","_insertAsset","editing","_type","removeSelectionAttribute","focus","text","imageInfo","linkHref","isOpen","stopDelegating","getSelectedElement","change","imageInline","getOutputCollectionState","627672dlknvq","setSelection","5yDpsKV","imageBlock","model","show","_insertImage","removeAllFiles","setAttribute","_api","_initListeners","_editing","setCurrentActivity","destroy","detail","get","hide","3070690ewrrgG","image","3092QdwFDC","1552032afXkjk","80sXOlpA","_editor","length","99309VcbNhL","configElement","initFlow","insertImage","EDITOR_TOP_CENTER","getLastPosition","getAPI","_initDialog","doneFlow","execute","70228BTTofx","document","stopListening","993eSGuVD","selection","Replace","idle","source-list","addEventListener","ctxElement","plugins","done-click","uploadCare","Local","status","62779xGBiVH","Insert","_formView","attributes"];return(Q=function(){return t})()}function tt(t,e){const r=Q();return(tt=function(t,e){return r[t-=329]})(t,e)}!function(t){const e=tt,r=t();for(;;)try{if(130835===-parseInt(e(365))/1+parseInt(e(350))/2+parseInt(e(353))/3*(parseInt(e(335))/4)+-parseInt(e(392))/5*(parseInt(e(390))/6)+-parseInt(e(340))/7*(-parseInt(e(337))/8)+parseInt(e(336))/9+-parseInt(e(333))/10)break;r.push(r.shift())}catch(t){r.push(r.shift())}}(Q);class et extends((0,O.ObservableMixin)()){[J(338)];[J(373)];[J(401)];[J(399)];[J(378)]=null;[J(367)]=null;constructor(t,e,r){const o=J;super(),this[o(338)]=t,this[o(401)]=e,this[o(373)]=t[o(360)][o(331)](c.Dialog),this[o(399)]=e[o(359)][o(346)](),this[o(378)]=r,this[o(401)][o(341)][o(398)](o(357),this[o(378)]),this[o(347)](),this[o(400)](),this[o(399)][o(342)]()}[J(329)](){const t=J;this[t(367)]&&(this[t(367)][t(329)](),this[t(367)]=null),this[t(399)]&&this[t(399)][t(348)](),this[t(352)](),this[t(385)]()}[J(347)](){const t=J,{locale:e,model:r}=this[t(338)],o=r[t(351)][t(354)][t(386)](),i=o&&(o.is(t(372),t(393))||o.is(t(372),t(388)));this[t(367)]=new B(e,this[t(401)][t(371)]),this[t(373)][t(395)]({id:t(362),icon:s.IconUploadcareImageUpload,title:d(e,this[t(378)],t(i?355:366))[t(381)],content:this[t(367)],position:c.DialogViewPosition[t(344)],isModal:!0,onShow:()=>{const e=t;this[e(367)][e(380)]()},onHide:()=>{const e=t;this[e(399)][e(397)](),this[e(338)][e(377)][e(374)][e(380)](),this[e(329)]()},keystrokeHandlerOptions:{filter:e=>!X(e,this[t(367)][t(372)])}})}[J(400)](){const t=J;this[t(401)][t(359)][t(358)](t(361),()=>{const e=t,{allEntries:r}=this[e(399)][e(389)]();this[e(338)][e(394)][e(387)](t=>{const o=e,i=r[o(339)];for(const e of r){const n=e===r[i-1],{cdnUrl:a,fileInfo:s}=e;if(!a||!s)continue;const{width:c,height:l}=s[o(382)],u=q(a,c,l),d=H(a,u[o(375)]),h={id:s[o(369)],type:o(334),attributes:{imageDimension:u,...d}};this[o(376)](h,n,t)}}),this[e(373)][e(332)]()}),this[t(401)][t(359)][t(358)](t(387),r=>{const o=t;o(356)===r[o(330)][o(364)]&&!r[o(330)][o(370)][o(339)]&&this[o(373)][o(384)]&&(this[o(378)]===e[o(363)]?this[o(399)][o(402)](e[o(363)]):this[o(399)][o(342)]())})}[J(376)](t,e,r){const o=J,i=this[o(338)][o(394)][o(351)][o(354)],n=i[o(386)](),a=!(!n||!n.is(o(372),o(388)));r[o(379)](o(383)),this[o(396)](t,a),e||r[o(391)](i[o(345)]())}[J(396)](t,e){const r=J,o=this[r(338)],{imageDimension:i,imageFallbackUrl:n,imageSources:a}=t[r(368)];o[r(349)](r(343),{imageType:e?r(388):null,source:{uploadcareImageId:t.id,src:n,sources:a,...i}})}}function rt(t,e){var r=it();return(rt=function(t,e){return r[t-=148]})(t,e)}var ot=rt;function it(){var t=["plugins","requires","insertImage","3540816wmyVbX","11451930tRUewN","refresh","_editing","execute","9770985KdCxXQ","editor","get","10MajlzG","84906bIVjIc","destroy","_controller","1251452YmBDFV","1730767wAyUsh","commands","2980rDLmHC","isEnabled","14EyExTC","187323LMReBm","_checkEnabled"];return(it=function(){return t})()}!function(t){for(var e=rt,r=t();;)try{if(983626===parseInt(e(162))/1+-parseInt(e(166))/2*(parseInt(e(167))/3)+-parseInt(e(161))/4*(-parseInt(e(157))/5)+-parseInt(e(150))/6+-parseInt(e(154))/7+-parseInt(e(149))/8+-parseInt(e(158))/9*(-parseInt(e(164))/10))break;r.push(r.shift())}catch(t){r.push(r.shift())}}(it);class nt extends a.Command{[ot(152)];[ot(160)]=null;static get[ot(170)](){return[c.Dialog,be]}constructor(t){var e=ot;super(t),this[e(152)]=t[e(169)][e(156)](be)}[ot(151)](){var t=ot;this[t(165)]=this[t(168)]()}[ot(153)](t){var e=ot;this[e(160)]&&(this[e(160)][e(159)](),this[e(160)]=null),this[e(160)]=new et(this[e(155)],this[e(152)],t)}[ot(168)](){var t=ot;return this[t(155)][t(163)][t(156)](t(148))[t(165)]}}var at=r(260);function st(t){return"[object Object]"===Object.prototype.toString.call(t)}const ct=/\W|_/g;function lt(t){return t.split(ct).map((t,e)=>t.charAt(0)[e>0?"toUpperCase":"toLowerCase"]()+t.slice(1)).join("")}function ut(t,{ignoreKeys:e}={ignoreKeys:[]}){return Array.isArray(t)?t.map(t=>dt(t,{ignoreKeys:e})):t}function dt(t,{ignoreKeys:e}={ignoreKeys:[]}){if(Array.isArray(t))return ut(t,{ignoreKeys:e});if(!st(t))return t;const r={};for(const o of Object.keys(t)){let i=t[o];e.includes(o)?r[o]=i:(st(i)?i=dt(i,{ignoreKeys:e}):Array.isArray(i)&&(i=ut(i,{ignoreKeys:e})),r[lt(o)]=i)}return r}const ht={factor:2,time:100};function pt(t,e=ht){let r=0;return function t(o){const i=Math.round(e.time*e.factor**r);return o({attempt:r,retry:e=>(t=>new Promise(e=>setTimeout(e,t)))(e??i).then(()=>(r+=1,t(o)))})}(t)}class gt extends Error{}class mt extends gt{originalProgressEvent;constructor(t){super(),this.name="NetworkError",this.message="Network error",Object.setPrototypeOf(this,mt.prototype),this.originalProgressEvent=t}}const ft=(t,e)=>{t&&(t.aborted?Promise.resolve().then(e):t.addEventListener("abort",()=>e(),{once:!0}))};class bt extends gt{isCancel=!0;constructor(t="Request canceled"){super(t),this.name="CancelError",Object.setPrototypeOf(this,bt.prototype)}}const vt=({check:t,interval:e=500,timeout:r,signal:o})=>new Promise((i,n)=>{let a,s;ft(o,()=>{a&&clearTimeout(a),n(new bt("Poll cancelled"))}),r&&(s=setTimeout(()=>{a&&clearTimeout(a),n(new bt("Timed out"))},r));const c=()=>{try{Promise.resolve(t(o)).then(t=>{t?(s&&clearTimeout(s),i(t)):a=setTimeout(c,e)}).catch(t=>{s&&clearTimeout(s),n(t)})}catch(t){s&&clearTimeout(s),n(t)}};a=setTimeout(c,0)}),yt={baseCDN:"https://ucarecdn.com",baseURL:"https://upload.uploadcare.com",maxContentLength:52428800,retryThrottledRequestMaxTimes:1,retryNetworkErrorMaxTimes:3,multipartMinFileSize:26214400,multipartChunkSize:5242880,multipartMinLastPartSize:1048576,maxConcurrentRequests:4,pollingTimeoutMilliseconds:1e4,pusherKey:"79ae88bd931ea68464d9"},wt="application/octet-stream",_t="original",kt=({method:t,url:e,data:r,headers:o={},signal:i,onProgress:n})=>new Promise((a,s)=>{const c=new XMLHttpRequest,l=t?.toUpperCase()||"GET";let u=!1;c.open(l,e,!0),o&&Object.entries(o).forEach(t=>{const[e,r]=t;void 0!==r&&!Array.isArray(r)&&c.setRequestHeader(e,r)}),c.responseType="text",ft(i,()=>{u=!0,c.abort(),s(new bt)}),c.onload=()=>{if(200!=c.status)s(new Error(`Error ${c.status}: ${c.statusText}`));else{const t={method:l,url:e,data:r,headers:o||void 0,signal:i,onProgress:n},s=c.getAllResponseHeaders().trim().split(/[\r\n]+/),u={};s.forEach(function(t){const e=t.split(": "),r=e.shift(),o=e.join(": ");r&&void 0!==r&&(u[r]=o)});const d=c.response,h=c.status;a({request:t,data:d,headers:u,status:h})}},c.onerror=t=>{u||s(new mt(t))},n&&"function"==typeof n&&(c.upload.onprogress=t=>{t.lengthComputable?n({isComputable:!0,value:t.loaded/t.total}):n({isComputable:!1})}),r?c.send(r):c.send()});const xt=function(t,...e){return t};const Ct=t=>"undefined"!=typeof Blob&&t instanceof Blob,Et=t=>"undefined"!=typeof File&&t instanceof File,Tt=t=>!!t&&"object"==typeof t&&!Array.isArray(t)&&"uri"in t&&"string"==typeof t.uri,At=t=>Ct(t)||Et(t)||Tt(t);function It(t,e,r){if(Array.isArray(r))for(const o of r)It(t,`${e}[]`,o);else if((o=r)&&"object"==typeof o&&"data"in o&&At(o.data)){const{name:o,contentType:i}=r,n=xt(r.data,o,i??wt),a=(({name:t})=>t?[t]:[])({name:o,contentType:i});t.push([e,n,...a])}else if((t=>!!t&&"object"==typeof t&&!Array.isArray(t))(r))for(const[o,i]of Object.entries(r))void 0!==i&&t.push([`${e}[${o}]`,String(i)]);else(t=>"string"==typeof t||"number"==typeof t||void 0===t)(r)&&r&&t.push([e,r.toString()]);var o}function St(t){const e=new FormData,r=function(t){const e=[];for(const[r,o]of Object.entries(t))It(e,r,o);return e}(t);for(const t of r){const[r,o,...i]=t;e.append(r,o,...i)}return e}class Mt extends gt{code;request;response;headers;constructor(t,e,r,o,i){super(),this.name="UploadError",this.message=t,this.code=e,this.request=r,this.response=o,this.headers=i,Object.setPrototypeOf(this,Mt.prototype)}}const $t=(t,e,r)=>{const o=new URL(t);return o.pathname=(o.pathname+e).replace("//","/"),r&&(o.search=(t=>{const e=new URLSearchParams;for(const[r,o]of Object.entries(t))o&&"object"==typeof o&&!Array.isArray(o)?Object.entries(o).filter(t=>t[1]??!1).forEach(t=>e.set(`${r}[${t[0]}]`,String(t[1]))):Array.isArray(o)?o.forEach(t=>{e.append(`${r}[]`,t)}):"string"==typeof o&&o?e.set(r,o):"number"==typeof o&&e.set(r,o.toString());return e.toString()})(r)),o.toString()};function Ot(t){return function({libraryName:t,libraryVersion:e,userAgent:r,publicKey:o="",integration:i=""}){const n="JavaScript";return"string"==typeof r?r:"function"==typeof r?r({publicKey:o,libraryName:t,libraryVersion:e,languageName:n,integration:i}):`${[t,e,o].filter(Boolean).join("/")} (${[n,i].filter(Boolean).join("; ")})`}({libraryName:"UploadcareUploadClient",libraryVersion:"6.14.3",...t})}function Lt(t,e){const{retryThrottledRequestMaxTimes:r,retryNetworkErrorMaxTimes:o}=e;return pt(({attempt:e,retry:i})=>t().catch(t=>{if("response"in t&&"RequestThrottledError"===t?.code&&e<r)return i(function(t){const{headers:e}=t||{};if(!e||"string"!=typeof e["retry-after"])return 15e3;const r=parseInt(e["retry-after"],10);return Number.isFinite(r)?1e3*r:15e3}(t));if(t instanceof mt&&e<o)return i(1e3*(e+1));throw t}))}const Rt=t=>{let e="";return(Ct(t)||Et(t)||Tt(t))&&(e=t.type),e||wt},Ut=t=>{let e="";return Et(t)&&t.name?e=t.name:Ct(t)?e="":Tt(t)&&t.name&&(e=t.name),e||_t};function Pt(t){return void 0===t||"auto"===t?"auto":t?"1":"0"}function Nt(t,{publicKey:e,fileName:r,contentType:o,baseURL:i=yt.baseURL,secureSignature:n,secureExpire:a,store:s,signal:c,onProgress:l,source:u="local",integration:d,userAgent:h,retryThrottledRequestMaxTimes:p=yt.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:g=yt.retryNetworkErrorMaxTimes,metadata:m}){return Lt(()=>kt({method:"POST",url:$t(i,"/base/",{jsonerrors:1}),headers:{"X-UC-User-Agent":Ot({publicKey:e,integration:d,userAgent:h})},data:St({file:{data:t,name:r||Ut(t),contentType:o||Rt(t)},UPLOADCARE_PUB_KEY:e,UPLOADCARE_STORE:Pt(s),signature:n,expire:a,source:u,metadata:m}),signal:c,onProgress:l}).then(({data:t,headers:e,request:r})=>{const o=dt(JSON.parse(t));if("error"in o)throw new Mt(o.error.content,o.error.errorCode,r,o,e);return o}),{retryNetworkErrorMaxTimes:g,retryThrottledRequestMaxTimes:p})}var Dt,zt;function Ft(t,{publicKey:e,baseURL:r=yt.baseURL,store:o,fileName:i,checkForUrlDuplicates:n,saveUrlForRecurrentUploads:a,secureSignature:s,secureExpire:c,source:l="url",signal:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p=yt.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:g=yt.retryNetworkErrorMaxTimes,metadata:m}){return Lt(()=>kt({method:"POST",headers:{"X-UC-User-Agent":Ot({publicKey:e,integration:d,userAgent:h})},url:$t(r,"/from_url/",{jsonerrors:1,pub_key:e,source_url:t,store:Pt(o),filename:i,check_URL_duplicates:n?1:void 0,save_URL_duplicates:a?1:void 0,signature:s,expire:c,source:l,metadata:m}),signal:u}).then(({data:t,headers:e,request:r})=>{const o=dt(JSON.parse(t));if("error"in o)throw new Mt(o.error.content,o.error.errorCode,r,o,e);return o}),{retryNetworkErrorMaxTimes:g,retryThrottledRequestMaxTimes:p})}!function(t){t.Token="token",t.FileInfo="file_info"}(Dt||(Dt={})),function(t){t.Unknown="unknown",t.Waiting="waiting",t.Progress="progress",t.Error="error",t.Success="success"}(zt||(zt={}));function Vt(t,{publicKey:e,baseURL:r=yt.baseURL,signal:o,integration:i,userAgent:n,retryThrottledRequestMaxTimes:a=yt.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:s=yt.retryNetworkErrorMaxTimes}={}){return Lt(()=>kt({method:"GET",headers:e?{"X-UC-User-Agent":Ot({publicKey:e,integration:i,userAgent:n})}:void 0,url:$t(r,"/from_url/status/",{jsonerrors:1,token:t}),signal:o}).then(({data:t,headers:e,request:r})=>{const o=dt(JSON.parse(t));if("error"in o&&!(t=>"status"in t&&t.status===zt.Error)(o))throw new Mt(o.error.content,o.error.errorCode,r,o,e);return o}),{retryNetworkErrorMaxTimes:s,retryThrottledRequestMaxTimes:a})}function Bt(t,{publicKey:e,baseURL:r=yt.baseURL,signal:o,source:i,integration:n,userAgent:a,retryThrottledRequestMaxTimes:s=yt.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:c=yt.retryNetworkErrorMaxTimes}){return Lt(()=>kt({method:"GET",headers:{"X-UC-User-Agent":Ot({publicKey:e,integration:n,userAgent:a})},url:$t(r,"/info/",{jsonerrors:1,pub_key:e,file_id:t,source:i}),signal:o}).then(({data:t,headers:e,request:r})=>{const o=dt(JSON.parse(t));if("error"in o)throw new Mt(o.error.content,o.error.errorCode,r,o,e);return o}),{retryThrottledRequestMaxTimes:s,retryNetworkErrorMaxTimes:c})}function jt(t,{publicKey:e,contentType:r,fileName:o,multipartChunkSize:i=yt.multipartChunkSize,baseURL:n="",secureSignature:a,secureExpire:s,store:c,signal:l,source:u="local",integration:d,userAgent:h,retryThrottledRequestMaxTimes:p=yt.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:g=yt.retryNetworkErrorMaxTimes,metadata:m}){return Lt(()=>kt({method:"POST",url:$t(n,"/multipart/start/",{jsonerrors:1}),headers:{"X-UC-User-Agent":Ot({publicKey:e,integration:d,userAgent:h})},data:St({filename:o||_t,size:t,content_type:r||wt,part_size:i,UPLOADCARE_STORE:Pt(c),UPLOADCARE_PUB_KEY:e,signature:a,expire:s,source:u,metadata:m}),signal:l}).then(({data:t,headers:e,request:r})=>{const o=dt(JSON.parse(t));if("error"in o)throw new Mt(o.error.content,o.error.errorCode,r,o,e);return o.parts=Object.keys(o.parts).map(t=>o.parts[Number(t)]),o}),{retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g})}function Ht(t,e,{contentType:r,signal:o,onProgress:i,retryThrottledRequestMaxTimes:n=yt.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:a=yt.retryNetworkErrorMaxTimes}){return Lt(()=>kt({method:"PUT",url:e,data:t,onProgress:i,signal:o,headers:{"Content-Type":r||wt}}).then(t=>(i&&i({isComputable:!0,value:1}),t)).then(({status:t})=>({code:t})),{retryThrottledRequestMaxTimes:n,retryNetworkErrorMaxTimes:a})}function qt(t,{publicKey:e,baseURL:r=yt.baseURL,source:o="local",signal:i,integration:n,userAgent:a,retryThrottledRequestMaxTimes:s=yt.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:c=yt.retryNetworkErrorMaxTimes}){return Lt(()=>kt({method:"POST",url:$t(r,"/multipart/complete/",{jsonerrors:1}),headers:{"X-UC-User-Agent":Ot({publicKey:e,integration:n,userAgent:a})},data:St({uuid:t,UPLOADCARE_PUB_KEY:e,source:o}),signal:i}).then(({data:t,headers:e,request:r})=>{const o=dt(JSON.parse(t));if("error"in o)throw new Mt(o.error.content,o.error.errorCode,r,o,e);return o}),{retryThrottledRequestMaxTimes:s,retryNetworkErrorMaxTimes:c})}function Kt(t,{publicKey:e,baseURL:r,source:o,integration:i,userAgent:n,retryThrottledRequestMaxTimes:a,retryNetworkErrorMaxTimes:s,signal:c,onProgress:l}){return vt({check:c=>Bt(t,{publicKey:e,baseURL:r,signal:c,source:o,integration:i,userAgent:n,retryThrottledRequestMaxTimes:a,retryNetworkErrorMaxTimes:s}).then(t=>t.isReady?t:(l&&l({isComputable:!0,value:1}),!1)),signal:c})}class Gt{uuid;name;size;isStored;isImage;mimeType;cdnUrl;s3Url;originalFilename;imageInfo;videoInfo;contentInfo;metadata;s3Bucket;defaultEffects=null;constructor(t,{baseCDN:e=yt.baseCDN,fileName:r}={}){const{uuid:o,s3Bucket:i}=t,n=$t(e,`${o}/`),a=i?$t(`https://${i}.s3.amazonaws.com/`,`${o}/${t.filename}`):null;this.uuid=o,this.name=r||t.filename,this.size=t.size,this.isStored=t.isStored,this.isImage=t.isImage,this.mimeType=t.mimeType,this.cdnUrl=n,this.originalFilename=t.originalFilename,this.imageInfo=t.imageInfo,this.videoInfo=t.videoInfo,this.contentInfo=t.contentInfo,this.metadata=t.metadata||null,this.s3Bucket=i||null,this.s3Url=a,function(t){return"defaultEffects"in t}(t)&&(this.defaultEffects=t.defaultEffects)}}const Wt=(t,{signal:e}={})=>{let r=null,o=null;const i=t.map(()=>new AbortController);return ft(e,()=>{i.forEach(t=>t.abort())}),Promise.all(t.map((t,e)=>{const n=(t=>()=>{o=t,i.forEach((e,r)=>r!==t&&e.abort())})(e);return Promise.resolve().then(()=>t({stopRace:n,signal:i[e].signal})).then(t=>(n(),t)).catch(t=>(r=t,null))})).then(t=>{if(null===o)throw r;return t[o]})};var Xt=window.WebSocket;class Zt{events=Object.create({});emit(t,e){this.events[t]?.forEach(t=>t(e))}on(t,e){this.events[t]=this.events[t]||[],this.events[t].push(e)}off(t,e){this.events[t]=e?this.events[t].filter(t=>t!==e):[]}}class Yt{key;disconnectTime;ws=void 0;queue=[];isConnected=!1;subscribers=0;emmitter=new Zt;disconnectTimeoutId=null;constructor(t,e=3e4){this.key=t,this.disconnectTime=e}connect(){if(this.disconnectTimeoutId&&clearTimeout(this.disconnectTimeoutId),!this.isConnected&&!this.ws){const t=`wss://ws.pusherapp.com/app/${this.key}?protocol=5&client=js&version=1.12.2`;this.ws=new Xt(t),this.ws.addEventListener("error",t=>{this.emmitter.emit("error",new Error(t.message))}),this.emmitter.on("connected",()=>{this.isConnected=!0,this.queue.forEach(t=>this.send(t.event,t.data)),this.queue=[]}),this.ws.addEventListener("message",t=>{const e=JSON.parse(t.data.toString());switch(e.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(e.channel,((t,e)=>"success"===t?{status:zt.Success,...e}:"progress"===t?{status:zt.Progress,...e}:{status:zt.Error,...e})(e.event,JSON.parse(e.data)))}})}}disconnect(){const t=()=>{this.ws?.close(),this.ws=void 0,this.isConnected=!1};this.disconnectTime?this.disconnectTimeoutId=setTimeout(()=>{t()},this.disconnectTime):t()}send(t,e){const r=JSON.stringify({event:t,data:e});this.ws?.send(r)}subscribe(t,e){this.subscribers+=1,this.connect();const r=`task-status-${t}`,o={event:"pusher:subscribe",data:{channel:r}};this.emmitter.on(r,e),this.isConnected?this.send(o.event,o.data):this.queue.push(o)}unsubscribe(t){this.subscribers-=1;const e=`task-status-${t}`,r={event:"pusher:unsubscribe",data:{channel:e}};this.emmitter.off(e),this.isConnected?this.send(r.event,r.data):this.queue=this.queue.filter(t=>t.data.channel!==e),0===this.subscribers&&this.disconnect()}onError(t){return this.emmitter.on("error",t),()=>this.emmitter.off("error",t)}}let Jt=null;const Qt=t=>{if(!Jt){const e="undefined"==typeof window?0:3e4;Jt=new Yt(t,e)}return Jt};const te=(t,{publicKey:e,fileName:r,baseURL:o,baseCDN:i,checkForUrlDuplicates:n,saveUrlForRecurrentUploads:a,secureSignature:s,secureExpire:c,store:l,signal:u,onProgress:d,source:h,integration:p,userAgent:g,retryThrottledRequestMaxTimes:m,pusherKey:f=yt.pusherKey,metadata:b})=>{return Promise.resolve((v=f,void Qt(v).connect())).then(()=>Ft(t,{publicKey:e,fileName:r,baseURL:o,checkForUrlDuplicates:n,saveUrlForRecurrentUploads:a,secureSignature:s,secureExpire:c,store:l,signal:u,source:h,integration:p,userAgent:g,retryThrottledRequestMaxTimes:m,metadata:b})).catch(t=>{const e=Qt(f);return e?.disconnect(),Promise.reject(t)}).then(t=>t.type===Dt.FileInfo?t:Wt([({signal:r})=>function({token:t,publicKey:e,baseURL:r,integration:o,userAgent:i,retryThrottledRequestMaxTimes:n,retryNetworkErrorMaxTimes:a,onProgress:s,signal:c}){return vt({check:c=>Vt(t,{publicKey:e,baseURL:r,integration:o,userAgent:i,retryThrottledRequestMaxTimes:n,retryNetworkErrorMaxTimes:a,signal:c}).then(e=>{switch(e.status){case zt.Error:return new Mt(e.error,e.errorCode);case zt.Waiting:return!1;case zt.Unknown:return new Mt(`Token "${t}" was not found.`);case zt.Progress:return s&&("unknown"===e.total?s({isComputable:!1}):s({isComputable:!0,value:e.done/e.total})),!1;case zt.Success:return s&&s({isComputable:!0,value:e.done/e.total}),e;default:throw new Error("Unknown status")}}),signal:c})}({token:t.token,publicKey:e,baseURL:o,integration:p,userAgent:g,retryThrottledRequestMaxTimes:m,onProgress:d,signal:r}),({signal:e})=>(({token:t,pusherKey:e,signal:r,onProgress:o})=>new Promise((i,n)=>{const a=Qt(e),s=a.onError(n),c=()=>{s(),a.unsubscribe(t)};ft(r,()=>{c(),n(new bt("pusher cancelled"))}),a.subscribe(t,t=>{switch(t.status){case zt.Progress:o&&("unknown"===t.total?o({isComputable:!1}):o({isComputable:!0,value:t.done/t.total}));break;case zt.Success:c(),o&&o({isComputable:!0,value:t.done/t.total}),i(t);break;case zt.Error:c(),n(new Mt(t.msg,t.error_code))}})}))({token:t.token,pusherKey:f,signal:e,onProgress:d})],{signal:u})).then(t=>{if(t instanceof Mt)throw t;return t}).then(t=>Kt(t.uuid,{publicKey:e,baseURL:o,integration:p,userAgent:g,retryThrottledRequestMaxTimes:m,onProgress:d,signal:u})).then(t=>new Gt(t,{baseCDN:i}));var v},ee=new WeakMap,re=async t=>{if(Et(t)||Ct(t))return t.size;if(Tt(t)){return(await(async t=>{if(ee.has(t))return ee.get(t);const e=await fetch(t.uri).then(t=>t.blob());return ee.set(t,e),e})(t)).size}throw new Error("Unknown file type. Cannot determine file size.")},oe=t=>{const e=new RegExp("[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}");return!At(t)&&e.test(t)},ie=t=>{const e=new RegExp("^(?:\\w+:)?\\/\\/([^\\s\\.]+\\.\\S{2}|localhost[\\:?\\d]*)\\S*$");return!At(t)&&e.test(t)},ne=async(t,e,r)=>o=>((t,e,r,o)=>{const i=o*e,n=Math.min(i+o,r);return t.slice(i,n)})(t,o,e,r),ae=async(t,{publicKey:e,fileName:r,fileSize:o,baseURL:i,secureSignature:n,secureExpire:a,store:s,signal:c,onProgress:l,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,contentType:m,multipartChunkSize:f=yt.multipartChunkSize,maxConcurrentRequests:b=yt.maxConcurrentRequests,baseCDN:v,metadata:y})=>{const w=o??await re(t);let _;const k=(t,e)=>{if(!l)return;_||(_=Array(t).fill(0));return r=>{var o;r.isComputable&&(_[e]=r.value,l({isComputable:!0,value:(o=_,o.reduce((t,e)=>t+e,0)/t)}))}};return m||=Rt(t),jt(w,{publicKey:e,contentType:m,fileName:r||Ut(t),baseURL:i,secureSignature:n,secureExpire:a,store:s,signal:c,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,metadata:y,multipartChunkSize:f}).then(async({uuid:r,parts:o})=>{const i=await ne(t,w,f);return Promise.all([r,(n=b,a=o.map((t,r)=>()=>((t,e,{publicKey:r,contentType:o,onProgress:i,signal:n,integration:a,retryThrottledRequestMaxTimes:s,retryNetworkErrorMaxTimes:c})=>Ht(t,e,{publicKey:r,contentType:o,onProgress:i,signal:n,integration:a,retryThrottledRequestMaxTimes:s,retryNetworkErrorMaxTimes:c}))(i(r),t,{publicKey:e,contentType:m,onProgress:k(o.length,r),signal:c,integration:d,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g})),new Promise((t,e)=>{const r=[];let o=!1,i=a.length;const s=[...a],c=()=>{const n=a.length-s.length,l=s.shift();l&&l().then(e=>{o||(r[n]=e,i-=1,i?c():t(r))}).catch(t=>{o=!0,e(t)})};for(let t=0;t<n;t++)c()}))]);var n,a}).then(([t])=>qt(t,{publicKey:e,baseURL:i,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g})).then(t=>t.isReady?t:Kt(t.uuid,{publicKey:e,baseURL:i,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,onProgress:l,signal:c})).then(t=>new Gt(t,{baseCDN:v}))};async function se(t,{publicKey:e,fileName:r,baseURL:o=yt.baseURL,secureSignature:i,secureExpire:n,store:a,signal:s,onProgress:c,source:l,integration:u,userAgent:d,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,contentType:g,multipartMinFileSize:m,multipartChunkSize:f,maxConcurrentRequests:b,baseCDN:v=yt.baseCDN,checkForUrlDuplicates:y,saveUrlForRecurrentUploads:w,pusherKey:_,metadata:k}){if(At(t)){const y=await re(t);return((t,e=yt.multipartMinFileSize)=>t>=e)(y,m)?ae(t,{publicKey:e,contentType:g,multipartChunkSize:f,fileSize:y,fileName:r,baseURL:o,secureSignature:i,secureExpire:n,store:a,signal:s,onProgress:c,source:l,integration:u,userAgent:d,maxConcurrentRequests:b,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,baseCDN:v,metadata:k}):((t,{publicKey:e,fileName:r,baseURL:o,secureSignature:i,secureExpire:n,store:a,contentType:s,signal:c,onProgress:l,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,baseCDN:m,metadata:f})=>Nt(t,{publicKey:e,fileName:r,contentType:s,baseURL:o,secureSignature:i,secureExpire:n,store:a,signal:c,onProgress:l,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,metadata:f}).then(({file:t})=>Kt(t,{publicKey:e,baseURL:o,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,onProgress:l,signal:c})).then(t=>new Gt(t,{baseCDN:m})))(t,{publicKey:e,fileName:r,contentType:g,baseURL:o,secureSignature:i,secureExpire:n,store:a,signal:s,onProgress:c,source:l,integration:u,userAgent:d,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,baseCDN:v,metadata:k})}if(ie(t))return te(t,{publicKey:e,fileName:r,baseURL:o,baseCDN:v,checkForUrlDuplicates:y,saveUrlForRecurrentUploads:w,secureSignature:i,secureExpire:n,store:a,signal:s,onProgress:c,source:l,integration:u,userAgent:d,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,pusherKey:_,metadata:k});if(oe(t))return((t,{publicKey:e,fileName:r,baseURL:o,signal:i,onProgress:n,source:a,integration:s,userAgent:c,retryThrottledRequestMaxTimes:l,retryNetworkErrorMaxTimes:u,baseCDN:d})=>Bt(t,{publicKey:e,baseURL:o,signal:i,source:a,integration:s,userAgent:c,retryThrottledRequestMaxTimes:l,retryNetworkErrorMaxTimes:u}).then(t=>new Gt(t,{baseCDN:d,fileName:r})).then(t=>(n&&n({isComputable:!0,value:1}),t)))(t,{publicKey:e,fileName:r,baseURL:o,signal:s,onProgress:c,source:l,integration:u,userAgent:d,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,baseCDN:v});throw new TypeError(`File uploading from "${t}" is not supported`)}var ce=le;function le(t,e){var r=ue();return(le=function(t,e){return r[t-=433]})(t,e)}function ue(){var t=["16EKDJjJ","638613OvzCmc","getInfo","6ywvKCZ","3747023zALRVC","25280ZQWDbg","1706885oGvCiK","2464544AWFGYm","7072329cooick","12pgdjYv","300XcFIol","49815RtQdVc","4ntcNmw","upload"];return(ue=function(){return t})()}!function(t){for(var e=le,r=t();;)try{if(440202===parseInt(e(436))/1*(parseInt(e(441))/2)+-parseInt(e(437))/3*(-parseInt(e(434))/4)+-parseInt(e(442))/5+-parseInt(e(439))/6*(-parseInt(e(440))/7)+parseInt(e(443))/8+parseInt(e(433))/9*(parseInt(e(446))/10)+-parseInt(e(444))/11*(parseInt(e(445))/12))break;r.push(r.shift())}catch(t){r.push(r.shift())}}(ue);class de{static[ce(435)]({file:t,...e}){return se(t,e)}static[ce(438)](t,e){return Bt(t,e)}}class he extends a.Plugin{static get requires(){return["ImageUploadEditing","ImageUploadProgress",at.FileRepository,be]}static get pluginName(){return"UploadcareUploadAdapter"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}async afterInit(){const t=this.editor;t.config.get("uploadcare")&&(t.plugins.get(at.FileRepository).createUploadAdapter=e=>new pe(e,t),t.plugins.get("ImageUploadEditing").on("uploadComplete",(e,{imageElement:r,data:o})=>{t.model.change(t=>{t.setAttribute("uploadcareImageId",o.uploadcareImageId,r)})}))}}class pe{loader;editor;controller;constructor(t,e){this.loader=t,this.editor=e,this.controller=new AbortController}async upload(){const t=this.editor.t,e=await this.loader.file;return de.upload({file:e,publicKey:this.editor.config.get("uploadcare.pubkey"),baseURL:this.editor.config.get("uploadcare.uploader.baseUrl"),baseCDN:this.editor.config.get("uploadcare.uploader.cdnCname"),signal:this.controller.signal,onProgress:t=>{t&&t.isComputable&&(this.loader.uploadTotal=1,this.loader.uploaded=t.value)}}).then(async t=>{const{imageFallbackUrl:e,imageSources:r}=H(t.cdnUrl,t.imageInfo.width);return{uploadcareImageId:t.uuid,default:e,sources:r}}).catch(()=>{const r=t("Cannot upload file:")+" "+e.name+".";return Promise.reject(r)})}abort(){this.controller.abort()}}const ge=me;function me(t,e){const r=fe();return(me=function(t,e){return r[t-=457]})(t,e)}function fe(){const t=["uploadcare","upcast","editing","execute","uploadcareImageReplace","ucContextId","for","requires","isRegistered","imageInline","removeAttribute","getSelectedElement","configElement","listenTo","extend","closeMax","uc-upload-ctx-provider","commands","\n\t\t\t\t.uc-dropdown-menu__popup { padding: 0; }\n\t\t\t\t.uc-dropdown-menu__popup-menu { gap: 0; }\n\t\t\t\t.uc-dropdown-menu__popup-footer { padding-top: 0; }\n\t\t\t\t.uc-dropdown-menu__separator { margin: 0; }\n\t\t\t","attributeToAttribute","uploadcare.pubkey","config","selection","href","document","6411412tqiSUJ","fromCharCode","uploadcare.uploader","true","5914104AHQtPn","insertImage","contentLanguage","init","get","data-uc-image-id","cleanupImage","once","view","editor","5060400AdqCON","imageBlock","body","getAttribute","isOfficialPlugin","uploadcareImageId","schema","conversion","map","afterInit","isPremiumPlugin","input[uploadcare-file-input]","pluginName","4589877AqTXTQ","querySelector","1438429dqxhen","downcast","uploader-","PictureEditing","locale","ctxElement","24JUCbrN","637065vAGvJS","_initConversion","join","_configElement","#uc-icon-arrow-down","elementToAttribute","_initSchema","destroy","add","_initImageProcessingIndicator","UploadcareEditing","iconHrefResolver","remove","render","uc-config","model","1174942APYuyK","_initConfig","_initCtx","appendChild","replaceImageSource","_ctxElement"];return(fe=function(){return t})()}!function(t){const e=me,r=t();for(;;)try{if(773660===-parseInt(e(531))/1+parseInt(e(471))/2+-parseInt(e(529))/3+parseInt(e(516))/4+parseInt(e(538))/5+-parseInt(e(506))/6+parseInt(e(502))/7*(parseInt(e(537))/8))break;r.push(r.shift())}catch(t){r.push(r.shift())}}(fe);class be extends a.Plugin{[ge(458)]=null;[ge(476)]=null;static get[ge(528)](){return ge(465)}static get[ge(484)](){return[ge(534),he,c.Dialog]}static get[ge(520)](){return!0}static get[ge(526)](){return!0}[ge(482)];get[ge(489)](){return this[ge(458)]}get[ge(536)](){return this[ge(476)]}constructor(t){const e=ge;super(t),this[e(482)]=(0,O.uid)()}[ge(509)](){const t=ge,e=this[t(515)];e[t(494)][t(463)](t(477),new nt(e))}[ge(525)](){const t=ge;this[t(461)](),this[t(539)](),this[t(472)](),this[t(473)](),this[t(464)](),this[t(490)](this[t(515)],t(462),()=>{const e=t;this[e(458)]&&(this[e(458)][e(467)](),this[e(458)]=null),this[e(476)]&&(this[e(476)][e(467)](),this[e(476)]=null);const r=O.global[e(501)][e(530)](e(527));r&&r[e(467)]()}),async function(t){const e=g([104,103,80,54,56,112,113,99,55,79,66,74,120,57,117,51,122,114,72,97,116,89,85,88,102,48,52,84,100,86,107,77,70,109,119,67,115,53,83,68,65,118,106,50,49,105,87,81,71,101,90,75,76,121,82,108,69,78,110,111,73,98]),r=window[g([68,97,116,101])][g([110,111,119])](),o=t[g([101,100,105,116,111,114])],i=new(window[g([80,114,111,109,105,115,101])])(t=>{o[g([111,110,99,101])](g([114,101,97,100,121]),t)}),n={[g([107,116,121])]:g([69,67]),[g([117,115,101])]:g([115,105,103]),[g([99,114,118])]:g([80,45,50,53,54]),[g([120])]:g([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[g([121])]:g([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[g([97,108,103])]:g([69,83,50,53,54])},a=o[g([99,111,110,102,105,103])][g([103,101,116])](g([108,105,99,101,110,115,101,75,101,121]));function s(t){const e=[new(window[g([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),i[g([116,104,101,110])](()=>new(window[g([80,114,111,109,105,115,101])])(t=>{let e=0;o[g([109,111,100,101,108])][g([111,110])](g([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(r,o)=>{o[0][g([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,1512==e&&(t(),r[g([111,102,102])]())})}))];return window[g([80,114,111,109,105,115,101])][g([114,97,99,101])](e)[g([116,104,101,110])](()=>t)}function c(t){return t[g([115,116,97,114,116,115,87,105,116,104])](g([101,121]))?JSON[g([112,97,114,115,101])](l(t)):null}function l(t){return window[g([97,116,111,98])](t[g([114,101,112,108,97,99,101])](/-/g,g([43]))[g([114,101,112,108,97,99,101])](/_/g,g([47])))}function u(t){let e=5381;function r(t){for(let r=0;r<t[g([108,101,110,103,116,104])];r++){const o=t[g([99,104,97,114,67,111,100,101,65,116])](r);e=(e<<5)+e+o,e&=e}}return function t(e){Array[g([105,115,65,114,114,97,121])](e)?e[g([102,111,114,69,97,99,104])](t):e&&typeof e==g([111,98,106,101,99,116])?Object[g([101,110,116,114,105,101,115])](e)[g([115,111,114,116])]()[g([102,111,114,69,97,99,104])](([e,o])=>{r(e),t(o)}):r(window[g([83,116,114,105,110,103])](e))}(t),e>>>0}function d(t){return t[g([116,111,83,116,114,105,110,103])](16)[g([112,97,100,83,116,97,114,116])](8,g([48]))}function h(t){return t[g([115,112,108,105,116])]("")[g([114,101,118,101,114,115,101])]()[g([106,111,105,110])]("")}function p(){}function g(t){const e=me;return t[e(524)](t=>String[e(503)](t))[e(457)]("")}!function(t){const r=function(){const t=window[g([83,116,114,105,110,103])](window[g([112,101,114,102,111,114,109,97,110,99,101])][g([110,111,119])]())[g([114,101,112,108,97,99,101])](g([46]),"");let r=g([104]);for(let o=0;o<t[g([108,101,110,103,116,104])];o+=2){let i=window[g([112,97,114,115,101,73,110,116])](t[g([115,117,98,115,116,114,105,110,103])](o,o+2));i>=e[g([108,101,110,103,116,104])]&&(i-=e[g([108,101,110,103,116,104])]),r+=e[i]}return r}();o[r]=g([117,112,108,111,97,100,99,97,114,101,76,105,99,101,110,115,101,75,101,121])+t,t!=g([86,97,108,105,100])&&async function(){await i,o[g([109,111,100,101,108])][g([99,104,97,110,103,101])]=p,o[g([109,111,100,101,108])][g([101,110,113,117,101,117,101,67,104,97,110,103,101])]=p,o[g([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](g([109,111,100,101,108]))}()}(await async function(){let t,e=null,p=null;try{return a==g([71,80,76])?g([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[g([115,112,108,105,116])](g([46]));return 3!=t[g([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=c(t);return e&&r()?e:null;function r(){const t=e[g([106,116,105])],r=window[g([112,97,114,115,101,73,110,116])](t[g([115,117,98,115,116,114,105,110,103])](t[g([108,101,110,103,116,104])]-8),16),o={...e,[g([106,116,105])]:t[g([115,117,98,115,116,114,105,110,103])](0,t[g([108,101,110,103,116,104])]-8)};return delete o[g([118,99])],u(o)==r}}}(),t?(t[g([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(p=function(t,e){return new(window[g([80,114,111,109,105,115,101])])(s=>{if(n())return s(g([86,97,108,105,100]));a(),o[g([100,101,99,111,114,97,116,101])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let c=!1;const l=(0,O.uid)();function p(t){return!!t&&(typeof t===g([111,98,106,101,99,116])||typeof t===g([102,117,110,99,116,105,111,110]))&&typeof t[g([116,104,101,110])]===g([102,117,110,99,116,105,111,110])&&typeof t[g([99,97,116,99,104])]===g([102,117,110,99,116,105,111,110])}function m(o){c(o)[g([116,104,101,110])](t=>t&&t[g([115,116,97,116,117,115])]==g([111,107])?d(u(l+e))!=t[g([118,101,114,105,102,105,99,97,116,105,111,110])]?g([85,115,97,103,101,76,105,109,105,116]):g([86,97,108,105,100]):g([85,115,97,103,101,76,105,109,105,116]))[g([116,104,101,110])](t=>(n(),t),()=>{const t=a();return null==t?(n(),g([86,97,108,105,100])):g(r-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[g([116,104,101,110])](s)[g([99,97,116,99,104])](()=>{s(g([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function n(){const e=g([108,108,99,116,45])+d(u(t)),o=h(d(window[g([77,97,116,104])][g([99,101,105,108])](r/i)));window[g([108,111,99,97,108,83,116,111,114,97,103,101])][g([115,101,116,73,116,101,109])](e,o)}function a(){const e=g([108,108,99,116,45])+d(u(t)),r=window[g([108,111,99,97,108,83,116,111,114,97,103,101])][g([103,101,116,73,116,101,109])](e);return r?window[g([112,97,114,115,101,73,110,116])](h(r),16)*i:null}function c(t){return new(window[g([80,114,111,109,105,115,101])])((e,r)=>{t[g([116,104,101,110])](e,r),window[g([115,101,116,84,105,109,101,111,117,116])](r,12e4)})}}o[g([111,110])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(e,r)=>{if(r[0]!=t)return s(g([85,115,97,103,101,76,105,109,105,116]));r[1]={...r[1],[g([114,101,113,117,101,115,116,73,100])]:l}},{[g([112,114,105,111,114,105,116,121])]:g([104,105,103,104])}),o[g([111,110])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{p(t[g([114,101,116,117,114,110])])&&(c=!0,m(t[g([114,101,116,117,114,110])]))},{[g([112,114,105,111,114,105,116,121])]:g([108,111,119])}),i[g([116,104,101,110])](()=>{c||s(g([85,115,97,103,101,76,105,109,105,116]))})});function n(){return o[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==g([97,117,116,111])}function a(){o[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=g([97,117,116,111])}}(t[g([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[g([106,116,105])])),await async function(){let t=!0;try{const o=a[g([115,112,108,105,116])](g([46])),[i,n,s]=o;return e(i),await r(i,n,s),t}catch{return!1}function e(e){const r=c(e);r&&r[g([97,108,103])]==g([69,83,50,53,54])||(t=!1)}async function r(e,r,o){const i=window[g([85,105,110,116,56,65,114,114,97,121])][g([102,114,111,109])](l(o),t=>t[g([99,104,97,114,67,111,100,101,65,116])](0)),a=(new(window[g([84,101,120,116,69,110,99,111,100,101,114])]))[g([101,110,99,111,100,101])](e+g([46])+r),s=window[g([99,114,121,112,116,111])][g([115,117,98,116,108,101])];if(!s)return;const c=await s[g([105,109,112,111,114,116,75,101,121])](g([106,119,107]),n,{[g([110,97,109,101])]:g([69,67,68,83,65]),[g([110,97,109,101,100,67,117,114,118,101])]:g([80,45,50,53,54])},!1,[g([118,101,114,105,102,121])]);await s[g([118,101,114,105,102,121])]({[g([110,97,109,101])]:g([69,67,68,83,65]),[g([104,97,115,104])]:{[g([110,97,109,101])]:g([83,72,65,45,50,53,54])}},c,i,a)||(t=!1)}}()?function(){const e=t[g([102,101,97,116,117,114,101,115])];return!(!e||!e[g([105,110,99,108,117,100,101,115])](g([42]))&&!e[g([105,110,99,108,117,100,101,115])](g([85,80,76,67])))}()?function(){const e=[g([101,118,97,108,117,97,116,105,111,110]),g([116,114,105,97,108])][g([105,110,99,108,117,100,101,115])](t[g([108,105,99,101,110,115,101,84,121,112,101])])?r/1e3:1766707200;return t[g([101,120,112])]<e}()?g([69,120,112,105,114,101,100]):function(){const e=me,r=t[g([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!r||0==r[g([108,101,110,103,116,104])])return!0;const{hostname:o}=new URL(window[g([108,111,99,97,116,105,111,110])][e(500)]);if(r[g([105,110,99,108,117,100,101,115])](o))return!0;const i=o[g([115,112,108,105,116])](g([46]));return r[g([102,105,108,116,101,114])](t=>t[g([105,110,99,108,117,100,101,115])](g([42])))[g([109,97,112])](t=>t[g([115,112,108,105,116])](g([46])))[g([102,105,108,116,101,114])](t=>t[g([108,101,110,103,116,104])]<=i[g([108,101,110,103,116,104])])[g([109,97,112])](t=>Array(i[g([108,101,110,103,116,104])]-t[g([108,101,110,103,116,104])])[g([102,105,108,108])](t[0]===g([42])?g([42]):"")[g([99,111,110,99,97,116])](t))[g([115,111,109,101])](t=>i[g([101,118,101,114,121])]((e,r)=>t[r]===e||t[r]===g([42])))}()?(t[g([108,105,99,101,110,115,101,84,121,112,101])]==g([101,118,97,108,117,97,116,105,111,110])&&(e=s(g([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),t[g([108,105,99,101,110,115,101,84,121,112,101])]==g([116,114,105,97,108])&&(e=s(g([84,114,105,97,108,76,105,109,105,116]))),await(e&&p?new(window[g([80,114,111,109,105,115,101])])((t,r)=>{e[g([116,104,101,110])](t,r),p[g([116,104,101,110])](e=>{e!=g([86,97,108,105,100])&&t(e)},r)}):e||p||g([86,97,108,105,100]))):g([68,111,109,97,105,110,76,105,109,105,116]):g([78,111,116,65,108,108,111,119,101,100]):g([73,110,118,97,108,105,100])):g([73,110,118,97,108,105,100]))}catch{return g([73,110,118,97,108,105,100])}}())}(this)}[ge(461)](){const t=ge,e=this[t(515)][t(470)][t(522)];e[t(485)](t(517))&&e[t(491)](t(517),{allowAttributes:[t(521)]}),e[t(485)](t(486))&&e[t(491)](t(486),{allowAttributes:[t(521)]})}[ge(539)](){const t=ge,e=this[t(515)];e[t(523)][t(483)](t(532))[t(496)]({model:t(521),view:t(511)}),e[t(523)][t(483)](t(478))[t(460)]({model:{key:t(521),value:e=>e[t(519)](t(511))},view:{attributes:{"data-uc-image-id":/[a-zA-Z0-9\\-]+/}}});const r=e[t(494)][t(510)](t(475));r&&this[t(490)](r,t(512),(e,[r,o])=>{const i=t;r[i(487)](i(521),o)})}[ge(472)](){const t=ge,e=this[t(515)][t(498)][t(510)](t(504))||{},r=this[t(515)][t(498)][t(510)](t(497))||"";this[t(458)]=(0,O.createElement)(O.global[t(501)],t(469),{...e,pubkey:r,"ctx-name":t(533)+this[t(482)],sourceList:"",imgOnly:t(505),removeCopyright:t(505),localeName:this[t(515)][t(535)][t(508)],externalSourcesEmbedCss:t(495)}),this[t(458)][t(466)]=e=>{const r=t;if(r(492)==e)return r(459)},O.global[t(501)][t(518)][t(474)](this[t(458)])}[ge(473)](){const t=ge;this[t(476)]=(0,O.createElement)(O.global[t(501)],t(493),{"ctx-name":t(533)+this[t(482)]}),O.global[t(501)][t(518)][t(474)](this[t(476)])}[ge(464)](){const t=ge,e=this[t(515)][t(494)][t(510)](t(507));e&&this[t(490)](e,t(480),()=>{const e=t,r=this[e(515)][e(470)][e(501)][e(499)][e(488)]();r&&r[e(519)](e(521))&&this[e(515)][e(479)][e(514)][e(513)](e(468),()=>{K(this[e(515)],r)})});const r=this[t(515)][t(494)][t(510)](t(481));r&&this[t(490)](r,t(480),()=>{const e=t,r=this[e(515)][e(470)][e(501)][e(499)][e(488)]();r&&r[e(519)](e(521))&&this[e(515)][e(479)][e(514)][e(513)](e(468),()=>{K(this[e(515)],r)})})}}var ve=Object.defineProperty,ye=(t,e,r)=>(((t,e,r)=>{e in t?ve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r})(t,"symbol"!=typeof e?e+"":e,r),r);var we=class{constructor(t){t.constructor===Object?this.store=function(t){let e=t=>{var r;for(let o in t)(null==(r=t[o])?void 0:r.constructor)===Object&&(t[o]=e(t[o]));return{...t}};return e(t)}(t):(this._storeIsProxy=!0,this.store=t),this.callbackMap=Object.create(null)}static warn(t,e){console.warn(`Symbiote Data: cannot ${t}. Prop name: `+e)}read(t){return this._storeIsProxy||this.store.hasOwnProperty(t)?this.store[t]:(we.warn("read",t),null)}has(t){return this._storeIsProxy?void 0!==this.store[t]:this.store.hasOwnProperty(t)}add(t,e,r=!1){!r&&Object.keys(this.store).includes(t)||(this.store[t]=e,this.notify(t))}pub(t,e){this._storeIsProxy||this.store.hasOwnProperty(t)?(this.store[t]=e,this.notify(t)):we.warn("publish",t)}multiPub(t){for(let e in t)this.pub(e,t[e])}notify(t){this.callbackMap[t]&&this.callbackMap[t].forEach(e=>{e(this.store[t])})}sub(t,e,r=!0){return this._storeIsProxy||this.store.hasOwnProperty(t)?(this.callbackMap[t]||(this.callbackMap[t]=new Set),this.callbackMap[t].add(e),r&&e(this.store[t]),{remove:()=>{this.callbackMap[t].delete(e),this.callbackMap[t].size||delete this.callbackMap[t]},callback:e}):(we.warn("subscribe",t),null)}static registerCtx(t,e=Symbol()){let r=we.globalStore.get(e);return r?console.warn('State: context UID "'+e+'" already in use'):(r=new we(t),we.globalStore.set(e,r)),r}static deleteCtx(t){we.globalStore.delete(t)}static getCtx(t,e=!0){return we.globalStore.get(t)||(e&&console.warn('State: wrong context UID - "'+t+'"'),null)}};we.globalStore=new Map;var _e=Object.freeze({BIND_ATTR:"set",ATTR_BIND_PRFX:"@",EXT_DATA_CTX_PRFX:"*",NAMED_DATA_CTX_SPLTR:"/",CTX_NAME_ATTR:"ctx-name",CTX_OWNER_ATTR:"ctx-owner",CSS_CTX_PROP:"--ctx-name",EL_REF_ATTR:"ref",AUTO_TAG_PRFX:"sym",REPEAT_ATTR:"repeat",REPEAT_ITEM_TAG_ATTR:"repeat-item-tag",SET_LATER_KEY:"__toSetLater__",USE_TPL:"use-template",ROOT_STYLE_ATTR_NAME:"sym-component"}),ke="1234567890QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm",xe=class{static generate(t="XXXXXXXXX-XXX"){let e="";for(let r=0;r<t.length;r++)e+="-"===t[r]?t[r]:ke.charAt(61*Math.random());return e}};function Ce(t,e,r){let o,i=!0,n=e.split(".");return n.forEach((e,r)=>{r<n.length-1?t=t[e]:o=e}),t?t[o]=r:i=!1,i}var Ee="__default__";var Te="{{",Ae="}}";var Ie=[function(t,e){[...t.querySelectorAll(`[${_e.REPEAT_ATTR}]`)].forEach(t=>{let r,o=t.getAttribute(_e.REPEAT_ITEM_TAG_ATTR);if(o&&(r=window.customElements.get(o)),!r){r=class extends e.BaseComponent{constructor(){super(),o||(this.style.display="contents")}};let i=t.innerHTML;r.template=i,r.reg(o)}for(;t.firstChild;)t.firstChild.remove();let i=t.getAttribute(_e.REPEAT_ATTR);e.sub(i,e=>{if(!e){for(;t.firstChild;)t.firstChild.remove();return}let o,i=[...t.children],n=e=>{e.forEach((t,e)=>{if(i[e])if(i[e].set$)setTimeout(()=>{i[e].set$(t)});else for(let r in t)i[e][r]=t[r];else{o||(o=new DocumentFragment);let e=new r;Object.assign(e.init$,t),o.appendChild(e)}}),o&&t.appendChild(o);let n=i.slice(e.length,i.length);for(let t of n)t.remove()};if(e.constructor===Array)n(e);else if(e.constructor===Object){let t=[];for(let r in e){let o=e[r];Object.defineProperty(o,"_KEY_",{value:r,enumerable:!0}),t.push(o)}n(t)}else console.warn("Symbiote repeat data type error:"),console.log(e)}),t.removeAttribute(_e.REPEAT_ATTR),t.removeAttribute(_e.REPEAT_ITEM_TAG_ATTR)})},function(t,e){if(e.shadowRoot)return;let r=[...t.querySelectorAll("slot")];if(!r.length)return;let o={};r.forEach(t=>{let e=t.getAttribute("name")||Ee;o[e]={slot:t,fr:document.createDocumentFragment()}}),e.initChildren.forEach(t=>{var e;let r=Ee;t instanceof Element&&t.hasAttribute("slot")&&(r=t.getAttribute("slot"),t.removeAttribute("slot")),null==(e=o[r])||e.fr.appendChild(t)}),Object.values(o).forEach(t=>{if(t.fr.childNodes.length)t.slot.parentNode.replaceChild(t.fr,t.slot);else if(t.slot.childNodes.length){let e=document.createDocumentFragment();e.append(...t.slot.childNodes),t.slot.parentNode.replaceChild(e,t.slot)}else t.slot.remove()})},function(t,e){[...t.querySelectorAll(`[${_e.EL_REF_ATTR}]`)].forEach(t=>{let r=t.getAttribute(_e.EL_REF_ATTR);e.ref[r]=t,t.removeAttribute(_e.EL_REF_ATTR)})},function(t,e){[...t.querySelectorAll(`[${_e.BIND_ATTR}]`)].forEach(t=>{let r=t.getAttribute(_e.BIND_ATTR).split(";");[...t.attributes].forEach(e=>{if(e.name.startsWith("-")&&e.value){let o=e.name.replace("-","").split("-").map((t,e)=>t&&e?t[0].toUpperCase()+t.slice(1):t).join("").split("_").map((t,e)=>t&&e?t.toUpperCase():t).join("");r.push(o+":"+e.value),t.removeAttribute(e.name)}}),r.forEach(r=>{if(!r)return;let o,i=r.split(":").map(t=>t.trim()),n=i[0];0===n.indexOf(_e.ATTR_BIND_PRFX)&&(o=!0,n=n.replace(_e.ATTR_BIND_PRFX,""));let a=i[1].split(",").map(t=>t.trim());for(let r of a){let i;r.startsWith("!!")?(i="double",r=r.replace("!!","")):r.startsWith("!")&&(i="single",r=r.replace("!","")),e.sub(r,e=>{"double"===i?e=!!e:"single"===i&&(e=!e),o?(null==e?void 0:e.constructor)===Boolean?e?t.setAttribute(n,""):t.removeAttribute(n):t.setAttribute(n,e):Ce(t,n,e)||(t[_e.SET_LATER_KEY]||(t[_e.SET_LATER_KEY]=Object.create(null)),t[_e.SET_LATER_KEY][n]=e)})}}),t.removeAttribute(_e.BIND_ATTR)})},function(t,e){(function(t){let e,r=[],o=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode:t=>{var e;return!(null==(e=t.parentElement)?void 0:e.hasAttribute("skip-text"))&&t.textContent.includes(Te)&&t.textContent.includes(Ae)&&1}});for(;e=o.nextNode();)r.push(e);return r})(t).forEach(t=>{let r,o=[];for(;t.textContent.includes(Ae);)t.textContent.startsWith(Te)?(r=t.textContent.indexOf(Ae)+2,t.splitText(r),o.push(t)):(r=t.textContent.indexOf(Te),t.splitText(r)),t=t.nextSibling;o.forEach(t=>{let r=t.textContent.replace(Te,"").replace(Ae,"");t.textContent="",e.sub(r,e=>{t.textContent=e})})})}],Se="'",Me='"',$e=/\\([0-9a-fA-F]{1,6} ?)/g;function Oe(t){let e=t;var r;(r=t)[0]!==Me&&r[0]!==Se||r[r.length-1]!==Me&&r[r.length-1]!==Se||(e=function(t){return t[0]!==Me&&t[0]!==Se||(t=t.slice(1)),t[t.length-1]!==Me&&t[t.length-1]!==Se||(t=t.slice(0,-1)),t}(e),e=e.replace($e,(t,e)=>String.fromCodePoint(parseInt(e.trim(),16))),e=e.replaceAll("\\\n","\\n"),e=function(t){let e="",r="";for(var o=0;o<t.length;o++){const i=t[o+1];"\\"===t[o]&&'"'===i?(e+='\\"',o++):'"'===t[o]&&"\\"!==r?e+='\\"':e+=t[o],r=t[o]}return e}(e),e=Me+e+Me);try{return JSON.parse(e)}catch(r){throw new Error(`Failed to parse CSS property value: ${e}. Original input: ${t}`)}}var Le=0,Re=null,Ue=null,Pe=class extends HTMLElement{constructor(){super(),ye(this,"updateCssData",()=>{var t;this.dropCssDataCache(),null==(t=this.__boundCssProps)||t.forEach(t=>{let e=this.getCssData(this.__extractCssName(t),!0);null!==e&&this.$[t]!==e&&(this.$[t]=e)})}),this.init$=Object.create(null),this.cssInit$=Object.create(null),this.tplProcessors=new Set,this.ref=Object.create(null),this.allSubs=new Set,this.pauseRender=!1,this.renderShadow=!1,this.readyToDestroy=!0,this.processInnerHtml=!1,this.allowCustomTemplate=!1,this.ctxOwner=!1}get BaseComponent(){return Pe}initCallback(){}__initCallback(){var t;this.__initialized||(this.__initialized=!0,null==(t=this.initCallback)||t.call(this))}render(t,e=this.renderShadow){let r;if(!e&&!this.constructor.__shadowStylesUrl||this.shadowRoot||this.attachShadow({mode:"open"}),this.allowCustomTemplate){let e=this.getAttribute(_e.USE_TPL);if(e){let r=this.getRootNode(),o=(null==r?void 0:r.querySelector(e))||document.querySelector(e);o?t=o.content.cloneNode(!0):console.warn(`Symbiote template "${e}" is not found...`)}}if(this.processInnerHtml)for(let t of this.tplProcessors)t(this,this);if(t||this.constructor.template){if(this.constructor.template&&!this.constructor.__tpl&&(this.constructor.__tpl=document.createElement("template"),this.constructor.__tpl.innerHTML=this.constructor.template),(null==t?void 0:t.constructor)===DocumentFragment)r=t;else if((null==t?void 0:t.constructor)===String){let e=document.createElement("template");e.innerHTML=t,r=e.content.cloneNode(!0)}else this.constructor.__tpl&&(r=this.constructor.__tpl.content.cloneNode(!0));for(let t of this.tplProcessors)t(r,this)}let o=()=>{r&&(e&&this.shadowRoot.appendChild(r)||this.appendChild(r)),this.__initCallback()};if(this.constructor.__shadowStylesUrl){e=!0;let t=document.createElement("link");t.rel="stylesheet",t.href=this.constructor.__shadowStylesUrl,t.onload=o,this.shadowRoot.prepend(t)}else o()}addTemplateProcessor(t){this.tplProcessors.add(t)}get autoCtxName(){return this.__autoCtxName||(this.__autoCtxName=xe.generate(),this.style.setProperty(_e.CSS_CTX_PROP,`'${this.__autoCtxName}'`)),this.__autoCtxName}get cssCtxName(){return this.getCssData(_e.CSS_CTX_PROP,!0)}get ctxName(){var t;let e=(null==(t=this.getAttribute(_e.CTX_NAME_ATTR))?void 0:t.trim())||this.cssCtxName||this.__cachedCtxName||this.autoCtxName;return this.__cachedCtxName=e,e}get localCtx(){return this.__localCtx||(this.__localCtx=we.registerCtx({},this)),this.__localCtx}get nodeCtx(){return we.getCtx(this.ctxName,!1)||we.registerCtx({},this.ctxName)}static __parseProp(t,e){let r,o;if(t.startsWith(_e.EXT_DATA_CTX_PRFX))r=e.nodeCtx,o=t.replace(_e.EXT_DATA_CTX_PRFX,"");else if(t.includes(_e.NAMED_DATA_CTX_SPLTR)){let e=t.split(_e.NAMED_DATA_CTX_SPLTR);r=we.getCtx(e[0]),o=e[1]}else r=e.localCtx,o=t;return{ctx:r,name:o}}sub(t,e,r=!0){let o=t=>{this.isConnected&&e(t)},i=Pe.__parseProp(t,this);i.ctx.has(i.name)?this.allSubs.add(i.ctx.sub(i.name,o,r)):window.setTimeout(()=>{this.allSubs.add(i.ctx.sub(i.name,o,r))})}notify(t){let e=Pe.__parseProp(t,this);e.ctx.notify(e.name)}has(t){let e=Pe.__parseProp(t,this);return e.ctx.has(e.name)}add(t,e,r=!1){let o=Pe.__parseProp(t,this);o.ctx.add(o.name,e,r)}add$(t,e=!1){for(let r in t)this.add(r,t[r],e)}get $(){if(!this.__stateProxy){let t=Object.create(null);this.__stateProxy=new Proxy(t,{set:(t,e,r)=>{let o=Pe.__parseProp(e,this);return o.ctx.pub(o.name,r),!0},get:(t,e)=>{let r=Pe.__parseProp(e,this);return r.ctx.read(r.name)}})}return this.__stateProxy}set$(t,e=!1){for(let r in t){let o=t[r],i=[String,Number,Boolean];(e||!i.includes(null==o?void 0:o.constructor)||this.$[r]!==o)&&(this.$[r]=o)}}get __ctxOwner(){return this.ctxOwner||this.hasAttribute(_e.CTX_OWNER_ATTR)&&"false"!==this.getAttribute(_e.CTX_OWNER_ATTR)}__initDataCtx(){let t=this.constructor.__attrDesc;if(t)for(let e of Object.values(t))Object.keys(this.init$).includes(e)||(this.init$[e]="");for(let t in this.init$)if(t.startsWith(_e.EXT_DATA_CTX_PRFX))this.nodeCtx.add(t.replace(_e.EXT_DATA_CTX_PRFX,""),this.init$[t],this.__ctxOwner);else if(t.includes(_e.NAMED_DATA_CTX_SPLTR)){let e=t.split(_e.NAMED_DATA_CTX_SPLTR),r=e[0].trim(),o=e[1].trim();if(r&&o){let e=we.getCtx(r,!1);e||(e=we.registerCtx({},r)),e.add(o,this.init$[t])}}else this.localCtx.add(t,this.init$[t]);for(let t in this.cssInit$)this.bindCssData(t,this.cssInit$[t]);this.__dataCtxInitialized=!0}connectedCallback(){var t;if(this.isConnected){if(this.__disconnectTimeout&&window.clearTimeout(this.__disconnectTimeout),!this.connectedOnce){let e=null==(t=this.getAttribute(_e.CTX_NAME_ATTR))?void 0:t.trim();if(e&&this.style.setProperty(_e.CSS_CTX_PROP,`'${e}'`),this.__initDataCtx(),this[_e.SET_LATER_KEY]){for(let t in this[_e.SET_LATER_KEY])Ce(this,t,this[_e.SET_LATER_KEY][t]);delete this[_e.SET_LATER_KEY]}this.initChildren=[...this.childNodes];for(let t of Ie)this.addTemplateProcessor(t);if(this.pauseRender)this.__initCallback();else if(this.constructor.__rootStylesLink){let t=this.getRootNode();if(!t)return;if(null==t?void 0:t.querySelector(`link[${_e.ROOT_STYLE_ATTR_NAME}="${this.constructor.is}"]`))return void this.render();let e=this.constructor.__rootStylesLink.cloneNode(!0);e.setAttribute(_e.ROOT_STYLE_ATTR_NAME,this.constructor.is),e.onload=()=>{this.render()},t.nodeType===Node.DOCUMENT_NODE?t.head.appendChild(e):t.prepend(e)}else this.render()}this.connectedOnce=!0}}destroyCallback(){}disconnectedCallback(){this.connectedOnce&&(this.dropCssDataCache(),this.readyToDestroy&&(this.__disconnectTimeout&&window.clearTimeout(this.__disconnectTimeout),this.__disconnectTimeout=window.setTimeout(()=>{this.destroyCallback();for(let t of this.allSubs)t.remove(),this.allSubs.delete(t);for(let t of this.tplProcessors)this.tplProcessors.delete(t);null==Ue||Ue.delete(this.updateCssData),(null==Ue?void 0:Ue.size)||(null==Re||Re.disconnect(),Re=null,Ue=null)},100)))}static reg(t,e=!1){t||(Le++,t=`${_e.AUTO_TAG_PRFX}-${Le}`),this.__tag=t;let r=window.customElements.get(t);r?e||r===this||console.warn([`Element with tag name "${t}" already registered.`,`You're trying to override it with another class "${this.name}".`,"This is most likely a mistake.","New element will not be registered."].join("\n")):window.customElements.define(t,e?class extends(this){}:this)}static get is(){return this.__tag||this.reg(),this.__tag}static bindAttributes(t){this.observedAttributes=Object.keys(t),this.__attrDesc=t}attributeChangedCallback(t,e,r){var o;if(e===r)return;let i=null==(o=this.constructor.__attrDesc)?void 0:o[t];i?this.__dataCtxInitialized?this.$[i]=r:this.init$[i]=r:this[t]=r}getCssData(t,e=!1){if(this.__cssDataCache||(this.__cssDataCache=Object.create(null)),!Object.keys(this.__cssDataCache).includes(t)){this.__computedStyle||(this.__computedStyle=window.getComputedStyle(this));let r=this.__computedStyle.getPropertyValue(t).trim();try{this.__cssDataCache[t]=Oe(r)}catch(r){!e&&console.warn(`CSS Data error: ${t}`),this.__cssDataCache[t]=null}}return this.__cssDataCache[t]}__extractCssName(t){return t.split("--").map((t,e)=>0===e?"":t).join("--")}__initStyleAttrObserver(){Ue||(Ue=new Set),Ue.add(this.updateCssData),Re||(Re=new MutationObserver(t=>{"attributes"===t[0].type&&Ue.forEach(t=>{t()})})).observe(document,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]})}bindCssData(t,e=""){this.__boundCssProps||(this.__boundCssProps=new Set),this.__boundCssProps.add(t);let r=this.getCssData(this.__extractCssName(t),!0);null===r&&(r=e),this.add(t,r),this.__initStyleAttrObserver()}dropCssDataCache(){this.__cssDataCache=null,this.__computedStyle=null}defineAccessor(t,e,r){let o="__"+t;this[o]=this[t],Object.defineProperty(this,t,{set:t=>{this[o]=t,r?window.setTimeout(()=>{null==e||e(t)}):null==e||e(t)},get:()=>this[o]}),this[t]=this[o]}static set shadowStyles(t){let e=new Blob([t],{type:"text/css"});this.__shadowStylesUrl=URL.createObjectURL(e)}static set rootStyles(t){if(!this.__rootStylesLink){let e=new Blob([t],{type:"text/css"}),r=URL.createObjectURL(e),o=document.createElement("link");o.href=r,o.rel="stylesheet",this.__rootStylesLink=o}}},Ne=Pe;ye(Ne,"template");var De=class{static _print(t){console.warn(t)}static setDefaultTitle(t){this.defaultTitle=t}static setRoutingMap(t){Object.assign(this.appMap,t);for(let t in this.appMap)this.defaultRoute||!0!==this.appMap[t].default?this.errorRoute||!0!==this.appMap[t].error||(this.errorRoute=t):this.defaultRoute=t}static set routingEventName(t){this.__routingEventName=t}static get routingEventName(){return this.__routingEventName||"sym-on-route"}static readAddressBar(){let t={route:null,options:{}};return window.location.search.split(this.separator).forEach(e=>{if(e.includes("?"))t.route=e.replace("?","");else if(e.includes("=")){let r=e.split("=");t.options[r[0]]=decodeURI(r[1])}else t.options[e]=!0}),t}static notify(){let t=this.readAddressBar(),e=this.appMap[t.route];if(e&&e.title&&(document.title=e.title),null===t.route&&this.defaultRoute)return void this.applyRoute(this.defaultRoute);if(!e&&this.errorRoute)return void this.applyRoute(this.errorRoute);if(!e&&this.defaultRoute)return void this.applyRoute(this.defaultRoute);if(!e)return void this._print(`Route "${t.route}" not found...`);let r=new CustomEvent(De.routingEventName,{detail:{route:t.route,options:Object.assign(e||{},t.options)}});window.dispatchEvent(r)}static reflect(t,e={}){let r=this.appMap[t];if(!r)return void this._print("Wrong route: "+t);let o="?"+t;for(let t in e)!0===e[t]?o+=this.separator+t:o+=this.separator+t+`=${e[t]}`;let i=r.title||this.defaultTitle||"";window.history.pushState(null,i,o),document.title=i}static applyRoute(t,e={}){this.reflect(t,e),this.notify()}static setSeparator(t){this._separator=t}static get separator(){return this._separator||"&"}static createRouterData(t,e){this.setRoutingMap(e);let r=we.registerCtx({route:null,options:null,title:null},t);return window.addEventListener(this.routingEventName,t=>{var e;r.multiPub({route:t.detail.route,options:t.detail.options,title:(null==(e=t.detail.options)?void 0:e.title)||this.defaultTitle||""})}),De.notify(),this.initPopstateListener(),r}static initPopstateListener(){this.__onPopstate||(this.__onPopstate=()=>{this.notify()},window.addEventListener("popstate",this.__onPopstate))}static removePopstateListener(){window.removeEventListener("popstate",this.__onPopstate),this.__onPopstate=null}};function ze(t,e){for(let r in e)r.includes("-")?t.style.setProperty(r,e[r]):t.style[r]=e[r]}function Fe(t={tag:"div"}){let e=document.createElement(t.tag);if(t.attributes&&function(t,e){for(let r in e)e[r].constructor===Boolean?e[r]?t.setAttribute(r,""):t.removeAttribute(r):t.setAttribute(r,e[r])}(e,t.attributes),t.styles&&ze(e,t.styles),t.properties)for(let r in t.properties)e[r]=t.properties[r];return t.processors&&t.processors.forEach(t=>{t(e)}),t.children&&t.children.forEach(t=>{let r=Fe(t);e.appendChild(r)}),e}De.appMap=Object.create(null);var Ve="idb-store-ready",Be=class{_notifyWhenReady(t=null){window.dispatchEvent(new CustomEvent(Ve,{detail:{dbName:this.name,storeName:this.storeName,event:t}}))}get _updEventName(){return"symbiote-idb-update_"+this.name}_getUpdateEvent(t){return new CustomEvent(this._updEventName,{detail:{key:this.name,newValue:t}})}_notifySubscribers(t){window.localStorage.removeItem(this.name),window.localStorage.setItem(this.name,t),window.dispatchEvent(this._getUpdateEvent(t))}constructor(t,e){this.name=t,this.storeName=e,this.version=1,this.request=window.indexedDB.open(this.name,this.version),this.request.onupgradeneeded=t=>{this.db=t.target.result,this.objStore=this.db.createObjectStore(e,{keyPath:"_key"}),this.objStore.transaction.oncomplete=t=>{this._notifyWhenReady(t)}},this.request.onsuccess=t=>{this.db=t.target.result,this._notifyWhenReady(t)},this.request.onerror=t=>{console.error(t)},this._subscriptionsMap={},this._updateHandler=t=>{if(t.key===this.name&&this._subscriptionsMap[t.newValue]){this._subscriptionsMap[t.newValue].forEach(async e=>{e(await this.read(t.newValue))})}},this._localUpdateHandler=t=>{this._updateHandler(t.detail)},window.addEventListener("storage",this._updateHandler),window.addEventListener(this._updEventName,this._localUpdateHandler)}read(t){let e=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).get(t);return new Promise((r,o)=>{e.onsuccess=e=>{var o;(null==(o=e.target.result)?void 0:o._value)?r(e.target.result._value):(r(null),console.warn(`IDB: cannot read "${t}"`))},e.onerror=t=>{o(t)}})}write(t,e,r=!1){let o={_key:t,_value:e},i=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).put(o);return new Promise((e,o)=>{i.onsuccess=o=>{r||this._notifySubscribers(t),e(o.target.result)},i.onerror=t=>{o(t)}})}delete(t,e=!1){let r=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).delete(t);return new Promise((o,i)=>{r.onsuccess=r=>{e||this._notifySubscribers(t),o(r)},r.onerror=t=>{i(t)}})}getAll(){let t=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).getAll();return new Promise((e,r)=>{t.onsuccess=t=>{let r=t.target.result;e(r.map(t=>t._value))},t.onerror=t=>{r(t)}})}subscribe(t,e){this._subscriptionsMap[t]||(this._subscriptionsMap[t]=new Set);let r=this._subscriptionsMap[t];return r.add(e),{remove:()=>{r.delete(e),r.size||delete this._subscriptionsMap[t]}}}stop(){window.removeEventListener("storage",this._updateHandler),this._subscriptionsMap=null,je.clear(this.name)}},je=class{static get readyEventName(){return Ve}static open(t="symbiote-db",e="store"){let r=t+"/"+e;return this._reg[r]||(this._reg[r]=new Be(t,e)),this._reg[r]}static clear(t){window.indexedDB.deleteDatabase(t);for(let e in this._reg)e.split("/")[0]===t&&delete this._reg[e]}};function He(t){return"[object Object]"===Object.prototype.toString.call(t)}ye(je,"_reg",Object.create(null));const qe=/\W|_/g;function Ke(t){return t.split(qe).map((t,e)=>t.charAt(0)[e>0?"toUpperCase":"toLowerCase"]()+t.slice(1)).join("")}function Ge(t,{ignoreKeys:e}={ignoreKeys:[]}){return Array.isArray(t)?t.map(t=>We(t,{ignoreKeys:e})):t}function We(t,{ignoreKeys:e}={ignoreKeys:[]}){if(Array.isArray(t))return Ge(t,{ignoreKeys:e});if(!He(t))return t;const r={};for(const o of Object.keys(t)){let i=t[o];e.includes(o)?r[o]=i:(He(i)?i=We(i,{ignoreKeys:e}):Array.isArray(i)&&(i=Ge(i,{ignoreKeys:e})),r[Ke(o)]=i)}return r}function Xe({libraryName:t,libraryVersion:e,userAgent:r,publicKey:o="",integration:i=""}){const n="JavaScript";if("string"==typeof r)return r;if("function"==typeof r)return r({publicKey:o,libraryName:t,libraryVersion:e,languageName:n,integration:i});return`${[t,e,o].filter(Boolean).join("/")} (${[n,i].filter(Boolean).join("; ")})`}const Ze={factor:2,time:100};function Ye(t,e=Ze){let r=0;return function t(o){const i=Math.round(e.time*e.factor**r);return o({attempt:r,retry:e=>(t=>new Promise(e=>setTimeout(e,t)))(e??i).then(()=>(r+=1,t(o)))})}(t)}class Je extends Error{}class Qe extends Je{originalProgressEvent;constructor(t){super(),this.name="NetworkError",this.message="Network error",Object.setPrototypeOf(this,Qe.prototype),this.originalProgressEvent=t}}const tr=(t,e)=>{t&&(t.aborted?Promise.resolve().then(e):t.addEventListener("abort",()=>e(),{once:!0}))};class er extends Je{isCancel=!0;constructor(t="Request canceled"){super(t),this.name="CancelError",Object.setPrototypeOf(this,er.prototype)}}const rr=({check:t,interval:e=500,timeout:r,signal:o})=>new Promise((i,n)=>{let a,s;tr(o,()=>{a&&clearTimeout(a),n(new er("Poll cancelled"))}),r&&(s=setTimeout(()=>{a&&clearTimeout(a),n(new er("Timed out"))},r));const c=()=>{try{Promise.resolve(t(o)).then(t=>{t?(s&&clearTimeout(s),i(t)):a=setTimeout(c,e)}).catch(t=>{s&&clearTimeout(s),n(t)})}catch(t){s&&clearTimeout(s),n(t)}};a=setTimeout(c,0)}),or={baseCDN:"https://ucarecdn.com",baseURL:"https://upload.uploadcare.com",maxContentLength:52428800,retryThrottledRequestMaxTimes:1,retryNetworkErrorMaxTimes:3,multipartMinFileSize:26214400,multipartChunkSize:5242880,multipartMinLastPartSize:1048576,maxConcurrentRequests:4,pollingTimeoutMilliseconds:1e4,pusherKey:"79ae88bd931ea68464d9"},ir="application/octet-stream",nr="original",ar=({method:t,url:e,data:r,headers:o={},signal:i,onProgress:n})=>new Promise((a,s)=>{const c=new XMLHttpRequest,l=t?.toUpperCase()||"GET";let u=!1;c.open(l,e,!0),o&&Object.entries(o).forEach(t=>{const[e,r]=t;void 0!==r&&!Array.isArray(r)&&c.setRequestHeader(e,r)}),c.responseType="text",tr(i,()=>{u=!0,c.abort(),s(new er)}),c.onload=()=>{if(200!=c.status)s(new Error(`Error ${c.status}: ${c.statusText}`));else{const t={method:l,url:e,data:r,headers:o||void 0,signal:i,onProgress:n},s=c.getAllResponseHeaders().trim().split(/[\r\n]+/),u={};s.forEach(function(t){const e=t.split(": "),r=e.shift(),o=e.join(": ");r&&void 0!==r&&(u[r]=o)});const d=c.response,h=c.status;a({request:t,data:d,headers:u,status:h})}},c.onerror=t=>{u||s(new Qe(t))},n&&"function"==typeof n&&(c.upload.onprogress=t=>{t.lengthComputable?n({isComputable:!0,value:t.loaded/t.total}):n({isComputable:!1})}),r?c.send(r):c.send()});const sr=function(t,...e){return t};const cr=t=>"undefined"!=typeof Blob&&t instanceof Blob,lr=t=>"undefined"!=typeof File&&t instanceof File,ur=t=>!!t&&"object"==typeof t&&!Array.isArray(t)&&"uri"in t&&"string"==typeof t.uri,dr=t=>cr(t)||lr(t)||ur(t);function hr(t,e,r){if(Array.isArray(r))for(const o of r)hr(t,`${e}[]`,o);else if((o=r)&&"object"==typeof o&&"data"in o&&dr(o.data)){const{name:o,contentType:i}=r,n=sr(r.data,o,i??ir),a=(({name:t})=>t?[t]:[])({name:o,contentType:i});t.push([e,n,...a])}else if((t=>!!t&&"object"==typeof t&&!Array.isArray(t))(r))for(const[o,i]of Object.entries(r))void 0!==i&&t.push([`${e}[${o}]`,String(i)]);else(t=>"string"==typeof t||"number"==typeof t||void 0===t)(r)&&r&&t.push([e,r.toString()]);var o}function pr(t){const e=new FormData,r=function(t){const e=[];for(const[r,o]of Object.entries(t))hr(e,r,o);return e}(t);for(const t of r){const[r,o,...i]=t;e.append(r,o,...i)}return e}class gr extends Je{code;request;response;headers;constructor(t,e,r,o,i){super(),this.name="UploadError",this.message=t,this.code=e,this.request=r,this.response=o,this.headers=i,Object.setPrototypeOf(this,gr.prototype)}}const mr=(t,e,r)=>{const o=new URL(t);return o.pathname=(o.pathname+e).replace("//","/"),r&&(o.search=(t=>{const e=new URLSearchParams;for(const[r,o]of Object.entries(t))o&&"object"==typeof o&&!Array.isArray(o)?Object.entries(o).filter(t=>t[1]??!1).forEach(t=>e.set(`${r}[${t[0]}]`,String(t[1]))):Array.isArray(o)?o.forEach(t=>{e.append(`${r}[]`,t)}):"string"==typeof o&&o?e.set(r,o):"number"==typeof o&&e.set(r,o.toString());return e.toString()})(r)),o.toString()};function fr(t){return Xe({libraryName:"UploadcareUploadClient",libraryVersion:"6.18.2",...t})}function br(t,e){const{retryThrottledRequestMaxTimes:r,retryNetworkErrorMaxTimes:o}=e;return Ye(({attempt:e,retry:i})=>t().catch(t=>{if("response"in t&&"RequestThrottledError"===t?.code&&e<r)return i(function(t){const{headers:e}=t||{};if(!e||"string"!=typeof e["retry-after"])return 15e3;const r=parseInt(e["retry-after"],10);return Number.isFinite(r)?1e3*r:15e3}(t));if(t instanceof Qe&&e<o)return i(1e3*(e+1));throw t}))}const vr=t=>{let e="";return(cr(t)||lr(t)||ur(t))&&(e=t.type),e||ir},yr=t=>{let e="";return lr(t)&&t.name?e=t.name:cr(t)?e="":ur(t)&&t.name&&(e=t.name),e||nr};function wr(t){return void 0===t||"auto"===t?"auto":t?"1":"0"}function _r(t,{publicKey:e,fileName:r,contentType:o,baseURL:i=or.baseURL,secureSignature:n,secureExpire:a,store:s,signal:c,onProgress:l,source:u="local",integration:d,userAgent:h,retryThrottledRequestMaxTimes:p=or.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:g=or.retryNetworkErrorMaxTimes,metadata:m}){return br(()=>ar({method:"POST",url:mr(i,"/base/",{jsonerrors:1}),headers:{"X-UC-User-Agent":fr({publicKey:e,integration:d,userAgent:h})},data:pr({file:{data:t,name:r||yr(t),contentType:o||vr(t)},UPLOADCARE_PUB_KEY:e,UPLOADCARE_STORE:wr(s),signature:n,expire:a,source:u,metadata:m}),signal:c,onProgress:l}).then(({data:t,headers:e,request:r})=>{const o=We(JSON.parse(t));if("error"in o)throw new gr(o.error.content,o.error.errorCode,r,o,e);return o}),{retryNetworkErrorMaxTimes:g,retryThrottledRequestMaxTimes:p})}var kr,xr;function Cr(t,{publicKey:e,baseURL:r=or.baseURL,store:o,fileName:i,checkForUrlDuplicates:n,saveUrlForRecurrentUploads:a,secureSignature:s,secureExpire:c,source:l="url",signal:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p=or.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:g=or.retryNetworkErrorMaxTimes,metadata:m}){return br(()=>ar({method:"POST",headers:{"X-UC-User-Agent":fr({publicKey:e,integration:d,userAgent:h})},url:mr(r,"/from_url/",{jsonerrors:1,pub_key:e,source_url:t,store:wr(o),filename:i,check_URL_duplicates:n?1:void 0,save_URL_duplicates:a?1:void 0,signature:s,expire:c,source:l,metadata:m}),signal:u}).then(({data:t,headers:e,request:r})=>{const o=We(JSON.parse(t));if("error"in o)throw new gr(o.error.content,o.error.errorCode,r,o,e);return o}),{retryNetworkErrorMaxTimes:g,retryThrottledRequestMaxTimes:p})}!function(t){t.Token="token",t.FileInfo="file_info"}(kr||(kr={})),function(t){t.Unknown="unknown",t.Waiting="waiting",t.Progress="progress",t.Error="error",t.Success="success"}(xr||(xr={}));function Er(t,{publicKey:e,baseURL:r=or.baseURL,signal:o,integration:i,userAgent:n,retryThrottledRequestMaxTimes:a=or.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:s=or.retryNetworkErrorMaxTimes}={}){return br(()=>ar({method:"GET",headers:e?{"X-UC-User-Agent":fr({publicKey:e,integration:i,userAgent:n})}:void 0,url:mr(r,"/from_url/status/",{jsonerrors:1,token:t}),signal:o}).then(({data:t,headers:e,request:r})=>{const o=We(JSON.parse(t));if("error"in o&&!(t=>"status"in t&&t.status===xr.Error)(o))throw new gr(o.error.content,o.error.errorCode,r,o,e);return o}),{retryNetworkErrorMaxTimes:s,retryThrottledRequestMaxTimes:a})}function Tr(t,{publicKey:e,baseURL:r=or.baseURL,jsonpCallback:o,secureSignature:i,secureExpire:n,signal:a,source:s,integration:c,userAgent:l,retryThrottledRequestMaxTimes:u=or.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:d=or.retryNetworkErrorMaxTimes}){return br(()=>ar({method:"POST",headers:{"X-UC-User-Agent":fr({publicKey:e,integration:c,userAgent:l})},url:mr(r,"/group/",{jsonerrors:1}),data:pr({files:t,callback:o,pub_key:e,signature:i,expire:n,source:s}),signal:a}).then(({data:t,headers:e,request:r})=>{const o=We(JSON.parse(t));if("error"in o)throw new gr(o.error.content,o.error.errorCode,r,o,e);return o}),{retryNetworkErrorMaxTimes:d,retryThrottledRequestMaxTimes:u})}function Ar(t,{publicKey:e,baseURL:r=or.baseURL,signal:o,source:i,integration:n,userAgent:a,retryThrottledRequestMaxTimes:s=or.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:c=or.retryNetworkErrorMaxTimes}){return br(()=>ar({method:"GET",headers:{"X-UC-User-Agent":fr({publicKey:e,integration:n,userAgent:a})},url:mr(r,"/info/",{jsonerrors:1,pub_key:e,file_id:t,source:i}),signal:o}).then(({data:t,headers:e,request:r})=>{const o=We(JSON.parse(t));if("error"in o)throw new gr(o.error.content,o.error.errorCode,r,o,e);return o}),{retryThrottledRequestMaxTimes:s,retryNetworkErrorMaxTimes:c})}function Ir(t,{publicKey:e,contentType:r,fileName:o,multipartChunkSize:i=or.multipartChunkSize,baseURL:n="",secureSignature:a,secureExpire:s,store:c,signal:l,source:u="local",integration:d,userAgent:h,retryThrottledRequestMaxTimes:p=or.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:g=or.retryNetworkErrorMaxTimes,metadata:m}){return br(()=>ar({method:"POST",url:mr(n,"/multipart/start/",{jsonerrors:1}),headers:{"X-UC-User-Agent":fr({publicKey:e,integration:d,userAgent:h})},data:pr({filename:o||nr,size:t,content_type:r||ir,part_size:i,UPLOADCARE_STORE:wr(c),UPLOADCARE_PUB_KEY:e,signature:a,expire:s,source:u,metadata:m}),signal:l}).then(({data:t,headers:e,request:r})=>{const o=We(JSON.parse(t));if("error"in o)throw new gr(o.error.content,o.error.errorCode,r,o,e);return o.parts=Object.keys(o.parts).map(t=>o.parts[Number(t)]),o}),{retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g})}function Sr(t,e,{contentType:r,signal:o,onProgress:i,retryThrottledRequestMaxTimes:n=or.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:a=or.retryNetworkErrorMaxTimes}){return br(()=>ar({method:"PUT",url:e,data:t,onProgress:i,signal:o,headers:{"Content-Type":r||ir}}).then(t=>(i&&i({isComputable:!0,value:1}),t)).then(({status:t})=>({code:t})),{retryThrottledRequestMaxTimes:n,retryNetworkErrorMaxTimes:a})}function Mr(t,{publicKey:e,baseURL:r=or.baseURL,source:o="local",signal:i,integration:n,userAgent:a,retryThrottledRequestMaxTimes:s=or.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:c=or.retryNetworkErrorMaxTimes}){return br(()=>ar({method:"POST",url:mr(r,"/multipart/complete/",{jsonerrors:1}),headers:{"X-UC-User-Agent":fr({publicKey:e,integration:n,userAgent:a})},data:pr({uuid:t,UPLOADCARE_PUB_KEY:e,source:o}),signal:i}).then(({data:t,headers:e,request:r})=>{const o=We(JSON.parse(t));if("error"in o)throw new gr(o.error.content,o.error.errorCode,r,o,e);return o}),{retryThrottledRequestMaxTimes:s,retryNetworkErrorMaxTimes:c})}function $r(t,{publicKey:e,baseURL:r,source:o,integration:i,userAgent:n,retryThrottledRequestMaxTimes:a,retryNetworkErrorMaxTimes:s,signal:c,onProgress:l}){return rr({check:c=>Ar(t,{publicKey:e,baseURL:r,signal:c,source:o,integration:i,userAgent:n,retryThrottledRequestMaxTimes:a,retryNetworkErrorMaxTimes:s}).then(t=>t.isReady?t:(l&&l({isComputable:!0,value:1}),!1)),signal:c})}class Or{uuid;name;size;isStored;isImage;mimeType;cdnUrl;s3Url;originalFilename;imageInfo;videoInfo;contentInfo;metadata;s3Bucket;defaultEffects=null;constructor(t,{baseCDN:e=or.baseCDN,fileName:r}={}){const{uuid:o,s3Bucket:i}=t,n=mr(e,`${o}/`),a=i?mr(`https://${i}.s3.amazonaws.com/`,`${o}/${t.filename}`):null;this.uuid=o,this.name=r||t.filename,this.size=t.size,this.isStored=t.isStored,this.isImage=t.isImage,this.mimeType=t.mimeType,this.cdnUrl=n,this.originalFilename=t.originalFilename,this.imageInfo=t.imageInfo,this.videoInfo=t.videoInfo,this.contentInfo=t.contentInfo,this.metadata=t.metadata||null,this.s3Bucket=i||null,this.s3Url=a,function(t){return"defaultEffects"in t}(t)&&(this.defaultEffects=t.defaultEffects)}}const Lr=(t,{signal:e}={})=>{let r=null,o=null;const i=t.map(()=>new AbortController);return tr(e,()=>{i.forEach(t=>t.abort())}),Promise.all(t.map((t,e)=>{const n=(t=>()=>{o=t,i.forEach((e,r)=>r!==t&&e.abort())})(e);return Promise.resolve().then(()=>t({stopRace:n,signal:i[e].signal})).then(t=>(n(),t)).catch(t=>(r=t,null))})).then(t=>{if(null===o)throw r;return t[o]})};var Rr=window.WebSocket;class Ur{events=Object.create({});emit(t,e){this.events[t]?.forEach(t=>t(e))}on(t,e){this.events[t]=this.events[t]||[],this.events[t].push(e)}off(t,e){this.events[t]=e?this.events[t].filter(t=>t!==e):[]}}class Pr{key;disconnectTime;ws=void 0;queue=[];isConnected=!1;subscribers=0;emmitter=new Ur;disconnectTimeoutId=null;constructor(t,e=3e4){this.key=t,this.disconnectTime=e}connect(){if(this.disconnectTimeoutId&&clearTimeout(this.disconnectTimeoutId),!this.isConnected&&!this.ws){const t=`wss://ws.pusherapp.com/app/${this.key}?protocol=5&client=js&version=1.12.2`;this.ws=new Rr(t),this.ws.addEventListener("error",t=>{this.emmitter.emit("error",new Error(t.message))}),this.emmitter.on("connected",()=>{this.isConnected=!0,this.queue.forEach(t=>this.send(t.event,t.data)),this.queue=[]}),this.ws.addEventListener("message",t=>{const e=JSON.parse(t.data.toString());switch(e.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(e.channel,((t,e)=>"success"===t?{status:xr.Success,...e}:"progress"===t?{status:xr.Progress,...e}:{status:xr.Error,...e})(e.event,JSON.parse(e.data)))}})}}disconnect(){const t=()=>{this.ws?.close(),this.ws=void 0,this.isConnected=!1};this.disconnectTime?this.disconnectTimeoutId=setTimeout(()=>{t()},this.disconnectTime):t()}send(t,e){const r=JSON.stringify({event:t,data:e});this.ws?.send(r)}subscribe(t,e){this.subscribers+=1,this.connect();const r=`task-status-${t}`,o={event:"pusher:subscribe",data:{channel:r}};this.emmitter.on(r,e),this.isConnected?this.send(o.event,o.data):this.queue.push(o)}unsubscribe(t){this.subscribers-=1;const e=`task-status-${t}`,r={event:"pusher:unsubscribe",data:{channel:e}};this.emmitter.off(e),this.isConnected?this.send(r.event,r.data):this.queue=this.queue.filter(t=>t.data.channel!==e),0===this.subscribers&&this.disconnect()}onError(t){return this.emmitter.on("error",t),()=>this.emmitter.off("error",t)}}let Nr=null;const Dr=t=>{if(!Nr){const e="undefined"==typeof window?0:3e4;Nr=new Pr(t,e)}return Nr};const zr=(t,{publicKey:e,fileName:r,baseURL:o,baseCDN:i,checkForUrlDuplicates:n,saveUrlForRecurrentUploads:a,secureSignature:s,secureExpire:c,store:l,signal:u,onProgress:d,source:h,integration:p,userAgent:g,retryThrottledRequestMaxTimes:m,pusherKey:f=or.pusherKey,metadata:b})=>{return Promise.resolve((v=f,void Dr(v).connect())).then(()=>Cr(t,{publicKey:e,fileName:r,baseURL:o,checkForUrlDuplicates:n,saveUrlForRecurrentUploads:a,secureSignature:s,secureExpire:c,store:l,signal:u,source:h,integration:p,userAgent:g,retryThrottledRequestMaxTimes:m,metadata:b})).catch(t=>{const e=Dr(f);return e?.disconnect(),Promise.reject(t)}).then(t=>t.type===kr.FileInfo?t:Lr([({signal:r})=>function({token:t,publicKey:e,baseURL:r,integration:o,userAgent:i,retryThrottledRequestMaxTimes:n,retryNetworkErrorMaxTimes:a,onProgress:s,signal:c}){return rr({check:c=>Er(t,{publicKey:e,baseURL:r,integration:o,userAgent:i,retryThrottledRequestMaxTimes:n,retryNetworkErrorMaxTimes:a,signal:c}).then(e=>{switch(e.status){case xr.Error:return new gr(e.error,e.errorCode);case xr.Waiting:return!1;case xr.Unknown:return new gr(`Token "${t}" was not found.`);case xr.Progress:return s&&("unknown"===e.total?s({isComputable:!1}):s({isComputable:!0,value:e.done/e.total})),!1;case xr.Success:return s&&s({isComputable:!0,value:e.done/e.total}),e;default:throw new Error("Unknown status")}}),signal:c})}({token:t.token,publicKey:e,baseURL:o,integration:p,userAgent:g,retryThrottledRequestMaxTimes:m,onProgress:d,signal:r}),({signal:e})=>(({token:t,pusherKey:e,signal:r,onProgress:o})=>new Promise((i,n)=>{const a=Dr(e),s=a.onError(n),c=()=>{s(),a.unsubscribe(t)};tr(r,()=>{c(),n(new er("pusher cancelled"))}),a.subscribe(t,t=>{switch(t.status){case xr.Progress:o&&("unknown"===t.total?o({isComputable:!1}):o({isComputable:!0,value:t.done/t.total}));break;case xr.Success:c(),o&&o({isComputable:!0,value:t.done/t.total}),i(t);break;case xr.Error:c(),n(new gr(t.msg,t.error_code))}})}))({token:t.token,pusherKey:f,signal:e,onProgress:d})],{signal:u})).then(t=>{if(t instanceof gr)throw t;return t}).then(t=>$r(t.uuid,{publicKey:e,baseURL:o,integration:p,userAgent:g,retryThrottledRequestMaxTimes:m,onProgress:d,signal:u})).then(t=>new Or(t,{baseCDN:i}));var v},Fr=new WeakMap,Vr=async t=>{if(lr(t)||cr(t))return t.size;if(ur(t)){return(await(async t=>{if(Fr.has(t))return Fr.get(t);const e=await fetch(t.uri).then(t=>t.blob());return Fr.set(t,e),e})(t)).size}throw new Error("Unknown file type. Cannot determine file size.")},Br=t=>{const e=new RegExp("[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}");return!dr(t)&&e.test(t)},jr=t=>{const e=new RegExp("^(?:\\w+:)?\\/\\/([^\\s\\.]+\\.\\S{2}|localhost[\\:?\\d]*)\\S*$");return!dr(t)&&e.test(t)},Hr=async(t,e,r)=>o=>((t,e,r,o)=>{const i=o*e,n=Math.min(i+o,r);return t.slice(i,n)})(t,o,e,r),qr=async(t,{publicKey:e,fileName:r,fileSize:o,baseURL:i,secureSignature:n,secureExpire:a,store:s,signal:c,onProgress:l,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,contentType:m,multipartChunkSize:f=or.multipartChunkSize,maxConcurrentRequests:b=or.maxConcurrentRequests,baseCDN:v,metadata:y})=>{const w=o??await Vr(t);let _;const k=(t,e)=>{if(!l)return;_||(_=Array(t).fill(0));return r=>{var o;r.isComputable&&(_[e]=r.value,l({isComputable:!0,value:(o=_,o.reduce((t,e)=>t+e,0)/t)}))}};return m||=vr(t),Ir(w,{publicKey:e,contentType:m,fileName:r||yr(t),baseURL:i,secureSignature:n,secureExpire:a,store:s,signal:c,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,metadata:y,multipartChunkSize:f}).then(async({uuid:r,parts:o})=>{const i=await Hr(t,w,f);return Promise.all([r,(n=b,a=o.map((t,r)=>()=>((t,e,{publicKey:r,contentType:o,onProgress:i,signal:n,integration:a,retryThrottledRequestMaxTimes:s,retryNetworkErrorMaxTimes:c})=>Sr(t,e,{publicKey:r,contentType:o,onProgress:i,signal:n,integration:a,retryThrottledRequestMaxTimes:s,retryNetworkErrorMaxTimes:c}))(i(r),t,{publicKey:e,contentType:m,onProgress:k(o.length,r),signal:c,integration:d,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g})),new Promise((t,e)=>{const r=[];let o=!1,i=a.length;const s=[...a],c=()=>{const n=a.length-s.length,l=s.shift();l&&l().then(e=>{o||(r[n]=e,i-=1,i?c():t(r))}).catch(t=>{o=!0,e(t)})};for(let t=0;t<n;t++)c()}))]);var n,a}).then(([t])=>Mr(t,{publicKey:e,baseURL:i,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g})).then(t=>t.isReady?t:$r(t.uuid,{publicKey:e,baseURL:i,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,onProgress:l,signal:c})).then(t=>new Or(t,{baseCDN:v}))};async function Kr(t,{publicKey:e,fileName:r,baseURL:o=or.baseURL,secureSignature:i,secureExpire:n,store:a,signal:s,onProgress:c,source:l,integration:u,userAgent:d,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,contentType:g,multipartMinFileSize:m,multipartChunkSize:f,maxConcurrentRequests:b,baseCDN:v=or.baseCDN,checkForUrlDuplicates:y,saveUrlForRecurrentUploads:w,pusherKey:_,metadata:k}){if(dr(t)){const y=await Vr(t);return((t,e=or.multipartMinFileSize)=>t>=e)(y,m)?qr(t,{publicKey:e,contentType:g,multipartChunkSize:f,fileSize:y,fileName:r,baseURL:o,secureSignature:i,secureExpire:n,store:a,signal:s,onProgress:c,source:l,integration:u,userAgent:d,maxConcurrentRequests:b,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,baseCDN:v,metadata:k}):((t,{publicKey:e,fileName:r,baseURL:o,secureSignature:i,secureExpire:n,store:a,contentType:s,signal:c,onProgress:l,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,baseCDN:m,metadata:f})=>_r(t,{publicKey:e,fileName:r,contentType:s,baseURL:o,secureSignature:i,secureExpire:n,store:a,signal:c,onProgress:l,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,metadata:f}).then(({file:t})=>$r(t,{publicKey:e,baseURL:o,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,onProgress:l,signal:c})).then(t=>new Or(t,{baseCDN:m})))(t,{publicKey:e,fileName:r,contentType:g,baseURL:o,secureSignature:i,secureExpire:n,store:a,signal:s,onProgress:c,source:l,integration:u,userAgent:d,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,baseCDN:v,metadata:k})}if(jr(t))return zr(t,{publicKey:e,fileName:r,baseURL:o,baseCDN:v,checkForUrlDuplicates:y,saveUrlForRecurrentUploads:w,secureSignature:i,secureExpire:n,store:a,signal:s,onProgress:c,source:l,integration:u,userAgent:d,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,pusherKey:_,metadata:k});if(Br(t))return((t,{publicKey:e,fileName:r,baseURL:o,signal:i,onProgress:n,source:a,integration:s,userAgent:c,retryThrottledRequestMaxTimes:l,retryNetworkErrorMaxTimes:u,baseCDN:d})=>Ar(t,{publicKey:e,baseURL:o,signal:i,source:a,integration:s,userAgent:c,retryThrottledRequestMaxTimes:l,retryNetworkErrorMaxTimes:u}).then(t=>new Or(t,{baseCDN:d,fileName:r})).then(t=>(n&&n({isComputable:!0,value:1}),t)))(t,{publicKey:e,fileName:r,baseURL:o,signal:s,onProgress:c,source:l,integration:u,userAgent:d,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,baseCDN:v});throw new TypeError(`File uploading from "${t}" is not supported`)}class Gr{uuid;filesCount;totalSize;isStored;isImage;cdnUrl;files;createdAt;storedAt=null;constructor(t,{baseCDN:e=or.baseCDN}={}){this.uuid=t.id,this.filesCount=t.filesCount;const r=t.files.filter(Boolean);this.totalSize=Object.values(r).reduce((t,e)=>t+e.size,0),this.isStored=!!t.datetimeStored,this.isImage=!!Object.values(r).filter(t=>t.isImage).length,this.cdnUrl=t.cdnUrl,this.files=r.map(t=>new Or(t,{baseCDN:e})),this.createdAt=t.datetimeCreated,this.storedAt=t.datetimeStored}}function Wr(t,{publicKey:e,fileName:r,baseURL:o=or.baseURL,secureSignature:i,secureExpire:n,store:a,signal:s,onProgress:c,source:l,integration:u,userAgent:d,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,contentType:g,multipartChunkSize:m=or.multipartChunkSize,baseCDN:f=or.baseCDN,checkForUrlDuplicates:b,saveUrlForRecurrentUploads:v,jsonpCallback:y}){if(!(t=>{for(const e of t)if(!dr(e))return!1;return!0})(t)&&!(t=>{for(const e of t)if(!jr(e))return!1;return!0})(t)&&!(t=>{for(const e of t)if(!Br(e))return!1;return!0})(t))throw new TypeError(`Group uploading from "${t}" is not supported`);let w,_=!0;const k=t.length,x=(t,e)=>{if(!c)return;w||(w=Array(t).fill(0));return r=>{if(!r.isComputable||!_)return _=!1,void c({isComputable:!1});var o;w[e]=r.value,c({isComputable:!0,value:(o=w,o.reduce((t,e)=>t+e)/t)})}};return Promise.all(t.map((t,c)=>dr(t)||jr(t)?Kr(t,{publicKey:e,fileName:r,baseURL:o,secureSignature:i,secureExpire:n,store:a,signal:s,onProgress:x(k,c),source:l,integration:u,userAgent:d,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,contentType:g,multipartChunkSize:m,baseCDN:f,checkForUrlDuplicates:b,saveUrlForRecurrentUploads:v}).then(t=>t.uuid):t)).then(t=>Tr(t,{publicKey:e,baseURL:o,jsonpCallback:y,secureSignature:i,secureExpire:n,signal:s,source:l,integration:u,userAgent:d,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p}).then(t=>new Gr(t,{baseCDN:f})).then(t=>(c&&c({isComputable:!0,value:1}),t)))}class Xr{_concurrency=1;_pending=[];_running=0;_resolvers=new Map;_rejectors=new Map;constructor(t){this._concurrency=t}run(){const t=this._concurrency-this._running;for(let e=0;e<t;e++){const t=this._pending.shift();if(!t)return;const e=this._resolvers.get(t),r=this._rejectors.get(t);if(!e||!r)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(t=>e(t)).catch(t=>r(t))}}add(t,{autoRun:e}={autoRun:!0}){return new Promise((r,o)=>{this._resolvers.set(t,r),this._rejectors.set(t,o),this._pending.push(t),e&&this.run()})}get pending(){return this._pending.length}get running(){return this._running}set concurrency(t){this._concurrency=t,this.run()}get concurrency(){return this._concurrency}}const Zr={button:["toolbar"],checkbox:["toolbar"],menuitem:["menu","menubar"],option:["listbox"],tab:["tablist"]};function Yr(t,e){e.tabIndex=0,e.focus(),t.tabIndex=-1}function Jr(t){let e=t.role||t.type||t.tagName;if(!e)return null;let r=Zr[e.toLowerCase()];if(!r)return null;for(let e of r){let r=t.closest(`[role=${e}]`);if(r)return r}}function Qr(t,e){return"toolbar"===e.role?function(t){let e=[...t.querySelectorAll("*")];return e.filter(t=>"button"===t.role||"button"===t.type||"checkbox"===t.role||"checkbox"===t.type)}(e):e.querySelectorAll(`[role=${t.role}]`)}function to(t){return e=>{let r=!1,o=t?.searchDelayMs||300,i=0,n="";function a(t){let r=Jr(t.target);if(!r)return void s();let a=Qr(t.target,r),c=Array.from(a).indexOf(t.target),l="ArrowDown",u="ArrowUp";if(function(t){let e=t.getAttribute("aria-orientation");if("vertical"===e)return!1;if("horizontal"===e)return!0;let r=t.role;return"menubar"===r||"tablist"===r||"toolbar"===r}(r)&&("rtl"===e.document.dir?(l="ArrowLeft",u="ArrowRight"):(l="ArrowRight",u="ArrowLeft")),t.key===l)t.preventDefault(),Yr(t.target,a[c+1]||a[0]);else if(t.key===u)t.preventDefault(),Yr(t.target,a[c-1]||a[a.length-1]);else if("Home"===t.key)t.preventDefault(),Yr(t.target,a[0]);else if("End"===t.key)t.preventDefault(),Yr(t.target,a[a.length-1]);else if(1===t.key.length&&"tablist"!==r.role){let e=Date.now();e-i<=o?n+=t.key.toLowerCase():n=t.key.toLowerCase(),i=e;let r=Array.from(a).find(t=>t.textContent?.trim()?.toLowerCase()?.startsWith(n));r&&(t.preventDefault(),Yr(t.target,r))}}function s(){r=!1,e.removeEventListener("keydown",a)}function c(t){let o=Jr(t.target);if(o){r||(r=!0,e.addEventListener("keydown",a));let i=Qr(t.target,o);for(let e of i)e!==t.target&&e.setAttribute("tabindex",-1)}else r&&s()}function l(t){t.relatedTarget&&t.relatedTarget!==e.document||s()}function u(t){let e=Jr(t.target);if(e){let r=Qr(t.target,e);for(let e of r)e!==t.target&&e.setAttribute("tabindex",-1);t.target.setAttribute("tabindex",0)}}return e.addEventListener("click",u),e.addEventListener("focusin",c),e.addEventListener("focusout",l),()=>{s(),e.removeEventListener("click",u),e.removeEventListener("focusin",c),e.removeEventListener("focusout",l)}}}function eo(t){let e,r,o=t.split(" ");function i(t){"Enter"!==t.key||"BUTTON"!==t.target.tagName&&"A"!==t.target.tagName||(n(),t.target.classList.add(...o),e=t.target,r=t.target)}function n(){e&&e.classList.remove(...o),r=null}function a(t){0===t.clientX&&0===t.clientY&&r!==t.target&&(n(),t.target.classList.add(...o),e=t.target)}return t=>(t.addEventListener("click",a),t.addEventListener("keydown",i),t.addEventListener("keyup",n),()=>{t.removeEventListener("click",a),t.removeEventListener("keydown",i),t.removeEventListener("keyup",n)})}function ro(){return t=>{let e=[];function r(){let o=e.pop();if(!o)return void t.document.activeElement.blur();let i=o.deref();i&&i.isConnected?i.focus():r()}let o,i=0;function n(r){clearInterval(o);let n=r.getAttribute("aria-controls");o=setInterval(()=>{if(i++>50)return void clearInterval(o);let r=t.document.getElementById(n);if(r){let i=r.querySelector('a, button, select, textarea, input:not([type=radio]), [type=radio]:checked, [tabindex]:not([tabindex="-1"])');i&&(clearInterval(o),r.dispatchEvent(new t.CustomEvent("keyuxJump",{bubbles:!0})),function(r){let o=t.document.activeElement;o&&o!==t.document.body&&e.push(new WeakRef(o)),r.focus({focusVisible:!0})}(i))}},50)}function a(t){t.target.getAttribute("aria-controls")&&"Enter"===t.key&&n(t.target),"Escape"===t.key&&r()}return t.addEventListener("keydown",a),()=>{t.removeEventListener("keydown",a)}}}function oo(t){return Array.isArray(t)?t.map(t=>"object"==typeof t&&null!==t?oo(t):t):"object"!=typeof t||null===t?t:Object.fromEntries(Object.entries(t).map(([t,e])=>{const r=function(t){return t.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`).replace(/__/g,"_")}(t);return"object"==typeof e&&null!==e?[r,oo(e)]:[r,e]}))}function io(t){return{ok:!1,error:t}}class no{constructor(t="https://tlm.uploadcare.com/api/"){this.baseUrl=t}async base(t,e={}){const r=`${this.baseUrl}${t}`;try{const t=await fetch(r,e);if(!t.ok)return io(new Error(`Got non-200 response from "${r}". Status: ${t.status.toString()}`));try{const e=await t.json();return{ok:!0,value:e}}catch(t){return io(new Error(`Error parsing JSON from "${r}". Error: ${t}`))}}catch(t){return io(new Error(`Error fetching data from "${r}". Error: ${t}`))}}async post(t,e,r={}){return await this.base(t,{...r,method:"POST",body:JSON.stringify(oo(e)),headers:{"Content-Type":"application/json",...r.headers||{}}})}async get(t,e={}){return await this.base(t,{method:"GET",...e})}}class ao extends no{constructor(){super()}async sendEvent(t,e){const r=await(async(t,e)=>({success:!0,data:e}))(0,t);if(!r.success)throw console.error("TelemetryAPIService: events: body is invalid",r.error),new Error("TelemetryAPIService: events: body is invalid");return this.post("v1/events",t,e)}}const so=t=>{if(t<=0n)return"0";let e="";for(;t>0n;){e="0123456789abcdefghijklmnopqrstuvwxyz"[Number(t%36n)]+e,t/=36n}return e},co=async t=>{const e=await(async t=>{const e=(new TextEncoder).encode(t),r=await window.crypto.subtle.digest("SHA-256",e),o=Array.from(new Uint8Array(r)).map(t=>t.toString(16).padStart(2,"0")).join("");return BigInt(`0x${o}`)})(t);return so(e).slice(0,10)},lo=async(t,e)=>((t,e)=>{const r=new URL(e);return r.hostname=`${t}.${r.hostname}`,r.toString().replace(/\/$/,"")})(await co(t),e),uo=()=>{const t=[];return{stack:t,promiseReadJpegChunks:e=>new Promise((r,o)=>{let i=2;const n=(t,e)=>{const r=new FileReader;r.addEventListener("load",()=>{e(new DataView(r.result))}),r.addEventListener("error",t=>{o(`Reader error: ${t}`)}),r.readAsArrayBuffer(t)},a=()=>n(e.slice(i,i+128),t=>{let e,r,o;for(e=r=0,o=t.byteLength;o>=0?r<o:r>o;e=o>=0?++r:--r)if(255===t.getUint8(e)){i+=e;break}s()}),s=()=>{const s=i;return n(e.slice(i,i+=4),c=>{if(4!==c.byteLength||255!==c.getUint8(0))return void o("Corrupted");const l=c.getUint8(1);if(218===l)return void r(!0);const u=c.getUint16(2)-2;return n(e.slice(i,i+=u),e=>{e.byteLength===u?(t.push({startPos:s,length:u,marker:l,view:e}),a()):o("Corrupted")})})};FileReader&&DataView||o("Not Support"),n(e.slice(0,2),t=>{65496!==t.getUint16(0)&&o("Not jpeg"),a()})})}},ho=async t=>{const e=[],{promiseReadJpegChunks:r,stack:o}=uo();return await r(t),o.forEach(({marker:t,view:r})=>{226===t&&1229144927===r.getUint32(0)&&1347571526===r.getUint32(4)&&1229735168===r.getUint32(8)&&e.push(r)}),e},po=async(t,e,r)=>{{const o=[],i=[],{promiseReadJpegChunks:n,stack:a}=uo();await n(t),a.forEach(t=>{if(t.marker===e)return o.push(t.startPos),i.push(t.length)});const s=[t.slice(0,2)];for(const t of r){const r=new DataView(new ArrayBuffer(4));r.setUint16(0,65280+e),r.setUint16(2,t.byteLength+2),s.push(r.buffer),s.push(t)}let c=2;for(let e=0;e<o.length;e++)o[e]>c&&s.push(t.slice(c,o[e])),c=o[e]+i[e]+4;return s.push(t.slice(c,t.size)),new Blob(s,{type:t.type})}},go=(t,e)=>po(t,226,e.map(t=>t.buffer)),mo=()=>{const t=document.createElement("canvas"),e=t.getContext("2d");return{canvas:t,ctx:e}},fo=async t=>{let e=null;const{promiseReadJpegChunks:r,stack:o}=uo();return await r(t),o.forEach(({marker:t,view:r})=>{!e&&225===t&&r.byteLength>=14&&1165519206===r.getUint32(0)&&0===r.getUint16(4)&&(e=r)}),e};let bo;const vo=t=>((t,e)=>new Promise((r,o)=>{e&&(t.src=e),t.complete?r(t):(t.addEventListener("load",()=>{r(t)}),t.addEventListener("error",()=>{o(new Error("Failed to load image. Probably not an image."))}))}))(new Image,t),yo=[1,3],wo=[192,193,194,195,197,198,199,201,202,203,205,206,207],_o={squareSide:[Math.floor(Math.sqrt(5e6)),4096,8192,11180,10836,11402,14188,16384],dimension:[4096,8192,16384,32767,65535]},ko=(t,e)=>{const r={};return(...o)=>{const i=e(o,r);return i in r?r[i]:r[i]=t(...o)}},xo=(t,e)=>{const[r]=t,o=Object.keys(e).map(t=>parseInt(t,10)).sort((t,e)=>t-e);for(let t=0;t<o.length;t++){const i=o[t],n=!!e[i];if(i>r&&n)return i;if(i<r&&!n)return i}return r},Co=55,Eo=110,To=165,Ao=255,Io=`rgba(${Co}, ${Eo}, ${To}, ${Ao/255})`,So=(t,e)=>{try{const r=[t-1,e-1,1,1],{canvas:o,ctx:i}=mo();o.width=1,o.height=1;const{canvas:n,ctx:a}=mo();n.width=t,n.height=e,a&&(a.fillStyle=Io,a.fillRect(...r),i.drawImage(n,t-1,e-1,1,1,0,0,1,1));const s=i&&i.getImageData(0,0,1,1).data;let c=!1;return s&&(c=s[0]===Co&&s[1]===Eo&&s[2]===To&&s[3]===Ao),n.width=n.height=1,c}catch(r){return console.error(`Failed to test for max canvas size of ${t}x${e}.`),!1}};function Mo(t){return(...e)=>new Promise(r=>{setTimeout(()=>{const o=t(...e);r(o)},0)})}const $o=Mo(ko(So,xo)),Oo=Mo(ko(So,xo)),Lo=async(t,e)=>{const r=_o.squareSide.find(r=>r*r>=t*e),o=_o.dimension.find(r=>r>=t&&r>=e);if(!r||!o)throw new Error("Not supported");const[i,n]=await Promise.all([$o(r,r),Oo(o,1)]);if(i&&n)return!0;throw new Error("Not supported")},Ro=async(t,e,r)=>{try{const{ctx:o,canvas:i}=mo();return i.width=e,i.height=r,o.imageSmoothingQuality="high",o.drawImage(t,0,0,e,r),t instanceof HTMLImageElement&&(t.src="//:0"),t instanceof HTMLCanvasElement&&(t.width=t.height=1),i}catch(t){throw new Error("Canvas resize error",{cause:t})}},Uo=({img:t,sourceW:e,targetW:r,targetH:o,step:i})=>{const n=function({sourceW:t,targetW:e,targetH:r,step:o}){const i=[];let n=e,a=r;do{i.push([n,a]),n=Math.round(n/o),a=Math.round(a/o)}while(n<t*o);return i.reverse()}({sourceW:e,targetW:r,targetH:o,step:i});return n.reduce((t,[e,r],o)=>t.then(t=>Lo(e,r).then(()=>Ro(t,e,r)).catch(()=>{if(o===n.length-1)throw new Error("Not supported");return t})),Promise.resolve(t))},Po=navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform),No=.71,Do=(t,e)=>{if(t.width*No*t.height*No<e.size)throw new Error("Not required");const r=t.width,o=t.height,i=r/o,n=Math.floor(Math.sqrt(e.size*i)),a=Math.floor(e.size/Math.sqrt(e.size*i));return Lo(n,a).then(()=>{const{ctx:e}=mo();return"imageSmoothingQuality"in e&&!(/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform))&&!Po?(({img:t,targetW:e,targetH:r})=>Ro(t,e,r))({img:t,targetW:n,targetH:a}):Uo({img:t,sourceW:r,targetW:n,targetH:a,step:No})}).catch(()=>Promise.reject("Not supported"))},zo=async(t,e)=>{try{if(await(async t=>{let e=!1;const{promiseReadJpegChunks:r,stack:o}=uo();return await r(t).then(()=>(o.forEach(({marker:t,view:r})=>{if(!e&&wo.indexOf(t)>=0){const t=r.getUint8(5);yo.indexOf(t)<0&&(e=!0)}}),e)).catch(()=>e)})(t))throw new Error("Should skipped");const r=await Promise.allSettled([fo(t),new Promise(t=>{if(void 0!==bo)t(bo);else{const e=new Image;e.addEventListener("load",()=>{bo=e.naturalWidth<e.naturalHeight,e.src="//:0",t(bo)}),e.src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QA6RXhpZgAATU0AKgAAAAgAAwESAAMAAAABAAYAAAEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAIBASIA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k="}}),ho(t)]),o=!r.some(t=>"rejected"===t.status),[i,n,a]=r,s=await(async t=>{try{return await go(t,[])}catch(t){throw new Error(`Failed to strip ICC profile: ${t}`)}})(t).catch(()=>t),c=await vo(URL.createObjectURL(s));URL.revokeObjectURL(c.src);const l=await Do(c,e);let u="image/jpeg",d=e?.quality||.8;!o&&(t=>{const{ctx:e,canvas:r}=mo();r.width=r.height=50,e.drawImage(t,0,0,50,50);const o=e.getImageData(0,0,50,50).data;r.width=r.height=1;for(let t=3;t<o.length;t+=4)if(o[t]<254)return!0;return!1})(l)&&(u="image/png",d=void 0);let h=await((t,e,r)=>new Promise((o,i)=>{t.toBlob(t=>{t?o(t):i("Failed to convert canvas to blob")},e,r),t.width=t.height=1}))(l,u,d);if(o&&"fulfilled"===i.status&&i.value){const t=i.value,e="fulfilled"===n.status&&n.value;h=await(async(t,e,r)=>(r&&((t,e)=>{((t,e)=>{let r,o,i,n;if(t&&!(t.byteLength<14)&&1165519206===t.getUint32(0)&&0===t.getUint16(4)){if(18761===t.getUint16(6))o=!0;else{if(19789!==t.getUint16(6))return;o=!1}if(42===t.getUint16(8,o))for(i=8+t.getUint32(10,o),r=0,n=t.getUint16(i-2,o);n>=0?r<n:r>n;n>=0?++r:--r){if(t.byteLength<i+10)return;274===t.getUint16(i,o)&&e(i+8,o),i+=12}}})(t,(r,o)=>t.setUint16(r,e,o))})(e,1),po(t,225,[e.buffer])))(h,t,e)}return o&&"fulfilled"===a.status&&a.value.length>0&&(h=await go(h,a.value)),h}catch(t){let e;throw t instanceof Error&&(e=t.message),"string"==typeof t&&(e=t),new Error("Failed to shrink image. "+(e?`Message: "${e}".`:""),{cause:t})}};var Fo=Object.freeze({INIT_SOLUTION:"init-solution",CHANGE_CONFIG:"change-config",ACTION_EVENT:"action-event",ERROR_EVENT:"error-event"}),Vo=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"}),Bo=class{_timeoutStore=new Map;_targets=new Set;_debugPrint=null;constructor(t){this._debugPrint=t}bindTarget(t){this._targets.add(t)}unbindTarget(t){this._targets.delete(t)}_dispatch(t,e){for(const r of this._targets)r.dispatchEvent(new CustomEvent(t,{detail:e}));this._debugPrint?.(()=>{const r=e&&"object"==typeof e?{...e}:e;return[`event "${t}"`,r]})}emit(t,e,r={}){const{debounce:o}=r;if("number"!=typeof o&&!o)return void this._dispatch(t,"function"==typeof e?e():e);this._timeoutStore.has(t)&&window.clearTimeout(this._timeoutStore.get(t));const i="number"==typeof o?o:20,n=window.setTimeout(()=>{this._dispatch(t,"function"==typeof e?e():e),this._timeoutStore.delete(t)},i);this._timeoutStore.set(t,n)}};function jo(t,e){let r;const o=(...o)=>{r&&clearTimeout(r),r=setTimeout(()=>t(...o),e)};return o.cancel=()=>{r&&clearTimeout(r)},o}var Ho=t=>t?t.split(",").map(t=>t.trim()).filter(Boolean):[],qo=t=>t.join(","),Ko=t=>{if("string"!=typeof t||!t)return"";let e=t.trim();return e.startsWith("-/")?e=e.slice(2):e.startsWith("/")&&(e=e.slice(1)),e.endsWith("/")&&(e=e.slice(0,e.length-1)),e},Go=(...t)=>t.filter(t=>"string"==typeof t&&!!t).map(t=>Ko(t)).join("/-/"),Wo=(...t)=>{const e=Go(...t);return e?`-/${e}/`:""};function Xo(t){const e=new URL(t),r=e.pathname+e.search+e.hash,o=r.lastIndexOf("http"),i=r.lastIndexOf("/");let n="";return o>=0?n=r.slice(o):i>=0&&(n=r.slice(i+1)),n}function Zo(t){const e=new URL(t),{pathname:r}=e,o=r.indexOf("/"),i=r.indexOf("/",o+1);return r.substring(o+1,i)}function Yo(t){const e=Qo(t),r=new URL(e),o=r.pathname.indexOf("/-/");if(-1===o)return"";return r.pathname.substring(o).slice(1)}function Jo(t){return Yo(t).split("/-/").filter(Boolean).map(t=>Ko(t))}function Qo(t){const e=new URL(t),r=Xo(t),o=ti(r)?ei(r).pathname:r;return e.pathname=e.pathname.replace(o,""),e.search="",e.hash="",e.toString()}function ti(t){return t.startsWith("http")}function ei(t){const e=new URL(t);return{pathname:`${e.origin}${e.pathname??""}`,search:e.search??"",hash:e.hash??""}}var ri=(t,e,r)=>{const o=new URL(Qo(t)),i=r??Xo(t),n=e??"";if(o.pathname.startsWith("//")&&(o.pathname=o.pathname.replace("//","/")),i&&ti(i)){const t=ei(i);o.pathname=`${o.pathname}${n}${t.pathname||""}`,o.search=t.search,o.hash=t.hash}else o.pathname=`${o.pathname}${n}${i||""}`;return o.toString()},oi=(t,e)=>{const r=new URL(t);return r.pathname=`${e}/`,r.toString()},ii=(t,e=",")=>t.trim().split(e).map(t=>t.trim()).filter(t=>t.length>0),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}),ai=["enhance","brightness","exposure","gamma","contrast","saturation","vibrance","warmth","filter","mirror","flip","rotate","crop"];function si(t){return Go(...ai.filter(e=>void 0!==t[e]&&null!==t[e]).map(e=>function(t,e){if("number"==typeof e){const r=e;return ni[t]!==r?`${t}/${r}`:""}if("boolean"==typeof e){const r=e;return ni[t]!==r?`${t}`:""}if("filter"===t&&e){const{name:r,amount:o}=e;return ni.filter===o?"":`${t}/${r}/${o}`}if("crop"===t&&e){const{dimensions:r,coords:o}=e;return`${t}/${r.join("x")}/${o.join(",")}`}return""}(e,t[e])).filter(t=>!!t))}var ci=Go("format/auto","progressive/yes"),li=([t])=>void 0!==t?Number(t):void 0,ui=()=>!0,di=Object.freeze({enhance:li,brightness:li,exposure:li,gamma:li,contrast:li,saturation:li,vibrance:li,warmth:li,filter:([t,e])=>({name:t,amount:void 0!==e?Number(e):100}),mirror:ui,flip:ui,rotate:li,crop:t=>{const[e,r]=t,{dimensions:o,coords:i}=(([t,e])=>{if(!/\d+x\d+/.test(t)||!/\d+,\d+/.test(e))throw new Error("Crop by aspect ratio, percentage or alignment shortcuts is not supported.");return{dimensions:ii(t,"x").map(Number),coords:ii(e).map(Number)}})([e,r]);return{dimensions:o,coords:i}}});function hi(t){const e={};for(const r of t){const[t,...o]=r.split("/");if(!t||!ai.includes(t))continue;const i=t,n=di[i];try{const t=n(o);e[i]=t}catch(t){console.warn([`Failed to parse URL operation "${r}". It will be ignored.`,t instanceof Error?`Error message: "${t.message}"`:t,"If you need this functionality, please feel free to open an issue at https://github.com/uploadcare/blocks/issues/new"].join("\n"))}}return e}var pi=Object.freeze({CROP:"crop",TUNING:"tuning",FILTERS:"filters"}),gi=Object.freeze([pi.CROP,pi.TUNING,pi.FILTERS]),mi=Object.freeze(["brightness","exposure","gamma","contrast","saturation","vibrance","warmth","enhance"]),fi=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"]),bi=Object.freeze(["rotate","mirror","flip"]),vi=ni,yi=Object.freeze({brightness:{zero:vi.brightness,range:[-100,100],keypointsNumber:2},exposure:{zero:vi.exposure,range:[-500,500],keypointsNumber:2},gamma:{zero:vi.gamma,range:[0,1e3],keypointsNumber:2},contrast:{zero:vi.contrast,range:[-100,500],keypointsNumber:2},saturation:{zero:vi.saturation,range:[-100,500],keypointsNumber:1},vibrance:{zero:vi.vibrance,range:[-100,500],keypointsNumber:1},warmth:{zero:vi.warmth,range:[-100,100],keypointsNumber:1},enhance:{zero:vi.enhance,range:[0,100],keypointsNumber:1},filter:{zero:vi.filter,range:[0,100],keypointsNumber:1}}),wi="https://ucarecdn.com",_i={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:qo(gi),maxLocalFileSizeBytes:0,thumbSize:76,showEmptyList:!1,useLocalImageEditor:!1,useCloudImageEditor:!0,removeCopyright:!1,cropPreset:"",imageShrink:"",modalScrollLock:!0,modalBackdropStrokes:!1,sourceListWrap:!0,remoteTabSessionKey:"",cdnCname:wi,cdnCnamePrefixed:"https://ucarecd.net",baseUrl:"https://upload.uploadcare.com",socialBaseUrl:"https://social.uploadcare.com",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:6e5,secureUploadsSignatureResolver:null,secureDeliveryProxyUrlResolver:null,iconHrefResolver:null,fileValidators:[],collectionValidators:[],validationTimeout:15e3,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},ki=Object.freeze(_i),xi=(t,e)=>new Intl.PluralRules(t).select(e),Ci=t=>t,Ei="{{",Ti="}}",Ai="plural:";function Ii(t,e={},r={}){const{openToken:o=Ei,closeToken:i=Ti,transform:n=Ci}=r;for(const r in e){const a=e[r],s=null!=a?a.toString():void 0,c="string"==typeof s?n(s):String(s);t=t.replaceAll(o+r+i,c)}return t}var Si="--uploadcare-blocks-window-height",Mi=class t{static clientsRegistry=new Set;static flush=jo(()=>{document.documentElement.style.setProperty(Si,`${window.innerHeight}px`)},100);static registerClient(e){0===t.clientsRegistry.size&&t.attachTracker(),t.clientsRegistry.add(e)}static unregisterClient(e){t.clientsRegistry.delete(e),0===t.clientsRegistry.size&&t.detachTracker()}static attachTracker(){window.addEventListener("resize",t.flush,{passive:!0,capture:!0}),t.flush()}static detachTracker(){window.removeEventListener("resize",t.flush,{capture:!0}),document.documentElement.style.removeProperty(Si)}},$i=t=>({"*currentActivity":null,"*currentActivityParams":{},"*history":[],"*historyBack":null,"*closeModal":()=>{t.modalManager?.close(t.$["*currentActivity"]),t.set$({"*currentActivity":null})}}),Oi=t=>({...$i(t),"*commonProgress":0,"*uploadList":[],"*uploadQueue":new Xr(1),"*collectionErrors":[],"*collectionState":null,"*groupInfo":null,"*uploadTrigger":new Set,"*secureUploadsManager":null}),Li={"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’ve chosen {{total}} {{plural:file(total)}}. At least {{min}} {{plural:file(min)}} required.","files-count-limit-error-too-many":"You’ve 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"},Ri=new Map,Ui=new Map,Pi=(t,e)=>{Ri.has(t)&&console.log(`Locale ${t} is already defined. Overwriting...`),Ri.set(t,{...Li,...e})},Ni=(t,e)=>{"function"==typeof e?((t,e)=>{Ui.set(t,e)})(t,e):Pi(t,e)};Ni("en",Li);var Di=t=>`*l10n/${t}`,zi=class{_blockInstance=null;_localeName="";_callbacks=new Set;_boundBlocks=new Map;constructor(t){this._blockInstance=t;for(const[t,e]of Object.entries(Li)){const r=!this._blockInstance.has(Di(t))||!this._blockInstance.$[Di(t)];this._blockInstance.add(Di(t),e,r)}setTimeout(()=>{t.subConfigValue("localeName",async t=>{if(!this._blockInstance||!t)return;this._localeName=t;const e=await(async t=>{if(!Ri.has(t)){if(!Ui.has(t))throw new Error(`Locale ${t} is not defined`);const e=Ui.get(t),r=await e();Pi(t,r)}return Ri.get(t)})(t);if("en"!==t&&this._localeName!==t)return;const r=this._blockInstance.cfg.localeDefinitionOverride?.[t];for(const[t,o]of Object.entries(e)){const e=r?.[t];this._blockInstance.add(Di(t),e??o,!0);for(const t of this._callbacks)t()}}),t.subConfigValue("localeDefinitionOverride",t=>{if(!t)return;const e=t[this._localeName];if(e)for(const[t,r]of Object.entries(e)){this._blockInstance?.add(Di(t),r,!0);for(const t of this._callbacks)t()}})})}onLocaleChange(t){const e=jo(t,0);return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}bindL10n(t,e,r){t.$[e]=r(),this._boundBlocks.has(t)||this._boundBlocks.set(t,new Map),this._boundBlocks.get(t)?.get(e)?.();const o=this.onLocaleChange(()=>{t.$[e]=r()});this._boundBlocks.get(t)?.set(e,o)}destroyL10nBindings(t){const e=this._boundBlocks.get(t);if(e){for(const t of e.values())t();this._boundBlocks.delete(t)}}destroy(){this._callbacks.clear()}};function Fi(t,e){[...t.querySelectorAll("[l10n]")].forEach(t=>{const r=t.getAttribute("l10n");if(!r)return;const o=r.split(";");for(const r of o)r&&Vi(t,r,e)})}var Vi=(t,e,r)=>{let o="textContent",i=!1;if(e.includes(":")){const t=e.split(":");if(2!==t.length)return void console.warn(`l10n attribute value should be in format "property:key" or "key". Found: ${e}`);const r=t;o=r[0],e=r[1],o.startsWith("@")&&(o=o.slice(1),i=!0)}const n=e;r.has(n)&&r.sub(n,e=>{if(!e)return;r.l10nProcessorSubs.has(n)||r.l10nProcessorSubs.set(n,new Set);const i=r.l10nProcessorSubs.get(n);i?.forEach(t=>{t.remove(),i.delete(t),r.allSubs.delete(t)});const a=Di(e).replace("*","");r.nodeCtx.has(a)||r.nodeCtx.add(a,e);const s=r.nodeCtx.sub(a,()=>{t[o]=r.l10n(e)});i?.add(s),r.allSubs.add(s),t.removeAttribute("l10n")});const a=Di(e);r.has(a)||r.add(a,""),r.sub(a,()=>{i?t.setAttribute(o,r.l10n(e)):t[o]=r.l10n(e)}),t.removeAttribute("l10n")},Bi=class{_listeners=new Map;_scope=[];addEventListener(t,e){const r=t=>{const r=t.target;r instanceof Node&&this._scope.some(t=>t===r||t.contains(r))&&e(t)};this._listeners.set(e,r),window.addEventListener(t,r)}removeEventListener(t,e){const r=this._listeners.get(e);r&&window.removeEventListener(t,r),this._listeners.delete(e)}get CustomEvent(){return window.CustomEvent}get document(){return window.document}get navigator(){return window.navigator}registerScope(t){this._scope.push(t)}destroy(){this._scope=[];for(const t of this._listeners.values())window.removeEventListener("keydown",t),window.removeEventListener("keyup",t);this._listeners.clear()}},ji=class{_destroyKeyUX;_scopedWindow;constructor(){this._scopedWindow=new Bi,this._destroyKeyUX=function(t,e){let r=e.map(e=>e(t));return()=>{r.forEach(t=>t())}}(this._scopedWindow,[to(),eo("is-pressed"),ro(),t=>{let e,r;function o(t){if("true"===t.target.getAttribute("aria-hidden")){e=t.target,e.setAttribute("aria-hidden","false"),r=e.hidden,r&&(e.hidden=!1);let o=t.target.querySelector('a, button, select, textarea, input:not([type=radio]), [type=radio]:checked, [tabindex]:not([tabindex="-1"])');o&&(o.tabIndex=0)}}function i(t){!e||!e.contains(t.target)||t.relatedTarget&&e.contains(t.relatedTarget)||(t.target.tabIndex=-1,e.setAttribute("aria-hidden","true"),r&&(e.hidden=!0),e=null)}return t.addEventListener("keyuxJump",o),t.addEventListener("focusout",i),()=>{t.removeEventListener("keyuxJump",o),t.removeEventListener("focusout",i)}}])}registerBlock(t){this._scopedWindow.registerScope(t)}destroy(){this._destroyKeyUX?.(),this._scopedWindow.destroy()}},Hi=Object.freeze({ADD:"modal:add",DELETE:"modal:delete",OPEN:"modal:open",CLOSE:"modal:close",CLOSE_ALL:"modal:closeAll",DESTROY:"modal:destroy"}),qi=class{_modals=new Map;_activeModals=new Set;_subscribers=new Map;_block;constructor(t){this._block=t}_debugPrint(...t){this._block.debugPrint("[modal-manager]",...t)}registerModal(t,e){this._modals.set(t,e),this._notify(Hi.ADD,{id:t,modal:e})}deleteModal(t){if(!this._modals.has(t))return!1;const e=this._modals.get(t);return this._modals.delete(t),this._activeModals.delete(t),this._notify(Hi.DELETE,{id:t,modal:e}),!0}open(t){if(!this._modals.has(t))return this._debugPrint(`Modal with ID "${t}" not found`),!1;const e=this._modals.get(t);return this._activeModals.add(t),this._notify(Hi.OPEN,{modal:e,id:t}),!0}close(t){if(!this._modals.has(t)||!this._activeModals.has(t))return this._debugPrint(`Modal with ID "${t}" not found or not active`),!1;const e=this._modals.get(t);return this._activeModals.delete(t),this._notify(Hi.CLOSE,{id:t,modal:e}),!0}toggle(t){return this._modals.has(t)?this._activeModals.has(t)?this.close(t):this.open(t):(this._debugPrint(`Modal with ID "${t}" not found`),!1)}get hasActiveModals(){return this._activeModals.size>0}back(){if(0===this._activeModals.size)return this._debugPrint("No active modals to go back from"),!1;const t=Array.from(this._activeModals).pop();return!!t&&this.close(t)}closeAll(){const t=this._activeModals.size;return this._activeModals.clear(),this._notify(Hi.CLOSE_ALL,{}),t}subscribe(t,e){return this._subscribers.has(t)||this._subscribers.set(t,new Set),this._subscribers.get(t)?.add(e),()=>this.unsubscribe(t,e)}unsubscribe(t,e){this._subscribers.has(t)&&this._subscribers.get(t)?.delete(e)}_notify(t,e){if(this._subscribers.has(t))for(const r of this._subscribers.get(t)??new Set)try{r(e)}catch(t){this._block.telemetryManager.sendEventError(t,"modal subscriber"),this._debugPrint("Error in modal subscriber:",t)}}destroy(){this.closeAll(),this._modals.clear(),this._subscribers.clear(),this._notify(Hi.DESTROY,{})}},Ki="blocks",Gi="1.24.5",Wi=class{_sessionId=crypto.randomUUID();_telemetryInstance;_block;_config=structuredClone(ki);_initialized=!1;_lastPayload=null;_queue;constructor(t){this._block=t,this._telemetryInstance=new ao,this._queue=new Xr(10);for(const t of Object.keys(this._config))this._block.subConfigValue(t,e=>{this._initialized&&this._config[t]!==e&&this.sendEvent({eventType:Fo.CHANGE_CONFIG}),this._setConfig(t,e)})}_init(t){t!==Fo.INIT_SOLUTION||this._initialized||(this._initialized=!0)}_setConfig(t,e){this._config[t]!==e&&(this._config[t]=e)}_formattingPayload(t){const e=t.payload?{...t.payload}:{};e.activity&&(e.activity=void 0);const r={...t};return t.eventType!==Fo.INIT_SOLUTION&&t.eventType!==Fo.CHANGE_CONFIG||(r.config=this._config),{...r,appVersion:Gi,appName:Ki,sessionId:this._sessionId,component:this._solution,activity:this._activity,projectPubkey:this._config.pubkey,userAgent:navigator.userAgent,eventType:r.eventType??"",eventTimestamp:this._timestamp,payload:{location:this._location,...e}}}_excludedEvents(t){return!(!t||![Vo.CHANGE,Vo.COMMON_UPLOAD_PROGRESS,Vo.FILE_ADDED,Vo.FILE_REMOVED,Vo.FILE_UPLOAD_START,Vo.FILE_UPLOAD_PROGRESS,Vo.FILE_UPLOAD_SUCCESS,Vo.FILE_UPLOAD_FAILED].includes(t))}sendEvent(t){const e=this._formattingPayload({eventType:t.eventType,payload:t.payload,config:t.config});this._init(t.eventType);if(this._excludedEvents(t.eventType))return;this._lastPayload&&this._checkObj(this._lastPayload,e)||this._queue.add(async()=>{this._lastPayload=e,await this._telemetryInstance.sendEvent(e)})}sendEventError(t,e="unknown"){this.sendEvent({eventType:Fo.ERROR_EVENT,payload:{metadata:{event:"error",text:`Error in ${e}`,error:t.message}}})}sendEventCloudImageEditor(t,e,r={}){this.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{tabId:e,node:t.currentTarget?.tagName,event:t.type,...r}}})}_checkObj(t,e){if(JSON.stringify(t)===JSON.stringify(e))return!0;if("object"!=typeof t||"object"!=typeof e||null==t||null==e)return!1;const r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(const o of r){if(!Object.hasOwn(e,o))return!1;if(!this._checkObj(t[o],e[o]))return!1}return!0}get _timestamp(){return Date.now()}get _solution(){if(!this._block.has("*solution"))return null;const t=this._block.$["*solution"];return t?t.toLowerCase():null}get _activity(){return this._block.has("*currentActivity")?this._block.$["*currentActivity"]??null:null}get _location(){return location.origin}},Xi=t=>`*cfg/${t}`;function Zi(t,e){const r=t.querySelectorAll("[data-testid]");if(0===r.length)return;const o=new WeakMap;for(const t of r){const e=t.getAttribute("data-testid");e&&o.set(t,e)}e.subConfigValue("testMode",t=>{if(!t){for(const t of r)t.removeAttribute("data-testid");return}const i=e.testId;for(const t of r){const e=o.get(t);e&&t.setAttribute("data-testid",`${i}--${e}`)}})}var Yi=class extends Ne{__cfgProxy;l10nProcessorSubs=new Map;static StateConsumerScope=null;static styleAttrs=[];requireCtxName=!1;activityType=null;init$={};l10n(t,e={}){if(!t)return"";const r=this.$[Di(t)]||t,o=function(t){const e=[];let r=t.indexOf(Ei);for(;-1!==r;){const o=t.indexOf(Ti,r);if(-1===o)break;const i=t.substring(r+2,o);if(i.startsWith(Ai)){const n=t.substring(r+2,o).replace(Ai,""),a=n.substring(0,n.indexOf("(")),s=n.substring(n.indexOf("(")+1,n.indexOf(")"));e.push({variable:i,pluralKey:a,countVariable:s})}r=t.indexOf(Ei,o)}return e}(r);for(const t of o)e[t.variable]=this.pluralize(t.pluralKey,Number(e[t.countVariable]));return Ii(r,e)}pluralize(t,e){const r=this.l10n("locale-id")||"en",o=xi(r,e);return this.l10n(`${t}__${o}`)}bindL10n(t,e){this.localeManager?.bindL10n(this,t,e)}constructor(){super(),this.addTemplateProcessor(Fi),this.addTemplateProcessor(Zi)}emit(t,e,r){const o=this.has("*eventEmitter")?this.$["*eventEmitter"]:void 0;o&&(o.emit(t,e,r),this.telemetryManager.sendEvent({eventType:t,payload:"function"==typeof e?e():e}))}hasBlockInCtx(t){for(const e of this.blocksRegistry)if(t(e))return!0;return!1}setOrAddState(t,e){this.add$({[t]:e},!0)}connectedCallback(){this.constructor.styleAttrs.forEach(t=>{this.setAttribute(t,"")}),this.hasAttribute("retpl")&&(this.constructor.template=null,this.processInnerHtml=!0),this.requireCtxName?(({element:t,attribute:e,onSuccess:r,onTimeout:o,timeout:i=300})=>{const n=t.getAttribute(e);if(null!==n)return void r(n);const a=new MutationObserver(t=>{const e=t[t.length-1];e&&c(e)});a.observe(t,{attributes:!0,attributeFilter:[e]});const s=window.setTimeout(()=>{a.disconnect(),o()},i),c=o=>{const i=t.getAttribute(e);"attributes"===o.type&&o.attributeName===e&&null!==i&&(window.clearTimeout(s),a.disconnect(),r(i))}})({element:this,attribute:"ctx-name",onSuccess:()=>{super.connectedCallback()},onTimeout:()=>{console.error("Attribute `ctx-name` is required and it is not set.")}}):super.connectedCallback(),Mi.registerClient(this)}disconnectedCallback(){super.disconnectedCallback(),Mi.unregisterClient(this)}initCallback(){this.has("*blocksRegistry")||this.add("*blocksRegistry",new Set);this.$["*blocksRegistry"].add(this),this.has("*eventEmitter")||this.add("*eventEmitter",new Bo(this.debugPrint.bind(this))),this.has("*localeManager")||this.add("*localeManager",new zi(this)),this.cfg.qualityInsights&&!this.has("*telemetryManager")&&this.add("*telemetryManager",new Wi(this)),this.has("*a11y")||this.add("*a11y",new ji),this.has("*modalManager")||this.add("*modalManager",new qi(this)),this.sub(Di("locale-id"),t=>{const e=(t=>{const e=new Intl.Locale(t);let r="ltr";const o=e.getTextInfo?.().direction;return o?r=o:e.textInfo?.direction&&(r=e.textInfo.direction),r})(t);this.style.direction="ltr"===e?"":e}),this.subConfigValue("testMode",t=>{t&&this.testId?this.setAttribute("data-testid",this.testId):this.removeAttribute("data-testid")})}get testId(){return window.customElements.getName(this.constructor)}get modalManager(){return this.has("*modalManager")?this.$["*modalManager"]:void 0}get telemetryManager(){return this.cfg.qualityInsights?this.has("*telemetryManager")&&this.$["*telemetryManager"]:{sendEvent:()=>{},sendEventCloudImageEditor:()=>{},sendEventError:()=>{}}}get localeManager(){return this.has("*localeManager")?this.$["*localeManager"]:null}get a11y(){return this.has("*a11y")?this.$["*a11y"]:null}get blocksRegistry(){return this.$["*blocksRegistry"]}destroyCallback(){super.destroyCallback();const t=this.blocksRegistry;t?.delete(this),this.localeManager?.destroyL10nBindings(this),this.l10nProcessorSubs=new Map,we.deleteCtx(this),0===t?.size&&setTimeout(()=>{this.destroyCtxCallback()},0)}destroyCtxCallback(){we.deleteCtx(this.ctxName),this.localeManager?.destroy(),this.modalManager?.destroy()}async proxyUrl(t){if(this.cfg.secureDeliveryProxy&&this.cfg.secureDeliveryProxyUrlResolver&&console.warn("Both secureDeliveryProxy and secureDeliveryProxyUrlResolver are set. The secureDeliveryProxyUrlResolver will be used."),this.cfg.secureDeliveryProxyUrlResolver)try{return await this.cfg.secureDeliveryProxyUrlResolver(t,{uuid:Zo(t),cdnUrlModifiers:Yo(t),fileName:Xo(t)})}catch(e){return console.error("Failed to resolve secure delivery proxy URL. Falling back to the default URL.",e),this.telemetryManager.sendEventError(e,"secureDeliveryProxyUrlResolver. Failed to resolve secure delivery proxy URL. Falling back to the default URL."),t}return this.cfg.secureDeliveryProxy?Ii(this.cfg.secureDeliveryProxy,{previewUrl:t},{transform:t=>window.encodeURIComponent(t)}):t}get cfg(){if(!this.__cfgProxy){const t=Object.create(null);this.__cfgProxy=new Proxy(t,{set:(t,e,r)=>{if("string"!=typeof e)return!1;const o=Xi(e);return this.has(o)||this.add(o,ki[e]),this.$[o]=r,!0},get:(t,e)=>{const r=Xi(e);return this.has(r)||this.add(r,ki[e]),this.$[Xi(e)]}})}return this.__cfgProxy}subConfigValue(t,e){const r=Xi(t);this.has(r)||this.add(r,ki[t]),this.sub(r,e)}debugPrint(...t){if(!this.cfg.debug)return;let e=t;if("function"==typeof t?.[0]){e=(0,t[0])()}console.log(`[${this.ctxName}]`,...e)}static reg(t){t?t.startsWith("uc-")&&super.reg(t):super.reg()}},Ji="active",Qi="___ACTIVITY_IS_ACTIVE___",tn=class t extends Yi{historyTracked=!1;[Qi];init$=$i(this);_debouncedHistoryFlush=jo(this._historyFlush.bind(this),10);_deactivate(){const e=t._activityCallbacks.get(this);this[Qi]=!1,this.removeAttribute(Ji),e?.deactivateCallback?.()}_activate(){const e=t._activityCallbacks.get(this);this.$["*historyBack"]=this.historyBack.bind(this),this[Qi]=!0,this.setAttribute(Ji,""),e?.activateCallback?.(),this._debouncedHistoryFlush(),this.emit(Vo.ACTIVITY_CHANGE,{activity:this.activityType})}initCallback(){super.initCallback(),this.activityType&&(this.hasAttribute("activity")||this.setAttribute("activity",this.activityType),this.sub("*currentActivity",t=>{try{this.activityType!==t&&this[Qi]?this._deactivate():this.activityType!==t||this[Qi]||this._activate()}catch(t){this.telemetryManager.sendEventError(t,`activity "${this.activityType}"`),console.error(`Error in activity "${this.activityType}". `,t),this.$["*currentActivity"]=this.$["*history"][this.$["*history"].length-1]??null}t||(this.$["*history"]=[])}))}_historyFlush(){let t=this.$["*history"];t&&(t.length>10&&(t=t.slice(t.length-11,t.length-1)),this.historyTracked&&t[t.length-1]!==this.activityType&&t.push(this.activityType),this.$["*history"]=t)}_isActivityRegistered(){return!!this.activityType&&t._activityCallbacks.has(this)}static _activityCallbacks=new Map;static activities;get isActivityActive(){return!!this[Qi]}get couldOpenActivity(){return!0}registerActivity(e,r={}){const{onActivate:o,onDeactivate:i}=r;t._activityCallbacks.set(this,{activateCallback:o,deactivateCallback:i})}unregisterActivity(){this.isActivityActive&&this._deactivate(),t._activityCallbacks.delete(this)}destroyCallback(){super.destroyCallback(),this._isActivityRegistered()&&this.unregisterActivity();const e=this.$["*currentActivity"];!![...this.blocksRegistry].find(r=>r instanceof t&&r.activityType===e)||(this.$["*currentActivity"]=null,this.modalManager?.closeAll())}get activityKey(){return this.ctxName+this.activityType}get activityParams(){return this.$["*currentActivityParams"]}get initActivity(){return this.getCssData("--cfg-init-activity")}get doneActivity(){return this.getCssData("--cfg-done-activity")}historyBack(){const t=this.$["*history"];if(t){let e=t.pop();for(;e===this.activityType;)e=t.pop();let r=!!e;if(e){const t=[...this.blocksRegistry].find(t=>t.activityType===e);r=t?.couldOpenActivity??!1}e=r?e:void 0,e&&this.modalManager?.open(e),this.$["*currentActivity"]=e,this.$["*history"]=t,e||this.modalManager?.closeAll()}}};function en(t){for(const e in t){let r=[...e].reduce((t,e)=>(e.toUpperCase()===e&&(e=`-${e.toLowerCase()}`),t+=e),"");r.startsWith("-")&&(r=r.replace("-","")),r.startsWith("uc-")||(r=`uc-${r}`),t[e].reg&&t[e].reg(r)}}tn.activities=Object.freeze({START_FROM:"start-from",CAMERA:"camera",DRAW:"draw",UPLOAD_LIST:"upload-list",URL:"url",CLOUD_IMG_EDIT:"cloud-image-edit",EXTERNAL:"external"});var rn="UC";function on(t,e=!1){return new Promise((r,o)=>{if("object"!=typeof document)return void r(null);if("object"==typeof window&&window[rn])return void r(window[rn]);const i=document.createElement("script");i.async=!0,i.src=t,i.onerror=()=>{o()},i.onload=()=>{const t=window[rn];e&&en(t),r(t)},document.head.appendChild(i)})}var nn=class extends Yi{static styleAttrs=["uc-wgt-common"];requireCtxName=!0;init$=(t=>({...Oi(t),"*solution":null}))(this);static _template="";initCallback(){super.initCallback(),this.a11y?.registerBlock(this)}static set template(t){this._template="<svg width='0' height='0' style='position:absolute'><symbol viewBox='0 0 24 24' id='uc-icon-about' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M11.152 14.12v.1h1.523v-.1c.007-.409.053-.752.138-1.028.086-.277.22-.517.405-.72.188-.202.434-.397.735-.586.32-.191.593-.412.82-.66.232-.249.41-.531.533-.847.125-.32.187-.678.187-1.076 0-.579-.137-1.085-.41-1.518a2.717 2.717 0 0 0-1.14-1.018c-.49-.245-1.062-.367-1.715-.367-.597 0-1.142.114-1.636.34-.49.228-.884.564-1.182 1.008-.299.44-.46.98-.485 1.619h1.62c.024-.377.118-.684.282-.922a1.48 1.48 0 0 1 .617-.532c.25-.114.51-.17.784-.17.301 0 .575.063.82.191.248.124.447.302.597.533.149.23.223.504.223.82 0 .263-.05.502-.149.72a1.91 1.91 0 0 1-.405.574 3.48 3.48 0 0 1-.575.453 4.22 4.22 0 0 0-.847.66c-.234.242-.415.558-.543.949-.125.39-.19.916-.197 1.577Zm.053 3.03c.21.206.46.31.75.31.196 0 .374-.049.534-.144a1.1 1.1 0 0 0 .383-.384c.1-.163.15-.343.15-.538a1 1 0 0 0-.32-.746 1.019 1.019 0 0 0-.746-.314c-.291 0-.542.105-.751.314-.21.206-.314.455-.314.746 0 .295.104.547.314.756ZM24 12c0 6.627-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0s12 5.373 12 12Zm-1.5 0c0 5.799-4.701 10.5-10.5 10.5S1.5 17.799 1.5 12 6.201 1.5 12 1.5 22.5 6.201 22.5 12Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-add' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M12.75 21a.75.75 0 0 1-1.5 0v-8.25H3a.75.75 0 0 1 0-1.5h8.25V3a.75.75 0 0 1 1.5 0v8.25H21a.75.75 0 0 1 0 1.5h-8.25V21Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-arrow-down' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M11.5 23.03a.75.75 0 0 0 .999 0l9.29-8.276a.75.75 0 0 0-.998-1.12l-8.042 7.164V1.53a.75.75 0 0 0-1.5 0v19.267l-8.04-7.163a.75.75 0 0 0-.998 1.12z'/></symbol><symbol fill='none' viewBox='0 0 9 6' id='uc-icon-arrow-dropdown' xmlns='http://www.w3.org/2000/svg'><path stroke='currentColor' d='m1.5 1.667 3 2.666 3-2.666' opacity='.5'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-aspect-ratio' xmlns='http://www.w3.org/2000/svg'><path stroke='currentColor' d='M7.395 22.5H2.454v-5.25m14.824 5.25h4.94v-5.25m0-10.5V1.5h-4.94m-9.883 0H2.454v5.25'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-back' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M20.251 12a.75.75 0 0 1-.75.75H6.067l5.72 5.85a.75.75 0 1 1-1.072 1.05L4.136 12.92a1.292 1.292 0 0 1 0-1.842l6.579-6.728a.75.75 0 1 1 1.072 1.048l-5.72 5.851H19.5a.75.75 0 0 1 .75.75Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-badge-error' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M13.6 18.4a1.6 1.6 0 1 1-3.2 0 1.6 1.6 0 0 1 3.2 0zM12 4.5A1.5 1.5 0 0 1 13.5 6v7a1.5 1.5 0 0 1-3 0V6A1.5 1.5 0 0 1 12 4.5z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-badge-success' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='m10.5 18.204 7.6-8.183a1.5 1.5 0 0 0-2.2-2.042l-5.4 5.817-2.4-2.586a1.5 1.5 0 1 0-2.2 2.041l4.6 4.953Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-box' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M1.01 4.148a.75.75 0 0 1 .75.75v4.348a4.437 4.437 0 0 1 2.988-1.153c1.734 0 3.23.992 3.978 2.438a4.478 4.478 0 0 1 3.978-2.438c2.49 0 4.488 2.044 4.488 4.543 0 2.5-1.999 4.544-4.488 4.544a4.478 4.478 0 0 1-3.978-2.438 4.478 4.478 0 0 1-3.978 2.438C2.26 17.18.26 15.135.26 12.636V4.898a.75.75 0 0 1 .75-.75Zm.75 8.488c0 1.692 1.348 3.044 2.988 3.044s2.989-1.352 2.989-3.044c0-1.691-1.349-3.043-2.989-3.043S1.76 10.945 1.76 12.636Zm10.944-3.043c-1.64 0-2.988 1.352-2.988 3.043 0 1.692 1.348 3.044 2.988 3.044s2.988-1.352 2.988-3.044c0-1.69-1.348-3.043-2.988-3.043Zm4.328-1.23a.75.75 0 0 1 1.052.128l2.333 2.983 2.333-2.983a.75.75 0 0 1 1.181.924l-2.562 3.277 2.562 3.276a.75.75 0 1 1-1.181.924l-2.333-2.983-2.333 2.983a.75.75 0 1 1-1.181-.924l2.562-3.276-2.562-3.277a.75.75 0 0 1 .129-1.052Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-camera' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M7.65 2.55a.75.75 0 0 1 .6-.3h7.5a.75.75 0 0 1 .6.3l2.025 2.7H21a3 3 0 0 1 3 3v10.5a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V8.25a3 3 0 0 1 3-3h2.625zm.975 1.2L6.6 6.45a.75.75 0 0 1-.6.3H3a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h18a1.5 1.5 0 0 0 1.5-1.5V8.25a1.5 1.5 0 0 0-1.5-1.5h-3a.75.75 0 0 1-.6-.3l-2.025-2.7zm3.375 6a3.375 3.375 0 1 0 0 6.75 3.375 3.375 0 0 0 0-6.75zm-4.875 3.375a4.875 4.875 0 1 1 9.75 0 4.875 4.875 0 0 1-9.75 0z'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-camera-full' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' clip-rule='evenodd' d='M2 4.667a2 2 0 0 0-2 2V16a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6.667a2 2 0 0 0-2-2h-2.667l-2-2.667H6.667l-2 2.667H2Zm8 10a3.667 3.667 0 1 0 0-7.334 3.667 3.667 0 0 0 0 7.334Z' fill='currentColor'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-close' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M4.604 4.604a.75.75 0 0 1 1.06 0L12 10.939l6.335-6.335a.75.75 0 1 1 1.061 1.06L13.061 12l6.335 6.335a.75.75 0 1 1-1.06 1.061L12 13.061l-6.335 6.335a.75.75 0 0 1-1.061-1.06L10.939 12 4.604 5.665a.75.75 0 0 1 0-1.061z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-collapse' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M3.116 12a.75.75 0 0 1 .75-.75h16.268a.75.75 0 0 1 0 1.5H3.866a.75.75 0 0 1-.75-.75Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-default' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M11.501.392a.75.75 0 0 1 .998 0l6.704 5.972a.75.75 0 0 1-.998 1.12l-5.455-4.86v13.439a.75.75 0 0 1-1.5 0V2.625l-5.454 4.86a.75.75 0 1 1-.998-1.12zM.857 16.73a.75.75 0 0 1 .75.75v4.914h20.786v-4.914a.75.75 0 0 1 1.5 0v5.664a.75.75 0 0 1-.75.75H.857a.75.75 0 0 1-.75-.75v-5.664a.75.75 0 0 1 .75-.75z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-dropbox' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M6.019 1.92a.75.75 0 0 1 .806 0L12 5.219l5.176-3.297a.75.75 0 0 1 .806 0l5.577 3.553a.75.75 0 0 1 0 1.265l-4.574 2.914 4.574 2.914a.75.75 0 0 1 0 1.265l-5.577 3.554a.75.75 0 0 1-.806 0L12 14.089l-5.175 3.297a.75.75 0 0 1-.806 0L.44 13.833a.75.75 0 0 1 0-1.266l4.575-2.914L.44 6.74a.75.75 0 0 1 0-1.265zm.403 8.616L2.24 13.2l4.182 2.664 4.181-2.664zm6.975 2.664 4.182 2.664L21.76 13.2l-4.181-2.664zm2.776-3.547L12 12.311 7.828 9.653 12 6.995zm1.406-.882 4.181-2.664-4.181-2.664-4.182 2.664zm-6.976-2.664L6.422 3.443 2.24 6.107 6.422 8.77zM5.791 18.544a.75.75 0 0 1 1.035-.23l5.175 3.297 5.175-3.297a.75.75 0 1 1 .806 1.265l-5.578 3.554a.75.75 0 0 1-.806 0L6.02 19.579a.75.75 0 0 1-.23-1.035z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-edit-file' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M18.558 2.804a.78.78 0 0 0-.557.235l-.008.007-2.472 2.46 3.847 3.848 2.46-2.473.004-.003a.78.78 0 0 0 0-1.108l-.004-.003-2.712-2.728a.78.78 0 0 0-.558-.235Zm-.248 7.613-3.852-3.852-8.93 8.887-1.516 5.41 5.41-1.515 8.888-8.93Zm-.636-8.934a2.28 2.28 0 0 1 2.512.505l2.702 2.717.002.002a2.278 2.278 0 0 1 0 3.234l-.002.002-12.541 12.602a.75.75 0 0 1-.33.193l-6.884 1.928a.75.75 0 0 1-.925-.924l1.928-6.885a.75.75 0 0 1 .193-.33l12.603-12.54a2.28 2.28 0 0 1 .742-.504Z' clip-rule='evenodd'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-error' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M13 13h-2V7h2m0 10h-2v-2h2M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-evernote' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M9.804 2.27v-.048c.055-.263.313-.562.85-.562h.44c.142 0 .325.014.526.033.066.009.124.023.267.06l.13.032h.002c.319.079.515.275.644.482a1.461 1.461 0 0 1 .16.356l.004.012a.75.75 0 0 0 .603.577l1.191.207a1988.512 1988.512 0 0 0 2.332.402c.512.083 1.1.178 1.665.442.64.3 1.19.795 1.376 1.77.548 2.931.657 5.829.621 8a39.233 39.233 0 0 1-.125 2.602 17.518 17.518 0 0 1-.092.849.735.735 0 0 0-.024.112c-.378 2.705-1.269 3.796-2.04 4.27-.746.457-1.53.451-2.217.447h-.192c-.46 0-1.073-.23-1.581-.635-.518-.412-.763-.87-.763-1.217 0-.45.188-.688.355-.786.161-.095.436-.137.796.087a.75.75 0 1 0 .792-1.274c-.766-.476-1.64-.52-2.345-.108-.7.409-1.098 1.188-1.098 2.08 0 .996.634 1.84 1.329 2.392.704.56 1.638.96 2.515.96l.185.002c.667.009 1.874.025 3.007-.67 1.283-.786 2.314-2.358 2.733-5.276a4.213 4.213 0 0 0 .056-.335c.023-.184.051-.445.079-.772.055-.655.111-1.585.13-2.704.037-2.234-.074-5.239-.647-8.301v-.002c-.294-1.544-1.233-2.391-2.215-2.85-.777-.363-1.623-.496-2.129-.576a8.872 8.872 0 0 1-.25-.041l-.006-.001-1.99-.345-.761-.132a2.93 2.93 0 0 0-.182-.338A2.532 2.532 0 0 0 12.379.329l-.091-.023a3.967 3.967 0 0 0-.493-.103L11.769.2a7.846 7.846 0 0 0-.675-.04h-.44c-.733 0-1.368.284-1.795.742L2.416 7.431c-.468.428-.751 1.071-.751 1.81 0 .02 0 .041.003.062l.003.034c.017.21.038.468.096.796.107.715.275 1.47.391 1.994.029.13.055.245.075.342l.002.008c.258 1.141.641 1.94.978 2.466.168.263.323.456.444.589a2.808 2.808 0 0 0 .192.194c1.536 1.562 3.713 2.196 5.731 2.08.13-.005.35-.032.537-.073a2.627 2.627 0 0 0 .652-.24c.425-.26.75-.661.992-1.046.184-.294.342-.61.473-.915a3.8 3.8 0 0 0 .627.493 5.022 5.022 0 0 0 1.97.709l.023.002.018.003.11.016c.088.014.205.035.325.058l.056.014c.088.022.164.04.235.061a1.736 1.736 0 0 1 .145.048l.03.014c.765.34 1.302 1.09 1.302 1.871a.75.75 0 0 0 1.5 0c0-1.456-.964-2.69-2.18-3.235a3.595 3.595 0 0 0-.679-.217l-.063-.015a10.616 10.616 0 0 0-.606-.105l-.02-.003-.03-.003h-.002a3.542 3.542 0 0 1-1.331-.485c-.471-.298-.788-.692-.828-1.234a.75.75 0 0 0-1.48-.106l-.001.003-.004.017a8.23 8.23 0 0 1-.092.352 9.963 9.963 0 0 1-.298.892c-.132.34-.29.68-.47.966-.174.276-.339.454-.478.549a1.178 1.178 0 0 1-.221.072 1.949 1.949 0 0 1-.241.036h-.013l-.032.002c-1.684.1-3.423-.437-4.604-1.65a.746.746 0 0 0-.053-.05L4.84 14.6a1.348 1.348 0 0 1-.07-.073 2.99 2.99 0 0 1-.293-.392c-.242-.379-.558-1.014-.778-1.985a54.1 54.1 0 0 0-.083-.376 27.494 27.494 0 0 1-.367-1.872l-.003-.02a6.791 6.791 0 0 1-.08-.67c.004-.277.086-.475.2-.609l.067-.067a.63.63 0 0 1 .292-.145h.05c.18 0 1.095.055 2.013.115l1.207.08.534.037a.747.747 0 0 0 .052.002c.782 0 1.349-.206 1.759-.585l.005-.005c.553-.52.622-1.225.622-1.76V6.24l-.026-.565A774.97 774.97 0 0 1 9.885 4.4c-.042-.961-.081-1.939-.081-2.13ZM4.995 6.953a251.126 251.126 0 0 1 2.102.137l.508.035c.48-.004.646-.122.715-.185.07-.068.146-.209.147-.649l-.024-.548a791.69 791.69 0 0 1-.095-2.187L4.995 6.953Zm16.122 9.996Zm-5.479-5.323a.75.75 0 0 0 1.014.31 2.04 2.04 0 0 1 .304-.089 1.84 1.84 0 0 1 .544-.039c.215.023.321.06.37.085.033.016.039.026.047.04a.75.75 0 0 0 1.289-.767c-.337-.567-.906-.783-1.552-.85a3.334 3.334 0 0 0-1.002.062c-.27.056-.531.14-.705.234a.75.75 0 0 0-.31 1.014Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-expand' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='m12 8.337-8.47 8.47a.75.75 0 0 1-1.06-1.06l8.605-8.606a1.29 1.29 0 0 1 1.85 0l8.605 8.605a.75.75 0 1 1-1.06 1.06L12 8.338Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-external-source-placeholder' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M6.341 3.27a10.5 10.5 0 0 1 5.834-1.77.75.75 0 0 0 0-1.5 12 12 0 1 0 12 12 .75.75 0 0 0-1.5 0A10.5 10.5 0 1 1 6.34 3.27Zm14.145 1.48a.75.75 0 1 0-1.06-1.062L9.925 13.19V7.95a.75.75 0 1 0-1.5 0V15c0 .414.336.75.75.75h7.05a.75.75 0 0 0 0-1.5h-5.24l9.501-9.5Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-facebook' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M12 1.5C6.201 1.5 1.5 6.201 1.5 12c0 4.943 3.416 9.089 8.016 10.204v-6.108H7.383a.75.75 0 0 1-.75-.75v-3.281a.75.75 0 0 1 .75-.75h2.133V9.393c0-.958.225-2.511 1.38-3.65 1.194-1.177 3.174-1.718 6.254-1.056a.75.75 0 0 1 .592.733v2.754a.75.75 0 0 1-.75.75c-.692 0-1.203.026-1.584.082-.387.057-.578.137-.675.202-.109.073-.237.205-.237 1.029v1.078h2.39a.75.75 0 0 1 .742.866l-.516 3.281a.75.75 0 0 1-.74.634h-1.876v6.106C19.09 21.082 22.5 16.939 22.5 12c0-5.799-4.701-10.5-10.5-10.5zM0 12C0 5.373 5.373 0 12 0s12 5.373 12 12c0 5.995-4.395 10.961-10.138 11.856a.75.75 0 0 1-.866-.74v-7.77a.75.75 0 0 1 .75-.75h1.984l.28-1.781h-2.264a.75.75 0 0 1-.75-.75v-1.828c0-.829.089-1.729.9-2.274.363-.244.807-.37 1.293-.441a9.623 9.623 0 0 1 1.053-.086V6.04c-2.41-.405-3.645.132-4.293.771-.737.728-.933 1.793-.933 2.582v2.672a.75.75 0 0 1-.75.75H8.133v1.78h2.133a.75.75 0 0 1 .75.75v7.772a.75.75 0 0 1-.865.741C4.4 22.968 0 18 0 12z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-file' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M2.895 1.201c0-.473.383-.857.857-.857h8.4c.227 0 .445.09.606.251l8.4 8.4c.16.16.25.379.25.606v13.2a.857.857 0 0 1-.856.857h-16.8a.857.857 0 0 1-.857-.857zm1.714.857v19.886h15.085V10.458h-7.542a.857.857 0 0 1-.858-.857V2.058zm8.4 1.213 5.473 5.473H13.01z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-flickr' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M5.959 7.926c-2.298 0-4.14 1.834-4.14 4.073 0 2.241 1.842 4.075 4.14 4.075 2.302 0 4.145-1.834 4.145-4.075 0-2.238-1.843-4.073-4.145-4.073Zm-5.64 4.073c0-3.086 2.533-5.573 5.64-5.573 3.11 0 5.645 2.486 5.645 5.573 0 3.089-2.535 5.575-5.645 5.575-3.107 0-5.64-2.487-5.64-5.575Zm18.07-4.073c-2.301 0-4.144 1.835-4.144 4.073 0 2.24 1.843 4.075 4.145 4.075 2.299 0 4.141-1.834 4.141-4.075 0-2.239-1.842-4.073-4.141-4.073Zm-5.644 4.073c0-3.087 2.535-5.573 5.645-5.573 3.108 0 5.641 2.487 5.641 5.573 0 3.088-2.533 5.575-5.641 5.575-3.11 0-5.645-2.486-5.645-5.575Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-gdrive' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M7.736 1.818a.75.75 0 0 1 .647-.37h7.587a.75.75 0 0 1 .655.383l7.233 12.946a.75.75 0 0 1-.003.737l-3.794 6.66a.75.75 0 0 1-.651.378H4.59a.75.75 0 0 1-.651-.378l-3.794-6.66a.75.75 0 0 1 .005-.75zm.64 1.876L1.663 15.148l2.93 5.145 6.655-11.581zm3.736 6.526-2.398 4.173H14.5zm4.116 4.173h5.697L15.53 2.947H9.677zm5.685 1.5H8.852l-2.966 5.16h13.088z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-gphotos' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M12.51 0c-.702 0-1.272.57-1.272 1.273V7.35A6.381 6.381 0 0 0 0 11.489c0 .703.57 1.273 1.273 1.273H7.35A6.381 6.381 0 0 0 11.488 24c.704 0 1.274-.57 1.274-1.273V16.65A6.381 6.381 0 0 0 24 12.51c0-.703-.57-1.273-1.273-1.273H16.65A6.381 6.381 0 0 0 12.511 0Zm.252 11.232V1.53a4.857 4.857 0 0 1 0 9.702Zm-1.53.006H1.53a4.857 4.857 0 0 1 9.702 0Zm1.536 1.524a4.857 4.857 0 0 0 9.702 0h-9.702Zm-6.136 4.857c0-2.598 2.04-4.72 4.606-4.85v9.7a4.857 4.857 0 0 1-4.606-4.85Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-huddle' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M6.204 2.002c-.252.23-.357.486-.357.67V21.07c0 .15.084.505.313.812.208.28.499.477.929.477.519 0 .796-.174.956-.365.178-.212.286-.535.286-.924v-.013l.117-6.58c.004-1.725 1.419-3.883 3.867-3.883 1.33 0 2.332.581 2.987 1.364.637.762.95 1.717.95 2.526v6.47c0 .392.11.751.305.995.175.22.468.41 1.008.41.52 0 .816-.198 1.002-.437.207-.266.31-.633.31-.969V14.04c0-2.81-1.943-5.108-4.136-5.422a5.971 5.971 0 0 0-3.183.41c-.912.393-1.538.96-1.81 1.489a.75.75 0 0 1-1.417-.344v-7.5c0-.587-.47-1.031-1.242-1.031-.315 0-.638.136-.885.36ZM5.194.892A2.844 2.844 0 0 1 7.09.142c1.328 0 2.742.867 2.742 2.53v5.607a6.358 6.358 0 0 1 1.133-.629 7.47 7.47 0 0 1 3.989-.516c3.056.436 5.425 3.482 5.425 6.906v6.914c0 .602-.177 1.313-.627 1.89-.47.605-1.204 1.016-2.186 1.016-.96 0-1.698-.37-2.179-.973-.46-.575-.633-1.294-.633-1.933v-6.469c0-.456-.19-1.071-.602-1.563-.394-.471-.986-.827-1.836-.827-1.447 0-2.367 1.304-2.367 2.39v.014l-.117 6.58c-.001.64-.177 1.333-.637 1.881-.48.57-1.2.9-2.105.9-.995 0-1.7-.5-2.132-1.081-.41-.552-.61-1.217-.61-1.708V2.672c0-.707.366-1.341.847-1.78Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-info' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M11 9h2V7h-2m1 13c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-18A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2m-1 15h2v-6h-2v6Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-local' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M3 3.75a1.5 1.5 0 0 0-1.5 1.5v13.5a1.5 1.5 0 0 0 1.5 1.5h18a1.5 1.5 0 0 0 1.5-1.5V9A1.5 1.5 0 0 0 21 7.5h-9a.75.75 0 0 1-.643-.364L9.325 3.75zm-3 1.5a3 3 0 0 1 3-3h6.75a.75.75 0 0 1 .643.364L12.425 6H21a3 3 0 0 1 3 3v9.75a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-microphone' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' clip-rule='evenodd' d='M7.5 4.781a4.5 4.5 0 0 1 9 0v6.469a4.5 4.5 0 1 1-9 0V4.781Zm4.5-3a3 3 0 0 0-3 3v6.469a3 3 0 1 0 6 0V4.781a3 3 0 0 0-3-3Zm-8.156 8.11a.75.75 0 0 1 .75.75 7.406 7.406 0 1 0 14.812 0 .75.75 0 0 1 1.5 0 8.907 8.907 0 0 1-8.156 8.875v2.703h3.258a.75.75 0 1 1 0 1.5H7.992a.75.75 0 0 1 0-1.5h3.258v-2.703a8.907 8.907 0 0 1-8.156-8.875.75.75 0 0 1 .75-.75Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-microphone-mute' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' clip-rule='evenodd' d='M7.5 4.781a4.5 4.5 0 0 1 9 0V6l3.524-3.524a.75.75 0 1 1 1.061 1.06L5.036 19.585a.75.75 0 0 1-1.06-1.06l1.656-1.657a8.88 8.88 0 0 1-2.538-6.227.75.75 0 0 1 1.5 0c0 2.009.8 3.83 2.1 5.166l1.771-1.772A4.483 4.483 0 0 1 7.5 11.25V4.781Zm2.037 8.182L15 7.5V4.781a3 3 0 1 0-6 0v6.469c0 .637.198 1.227.537 1.713Zm10.62-3.072a.75.75 0 0 1 .75.75 8.907 8.907 0 0 1-8.157 8.875v2.703h3.258a.75.75 0 1 1 0 1.5H7.992a.75.75 0 0 1 0-1.5h3.258v-2.703a8.855 8.855 0 0 1-3.035-.811.75.75 0 1 1 .638-1.358 7.406 7.406 0 0 0 10.553-6.707.75.75 0 0 1 .75-.75ZM15 10.81a.75.75 0 0 1 1.5 0v.439a4.5 4.5 0 0 1-5 4.473.75.75 0 1 1 .166-1.491A3 3 0 0 0 15 11.25v-.44Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-mobile-photo-camera' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M7.65 2.55a.75.75 0 0 1 .6-.3h7.5a.75.75 0 0 1 .6.3l2.025 2.7H21a3 3 0 0 1 3 3v10.5a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V8.25a3 3 0 0 1 3-3h2.625zm.975 1.2L6.6 6.45a.75.75 0 0 1-.6.3H3a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h18a1.5 1.5 0 0 0 1.5-1.5V8.25a1.5 1.5 0 0 0-1.5-1.5h-3a.75.75 0 0 1-.6-.3l-2.025-2.7zm3.375 6a3.375 3.375 0 1 0 0 6.75 3.375 3.375 0 0 0 0-6.75zm-4.875 3.375a4.875 4.875 0 1 1 9.75 0 4.875 4.875 0 0 1-9.75 0z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-mobile-video-camera' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' clip-rule='evenodd' d='M0 6.75a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v1.078L22.873 5A.75.75 0 0 1 24 5.648v12.704a.75.75 0 0 1-1.123.65L18 16.207v1.043a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V6.75Zm18 7.728 4.5 2.58V6.95L18 9.562v4.916ZM16.5 6.75a1.5 1.5 0 0 0-1.5-1.5H3a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h12a1.5 1.5 0 0 0 1.5-1.5V6.75Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-ngdrive' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M7.736 1.818a.75.75 0 0 1 .647-.37h7.587a.75.75 0 0 1 .655.383l7.233 12.946a.75.75 0 0 1-.003.737l-3.794 6.66a.75.75 0 0 1-.651.378H4.59a.75.75 0 0 1-.651-.378l-3.794-6.66a.75.75 0 0 1 .005-.75zm.64 1.876L1.663 15.148l2.93 5.145 6.655-11.581zm3.736 6.526-2.398 4.173H14.5zm4.116 4.173h5.697L15.53 2.947H9.677zm5.685 1.5H8.852l-2.966 5.16h13.088z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-onedrive' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M13.616 4.147a7.689 7.689 0 0 0-7.642 3.285A6.299 6.299 0 0 0 1.455 17.3c.684.894 2.473 2.658 5.17 2.658h12.141c.95 0 1.882-.256 2.697-.743.815-.486 1.514-1.247 1.964-2.083a5.26 5.26 0 0 0-3.713-7.612 7.69 7.69 0 0 0-6.098-5.373ZM3.34 17.15c.674.63 1.761 1.308 3.284 1.308h12.142a3.76 3.76 0 0 0 2.915-1.383l-7.494-4.489L3.34 17.15Zm10.875-6.25 2.47-1.038a5.239 5.239 0 0 1 1.427-.389 6.19 6.19 0 0 0-10.3-1.952 6.338 6.338 0 0 1 2.118.813l4.285 2.567Zm4.55.033c-.512 0-1.019.104-1.489.307l-.006.003-1.414.594 6.521 3.906a3.76 3.76 0 0 0-3.357-4.8l-.254-.01ZM4.097 9.617A4.799 4.799 0 0 1 6.558 8.9c.9 0 1.84.25 2.587.713l3.4 2.037-10.17 4.28a4.799 4.799 0 0 1 1.721-6.312Z'/></symbol><symbol fill='none' viewBox='0 0 10 10' id='uc-icon-pause' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' d='M1 0h2.5v10H1zM6.5 0H9v10H6.5z'/></symbol><symbol fill='none' viewBox='0 0 10 10' id='uc-icon-play' xmlns='http://www.w3.org/2000/svg'><path d='m1 0 9 5-9 5V0Z' fill='currentColor'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-remove-file' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M11.955 3.3A2.969 2.969 0 0 0 8.998 6h5.914a2.97 2.97 0 0 0-2.957-2.7zM16.416 6a4.47 4.47 0 0 0-8.922 0h-2.32a.755.755 0 0 0-.111.008H3.075a.75.75 0 1 0 0 1.5h1.35V19.35a2.85 2.85 0 0 0 2.85 2.85h9.45a2.85 2.85 0 0 0 2.85-2.85V7.508h1.35a.75.75 0 0 0 0-1.5h-1.989A.754.754 0 0 0 18.825 6zM5.925 7.508V19.35a1.35 1.35 0 0 0 1.35 1.35h9.45a1.35 1.35 0 0 0 1.35-1.35V7.508z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-select' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='m7 10 5 5 5-5H7Z'/></symbol><symbol fill='none' viewBox='0 0 20 20' id='uc-icon-square' xmlns='http://www.w3.org/2000/svg'><rect width='20' height='20' rx='4' fill='#fff'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-upload' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M11.501.392a.75.75 0 0 1 .998 0l6.704 5.972a.75.75 0 0 1-.998 1.12l-5.455-4.86v13.439a.75.75 0 0 1-1.5 0V2.625l-5.454 4.86a.75.75 0 1 1-.998-1.12zM.857 16.73a.75.75 0 0 1 .75.75v4.914h20.786v-4.914a.75.75 0 0 1 1.5 0v5.664a.75.75 0 0 1-.75.75H.857a.75.75 0 0 1-.75-.75v-5.664a.75.75 0 0 1 .75-.75z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-upload-error' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M13 13h-2V7h2m0 10h-2v-2h2M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-url' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M19.11 3.67c-1.71-1.709-4.578-1.682-6.408.148l-2.22 2.22a.75.75 0 0 1-1.062-1.06l2.222-2.221C14.018.381 17.836.276 20.17 2.61l1.22 1.22c2.335 2.334 2.23 6.153-.147 8.529l-2.22 2.22a.75.75 0 0 1-1.062-1.06l2.222-2.221c1.83-1.83 1.856-4.698.147-6.408zm-3.36 4.58a.75.75 0 0 1 0 1.06l-6.439 6.44a.75.75 0 0 1-1.06-1.06l6.439-6.44a.75.75 0 0 1 1.06 0zM6.04 9.42a.75.75 0 0 1 0 1.061l-2.222 2.222c-1.83 1.83-1.856 4.698-.147 6.407l1.22 1.22c1.71 1.71 4.578 1.683 6.408-.147l2.221-2.221a.75.75 0 1 1 1.06 1.06l-2.22 2.222c-2.377 2.376-6.195 2.481-8.53.147l-1.22-1.22c-2.334-2.334-2.228-6.153.148-8.53l2.221-2.22a.75.75 0 0 1 1.06 0z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-video-camera' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' clip-rule='evenodd' d='M0 6.75a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v1.078L22.873 5A.75.75 0 0 1 24 5.648v12.704a.75.75 0 0 1-1.123.65L18 16.207v1.043a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V6.75Zm18 7.728 4.5 2.58V6.95L18 9.562v4.916ZM16.5 6.75a1.5 1.5 0 0 0-1.5-1.5H3a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h12a1.5 1.5 0 0 0 1.5-1.5V6.75Z'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-video-camera-full' xmlns='http://www.w3.org/2000/svg'><path d='M2 3.333a2 2 0 0 0-2 2v9.334a2 2 0 0 0 2 2h10.938a2 2 0 0 0 2-2v-2.013L20 15.646V4.354l-5.063 3.03v-2.05a2 2 0 0 0-2-2H2Z' fill='currentColor'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-vk' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M6.341 3.27a10.5 10.5 0 0 1 5.834-1.77.75.75 0 0 0 0-1.5 12 12 0 1 0 12 12 .75.75 0 0 0-1.5 0A10.5 10.5 0 1 1 6.34 3.27Zm14.145 1.48a.75.75 0 1 0-1.06-1.062L9.925 13.19V7.95a.75.75 0 1 0-1.5 0V15c0 .414.336.75.75.75h7.05a.75.75 0 0 0 0-1.5h-5.24l9.501-9.5Z'/></symbol></svg>"+t+"<slot></slot>"}static get template(){return this._template}},an=1.5,sn=100/3;function cn(t,e){for(const[r,o]of Object.entries(e))t.setAttributeNS(null,r,o.toString())}function ln(t,e={}){const r=document.createElementNS("http://www.w3.org/2000/svg",t);return cn(r,e),r}function un(t,e,r){const{x:o,y:i,width:n,height:a}=t,s=e.includes("w")?0:1,c=e.includes("n")?0:1,l=0===s?-1:1,u=0===c?-1:1,d=[o+s*n+an*l,i+c*a+an*u-24*r*u],h=[o+s*n+an*l,i+c*a+an*u],p=[o+s*n-24*r*l+an*l,i+c*a+an*u];return{d:`M ${d[0]} ${d[1]} L ${h[0]} ${h[1]} L ${p[0]} ${p[1]}`,center:[h[0],h[1]]}}function dn(t,e,r){const{x:o,y:i,width:n,height:a}=t,s="n"===e||"s"===e,c=s?.5:"w"===e?0:1,l="w"===e||"e"===e?.5:"n"===e?0:1,u="w"===e?-1:"e"===e?1:0,d="n"===e?-1:"s"===e?1:0;let h,p;s?(h=[o+c*n-34*r/2,i+l*a+an*d],p=[o+c*n+34*r/2,i+l*a+an*d]):(h=[o+c*n+an*u,i+l*a-34*r/2],p=[o+c*n+an*u,i+l*a+34*r/2]);return{d:`M ${h[0]} ${h[1]} L ${p[0]} ${p[1]}`,center:[(h[0]+p[0])/2,(h[1]+p[1])/2]}}function hn(t,e){let{x:r}=t,{y:o}=t;return t.x<e.x?r=e.x:t.x+t.width>e.x+e.width&&(r=e.x+e.width-t.width),t.y<e.y?o=e.y:t.y+t.height>e.y+e.height&&(o=e.y+e.height-t.height),{...t,x:r,y:o}}function pn({direction:t,...e}){switch(t){case"n":return function({rect:t,delta:e,aspectRatio:r,imageBox:o}){const[,i]=e;let{y:n,width:a,height:s}=t;n+=i,s-=i,r&&(a=s*r);let c=t.x+t.width/2-a/2;return n<=o.y&&(n=o.y,s=t.y+t.height-n,r&&(a=s*r,c=t.x+t.width/2-a/2)),c<=o.x&&(c=o.x,n=t.y+t.height-s),c+a>=o.x+o.width&&(c=Math.max(o.x,o.x+o.width-a),a=o.x+o.width-c,r&&(s=a/r),n=t.y+t.height-s),s<1&&(s=1,r&&(a=s*r,c=t.x+t.width/2-a/2),n=t.y+t.height-s),a<1&&(a=1,r&&(s=a/r,c=t.x+t.width/2-a/2),n=t.y+t.height-s),{x:c,y:n,width:a,height:s}}(e);case"w":return function({rect:t,delta:e,aspectRatio:r,imageBox:o}){const[i]=e;let{x:n,width:a,height:s}=t;n+=i,a-=i,r&&(s=a/r);let c=t.y+t.height/2-s/2;return n<=o.x&&(n=o.x,a=t.x+t.width-n,r&&(s=a/r,c=t.y+t.height/2-s/2)),c<=o.y&&(c=o.y,n=t.x+t.width-a),c+s>=o.y+o.height&&(c=Math.max(o.y,o.y+o.height-s),s=o.y+o.height-c,r&&(a=s*r),n=t.x+t.width-a),s<1&&(s=1,r&&(a=s*r),c=t.y+t.height/2-s/2,n=t.x+t.width-a),a<1&&(a=1,r&&(s=a/r),c=t.y+t.height/2-s/2,n=t.x+t.width-a),{x:n,y:c,width:a,height:s}}(e);case"s":return function({rect:t,delta:e,aspectRatio:r,imageBox:o}){const[,i]=e;let{y:n,width:a,height:s}=t;s+=i,r&&(a=s*r);let c=t.x+t.width/2-a/2;return n+s>=o.y+o.height&&(s=o.y+o.height-n,r&&(a=s*r),c=t.x+t.width/2-a/2),c<=o.x&&(c=o.x,n=t.y),c+a>=o.x+o.width&&(c=Math.max(o.x,o.x+o.width-a),a=o.x+o.width-c,r&&(s=a/r),n=t.y),s<1&&(s=1,r&&(a=s*r),c=t.x+t.width/2-a/2),a<1&&(a=1,r&&(s=a/r),c=t.x+t.width/2-a/2),{x:c,y:n,width:a,height:s}}(e);case"e":return function({rect:t,delta:e,aspectRatio:r,imageBox:o}){const[i]=e;let{x:n,width:a,height:s}=t;a+=i,r&&(s=a/r);let c=t.y+t.height/2-s/2;return n+a>=o.x+o.width&&(a=o.x+o.width-n,r&&(s=a/r),c=t.y+t.height/2-s/2),c<=o.y&&(c=o.y,n=t.x),c+s>=o.y+o.height&&(c=Math.max(o.y,o.y+o.height-s),s=o.y+o.height-c,r&&(a=s*r),n=t.x),s<1&&(s=1,r&&(a=s*r),c=t.y+t.height/2-s/2),a<1&&(a=1,r&&(s=a/r),c=t.y+t.height/2-s/2),{x:n,y:c,width:a,height:s}}(e);case"nw":return function({rect:t,delta:e,aspectRatio:r,imageBox:o}){let[i,n]=e,{x:a,y:s,width:c,height:l}=t;return a+i<o.x&&(i=o.x-a),s+n<o.y&&(n=o.y-s),a+=i,c-=i,s+=n,l-=n,r&&Math.abs(c/l)>r?(n=c/r-l,l+=n,s-=n,s<=o.y&&(l-=o.y-s,c=l*r,a=t.x+t.width-c,s=o.y)):r&&(i=l*r-c,c+=i,a-=i,a<=o.x&&(c-=o.x-a,l=c/r,a=o.x,s=t.y+t.height-l)),l<1&&(l=1,r&&(c=l*r),a=t.x+t.width-c,s=t.y+t.height-l),c<1&&(c=1,r&&(l=c/r),a=t.x+t.width-c,s=t.y+t.height-l),{x:a,y:s,width:c,height:l}}(e);case"ne":return function({rect:t,delta:e,aspectRatio:r,imageBox:o}){let[i,n]=e,{x:a,y:s,width:c,height:l}=t;return a+c+i>o.x+o.width&&(i=o.x+o.width-a-c),s+n<o.y&&(n=o.y-s),c+=i,s+=n,l-=n,r&&Math.abs(c/l)>r?(n=c/r-l,l+=n,s-=n,s<=o.y&&(l-=o.y-s,c=l*r,a=t.x,s=o.y)):r&&(i=l*r-c,c+=i,a+c>=o.x+o.width&&(c=o.x+o.width-a,l=c/r,a=o.x+o.width-c,s=t.y+t.height-l)),l<1&&(l=1,r&&(c=l*r),s=t.y+t.height-l),c<1&&(c=1,r&&(l=c/r),s=t.y+t.height-l),{x:a,y:s,width:c,height:l}}(e);case"sw":return function({rect:t,delta:e,aspectRatio:r,imageBox:o}){let[i,n]=e,{x:a,y:s,width:c,height:l}=t;return a+i<o.x&&(i=o.x-a),s+l+n>o.y+o.height&&(n=o.y+o.height-s-l),a+=i,c-=i,l+=n,r&&Math.abs(c/l)>r?(n=c/r-l,l+=n,s+l>=o.y+o.height&&(l=o.y+o.height-s,c=l*r,a=t.x+t.width-c,s=o.y+o.height-l)):r&&(i=l*r-c,c+=i,a-=i,a<=o.x&&(c-=o.x-a,l=c/r,a=o.x,s=t.y)),l<1&&(l=1,r&&(c=l*r),a=t.x+t.width-c),c<1&&(c=1,r&&(l=c/r),a=t.x+t.width-c),{x:a,y:s,width:c,height:l}}(e);case"se":return function({rect:t,delta:e,aspectRatio:r,imageBox:o}){let[i,n]=e,{x:a,y:s,width:c,height:l}=t;return a+c+i>o.x+o.width&&(i=o.x+o.width-a-c),s+l+n>o.y+o.height&&(n=o.y+o.height-s-l),c+=i,l+=n,r&&Math.abs(c/l)>r?(n=c/r-l,l+=n,s+l>=o.y+o.height&&(l=o.y+o.height-s,c=l*r,a=t.x,s=o.y+o.height-l)):r&&(i=l*r-c,c+=i,a+c>=o.x+o.width&&(c=o.x+o.width-a,l=c/r,a=o.x+o.width-c,s=t.y)),l<1&&(l=1,r&&(c=l*r)),c<1&&(c=1,r&&(l=c/r)),{x:a,y:s,width:c,height:l}}(e);default:return e.rect}}function gn({width:t,height:e},r){const o=r/90%2!=0;return{width:o?e:t,height:o?t:e}}function mn(t,e,r){let o,i;t/e>r?(o=Math.round(e*r),i=e):(o=t,i=Math.round(t/r));const n=Math.round((t-o)/2),a=Math.round((e-i)/2);return n+o>t&&(o=t-n),a+i>e&&(i=e-a),{x:n,y:a,width:o,height:i}}function fn(t){return{x:Math.round(t.x),y:Math.round(t.y),width:Math.round(t.width),height:Math.round(t.height)}}function bn(t,e,r){return Math.min(Math.max(t,e),r)}var vn=["free"],yn=t=>{const e=ii(t);if(!e||0===e.length)return[];const r=[];for(const t of e){const e=t.trim();if(!e)continue;const o=e.indexOf(":");if(-1===o&&!vn.includes(e)){console.warn(`Invalid crop preset: ${e}`);continue}const i=Number(e.slice(0,o)),n=Number(e.slice(o+1));!(!Number.isFinite(i)||!Number.isFinite(n)||i<=0||n<=0)||vn.includes(e)?r.push({id:xe.generate(),type:"aspect-ratio",width:vn.includes(e)?0:i,height:vn.includes(e)?0:n,hasFreeform:vn.includes(e)}):console.warn(`Invalid crop preset: ${e}`)}return r},wn=Object.freeze({FACEBOOK:"facebook",DROPBOX:"dropbox",GDRIVE:"gdrive",GPHOTOS:"gphotos",FLICKR:"flickr",VK:"vk",EVERNOTE:"evernote",BOX:"box",ONEDRIVE:"onedrive",HUDDLE:"huddle"}),_n=Object.freeze({MOBILE_VIDEO_CAMERA:"mobile-video-camera",MOBILE_PHOTO_CAMERA:"mobile-photo-camera"}),kn=Object.freeze({LOCAL:"local",DROP_AREA:"drop-area",CAMERA:"camera",EXTERNAL:"external",API:"js-api",URL:"url",DRAW:"draw",..._n,...wn});function xn(t){return Xe({...t,libraryName:Ki,libraryVersion:Gi})}var Cn=t=>"number"!=typeof t?0:Math.floor(t/1e3),En=class{_block;_secureToken=null;constructor(t){this._block=t}_debugPrint(...t){this._block.debugPrint("[secure-uploads]",...t)}async getSecureToken(){const{secureSignature:t,secureExpire:e,secureUploadsSignatureResolver:r}=this._block.cfg;if((t||e)&&r&&console.warn("Both secureSignature/secureExpire and secureUploadsSignatureResolver are set. secureUploadsSignatureResolver will be used."),r){if(!this._secureToken||((t,{threshold:e})=>{const{secureExpire:r}=t,o=Cn(Date.now()),i=Number(r);return o+Cn(e)>=i})(this._secureToken,{threshold:this._block.cfg.secureUploadsExpireThreshold})){this._secureToken?this._debugPrint("Secure signature is expired. Resolving a new one..."):this._debugPrint("Secure signature is not set yet.");try{const t=await r();t?t.secureSignature&&t.secureExpire?(this._debugPrint("Secure signature resolved:",t),this._debugPrint("Secure signature will expire in",new Date(1e3*Number(t.secureExpire)).toISOString()),this._secureToken=t):console.error("Secure signature resolver returned an invalid result:",t):(this._debugPrint("Secure signature resolver returned nothing."),this._secureToken=null)}catch(t){console.error("Secure signature resolving failed. Falling back to the previous one.",t),this._block.telemetryManager.sendEventError(t,"secureUploadsSignatureResolver. Secure signature resolving failed. Falling back to the previous one.")}}return this._secureToken}return t&&e?(this._debugPrint("Secure signature and expire are set. Using them...",{secureSignature:t,secureExpire:e}),{secureSignature:t,secureExpire:e}):null}},Tn=(t,e)=>{if(t.failedCount>0)return{type:"SOME_FILES_HAS_ERRORS",message:e.l10n("some-files-were-not-uploaded")}},An=(t,e)=>{const r=t.totalCount,o=e.cfg.multiple?e.cfg.multipleMin:0,i=e.cfg.multiple?e.cfg.multipleMax:1;if(o&&r<o){return{type:"TOO_FEW_FILES",message:e.l10n("files-count-limit-error-too-few",{min:o,max:i,total:r}),payload:{total:r,min:o,max:i}}}if(i&&r>i){return{type:"TOO_MANY_FILES",message:e.l10n("files-count-limit-error-too-many",{min:o,max:i,total:r}),payload:{total:r,min:o,max:i}}}},In={safariDesktop:(()=>{const t=navigator.userAgent;return/Macintosh|Windows/.test(t)&&/Version\/[\d.]+.*Safari/.test(t)&&!/Chrome|Chromium|Edg|OPR/.test(t)})()},Sn={htmlMediaCapture:"capture"in document.createElement("input")},Mn="image/*",$n="video/*",On=In.safariDesktop?[Mn]:[Mn,...["image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/avif","image/avif-sequence",".heif",".heifs",".heic",".heics",".avif",".avifs"]],Ln=t=>t?t.filter(t=>"string"==typeof t).flatMap(t=>ii(t)):[],Rn=(t,e)=>e.some(e=>{if(e.endsWith("*")){const r=e.replace("*","");return t.startsWith(r)}return t===e}),Un=t=>{const e=t?.type;return!!e&&Rn(e,On)},Pn=(t,e)=>{const r=e.cfg.imgOnly,o=e.cfg.accept,i=Ln([...r?On:[],o]);if(!i.length)return;const n=t.mimeType,a=t.name;if(!n||!a)return;const s=Rn(n,i),c=((t,e)=>e.some(e=>!!e.startsWith(".")&&t.toLowerCase().endsWith(e.toLowerCase())))(a,i);return s||c?void 0:{type:"FORBIDDEN_FILE_TYPE",message:e.l10n("file-type-not-allowed"),payload:{entry:t}}},Nn=(t,e)=>{const r=e.cfg.imgOnly,o=t.isImage;if(r&&!o&&(t.fileInfo||!t.externalUrl)&&(t.fileInfo||t.mimeType))return{type:"NOT_AN_IMAGE",message:e.l10n("images-only-accepted"),payload:{entry:t}}},Dn=1e3,zn=Object.freeze({AUTO:"auto",BYTE:"byte",KB:"kb",MB:"mb",GB:"gb",TB:"tb",PB:"pb"}),Fn=t=>Math.ceil(100*t)/100,Vn=(t,e=zn.AUTO)=>{const r=e===zn.AUTO;if(e===zn.BYTE||r&&t<1e3){return`${t} ${"one"===xi("en-US",t)?"byte":"bytes"}`}return e===zn.KB||r&&t<1e6?`${Fn(t/1e3)} KB`:e===zn.MB||r&&t<Dn**3?`${Fn(t/1e6)} MB`:e===zn.GB||r&&t<Dn**4?`${Fn(t/Dn**3)} GB`:e===zn.TB||r&&t<Dn**5?`${Fn(t/Dn**4)} TB`:`${Fn(t/Dn**5)} PB`},Bn=(t,e)=>{const r=e.cfg.maxLocalFileSizeBytes,o=t.size;if(r&&o&&o>r)return{type:"FILE_SIZE_EXCEEDED",message:e.l10n("files-max-size-limit-error",{maxFileSize:Vn(r)}),payload:{entry:t}}},jn=(t,e)=>{const{internalId:r}=t,o=e._uploadCollection.read(r),i=o?.getValue("uploadError");if(!i)return;if(i instanceof gr)return{type:"UPLOAD_ERROR",message:i.message,payload:{entry:t,error:i}};if(i instanceof Qe)return{type:"NETWORK_ERROR",message:i.message,payload:{entry:t,error:i}};const n=i instanceof Error?i:new Error("Unknown error",{cause:i});return{type:"UNKNOWN_ERROR",message:n.message,payload:{entry:t,error:n}}},Hn="File validator execution has failed",qn="File validator execution has timed out",Kn="Collection validator execution has failed",Gn="Missing message. We recommend adding message: value.",Wn=t=>"function"==typeof t?{runOn:"change",validator:t}:t,Xn=class{_blockInstance;_uploadCollection;_commonFileValidators=[Nn,Pn,Bn,jn];_commonCollectionValidators=[An,Tn];_queue=new Xr(20);_runQueueDebounced=jo(()=>{this._queue.run()},500);_entryValidationState=new Map;constructor(t){this._blockInstance=t,this._uploadCollection=this._blockInstance.uploadCollection;const e=()=>{this.runFileValidators("change"),this.runCollectionValidators()};this._blockInstance.subConfigValue("maxLocalFileSizeBytes",e),this._blockInstance.subConfigValue("multipleMin",e),this._blockInstance.subConfigValue("multipleMax",e),this._blockInstance.subConfigValue("multiple",e),this._blockInstance.subConfigValue("imgOnly",e),this._blockInstance.subConfigValue("accept",e),this._blockInstance.subConfigValue("validationConcurrency",t=>{this._queue.concurrency=t})}runFileValidators(t,e){const r=e??this._uploadCollection.items();for(const e of r){const r=this._uploadCollection.read(e);r&&this._runFileValidatorsForEntry(r,t)}}runCollectionValidators(){const t=this._blockInstance.api.getOutputCollectionState(),e=[];for(const r of[...this._commonCollectionValidators,...this._blockInstance.cfg.collectionValidators])try{const o=r(t,this._blockInstance.api);if(!o)continue;o&&(e.push(this._addCustomTypeToValidationError(o)),o.message||console.warn(Gn))}catch(t){console.warn(Kn,t)}this._blockInstance.$["*collectionErrors"]=e,e.length>0&&this._blockInstance.emit(Vo.COMMON_UPLOAD_FAILED,()=>this._blockInstance.api.getOutputCollectionState(),{debounce:!0})}cleanupValidationForEntry(t){const e=this._entryValidationState.get(t.uid);e&&(e.abortController?.abort(),this._entryValidationState.delete(t.uid))}async _runFileValidatorsForEntry(t,e){const r=this._getValidatorDescriptorsForEntry(t,e);if(0===r.length)return;t.setMultipleValues({isQueuedForValidation:!0,isValidationPending:!0});const o=this._blockInstance.api.getOutputItem(t.uid),i=this._getEntryValidationState(t);i.promise&&await i.promise;const{promise:n,resolve:a}=(()=>{let t=()=>{},e=()=>{};return{promise:new Promise((r,o)=>{t=r,e=o}),resolve:t,reject:e}})();i.promise=n;const s=new AbortController;i.abortController=s;const c=this._blockInstance.cfg.validationTimeout,l=this._getValidatorDescriptors(),u=new Set(r.map(t=>t.validator)),d=[];for(const t of l)if(!u.has(t.validator)){const e=i.lastErrorThrownByValidator.get(t.validator);e&&d.push(e)}const h=r.map(t=>async()=>{if(!this._blockInstance.isConnected)return;const e=setTimeout(()=>{i.skippedValidators.add(t.validator),s.abort(),console.warn(qn)},c);try{const e=await t.validator(o,this._blockInstance.api,{signal:s.signal});if(!e||s.signal.aborted)return void i.lastErrorThrownByValidator.set(t.validator,void 0);const r=this._addCustomTypeToValidationError(e);i.lastErrorThrownByValidator.set(t.validator,r),d.push(r),e.message||console.warn(Gn)}catch(e){s.signal.aborted||(i.skippedValidators.add(t.validator),console.warn(Hn,e),this._blockInstance.telemetryManager.sendEventError(e,`file validator. ${Hn}`))}finally{clearTimeout(e),"change"!==t.runOn&&i.skippedValidators.add(t.validator)}});if(this._runQueueDebounced(),await this._queue.add(async()=>{t.setValue("isQueuedForValidation",!1),await Promise.all(h.map(t=>t())).catch(()=>{})},{autoRun:!1}),s.signal.aborted)return t.setMultipleValues({isQueuedForValidation:!1,isValidationPending:!1}),void a();t.setMultipleValues({isValidationPending:!1,isQueuedForValidation:!1,errors:d}),a()}_addCustomTypeToValidationError(t){return{...t,type:t.type??"CUSTOM_ERROR"}}_getEntryValidationState(t){const e=this._entryValidationState.get(t.uid);if(e)return e;const r={abortController:void 0,skippedValidators:new WeakSet,promise:void 0,lastErrorThrownByValidator:new WeakMap};return this._entryValidationState.set(t.uid,r),r}_getValidatorDescriptors(){return[...this._commonFileValidators,...this._blockInstance.cfg.fileValidators].map(Wn)}_getValidatorDescriptorsForEntry(t,e){const r=this._getEntryValidationState(t);return this._getValidatorDescriptors().filter(t=>!r.skippedValidators.has(t.validator)).filter(t=>t.runOn===e)}},Zn="[Typed State] Wrong property name: ",Yn=class{__typedSchema;__ctxId;__schema;__data;constructor(t,e){this.__typedSchema=t,this.__ctxId=e||xe.generate(),this.__schema=Object.keys(t).reduce((e,r)=>(t[r]&&(e[r]=t[r].value),e),{}),this.__data=we.registerCtx(this.__schema,this.__ctxId)}get uid(){return this.__ctxId}setValue(t,e){if(!Object.hasOwn(this.__typedSchema,t)||!this.__typedSchema[t])return void console.warn(Zn+t);const r=this.__typedSchema[t],o=e?.constructor===r.type,i=e instanceof r.type,n=r.nullable&&null===e;o||i||n?this.__data.pub(t,e):console.warn("[Typed State] Wrong property type: "+t)}setMultipleValues(t){for(const[e,r]of Object.entries(t))this.setValue(e,r)}getValue(t){return Object.hasOwn(this.__typedSchema,t)||console.warn(Zn+t),this.__data.read(t)}subscribe(t,e){return this.__data.sub(t,e)}remove(){we.deleteCtx(this.__ctxId)}},Jn=class{__typedSchema;__ctxId;__data;__watchList;__subsMap=Object.create(null);__propertyObservers=new Set;__collectionObservers=new Set;__items=new Set;__removed=new Set;__added=new Set;__observeTimeout;__notifyTimeout;__notifyObservers;constructor(t){this.__typedSchema=t.typedSchema,this.__ctxId=t.ctxName||xe.generate(),this.__data=we.registerCtx({},this.__ctxId),this.__watchList=t.watchList||[];let e=Object.create(null);this.__notifyObservers=(t,r)=>{this.__observeTimeout&&window.clearTimeout(this.__observeTimeout),e[t]||(e[t]=new Set),e[t].add(r),this.__observeTimeout=window.setTimeout(()=>{0!==Object.keys(e).length&&(this.__propertyObservers.forEach(t=>{t({...e})}),e=Object.create(null))})},t.handler&&this.observeCollection(t.handler)}notify(){this.__notifyTimeout&&window.clearTimeout(this.__notifyTimeout),this.__notifyTimeout=window.setTimeout(()=>{const t=new Set(this.__added),e=new Set(this.__removed);this.__added.clear(),this.__removed.clear();for(const r of this.__collectionObservers)r?.([...this.__items],t,e)})}observeCollection(t){return this.__collectionObservers.add(t),this.__items.size>0&&this.notify(),()=>{this.unobserveCollection(t)}}unobserveCollection(t){this.__collectionObservers.delete(t)}add(t){const e=new Yn(this.__typedSchema);for(const[r,o]of Object.entries(t))void 0!==o&&e.setValue(r,o);return this.__items.add(e.uid),this.notify(),this.__data.add(e.uid,e),this.__added.add(e),this.__watchList.forEach(t=>{this.__subsMap[e.uid]||(this.__subsMap[e.uid]=[]),this.__subsMap[e.uid]?.push(e.subscribe(t,()=>{this.__notifyObservers(t,e.uid)}))}),e.uid}read(t){return this.__data.read(t)}readProp(t,e){const r=this.read(t);return r?r.getValue(e):(console.warn(`Item with id ${t} not found`),null)}publishProp(t,e,r){const o=this.read(t);o?o.setValue(e,r):console.warn(`Item with id ${t} not found`)}remove(t){const e=this.read(t);e&&this.__removed.add(e),this.__items.delete(t),this.notify(),this.__data.pub(t,null),delete this.__subsMap[t]}clearAll(){this.__items.forEach(t=>{this.remove(t)})}observeProperties(t){return this.__propertyObservers.add(t),()=>{this.unobserveProperties(t)}}unobserveProperties(t){this.__propertyObservers.delete(t)}findItems(t){const e=[];return this.__items.forEach(r=>{const o=this.read(r);o&&t(o)&&e.push(r)}),e}items(){return[...this.__items]}get size(){return this.__items.size}destroy(){we.deleteCtx(this.__ctxId),this.__propertyObservers=new Set,this.__collectionObservers=new Set;for(const t in this.__subsMap)this.__subsMap[t]?.forEach(t=>{t.remove()}),delete this.__subsMap[t]}},Qn=Object.freeze({PHOTO:"photo",VIDEO:"video"}),ta=Object.freeze({IDLE:"idle",SHOT:"shot",PLAY:"play",PAUSE:"pause",RESUME:"resume",STOP:"stop",RETAKE:"retake",ACCEPT:"accept"}),ea=t=>({isVideoRecordingEnabled:Ho(t.cameraModes).includes(Qn.VIDEO),isPhotoEnabled:Ho(t.cameraModes).includes(Qn.PHOTO)}),ra=new RegExp(`^/?(${/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/i.source})(?:/(-/(?:[^/]+/)+)?([^/]*))?$`,"i");function oa(t){const e=new Map;return(...r)=>{const o=JSON.stringify(r);if(e.has(o))return e.get(o);const i=t(...r);return e.set(o,i),i}}var ia=new Set;function na(t){ia.has(t)||(ia.add(t),console.warn(t))}function aa(t){const e={},r={progress:()=>t.$["*commonProgress"],errors:()=>t.$["*collectionErrors"],group:()=>t.$["*groupInfo"],totalCount:()=>t.uploadCollection.size,failedCount:()=>e.failedEntries.length,successCount:()=>e.successEntries.length,uploadingCount:()=>e.uploadingEntries.length,status:()=>e.isFailed?"failed":e.isUploading?"uploading":e.isSuccess?"success":"idle",isSuccess:()=>e.allEntries.length>0&&0===e.errors.length&&e.successEntries.length===e.allEntries.length,isUploading:()=>e.allEntries.some(t=>"uploading"===t.status),isFailed:()=>e.errors.length>0||e.failedEntries.length>0,allEntries:()=>t.getOutputData(),successEntries:()=>e.allEntries.filter(t=>"success"===t.status),failedEntries:()=>e.allEntries.filter(t=>"failed"===t.status),uploadingEntries:()=>e.allEntries.filter(t=>"uploading"===t.status),idleEntries:()=>e.allEntries.filter(t=>"idle"===t.status)},o=function(t){let e=!1;return setTimeout(()=>{e=!0},0),r=>(...o)=>(e&&na(t),r(...o))}("You're trying to access the OutputCollectionState asynchronously. In this case, the data you retrieve will be newer than it was when the OutputCollectionState was created or when the event was dispatched. If you want to retain the state at a specific moment in time, you should use the spread operator like this: `{...outputCollectionState}` or `{...e.detail}`");for(const[t,i]of Object.entries(r)){const r=t,n=oa(o(i));Object.defineProperty(e,r,{get:n,enumerable:!0})}return e}var sa=class{_ctx;constructor(t){this._ctx=t}get _uploadCollection(){return this._ctx.uploadCollection}get cfg(){return this._ctx.cfg}get l10n(){return this._ctx.l10n.bind(this._ctx)}addFileFromUrl=(t,{silent:e,fileName:r,source:o}={})=>{const i=this._uploadCollection.add({externalUrl:t,fileName:r??null,silent:e??!1,source:o??kn.API});return this.getOutputItem(i)};addFileFromUuid=(t,{silent:e,fileName:r,source:o}={})=>{const i=this._uploadCollection.add({uuid:t,fileName:r??null,silent:e??!1,source:o??kn.API});return this.getOutputItem(i)};addFileFromCdnUrl=(t,{silent:e,fileName:r,source:o}={})=>{const i=(({url:t,cdnBase:e})=>{const r=new URL(e),o=new URL(wi),i=new URL(t);if(r.host!==i.host&&o.host!==i.host)return null;const n=ra.exec(i.pathname);if(!n)return null;const[,a,s,c]=n;return a?{uuid:a,cdnUrlModifiers:s||"",filename:c||null}:null})({url:t,cdnBase:this.cfg.cdnCname});if(!i)throw new Error("Invalid CDN URL");const n=this._uploadCollection.add({uuid:i.uuid,cdnUrl:t,cdnUrlModifiers:i.cdnUrlModifiers,fileName:r??i.filename??null,silent:e??!1,source:o??kn.API});return this.getOutputItem(n)};addFileFromObject=(t,{silent:e,fileName:r,source:o,fullPath:i}={})=>{const n=this._uploadCollection.add({file:t,isImage:Un(t),mimeType:t.type,fileName:r??t.name,fileSize:t.size,silent:e??!1,source:o??kn.API,fullPath:i??null});return this.getOutputItem(n)};removeFileByInternalId=t=>{if(!this._uploadCollection.read(t))throw new Error(`File with internalId ${t} not found`);this._uploadCollection.remove(t)};removeAllFiles(){this._uploadCollection.clearAll()}uploadAll=()=>{const t=this._uploadCollection.items().filter(t=>{const e=this._uploadCollection.read(t);return!!e&&!(e.getValue("isRemoved")||e.getValue("isUploading")||e.getValue("fileInfo")||0!==e.getValue("errors").length||e.getValue("isValidationPending")||e.getValue("isQueuedForValidation"))});0!==t.length&&(this._ctx.$["*uploadTrigger"]=new Set(t),this._ctx.emit(Vo.COMMON_UPLOAD_START,this.getOutputCollectionState()))};openSystemDialog=(t={})=>{const e=qo(Ln([this.cfg.accept??"",...this.cfg.imgOnly?On:[]])),r="uploadcare-file-input",o=document.createElement("input");if(o.setAttribute(r,""),ze(o,{opacity:0,height:0,width:0,visibility:"hidden",position:"absolute",top:0,left:0}),o.type="file",o.multiple=this.cfg.multiple,t.captureCamera){o.capture=this.cfg.cameraCapture;const{isPhotoEnabled:e,isVideoRecordingEnabled:r}=ea(this.cfg);t.modeCamera===Qn.PHOTO&&e?o.accept=Mn:t.modeCamera===Qn.VIDEO&&r?o.accept=$n:o.accept=[Mn,r&&$n].filter(Boolean).join(",")}else o.accept=e;o.addEventListener("change",()=>{o.files&&([...o.files].forEach(e=>{this.addFileFromObject(e,{source:t.captureCamera?kn.CAMERA:kn.LOCAL})}),this._ctx.modalManager?.open(tn.activities.UPLOAD_LIST),this._ctx.$["*currentActivity"]=tn.activities.UPLOAD_LIST,o.remove())},{once:!0}),document.querySelectorAll(`[${r}]`).forEach(t=>{t.remove()}),document.body.appendChild(o),o.dispatchEvent(new MouseEvent("click"))};getOutputItem(t){const e=we.getCtx(t).store,r=e.fileInfo,o=e.isRemoved?"removed":e.errors.length>0?"failed":e.fileInfo?"success":e.isUploading?"uploading":"idle";return{uuid:r?.uuid??e.uuid??null,internalId:t,name:r?.originalFilename??e.fileName,size:r?.size??e.fileSize,isImage:r?.isImage??e.isImage,mimeType:r?.mimeType??e.mimeType,file:e.file,externalUrl:e.externalUrl,cdnUrlModifiers:e.cdnUrlModifiers,cdnUrl:e.cdnUrl??r?.cdnUrl??null,fullPath:e.fullPath,uploadProgress:e.uploadProgress,fileInfo:r??null,metadata:e.metadata??r?.metadata??null,isSuccess:"success"===o,isUploading:"uploading"===o,isFailed:"failed"===o,isRemoved:"removed"===o,isValidationPending:e.isValidationPending,errors:e.errors,status:o,source:e?.source}}getOutputCollectionState(){return aa(this._ctx)}initFlow=(t=!1)=>{if(this._uploadCollection.size>0&&!t)this._ctx.modalManager?.open(tn.activities.UPLOAD_LIST),this._ctx.set$({"*currentActivity":tn.activities.UPLOAD_LIST});else if(1===this._sourceList?.length){const t=this._sourceList[0];if("local"===t)return this._ctx.$["*currentActivity"]=tn.activities.UPLOAD_LIST,void this.openSystemDialog();if("camera"===t&&Sn.htmlMediaCapture){const{isPhotoEnabled:t,isVideoRecordingEnabled:e}=ea(this.cfg);if(t&&e)return void this._ctx.set$({"*currentActivity":tn.activities.START_FROM});if(t||e)return void this.openSystemDialog({captureCamera:!0,modeCamera:t?Qn.PHOTO:Qn.VIDEO});this.openSystemDialog({captureCamera:!0,modeCamera:Qn.PHOTO})}const e=[...this._ctx.$["*blocksRegistry"]].find(e=>"type"in e&&e.type===t);e?.activate(),this._ctx.$["*currentActivity"]&&this._ctx.modalManager?.open(this._ctx.$["*currentActivity"])}else this._ctx.modalManager?.open(tn.activities.START_FROM),this._ctx.set$({"*currentActivity":tn.activities.START_FROM})};doneFlow=()=>{this._ctx.set$({"*currentActivity":this._ctx.doneActivity,"*history":this._ctx.doneActivity?[this._ctx.doneActivity]:[]}),this._ctx.$["*currentActivity"]||this._ctx.modalManager?.closeAll()};setCurrentActivity=(t,...e)=>{this._ctx.hasBlockInCtx(e=>e.activityType===t)?this._ctx.set$({"*currentActivityParams":e??{},"*currentActivity":t}):console.warn(`Activity type "${t}" not found in the context`)};getCurrentActivity=()=>this._ctx.$["*currentActivity"];setModalState=t=>{!t||this._ctx.$["*currentActivity"]?t?this._ctx.modalManager?.open(this._ctx.$["*currentActivity"]):(this._ctx.modalManager?.close(this._ctx.$["*currentActivity"]),this._ctx.$["*currentActivity"]=null):console.warn('Can\'t open modal without current activity. Please use "setCurrentActivity" method first.')};get _sourceList(){let t=[];return this.cfg.sourceList&&(t=ii(this.cfg.sourceList)),t}},ca=Object.freeze({file:Object.freeze({type:File,value:null,nullable:!0}),externalUrl:Object.freeze({type:String,value:null,nullable:!0}),fileName:Object.freeze({type:String,value:null,nullable:!0}),fileSize:Object.freeze({type:Number,value:null,nullable:!0}),lastModified:Object.freeze({type:Number,value:Date.now()}),uploadProgress:Object.freeze({type:Number,value:0}),uuid:Object.freeze({type:String,value:null,nullable:!0}),isImage:Object.freeze({type:Boolean,value:!1}),mimeType:Object.freeze({type:String,value:null,nullable:!0}),ctxName:Object.freeze({type:String,value:null,nullable:!0}),cdnUrl:Object.freeze({type:String,value:null,nullable:!0}),cdnUrlModifiers:Object.freeze({type:String,value:null,nullable:!0}),fileInfo:Object.freeze({type:Or,value:null,nullable:!0}),isUploading:Object.freeze({type:Boolean,value:!1}),abortController:Object.freeze({type:AbortController,value:null,nullable:!0}),thumbUrl:Object.freeze({type:String,value:null,nullable:!0}),silent:Object.freeze({type:Boolean,value:!1}),source:Object.freeze({type:String,value:null,nullable:!0}),fullPath:Object.freeze({type:String,value:null,nullable:!0}),metadata:Object.freeze({type:Object,value:null,nullable:!0}),errors:Object.freeze({type:Array,value:[]}),uploadError:Object.freeze({type:Error,value:null,nullable:!0}),isRemoved:Object.freeze({type:Boolean,value:!1}),isQueuedForUploading:Object.freeze({type:Boolean,value:!1}),isValidationPending:Object.freeze({type:Boolean,value:!1}),isQueuedForValidation:Object.freeze({type:Boolean,value:!1})}),la=class t extends tn{static extSrcList;static sourceTypes;couldBeCtxOwner=!1;isCtxOwner=!1;_unobserveCollection;_unobserveCollectionProperties;init$=Oi(this);get hasCtxOwner(){return this.hasBlockInCtx(e=>e instanceof t&&(e.isCtxOwner&&e.isConnected&&e!==this))}initCallback(){if(super.initCallback(),!this.has("*uploadCollection")){const t=new Jn({typedSchema:ca,watchList:["uploadProgress","uploadError","fileInfo","errors","cdnUrl","isUploading","isValidationPending"]});this.add("*uploadCollection",t)}this.has("*publicApi")||this.add("*publicApi",new sa(this)),this.has("*validationManager")||this.add("*validationManager",new Xn(this)),!this.hasCtxOwner&&this.couldBeCtxOwner&&this._initCtxOwner()}get validationManager(){if(!this.has("*validationManager"))throw new Error("Unexpected error: ValidationManager is not initialized");return this.$["*validationManager"]}get api(){if(!this.has("*publicApi"))throw new Error("Unexpected error: UploaderPublicApi is not initialized");return this.$["*publicApi"]}getAPI(){return this.api}get uploadCollection(){if(!this.has("*uploadCollection"))throw new Error("Unexpected error: TypedCollection is not initialized");return this.$["*uploadCollection"]}destroyCtxCallback(){this.uploadCollection.destroy(),this.$["*uploadCollection"]=null,super.destroyCtxCallback()}disconnectedCallback(){super.disconnectedCallback(),this.isCtxOwner&&this._unobserveUploadCollection()}connectedCallback(){super.connectedCallback(),this.isCtxOwner&&this._observeUploadCollection()}destroyCallback(){super.destroyCallback(),this._flushOutputItems.cancel()}_initCtxOwner(){this.isCtxOwner=!0,this._observeUploadCollection(),this.subConfigValue("maxConcurrentRequests",t=>{this.$["*uploadQueue"].concurrency=Number(t)||1}),this.$["*secureUploadsManager"]||(this.$["*secureUploadsManager"]=new En(this))}_observeUploadCollection(){this._unobserveUploadCollection(),this._unobserveCollection=this.uploadCollection.observeCollection(this._handleCollectionUpdate),this._unobserveCollectionProperties=this.uploadCollection.observeProperties(this._handleCollectionPropertiesUpdate)}_unobserveUploadCollection(){this._unobserveCollectionProperties?.(),this._unobserveCollection?.(),this._unobserveCollectionProperties=void 0,this._unobserveCollection=void 0}async _createGroup(t){const e=await this.getUploadClientOptions(),r=t.allEntries.map(t=>t.uuid+(t.cdnUrlModifiers?`/${t.cdnUrlModifiers}`:"")),o=new AbortController,i=await Wr(r,{...e,signal:o.signal});if(this.$["*collectionState"]!==t)return void o.abort();this.$["*groupInfo"]=i;const n=this.api.getOutputCollectionState();this.emit(Vo.GROUP_CREATED,n),this.emit(Vo.CHANGE,()=>this.api.getOutputCollectionState(),{debounce:!0}),this.$["*collectionState"]=n}_flushOutputItems=jo(async()=>{if(this.getOutputData().length!==this.uploadCollection.size)return;const t=this.api.getOutputCollectionState();this.$["*collectionState"]=t,this.emit(Vo.CHANGE,()=>this.api.getOutputCollectionState(),{debounce:!0}),this.cfg.groupOutput&&t.totalCount>0&&"success"===t.status&&this._createGroup(t)},300);_handleCollectionUpdate=(t,e,r)=>{(e.size||r.size)&&(this.$["*groupInfo"]=null),this.validationManager.runFileValidators("add",[...e].map(t=>t.uid));for(const t of e)t.getValue("silent")||this.emit(Vo.FILE_ADDED,this.api.getOutputItem(t.uid));this.validationManager.runCollectionValidators();for(const t of r){this.$["*uploadTrigger"].delete(t.uid),this.validationManager.cleanupValidationForEntry(t),t.getValue("abortController")?.abort(),t.setMultipleValues({isRemoved:!0,abortController:null,isUploading:!1,uploadProgress:0});const e=t?.getValue("thumbUrl");e&&URL.revokeObjectURL(e),this.emit(Vo.FILE_REMOVED,this.api.getOutputItem(t.uid))}this.$["*uploadList"]=t.map(t=>({uid:t})),this._flushCommonUploadProgress(),this._flushOutputItems()};_handleCollectionPropertiesUpdate=t=>{this._flushOutputItems();const e=this.uploadCollection,r=[...new Set(Object.entries(t).filter(([t])=>["uploadError","fileInfo","cdnUrl","cdnUrlModifiers"].includes(t)).flatMap(([,t])=>[...t]))];if(r.length>0&&setTimeout(()=>{const e=r.filter(e=>t.fileInfo?.has(e)&&!!we.getCtx(e).store.fileInfo);e.length>0&&this.validationManager.runFileValidators("upload",e),this.validationManager.runFileValidators("change",r)}),t.uploadProgress){for(const e of t.uploadProgress){const{isUploading:t,silent:r}=we.getCtx(e).store;t&&!r&&this.emit(Vo.FILE_UPLOAD_PROGRESS,this.api.getOutputItem(e))}this._flushCommonUploadProgress()}if(t.isUploading)for(const e of t.isUploading){const{isUploading:t,silent:r}=we.getCtx(e).store;t&&!r&&this.emit(Vo.FILE_UPLOAD_START,this.api.getOutputItem(e))}if(t.fileInfo){for(const e of t.fileInfo){const{fileInfo:t,silent:r}=we.getCtx(e).store;t&&!r&&this.emit(Vo.FILE_UPLOAD_SUCCESS,this.api.getOutputItem(e))}this.cfg.cropPreset&&this.setInitialCrop(),this.cfg.cloudImageEditorAutoOpen&&this.openCloudImageEditor()}if(t.errors){this.validationManager.runCollectionValidators();for(const e of t.errors){const{errors:t}=we.getCtx(e).store;t.length>0&&(this.emit(Vo.FILE_UPLOAD_FAILED,this.api.getOutputItem(e)),this.emit(Vo.COMMON_UPLOAD_FAILED,()=>this.api.getOutputCollectionState(),{debounce:!0}))}const r=e.findItems(t=>!!t.getValue("fileInfo")),o=e.findItems(t=>t.getValue("errors").length>0);e.size>0&&0===o.length&&e.size===r.length&&0===this.$["*collectionErrors"].length&&this.emit(Vo.COMMON_UPLOAD_SUCCESS,this.api.getOutputCollectionState())}if(t.cdnUrl){[...t.cdnUrl].filter(t=>!!this.uploadCollection.read(t)?.getValue("cdnUrl")).forEach(t=>{this.emit(Vo.FILE_URL_CHANGED,this.api.getOutputItem(t))}),this.$["*groupInfo"]=null}};_flushCommonUploadProgress=()=>{let t=0;const e=[...this.$["*uploadTrigger"]].filter(t=>!!this.uploadCollection.read(t));e.forEach(e=>{const r=this.uploadCollection.readProp(e,"uploadProgress");"number"==typeof r&&(t+=r)});const r=e.length?Math.round(t/e.length):0;this.$["*commonProgress"]!==r&&(this.$["*commonProgress"]=r,this.emit(Vo.COMMON_UPLOAD_PROGRESS,this.api.getOutputCollectionState()))};openCloudImageEditor(){const[t]=this.uploadCollection.findItems(t=>!!t.getValue("fileInfo")&&t.getValue("isImage")).map(t=>this.uploadCollection.read(t));t&&1===this.uploadCollection.size&&this.cfg.useCloudImageEditor&&this.hasBlockInCtx(t=>t.activityType===tn.activities.CLOUD_IMG_EDIT)&&(this.$["*currentActivityParams"]={internalId:t.uid},this.$["*currentActivity"]=tn.activities.CLOUD_IMG_EDIT,this.modalManager?.open(tn.activities.CLOUD_IMG_EDIT))}setInitialCrop(){const t=yn(this.cfg.cropPreset);if(t){const[e]=t,r=this.uploadCollection.findItems(t=>!!t.getValue("fileInfo")&&t.getValue("isImage")&&!t.getValue("cdnUrlModifiers")?.includes("/crop/")).map(t=>this.uploadCollection.read(t)).filter(Boolean);for(const t of r){const r=t.getValue("fileInfo");if(!r||!r.imageInfo){console.warn("Failed to get image info for entry",t.uid);continue}const{width:o,height:i}=r.imageInfo,n=mn(o,i,"number"==typeof e?.width&&"number"==typeof e?.height&&e.width>0&&e.height>0?e.width/e.height:1),a=Wo(`crop/${n.width}x${n.height}/${n.x},${n.y}`,"preview"),s=t.getValue("cdnUrl");s?(t.setMultipleValues({cdnUrlModifiers:a,cdnUrl:ri(s,a)}),1===this.uploadCollection.size&&this.cfg.useCloudImageEditor&&this.hasBlockInCtx(t=>t.activityType===tn.activities.CLOUD_IMG_EDIT)&&(this.$["*currentActivityParams"]={internalId:t.uid},this.$["*currentActivity"]=tn.activities.CLOUD_IMG_EDIT,this.modalManager?.open(tn.activities.CLOUD_IMG_EDIT))):console.warn("Failed to get cdnUrl for entry",t.uid)}}}async getMetadataFor(t){const e=this.cfg.metadata||void 0;if("function"==typeof e){const r=this.api.getOutputItem(t);return await e(r)}return e}async getUploadClientOptions(){const t=this.$["*secureUploadsManager"],e=await t.getSecureToken().catch(()=>null);return{store:this.cfg.store,publicKey:this.cfg.pubkey,baseCDN:this.cfg.cdnCname,baseURL:this.cfg.baseUrl,userAgent:xn,integration:this.cfg.userAgentIntegration,secureSignature:e?.secureSignature,secureExpire:e?.secureExpire,retryThrottledRequestMaxTimes:this.cfg.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:this.cfg.retryNetworkErrorMaxTimes,multipartMinFileSize:this.cfg.multipartMinFileSize,multipartChunkSize:this.cfg.multipartChunkSize,maxConcurrentRequests:this.cfg.multipartMaxConcurrentRequests,multipartMaxAttempts:this.cfg.multipartMaxAttempts,checkForUrlDuplicates:!!this.cfg.checkForUrlDuplicates,saveUrlForRecurrentUploads:!!this.cfg.saveUrlForRecurrentUploads}}getOutputData(){return this.uploadCollection.items().map(t=>this.api.getOutputItem(t))}};la.extSrcList=Object.freeze({...wn}),la.sourceTypes=Object.freeze({...kn});var ua=class extends tn{},da={width:{ideal:1920},height:{ideal:1080},frameRate:{ideal:30}},ha=["camera","microphone"];function pa(t){return`${Math.floor(t/60).toString().padStart(2,"0")}:${Math.floor(t%60).toString().padStart(2,"0")}`}var ga="image/jpeg",ma="video/webm",fa=class extends la{couldBeCtxOwner=!0;activityType=tn.activities.CAMERA;_unsubPermissions=null;_capturing=!1;_chunks=[];_mediaRecorder=null;_stream=null;_selectedAudioId=null;_selectedCameraId=null;_activeTab=null;_options={};_canvas=null;_ctx=null;_cameraDevices=[];_audioDevices=[];_permissionResponses={};constructor(){super(),this.init$={...this.init$,video:null,videoTransformCss:null,videoHidden:!0,messageHidden:!0,requestBtnHidden:void 0!==navigator.permissions,cameraSelectOptions:null,cameraSelectHidden:!0,l10nMessage:"",switcher:null,panels:null,timer:null,timerHidden:!0,cameraHidden:!0,cameraActionsHidden:!0,audioSelectOptions:null,audioSelectHidden:!0,audioSelectDisabled:!0,audioToggleMicrophoneHidden:!0,tabCameraHidden:!0,tabVideoHidden:!0,currentIcon:"camera-full",currentTimelineIcon:"play",toggleMicrophoneIcon:"microphone",_startTime:0,_elapsedTime:0,_animationFrameId:null,mutableClassButton:"uc-shot-btn uc-camera-action",onCameraSelectChange:t=>{const e=t.target;e&&(this._selectedCameraId=e.value,this._capture())},onAudioSelectChange:t=>{const e=t.target;e&&(this._selectedAudioId=e.value,this._capture())},onCancel:()=>{this.historyBack()},onShot:()=>{this.telemetryManager.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{event:"shot-camera",node:this.tagName,tabId:this._activeTab}}}),this._shot()},onRequestPermissions:()=>this._capture(),onStartCamera:()=>{this.telemetryManager.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{event:"start-camera",node:this.tagName,tabId:this._activeTab}}}),this._chooseActionWithCamera()},onStartRecording:()=>this._startRecording(),onStopRecording:()=>this._stopRecording(),onToggleRecording:()=>this._toggleRecording(),onToggleAudio:()=>this._toggleEnableAudio(),onRetake:()=>{this.telemetryManager.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{event:"retake-camera",node:this.tagName,tabId:this._activeTab}}}),this._retake()},onAccept:()=>{this.telemetryManager.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{event:"accept-camera",node:this.tagName,tabId:this._activeTab}}}),this._accept()},onClickTab:t=>{const e=t.currentTarget,r=e?.getAttribute("data-id");r&&this._handleActiveTab(r)}}}_chooseActionWithCamera=()=>{if(this._activeTab===Qn.PHOTO&&this._shot(),this._activeTab===Qn.VIDEO){if("recording"===this._mediaRecorder?.state)return void this._stopRecording();this._startRecording()}};_updateTimer=()=>{const t=Math.floor((performance.now()-this.$._startTime+this.$._elapsedTime)/1e3);if("number"==typeof this.cfg.maxVideoRecordingDuration&&this.cfg.maxVideoRecordingDuration>0){const e=this.cfg.maxVideoRecordingDuration-t;if(e<=0){const t=this.ref.timer;return t&&(t.textContent=pa(e)),void this._stopRecording()}const r=this.ref.timer;r&&(r.textContent=pa(e))}else{const e=this.ref.timer;e&&(e.textContent=pa(t))}this._animationFrameId=requestAnimationFrame(this._updateTimer)};_startTimer=()=>{this.$._startTime=performance.now(),this.$._elapsedTime=0,this._updateTimer()};_stopTimer=()=>{this._animationFrameId&&cancelAnimationFrame(this._animationFrameId)};_startTimeline=()=>{const t=this.ref.video;if(!t)return;const e=t.currentTime,r=t.duration||1,o=this.ref.line;o&&(o.style.transform=`scaleX(${e/r})`);const i=this.ref.timer;i&&(i.textContent=pa(e)),this._animationFrameId=requestAnimationFrame(this._startTimeline)};_stopTimeline=()=>{this._animationFrameId&&cancelAnimationFrame(this._animationFrameId)};_animationFrameId=null;_startRecording=()=>{try{this._chunks=[],this._options={...this.cfg.mediaRecorderOptions};const{mimeType:t}=this.cfg.mediaRecorderOptions||{};t&&MediaRecorder.isTypeSupported(t)?this._options.mimeType=t:MediaRecorder.isTypeSupported(ma)?this._options.mimeType=ma:this._options.mimeType="video/mp4",this._stream&&(this._mediaRecorder=new MediaRecorder(this._stream,this._options),this._mediaRecorder.start(),this._mediaRecorder.addEventListener("dataavailable",t=>{this._chunks.push(t.data)}),this._startTimer(),this.classList.add("uc-recording"),this._setCameraState(ta.PLAY))}catch(t){console.error("Failed to start recording",t),this.telemetryManager.sendEventError(t,"camera recording. Failed to start recording")}};_stopRecording=()=>{this._mediaRecorder?.addEventListener("stop",()=>{this._previewVideo(),this._stopTimer(),this._setCameraState(ta.STOP)}),this._mediaRecorder?.stop(),this.classList.remove("uc-recording"),this.telemetryManager.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{event:"stop-camera",node:this.tagName,tabId:this._activeTab}}})};_toggleRecording=()=>{"recording"!==this._mediaRecorder?.state&&(!this.ref.video.paused&&!this.ref.video.ended&&this.ref.video.readyState>2?this.ref.video.pause():this.ref.video.paused&&this.ref.video.play())};_toggleEnableAudio=()=>{this._stream?.getAudioTracks().forEach(t=>{t.enabled=!t.enabled,this.$.toggleMicrophoneIcon=t.enabled?"microphone":"microphone-mute",this.$.audioSelectDisabled=!t.enabled})};_previewVideo=()=>{try{const t=new Blob(this._chunks,{type:this._mediaRecorder?.mimeType}),e=URL.createObjectURL(t),r=this.ref.video;if(!r)return;r.muted=!1,r.volume=1,this.$.video=null,r.src=e,r.addEventListener("play",()=>{this._startTimeline(),this.set$({currentTimelineIcon:"pause"})}),r.addEventListener("pause",()=>{this.set$({currentTimelineIcon:"play"}),this._stopTimeline()})}catch(t){console.error("Failed to preview video",t),this.telemetryManager.sendEventError(t,"camera previewing. Failed to preview video")}};_retake=()=>{if(this._setCameraState(ta.RETAKE),this._activeTab===Qn.VIDEO){this.$.video=this._stream;const t=this.ref.video;t&&(t.muted=!0)}this.ref.video?.play?.()};_accept=()=>{if(this._setCameraState(ta.ACCEPT),this._activeTab===Qn.PHOTO)return void this._canvas?.toBlob(t=>{if(!t)return;const e=this._createFile("camera","jpeg",ga,t);this._toSend(e)},ga);const t=new Blob(this._chunks,{type:this._mediaRecorder?.mimeType}),e=this._guessExtensionByMime(this._mediaRecorder?.mimeType),r=this._createFile("video",e,`video/${e}`,t);this._toSend(r),this._chunks=[]};_handlePhoto=t=>{t===ta.SHOT&&this.set$({tabVideoHidden:!0,cameraHidden:!0,tabCameraHidden:!0,cameraActionsHidden:!1,cameraSelectHidden:!0}),t!==ta.RETAKE&&t!==ta.ACCEPT||this.set$({tabVideoHidden:!this._cameraModes.includes(Qn.VIDEO),tabCameraHidden:!this._cameraModes.includes(Qn.PHOTO),cameraHidden:!1,cameraActionsHidden:!0,cameraSelectHidden:this._cameraDevices.length<=1})};_handleVideo=t=>{t===ta.PLAY&&this.set$({timerHidden:!1,tabCameraHidden:!0,cameraSelectHidden:!0,audioSelectHidden:!0,currentTimelineIcon:"pause",currentIcon:"square",mutableClassButton:"uc-shot-btn uc-camera-action uc-stop-record"}),t===ta.STOP&&this.set$({timerHidden:!1,cameraHidden:!0,audioToggleMicrophoneHidden:!0,cameraActionsHidden:!1}),t!==ta.RETAKE&&t!==ta.ACCEPT||this.set$({timerHidden:!0,tabVideoHidden:!this._cameraModes.includes(Qn.VIDEO),tabCameraHidden:!this._cameraModes.includes(Qn.PHOTO),cameraHidden:!1,cameraActionsHidden:!0,audioToggleMicrophoneHidden:!this.cfg.enableAudioRecording,currentIcon:"video-camera-full",mutableClassButton:"uc-shot-btn uc-camera-action",audioSelectHidden:!this.cfg.enableAudioRecording||this._audioDevices.length<=1,cameraSelectHidden:this._cameraDevices.length<=1})};_setCameraState=t=>{this._activeTab!==Qn.PHOTO||"shot"!==t&&"retake"!==t&&"accept"!==t||this._handlePhoto(t),this._activeTab!==Qn.VIDEO||"play"!==t&&"stop"!==t&&"retake"!==t&&"accept"!==t&&"pause"!==t&&"resume"!==t||this._handleVideo(t)};_shot(){if(this._setCameraState("shot"),this._canvas=document.createElement("canvas"),this._ctx=this._canvas.getContext("2d"),!this._ctx)throw new Error("Failed to get canvas context");this._canvas.height=this.ref.video.videoHeight,this._canvas.width=this.ref.video.videoWidth,this.cfg.cameraMirror&&(this._ctx.translate(this._canvas.width,0),this._ctx.scale(-1,1)),this._ctx.drawImage(this.ref.video,0,0),this.ref.video.pause()}_handleActiveTab=t=>{const e=this.ref.switcher;e?.querySelectorAll("button").forEach(e=>{e.classList.toggle("uc-active",e.getAttribute("data-id")===t)}),t===Qn.PHOTO&&this.set$({currentIcon:"camera-full",audioSelectHidden:!0,audioToggleMicrophoneHidden:!0}),t===Qn.VIDEO&&this.set$({currentTimelineIcon:"play",currentIcon:"video-camera-full",audioSelectHidden:!this.cfg.enableAudioRecording||this._audioDevices.length<=1,audioToggleMicrophoneHidden:!this.cfg.enableAudioRecording}),this.telemetryManager.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{event:"camera-tab-switch",node:this.tagName,tabId:t}}}),this._activeTab=t};_createFile=(t,e,r,o)=>{const i=Date.now();return new File([o],`${t}-${i}.${e}`,{lastModified:i,type:r})};_guessExtensionByMime(t){const e={mp4:"mp4",ogg:"ogg",webm:"webm",quicktime:"mov","x-matroska":"mkv"};if(""===t)return"webm";if(t){const r=t.split("/");if("video"===r?.[0]){const t=r.slice(1).join("/"),o=t?.split(";")[0];if(o&&e[o])return e[o]}}return"avi"}_toSend=t=>{this.api.addFileFromObject(t,{source:kn.CAMERA}),this.set$({"*currentActivity":tn.activities.UPLOAD_LIST}),this.modalManager?.open(tn.activities.UPLOAD_LIST)};get _cameraModes(){return ii(this.cfg.cameraModes).filter(t=>t===Qn.PHOTO||t===Qn.VIDEO)}_setPermissionsState=jo(t=>{this.classList.toggle("uc-initialized","granted"===t);const e=this._activeTab===Qn.VIDEO&&this.cfg.enableAudioRecording,r=this._activeTab===Qn.PHOTO?"camera-full":"video-camera-full";"granted"===t?this.set$({videoHidden:!1,cameraHidden:!1,tabCameraHidden:!this._cameraModes.includes(Qn.PHOTO),tabVideoHidden:!this._cameraModes.includes(Qn.VIDEO),messageHidden:!0,timerHidden:!0,currentIcon:r,audioToggleMicrophoneHidden:!e,audioSelectHidden:!e}):"prompt"===t?(this.$.l10nMessage="camera-permissions-prompt",this.set$({videoHidden:!0,cameraHidden:!0,tabCameraHidden:!0,messageHidden:!1}),this._stopCapture()):(this.$.l10nMessage="camera-permissions-denied",this.set$({videoHidden:!0,messageHidden:!1,tabCameraHidden:!this._cameraModes.includes(Qn.PHOTO),tabVideoHidden:!this._cameraModes.includes(Qn.VIDEO),cameraActionsHidden:!0,mutableClassButton:"uc-shot-btn uc-camera-action"}),this._stopCapture())},300);_makeStreamInactive=()=>{if(!this._stream)return!1;const t=this._stream?.getAudioTracks(),e=this._stream?.getVideoTracks();return t.forEach(t=>{t.stop()}),e.forEach(t=>{t.stop()}),!0};_stopCapture=()=>{if(this._capturing){this.ref.video.volume=0;const t=this.$.video?.getTracks?.();t?.[0]?.stop(),this.$.video=null,this._makeStreamInactive(),this._stopTimer(),this._capturing=!1}};_capture=async()=>{const t={video:{...da},audio:!!this.cfg.enableAudioRecording&&{}};this._selectedCameraId&&(t.video={deviceId:{exact:this._selectedCameraId}}),this._selectedAudioId&&this.cfg.enableAudioRecording&&(t.audio={deviceId:{exact:this._selectedAudioId}}),this.ref.video&&(this.ref.video.volume=0);try{this._setPermissionsState("prompt"),this._stream=await navigator.mediaDevices.getUserMedia(t),this._stream.addEventListener("inactive",()=>{this._setPermissionsState("denied")}),this.$.video=this._stream,this._capturing=!0,this._setPermissionsState("granted")}catch(t){this._setPermissionsState("denied"),console.log("Failed to capture camera",t),this.telemetryManager.sendEventError(t,"camera capturing. Failed to capture camera")}};_handlePermissionsChange=()=>{this._capture()};_permissionAccess=async()=>{try{for(const t of ha){const e=await navigator.permissions.query({name:t});this._permissionResponses[t]=e,e.addEventListener("change",this._handlePermissionsChange)}}catch(t){console.log("Failed to use permissions API. Fallback to manual request mode.",t),this.telemetryManager.sendEventError(t,"camera permissions. Failed to use permissions API"),this._capture()}};_getPermission=()=>{};_requestDeviceAccess=async()=>{try{await navigator.mediaDevices.getUserMedia({video:!0,audio:this.cfg.enableAudioRecording}),await this._getDevices(),navigator.mediaDevices.addEventListener("devicechange",this._getDevices)}catch(t){this.telemetryManager.sendEventError(t,"camera devices. Failed to get user media"),console.log("Failed to get user media",t)}};_getDevices=async()=>{try{const t=await navigator.mediaDevices.enumerateDevices();this._cameraDevices=t.filter(t=>"videoinput"===t.kind).map((t,e)=>({text:t.label.trim()||`${this.l10n("caption-camera")} ${e+1}`,value:t.deviceId})),this._audioDevices=this.cfg.enableAudioRecording?t.filter(t=>"audioinput"===t.kind).map(t=>({text:t.label.trim(),value:t.deviceId})):[],this._cameraDevices.length>1&&this.set$({cameraSelectOptions:this._cameraDevices,cameraSelectHidden:!1}),this._selectedCameraId=this._cameraDevices[0]?.value??null,this._audioDevices.length>1&&this.set$({audioSelectOptions:this._audioDevices,audioSelectHidden:!1}),this._selectedAudioId=this._audioDevices[0]?.value??null}catch(t){this.telemetryManager.sendEventError(t,"camera devices. Failed to get devices"),console.log("Failed to get devices",t)}};_onActivate=async()=>{await this._permissionAccess(),await this._requestDeviceAccess(),await this._capture(),this._handleCameraModes(this._cameraModes)};_onDeactivate=async()=>{this._unsubPermissions&&this._unsubPermissions();Boolean(window.chrome)||this._setPermissionsState("denied"),this._stopCapture()};_handleCameraModes=t=>{this.$.tabVideoHidden=!t.includes(Qn.VIDEO),this.$.tabCameraHidden=!t.includes(Qn.PHOTO);const e=t[0];!e||this._activeTab&&t.includes(this._activeTab)||this._handleActiveTab(e)};initCallback(){super.initCallback(),this.registerActivity(this.activityType,{onActivate:this._onActivate,onDeactivate:this._onDeactivate}),this.subConfigValue("cameraMirror",t=>{this.$.videoTransformCss=t?"scaleX(-1)":null}),this.subConfigValue("enableAudioRecording",t=>{this.$.audioToggleMicrophoneHidden=!t,this.$.audioSelectDisabled=!t}),this.subConfigValue("cameraModes",t=>{if(!this.isActivityActive)return;const e=Ho(t);this._handleCameraModes(e.filter(t=>t===Qn.PHOTO||t===Qn.VIDEO))})}_destroy(){for(const t of ha)this._permissionResponses[t]?.removeEventListener("change",this._handlePermissionsChange);navigator.mediaDevices?.removeEventListener("devicechange",this._getDevices)}async destroyCallback(){super.destroyCallback(),this._destroy()}};fa.template='\n <uc-activity-header>\n <button\n type="button"\n class="uc-mini-btn"\n set="onclick: *historyBack"\n l10n="@title:back"\n >\n <uc-icon name="back"></uc-icon>\n </button>\n <div set="@hidden: !cameraSelectHidden">\n <uc-icon name="camera"></uc-icon>\n <span l10n="caption-camera"></span>\n </div>\n <uc-select\n class="uc-camera-select"\n set="$.options: cameraSelectOptions; @hidden: cameraSelectHidden; onchange: onCameraSelectChange"\n >\n </uc-select>\n <button\n type="button"\n class="uc-mini-btn uc-close-btn"\n set="onclick: *closeModal"\n l10n="@title:a11y-activity-header-button-close;@aria-label:a11y-activity-header-button-close"\n >\n <uc-icon name="close"></uc-icon>\n </button>\n </uc-activity-header>\n <div class="uc-content">\n <video\n muted\n autoplay\n playsinline\n set="srcObject: video; style.transform: videoTransformCss; @hidden: videoHidden"\n ref="video"\n ></video>\n <div class="uc-message-box" set="@hidden: messageHidden">\n <span l10n="l10nMessage"></span>\n <button\n type="button"\n set="onclick: onRequestPermissions; @hidden: requestBtnHidden"\n l10n="camera-permissions-request"\n ></button>\n </div>\n </div>\n\n <div class="uc-controls">\n <div ref="switcher" class="uc-switcher" set="@hidden:!timerHidden">\n <button\n data-id="photo"\n type="button"\n class="uc-switch uc-mini-btn"\n set="onclick: onClickTab; @hidden: tabCameraHidden"\n >\n <uc-icon name="camera"></uc-icon>\n </button>\n <button\n data-id="video"\n type="button"\n class="uc-switch uc-mini-btn"\n set="onclick: onClickTab; @hidden: tabVideoHidden"\n >\n <uc-icon name="video-camera"></uc-icon>\n </button>\n </div>\n\n <button\n class="uc-secondary-btn uc-recording-timer"\n set="@hidden:timerHidden; onclick: onToggleRecording"\n >\n <uc-icon set="@name: currentTimelineIcon"></uc-icon>\n <span ref="timer"> 00:00 </span>\n <span ref="line" class="uc-line"></span>\n </button>\n\n <div\n class="uc-camera-actions uc-camera-action"\n set="@hidden: cameraActionsHidden"\n >\n <button type="button" class="uc-secondary-btn" set="onclick: onRetake">\n Retake\n </button>\n <button\n type="button"\n class="uc-primary-btn"\n set="onclick: onAccept"\n data-testid="accept"\n >\n Accept\n </button>\n </div>\n\n <button\n type="button"\n class="uc-shot-btn uc-camera-action"\n data-testid="shot"\n set="onclick: onStartCamera; @class: mutableClassButton; @hidden: cameraHidden;"\n >\n <uc-icon set="@name: currentIcon"></uc-icon>\n </button>\n\n <div class="uc-select">\n <button\n class="uc-mini-btn uc-btn-microphone"\n set="onclick: onToggleAudio; @hidden: audioToggleMicrophoneHidden;"\n >\n <uc-icon set="@name:toggleMicrophoneIcon"></uc-icon>\n </button>\n\n <uc-select\n class="uc-audio-select"\n set="$.options: audioSelectOptions; onchange: onAudioSelectChange; @hidden: audioSelectHidden; @disabled: audioSelectDisabled"\n >\n </uc-select>\n </div>\n </div>\n';var ba="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";function va(...t){return t.reduce((t,e)=>{if("string"==typeof e)return t[e]=!0,t;for(const r of Object.keys(e))t[r]=e[r];return t},{})}function ya(...t){const e=va(...t);return Object.keys(e).reduce((t,r)=>(e[r]&&t.push(r),t),[]).join(" ")}var wa=t=>gi.includes(t);var _a=`\n <svg width='0' height='0' style='position:absolute'><symbol fill='none' viewBox='0 0 9 6' id='uc-icon-arrow-dropdown' xmlns='http://www.w3.org/2000/svg'><path stroke='currentColor' d='m1.5 1.667 3 2.666 3-2.666' opacity='.5'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-aspect-ratio' xmlns='http://www.w3.org/2000/svg'/><symbol viewBox='0 0 20 20' id='uc-icon-brightness' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M15 10a5 5 0 0 1-5 5m5-5a5 5 0 0 0-5-5m5 5h-5m0 5a5 5 0 0 1 0-10m0 10V5m0 15v-3M2.93 2.929 5.05 5.05M0 10h3m-.07 7.071 2.12-2.121M10 0v3m7.07 14.071-2.12-2.121M20 10h-3m.07-7.071L14.95 5.05m-.626 2.45H10m4.324 5H10'/></symbol><symbol fill='currentColor' viewBox='0 0 20 20' id='uc-icon-closeMax' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' d='M8.232 10 3.585 5.353l1.768-1.768L10 8.232l4.648-4.647 1.767 1.768L11.768 10l4.647 4.648-1.767 1.767L10 11.768l-4.647 4.647-1.768-1.767L8.232 10Z' clip-rule='evenodd'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-contrast' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M2 10a8 8 0 1 0 16 0 8 8 0 1 0-16 0m8-8v16m8-8h-8m7.598 2.5H10m6.24 2.5H10m7.6-7.5H10M16.242 5H10'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-crop' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M20 14H7.005C6.45 14 6 13.55 6 12.995V0M0 6h13.067c.515 0 .933.418.933.933V20M14.5.4 13 2l1.5 1.6M13 2h2a3 3 0 0 1 3 3v2M5.5 19.6 7 18l-1.5-1.6M7 18H5a3 3 0 0 1-3-3v-2'/></symbol><symbol fill='currentColor' viewBox='0 0 20 20' id='uc-icon-done' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' d='m18.057 6.333-9.365 9.125a1.25 1.25 0 0 1-1.768-.023L1.92 10.296l1.791-1.744 4.132 4.243 8.47-8.253 1.744 1.79Z' clip-rule='evenodd'/></symbol><symbol fill='currentColor' viewBox='0 0 25 24' id='uc-icon-edit-file' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' d='M18.558 2.804a.78.78 0 0 0-.557.235l-.008.007-2.472 2.46 3.847 3.848 2.46-2.473.004-.003a.78.78 0 0 0 0-1.108l-.004-.003-2.712-2.728a.78.78 0 0 0-.558-.235Zm-.248 7.613-3.852-3.852-8.93 8.887-1.516 5.41 5.41-1.515 8.888-8.93Zm-.636-8.934a2.28 2.28 0 0 1 2.512.505l2.702 2.717.002.002a2.278 2.278 0 0 1 0 3.234l-.002.002-12.541 12.602a.75.75 0 0 1-.33.193l-6.884 1.928a.75.75 0 0 1-.925-.924l1.928-6.885a.75.75 0 0 1 .193-.33l12.603-12.54a2.28 2.28 0 0 1 .742-.504Z' clip-rule='evenodd'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-enhance' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M19 13h-2m0 0a4 4 0 0 1-4-4m4 4a4 4 0 0 0-4 4m0-8V7m0 2a4 4 0 0 1-4 4m-2 0h2m0 0a4 4 0 0 1 4 4m0 0v2M8 8.5H6.5m0 0a2 2 0 0 1-2-2m2 2a2 2 0 0 0-2 2m0-4V5m0 1.5a2 2 0 0 1-2 2M1 8.5h1.5m0 0a2 2 0 0 1 2 2m0 0V12M12 3h-1m0 0a1 1 0 0 1-1-1m1 1a1 1 0 0 0-1 1m0-2V1m0 1a1 1 0 0 1-1 1M8 3h1m0 0a1 1 0 0 1 1 1m0 0v1'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-exposure' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M10 20v-3M2.93 2.929 5.05 5.05M0 10h3m-.07 7.071 2.12-2.121M10 0v3m7.07 14.071-2.12-2.121M20 10h-3m.07-7.071L14.95 5.05M5 10a5 5 0 1 0 10 0 5 5 0 1 0-10 0'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-filters' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M4.5 6.5a5.5 5.5 0 1 0 11 0 5.5 5.5 0 1 0-11 0m-3.5 6a5.5 5.5 0 1 0 11 0 5.5 5.5 0 1 0-11 0m7 0a5.5 5.5 0 1 0 11 0 5.5 5.5 0 1 0-11 0'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-flip' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M19.6 5 18 3.5 16.4 5m3.2 10L18 16.5 16.4 15M18 3.523v12.954M3.3 8.5h10.654c.301 0 .415-.395.159-.554L3.459 1.286A.3.3 0 0 0 3 1.542V8.2a.3.3 0 0 0 .3.3zm0 3h10.654c.301 0 .415.395.159.554l-10.654 6.66A.3.3 0 0 1 3 18.458v-6.66a.3.3 0 0 1 .3-.3z'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-gamma' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M17 3C9 6 2.5 11.5 2.5 17.5m0 0h1m-1 0v-1m14 1h1m-3 0h1m-3 0h1m-3 0h1m-3 0h1m-3 0h1m-3 0h1m-3-14v-1m0 3v-1m0 3v-1m0 3v-1m0 3v-1m0 3v-1m0 3v-1'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-mirror' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M5 .4 3.5 2 5 3.6M15 .4 16.5 2 15 3.6M3.52 2h12.957M8.5 16.7V6.046c0-.301-.394-.415-.554-.159L1.287 16.541a.3.3 0 0 0 .255.459H8.2a.3.3 0 0 0 .3-.3zm3 0V6.046c0-.301.395-.415.555-.159l6.659 10.654a.3.3 0 0 1-.255.459H11.8a.3.3 0 0 1-.3-.3z'/></symbol><symbol viewBox='0 0 40 40' id='uc-icon-original' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.5' d='M0 40 40 0'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-rotate' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M13.5.4 12 2l1.5 1.6M12.023 2H14.4A3.6 3.6 0 0 1 18 5.6V8M4 17h9a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1z'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-sad' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M2 17c4.418-4 11.582-4 16 0M16.5 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-11 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-saturation' xmlns='http://www.w3.org/2000/svg'><defs><linearGradient id='ruc-icon-id__a' x1='10.001' y1='1' x2='10.001' y2='19' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient></defs><circle cx='10.001' cy='10' r='9' transform='rotate(90 10 10)' fill='url(#ruc-icon-id__a)'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-slider' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M0 10h11m0 0a2 2 0 1 0 4 0m-4 0a2 2 0 1 1 4 0m0 0h5'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-tuning' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M8 10h11M1 10h4M1 4.5h11m3 0h4m-18 11h11m3 0h4m-7-11a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0M5 10a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0m7 5.5a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-vibrance' xmlns='http://www.w3.org/2000/svg'><path d='M2.125 5.64A8.96 8.96 0 0 0 1.001 10a8.96 8.96 0 0 0 1.124 4.36V5.64z' fill='url(#uuc-icon-id__a)'/><path d='M2.875 15.499V4.502a9.053 9.053 0 0 1 1.75-1.72v14.437a9.05 9.05 0 0 1-1.75-1.72z' fill='url(#uuc-icon-id__b)'/><path d='M5.375 17.722c.548.33 1.134.601 1.75.809V1.469a8.956 8.956 0 0 0-1.75.81v15.443z' fill='url(#uuc-icon-id__c)'/><path d='M7.875 1.253v17.495c.564.136 1.15.22 1.75.244V1.008a9 9 0 0 0-1.75.245z' fill='url(#uuc-icon-id__d)'/><path d='M10.375 1.008v17.984a9 9 0 0 0 1.75-.244V1.252a9 9 0 0 0-1.75-.244z' fill='url(#uuc-icon-id__e)'/><path d='M12.875 1.469V18.53a8.957 8.957 0 0 0 1.75-.808V2.277a8.957 8.957 0 0 0-1.75-.808z' fill='url(#uuc-icon-id__f)'/><path d='M15.375 2.78v14.44a9.053 9.053 0 0 0 1.75-1.72v-11a9.054 9.054 0 0 0-1.75-1.72z' fill='url(#uuc-icon-id__g)'/><path d='M17.875 5.638v8.724A8.959 8.959 0 0 0 19.001 10a8.96 8.96 0 0 0-1.126-4.362z' fill='url(#uuc-icon-id__h)'/><defs><linearGradient id='uuc-icon-id__a' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__b' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__c' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__d' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__e' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__f' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__g' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__h' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient></defs></symbol><symbol viewBox='0 0 20 20' id='uc-icon-warmth' xmlns='http://www.w3.org/2000/svg'><path d='m7.5 13.05.429.42.171-.175v-.244h-.6zm5 0h-.6v.245l.172.175.428-.42zM8.1 3.5c0-1.05.85-1.9 1.9-1.9V.4a3.1 3.1 0 0 0-3.1 3.1h1.2zm0 9.55V3.5H6.9v9.55h1.2zm-1 2.45c0-.79.315-1.506.829-2.03l-.858-.84A4.088 4.088 0 0 0 5.9 15.5h1.2zm2.9 2.9a2.9 2.9 0 0 1-2.9-2.9H5.9a4.1 4.1 0 0 0 4.1 4.1v-1.2zm2.9-2.9a2.9 2.9 0 0 1-2.9 2.9v1.2a4.1 4.1 0 0 0 4.1-4.1h-1.2zm-.829-2.03c.514.524.829 1.24.829 2.03h1.2c0-1.117-.447-2.13-1.171-2.87l-.858.84zM11.9 3.5v9.55h1.2V3.5h-1.2zM10 1.6c1.05 0 1.9.85 1.9 1.9h1.2A3.1 3.1 0 0 0 10 .4v1.2z' fill='currentColor'/><path d='M10 14V8' stroke='currentColor' stroke-width='1.2' stroke-linecap='round'/><path d='M14 3h3m-3 3h3m-3 3h3m-8 6.5a1 1 0 1 0 2 0 1 1 0 1 0-2 0' stroke='currentColor' stroke-width='1.2'/></symbol></svg>\n <div class="uc-wrapper uc-wrapper_desktop">\n <uc-presence-toggle class="uc-network_problems_splash" set="visible: presence.networkProblems;">\n <div class="uc-network_problems_content">\n <div class="uc-network_problems_icon">\n <uc-icon name="sad"></uc-icon>\n </div>\n <div class="uc-network_problems_text">Network error</div>\n </div>\n <div class="uc-network_problems_footer">\n <uc-btn-ui theme="primary" text="Retry" set="onclick: *on.retryNetwork"></uc-btn-ui>\n </div>\n </uc-presence-toggle>\n <div class="uc-viewport">\n <div class="uc-file_type_outer">\n <div class="uc-file_type">{{fileType}}</div>\n </div>\n <div class="uc-image_container" ref="img-container-el">\n <img src="${ba}" class="uc-image uc-image_visible_from_editor" ref="img-el" />\n <uc-editor-image-cropper ref="cropper-el"></uc-editor-image-cropper>\n <uc-editor-image-fader ref="fader-el"></uc-editor-image-fader>\n </div>\n <div class="uc-info_pan">{{msg}}</div>\n </div>\n <div class="uc-toolbar">\n <uc-line-loader-ui set="active: showLoader"></uc-line-loader-ui>\n <div class="uc-toolbar_content uc-toolbar_content__editor">\n <uc-editor-toolbar></uc-editor-toolbar>\n </div>\n </div>\n </div>\n`,ka=class extends Yi{ctxOwner=!0;static styleAttrs=["uc-cloud-image-editor"];_debouncedShowLoader=jo(this._showLoader.bind(this),300);constructor(){var t;super(),this.init$={...this.init$,...(t=this,{"*originalUrl":null,"*faderEl":null,"*cropperEl":null,"*imgEl":null,"*imgContainerEl":null,"*networkProblems":!1,"*imageSize":null,"*editorTransformations":{},"*cropPresetList":[],"*currentAspectRatio":null,"*tabList":gi,"*tabId":pi.CROP,entry:null,extension:null,editorMode:!1,modalCaption:"",isImage:!1,msg:"",src:ba,fileType:"",showLoader:!1,uuid:null,cdnUrl:null,cropPreset:"",tabs:qo([...gi]),"presence.networkProblems":!1,"presence.modalCaption":!0,"presence.editorToolbar":!1,"presence.viewerToolbar":!0,"*on.retryNetwork":()=>{const e=t.querySelectorAll("img");for(const t of e){const e=t.src;t.src=ba,t.src=e}t.$["*networkProblems"]=!1},"*on.apply":e=>{if(!e)return;const r=t.$["*originalUrl"],o=Wo(si(e),"preview"),i={originalUrl:r,cdnUrlModifiers:o,cdnUrl:ri(r,o),transformations:e};t.dispatchEvent(new CustomEvent("apply",{detail:i,bubbles:!0,composed:!0})),t.remove()},"*on.cancel":()=>{t.remove(),t.dispatchEvent(new CustomEvent("cancel",{bubbles:!0,composed:!0}))}})}}_showLoader(t){this.$.showLoader=t}_waitForSize(){return new Promise((t,e)=>{const r=window.setTimeout(()=>{e(new Error("[cloud-image-editor] timeout waiting for non-zero container size"))},3e3),o=new ResizeObserver(e=>{const[i]=e;i&&i.contentRect.width>0&&i.contentRect.height>0&&(window.clearTimeout(r),o.disconnect(),window.setTimeout(()=>t(),0))});o.observe(this)})}initCallback(){super.initCallback(),this.$["*faderEl"]=this.ref["fader-el"],this.$["*cropperEl"]=this.ref["cropper-el"],this.$["*imgContainerEl"]=this.ref["img-container-el"],this.initEditor()}async updateImage(){if(this.isConnected){if(await this._waitForSize(),this.$.cdnUrl){const t=this.$.cdnUrl,e=Zo(t),r=oi(t,e);if(r===this.$["*originalUrl"])return;this.$["*originalUrl"]=r;const o=hi(Jo(t));this.$["*editorTransformations"]=o}else{if(!this.$.uuid)throw new Error("No UUID nor CDN URL provided");{const t=oi(this.cfg.cdnCname,this.$.uuid);if(t===this.$["*originalUrl"])return;this.$["*originalUrl"]=t,this.$["*editorTransformations"]={}}}this.$["*tabId"]===pi.CROP?this.$["*cropperEl"]?.deactivate({reset:!0}):this.$["*faderEl"]?.deactivate();try{const t=this.$["*originalUrl"],e=await this.proxyUrl(ri(t,Wo("json"))),r=await fetch(e).then(t=>t.json()),{width:o,height:i}=r;this.$["*imageSize"]={width:o,height:i},this.$["*tabId"]===pi.CROP?this.$["*cropperEl"]?.activate(this.$["*imageSize"]):this.$["*faderEl"]?.activate({url:t})}catch(t){t&&(this.telemetryManager.sendEventError(t,"cloud editor image. Failed to load image info"),console.error("Failed to load image info",t))}}}async initEditor(){try{await this._waitForSize()}catch(t){return void(this.isConnected&&console.error(t.message))}this.ref["img-el"].addEventListener("load",()=>{this._debouncedShowLoader(!1),this.$.src!==ba&&(this.$["*networkProblems"]=!1)}),this.ref["img-el"].addEventListener("error",()=>{this._debouncedShowLoader(!1),this.$["*networkProblems"]=!0}),this.sub("src",t=>{const e=this.ref["img-el"];e.src!==t&&(e.src=t||ba)}),this.sub("tabs",t=>{this.$["*tabList"]=(t=>{if(!t)return gi;const e=Ho(t).filter(wa);return 0===e.length?gi:e})(t)}),this.sub("*tabId",t=>{this.ref["img-el"].className=ya("uc-image",{"uc-image_hidden_to_cropper":t===pi.CROP,"uc-image_hidden_effects":t!==pi.CROP})}),this.classList.add("uc-editor_ON"),this.sub("*networkProblems",t=>{this.$["presence.networkProblems"]=t,this.$["presence.modalCaption"]=!t}),this.sub("*editorTransformations",t=>{if(0===Object.keys(t).length)return;const e=this.$["*originalUrl"],r=Wo(si(t),"preview"),o={originalUrl:e,cdnUrlModifiers:r,cdnUrl:ri(e,r),transformations:t};this.dispatchEvent(new CustomEvent("change",{detail:o,bubbles:!0,composed:!0}))},!1),this.sub("uuid",t=>t&&this.updateImage()),this.sub("cdnUrl",t=>t&&this.updateImage()),this.sub("cropPreset",t=>{const e=yn(t);let r=null;if(this.$.cdnUrl){const t=hi(Jo(this.$.cdnUrl));if(Array.isArray(t?.crop?.dimensions)){const[o,i]=t.crop.dimensions;r=((t,e,r,o=.1)=>{const i=t/e;let n=null,a=1/0;for(const t of r){const[e,r]=[t.width,t.height],o=e/r,s=Math.abs(i-o);s<a&&(a=s,n=t)}if(n){const[t,e]=[n.width,n.height],r=t/e;if(Math.abs(i-r)/r>o)return null}return n})(o,i,e,.1)}}this.$["*cropPresetList"]=e,this.$["*currentAspectRatio"]=r??e?.[0]??null})}};ka.template=_a,ka.bindAttributes({uuid:"uuid","cdn-url":"cdnUrl","crop-preset":"cropPreset",tabs:"tabs"});var xa=class extends Yi{_handlePointerUp;_handlePointerMove;_handleSvgPointerMove;_backdropMaskId=`backdrop-mask-${xe.generate()}`;_backdropMask;_backdropMaskInner;_frameThumbs;_frameGuides;_draggingThumb;_hoverThumb;_dragStartPoint;_dragStartCrop;_frameImage;_guidesHidden=!1;constructor(){super(),this.init$={...this.init$,dragging:!1},this._handlePointerUp=this._handlePointerUp_.bind(this),this._handlePointerMove=this._handlePointerMove_.bind(this),this._handleSvgPointerMove=this._handleSvgPointerMove_.bind(this)}_shouldThumbBeDisabled(t){const e=this.$["*imageBox"];if(!e)return!1;if(""===t&&e.height<=1&&e.width<=1)return!0;const r=e.height<=1&&(t.includes("n")||t.includes("s")),o=e.width<=1&&(t.includes("e")||t.includes("w"));return r||o}_createBackdrop(){const t=this.$["*cropBox"];if(!t)return;const{x:e,y:r,width:o,height:i}=t,n=this.ref["svg-el"],a=ln("mask",{id:this._backdropMaskId}),s=ln("rect",{x:0,y:0,width:"100%",height:"100%",fill:"white"}),c=ln("rect",{x:e,y:r,width:o,height:i,fill:"black"});a.appendChild(s),a.appendChild(c);const l=ln("rect",{x:0,y:0,width:"100%",height:"100%",fill:"var(--color-image-background)","fill-opacity":.85,mask:`url(#${this._backdropMaskId})`});n.appendChild(l),n.appendChild(a),this._backdropMask=a,this._backdropMaskInner=c}_resizeBackdrop(){this._backdropMask&&(this._backdropMask.style.display="none",window.requestAnimationFrame(()=>{this._backdropMask&&(this._backdropMask.style.display="block")}))}_updateBackdrop(){const t=this.$["*cropBox"];if(!t)return;const{x:e,y:r,width:o,height:i}=t;this._backdropMaskInner&&cn(this._backdropMaskInner,{x:e,y:r,width:o,height:i})}_updateFrame(){const t=this.$["*cropBox"];if(t&&this._frameGuides&&this._frameThumbs){for(const e of Object.values(this._frameThumbs)){if(!e)continue;const{direction:r,pathNode:o,interactionNode:i,groupNode:n}=e,a=""===r,s=2===r.length,{x:c,y:l,width:u,height:d}=t;if(a){cn(i,{x:c,y:l,width:u,height:d})}else{const e=bn(Math.min(u,d)/82/2,0,1),n=s?un(t,r,e):dn(t,r,e),a=n.center;if(!a)continue;const c=Math.max(24*bn(Math.min(u,d)/24/3,0,1),6);cn(i,{x:a[0]-c,y:a[1]-c,width:2*c,height:2*c}),cn(o,{d:n.d})}const h=this._shouldThumbBeDisabled(r);n.setAttribute("class",ya("uc-thumb",{"uc-thumb--hidden":h,"uc-thumb--visible":!h}))}cn(this._frameGuides,{x:t.x-.5,y:t.y-.5,width:t.width+1,height:t.height+1})}}_createThumb(t,e){const r=ln("g");r.classList.add("uc-thumb"),r.setAttribute("with-effects","");const o=ln("rect",{fill:"transparent"}),i=ln("path",{stroke:"currentColor",fill:"none","stroke-width":3});r.appendChild(i),r.appendChild(o),t[e]={direction:e,pathNode:i,interactionNode:o,groupNode:r},""===e&&(r.style.cursor="move"),o.addEventListener("pointerdown",this._handlePointerDown.bind(this,e))}_createThumbs(){const t={};for(let e=0;e<3;e++)for(let r=0;r<3;r++){const o=`${["n","","s"][e]}${["w","","e"][r]}`;""!==o&&this._createThumb(t,o)}return this._createThumb(t,""),t}_createGuides(){const t=ln("svg"),e=ln("rect",{x:0,y:0,width:"100%",height:"100%",fill:"none",stroke:"currentColor","stroke-width":1,"stroke-opacity":.5});t.appendChild(e);for(let e=1;e<=2;e++){const r=ln("line",{x1:sn*e+"%",y1:"0%",x2:sn*e+"%",y2:"100%",stroke:"currentColor","stroke-width":1,"stroke-opacity":.3});t.appendChild(r)}for(let e=1;e<=2;e++){const r=ln("line",{x1:"0%",y1:sn*e+"%",x2:"100%",y2:sn*e+"%",stroke:"currentColor","stroke-width":1,"stroke-opacity":.3});t.appendChild(r)}return t.classList.add("uc-guides","uc-guides--semi-hidden"),t}_createFrame(){const t=this.ref["svg-el"],e=document.createDocumentFragment(),r=this._createGuides();e.appendChild(r);const o=this._createThumbs();for(const{groupNode:t}of Object.values(o))e.appendChild(t);t.appendChild(e),this._frameThumbs=o,this._frameGuides=r}_handlePointerDown(t,e){if(!this._frameThumbs)return;const r=this._frameThumbs[t];if(!r)return;if(this._shouldThumbBeDisabled(t))return;const o=this.$["*cropBox"],i=this.ref["svg-el"],{x:n,y:a}=i.getBoundingClientRect(),s=e.x-n,c=e.y-a;this.$.dragging=!0,this._draggingThumb=r,this._dragStartPoint=[s,c],this._dragStartCrop={...o}}_handlePointerUp_(t){this._updateCursor(),this.$.dragging&&(t.stopPropagation(),t.preventDefault(),this.$.dragging=!1)}_handlePointerMove_(t){if(!this.$.dragging||!this._dragStartPoint||!this._draggingThumb)return;t.stopPropagation(),t.preventDefault();const e=this.ref["svg-el"],{x:r,y:o}=e.getBoundingClientRect(),i=t.x-r,n=t.y-o,a=i-this._dragStartPoint[0],s=n-this._dragStartPoint[1],{direction:c}=this._draggingThumb,l=this._calcCropBox(c,[a,s]);l&&(this.$["*cropBox"]=l)}_calcCropBox(t,e){const[r,o]=e,i=this.$["*imageBox"];let n=this._dragStartCrop??this.$["*cropBox"];const a=this.$["*currentAspectRatio"],s=a?a.width/a.height:void 0;if(n=""===t?function({rect:t,delta:[e,r],imageBox:o}){return hn({...t,x:t.x+e,y:t.y+r},o)}({rect:n,delta:[r,o],imageBox:i}):pn({rect:n,delta:[r,o],direction:t,aspectRatio:s,imageBox:i}),Object.values(n).every(t=>Number.isFinite(t)&&t>=0))return hn(fn(n),i);console.error("CropFrame is trying to create invalid rectangle",{payload:n})}_handleSvgPointerMove_(t){if(!this._frameThumbs)return;const e=Object.values(this._frameThumbs).find(e=>{if(!e)return!1;if(this._shouldThumbBeDisabled(e.direction))return!1;const r=e.interactionNode.getBoundingClientRect(),o=function(t,[e,r]){return t.x<=e&&e<=t.x+t.width&&t.y<=r&&r<=t.y+t.height}({x:r.x,y:r.y,width:r.width,height:r.height},[t.x,t.y]);return o});this._hoverThumb=e,this._updateCursor()}_updateCursor(){const t=this._hoverThumb;var e;this.ref["svg-el"].style.cursor=t?""===(e=t.direction)?"move":["e","w"].includes(e)?"ew-resize":["n","s"].includes(e)?"ns-resize":["nw","se"].includes(e)?"nwse-resize":"nesw-resize":"initial"}_createMask(t){if(this._frameImage)return void this._frameImage.setAttribute("href",t);const e=this.ref["svg-el"],r=document.createDocumentFragment(),o=ln("image",{href:t});o.setAttribute("class","uc-cloud-mask"),r.appendChild(o),e.appendChild(r),this._frameImage=o}_updateMask(){const t=this.$["*cropBox"];if(!t||!this._frameImage)return;const{x:e,y:r,width:o,height:i}=t;cn(this._frameImage,{x:e,y:r,height:i,width:o})}_render(){this._updateBackdrop(),this._updateFrame(),this._updateMask()}toggleThumbs(t){if(this._frameThumbs)for(const e of Object.values(this._frameThumbs)){if(!e)continue;const{groupNode:r}=e;r.setAttribute("class",ya("uc-thumb",{"uc-thumb--hidden":!t,"uc-thumb--visible":t}))}}initCallback(){super.initCallback(),this._createBackdrop(),this._createFrame(),this.sub("*imageBox",()=>{this._resizeBackdrop(),window.requestAnimationFrame(()=>{this._render()})}),this.sub("*cropBox",t=>{t&&(this._guidesHidden=t.height<=1||t.width<=1,window.requestAnimationFrame(()=>{this._render()}))}),this.subConfigValue("cloudImageEditorMaskHref",t=>{t&&this._createMask(t)}),this.sub("dragging",t=>{this._frameGuides&&this._frameGuides.setAttribute("class",ya({"uc-guides--hidden":this._guidesHidden,"uc-guides--visible":!this._guidesHidden&&t,"uc-guides--semi-hidden":!this._guidesHidden&&!t}))});this.ref["svg-el"].addEventListener("pointermove",this._handleSvgPointerMove,!0),document.addEventListener("pointermove",this._handlePointerMove,!0),document.addEventListener("pointerup",this._handlePointerUp,!0)}destroyCallback(){super.destroyCallback();this.ref["svg-el"].removeEventListener("pointermove",this._handleSvgPointerMove,!0),document.removeEventListener("pointermove",this._handlePointerMove),document.removeEventListener("pointerup",this._handlePointerUp)}};xa.template=' <svg class="uc-svg" ref="svg-el" xmlns="http://www.w3.org/2000/svg"></svg> ';var Ca=class extends Yi{_titleEl;constructor(){super(),this.init$={...this.init$,active:!1,title:"",icon:"","on.click":null,"title-prop":""}}initCallback(){super.initCallback(),this._titleEl=this.ref["title-el"],this.sub("title",t=>{const e=this._titleEl;e&&(e.style.display=t?"block":"none")}),this.sub("active",t=>{this.className=ya({"uc-active":t,"uc-not_active":!t})}),this.sub("on.click",t=>{this.onclick=t??null})}};Ca.template='\n <button role="option" type="button" set="@aria-label:title-prop;" l10n="@title:title-prop;">\n <uc-icon ref="icon-el" set="@name: icon;"></uc-icon>\n <div class="uc-title" ref="title-el">{{title}}</div>\n </button>\n';var Ea=class extends Ca{initCallback(){super.initCallback(),this.$.icon="arrow-dropdown",this.$["on.click"]=this.handleClick.bind(this),this.sub("*currentAspectRatio",t=>{this.$.title=t.hasFreeform?this.l10n("freeform-crop"):this.l10n("crop-to-shape",{value:`${t.width}:${t.height}`}),this.bindL10n("title-prop",()=>this.$.title)})}handleClick(){this.$["*showListAspectRatio"]=!0}};Ea.template=' \n <button role="option" type="button" set="@aria-label:title-prop;" l10n="@title:title-prop;">\n <div class="uc-title" ref="title-el">{{title}}</div>\n <uc-icon ref="icon-el" set="@name: icon;"></uc-icon>\n </button> \n';var Ta=class extends Ca{constructor(){super(),this.init$={...this.init$,active:!1,once:!1}}initCallback(){super.initCallback(),this.defineAccessor("aspectRatio",t=>{if(!t)return;const e=!!t.hasFreeform;this.$.title=e?this.l10n("custom"):`${t.width}:${t.height}`,e||this._renderRectBasedOnAspectRatio(t),e&&this.setAttribute("uc-aspect-ratio-freeform",""),this._aspectRatio=t,this.bindL10n("title-prop",()=>this.l10n("a11y-cloud-editor-apply-aspect-ratio",{name:e?this.l10n("custom").toLowerCase():this.l10n("crop-to-shape",{value:`${t.width}:${t.height}`}).toLowerCase(),value:""}))}),this.sub("*currentAspectRatio",t=>{this.$.active=t&&t.id===this._aspectRatio?.id||t?.width===this._aspectRatio?.width&&t?.height===this._aspectRatio?.height}),this.$["on.click"]=this.handleClick.bind(this)}handleClick(){const t=this.$["*currentAspectRatio"];t?.id!==this._aspectRatio?.id&&(this.$["*currentAspectRatio"]=this._aspectRatio)}_renderRectBasedOnAspectRatio(t){const{width:e,height:r}=(t=>{let e=12,r=12;return t.width/t.height>=1?(e=12,r=Math.round(12*t.height/t.width)):(r=12,e=Math.round(12*t.width/t.height)),{width:e,height:r}})(t),o=ln("rect",{"stroke-linejoin":"round",fill:"none",stroke:"currentColor","stroke-width":1.2,"fill-rule":"evenodd",x:(16-e)/2,y:(16-r)/2,rx:2,width:e,height:r}),i=this.ref["icon-el"]?.ref?.svg;i&&(i.innerHTML="",i.appendChild(o))}_aspectRatio};var Aa=class extends Ca{_operation=void 0;initCallback(){super.initCallback(),this.defineAccessor("operation",t=>{t&&(this._operation=t,this.$.icon=t,this.bindL10n("title-prop",()=>this.l10n("a11y-cloud-editor-apply-crop",{name:this.l10n(t).toLowerCase()})))}),this.$["on.click"]=t=>{if(!this._operation)return;const e=this.$["*cropperEl"],r=e.getValue(this._operation),o=function(t,e){if("rotate"===t)return function(t){let e=t+90;return e=e>=360?0:e,e}("number"==typeof e?e:0);if("mirror"===t||"flip"===t)return!e;throw new Error(`Unsupported operation: ${t}`)}(this._operation,r);this.telemetryManager.sendEventCloudImageEditor(t,this.$["*tabId"],{operation:this._operation,next:o,prev:r}),e.setValue(this._operation,o)}}};function Ia(t){const e=new Image;return{promise:new Promise((r,o)=>{e.src=t,e.onload=()=>r(),e.onerror=t=>o(t)}),image:e,cancel:()=>{0===e.naturalWidth&&(e.src=ba)}}}function Sa(t){const e=[];for(const r of t){const t=Ia(r);e.push(t)}const r=e.map(t=>t.image);return{promise:Promise.allSettled(e.map(t=>t.promise)),images:r,cancel:()=>{e.forEach(t=>{t.cancel()})}}}var Ma="original",$a=class extends Yi{_operation="filter";_filter;_originalUrl="";constructor(){super(),this.init$={...this.init$,disabled:!1,min:0,max:100,value:0,defaultValue:0,zero:0,"on.input":t=>{const e=this.$["*faderEl"];e?.set(t),this.$.value=t}}}setOperation(t,e){this._operation=t,this._filter=e,this._initializeValues();const r=this.$["*faderEl"],o=this._originalUrl||this.$["*originalUrl"];r&&o&&r.activate({url:o,operation:this._operation,value:this._filter===Ma?void 0:this.$.value,filter:this._filter===Ma?void 0:this._filter,fromViewer:!1})}_initializeValues(){const t=this._operation,{range:e,zero:r}=yi[t],[o,i]=e;this.$.min=o,this.$.max=i,this.$.zero=r;const n=this.$["*editorTransformations"][t];if("filter"===t){let t=Number(i);const e=n;if(e){const{name:r,amount:o}=e;t=r===this._filter?o:i}return this.$.value=t,void(this.$.defaultValue=t)}const a=void 0!==n?n:r;this.$.value=a,this.$.defaultValue=a}apply(){const t={...this.$["*editorTransformations"]};"filter"===this._operation?this._filter&&this._filter!==Ma?t.filter={name:this._filter,amount:this.$.value}:delete t.filter:t[this._operation]=this.$.value,this.$["*editorTransformations"]=t}cancel(){const t=this.$["*faderEl"];t?.deactivate({hide:!1})}initCallback(){super.initCallback(),this.sub("*originalUrl",t=>{this._originalUrl=t}),this.sub("value",t=>{const e=`${this._filter??this._operation} ${t}`;this.$["*operationTooltip"]=e})}};function Oa(t){const e=t.match(/^([A-Za-z]+)\s+(\d+)$/);if(!e)return null;const[,r,o]=e;return r&&void 0!==o?{filter:r,value:Number(o)}:null}$a.template='\n <uc-slider-ui\n ref="slider-el"\n set="disabled: disabled; min: min; max: max; defaultValue: defaultValue; zero: zero; onInput: on.input;"\n ></uc-slider-ui>\n';var La=class extends Ca{_operation="";_filter="";_originalUrl="";_observer;_cancelPreload;constructor(){super(),this.init$={...this.init$,active:!1,title:"",icon:"",isOriginal:!1,iconSize:"20","on.click":null}}_previewSrc(){const t=parseInt(window.getComputedStyle(this).getPropertyValue("--l-base-min-width"),10),e=window.devicePixelRatio,r=Math.ceil(e*t),o=e>=2?"lightest":"normal",i={...this.$["*editorTransformations"]};return i[this._operation]=this._filter!==Ma?{name:this._filter,amount:100}:void 0,ri(this._originalUrl,Wo(ci,si(i),`quality/${o}`,`scale_crop/${r}x${r}/center`))}async _observerCallback(t,e){const r=t[0];if(r?.isIntersecting){const t=await this.proxyUrl(this._previewSrc()),r=this.ref["preview-el"],{promise:o,cancel:i}=Ia(t);this._cancelPreload=i,o.catch(t=>{this.$["*networkProblems"]=!0,console.error("Failed to load image",{error:t})}).finally(()=>{r.style.backgroundImage=`url(${t})`,r.setAttribute("loaded",""),e.unobserve(this)})}else this._cancelPreload?.()}initCallback(){super.initCallback(),this.$["on.click"]=t=>{if(this.$.active){if(!this.$.isOriginal){this.$["*sliderEl"].setOperation(this._operation,this._filter),this.$["*showSlider"]=!0}}else{const t=this.$["*sliderEl"];t.setOperation(this._operation,this._filter),t.apply()}this.telemetryManager.sendEventCloudImageEditor(t,this.$["*tabId"],{operation:Oa(this.$["*operationTooltip"])}),this.$["*currentFilter"]=this._filter},this.defineAccessor("filter",t=>{this._operation="filter",this._filter=t,this.$.isOriginal=t===Ma,this.$.icon=this.$.isOriginal?"original":"slider",this.bindL10n("title-prop",()=>this.l10n("a11y-cloud-editor-apply-filter",{name:t.toLowerCase()}))}),this._observer=new window.IntersectionObserver(this._observerCallback.bind(this),{threshold:[0,1]});const t=this.$["*originalUrl"];if(this._originalUrl=t,this.$.isOriginal){this.ref["icon-el"].classList.add("uc-original-icon")}else this._observer.observe(this);this.sub("*currentFilter",t=>{this.$.active=t&&t===this._filter}),this.sub("isOriginal",t=>{this.$.iconSize=t?40:20}),this.sub("active",t=>{if(this.$.isOriginal)return;this.ref["icon-el"].style.opacity=t?"1":"0";const e=this.ref["preview-el"];t?e.style.opacity="0":e.style.backgroundImage&&(e.style.opacity="1")}),this.sub("*networkProblems",async t=>{if(!t){const t=await this.proxyUrl(this._previewSrc()),e=this.ref["preview-el"];e.style.backgroundImage&&(e.style.backgroundImage="none",e.style.backgroundImage=`url(${t})`)}})}destroyCallback(){super.destroyCallback(),this._observer?.disconnect(),this._cancelPreload?.()}};La.template='\n <button type="button" role="option" l10n="@title:title-prop;@aria-label:title-prop">\n <div class="uc-preview" ref="preview-el"></div>\n <uc-icon ref="icon-el" set="@name: icon; @size: iconSize;"></uc-icon>\n </button>\n';var Ra=(t,e)=>{let r,o=!1,i=0;const n=(...n)=>{o?(r&&clearTimeout(r),r=setTimeout(()=>{Date.now()-i>=e&&(t(...n),i=Date.now())},Math.max(e-(Date.now()-i),0))):(t(...n),i=Date.now(),o=!0)};return Object.defineProperty(n,"cancel",{configurable:!1,writable:!1,enumerable:!1,value:()=>{r&&clearTimeout(r)}}),n};function Ua(t,e,r){const o=window.devicePixelRatio,i=Math.min(Math.ceil(e*o),3e3),n=o>=2?"lightest":"normal";return ri(t,Wo(ci,si(r),`quality/${n}`,`stretch/off/-/resize/${i}x`,`@clib/${Ki}/${Gi}/uc-cloud-image-editor/`))}var Pa=class extends Yi{ctxOwner=!0;_commitDebounced;_handleResizeThrottled;_imageSize={width:0,height:0};_canvas;_ctx=null;_isActive=!1;_observer;_cancelPreload;constructor(){super(),this.init$={...this.init$,image:null,"*padding":20,"*operations":{rotate:0,mirror:!1,flip:!1},"*imageBox":{x:0,y:0,width:0,height:0},"*cropBox":{x:0,y:0,width:0,height:0}},this._commitDebounced=jo(this._commit.bind(this),300),this._handleResizeThrottled=Ra(this._handleResize.bind(this),100)}_handleResize(){this.isConnected&&this._isActive&&(this._initCanvas(),this._syncTransformations(),this._alignImage(),this._alignCrop(),this._draw())}_syncTransformations(){const t=function(t,e){const r={};for(const o of e){const e=t[o];(Object.hasOwn(t,o)||void 0!==e)&&(r[o]=e)}return r}(this.$["*editorTransformations"],Object.keys(this.$["*operations"])),e={...this.$["*operations"],...t};this.$["*operations"]=e}_initCanvas(){const t=this.ref["canvas-el"],e=t.getContext("2d"),r=this.offsetWidth,o=this.offsetHeight,i=window.devicePixelRatio;t.style.width=`${r}px`,t.style.height=`${o}px`,t.width=r*i,t.height=o*i,e?.scale(i,i),this._canvas=t,this._ctx=e}_alignImage(){if(!this._isActive||!this.$.image)return;const t=this.$.image,e=this.$["*padding"],r=this.$["*operations"],{rotate:o}=r,i=this.offsetWidth,n=this.offsetHeight,a=gn({width:t.naturalWidth,height:t.naturalHeight},o);let s;if(a.width>i-2*e||a.height>n-2*e){const t=a.width/a.height;if(t>i/n){const r=i-2*e,o=r/t;s={x:0+e,y:e+(n-2*e)/2-o/2,width:r,height:o}}else{const r=n-2*e,o=r*t;s={x:e+(i-2*e)/2-o/2,y:0+e,width:o,height:r}}}else{const{width:t,height:r}=a;s={x:e+(i-2*e)/2-t/2,y:e+(n-2*e)/2-r/2,width:t,height:r}}this.$["*imageBox"]=fn(s)}_alignCrop(){let t=this.$["*cropBox"];const e=this.$["*imageBox"],r=this.$["*operations"],{rotate:o}=r,i=this.$["*editorTransformations"].crop,{width:n,x:a,y:s}=e;if(i){const{dimensions:[r,c],coords:[l,u]}=i,{width:d}=gn(this._imageSize,o),h=n/d;t=hn(fn({x:a+l*h,y:s+u*h,width:r*h,height:c*h}),e)}const c=this.$["*currentAspectRatio"],l=c?c.width/c.height:void 0;if(p=e,!((h=t).x>=p.x&&h.y>=p.y&&h.x+h.width<=p.x+p.width&&h.y+h.height<=p.y+p.height)||l&&(u=t,d=l,!(Math.abs(u.width/u.height-d)<.1))){const r=e.width/e.height;let o=e.width,i=e.height;l&&(r>l?o=Math.min(e.height*l,e.width):i=Math.min(e.width/l,e.height)),t={x:e.x+e.width/2-o/2,y:e.y+e.height/2-i/2,width:o,height:i}}var u,d,h,p;this.$["*cropBox"]=hn(fn(t),e)}_drawImage(){const t=this._ctx;if(!t)return;const e=this.$.image,r=this.$["*imageBox"],o=this.$["*operations"],{mirror:i,flip:n,rotate:a}=o,s=gn({width:r.width,height:r.height},a);t.save(),t.translate(r.x+r.width/2,r.y+r.height/2),t.rotate(a*Math.PI*-1/180),t.scale(i?-1:1,n?-1:1),t.drawImage(e,-s.width/2,-s.height/2,s.width,s.height),t.restore()}_draw(){if(!(this._isActive&&this.$.image&&this._canvas&&this._ctx))return;const t=this._canvas;this._ctx.clearRect(0,0,t.width,t.height),this._drawImage()}_animateIn({fromViewer:t}){this.$.image&&(this.ref["frame-el"].toggleThumbs(!0),this._transitionToImage(),setTimeout(()=>{this.className=ya({"uc-active_from_viewer":t,"uc-active_from_editor":!t,"uc-inactive_to_editor":!1})}))}_getCropDimensions(){const t=this.$["*cropBox"],e=this.$["*imageBox"],r=this.$["*operations"],{rotate:o}=r,{width:i,height:n}=e,{width:a,height:s}=gn(this._imageSize,o),{width:c,height:l}=t,u=i/a,d=n/s;return[bn(Math.round(c/u),1,a),bn(Math.round(l/d),1,s)]}_getCropTransformation(){const t=this.$["*cropBox"],e=this.$["*imageBox"],r=this.$["*operations"],{rotate:o}=r,{width:i,height:n,x:a,y:s}=e,{width:c,height:l}=gn(this._imageSize,o),{x:u,y:d}=t,h=i/c,p=n/l,g=this._getCropDimensions(),m={dimensions:g,coords:[bn(Math.round((u-a)/h),0,c-g[0]),bn(Math.round((d-s)/p),0,l-g[1])]};if(function(t){if(!t)return!0;const e=[({dimensions:t,coords:e})=>[...t,...e].every(t=>Number.isInteger(t)&&Number.isFinite(t)),({dimensions:t,coords:e})=>t.every(t=>t>0)&&e.every(t=>t>=0)];return e.every(e=>e(t))}(m)){if(g[0]!==c||g[1]!==l)return m}else console.error("Cropper is trying to create invalid crop object",{payload:m})}_commit(){if(!this.isConnected||!this._imageSize)return;const t=this.$["*operations"],{rotate:e,mirror:r,flip:o}=t,i=this._getCropTransformation(),n={...this.$["*editorTransformations"],crop:i,rotate:e,mirror:r,flip:o};this.$["*editorTransformations"]=n}setValue(t,e){this.$["*operations"]={...this.$["*operations"],[t]:e},this._isActive&&(this._alignImage(),this._alignCrop(),this._draw())}getValue(t){return this.$["*operations"][t]}async activate(t,{fromViewer:e}={}){if(!this._isActive){this._isActive=!0,this._imageSize=t,this.removeEventListener("transitionend",this._reset);try{const t=this.$["*originalUrl"],r=this.$["*editorTransformations"];this.$.image=await this._waitForImage(t,r),this._syncTransformations(),this._animateIn({fromViewer:e})}catch(t){console.error("Failed to activate cropper",{error:t}),this.telemetryManager.sendEventError(t,"cloud editor image. Failed to activate cropper")}this._observer=new ResizeObserver(t=>{const[e]=t;if(!e)return;e.contentRect.width>0&&e.contentRect.height>0&&this._isActive&&this.$.image&&this._handleResizeThrottled()}),this._observer.observe(this)}}deactivate({reset:t=!1}={}){this._isActive&&(!t&&this._commit(),this._isActive=!1,this._transitionToCrop(),this.className=ya({"uc-active_from_viewer":!1,"uc-active_from_editor":!1,"uc-inactive_to_editor":!0}),this.ref["frame-el"].toggleThumbs(!1),this.addEventListener("transitionend",this._reset,{once:!0}),this._observer?.disconnect())}_transitionToCrop(){const t=this._getCropDimensions(),e=this.$["*cropBox"],r=Math.min(this.offsetWidth,t[0])/e.width,o=Math.min(this.offsetHeight,t[1])/e.height,i=Math.min(r,o),n=e.x+e.width/2,a=e.y+e.height/2;this.style.transform=`scale(${i}) translate(${(this.offsetWidth/2-n)/i}px, ${(this.offsetHeight/2-a)/i}px)`,this.style.transformOrigin=`${n}px ${a}px`}_transitionToImage(){const t=this.$["*cropBox"],e=t.x+t.width/2,r=t.y+t.height/2;this.style.transform="scale(1)",this.style.transformOrigin=`${e}px ${r}px`}_reset(){this._isActive||(this.$.image=null)}async _waitForImage(t,e){const r=this.offsetWidth;e={...e,crop:void 0,rotate:void 0,flip:void 0,mirror:void 0};const o=await this.proxyUrl(Ua(t,r,e)),{promise:i,cancel:n,image:a}=Ia(o),s=this._handleImageLoading(o);return a.addEventListener("load",s,{once:!0}),a.addEventListener("error",s,{once:!0}),this._cancelPreload?.(),this._cancelPreload=n,i.then(()=>a).catch(t=>(console.error("Failed to load image",{error:t}),this.$["*networkProblems"]=!0,a))}_handleImageLoading(t){const e="crop",r=this.$["*loadingOperations"];let o=r.get(e);return o||(o=new Map,r.set(e,o)),o.get(t)||(o.set(t,!0),this.$["*loadingOperations"]=r),()=>{const o=r.get(e);o?.has(t)&&(o.delete(t),this.$["*loadingOperations"]=r)}}initCallback(){super.initCallback(),this.sub("*imageBox",()=>{this._draw()}),this.sub("*cropBox",()=>{this.$.image&&this._commitDebounced()}),this.sub("*currentAspectRatio",()=>{this._alignCrop()}),setTimeout(()=>{this.sub("*networkProblems",t=>{t||this._isActive&&this.activate(this._imageSize,{fromViewer:!1})})},0)}destroyCallback(){super.destroyCallback(),this._observer?.disconnect()}};function Na(t,e,r){const o=r-1,i=new Array(r);for(let r=o;r>=0;r-=1)i[r]=Math.ceil((r*e+(o-r)*t)/o);return i}function Da(t,e){const r=yi[t].keypointsNumber,{range:o,zero:i}=yi[t];return[...new Set([...Na(o[0],i,r+1),...Na(i,o[1],r+1),i,e])].sort((t,e)=>t-e)}Pa.template='\n <canvas class="uc-canvas" ref="canvas-el"></canvas>\n <uc-crop-frame ref="frame-el"></uc-crop-frame>\n';var za=class extends Yi{_isActive=!1;_hidden=!0;_operation="initial";_filter;_value;_transformations={};_keypoints=[];_container;_previewImage;_cancelLastImages;_cancelBatchPreload;_url;_fromViewer;_raf=0;_addKeypointDebounced=jo(this._addKeypoint.bind(this),600);constructor(){super(),this.classList.add("uc-inactive_to_cropper")}_handleImageLoading(t){const e=this._operation,r=this.$["*loadingOperations"];r.has(e)||r.set(e,new Map);const o=r.get(e);return o&&!o.get(t)&&(o.set(t,!0),this.$["*loadingOperations"]=r),()=>{const o=r.get(e);o?.has(t)&&(o.delete(t),this.$["*loadingOperations"]=r)}}_flush(){window.cancelAnimationFrame(this._raf),this._raf=window.requestAnimationFrame(()=>{for(const t of this._keypoints){const{image:e}=t;e&&(e.style.opacity=t.opacity.toString(),e.style.zIndex=t.zIndex.toString())}})}_imageSrc({url:t=this._url,filter:e=this._filter??void 0,operation:r,value:o}={}){if(!t)throw new Error("URL is not defined");const i={...this._transformations};r&&("filter"===r?e&&"number"==typeof o&&(i.filter={name:e,amount:o}):"number"==typeof o&&(i[r]=o));const n=this.offsetWidth;return this.proxyUrl(Ua(t,n,i))}async _constructKeypoint(t,e){return{src:await this._imageSrc({operation:t,value:e}),image:void 0,opacity:0,zIndex:0,value:e}}_isSame(t,e){return this._operation===t&&this._filter===e}async _addKeypoint(t,e,r){const o=()=>!this._isSame(t,e)||this._value!==r||!!this._keypoints.find(t=>t.value===r);if(o())return;const i=await this._constructKeypoint(t,r),n=new Image;n.src=i.src;const a=this._handleImageLoading(i.src);n.addEventListener("load",a,{once:!0}),n.addEventListener("error",a,{once:!0}),i.image=n,n.classList.add("uc-fader-image"),n.addEventListener("load",()=>{if(o())return;const e=this._keypoints;let a=e.findIndex(t=>t.value>r);-1===a&&(a=e.length);const s=e[a],c=s?.image,l=this._container;!l||c&&!l.contains(c)||(e.splice(a,0,i),c&&l.insertBefore(n,c),this._update(t,r))},{once:!0}),n.addEventListener("error",()=>{this.$["*networkProblems"]=!0},{once:!0})}set(t){const e="string"==typeof t?parseInt(t,10):t;(function(t){return"string"==typeof t&&t in yi})(this._operation)&&Number.isFinite(e)&&(this._update(this._operation,e),this._addKeypointDebounced(this._operation,this._filter,e))}_update(t,e){this._operation=t,this._value=e;const{zero:r}=yi[t],o=this._keypoints.map(t=>t.value),i=function(t,e,r){const o=function(t){const e=[];for(let r=0;r<t.length-1;r+=1){const o=t[r],i=t[r+1];"number"==typeof o&&"number"==typeof i&&e.push([o,i])}return e}(t).find(([t,r])=>t<=e&&e<=r);if(!o)return t.map(()=>0);const[i,n]=o;return t.map(t=>{const o=Math.abs(i-n)||1,a=Math.abs(e-i)/o;return i===t?e>r?1:1-a:n===t?e>=r?a:1:0})}(o,e,r),n=function(t,e){return t.map((r,o)=>r<e?t.length-o:o)}(o,r);this._keypoints.forEach((t,e)=>{const r=i[e],o=n[e];"number"==typeof r&&(t.opacity=r),"number"==typeof o&&(t.zIndex=o)}),this._flush()}_createPreviewImage(){const t=new Image;return t.classList.add("uc-fader-image","uc-fader-image--preview"),t.style.opacity="0",t}async _initNodes(){const t=document.createDocumentFragment();this._previewImage=this._previewImage||this._createPreviewImage();const e=this._previewImage;this.contains(e)||t.appendChild(e);const r=document.createElement("div");t.appendChild(r);const o=this._keypoints.map(t=>t.src),{images:i,promise:n,cancel:a}=Sa(o);i.forEach(t=>{const e=this._handleImageLoading(t.src);t.addEventListener("load",e),t.addEventListener("error",e)}),this._cancelLastImages=()=>{a(),this._cancelLastImages=void 0};const s=this._operation,c=this._filter;await n,this._isActive&&this._isSame(s,c)&&(this._container?.remove(),this._container=r,this._keypoints.forEach((t,e)=>{const r=i[e];r&&(r.classList.add("uc-fader-image"),t.image=r,this._container?.appendChild(r))}),this.appendChild(t),this._flush())}async setTransformations(t){if(this._transformations=t,this._previewImage){const t=await this._imageSrc(),e=this._handleImageLoading(t);this._previewImage.src=t,this._previewImage.addEventListener("load",e,{once:!0}),this._previewImage.addEventListener("error",e,{once:!0}),this._previewImage.style.opacity="1",this._previewImage.addEventListener("error",()=>{this.$["*networkProblems"]=!0},{once:!0})}}async preload({url:t,filter:e,operation:r,value:o}){if(!r||"number"!=typeof o)return;this._cancelBatchPreload?.();const i=Da(r,o),n=await Promise.all(i.map(o=>this._imageSrc({url:t,filter:e,operation:r,value:o}))),{cancel:a}=Sa(n);this._cancelBatchPreload=a}_setOriginalSrc(t){const e=this._previewImage||this._createPreviewImage();if(this.contains(e)||this.appendChild(e),this._previewImage=e,e.src===t)return e.style.opacity="1",e.style.transform="scale(1)",void(this.className=ya({"uc-active_from_viewer":this._fromViewer,"uc-active_from_cropper":!this._fromViewer,"uc-inactive_to_cropper":!1}));e.style.opacity="0";const r=this._handleImageLoading(t);e.addEventListener("error",r,{once:!0}),e.src=t,e.addEventListener("load",()=>{r(),e&&(e.style.opacity="1",e.style.transform="scale(1)",this.className=ya({"uc-active_from_viewer":this._fromViewer,"uc-active_from_cropper":!this._fromViewer,"uc-inactive_to_cropper":!1}))},{once:!0}),e.addEventListener("error",()=>{this.$["*networkProblems"]=!0},{once:!0})}async activate({url:t,operation:e,value:r,filter:o,fromViewer:i}){this._isActive=!0,this._hidden=!1,this._url=t,this._operation=e??"initial",this._value=r,this._filter=o,this._fromViewer=i;if("number"!=typeof r&&!o){const t=await this._imageSrc({operation:e,value:r});return this._setOriginalSrc(t),void this._container?.remove()}e&&"number"==typeof r&&(this._keypoints=await Promise.all(Da(e,r).map(t=>this._constructKeypoint(e,t))),this._update(e,r),this._initNodes())}deactivate({hide:t=!0}={}){this._isActive=!1,this._cancelLastImages?.(),this._cancelBatchPreload?.(),t&&!this._hidden?(this._hidden=!0,this._previewImage&&(this._previewImage.style.transform="scale(1)"),this.className=ya({"uc-active_from_viewer":!1,"uc-active_from_cropper":!1,"uc-inactive_to_cropper":!0}),this.addEventListener("transitionend",()=>{this._container?.remove()},{once:!0})):this._container?.remove()}},Fa=class extends Ca{_operation="";initCallback(){super.initCallback(),this.$["on.click"]=t=>{this.$["*sliderEl"].setOperation(this._operation),this.$["*showSlider"]=!0,this.$["*currentOperation"]=this._operation,this.telemetryManager.sendEventCloudImageEditor(t,this.$["*tabId"],{operation:Oa(this.$["*operationTooltip"])})},this.defineAccessor("operation",t=>{t&&(this._operation=t,this.$.icon=t,this.bindL10n("title-prop",()=>this.l10n("a11y-cloud-editor-apply-tuning",{name:this.l10n(t).toLowerCase()})),this.bindL10n("title",()=>this.l10n(t)))}),this.sub("*editorTransformations",t=>{if(!this._operation)return;const{zero:e}=yi[this._operation],r=t[this._operation],o=void 0!==r&&r!==e;this.$.active=o})}},Va=class extends Yi{initCallback(){super.initCallback(),this.addEventListener("wheel",t=>{t.preventDefault();const{deltaY:e,deltaX:r}=t;Math.abs(r)>1?this.scrollLeft+=r:this.scrollLeft+=e},{passive:!1}),this.addEventListener("scroll",()=>{},{passive:!0})}};Va.template=" <slot></slot> ";var Ba=class extends Yi{_debouncedShowLoader;_cancelPreload;_updateInfoTooltip;constructor(){super(),this.init$={...this.init$,"*sliderEl":null,"*listAspectRatioEl":null,"*loadingOperations":new Map,"*showSlider":!1,"*showListAspectRatio":!1,hideSliderOrList:!1,"*currentFilter":Ma,"*currentOperation":null,showLoader:!1,filters:fi,colorOperations:mi,cropOperations:bi,"*operationTooltip":null,"presence.mainToolbar":!0,"presence.subToolbar":!1,"presence.tabToggles":!0,"presence.tabContent.crop":!1,"presence.tabContent.tuning":!1,"presence.tabContent.filters":!1,"presence.tabToggle.crop":!0,"presence.tabToggle.tuning":!0,"presence.tabToggle.filters":!0,"presence.subTopToolbarStyles":{hidden:"uc-sub-toolbar--top-hidden",visible:"uc-sub-toolbar--visible"},"presence.subBottomToolbarStyles":{hidden:"uc-sub-toolbar--bottom-hidden",visible:"uc-sub-toolbar--visible"},"presence.tabContentStyles":{hidden:"uc-tab-content--hidden",visible:"uc-tab-content--visible"},"presence.tabToggleStyles":{hidden:"uc-tab-toggle--hidden",visible:"uc-tab-toggle--visible"},"presence.tabTogglesStyles":{hidden:"uc-tab-toggles--hidden",visible:"uc-tab-toggles--visible"},"on.cancel":t=>{this.telemetryManager.sendEventCloudImageEditor(t,this.$["*tabId"],{action:"cancel"}),this._cancelPreload?.();(0,this.$["*on.cancel"])()},"on.apply":t=>{this.telemetryManager.sendEventCloudImageEditor(t,this.$["*tabId"],{action:"apply"});(0,this.$["*on.apply"])(this.$["*editorTransformations"])},"on.applySlider":t=>{this.telemetryManager.sendEventCloudImageEditor(t,this.$["*tabId"],{action:"apply-slider",operation:Oa(this.$["*operationTooltip"])});this.ref["slider-el"].apply(),this._onSliderClose()},"on.cancelSlider":t=>{this.telemetryManager.sendEventCloudImageEditor(t,this.$["*tabId"],{action:"cancel-slider"});this.ref["slider-el"].cancel(),this._onSliderClose()},"on.clickTab":t=>{const e=t.currentTarget,r=e?.getAttribute("data-id");r&&(this.telemetryManager.sendEventCloudImageEditor(t,r),this._activateTab(r,{fromViewer:!1}))},tab_role:"tab",[`tab_${pi.TUNING}`]:`tab_${pi.TUNING}`,[`tab_${pi.CROP}`]:`tab_${pi.CROP}`,[`tab_${pi.FILTERS}`]:`tab_${pi.FILTERS}`,cancel:"cancel",apply:"apply","a11y-editor-tab-filters":"a11y-editor-tab-filters","a11y-editor-tab-tuning":"a11y-editor-tab-tuning","a11y-editor-tab-crop":"a11y-editor-tab-crop"},this._debouncedShowLoader=jo(this._showLoader.bind(this),500),this._updateInfoTooltip=jo(this._updateInfoTooltipHandler.bind(this),0)}_onSliderClose(){if(this.$["*showSlider"]=!1,this.$["*tabId"]===pi.CROP&&(this.$["*showListAspectRatio"]=!1),this.$["*tabId"]===pi.TUNING){this.ref["tooltip-el"].classList.toggle("uc-info-tooltip_visible",!1)}}_createOperationControl(t){const e=new Fa;return e.operation=t,e}_createFilterControl(t){const e=new La;return e.filter=t,e}_createToggleControl(t){const e=new Aa;return e.operation=t,e}_createAspectRatioControl(t){const e=new Ta;return e.aspectRatio=t,e}_createFreeformControl(){return new Ea}_clearListAspectRatio(){const t=this.$["*listAspectRatioEl"];t&&(t.innerHTML="")}_renderControlsList(t){const e=this.ref[`controls-list-${t}`],r=document.createDocumentFragment();if(this._clearListAspectRatio(),t===pi.CROP){const t=this.$["*cropPresetList"],e=t.length>=3;if(e){const t=this._createFreeformControl();r.appendChild(t)}for(const o of t){const t=this._createAspectRatioControl(o);if(r.appendChild(t),e){const e=this.$["*listAspectRatioEl"];e?.appendChild(t)}}for(const t of this.$.cropOperations){const e=this._createToggleControl(t);r.appendChild(e)}}else if(t===pi.FILTERS){const t=this.$.filters;[Ma,...t].forEach(t=>{const e=this._createFilterControl(t);r.appendChild(e)})}else if(t===pi.TUNING)for(const t of this.$.colorOperations){const e=this._createOperationControl(t);r.appendChild(e)}[...r.children].forEach((t,e)=>{e===r.childNodes.length-1&&t.classList.add("uc-controls-list_last-item")}),e.innerHTML="",e.appendChild(r)}_activateTab(t,{fromViewer:e}={}){this.$["*tabId"]=t;const r=this.$["*faderEl"],o=this.$["*cropperEl"];t===pi.CROP?(r?.deactivate(),o?.activate(this.$["*imageSize"],{fromViewer:e})):(r?.activate({url:this.$["*originalUrl"],fromViewer:e}),o?.deactivate());for(const e of gi){const r=e===t;this.ref[`tab-toggle-${e}`].active=r,r?(this._renderControlsList(t),this._syncTabIndicator()):this._unmountTabControls(e),this.$[`presence.tabContent.${e}`]=r}}_unmountTabControls(t){const e=this.ref[`controls-list-${t}`];e&&(e.innerHTML="")}_syncTabIndicator(){const t=this.ref[`tab-toggle-${this.$["*tabId"]}`];this.ref["tabs-indicator"].style.transform=`translateX(${t.offsetLeft}px)`}async _preloadEditedImage(){if(this.$["*imgContainerEl"]&&this.$["*originalUrl"]){const t=this.$["*imgContainerEl"].offsetWidth,e=await this.proxyUrl(Ua(this.$["*originalUrl"],t,this.$["*editorTransformations"]));this._cancelPreload?.();const{cancel:r}=Sa([e]);this._cancelPreload=()=>{r(),this._cancelPreload=void 0}}}_showLoader(t){this.$.showLoader=t}_updateInfoTooltipHandler(){const t=this.$["*editorTransformations"],e=this.$["*currentOperation"];let r="",o=!1;if(this.$["*tabId"]===pi.FILTERS)if(o=!0,this.$["*currentFilter"]&&t?.filter?.name===this.$["*currentFilter"]){const e=t?.filter?.amount||100;r=`${this.$["*currentFilter"]} ${e}`}else r=this.l10n(Ma);else if(this.$["*tabId"]===pi.TUNING&&e){o=!0;const i=t?.[e]||yi[e].zero;r=`${this.l10n(e)} ${i}`}o&&(this.$["*operationTooltip"]=r),this.ref["tooltip-el"].classList.toggle("uc-info-tooltip_visible",o)}initCallback(){super.initCallback(),this.$["*sliderEl"]=this.ref["slider-el"],this.$["*listAspectRatioEl"]=this.ref["list-el"],this.sub("*imageSize",t=>{t&&setTimeout(()=>{this._activateTab(this.$["*tabId"],{fromViewer:!0})},0)}),this.sub("*editorTransformations",t=>{const e=t?.filter?.name;this.$["*currentFilter"]!==e&&(this.$["*currentFilter"]=e)}),this.sub("*currentFilter",()=>{this._updateInfoTooltip()}),this.sub("*currentOperation",()=>{this._updateInfoTooltip()}),this.sub("*tabId",()=>{this._updateInfoTooltip()}),this.sub("*originalUrl",()=>{this.$["*faderEl"]?.deactivate()}),this.sub("*editorTransformations",t=>{this._preloadEditedImage(),this.$["*faderEl"]?.setTransformations(t)}),this.sub("*loadingOperations",t=>{let e=!1;for(const[,r]of t.entries()){if(e)break;for(const[,t]of r.entries())if(t){e=!0;break}}this._debouncedShowLoader(e)}),this.sub("*showSlider",t=>{this.$["presence.subToolbar"]=t,this.$["presence.mainToolbar"]=!t,this.$.hideSliderOrList=!0}),this.sub("*showListAspectRatio",t=>{this.$["presence.subToolbar"]=t,this.$["presence.mainToolbar"]=!t,this.$.hideSliderOrList=!1}),this.sub("*tabList",t=>{this.$["presence.tabToggles"]=t.length>1;for(const e of gi){this.$[`presence.tabToggle.${e}`]=t.includes(e);this.ref[`tab-toggle-${e}`].style.gridColumn=`${t.indexOf(e)+1}`}if(!t.includes(this.$["*tabId"])&&t.length>0){const[e]=t;e&&this._activateTab(e,{fromViewer:!1})}}),this._updateInfoTooltip()}destroyCallback(){this.$["*showSlider"]=!1,this.$["*showListAspectRatio"]=!1}};Ba.template=`\n <uc-line-loader-ui set="active: showLoader"></uc-line-loader-ui>\n <div class="uc-info-tooltip_container">\n <div class="uc-info-tooltip_wrapper">\n <div ref="tooltip-el" class="uc-info-tooltip uc-info-tooltip_hidden">{{*operationTooltip}}</div>\n </div>\n </div>\n <div class="uc-toolbar-container">\n <uc-presence-toggle\n role="tablist"\n class="uc-sub-toolbar"\n set="visible: presence.mainToolbar; styles: presence.subTopToolbarStyles"\n >\n <div class="uc-tab-content-row">${gi.map(function(t){return`\n <uc-presence-toggle\n id="tab_${t}"\n class="uc-tab-content"\n set="visible: presence.tabContent.${t}; styles: presence.tabContentStyles"\n >\n <uc-editor-scroller hidden-scrollbar>\n <div class="uc-controls-list_align">\n <div\n role="listbox"\n aria-orientation="horizontal"\n class="uc-controls-list_inner"\n ref="controls-list-${t}"\n ></div>\n </div>\n </uc-editor-scroller>\n </uc-presence-toggle>\n `}).join("")}</div>\n <div class="uc-controls-row">\n <uc-presence-toggle\n class="uc-tab-toggles"\n set="visible: presence.tabToggles; styles: presence.tabTogglesStyles"\n >\n <div ref="tabs-indicator" class="uc-tab-toggles_indicator"></div>\n ${gi.map(function(t){return`\n <uc-presence-toggle\n class="uc-tab-toggle"\n set="visible: presence.tabToggle.${t}; styles: presence.tabToggleStyles;"\n >\n <uc-btn-ui\n theme="tab"\n ref="tab-toggle-${t}"\n data-id="${t}"\n icon="${t}"\n set="onclick: on.clickTab; aria-role:tab_role; aria-controls:tab_${t}; title-prop: a11y-editor-tab-${t}"\n >\n </uc-btn-ui>\n </uc-presence-toggle>\n `}).join("")}\n </uc-presence-toggle>\n <uc-btn-ui style="order: -1" theme="secondary-icon" icon="closeMax" set="onclick: on.cancel; title-prop:cancel">\n </uc-btn-ui>\n <uc-btn-ui theme="primary-icon" icon="done" set="onclick: on.apply; title-prop:apply"> </uc-btn-ui>\n </div>\n </uc-presence-toggle>\n <uc-presence-toggle\n class="uc-sub-toolbar"\n set="visible: presence.subToolbar; styles: presence.subBottomToolbarStyles"\n >\n <div class="uc-slider" set="@hidden:!hideSliderOrList">\n <uc-editor-slider ref="slider-el"></uc-editor-slider>\n </div>\n\n <div set="@hidden:hideSliderOrList" class="uc-list-aspect-ratio-container">\n <div class="uc-list-aspect-ratio" ref="list-el"></div>\n </div>\n <div class="uc-controls-row">\n <uc-btn-ui theme="secondary" set="onclick: on.cancelSlider" l10n="@text:cancel"> </uc-btn-ui>\n <uc-btn-ui theme="primary" set="onclick: on.applySlider" l10n="@text:apply"> </uc-btn-ui>\n </div>\n </uc-presence-toggle>\n </div>\n`;var ja=class extends Yi{_iconReversed=!1;_iconSingle=!1;_iconHidden=!1;constructor(){super(),this.init$={...this.init$,text:"",icon:"",iconCss:this._iconCss(),theme:null,"aria-role":"","aria-controls":"","title-prop":""},this.defineAccessor("active",t=>{t?this.setAttribute("active",""):this.removeAttribute("active")})}_iconCss(){return ya("uc-icon",{"uc-icon_left":!this._iconReversed,"uc-icon_right":this._iconReversed,"uc-icon_hidden":this._iconHidden,"uc-icon_single":this._iconSingle})}initCallback(){super.initCallback(),this.sub("icon",t=>{this._iconSingle=!this.$.text,this._iconHidden=!t,this.$.iconCss=this._iconCss()}),this.sub("theme",t=>{t&&"custom"!==t&&(this.className=`uc-${t}`)}),this.sub("text",()=>{this._iconSingle=!1}),this.hasAttribute("theme")||this.setAttribute("theme","default"),this.defineAccessor("aria-role",t=>{this.$["aria-role"]=t||""}),this.defineAccessor("aria-controls",t=>{this.$["aria-controls"]=t||""}),this.defineAccessor("title-prop",t=>{this.$["title-prop"]=t||""})}set reverse(t){this.hasAttribute("reverse")?(this.style.flexDirection="row-reverse",this._iconReversed=!0):(this._iconReversed=!1,this.style.flexDirection="")}};ja.bindAttributes({text:"text",icon:"icon",reverse:"reverse",theme:"theme"}),ja.template='\n <button\n type="button"\n set="@role:aria-role; @aria-controls: aria-controls; @aria-label:title-prop"\n l10n="@title:title-prop;"\n >\n <uc-icon set="className: iconCss; @name: icon; @hidden: !icon"></uc-icon>\n <div class="uc-text">{{text}}</div>\n </button>\n';var Ha=class extends Yi{_active=!1;_handleTransitionEndRight=()=>{const t=this.ref["line-el"];t.style.transition="initial",t.style.opacity="0",t.style.transform="translateX(-101%)",this._active&&this._start()};initCallback(){super.initCallback(),this.defineAccessor("active",t=>{"boolean"==typeof t&&(t?this._start():this._stop())})}_start(){this._active=!0;const{width:t}=this.getBoundingClientRect(),e=this.ref["line-el"];e.style.transition="transform 1s",e.style.opacity="1",e.style.transform=`translateX(${t}px)`,e.addEventListener("transitionend",this._handleTransitionEndRight,{once:!0})}_stop(){this._active=!1}};Ha.template='\n <div class="uc-inner">\n <div class="uc-line" ref="line-el"></div>\n </div>\n';var qa="uc-transition",Ka="uc-visible",Ga="uc-hidden",Wa=class extends Yi{_visible=!1;_visibleStyle=Ka;_hiddenStyle=Ga;_externalTransitions=!1;constructor(){super(),this.defineAccessor("styles",t=>{t&&(this._externalTransitions=!0,this._visibleStyle=t.visible??Ka,this._hiddenStyle=t.hidden??Ga)}),this.defineAccessor("visible",t=>{"boolean"==typeof t&&(this._visible=t,this._handleVisible())})}_handleVisible(){this.style.visibility=this._visible?"inherit":"hidden",function(t,...e){const r=va(...e);for(const e of Object.keys(r))t.classList.toggle(e,Boolean(r[e]))}(this,{[qa]:!this._externalTransitions,[this._visibleStyle]:this._visible,[this._hiddenStyle]:!this._visible}),this.setAttribute("aria-hidden",this._visible?"false":"true")}initCallback(){super.initCallback(),this.classList.toggle("uc-initial",!0),this._externalTransitions||this.classList.add(qa),this._handleVisible(),setTimeout(()=>{this.classList.toggle("uc-initial",!1)},0)}};Wa.template="<slot></slot> ";var Xa=class extends Yi{_observer;_thumbSize=0;_zero=0;_zeroDotEl;_stepsCount;constructor(){super(),this.init$={...this.init$,disabled:!1,min:0,max:100,onInput:null,onChange:null,defaultValue:0,"on.sliderInput":()=>{const t=Number.parseInt(this._inputEl().value,10);this._updateValue(t),this.$.onInput?.(t)},"on.sliderChange":()=>{const t=Number.parseInt(this._inputEl().value,10);this.$.onChange?.(t)}},this.setAttribute("with-effects","")}initCallback(){super.initCallback(),this.defineAccessor("disabled",t=>{this.$.disabled=t}),this.defineAccessor("min",t=>{this.$.min=t}),this.defineAccessor("max",t=>{this.$.max=t}),this.defineAccessor("defaultValue",t=>{this.$.defaultValue=t;this._inputEl().value=String(t),this._updateValue(t)}),this.defineAccessor("zero",t=>{this._zero=t}),this.defineAccessor("onInput",t=>{t&&(this.$.onInput=t)}),this.defineAccessor("onChange",t=>{t&&(this.$.onChange=t)}),this._updateSteps(),this._observer=new ResizeObserver(()=>{this._updateSteps();const t=Number.parseInt(this._inputEl().value,10);this._updateValue(t)}),this._observer.observe(this),this._thumbSize=Number.parseInt(window.getComputedStyle(this).getPropertyValue("--l-thumb-size"),10),setTimeout(()=>{const t=Number.parseInt(this._inputEl().value,10);this._updateValue(t)},0),this.sub("disabled",t=>{const e=this._inputEl();t?e.setAttribute("disabled","disabled"):e.removeAttribute("disabled")});const t=this._inputEl();t.addEventListener("focus",()=>{this.style.setProperty("--color-effect","var(--hover-color-rgb)")}),t.addEventListener("blur",()=>{this.style.setProperty("--color-effect","var(--idle-color-rgb)")})}_inputEl(){return this.ref["input-el"]}_thumbEl(){return this.ref["thumb-el"]}_stepsEl(){return this.ref["steps-el"]}_updateValue(t){this._updateZeroDot(t);const{width:e}=this.getBoundingClientRect(),r=100/(this.$.max-this.$.min)*(t-this.$.min)*(e-this._thumbSize)/100;window.requestAnimationFrame(()=>{this._thumbEl().style.transform=`translateX(${r}px)`})}_updateZeroDot(t){if(!this._zeroDotEl)return;this._zeroDotEl.style.opacity=t===this._zero?"0":"1";const{width:e}=this.getBoundingClientRect(),r=100/(this.$.max-this.$.min)*(this._zero-this.$.min)*(e-this._thumbSize)/100;window.requestAnimationFrame(()=>{this._zeroDotEl&&(this._zeroDotEl.style.transform=`translateX(${r}px)`)})}_updateSteps(){const t=this._stepsEl(),{width:e}=t.getBoundingClientRect(),r=Math.ceil(e/2),o=Math.ceil(r/15)-2;if(this._stepsCount===o)return;const i=document.createDocumentFragment(),n=document.createElement("div"),a=document.createElement("div");n.className="uc-minor-step",a.className="uc-border-step",i.appendChild(a);for(let t=0;t<o;t+=1)i.appendChild(n.cloneNode());i.appendChild(a.cloneNode());for(let t=0;t<o;t+=1)i.appendChild(n.cloneNode());i.appendChild(a.cloneNode());const s=document.createElement("div");s.className="uc-zero-dot",i.appendChild(s),this._zeroDotEl=s,t.innerHTML="",t.appendChild(i),this._stepsCount=o}destroyCallback(){super.destroyCallback(),this._observer?.disconnect()}};Xa.template='\n <div class="uc-steps" ref="steps-el"></div>\n <div ref="thumb-el" class="uc-thumb"></div>\n <input\n class="uc-input"\n type="range"\n ref="input-el"\n set="oninput: on.sliderInput; onchange: on.sliderChange; @min: min; @max: max; @value: defaultValue;"\n />\n';var Za=class extends la{couldBeCtxOwner=!0;activityType=tn.activities.CLOUD_IMG_EDIT;_entry;_instance;get activityParams(){const t=super.activityParams;if("internalId"in t)return t;throw new Error("Cloud Image Editor activity params not found")}initCallback(){super.initCallback(),this.registerActivity(this.activityType,{onActivate:()=>this.mountEditor(),onDeactivate:()=>this.unmountEditor()}),this.subConfigValue("cropPreset",t=>{this._instance&&this._instance.getAttribute("crop-preset")!==t&&this._instance.setAttribute("crop-preset",t)}),this.subConfigValue("cloudImageEditorTabs",t=>{this._instance&&this._instance.getAttribute("tabs")!==t&&this._instance.setAttribute("tabs",t)})}handleApply(t){if(!this._entry)return;const e=t.detail;this._entry.setMultipleValues({cdnUrl:e.cdnUrl,cdnUrlModifiers:e.cdnUrlModifiers}),this.modalManager?.close(tn.activities.CLOUD_IMG_EDIT),this.historyBack()}handleCancel(){this.modalManager?.close(tn.activities.CLOUD_IMG_EDIT),this.historyBack()}mountEditor(){const{internalId:t}=this.activityParams,e=this.uploadCollection.read(t);if(!e)throw new Error(`Entry with internalId "${t}" not found`);this._entry=e;const r=this._entry.getValue("cdnUrl");if(!r)throw new Error(`Entry with internalId "${t}" hasn't uploaded yet`);const o=new ka,i=this.cfg.cropPreset,n=this.cfg.cloudImageEditorTabs;o.setAttribute("ctx-name",this.ctxName),o.setAttribute("cdn-url",r),i&&o.setAttribute("crop-preset",i),n&&o.setAttribute("tabs",n),o.addEventListener("apply",t=>{const e=t;this.handleApply(e),this.debugPrint('editor event "apply"',e.detail)}),o.addEventListener("cancel",t=>{const e=t;this.handleCancel(),this.debugPrint('editor event "cancel"',e.detail)}),o.addEventListener("change",t=>{const e=t;this.debugPrint('editor event "change"',e.detail)}),this.innerHTML="",this.appendChild(o),this._instance=o}unmountEditor(){this._instance=void 0,this._entry=void 0,this.innerHTML=""}},Ya=t=>t.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g)?.map(t=>t.toLowerCase()).join("-"),Ja=[{test:t=>!!t.accept&&!!t.imgOnly,message:"There could be a mistake.\nBoth `accept` and `imgOnly` parameters are set.\nThe value of `accept` will be concatenated with the internal image mime types list."},{test:t=>null!==t.enableVideoRecording,message:"The `enableVideoRecording` parameter is deprecated and will be removed in the next major release.\nPlease use the `cameraModes` parameter instead."},{test:t=>null!==t.defaultCameraMode,message:"The `defaultCameraMode` parameter is deprecated and will be removed in the next major release.\nPlease use the `cameraModes` parameter instead."}],Qa=jo(t=>{for(const{test:e,message:r}of Ja)e(t)&&na(r)},0),ts=t=>t instanceof Promise||Boolean(t&&"object"==typeof t&&"then"in t&&"function"==typeof t.then),es=[{key:"cameraModes",deps:["enableVideoRecording"],fn:({cameraModes:t,enableVideoRecording:e})=>{if(null===e)return t;let r=Ho(t);return e&&!r.includes("video")?r=r.concat("video"):e||(r=r.filter(t=>"video"!==t)),qo(r)}},{key:"cameraModes",deps:["defaultCameraMode"],fn:({cameraModes:t,defaultCameraMode:e})=>{if(null===e)return t;let r=Ho(t);return r=r.sort((t,r)=>t===e?-1:r===e?1:0),qo(r)}},{key:"cdnCname",deps:["pubkey","cdnCnamePrefixed"],fn:({pubkey:t,cdnCname:e,cdnCnamePrefixed:r})=>t&&(e===wi||((t,e)=>{try{const r=new URL(t),o=new URL(e);return r.hostname.endsWith(o.hostname)}catch{return!1}})(e,r))?lo(t,r):e}],rs=({key:t,setValue:e,getValue:r,computationControllers:o})=>{for(const i of es)if(i.deps.includes(t)){const t={[i.key]:r(i.key)};for(const e of i.deps)t[e]=r(e);const n=new AbortController;let a;o.get(i.key)?.abort(),o.set(i.key,n);try{a=i.fn(t,{signal:n.signal})}catch(t){return o.get(i.key)===n&&o.delete(i.key),void console.error(`Failed to compute value for "${i.key}"`,t)}ts(a)?a.then(t=>{n.signal.aborted||e(i.key,t)}).catch(t=>{n.signal.aborted||console.error(`Failed to compute value for "${i.key}"`,t)}).finally(()=>{o.get(i.key)===n&&o.delete(i.key)}):e(i.key,a)}},os=t=>String(t),is=t=>{const e=Number(t);if(Number.isNaN(e))throw new Error(`Invalid number: "${t}"`);return e},ns=t=>{if(null==t)return!1;if("boolean"==typeof t)return t;if("true"===t)return!0;if(""===t)return!0;if("false"===t)return!1;throw new Error(`Invalid boolean: "${t}"`)},as=t=>{if("object"==typeof t)return t;throw new Error("Invalid value. Must be an object.")},ss=t=>{if("function"==typeof t)return t;throw new Error("Invalid value. Must be a function.")},cs=t=>{if(Array.isArray(t))return t;throw new Error("Must be an array.")},ls={pubkey:os,multiple:ns,multipleMin:is,multipleMax:is,confirmUpload:ns,imgOnly:ns,accept:os,externalSourcesPreferredTypes:os,externalSourcesEmbedCss:os,store:t=>"auto"===t?t:ns(t),cameraMirror:ns,cameraCapture:t=>{const e=os(t);if("user"!==e&&"environment"!==e&&""!==e)throw new Error(`Invalid value: "${e}"`);return e},sourceList:os,topLevelOrigin:os,maxLocalFileSizeBytes:is,thumbSize:is,showEmptyList:ns,useLocalImageEditor:ns,useCloudImageEditor:ns,cloudImageEditorTabs:os,removeCopyright:ns,cropPreset:os,imageShrink:os,modalScrollLock:ns,modalBackdropStrokes:ns,sourceListWrap:ns,remoteTabSessionKey:os,cdnCname:os,cdnCnamePrefixed:os,baseUrl:os,socialBaseUrl:os,secureSignature:os,secureExpire:os,secureDeliveryProxy:os,retryThrottledRequestMaxTimes:is,retryNetworkErrorMaxTimes:is,multipartMinFileSize:is,multipartChunkSize:is,maxConcurrentRequests:is,multipartMaxConcurrentRequests:is,multipartMaxAttempts:is,checkForUrlDuplicates:ns,saveUrlForRecurrentUploads:ns,groupOutput:ns,userAgentIntegration:os,debug:ns,localeName:os,metadata:t=>{if("object"==typeof t&&!Array.isArray(t))return t;if("function"==typeof t)return t;throw new Error("Invalid metadata value. Must be an object or function.")},secureUploadsExpireThreshold:is,localeDefinitionOverride:t=>as(t),secureUploadsSignatureResolver:t=>ss(t),secureDeliveryProxyUrlResolver:t=>ss(t),iconHrefResolver:t=>ss(t),fileValidators:cs,collectionValidators:cs,validationTimeout:is,validationConcurrency:is,cameraModes:t=>{const e=os(t),r=Ho(e);if(r.some(t=>!Object.values(Qn).includes(t)))throw new Error(`Invalid value: "${JSON.stringify(r)}"`);return e},defaultCameraMode:t=>{const e=os(t);if(!Object.values(Qn).includes(e))throw new Error(`Invalid value: "${e}"`);return e},enableAudioRecording:ns,enableVideoRecording:ns,mediaRecorderOptions:as,maxVideoRecordingDuration:is,filesViewMode:t=>{const e=os(t);if(["grid","list"].includes(e))return e;throw new Error(`Invalid value: "${e}"`)},gridShowFileNames:ns,cloudImageEditorAutoOpen:ns,cloudImageEditorMaskHref:os,testMode:ns,qualityInsights:ns},us=[...new Set(["debug",...Object.keys(ki)])],ds=["metadata","localeDefinitionOverride","secureUploadsSignatureResolver","secureDeliveryProxyUrlResolver","iconHrefResolver","fileValidators","collectionValidators","mediaRecorderOptions"],hs=t=>ds.includes(t),ps=us.filter(t=>!hs(t)),gs={...Object.fromEntries(ps.map(t=>[Ya(t),t])),...Object.fromEntries(ps.map(t=>[t.toLowerCase(),t]))},ms={...Object.fromEntries(ps.map(t=>[Ya(t),Xi(t)])),...Object.fromEntries(ps.map(t=>[t.toLowerCase(),Xi(t)]))},fs=t=>`__${t}`,bs=class extends Yi{requireCtxName=!0;constructor(){super(),this.init$={...this.init$,...Object.fromEntries(Object.entries(ki).map(([t,e])=>[Xi(t),e])),computationControllers:new Map}}_flushValueToAttribute(t,e){if(!hs(t)){const r=[...new Set([Ya(t),t.toLowerCase()])];for(const t of r)null==e?this.removeAttribute(t):this.getAttribute(t)!==e.toString()&&this.setAttribute(t,e.toString())}}_flushValueToState(t,e){this.$[Xi(t)]!==e&&(this.$[Xi(t)]=null==e?ki[t]:e)}_setValue(t,e){const r=this,o=((t,e)=>{if(null!=e)try{return ls[t](e)}catch(e){return console.error(`Invalid value for config key "${t}".`,e),ki[t]}})(t,e),i=fs(t);r[i]!==o&&(this._assertSameValueDifferentReference(t,r[i],o),r[i]=o,this._flushValueToAttribute(t,o),this._flushValueToState(t,o),this.debugPrint(`[uc-config] "${t}"`,o),Qa(this.cfg))}_getValue(t){return this[fs(t)]??this.$[Xi(t)]}_assertSameValueDifferentReference(t,e,r){this.cfg.debug&&r!==e&&"object"==typeof r&&"object"==typeof e&&JSON.stringify(r)===JSON.stringify(e)&&(console.warn(`[uc-config] Option "${t}" value is the same as the previous one but the reference is different`),console.warn("[uc-config] You should avoid changing the reference of the object to prevent unnecessary calculations"),console.warn(`[uc-config] "${t}" previous value:`,e),console.warn(`[uc-config] "${t}" new value:`,r))}initCallback(){super.initCallback();const t=this;for(const t of ps)this.sub(Xi(t),e=>{this._setValue(t,e)},!1);for(const e of us){const r=t[e]??this.$[Xi(e)];r!==ki[e]&&this._setValue(e,r),Object.defineProperty(this,e,{set:t=>{this._setValue(e,t)},get:()=>this._getValue(e)})}for(const t of us)this.sub(Xi(t),()=>{rs({key:t,setValue:this._setValue.bind(this),getValue:this._getValue.bind(this),computationControllers:this.computationControllers})})}attributeChangedCallback(t,e,r){if(e===r)return;const o=this,i=gs[t];i&&(o[i]=r)}get computationControllers(){return this.$.computationControllers}};bs.bindAttributes(ms);for(const t of us)bs.prototype[t]=void 0;var vs=class extends Yi{initCallback(){super.initCallback(),this.subConfigValue("removeCopyright",t=>{this.toggleAttribute("hidden",!!t)})}static template='\n <a\n href="https://uploadcare.com/?utm_source=copyright&utm_medium=referral&utm_campaign=v4"\n target="_blank noopener"\n class="uc-credits"\n >Powered by Uploadcare</a\n >\n '};function ys(t){return new Promise(e=>{"function"!=typeof window.FileReader&&e(!1);try{const r=new FileReader;r.onerror=()=>{e(!0)};const o=t=>{"loadend"!==t.type&&r.abort(),e(!1)};r.onloadend=o,r.onprogress=o,r.readAsDataURL(t)}catch{e(!1)}})}function ws(t,e){return new Promise(r=>{let o=0;const i=[],n=t=>{if(!t)return console.warn("Unexpectedly received empty content entry",{scope:"drag-and-drop"}),void r(null);t.isFile?(o++,t.file(n=>{o--;const a=new File([n],n.name,{type:n.type||e});i.push({type:"file",file:a,fullPath:t.fullPath}),0===o&&r(i)})):t.isDirectory&&a(t.createReader())},a=t=>{o++,t.readEntries(t=>{o--;for(const e of t)n(e);0===o&&r(i)})};n(t)})}var _s=Object.freeze({ACTIVE:0,INACTIVE:1,NEAR:2,OVER:3}),ks=["focus"],xs=new Map;function Cs(t){let e=0;const r=document.body,o=new Set;let i=_s.INACTIVE;const n=e=>{t.shouldIgnore()&&e!==_s.INACTIVE||(i!==e&&o.forEach(t=>{t(e)}),i=e)},a=()=>e>0;var s;s=e=>t.onChange(e),o.add(s);const c=()=>{e=0,n(_s.INACTIVE)},l=()=>{e+=1,i===_s.INACTIVE&&n(_s.ACTIVE)},u=()=>{e-=1,a()||n(_s.INACTIVE)},d=t=>{t.preventDefault(),e=0,n(_s.INACTIVE)},h=r=>{if(t.shouldIgnore())return;a()||(e+=1);const o=[r.x,r.y],i=t.element.getBoundingClientRect(),s=Math.floor(function(t,e){const r=Math.max(Math.min(t[0],e.x+e.width),e.x),o=Math.max(Math.min(t[1],e.y+e.height),e.y);return Math.sqrt((t[0]-r)*(t[0]-r)+(t[1]-o)*(t[1]-o))}(o,i)),c=s<100,l=r.composedPath().includes(t.element);xs.set(t.element,s);const u=Math.min(...xs.values())===s;l&&u?(r.preventDefault(),n(_s.OVER)):n(c&&u?_s.NEAR:_s.ACTIVE)},p=async e=>{if(t.shouldIgnore())return;e.preventDefault();const{dataTransfer:r}=e;if(!r)return;const o=await function(t){const e=[],r=[];for(let o=0;o<t.items.length;o++){const i=t.items[o];if(i)if("file"===i.kind){const t=i.type,o=i;if("function"==typeof o.webkitGetAsEntry||"function"==typeof o.getAsEntry){const i="function"==typeof o.webkitGetAsEntry?o.webkitGetAsEntry():o.getAsEntry?.();i&&r.push(ws(i,t).then(t=>{t&&e.push(...t)}));continue}const n=i.getAsFile();n&&r.push(ys(n).then(t=>{t||e.push({type:"file",file:n})}))}else"string"===i.kind&&/^text\/uri-list/.test(i.type)&&r.push(new Promise(t=>{i.getAsString(r=>{e.push({type:"url",url:r}),t()})}))}return Promise.all(r).then(()=>e)}(r);t.onItems(o),n(_s.INACTIVE)};return r.addEventListener("drop",d),r.addEventListener("dragleave",u),r.addEventListener("dragenter",l),r.addEventListener("dragover",h),t.element.addEventListener("drop",p),ks.forEach(t=>{window.addEventListener(t,c)}),()=>{xs.delete(t.element),r.removeEventListener("drop",d),r.removeEventListener("dragleave",u),r.removeEventListener("dragenter",l),r.removeEventListener("dragover",h),t.element.removeEventListener("drop",p),ks.forEach(t=>{window.removeEventListener(t,c)})}}var Es="uc-drop-area",Ts=`${Es}/registry`,As=class extends la{static styleAttrs=[...super.styleAttrs,"uc-drop-area"];_destroyDropzone=null;_destroyContentWrapperDropzone=null;_onAreaClicked=null;constructor(){super(),this.init$={...this.init$,state:_s.INACTIVE,withIcon:!1,isClickable:!1,isFullscreen:!1,isEnabled:!0,isVisible:!0,isInitFlow:!1,text:"",[Ts]:new Set}}isActive(){if(!this.$.isEnabled)return!1;const t=this.getBoundingClientRect(),e=t.width>0&&t.height>0,r=t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth),o=window.getComputedStyle(this),i="hidden"!==o.visibility&&"none"!==o.display;return e&&i&&r}initCallback(){super.initCallback(),this.bindL10n("text",()=>this.l10n("drop-files-here"));this.$[Ts].add(this),this.defineAccessor("disabled",t=>{this.set$({isEnabled:!ns(t)})}),this.defineAccessor("clickable",t=>{this.set$({isClickable:ns(t)})}),this.defineAccessor("initflow",t=>{this.set$({isInitFlow:ns(t)})}),this.defineAccessor("with-icon",t=>{this.set$({withIcon:ns(t)})}),this.defineAccessor("fullscreen",t=>{this.set$({isFullscreen:ns(t)})}),this.defineAccessor("text",t=>{"string"==typeof t?this.bindL10n("text",()=>this.l10n(t)||t):this.bindL10n("text",()=>this.l10n("drop-files-here"))}),this._destroyDropzone=Cs({element:this,shouldIgnore:()=>this._shouldIgnore(),onChange:t=>{this.$.state=t},onItems:t=>{t.length&&(t.forEach(t=>{"url"===t.type?this.api.addFileFromUrl(t.url,{source:kn.DROP_AREA}):"file"===t.type&&this.api.addFileFromObject(t.file,{source:kn.DROP_AREA,fullPath:t.fullPath})}),this.uploadCollection.size&&(this.modalManager?.open(tn.activities.UPLOAD_LIST),this.set$({"*currentActivity":tn.activities.UPLOAD_LIST})))}});const t=this.ref["content-wrapper"];if(t&&(this._destroyContentWrapperDropzone=Cs({element:t,onChange:e=>{const r=Object.entries(_s).find(([,t])=>t===e)?.[0].toLowerCase();r&&t.setAttribute("drag-state",r)},onItems:()=>{},shouldIgnore:()=>this._shouldIgnore()})),this.sub("state",t=>{const e=Object.entries(_s).find(([,e])=>e===t)?.[0].toLowerCase();e&&this.setAttribute("drag-state",e)}),this.subConfigValue("sourceList",t=>{const e=ii(t);this.$.isEnabled=e.includes(kn.LOCAL),this.$.isVisible=this.$.isEnabled||!this.querySelector("[data-default-slot]")}),this.sub("isVisible",t=>{this.toggleAttribute("hidden",!t)}),this.sub("isClickable",t=>{this.toggleAttribute("clickable",t)}),this.$.isClickable){const t=t=>{if(t instanceof KeyboardEvent){if("Space"===t.code||"Enter"===t.code){if(this.$.isInitFlow)return void this.api.initFlow();this.api.openSystemDialog()}}else if(t instanceof MouseEvent){if(this.$.isInitFlow)return void this.api.initFlow();this.api.openSystemDialog()}};this._onAreaClicked=t,this.addEventListener("keydown",t),this.addEventListener("click",t)}}_shouldIgnore(){if(!this.$.isEnabled)return!0;if(!this._couldHandleFiles())return!0;if(!this.$.isFullscreen)return!1;const t=this.$[Ts];if(0===t.size)return!1;return[...t].filter(t=>t!==this).filter(t=>t.isActive()).length>0}_couldHandleFiles(){const t=this.cfg.multiple,e=this.cfg.multipleMax,r=this.uploadCollection.size;return!(t&&e&&r>=e)&&!(!t&&r>0)}destroyCallback(){super.destroyCallback();const t=this.$[Ts];t.delete(this),0===t.size&&we.deleteCtx(Es),this._destroyDropzone?.(),this._destroyContentWrapperDropzone?.(),this._onAreaClicked&&(this.removeEventListener("keydown",this._onAreaClicked),this.removeEventListener("click",this._onAreaClicked),this._onAreaClicked=null)}};As.template='\n <slot>\n <div data-default-slot hidden></div>\n <div ref="content-wrapper" class="uc-content-wrapper" set="@hidden: !isVisible">\n <div class="uc-icon-container" set="@hidden: !withIcon">\n <uc-icon name="default"></uc-icon>\n <uc-icon name="arrow-down"></uc-icon>\n </div>\n <span class="uc-text">{{text}}</span>\n </div>\n </slot>\n',As.bindAttributes({"with-icon":null,clickable:null,text:null,fullscreen:null,disabled:null,initflow:null});var Is=()=>{const t=globalThis.top??globalThis.parent??globalThis.self;try{return t.location.origin}catch(t){return console.warn("Unable to access top-level window location:",t),globalThis.location.origin}},Ss=t=>t.replace(/[\\-\\[]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Ms=(t,e="i")=>{const r=t.split("*").map(Ss);return new RegExp(`^${r.join(".+")}$`,e)},$s=["--uc-font-family","--uc-font-size","--uc-line-height","--uc-button-size","--uc-preview-size","--uc-input-size","--uc-padding","--uc-radius","--uc-transition","--uc-background","--uc-foreground","--uc-primary","--uc-primary-hover","--uc-primary-transparent","--uc-primary-foreground","--uc-secondary","--uc-secondary-hover","--uc-secondary-foreground","--uc-muted","--uc-muted-foreground","--uc-destructive","--uc-destructive-foreground","--uc-border"],Os=(t,e)=>window.getComputedStyle(t).getPropertyValue(e).trim(),Ls=t=>{const e={};for(const r of $s){const o=Os(t,r);o&&(e[r]=o)}return e},Rs=["selected-files-change","toolbar-state-change"],Us=class{_handlerMap=new Map;_context;_getTargetOrigin;constructor(t,e){this._context=t,this._getTargetOrigin=e,window.addEventListener("message",this._handleMessage)}_handleMessage=t=>{if(t.source!==this._context)return;const e=t.data;if(!(t=>{if(!t)return!1;if("object"!=typeof t)return!1;if(!("type"in t))return!1;const e=t.type;return"string"==typeof e&&!!Rs.includes(e)})(e))return;const r=this._handlerMap.get(e.type);if(r)for(const t of r)t(e)};on(t,e){const r=this._handlerMap.get(t)??new Set;this._handlerMap.has(t)||this._handlerMap.set(t,r),r.add(e)}send(t){const e=this._getTargetOrigin();this._context.postMessage(t,e)}destroy(){window.removeEventListener("message",this._handleMessage)}};var Ps={[wn.GDRIVE]:"ngdrive"},Ns=class extends la{couldBeCtxOwner=!0;activityType=tn.activities.EXTERNAL;_messageBridge;constructor(){super(),this.init$={...this.init$,activityIcon:"",activityCaption:"",selectedList:[],total:0,isSelectionReady:!1,isDoneBtnEnabled:!1,couldSelectAll:!1,couldDeselectAll:!1,showSelectionStatus:!1,showDoneBtn:!1,counterText:"",doneBtnTextClass:"uc-hidden",toolbarVisible:!0,onDone:()=>{for(const t of this.$.selectedList){const e=this.extractUrlFromSelectedFile(t),{filename:r}=t,{externalSourceType:o}=this.activityParams;this.api.addFileFromUrl(e,{fileName:r,source:o})}this.$["*currentActivity"]=tn.activities.UPLOAD_LIST,this.modalManager?.open(tn.activities.UPLOAD_LIST)},onCancel:()=>{this.historyBack()},onSelectAll:()=>{this._messageBridge?.send({type:"select-all"})},onDeselectAll:()=>{this._messageBridge?.send({type:"deselect-all"})}}}get activityParams(){const t=super.activityParams;if("externalSourceType"in t)return t;throw new Error("External Source activity params not found")}initCallback(){super.initCallback(),this.registerActivity(this.activityType,{onActivate:()=>{const{externalSourceType:t}=this.activityParams;if(!t)return this.modalManager?.close(this.$["*currentActivity"]),this.$["*currentActivity"]=null,void console.error(`Param "externalSourceType" is required for activity "${this.activityType}"`);this.set$({activityCaption:`${t[0]?.toUpperCase()}${t?.slice(1)}`,activityIcon:t}),this.mountIframe()}}),this.sub("*currentActivityParams",t=>{this.isActivityActive&&(this.unmountIframe(),this.mountIframe())}),this.sub("*currentActivity",t=>{t!==this.activityType&&this.unmountIframe()}),this.subConfigValue("multiple",t=>{this.$.showSelectionStatus=t}),this.subConfigValue("localeName",t=>{this.setupL10n()}),this.subConfigValue("externalSourcesEmbedCss",t=>{this.applyEmbedCss(t)})}extractUrlFromSelectedFile(t){if(t.alternatives){const e=ii(this.cfg.externalSourcesPreferredTypes);for(const r of e){const e=Ms(r);for(const[r,o]of Object.entries(t.alternatives))if(e.test(r))return o}}return t.url}handleToolbarStateChange(t){this.set$({toolbarVisible:t.isVisible})}async handleSelectedFilesChange(t){this.cfg.multiple===t.isMultipleMode?(this.bindL10n("counterText",()=>this.l10n("selected-count",{count:t.selectedCount,total:t.total})),this.set$({doneBtnTextClass:t.isReady?"":"uc-hidden",isSelectionReady:t.isReady,isDoneBtnEnabled:t.isReady&&t.selectedFiles.length>0,showSelectionStatus:t.isMultipleMode&&t.total>0,couldSelectAll:t.selectedCount<t.total,couldDeselectAll:t.selectedCount===t.total,selectedList:t.selectedFiles,showDoneBtn:t.total>0})):console.error("Multiple mode mismatch")}handleIframeLoad(){this.applyEmbedCss(this.cfg.externalSourcesEmbedCss),this.applyTheme(),this.setupL10n()}applyTheme(){this._messageBridge?.send({type:"set-theme-definition",theme:Ls(this)})}applyEmbedCss(t){this._messageBridge?.send({type:"set-embed-css",css:t})}setupL10n(){this._messageBridge?.send({type:"set-locale-definition",localeDefinition:this.cfg.localeName})}remoteUrl(){const{pubkey:t,remoteTabSessionKey:e,socialBaseUrl:r,multiple:o}=this.cfg,{externalSourceType:i}=this.activityParams,n=Ps[i]??i,a={lang:this.l10n("social-source-lang")?.split("-")?.[0]||"en",public_key:t,images_only:(!1).toString(),session_key:e,wait_for_theme:!0,multiple:o.toString(),origin:this.cfg.topLevelOrigin||Is(),debug:this.cfg.debug},s=new URL(`/window4/${n}`,r);return s.search=function(t){const e=[];for(const[r,o]of Object.entries(t))null==o||"string"==typeof o&&0===o.length||e.push(`${r}=${encodeURIComponent(o)}`);return e.join("&")}(a),s.toString()}mountIframe(){const t=Fe({tag:"iframe",attributes:{src:this.remoteUrl(),marginheight:0,marginwidth:0,frameborder:0,allowTransparency:!0}});t.addEventListener("load",this.handleIframeLoad.bind(this)),this.ref.iframeWrapper.innerHTML="",this.ref.iframeWrapper.appendChild(t),t.contentWindow&&(this._messageBridge?.destroy(),this._messageBridge=new Us(t.contentWindow,()=>this.cfg.socialBaseUrl),this._messageBridge.on("selected-files-change",this.handleSelectedFilesChange.bind(this)),this._messageBridge.on("toolbar-state-change",this.handleToolbarStateChange.bind(this)),this.resetSelectionStatus())}unmountIframe(){this._messageBridge?.destroy(),this._messageBridge=void 0,this.ref.iframeWrapper.innerHTML="",this.resetSelectionStatus()}resetSelectionStatus(){this.set$({selectedList:[],total:0,isDoneBtnEnabled:!1,couldSelectAll:!1,couldDeselectAll:!1,showSelectionStatus:!1,showDoneBtn:!1})}};Ns.template='\n <uc-activity-header>\n <button\n type="button"\n class="uc-mini-btn uc-close-btn"\n set="onclick: *historyBack"\n l10n="@title:a11y-activity-header-button-close;@aria-label:a11y-activity-header-button-close"\n >\n <uc-icon name="close"></uc-icon>\n </button>\n </uc-activity-header>\n <div class="uc-content">\n <div ref="iframeWrapper" class="uc-iframe-wrapper"></div>\n <div class="uc-toolbar" set="@hidden: !toolbarVisible">\n <button type="button" class="uc-cancel-btn uc-secondary-btn" set="onclick: onCancel" l10n="cancel"></button>\n <div set="@hidden: !showSelectionStatus" class="uc-selection-status-box">\n <span>{{counterText}}</span>\n <button type="button" set="onclick: onSelectAll; @hidden: !couldSelectAll" l10n="select-all"></button>\n <button type="button" set="onclick: onDeselectAll; @hidden: !couldDeselectAll" l10n="deselect-all"></button>\n </div>\n <button\n type="button"\n class="uc-done-btn uc-primary-btn"\n set="onclick: onDone; @disabled: !isDoneBtnEnabled; @hidden: !showDoneBtn"\n >\n <uc-spinner set="@hidden: isSelectionReady"></uc-spinner>\n <span l10n="done" set="@class: doneBtnTextClass"></span>\n </button>\n </div>\n </div>\n';var Ds=/^([0-9]+)x([0-9]+)(?:\s+(\d{1,2}|100)%)?$/i,zs=class extends la{_entrySubs=new Set;_entry=null;_withEntry(t){return(...e)=>{const r=this._entry;if(r)return t(r,...e);console.warn("No entry found")}}_subEntry(t,e){this._withEntry((t,e,r)=>{const o=t.subscribe(e,t=>{this.isConnected&&r(t)});this._entrySubs.add(o)})(t,e)}_reset(){for(const t of this._entrySubs)t.remove();this._entrySubs=new Set,this._entry=null}disconnectedCallback(){super.disconnectedCallback(),this._entrySubs=new Set}},Fs=Object.freeze({FINISHED:Symbol("FINISHED"),FAILED:Symbol("FAILED"),UPLOADING:Symbol("UPLOADING"),VALIDATION:Symbol("VALIDATION"),QUEUED_UPLOADING:Symbol("QUEUED-UPLOADING"),QUEUED_VALIDATION:Symbol("QUEUED-VALIDATION"),IDLE:Symbol("IDLE")}),Vs=class t extends zs{couldBeCtxOwner=!0;pauseRender=!0;_renderedOnce=!1;_observer;_isIntersecting=!1;_thumbRect;constructor(){super(),this.init$={...this.init$,uid:"",itemName:"",errorText:"",hint:"",thumbUrl:"",progressValue:0,progressVisible:!1,badgeIcon:"",isFinished:!1,isFailed:!1,isUploading:!1,isFocused:!1,isEditable:!1,showFileNames:!1,state:Fs.IDLE,ariaLabelStatusFile:"",onEdit:this._withEntry(t=>{this.telemetryManager.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{event:"edit-file",node:this.tagName}}}),this.$["*currentActivityParams"]={internalId:t.uid},this.modalManager?.open(tn.activities.CLOUD_IMG_EDIT),this.$["*currentActivity"]=tn.activities.CLOUD_IMG_EDIT}),onRemove:()=>{this.telemetryManager.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{event:"remove-file",node:this.tagName}}}),this.uploadCollection.remove(this.$.uid)},onUpload:()=>{this.upload()}}}_calculateState=this._withEntry(t=>{let e=Fs.IDLE;t.getValue("errors").length>0?e=Fs.FAILED:t.getValue("isQueuedForUploading")?e=Fs.QUEUED_UPLOADING:t.getValue("isQueuedForValidation")?e=Fs.QUEUED_VALIDATION:t.getValue("isValidationPending")?e=Fs.VALIDATION:t.getValue("isUploading")?e=Fs.UPLOADING:t.getValue("fileInfo")&&(e=Fs.FINISHED),this.$.state=e});_debouncedCalculateState=jo(this._calculateState.bind(this),100);_updateHintAndProgress=this._withEntry(Ra((t,e)=>{const r=t.getValue("errors")?.[0]?.message,o=t.getValue("source"),i=t.getValue("externalUrl"),n=e===Fs.FINISHED,a=e===Fs.UPLOADING,s=e===Fs.QUEUED_UPLOADING,c=e===Fs.QUEUED_VALIDATION,l=e===Fs.VALIDATION,u=t.getValue("fileName");let d="";r?d="":!n&&i&&o&&Object.values(wn).includes(o)&&(d=this.l10n("waiting-for",{source:this.l10n(`src-type-${o}`)})),this.set$({hint:d,errorText:r,progressVisible:a||s||c||l,progressValue:c||l?0:t.getValue("uploadProgress"),ariaLabelStatusFile:u&&this.l10n("a11y-file-item-status",{fileName:u,status:this.l10n(e?.description?.toLocaleLowerCase()??"").toLocaleLowerCase()})})},100));_handleState=this._withEntry((t,e)=>{e===Fs.FAILED?this.$.badgeIcon="badge-error":e===Fs.FINISHED&&(this.$.badgeIcon="badge-success"),e===Fs.UPLOADING&&(this.$.isFocused=!1),this.set$({isFailed:e===Fs.FAILED,isUploading:e===Fs.UPLOADING,isFinished:e===Fs.FINISHED,isEditable:this.cfg.useCloudImageEditor&&t.getValue("isImage")&&t.getValue("cdnUrl")}),this._updateHintAndProgress(e)});_reset(){super._reset(),this._debouncedCalculateState.cancel()}_observerCallback(t){const[e]=t;e&&(this._isIntersecting=e.isIntersecting,this._thumbRect=e.boundingClientRect,e.isIntersecting&&!this._renderedOnce&&(this.render(),this._renderedOnce=!0))}_handleEntryId(t){this._reset();const e=this.uploadCollection?.read(t);this._entry=e,e&&(this._subEntry("isQueuedForValidation",()=>{this._debouncedCalculateState()}),this._subEntry("isValidationPending",()=>{this._debouncedCalculateState()}),this._subEntry("uploadProgress",()=>{this._debouncedCalculateState()}),this._subEntry("isQueuedForUploading",()=>{this._debouncedCalculateState()}),this._subEntry("fileName",t=>{this.$.itemName=t||e.getValue("externalUrl")||this.l10n("file-no-name"),this._debouncedCalculateState()}),this._subEntry("externalUrl",t=>{this.$.itemName=e.getValue("fileName")||t||this.l10n("file-no-name")}),this._subEntry("fileInfo",()=>{this._debouncedCalculateState()}),this._subEntry("errors",()=>this._debouncedCalculateState()),this._subEntry("isUploading",()=>this._debouncedCalculateState()),this._subEntry("fileSize",()=>this._debouncedCalculateState()),this._subEntry("mimeType",()=>this._debouncedCalculateState()),this._subEntry("isImage",()=>this._debouncedCalculateState()))}_updateShowFileNames(t){"list"===this.cfg.filesViewMode?this.$.showFileNames=!0:this.$.showFileNames=t}initCallback(){super.initCallback(),this.sub("uid",t=>{this._handleEntryId(t)}),this.sub("state",t=>{this._handleState(t)}),this.subConfigValue("useCloudImageEditor",()=>this._debouncedCalculateState()),this.subConfigValue("filesViewMode",t=>{this._updateShowFileNames(this.cfg.gridShowFileNames),this.setAttribute("mode",t)}),this.subConfigValue("gridShowFileNames",t=>{this._updateShowFileNames(t)}),this.onclick=()=>{t.activeInstances.forEach(t=>{t===this?t.setAttribute("focused",""):t.removeAttribute("focused")})},this.sub("*uploadTrigger",t=>{this._entry&&!t.has(this._entry.uid)||setTimeout(()=>this.isConnected&&this.upload())}),t.activeInstances.add(this)}destroyCallback(){super.destroyCallback(),t.activeInstances.delete(this),this._reset()}connectedCallback(){super.connectedCallback(),this._observer=new window.IntersectionObserver(this._observerCallback.bind(this),{threshold:[0,1]}),this._observer.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this._observer?.disconnect()}_settingsOfShrink(){return(t=>{if("string"!=typeof t)return!1;const e=Ds.exec(t.toLocaleLowerCase())??[];if(0===e.length)return!1;const r=Number(e[1])*Number(e[2]);return r>268435456?(console.warn(`Shrinked size can not be larger than ${Math.floor(268.435456)}MP. You have set ${e[1]}x${e[2]} (${Math.ceil(r/1e3/100)/10}MP).`),!1):{quality:e[3]?Number(e[3])/100:void 0,size:r}})(this.cfg.imageShrink)}async _processShrink(t){const e=this._settingsOfShrink();return e?await zo(t,e):(console.warn("Image shrink settings are invalid, skipping shrinking"),t)}upload=this._withEntry(async t=>{if(!this.uploadCollection.read(t.uid))return;if(t.getValue("fileInfo")||t.getValue("isUploading")||t.getValue("errors").length>0||t.getValue("isValidationPending"))return;const e=this.cfg.multiple?this.cfg.multipleMax:1;if(!(e&&this.uploadCollection.size>e)){t.setMultipleValues({isUploading:!0,errors:[],isQueuedForUploading:!0}),this._debouncedCalculateState();try{const e=new AbortController;t.setValue("abortController",e);const r=async()=>{t.setValue("isQueuedForUploading",!1);let r=t.getValue("file");if(r instanceof File&&this.cfg.imageShrink)try{r=await this._processShrink(r)}catch{}const o=r||t.getValue("externalUrl")||t.getValue("uuid");if(!o)throw new Error("No file input");const i={...await this.getUploadClientOptions(),fileName:t.getValue("fileName")??void 0,source:t.getValue("source")??void 0,onProgress:e=>{if(e.isComputable){const r=100*e.value;t.setValue("uploadProgress",r)}},signal:e.signal,metadata:await this.getMetadataFor(t.uid)};return this.debugPrint("upload options",o,i),Kr(o,i)},o=await this.$["*uploadQueue"].add(r);t.setMultipleValues({fileInfo:o,isQueuedForUploading:!1,isUploading:!1,fileName:o.originalFilename,fileSize:o.size,isImage:o.isImage??!1,mimeType:o.contentInfo?.mime?.mime??o.mimeType,uuid:o.uuid,cdnUrl:t.getValue("cdnUrl")??o.cdnUrl,cdnUrlModifiers:t.getValue("cdnUrlModifiers")??"",uploadProgress:100,source:t.getValue("source")??null}),t===this._entry&&this._debouncedCalculateState()}catch(e){this.telemetryManager.sendEventError(e,"file upload. Failed to upload file"),e instanceof er&&e.isCancel?t.setMultipleValues({isUploading:!1,uploadProgress:0}):e instanceof Je?t.setMultipleValues({isUploading:!1,uploadProgress:0,uploadError:e}):(console.error("Unknown upload error",e),t.setMultipleValues({isUploading:!1,uploadProgress:0,uploadError:new Error("Something went wrong",{cause:e})})),t===this._entry&&this._debouncedCalculateState()}}});static template='\n <div class="uc-inner" set="@finished: isFinished; @uploading: isUploading; @failed: isFailed; @focused: isFocused">\n <uc-thumb set="uid:uid;badgeIcon:badgeIcon"></uc-thumb>\n\n <div aria-atomic="true" aria-live="polite" class="uc-file-name-wrapper" set="@aria-label:ariaLabelStatusFile;">\n <span class="uc-file-name" set="@hidden: !showFileNames">{{itemName}}</span>\n <span class="uc-file-error" set="@hidden: !errorText;">{{errorText}}</span>\n <span class="uc-file-hint" set="@hidden: !hint">{{hint}}</span>\n </div>\n <div class="uc-file-actions">\n <button\n type="button"\n l10n="@title:file-item-edit-button;@aria-label:file-item-edit-button"\n class="uc-edit-btn uc-mini-btn"\n set="onclick: onEdit; @hidden: !isEditable"\n >\n <uc-icon name="edit-file"></uc-icon>\n </button>\n <button\n type="button"\n l10n="@title:file-item-remove-button;@aria-label:file-item-remove-button"\n class="uc-remove-btn uc-mini-btn"\n set="onclick: onRemove;"\n >\n <uc-icon name="remove-file"></uc-icon>\n </button>\n <button type="button" class="uc-upload-btn uc-mini-btn" set="onclick: onUpload;">\n <uc-icon name="upload"></uc-icon>\n </button>\n </div>\n <uc-progress-bar\n class="uc-progress-bar"\n set="value: progressValue; visible: progressVisible; @hasFileName: showFileNames;"\n >\n </uc-progress-bar>\n </div>\n';static activeInstances=new Set},Bs=class extends la{requireCtxName=!0;_validationInputElement=null;_dynamicInputsContainer=null;_createValidationInput(){const t=document.createElement("input");return t.type="text",t.name=this.ctxName,t.required=this.cfg.multipleMin>0,t.tabIndex=-1,ze(t,{opacity:0,height:0,width:0}),t}initCallback(){super.initCallback(),this._validationInputElement=this._createValidationInput(),this.appendChild(this._validationInputElement),this.sub("*collectionState",t=>{{if(!this._dynamicInputsContainer){const t=document.createElement("div");this.appendChild(t),this._dynamicInputsContainer=t}if(!this._validationInputElement){const t=this._createValidationInput();this.appendChild(t),this._validationInputElement=t}if(this._dynamicInputsContainer.innerHTML="","uploading"===t.status||"idle"===t.status)return this._validationInputElement.value="",void this._validationInputElement.setCustomValidity("");if("failed"===t.status){const e=t.errors[0]?.message;return this._validationInputElement.value="",void this._validationInputElement.setCustomValidity(e??"")}const e=t.group?t.group:null;if(e)return this._validationInputElement.value=e.cdnUrl??"",void this._validationInputElement.setCustomValidity("");const r=t.allEntries.map(t=>t.cdnUrl).filter(t=>"string"==typeof t);if(!this.cfg.multiple&&1===r.length&&r[0])return this._validationInputElement.value=r[0],void this._validationInputElement.setCustomValidity("");this._validationInputElement.remove(),this._validationInputElement=null;const o=new DocumentFragment;for(const t of r){const e=document.createElement("input");e.type="hidden",e.name=`${this.ctxName}[]`,e.value=t,o.appendChild(e)}this._dynamicInputsContainer.replaceChildren(o)}},!1)}},js=class extends Yi{constructor(){super(),this.init$={...this.init$,name:"",href:""}}initCallback(){super.initCallback(),this.sub("name",t=>{if(!t)return;let e=`#uc-icon-${t}`;this.subConfigValue("iconHrefResolver",r=>{if(r){const o=r(t);e=o??e}this.$.href=e})}),this.setAttribute("aria-hidden","true")}};js.template='\n <svg ref="svg" xmlns="http://www.w3.org/2000/svg">\n <use set="@href: href;"></use>\n </svg>\n',js.bindAttributes({name:"name"});var Hs="--uc-img-",qs="unresolved",Ks=!window.location.host.trim()||window.location.host.includes(":")||window.location.hostname.includes("localhost"),Gs=Object.freeze({PREVIEW:"PREVIEW",MAIN:"MAIN"}),Ws=Object.freeze({"dev-mode":{},pubkey:{},uuid:{},src:{},lazy:{default:1},intersection:{},breakpoints:{},"cdn-cname":{default:"https://ucarecdn.com"},"proxy-cname":{},"secure-delivery-proxy":{},"hi-res-support":{default:1},"ultra-res-support":{},format:{},"cdn-operations":{},progressive:{},quality:{},"is-background-for":{},"is-preview-blur":{default:1}}),Xs=Object.create(null);for(const t in Ws)Xs[Hs+t]=Ws[t]?.default||"";var Zs=class extends Ne{cssInit$=Xs;$$(t){return this.$[Hs+t]}set$$(t){for(const e in t)this.$[Hs+e]=t[e]}sub$$(t,e){this.sub(Hs+t,t=>{null!==t&&""!==t&&e(t)})}analyticsParams(){return`-/@clib/${Ki}/${Gi}/uc-img/`}initAttributes(t){[...this.attributes].forEach(e=>{Ws[e.name]||t.setAttribute(e.name,e.value)})}initIntersection(t,e){this._isnObserver=new IntersectionObserver(r=>{r.forEach(r=>{r.isIntersecting&&(e(),this._isnObserver.unobserve(t))})},{root:null,rootMargin:"0px"}),this._isnObserver.observe(t),this._observed||(this._observed=new Set),this._observed.add(t)}destroyCallback(){super.destroyCallback(),this._isnObserver&&(this._observed.forEach(t=>{this._isnObserver.unobserve(t)}),this._isnObserver=null),we.deleteCtx(this)}static get observedAttributes(){return Object.keys(Ws)}attributeChangedCallback(t,e,r){window.setTimeout(()=>{this.$[Hs+t]=r})}},Ys=class extends Zs{_img=new Image;_imgPreview=new Image;_fmtAbs(t){return!t.includes("//")&&!Ks&&(t=new URL(t,document.baseURI).href),t}_validateSize(t){if(""!==t?.trim()){const e=t.match(/\d+/)[0],r=t.match(/[a-zA-Z]+/)[0],o=parseInt(e,10);if(Number(o)>5e3&&this.hasFormatJPG)return 5e3+r;if(Number(o)>3e3&&!this.hasFormatJPG)return 3e3+r}return t}_getCdnModifiers(t,e){const r={format:this.$$("format"),quality:this.$$("quality"),resize:this._validateSize(t),blur:e,"cdn-operations":this.$$("cdn-operations"),analytics:this.analyticsParams()};return Wo(...(t=>Object.entries(t).filter(([t,e])=>void 0!==e&&""!==e).map(([t,e])=>"cdn-operations"===t||"analytics"===t?e:`${t}/${e}`))(r))}_getUrlBase(t="",e=""){if(this.$$("src").startsWith("data:")||this.$$("src").startsWith("blob:"))return this.$$("src");if(Ks&&this.$$("src")&&!this.$$("src").includes("//"))return this._proxyUrl(this.$$("src"));const r=this._getCdnModifiers(t,e);return this.$$("src").startsWith(this.$$("cdn-cname"))?ri(this.$$("src"),r):this.$$("cdn-cname")&&this.$$("uuid")||this.$$("uuid")?this._proxyUrl(ri(oi(this.$$("cdn-cname"),this.$$("uuid")),r)):this.$$("proxy-cname")?this._proxyUrl(ri(this.$$("proxy-cname"),r,this._fmtAbs(this.$$("src")))):this.$$("pubkey")?this._proxyUrl(ri(`https://${this.$$("pubkey")}.ucr.io/`,r,this._fmtAbs(this.$$("src")))):void 0}_proxyUrl(t){return this.$$("secure-delivery-proxy")?Ii(this.$$("secure-delivery-proxy"),{previewUrl:t},{transform:t=>window.encodeURIComponent(t)}):t}_getElSize(t,e=1,r=!0){const o=t.getBoundingClientRect(),i=e*Math.round(o.width),n=r?"":e*Math.round(o.height);return i||n?`${i||""}x${n||""}`:null}_setupEventProxy(t){const e=t=>{t.stopPropagation();const e=new Event(t.type,t);this.dispatchEvent(e)},r=["load","error"];for(const o of r)t.addEventListener(o,e)}get img(){return this.hasPreviewImage||(this._setupConfigForImage({elNode:this._img}),this.appendChild(this._img)),this._img}get currentImg(){return this.hasPreviewImage?{type:Gs.PREVIEW,img:this._imgPreview}:{type:Gs.MAIN,img:this.img}}get hasPreviewImage(){return this.$$("is-preview-blur")}get bgSelector(){return this.$$("is-background-for")}get breakpoints(){if(this.$$("breakpoints")){const e=ii(this.$$("breakpoints"));return t=e.map(t=>parseInt(t,10)),[...new Set(t)]}return null;var t}get hasFormatJPG(){return"jpeg"===this.$$("format").toLowerCase()}renderBg(t){const e=new Set;e.add(`url("${this._getUrlBase(this._getElSize(t))}") 1x`),this.$$("hi-res-support")&&e.add(`url("${this._getUrlBase(this._getElSize(t,2))}") 2x`),this.$$("ultra-res-support")&&e.add(`url("${this._getUrlBase(this._getElSize(t,3))}") 3x`);const r=`image-set(${[...e].join(", ")})`;t.style.setProperty("background-image",r),t.style.setProperty("background-image","-webkit-"+r)}getSrcset(){const t=new Set;return this.breakpoints?this.breakpoints.forEach(e=>{t.add(this._getUrlBase(e+"x")+` ${this._validateSize(e+"w")}`),this.$$("hi-res-support")&&t.add(this._getUrlBase(2*e+"x")+` ${this._validateSize(2*e+"w")}`),this.$$("ultra-res-support")&&t.add(this._getUrlBase(3*e+"x")+` ${this._validateSize(3*e+"w")}`)}):(t.add(this._getUrlBase(this._getElSize(this.currentImg.img))+" 1x"),this.$$("hi-res-support")&&t.add(this._getUrlBase(this._getElSize(this.currentImg.img,2))+" 2x"),this.$$("ultra-res-support")&&t.add(this._getUrlBase(this._getElSize(this.currentImg.img,3))+" 3x")),[...t].join()}getSrc(){return this._getUrlBase()}get srcUrlPreview(){return this._getUrlBase("100x","100")}renderBackground(){[...document.querySelectorAll(this.bgSelector)].forEach(t=>{this.$$("intersection")?this.initIntersection(t,()=>{this.renderBg(t)}):this.renderBg(t)})}_appendURL({elNode:t,src:e,srcset:r}){e&&(t.src=e),r&&(t.srcset=r)}_setupConfigForImage({elNode:t}){this._setupEventProxy(t),this.initAttributes(t)}loaderImage({src:t,srcset:e,elNode:r}){return new Promise((o,i)=>{this._setupConfigForImage({elNode:r}),r.setAttribute(qs,""),r.addEventListener("load",()=>{r.removeAttribute(qs),o(r)}),r.addEventListener("error",()=>{i(!1)}),this._appendURL({elNode:r,src:t,srcset:e})})}async renderImage(){if(this.$$("intersection"))return this.hasPreviewImage&&(this._setupConfigForImage({elNode:this._imgPreview}),this.appendChild(this._imgPreview)),void this.initIntersection(this.currentImg.img,async()=>{this.hasPreviewImage&&(this._imgPreview.src=this.srcUrlPreview);try{await this.loaderImage({src:this.getSrc(),srcset:this.getSrcset(),elNode:this._img}),this.hasPreviewImage&&await this._imgPreview.remove(),this.appendChild(this._img)}catch(t){this.hasPreviewImage&&await(this._imgPreview?.remove()),this.appendChild(this._img)}});try{this.hasPreviewImage&&(await this.loaderImage({src:this.srcUrlPreview,elNode:this._imgPreview}),this.appendChild(this._imgPreview)),await this.loaderImage({src:this.getSrc(),srcset:this.getSrcset(),elNode:this._img}),this.hasPreviewImage&&await(this._imgPreview?.remove()),this.appendChild(this._img)}catch(t){this.hasPreviewImage&&await(this._imgPreview?.remove()),this.appendChild(this._img)}}init(){this.bgSelector?this.renderBackground():this.renderImage()}},Js=class extends Ys{initCallback(){super.initCallback(),this.sub$$("src",()=>{this.init()}),this.sub$$("uuid",()=>{this.init()}),this.sub$$("lazy",t=>{this.$$("is-background-for")||this.$$("is-preview-blur")||(this.img.loading=t?"lazy":"eager")})}},Qs=null,tc=class extends Yi{static styleAttrs=[...super.styleAttrs,"uc-modal"];static StateConsumerScope="modal";_mouseDownTarget;handleModalOpen;handleModalClose;handleModalCloseAll;constructor(){super(),this.init$={...this.init$,closeClicked:this._handleDialogClose}}_handleBackdropClick=()=>{this._closeDialog()};_closeDialog=()=>{this.modalManager?.close(this.id),this.modalManager?.hasActiveModals||(document.body.style.overflow="")};_handleDialogClose=()=>{this._closeDialog()};_handleDialogMouseDown=t=>{this._mouseDownTarget=t.target};_handleDialogMouseUp=t=>{const e=t.target;e===this.ref.dialog&&e===this._mouseDownTarget&&this._closeDialog()};show(){const t=this.ref.dialog;"function"==typeof t.showModal?(this.setAttribute("aria-modal","true"),t.showModal()):t.setAttribute("open",""),this.cfg.modalScrollLock&&(document.body.style.overflow="hidden")}hide(){const t=this.ref.dialog;"function"==typeof t.close?(this.setAttribute("aria-modal","false"),t.close()):t.removeAttribute("open")}_handleModalOpen({id:t}){t===this.id?(Qs=t,this.show(),this.emit(Vo.MODAL_OPEN,{modalId:t},{debounce:!0})):this.hide()}_handleModalClose({id:t}){t===this.id&&(this.hide(),this.emit(Vo.MODAL_CLOSE,{modalId:t,hasActiveModals:this.modalManager?.hasActiveModals},{debounce:!0}))}_handleModalCloseAll(t){this.hide(),Qs===this.id&&this.emit(Vo.MODAL_CLOSE,{modalId:Qs,hasActiveModals:this.modalManager?.hasActiveModals},{debounce:!0})}initCallback(){super.initCallback(),this.modalManager?.registerModal(this.id,this);const t=this.ref.dialog;t.addEventListener("close",this._handleDialogClose),t.addEventListener("mousedown",this._handleDialogMouseDown),t.addEventListener("mouseup",this._handleDialogMouseUp),this.subConfigValue("modalBackdropStrokes",t=>{t?this.setAttribute("strokes",""):this.removeAttribute("strokes")}),this.handleModalOpen=this._handleModalOpen.bind(this),this.handleModalClose=this._handleModalClose.bind(this),this.handleModalCloseAll=this._handleModalCloseAll.bind(this),this.modalManager?.subscribe(Hi.OPEN,this.handleModalOpen),this.modalManager?.subscribe(Hi.CLOSE,this.handleModalClose),this.modalManager?.subscribe(Hi.CLOSE_ALL,this.handleModalCloseAll)}destroyCallback(){super.destroyCallback(),document.body.style.overflow="",this._mouseDownTarget=void 0;const t=this.ref.dialog;t.removeEventListener("close",this._handleDialogClose),t.removeEventListener("mousedown",this._handleDialogMouseDown),t.removeEventListener("mouseup",this._handleDialogMouseUp),this.modalManager?.unsubscribe(Hi.OPEN,this.handleModalOpen),this.modalManager?.unsubscribe(Hi.CLOSE,this.handleModalClose),this.modalManager?.unsubscribe(Hi.CLOSE_ALL,this.handleModalCloseAll)}};tc.template='\n <dialog ref="dialog">\n <slot></slot>\n </dialog>\n';var ec=class extends Yi{_value=0;_visible=!0;constructor(){super(),this.init$={...this.init$,width:0,opacity:0}}initCallback(){super.initCallback();this.ref.fakeProgressLine.addEventListener("animationiteration",()=>{const t=this.ref.fakeProgressLine;this._visible?this._value>0&&t.classList.add("uc-fake-progress--hidden"):t.classList.add("uc-fake-progress--hidden")}),this.defineAccessor("value",t=>{null!=t&&(this._value=t,this._visible&&this.style.setProperty("--l-progress-value",this._value.toString()))}),this.defineAccessor("visible",t=>{this._visible=t,this.classList.toggle("uc-progress-bar--hidden",!t)})}};ec.template='\n <div ref="fakeProgressLine" class="uc-fake-progress"></div>\n <div ref="realProgressLine" class="uc-progress"></div>\n';var rc=class extends la{_unobserveCollectionCb;constructor(){super(),this.init$={...this.init$,visible:!1,value:0,"*commonProgress":0}}initCallback(){super.initCallback(),this._unobserveCollectionCb=this.uploadCollection.observeProperties(()=>{const t=this.uploadCollection.items().some(t=>{const e=this.uploadCollection.read(t);return e?.getValue("isUploading")??!1});this.$.visible=t}),this.sub("visible",t=>{t?this.setAttribute("active",""):this.removeAttribute("active")}),this.sub("*commonProgress",t=>{this.$.value=t})}destroyCallback(){super.destroyCallback(),this._unobserveCollectionCb?.(),this._unobserveCollectionCb=void 0}};rc.template=' <uc-progress-bar set="visible: visible; value: value"></uc-progress-bar> ';var oc=class extends Yi{constructor(){super(),this.init$={...this.init$,currentText:"",options:[],selectHtml:"",onSelect:t=>{t.preventDefault(),t.stopPropagation();const e=this.ref.select;this.value=e.value,this.$.currentText=this.$.options.find(t=>t.value===this.value)?.text||"",this.dispatchEvent(new Event("change"))}}}initCallback(){super.initCallback(),this.sub("options",t=>{this.$.currentText=t?.[0]?.text||"";let e="";t?.forEach(t=>{e+=`<option value="${t.value}">${t.text}</option>`}),this.$.selectHtml=e})}};oc.template=' <select ref="select" set="innerHTML: selectHtml; onchange: onSelect"></select> ';var ic=class extends la{static styleAttrs=[...super.styleAttrs,"uc-simple-btn"];couldBeCtxOwner=!0;constructor(){super(),this.init$={...this.init$,withDropZone:!0,onClick:()=>{this.api.initFlow()},"button-text":""}}initCallback(){super.initCallback(),this.defineAccessor("dropzone",t=>{void 0!==t&&(this.$.withDropZone=ns(t))}),this.subConfigValue("multiple",t=>{this.$["button-text"]=t?"upload-files":"upload-file"})}};ic.template='\n <uc-drop-area set="@disabled: !withDropZone">\n <button type="button" set="onclick: onClick">\n <uc-icon name="upload"></uc-icon>\n <span l10n="button-text"></span>\n <slot></slot>\n <div class="uc-visual-drop-area" l10n="drop-files-here"></div>\n </button>\n </uc-drop-area>\n',ic.bindAttributes({dropzone:null});var nc=class extends la{couldBeCtxOwner=!0;type=void 0;_registeredTypes={};constructor(){super(),this.init$={...this.init$,iconName:"default","src-type":""}}initTypes(){this.registerType({type:kn.LOCAL,activate:()=>(this.api.openSystemDialog(),!1)}),this.registerType({type:kn.URL,activity:tn.activities.URL,textKey:"from-url"}),this.registerType({type:kn.CAMERA,activity:tn.activities.CAMERA,activate:()=>{const t=Sn.htmlMediaCapture;return t&&this.api.openSystemDialog({captureCamera:!0}),!t}}),this.registerType({type:"draw",activity:tn.activities.DRAW,icon:"edit-draw"});for(const t of Object.values(_n))this.registerType({type:t,activity:tn.activities.CAMERA,activate:()=>{const e=Sn.htmlMediaCapture;return e&&this.api.openSystemDialog({captureCamera:!0,modeCamera:"mobile-photo-camera"===t?Qn.PHOTO:Qn.VIDEO}),!e}});for(const t of Object.values(wn))this.registerType({type:t,activity:tn.activities.EXTERNAL,activityParams:{externalSourceType:t}})}initCallback(){super.initCallback(),this.initTypes(),this.defineAccessor("type",t=>{t&&this.applyType(t)})}registerType(t){this._registeredTypes[t.type]=t}getType(t){return this._registeredTypes[t]}activate(){if(!this.type)return;const t=this._registeredTypes[this.type];if(!t)return;const{activity:e,activate:r,activityParams:o={}}=t;(r?r():!!e)&&e&&(this.modalManager?.open(e),this.set$({"*currentActivityParams":o,"*currentActivity":e}))}applyType(t){const e=this._registeredTypes[t];if(!e)return void console.warn(`Unsupported source type: ${t}`);const{textKey:r=t,icon:o=t}=e;this.$["src-type"]=`src-type-${r}`,this.$.iconName=o,this.onclick=()=>{this.activate()}}};nc.template='\n <button type="button">\n <uc-icon set="@name: iconName"></uc-icon>\n <div class="uc-txt" l10n="src-type"></div>\n </button>\n',nc.bindAttributes({type:null});var ac=class extends Yi{initCallback(){super.initCallback(),this.subConfigValue("sourceList",t=>{const e=ii(t);let r="";e.forEach(t=>{"instagram"!==t?"camera"===t&&Sn.htmlMediaCapture?this.subConfigValue("cameraModes",t=>{const e=Ho(t);e.forEach(t=>{r+=`<uc-source-btn role="listitem" type="mobile-${t}-camera"></uc-source-btn>`}),0===e.length&&(r+='<uc-source-btn role="listitem" type="mobile-photo-camera"></uc-source-btn>')}):r+=`<uc-source-btn role="listitem" type="${t}"></uc-source-btn>`:console.error("Instagram source was removed because the Instagram Basic Display API hasn't been available since December 4, 2024. Official statement, see here:https://developers.facebook.com/blog/post/2024/09/04/update-on-instagram-basic-display-api/?locale=en_US")}),this.cfg.sourceListWrap?this.innerHTML=r:this.outerHTML=r})}},sc=class extends Ne{};sc.template=' <div class="uc-spinner"></div> ';var cc=class extends tn{historyTracked=!0;activityType=tn.activities.START_FROM;initCallback(){super.initCallback(),this.registerActivity(this.activityType??"")}};function lc(t,e=40){if("image/svg+xml"===t.type)return URL.createObjectURL(t);const r=document.createElement("canvas"),o=r.getContext("2d");if(!o)return Promise.reject(new Error("Canvas context not supported"));const i=new Image,n=new Promise((t,n)=>{i.onload=()=>{const a=i.height/i.width;a>1?(r.width=e,r.height=e*a):(r.height=e,r.width=e/a),o.fillStyle="rgb(240, 240, 240)",o.fillRect(0,0,r.width,r.height),o.drawImage(i,0,0,r.width,r.height),r.toBlob(e=>{if(!e)return void n();const r=URL.createObjectURL(e);t(r)})},i.onerror=t=>{n(t)}});return i.src=URL.createObjectURL(t),n}function uc(t="hsl(209, 21%, 65%)",e=32,r=32){return function(t){const e=new Blob([t],{type:"image/svg+xml"});return URL.createObjectURL(e)}(`\n <svg width="${e}" height="${r}" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" fill="${t}" d="M9.68848 8.70068C9.68848 8.42454 9.91233 8.20068 10.1885 8.20068H15.0885C15.2211 8.20068 15.3483 8.25336 15.442 8.34713L20.342 13.2471C20.4358 13.3409 20.4885 13.4681 20.4885 13.6007V21.3007C20.4885 21.5768 20.2646 21.8007 19.9885 21.8007H10.1885C9.91233 21.8007 9.68848 21.5768 9.68848 21.3007V8.70068ZM10.6885 9.20068V20.8007H19.4885V14.1007L15.0885 14.1007C14.8123 14.1007 14.5885 13.8768 14.5885 13.6007L14.5885 9.20068H10.6885ZM15.5885 9.90779L18.7814 13.1007L15.5885 13.1007L15.5885 9.90779Z"/>\n </svg>\n `)}cc.template=' <div class="uc-content"><slot></slot></div> ';var dc=class extends zs{_renderedGridOnce=!1;_thumbRect=null;_isIntersecting=!1;_firstViewMode=this.cfg.filesViewMode;_observer;constructor(){super(),this.init$={...this.init$,thumbUrl:"",badgeIcon:"",uid:""}}_calculateThumbSize(t=!1){t&&(this._thumbRect=this.getBoundingClientRect());let e=Math.max(parseInt(String(this?._thumbRect?.height||0),10),parseInt(String(this?._thumbRect?.width||0),10),this.cfg.thumbSize);return window.devicePixelRatio>1&&(e*=window.devicePixelRatio),Math.min(e,3e3)}_generateThumbnail=this._withEntry(async(t,e=!1)=>{const r=t.getValue("fileInfo"),o=t.getValue("isImage"),i=t.getValue("uuid"),n=t.getValue("thumbUrl"),a=this._calculateThumbSize(e);if(r&&o&&i){const e=await this.proxyUrl(ri(oi(this.cfg.cdnCname,i),Wo(t.getValue("cdnUrlModifiers"),"stretch/off",`scale_crop/${a}x${a}/center`)));if(n===e)return;const{promise:r}=Ia(e);return void r.then(()=>{t.setValue("thumbUrl",e),n?.startsWith("blob:")&&URL.revokeObjectURL(n)}).catch(async()=>{if(!n?.startsWith("blob:"))try{const e=t.getValue("file");if(!e)return;const r=await lc(e,a);t.setValue("thumbUrl",r)}catch(e){this.telemetryManager.sendEventError(e,"thumbnail generation. Failed to generate thumb from file");const r=window.getComputedStyle(this).getPropertyValue("--uc-muted-foreground");t.setValue("thumbUrl",uc(r))}})}if(t.getValue("thumbUrl"))return;const s=t.getValue("file");if(s?.type.includes("image"))try{const e=await lc(s,a);t.setValue("thumbUrl",e)}catch(e){this.telemetryManager.sendEventError(e,"thumbnail generation. Failed to generate thumb from file");const r=window.getComputedStyle(this).getPropertyValue("--uc-muted-foreground");t.setValue("thumbUrl",uc(r))}else{const e=window.getComputedStyle(this).getPropertyValue("--uc-muted-foreground");t.setValue("thumbUrl",uc(e))}});_debouncedGenerateThumb=jo(this._generateThumbnail.bind(this),100);_observerCallback(t){const[e]=t;e&&(this._isIntersecting=e.isIntersecting,e.isIntersecting&&(this._thumbRect=e.boundingClientRect,this._debouncedGenerateThumb(),this._observer?.disconnect()),0===e.intersectionRatio&&this._debouncedGenerateThumb.cancel())}_reset(){super._reset(),this._debouncedGenerateThumb.cancel()}_handleEntryId(t){this._reset();const e=this.uploadCollection?.read(t);this._entry=e,e&&(this._subEntry("fileInfo",t=>{t?.isImage&&this._isIntersecting&&this._debouncedGenerateThumb()}),this._subEntry("thumbUrl",t=>{this.$.thumbUrl=t?`url(${t})`:""}),this._subEntry("cdnUrlModifiers",()=>{this._isIntersecting&&this._debouncedGenerateThumb()}),this._isIntersecting&&this._debouncedGenerateThumb())}initCallback(){super.initCallback(),this.defineAccessor("badgeIcon",t=>{this.$.badgeIcon=t}),this.defineAccessor("uid",t=>{this.set$({uid:t})}),this.sub("uid",t=>{this._handleEntryId(t)}),this.subConfigValue("filesViewMode",t=>{"grid"!==t||this._renderedGridOnce||("list"===this._firstViewMode&&this._debouncedGenerateThumb(!0),this._renderedGridOnce=!0)}),this.setAttribute("role","img")}connectedCallback(){super.connectedCallback(),this._observer=new window.IntersectionObserver(this._observerCallback.bind(this),{threshold:.1}),this._observer.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this._entrySubs=new Set,this._debouncedGenerateThumb.cancel(),this._observer?.disconnect()}};dc.template='\n <div class="uc-thumb" set="style.backgroundImage: thumbUrl">\n <div class="uc-badge">\n <uc-icon set="@name: badgeIcon"></uc-icon>\n </div>\n </div>\n',dc.bindAttributes({badgeIcon:null,uid:null});var hc=class extends la{static styleAttrs=["uc-wgt-common"];static EventType=Vo;requireCtxName=!0;initCallback(){super.initCallback(),this.$["*eventEmitter"].bindTarget(this)}destroyCallback(){super.destroyCallback(),this.$["*eventEmitter"].unbindTarget(this)}},pc=class extends la{couldBeCtxOwner=!0;historyTracked=!0;activityType=tn.activities.UPLOAD_LIST;constructor(){super(),this.init$={...this.init$,doneBtnVisible:!1,doneBtnEnabled:!1,uploadBtnVisible:!1,addMoreBtnVisible:!1,addMoreBtnEnabled:!1,headerText:"",commonErrorMessage:"",hasFiles:!1,onAdd:()=>{this.telemetryManager.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{event:"add-more",node:this.tagName}}}),this.api.initFlow(!0)},onUpload:()=>{this.emit(Vo.UPLOAD_CLICK),this.api.uploadAll(),this._throttledHandleCollectionUpdate()},onDone:()=>{this.emit(Vo.DONE_CLICK,this.api.getOutputCollectionState()),this.api.doneFlow()},onCancel:()=>{this.telemetryManager.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{event:"clear-all",node:this.tagName}}}),this.uploadCollection.clearAll()}}}_throttledHandleCollectionUpdate=Ra(()=>{this.isConnected&&(this._updateUploadsState(),this.couldOpenActivity||this.$["*currentActivity"]!==this.activityType||this.historyBack(),this.cfg.confirmUpload||this.api.uploadAll())},300);_updateUploadsState(){const t=this.api.getOutputCollectionState(),e={total:t.totalCount,succeed:t.successCount,uploading:t.uploadingCount,failed:t.failedCount,validatingBeforeUploading:t.idleEntries.filter(t=>t.isValidationPending).length},r=!t.errors.some(t=>"TOO_MANY_FILES"===t.type||"TOO_FEW_FILES"===t.type),o=t.errors.some(t=>"TOO_MANY_FILES"===t.type),i=t.totalCount===(this.cfg.multiple?this.cfg.multipleMax:1),n=t.allEntries.some(t=>t.isValidationPending),a=0===e.failed&&0===t.errors.length&&!n;let s=!1,c=!1,l=!1;if(e.total-e.succeed-e.uploading-e.failed>0&&r&&a)s=!0;else{c=!0;const o=!this.cfg.groupOutput||!!t.group;l=e.total===e.succeed&&r&&a&&o}this.set$({doneBtnVisible:c,doneBtnEnabled:l,uploadBtnVisible:s,addMoreBtnEnabled:0===e.total||!o&&!i,addMoreBtnVisible:!i||this.cfg.multiple,hasFiles:e.total>0}),this.bindL10n("headerText",()=>this._getHeaderText(e))}_getHeaderText(t){const e=e=>{let r=t[e];return"uploading"===e&&(r+=t.validatingBeforeUploading),this.l10n(`header-${e}`,{count:r})};return t.uploading>0||t.validatingBeforeUploading>0?e("uploading"):t.failed>0?e("failed"):t.succeed>0?e("succeed"):e("total")}get couldOpenActivity(){return this.cfg.showEmptyList||this.uploadCollection.size>0}initCallback(){super.initCallback(),this.registerActivity(this.activityType),this.subConfigValue("multiple",this._throttledHandleCollectionUpdate),this.subConfigValue("multipleMin",this._throttledHandleCollectionUpdate),this.subConfigValue("multipleMax",this._throttledHandleCollectionUpdate),this.sub("*groupInfo",t=>{t&&this._throttledHandleCollectionUpdate()}),this.subConfigValue("filesViewMode",t=>{this.setAttribute("mode",t)}),this.sub("*currentActivity",t=>{this.couldOpenActivity||t!==this.activityType||(this.$["*currentActivity"]=this.initActivity)}),this.uploadCollection.observeProperties(this._throttledHandleCollectionUpdate),this.uploadCollection.observeCollection(this._throttledHandleCollectionUpdate),this.sub("*collectionErrors",t=>{const e=t.filter(t=>"SOME_FILES_HAS_ERRORS"!==t.type)[0];e?this.set$({commonErrorMessage:e.message}):this.set$({commonErrorMessage:null})})}destroyCallback(){super.destroyCallback(),this.uploadCollection.unobserveProperties(this._throttledHandleCollectionUpdate),this.uploadCollection.unobserveCollection(this._throttledHandleCollectionUpdate)}};pc.template='\n <uc-activity-header>\n <span aria-live="polite" class="uc-header-text">{{headerText}}</span>\n <button\n type="button"\n class="uc-mini-btn uc-close-btn"\n set="onclick: *closeModal"\n l10n="@title:a11y-activity-header-button-close;@aria-label:a11y-activity-header-button-close"\n >\n <uc-icon name="close"></uc-icon>\n </button>\n </uc-activity-header>\n\n <div class="uc-no-files" set="@hidden: hasFiles">\n <slot name="empty"><span l10n="no-files"></span></slot>\n </div>\n\n <div class="uc-files">\n <div class="uc-files-wrapper" repeat="*uploadList" repeat-item-tag="uc-file-item"></div>\n <button\n type="button"\n class="uc-add-more-btn uc-secondary-btn"\n set="onclick: onAdd; @disabled: !addMoreBtnEnabled; @hidden: !addMoreBtnVisible"\n >\n <uc-icon name="add"></uc-icon><span l10n="add-more"></span>\n </button>\n </div>\n\n <div class="uc-common-error" set="@hidden: !commonErrorMessage; textContent: commonErrorMessage;"></div>\n\n <div class="uc-toolbar">\n <button type="button" class="uc-cancel-btn uc-secondary-btn" set="onclick: onCancel;" l10n="clear"></button>\n <div class="uc-toolbar-spacer"></div>\n <button\n type="button"\n class="uc-add-more-btn uc-secondary-btn"\n set="onclick: onAdd; @disabled: !addMoreBtnEnabled; @hidden: !addMoreBtnVisible"\n >\n <uc-icon name="add"></uc-icon><span l10n="add-more"></span>\n </button>\n <button\n type="button"\n class="uc-upload-btn uc-primary-btn"\n set="@hidden: !uploadBtnVisible; onclick: onUpload;"\n l10n="upload"\n ></button>\n <button\n type="button"\n class="uc-done-btn uc-primary-btn"\n set="@hidden: !doneBtnVisible; onclick: onDone; @disabled: !doneBtnEnabled"\n l10n="done"\n ></button>\n </div>\n\n <uc-drop-area ghost></uc-drop-area>\n';var gc=class extends la{couldBeCtxOwner=!0;activityType=tn.activities.URL;constructor(){super(),this.init$={...this.init$,importDisabled:!0,onUpload:t=>{t.preventDefault(),this.telemetryManager.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{event:"upload-from-url",node:this.tagName}}});const e=this.ref.input.value;this.api.addFileFromUrl(e,{source:kn.URL}),this.modalManager?.open(tn.activities.UPLOAD_LIST),this.$["*currentActivity"]=tn.activities.UPLOAD_LIST},onCancel:()=>{this.historyBack()},onInput:t=>{const e=t.target?.value??"";this.set$({importDisabled:!e})}}}initCallback(){super.initCallback(),this.registerActivity(this.activityType??"",{onActivate:()=>{const t=this.ref.input;t.value="",t.focus()}})}};gc.template='\n <uc-activity-header>\n <button type="button" class="uc-mini-btn" set="onclick: *historyBack" l10n="@title:back;@aria-label:back">\n <uc-icon name="back"></uc-icon>\n </button>\n <div>\n <uc-icon name="url"></uc-icon>\n <span l10n="caption-from-url"></span>\n </div>\n <button\n type="button"\n class="uc-mini-btn uc-close-btn"\n set="onclick: *closeModal"\n l10n="@title:a11y-activity-header-button-close;@aria-label:a11y-activity-header-button-close"\n >\n <uc-icon name="close"></uc-icon>\n </button>\n </uc-activity-header>\n <form class="uc-content">\n <label>\n <input placeholder="https://" class="uc-url-input" type="text" ref="input" set="oninput: onInput" />\n </label>\n <button\n type="submit"\n class="uc-url-upload-btn uc-primary-btn"\n set="onclick: onUpload; @disabled: importDisabled"\n l10n="upload-url"\n ></button>\n </form>\n';var mc=class extends ka{static styleAttrs=[...super.styleAttrs,"uc-wgt-common"];constructor(){super(),this.init$={...this.init$,"*solution":this.tagName}}initCallback(){super.initCallback(),this.telemetryManager.sendEvent({eventType:Fo.INIT_SOLUTION}),this.a11y?.registerBlock(this)}},fc=class extends nn{static styleAttrs=[...super.styleAttrs,"uc-file-uploader-inline"];constructor(){super(),this.init$={...this.init$,couldCancel:!1,"*solution":this.tagName,cancel:()=>{if(this.couldHistoryBack){const t=this.$["*historyBack"];return void t?.()}this.couldShowList&&(this.$["*currentActivity"]=tn.activities.UPLOAD_LIST)}}}get couldHistoryBack(){const t=this.$["*history"];return!(!t||t.length<=1)&&t[t.length-1]!==tn.activities.START_FROM}get couldShowList(){const t=this.$["*uploadList"];return this.cfg.showEmptyList||Array.isArray(t)&&t.length>0}initCallback(){super.initCallback(),this.telemetryManager.sendEvent({eventType:Fo.INIT_SOLUTION});const t=this.ref.uBlock;t&&(this.sub("*currentActivity",e=>{e||(this.$["*currentActivity"]=t.initActivity||tn.activities.START_FROM)}),this.sub("*uploadList",e=>{Array.isArray(e)&&e.length>0&&this.$["*currentActivity"]===(t.initActivity||tn.activities.START_FROM)&&(this.$["*currentActivity"]=tn.activities.UPLOAD_LIST)}),this.sub("*history",()=>{this.$.couldCancel=this.couldHistoryBack||this.couldShowList}))}};fc.template='\n <uc-start-from>\n <uc-drop-area with-icon clickable></uc-drop-area>\n <uc-source-list role="list" wrap></uc-source-list>\n <button\n type="button"\n l10n="start-from-cancel"\n class="uc-cancel-btn uc-secondary-btn"\n set="onclick: cancel; @hidden: !couldCancel"\n ></button>\n <uc-copyright></uc-copyright>\n </uc-start-from>\n <uc-upload-list ref="uBlock"></uc-upload-list>\n <uc-camera-source></uc-camera-source>\n <uc-url-source></uc-url-source>\n <uc-external-source></uc-external-source>\n <uc-cloud-image-editor-activity></uc-cloud-image-editor-activity>\n';var bc="active",vc=class extends nn{static styleAttrs=[...super.styleAttrs,"uc-file-uploader-minimal"];handleModalOpen;handleModalClose;constructor(){super(),this.init$={...this.init$,singleUpload:!1,isHiddenStartFrom:!1,classUploadList:"",classStartFrom:"","*solution":this.tagName}}_handleModalOpen(t){t.id===tn.activities.CLOUD_IMG_EDIT&&this.set$({classUploadList:bc}),this.$["*currentActivity"]===tn.activities.UPLOAD_LIST&&this.set$({classUploadList:bc,isHiddenStartFrom:!0});const e=this.$["*uploadList"];(!e||e.length<=0)&&this.set$({classStartFrom:bc})}_handleModalClose(t){t.id===this.$["*currentActivity"]&&(this.$["*currentActivity"]=tn.activities.UPLOAD_LIST,this.set$({isHiddenStartFrom:!1})),t.id===tn.activities.CLOUD_IMG_EDIT&&(this.$["*currentActivity"]=tn.activities.UPLOAD_LIST)}initCallback(){super.initCallback(),this.telemetryManager.sendEvent({eventType:Fo.INIT_SOLUTION});const t=this.ref.uBlock;t&&(this.sub("*currentActivity",e=>{e===tn.activities.UPLOAD_LIST&&this.modalManager?.closeAll(),e||(this.$["*currentActivity"]=t.initActivity||tn.activities.START_FROM)}),this.sub("*uploadList",e=>{Array.isArray(e)&&e.length>0?(this.$["*currentActivity"]=tn.activities.UPLOAD_LIST,this.set$({classStartFrom:""})):(this.set$({classUploadList:"",isHiddenStartFrom:!1}),this.$["*currentActivity"]=t.initActivity||tn.activities.START_FROM)}),this.subConfigValue("confirmUpload",t=>{!1!==t&&(this.cfg.confirmUpload=!1)}),this.subConfigValue("filesViewMode",t=>{this.setAttribute("mode",t),this.subConfigValue("multiple",e=>{"grid"===t?(e?this.style.removeProperty("--uc-grid-col"):this.style.setProperty("--uc-grid-col","1"),this.$.singleUpload=!e):(this.style.removeProperty("--uc-grid-col"),this.$.singleUpload=!1)})}),this.handleModalOpen=t=>{this._handleModalOpen(t)},this.handleModalClose=t=>{this._handleModalClose(t)},this.modalManager?.subscribe(Hi.OPEN,this.handleModalOpen),this.modalManager?.subscribe(Hi.CLOSE,this.handleModalClose))}destroyCallback(){super.destroyCallback(),this.modalManager?.unsubscribe(Hi.OPEN,this.handleModalOpen),this.modalManager?.unsubscribe(Hi.CLOSE,this.handleModalClose)}};vc.template='\n <uc-start-from set="@hidden: isHiddenStartFrom; @class:classStartFrom">\n <uc-drop-area set="@single:singleUpload;" initflow clickable tabindex="0" l10n="choose-file"></uc-drop-area>\n <uc-copyright></uc-copyright>\n </uc-start-from>\n <uc-upload-list set="@class:classUploadList" ref="uBlock"></uc-upload-list>\n\n <uc-modal id="start-from" strokes block-body-scrolling>\n <uc-start-from>\n <uc-drop-area with-icon clickable></uc-drop-area>\n <uc-source-list role="list" wrap></uc-source-list>\n <button type="button" l10n="start-from-cancel" class="uc-secondary-btn" set="onclick: *historyBack"></button>\n </uc-start-from>\n </uc-modal>\n\n <uc-modal id="camera" strokes block-body-scrolling>\n <uc-camera-source></uc-camera-source>\n </uc-modal>\n\n <uc-modal id="url" strokes block-body-scrolling>\n <uc-url-source></uc-url-source>\n </uc-modal>\n\n <uc-modal id="external" strokes block-body-scrolling>\n <uc-external-source></uc-external-source>\n </uc-modal>\n\n <uc-modal id="cloud-image-edit" strokes block-body-scrolling>\n <uc-cloud-image-editor-activity></uc-cloud-image-editor-activity>\n </uc-modal>\n';var yc=class extends nn{static styleAttrs=[...super.styleAttrs,"uc-file-uploader-regular"];constructor(){super();const t={...this.init$,isHidden:!1,"*solution":this.tagName};this.init$=t}initCallback(){super.initCallback(),this.telemetryManager.sendEvent({eventType:Fo.INIT_SOLUTION}),this.defineAccessor("headless",t=>{this.set$({isHidden:ns(t)})})}};yc.template='\n <uc-simple-btn set="@hidden: isHidden"></uc-simple-btn>\n\n <uc-modal id="start-from" strokes block-body-scrolling>\n <uc-start-from>\n <uc-drop-area with-icon clickable></uc-drop-area>\n <uc-source-list role="list" wrap></uc-source-list>\n <button type="button" l10n="start-from-cancel" class="uc-secondary-btn" set="onclick: *historyBack"></button>\n <uc-copyright></uc-copyright>\n </uc-start-from>\n </uc-modal>\n\n <uc-modal id="upload-list" strokes block-body-scrolling>\n <uc-upload-list></uc-upload-list>\n </uc-modal>\n\n <uc-modal id="camera" strokes block-body-scrolling>\n <uc-camera-source></uc-camera-source>\n </uc-modal>\n\n <uc-modal id="url" strokes block-body-scrolling>\n <uc-url-source></uc-url-source>\n </uc-modal>\n\n <uc-modal id="external" strokes block-body-scrolling>\n <uc-external-source></uc-external-source>\n </uc-modal>\n\n <uc-modal id="cloud-image-edit" strokes block-body-scrolling>\n <uc-cloud-image-editor-activity></uc-cloud-image-editor-activity>\n </uc-modal>\n',yc.bindAttributes({headless:null});const wc=_c;function _c(t,e){const r=kc();return(_c=function(t,e){return r[t-=301]})(t,e)}function kc(){const t=["2033517tHcGYV","define","5999FboZuM","1709831kHzahc","editor","locale","Local","requires","isPremiumPlugin","contentLanguage","get","2613900wIytbR","_defineLocale","8234920PrlSjN","config","defineComponents","uploadcare.uploader.sourceList","uploadcare.locale","Uploadcare","13554XhhCgZ","1157846kzHMoU","URL","pluginName","52281pyPbkg","4768YZrEKJ","isOfficialPlugin","defineLocale"];return(kc=function(){return t})()}!function(t){const e=_c,r=t();for(;;)try{if(985761===parseInt(e(323))/1+-parseInt(e(313))/2+-parseInt(e(320))/3+parseInt(e(304))/4+-parseInt(e(306))/5+-parseInt(e(312))/6*(parseInt(e(322))/7)+parseInt(e(317))/8*(parseInt(e(316))/9))break;r.push(r.shift())}catch(t){r.push(r.shift())}}(kc);class xc extends a.Plugin{static get[wc(327)](){return[be,$]}static get[wc(315)](){return wc(311)}static get[wc(318)](){return!0}static get[wc(301)](){return!0}constructor(r){const o=wc;super(r),r[o(307)][o(321)](o(309),[e[o(326)],e[o(314)]]),t[o(308)](t),this[o(305)]()}[wc(305)](){const e=wc,r=this[e(324)][e(307)][e(303)](e(310)),o=this[e(324)][e(325)][e(302)];r&&t[e(319)](o,r)}}class Cc extends c.View{constructor(t){super(t);const e=t.t,r=this.bindTemplate,o=new c.SpinnerView;o.isVisible=!0,this.setTemplate({tag:"div",attributes:{class:["ck-uploadcare-form__loading"],tabindex:"-1"},children:[{tag:"div",attributes:{class:["ck-uploadcare-form__loading-spinner"]},children:[o,{text:r.to("imageUploadProgress",t=>e("Loading image...")+" ("+(t||0)+"%)")}]},{tag:"div",attributes:{class:["ck-uploadcare-form__skeleton"]},children:[{tag:"div",children:[{tag:"span"},{tag:"span"},{tag:"span"}]},{tag:"div",children:[{tag:"span"},{tag:"span"},{tag:"span"},{tag:"span"},{tag:"span"}]}]}]})}}class Ec extends c.View{constructor(t){super(t);const e=t.t;this.set("errorType",null);const r=new c.ButtonView(t);r.label=e({id:"Try again (Uploadcare)",string:"Try again"}),r.withText=!0,r.class="ck-button-action",r.on("execute",()=>{this.fire("retry")}),r.bind("isVisible").to(this,"errorType",t=>"NotFound"!==t);const o=new c.IconView;o.content=s.IconError,o.extendTemplate({attributes:{style:{width:"50px",height:"50px"}}});const i=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck-uploadcare-form__error"],tabindex:"-1"},children:[{tag:"div",attributes:{class:["ck-uploadcare-form__error-contents"]},children:[o,{tag:"h3",attributes:{style:{fontWeight:"bold"}},children:[{text:e("Unable to load")}]},{text:i.to("errorType",t=>e("NotFound"!==t?"We were unable to load the image due to network connection issues.":"The image was not found. Its source may have been removed."))},r]},{tag:"div",attributes:{class:["ck-uploadcare-form__skeleton"]},children:[{tag:"div",children:[{tag:"span"},{tag:"span"},{tag:"span"}]},{tag:"div",children:[{tag:"span"},{tag:"span"},{tag:"span"},{tag:"span"},{tag:"span"}]}]}]})}}function Tc(){const t=["2032930slepXP","set","imageSrc","setTemplate","282868LAqDci","594345FHLQUR","30RfChJF","uc-light","bindTemplate","7FsZVkA","uc-cloud-image-editor","280200BoqaLL","ck-uploadcare-theme","770864OYdFlU","image-edit","6340136QsmKnD","12038769oOAYEC"];return(Tc=function(){return t})()}function Ac(t,e){const r=Tc();return(Ac=function(t,e){return r[t-=208]})(t,e)}!function(t){const e=Ac,r=t();for(;;)try{if(522316===-parseInt(e(215))/1+-parseInt(e(219))/2+-parseInt(e(224))/3+-parseInt(e(223))/4*(-parseInt(e(208))/5)+-parseInt(e(213))/6+parseInt(e(211))/7*(parseInt(e(217))/8)+parseInt(e(218))/9)break;r.push(r.shift())}catch(t){r.push(r.shift())}}(Tc);class Ic extends c.View{constructor(t,e){const r=Ac;super(t);const o=this[r(210)];this[r(220)](r(221),""),this[r(222)]({tag:r(212),attributes:{...e,class:[r(209),r(214)],"ctx-name":r(216),"cdn-url":o.to(r(221))}})}}const Sc=$c;function Mc(){const t=["_editingView","nodeName","_focusableView","div","length","2103376AObKZh","ck-reset_all-excluded","uploading","754833lvyWLJ","_loadingView","32920qxIpNQ","36VwKFHF","focus","filter","clear","addEventListener","_items","10423eRzJMI","345013YHstXF","add","cancel","536180VCxmiN","_setView","setTemplate","error","toLowerCase","querySelector","retry","726ZSkOLj","element","detail","target","render","2GflhUr","_addErrorViewListeners","cdnUrl","getFocusableElement","set","addMany","fire","change:status","status","_addUploadcareImageEditorListeners","1416890mPFPGB","ck-uploadcare-form","observe","createCollection","uc-cloud-image-editor","_errorView","apply","_waitForImageEditorComponent","addedNodes","ready","once","disconnect"];return(Mc=function(){return t})()}function $c(t,e){const r=Mc();return($c=function(t,e){return r[t-=178]})(t,e)}!function(t){const e=$c,r=t();for(;;)try{if(187188===-parseInt(e(229))/1+-parseInt(e(189))/2*(-parseInt(e(219))/3)+parseInt(e(232))/4+-parseInt(e(199))/5+parseInt(e(184))/6*(parseInt(e(228))/7)+parseInt(e(216))/8+-parseInt(e(222))/9*(parseInt(e(221))/10))break;r.push(r.shift())}catch(t){r.push(r.shift())}}(Mc);class Oc extends D{[Sc(227)];[Sc(220)];[Sc(204)];[Sc(211)];[Sc(213)];constructor(t,e,r){const o=Sc;super(t),this[o(227)]=this[o(202)](),this[o(220)]=new Cc(t),this[o(204)]=new Ec(t),this[o(211)]=new Ic(t,r),this[o(213)]=new c.View(t),this[o(213)][o(179)](this[o(192)]()),this[o(193)](o(197),e),this[o(179)]({tag:o(214),attributes:{class:["ck",o(217),o(200)],tabindex:"-1"},children:this[o(227)]}),this[o(178)](),this[o(209)](o(188),()=>{const t=o;this[t(206)](this[t(185)],e=>{this[t(198)](e)})}),this.on(o(196),()=>{this[o(178)]()}),this[o(190)]()}[Sc(223)](){const t=Sc;this[t(185)][t(223)]()}[Sc(178)](){const t=Sc;switch(this[t(227)][t(225)](),this[t(197)]){case t(218):this[t(227)][t(230)](this[t(220)]);break;case t(180):this[t(227)][t(230)](this[t(204)]);break;case t(208):this[t(227)][t(194)]([this[t(211)],this[t(213)]])}}[Sc(206)](t,e){const r=Sc,o=r(203),i=t[r(182)](o);if(i)return e(i);const n=new MutationObserver(i=>{const a=r,s=i[a(224)](e=>e[a(187)]===t&&e[a(207)][a(215)]>0&&e[a(207)][0][a(212)][a(181)]()===o);s[a(215)]&&(n[a(210)](),e(s[0][a(207)][0]))});n[r(201)](t,{childList:!0,subtree:!0})}[Sc(198)](t){const e=Sc;t[e(226)](e(205),t=>{const r=e;this[r(195)](r(205),{imageSrc:t[r(186)][r(191)]})}),t[e(226)](e(231),()=>{const t=e;this[t(195)](t(231))})}[Sc(190)](){const t=Sc;this[t(204)].on(t(183),()=>{const e=t;this[e(195)](e(183))})}}class Lc extends((0,O.ObservableMixin)()){_editor;_dialog;_imageElement;_imageCache;_controller;_attributes;constructor(t,e,r){super(),this._editor=t,this._dialog=e,this._imageElement=r,this._imageCache=this._editor.plugins.get("UploadcareImageEditUI").imageCache,this._attributes=this._editor.config.get("uploadcare.editor")||{},this.set({isActive:!0,imageStatus:"ready",imageErrorType:null,imageId:null,imageSrc:null,imageDimension:null,imageUploadProgress:null}),this._prepareImage(),this._showDialog()}destroy(){this.isActive=!1,this.stopListening(),this.stopDelegating(),"uploading"===this.imageStatus&&this._controller&&this._controller.abort()}async _prepareImage(){const t=this._imageElement,e=t.getAttribute("uploadcareImageId"),r=t.getAttribute("src");if(e)await this._loadImageInfo(e,r);else if(this._imageCache.has(r)){const t=this._imageCache.get(r);this.imageStatus="ready",this.imageErrorType=null,this.imageSrc=t.url,this.imageDimension=t.dimension,this.imageId=t.id}else this.imageStatus="uploading",this.imageUploadProgress=0,this._controller=new AbortController,await this._uploadImage(this._imageElement,this._controller)}_showDialog(){const{locale:t}=this._editor,e=t.t,r=new Oc(t,this.imageStatus,this._attributes);r.bind("status").to(this,"imageStatus"),r._loadingView.bind("imageUploadProgress").to(this,"imageUploadProgress"),r._editingView.bind("imageSrc").to(this,"imageSrc"),r._errorView.bind("errorType").to(this,"imageErrorType"),this._addEditViewListeners(r,this._imageElement),this._dialog.show({id:"uploadcareImageEdit",icon:s.IconUploadcareImageEdit,title:e({id:"Edit Image (Uploadcare)",string:"Edit image"}),content:r,position:c.DialogViewPosition.EDITOR_TOP_CENTER,isModal:!0,onShow:()=>{r.focus()},onHide:()=>{r.destroy(),this.destroy()},keystrokeHandlerOptions:{filter:t=>!X(t,r.element)}})}_loadImageInfo(t,e){return de.getInfo(t,{publicKey:this._editor.config.get("uploadcare.pubkey"),baseURL:this._editor.config.get("uploadcare.uploader.baseUrl")}).then(r=>{const{width:o,height:i}=r.imageInfo;this.imageStatus="ready",this.imageErrorType=null,this.imageSrc=e,this.imageDimension={width:o,height:i},this.imageId=t}).catch(t=>{this.imageStatus="error",this.imageErrorType="FileNotFoundError"===t.code?"NotFound":"Network",this.imageSrc=null,this.imageDimension=null,this.imageId=null,this.imageUploadProgress=null})}_uploadImage(t,e){return this._getImageAsFile(t).then(t=>de.upload({publicKey:this._editor.config.get("uploadcare.pubkey"),baseURL:this._editor.config.get("uploadcare.uploader.baseUrl"),baseCDN:this._editor.config.get("uploadcare.uploader.cdnCname"),signal:e.signal,file:t,onProgress:t=>{t&&t.isComputable&&(this.imageUploadProgress=Math.ceil(100*t.value))}})).then(e=>{const{width:r,height:o}=e.imageInfo;this.imageStatus="ready",this.imageErrorType=null,this.imageSrc=e.cdnUrl,this.imageDimension={width:r,height:o},this.imageId=e.uuid,this.imageUploadProgress=null;const i=t.getAttribute("src");this._imageCache.set(i,{id:e.uuid,url:e.cdnUrl,dimension:this.imageDimension})}).catch(t=>{this.imageStatus="error",this.imageErrorType="FileNotFoundError"===t.code?"NotFound":"Network",this.imageSrc=null,this.imageDimension=null,this.imageId=null,this.imageUploadProgress=null})}_addEditViewListeners(t,e){t.on("apply",(t,r)=>{this._replaceImage(e,r.imageSrc,this.imageId),this._dialog.hide()}),t.on("retry",()=>{this.imageStatus="uploading",this.imageUploadProgress=0,this._controller=new AbortController,this._uploadImage(this._imageElement,this._controller)}),t.on("cancel",()=>{this._dialog.hide()})}_replaceImage(t,e,r){const o=this._editor,{width:i,height:n}=q(e,this.imageDimension.width,this.imageDimension.height),{imageFallbackUrl:a,imageSources:s}=H(e,i);o.model.change(e=>{if("$graveyard"===t.root.rootName){o.execute("insertImage",{imageType:t.is("element","imageInline")?"imageInline":null,source:{...Object.fromEntries(t.getAttributes()),uploadcareImageId:r,src:a,sources:s,width:i,height:n}});const c=t.getChildren();t=o.model.document.selection.getSelectedElement();for(const r of c)e.append(e.cloneElement(r),t)}else e.setSelection(t,"on"),o.execute("uploadcareImageReplace",{...Object.fromEntries(t.getAttributes()),uploadcareImageId:r,src:a,sources:s,width:i,height:n},t);e.setSelection(t,"on")})}async _getImageAsFile(t){const e=O.global.window,r=O.global.document.location.href,o=new e.URL(t.getAttribute("src"),r);if("data:"===o.protocol){const t=o.href.split(","),r=t[0].match(/:(.*?);/)[1],i=r.split("/")[1],n=e.atob(t[t.length-1]);let a=n.length;const s=new e.Uint8Array(a);for(;a--;)s[a]=n.charCodeAt(a);return new e.File([s],"image."+i,{type:r})}const i=o.href.split("/"),n=i[i.length-1],a=n.split(".")[1];return e.fetch(o.href).then(t=>t.clone().blob()).then(t=>new e.File([t],n,{type:"image/"+a}))}}function Rc(t,e){const r=Pc();return(Rc=function(t,e){return r[t-=320]})(t,e)}const Uc=Rc;function Pc(){const t=["_isEditable","3463428PAIFjr","isActive","63zmkuZD","2uPImPm","get","document","element","55wXFqZZ","getSelectedElement","830728zfQNyY","bind","unbind","plugins","imageBlock","imageInline","model","1075532JMFnls","imageEditController","selection","uploadcare.allowExternalImagesEditing","execute","editor","1599774XhYIBH","27570SXmevc","set","3807VYJYec","25424993BYcGdj","requires","isEnabled","config","refresh","171690XsMIKK"];return(Pc=function(){return t})()}!function(t){const e=Rc,r=t();for(;;)try{if(847115===parseInt(e(341))/1*(parseInt(e(328))/2)+parseInt(e(347))/3+-parseInt(e(325))/4+-parseInt(e(332))/5*(-parseInt(e(323))/6)+parseInt(e(327))/7*(parseInt(e(334))/8)+-parseInt(e(350))/9*(-parseInt(e(348))/10)+-parseInt(e(351))/11)break;r.push(r.shift())}catch(t){r.push(r.shift())}}(Pc);class Nc extends a.Command{[Uc(342)];static get[Uc(352)](){return[c.Dialog]}[Uc(324)];constructor(t){const e=Uc;super(t),this[e(342)]=void 0,this[e(324)]=function(t){const e=G,r=W(t);return t=>!(!t||!t.is(e(381),e(423))&&!t.is(e(381),e(378)))&&(!!t[e(420)](e(429))||!!t[e(420)](e(409))&&r(t[e(403)](e(409))))}(t[e(321)][e(329)](e(344))||[]),this[e(349)]({isActive:!1})}[Uc(322)](){const t=Uc,e=this[t(346)][t(340)][t(330)][t(343)][t(333)]();this[t(320)]=this[t(324)](e)}[Uc(345)](){const t=Uc;this[t(342)]&&(this[t(336)](t(326)),this[t(342)]=void 0);const e=this[t(346)][t(340)][t(330)][t(343)][t(333)]();e&&(e.is(t(331),t(338))||e.is(t(331),t(339)))&&(this[t(342)]=new Lc(this[t(346)],this[t(346)][t(337)][t(329)](c.Dialog),e),this[t(335)](t(326)).to(this[t(342)],t(326)))}}function Dc(){const t=["getSelectedElement","4xsyMrP","100dEufgn","element","2574565eWHRjf","imageBlock","imageInline","setAttributes","isEnabled","123111FyeNTk","editor","selection","2685140KOUdPH","8329849hdjRhL","removeAttribute","model","128XbTnGG","change","563KHNclo","4954944SxtNSU","558399CcGCui","sizes","document","srcset","refresh","5AwPTjS","execute"];return(Dc=function(){return t})()}const zc=Fc;function Fc(t,e){const r=Dc();return(Fc=function(t,e){return r[t-=250]})(t,e)}!function(t){const e=Fc,r=t();for(;;)try{if(709455===-parseInt(e(272))/1*(parseInt(e(256))/2)+-parseInt(e(274))/3*(parseInt(e(255))/4)+parseInt(e(252))/5*(parseInt(e(273))/6)+parseInt(e(258))/7+-parseInt(e(270))/8*(-parseInt(e(263))/9)+parseInt(e(266))/10+-parseInt(e(267))/11)break;r.push(r.shift())}catch(t){r.push(r.shift())}}(Dc);class Vc extends a.Command{[zc(251)](){const t=zc,e=this[t(264)][t(269)][t(276)][t(265)][t(254)]();this[t(262)]=Boolean(e&&(e.is(t(257),t(259))||e.is(t(257),t(260))))}[zc(253)](t){const e=zc,r=this[e(264)][e(269)][e(276)][e(265)][e(254)]();this[e(264)][e(269)][e(271)](o=>{const i=e;o[i(261)](t,r),o[i(268)](i(250),r),o[i(268)](i(275),r)})}}const Bc=jc;function jc(t,e){const r=Hc();return(jc=function(t,e){return r[t-=337]})(t,e)}function Hc(){const t=["UploadcareImageEditEditing","4018815zLFBun","isOfficialPlugin","add","7383800GiwCjd","ImageUtils","isPremiumPlugin","2350999UbpnPS","5339368voNerG","commands","670KPMFpd","8xRfzFf","uploadcareImageEdit","init","uploadcareImageReplace","requires","534wHWmOf","202565QOcyBw","5457IIEjeK","ImageEditing","11039310NwUxwx","18NhDyAf","pluginName"];return(Hc=function(){return t})()}!function(t){const e=jc,r=t();for(;;)try{if(999808===-parseInt(e(343))/1*(-parseInt(e(341))/2)+parseInt(e(349))/3+-parseInt(e(356))/4+-parseInt(e(352))/5+parseInt(e(346))/6*(parseInt(e(355))/7)+parseInt(e(359))/8*(-parseInt(e(345))/9)+parseInt(e(358))/10*(parseInt(e(342))/11))break;r.push(r.shift())}catch(t){r.push(r.shift())}}(Hc);class qc extends a.Plugin{static get[Bc(347)](){return Bc(348)}static get[Bc(340)](){const t=Bc;return[be,c.Notification,t(353),t(344)]}static get[Bc(350)](){return!0}static get[Bc(354)](){return!0}[Bc(338)](){const t=Bc,{editor:e}=this;e[t(357)][t(351)](t(337),new Nc(e)),e[t(357)][t(351)](t(339),new Vc(e))}}var Kc=r(947),Gc={attributes:{"data-cke":!0}};Gc.setAttributes=y(),Gc.insert=b().bind(null,"head"),Gc.domAPI=m(),Gc.insertStyleElement=_();p()(Kc.A,Gc);Kc.A&&Kc.A.locals&&Kc.A.locals;class Wc extends a.Plugin{_imageCache=new Map;static get pluginName(){return"UploadcareImageEditUI"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}get imageCache(){return this._imageCache}init(){const t=this.editor;t.ui.componentFactory.add("uploadcareImageEdit",e=>{const r=t.commands.get("uploadcareImageEdit"),o=new c.ButtonView(e),i=e.t;return o.set({icon:s.IconUploadcareImageEdit,tooltip:!0,label:i({id:"Edit Image (Uploadcare)",string:"Edit image"})}),o.bind("isEnabled").to(r),o.bind("isOn").to(r,"isActive"),this.listenTo(o,"execute",()=>{t.execute("uploadcareImageEdit"),t.editing.view.focus()}),o}),this._initConfig()}_initConfig(){const t=(0,O.createElement)(document,"uc-config",{"ctx-name":"image-edit",removeCopyright:"true",localeName:this.editor.locale.contentLanguage});document.body.appendChild(t),this.listenTo(this.editor,"destroy",()=>{t.remove()})}}var Xc=Yc;function Zc(){var t=["12313oAggbJ","55WXZrDj","3FLfmFQ","228645wuBTLR","1842936xliJNB","requires","851643NMLGvp","640UKOeqh","224082FQSCGd","3772PaQaiP","pluginName","UploadcareImageEdit","isPremiumPlugin","150ywiItU","isOfficialPlugin","7887495TIyeje"];return(Zc=function(){return t})()}function Yc(t,e){var r=Zc();return(Yc=function(t,e){return r[t-=258]})(t,e)}!function(t){for(var e=Yc,r=t();;)try{if(237068===-parseInt(e(270))/1*(parseInt(e(261))/2)+-parseInt(e(258))/3+parseInt(e(272))/4+-parseInt(e(269))/5*(parseInt(e(260))/6)+parseInt(e(268))/7*(parseInt(e(259))/8)+parseInt(e(271))/9*(-parseInt(e(265))/10)+parseInt(e(267))/11)break;r.push(r.shift())}catch(t){r.push(r.shift())}}(Zc);class Jc extends a.Plugin{static get[Xc(262)](){return Xc(263)}static get[Xc(273)](){return[qc,Wc]}static get[Xc(266)](){return!0}static get[Xc(264)](){return!0}}function Qc(){var t=["569898WHErTN","5935900TXWUZt","2443173JoTNpH","305884UjXgnq","8qlkYyd","2304wSGkvB","2837864lisgtH","1cEWWXI","7968654jirnpO","10802GdgfRR","24tOtWMB","5ADfgyC"];return(Qc=function(){return t})()}function tl(t,e){var r=Qc();return(tl=function(t,e){return r[t-=272]})(t,e)}!function(t){for(var e=tl,r=t();;)try{if(564899===parseInt(e(279))/1*(-parseInt(e(275))/2)+parseInt(e(274))/3+parseInt(e(278))/4*(parseInt(e(283))/5)+parseInt(e(282))/6*(-parseInt(e(272))/7)+parseInt(e(276))/8*(-parseInt(e(280))/9)+parseInt(e(273))/10+parseInt(e(281))/11*(-parseInt(e(277))/12))break;r.push(r.shift())}catch(t){r.push(r.shift())}}(Qc)})(),(window.CKEditor5=window.CKEditor5||{}).uploadcare=o})();
5
+ */(()=>{var t={102:t=>{"use strict";var e={};t.exports=function(t,r){var o=function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}(t);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(r)}},106:t=>{"use strict";t.exports=function(t){return t[1]}},123:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(r){t.setAttribute(r,e[r])})}},184:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var o=r(106),i=r.n(o),n=r(779),a=r.n(n)()(i());a.push([t.id,':root{--ck-image-processing-highlight-color:#f9fafa;--ck-image-processing-background-color:#e3e5e8}.ck.ck-editor__editable .image-inline.image-processing picture,.ck.ck-editor__editable .image.image-processing picture{display:block;height:100%;position:relative;width:100%}.ck.ck-editor__editable .image-inline.image-processing picture:before,.ck.ck-editor__editable .image.image-processing picture:before{animation:ck-image-processing-animation 2s linear infinite;background:linear-gradient(90deg,var(--ck-image-processing-background-color),var(--ck-image-processing-highlight-color),var(--ck-image-processing-background-color));background-size:200% 100%;content:"";height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.ck.ck-editor__editable .image-inline.image-processing picture img,.ck.ck-editor__editable .image.image-processing picture img{height:100%}.ck.ck-editor__editable .image-inline.image-processing-blur,.ck.ck-editor__editable .image.image-processing-blur{clip-path:inset(0);filter:blur(1.6rem)}@keyframes ck-image-processing-animation{0%{background-position:200% 0}to{background-position:-200% 0}}',""]);const s=a},237:t=>{"use strict";t.exports=CKEditor5.dll},260:(t,e,r)=>{t.exports=r(237)("./src/upload.js")},297:t=>{"use strict";var e,r=(e=[],function(t,r){return e[t]=r,e.filter(Boolean).join("\n")});function o(t,e,o,i){var n;if(o)n="";else{n="",i.supports&&(n+="@supports (".concat(i.supports,") {")),i.media&&(n+="@media ".concat(i.media," {"));var a=void 0!==i.layer;a&&(n+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),n+=i.css,a&&(n+="}"),i.media&&(n+="}"),i.supports&&(n+="}")}if(t.styleSheet)t.styleSheet.cssText=r(e,n);else{var s=document.createTextNode(n),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(s,c[e]):t.appendChild(s)}}var i={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=i.singletonCounter++,r=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){o(r,e,!1,t)},remove:function(t){o(r,e,!0,t)}}}},311:(t,e,r)=>{t.exports=r(237)("./src/ui.js")},355:(t,e,r)=>{t.exports=r(237)("./src/icons.js")},387:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var o=r(106),i=r.n(o),n=r(779),a=r.n(n)()(i());a.push([t.id,".ck-uploadcare-theme{--uc-font-size:13px;--uc-radius:2px;--uc-padding:0.9em;--uc-primary-oklch-light:54.45% 0.182 263.76;--uc-foreground-light:#333;--uc-secondary-foreground-light:#333;--uc-muted-foreground-light:#333;--uc-border-light:#ccced1}",""]);const s=a},474:t=>{"use strict";t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},584:(t,e,r)=>{t.exports=r(237)("./src/utils.js")},621:(t,e,r)=>{"use strict";r.d(e,{A:()=>h});var o=r(106),i=r.n(o),n=r(779),a=r.n(n),s=r(474),c=r.n(s),l=new URL(r(659),r.b),u=a()(i()),d=c()(l);u.push([t.id,`@keyframes fake-progress-animation{0%{transform:translate(-100%)}to{transform:translate(calc(100/var(--l-fake-progress-width)*100*1%))}}@keyframes uc-spinner-keyframes{0%{transform:rotate(0)}to{transform:rotate(1turn)}}uc-activity-header:not(#\\#){color:var(--uc-foreground);display:flex;font-size:1em;font-weight:500;gap:var(--uc-padding);justify-content:space-between;padding:var(--uc-padding)}uc-activity-header:not(#\\#)>*{align-items:center;display:flex}uc-camera-source:not(#\\#){background-color:var(--uc-background);border-radius:var(--uc-radius);display:flex;flex-direction:column;height:100%;max-height:100%;overflow:hidden;position:relative;width:100%}[uc-modal]:not(#\\#)>dialog:has(uc-camera-source[active]){height:100%;width:100%}uc-camera-source:not(.uc-initialized):not(#\\#) .uc-controls{display:none}uc-camera-source:not(#\\#) video{background-color:var(--uc-muted);border-radius:var(--uc-radius);display:block;max-height:100%;object-fit:contain;object-position:center center;width:100%}uc-camera-source:not(#\\#) .uc-toolbar{background-color:var(--uc-background);bottom:0;display:flex;justify-content:space-between;padding:var(--uc-padding);position:absolute;width:100%}uc-camera-source:not(#\\#) .uc-content{display:flex;flex:1;height:100%;justify-content:center;overflow:hidden;padding:var(--uc-padding);padding-top:0;width:100%}uc-camera-source:not(#\\#) .uc-message-box{display:flex;flex-direction:column;grid-gap:40px;align-items:center;color:var(--uc-foreground);justify-content:center;padding:40px 40px 0}uc-camera-source:not(#\\#) .uc-message-box button{background-color:var(--uc-primary);color:var(--uc-primary-foreground)}uc-camera-source:not(#\\#) .uc-shot-btn{background-color:var(--uc-primary-light);border-radius:50%;color:var(--uc-background);height:58px;opacity:.85;transition:bottom var(--uc-transition),opacity var(--uc-transition),transform var(--uc-transition);width:58px}uc-camera-source:not(#\\#) .uc-shot-btn:hover{opacity:1;transform:scale(1.05)}uc-camera-source:not(#\\#) .uc-shot-btn:active{opacity:1;transform:scale(1)}uc-camera-source:not(#\\#) .uc-shot-btn[disabled]{bottom:-80px}uc-camera-source:not(#\\#) .uc-shot-btn uc-icon svg{height:20px;width:20px}uc-camera-source:not(#\\#) .uc-controls{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;min-height:74px;padding:0 var(--uc-padding) var(--uc-padding);position:relative}uc-camera-source:not(#\\#) .uc-switcher{display:flex;gap:calc(var(--uc-padding)/2)}uc-camera-source:not(#\\#) .uc-switch.uc-active{background-color:var(--uc-secondary)}uc-camera-source:not(#\\#) .uc-camera-actions{align-items:center;display:flex;gap:5px;justify-content:center}uc-camera-source:not(#\\#) .uc-stop-record{background-color:var(--uc-destructive-foreground-light);opacity:1}:where(uc-camera-source:is(.uc-recording)):not(#\\#) .uc-recording-timer uc-icon{display:none}:where(uc-camera-source:is(.uc-recording)):not(#\\#) .uc-recording-timer{pointer-events:none}uc-camera-source:not(#\\#) .uc-recording-timer{overflow:hidden;position:relative;z-index:1}:where(uc-camera-source):not(#\\#) .uc-recording-timer uc-icon{height:10px;margin-right:10px;width:10px}uc-camera-source:not(#\\#) .uc-recording-timer .uc-line{background-color:var(--uc-foreground-light);bottom:0;content:"";height:2px;left:0;position:absolute;right:0;transform:scaleX(0);transform-origin:left;transition:transform var(--uc-transition)}uc-camera-source:not(#\\#) .uc-btn-microphone{z-index:1}uc-camera-source:not(#\\#) .uc-select{display:flex}uc-camera-source:not(#\\#) .uc-audio-select{width:98px}uc-camera-source:not(#\\#) .uc-audio-select select{width:100%}uc-camera-source:not(#\\#) .uc-camera-action{inset:0 var(--uc-padding) var(--uc-padding);margin:0 auto;position:absolute}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#){--color-primary-accent:var(--uc-primary);--color-text-base:var(--uc-foreground);--color-text-accent-contrast:var(--uc-background);--color-fill-contrast:var(--uc-background);--color-modal-backdrop:oklch(0 0 0/.1);--color-image-background:var(--uc-muted);--color-focus-ring:var(--color-primary-accent);--color-crop-guides:var(--uc-foreground);--font-size-ui:var(--uc-font-size);--size-touch-area:var(--uc-button-size);--size-panel-heading:calc(var(--uc-button-size) + var(--uc-padding)*2);--size-ui-min-width:130px;--size-line-width:1px;--size-modal-width:650px;--size-icon:calc(var(--uc-button-size)/2);--border-radius-editor:var(--uc-radius);--border-radius-thumb:var(--uc-radius);--border-radius-ui:var(--uc-radius);--border-radius-base:var(--uc-radius);--cldtr-gap-min:5px;--cldtr-gap-mid-1:10px;--cldtr-gap-mid-2:15px;--cldtr-gap-max:20px;--transition-duration-2:var(--transition-duration-all,.2s);--transition-duration-3:var(--transition-duration-all,.3s);--transition-duration-4:var(--transition-duration-all,.4s);--transition-duration-5:var(--transition-duration-all,.5s);--modal-header-opacity:1;--modal-header-height:var(--size-panel-heading);--modal-toolbar-height:var(--size-panel-heading);--transparent-pixel:url(${d});display:block;height:100%;max-height:100%;width:100%}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) :is([can-handle-paste]:hover,[can-handle-paste]:focus){--can-handle-paste:"true"}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) :is([tabindex][focus-visible],[tabindex]:hover,[with-effects][focus-visible],[with-effects]:hover){--filter-effect:var(--hover-filter)!important;--opacity-effect:var(--hover-opacity)!important;--color-effect:var(--hover-color-rgb)!important;--background-effect:var(--hover-background)!important}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) :is([tabindex]:active,[with-effects]:active){--filter-effect:var(--down-filter)!important;--opacity-effect:var(--down-opacity)!important;--color-effect:var(--down-color-rgb)!important;--background-effect:var(--down-background)!important}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) :is([tabindex][active],[with-effects][active]){--filter-effect:var(--active-filter)!important;--opacity-effect:var(--active-opacity)!important;--color-effect:var(--active-color-rgb)!important;--background-effect:var(--active-background)!important}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) [hidden-scrollbar]::-webkit-scrollbar{display:none}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) [hidden-scrollbar]{-ms-overflow-style:none;scrollbar-width:none}[uc-cloud-image-editor].uc-editor_ON:not(#\\#):not(#\\#):not(#\\#){--modal-header-opacity:0;--modal-header-height:0px;--modal-toolbar-height:calc(var(--size-panel-heading)*2)}[uc-cloud-image-editor].uc-editor_OFF:not(#\\#):not(#\\#):not(#\\#){--modal-header-opacity:1;--modal-header-height:var(--size-panel-heading);--modal-toolbar-height:var(--size-panel-heading)}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper{--l-min-img-height:var(--modal-toolbar-height);--l-max-img-height:100%;--l-edit-button-width:120px;--l-toolbar-horizontal-padding:var(--cldtr-gap-mid-1);display:grid;grid-template-rows:minmax(var(--l-min-img-height),var(--l-max-img-height)) minmax(var(--modal-toolbar-height),auto);height:100%;overflow:hidden;overflow-y:auto;position:relative}@media only screen and (max-width:800px){[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper{--l-edit-button-width:70px;--l-toolbar-horizontal-padding:var(--cldtr-gap-min)}}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport{align-items:center;display:flex;justify-content:center;overflow:hidden}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image{--viewer-image-opacity:1;background-color:var(--color-image-background);box-sizing:border-box;display:block;height:100%;left:0;object-fit:scale-down;opacity:var(--viewer-image-opacity);pointer-events:auto;position:absolute;top:0;transform:scale(1);user-select:none;width:100%;z-index:10}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image.uc-image_visible_viewer{transition:opacity var(--transition-duration-3) ease-in-out,transform var(--transition-duration-4)}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image.uc-image_hidden_to_cropper{--viewer-image-opacity:0;background-image:var(--transparent-pixel);pointer-events:none;transform:scale(1);transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) step-end}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image.uc-image_hidden_effects{--viewer-image-opacity:0;pointer-events:none;transform:scale(1);transition:opacity var(--transition-duration-3) cubic-bezier(.5,0,1,1),transform var(--transition-duration-4)}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-image_container{background-color:var(--color-image-background);display:block;height:100%;position:relative;transition:var(--transition-duration-3);width:100%}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-toolbar{position:relative;transition:.3s}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-toolbar>.uc-toolbar_content{background-color:var(--color-fill-contrast);bottom:0;box-sizing:border-box;height:var(--modal-toolbar-height);left:0;min-height:var(--size-panel-heading);position:absolute;width:100%}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-toolbar>.uc-toolbar_content.uc-toolbar_content__viewer{align-items:center;display:flex;height:var(--size-panel-heading);justify-content:space-between;padding-left:var(--l-toolbar-horizontal-padding);padding-right:var(--l-toolbar-horizontal-padding)}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-toolbar>.uc-toolbar_content.uc-toolbar_content__editor{display:flex}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-info_pan{position:absolute;user-select:none}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-file_type_outer{display:flex;max-width:120px;position:absolute;transform:translate(-40px);user-select:none;z-index:2}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-file_type_outer>.uc-file_type{padding:4px .8em}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-network_problems_splash{background-color:var(--color-fill-contrast);display:flex;flex-direction:column;height:100%;position:absolute;width:100%;z-index:4}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_content{align-items:center;display:flex;flex:1;flex-direction:column;justify-content:center}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_content>.uc-network_problems_icon{align-items:center;background-color:var(--uc-muted);border-radius:50%;color:var(--uc-foreground);display:flex;height:40px;justify-content:center;width:40px}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_content>.uc-network_problems_text{color:var(--uc-foreground);font-size:var(--font-size-ui);margin-top:var(--cldtr-gap-max)}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_footer{align-items:center;display:flex;height:var(--size-panel-heading);justify-content:center}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#)>.uc-svg{border-top-left-radius:var(--border-radius-base);border-top-right-radius:var(--border-radius-base);height:100%;left:0;opacity:inherit;position:absolute;top:0;transition:var(--transition-duration-3);width:100%;z-index:2}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#)>.uc-thumb{--idle-color-rgb:var(--color-text-base);--hover-color-rgb:var(--color-primary-accent);--focus-color-rgb:var(--color-primary-accent);--down-color-rgb:var(--color-primary-accent);--color-effect:var(--idle-color-rgb);color:var(--color-effect);transition:color var(--transition-duration-3),opacity var(--transition-duration-3)}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-thumb--visible{opacity:1;pointer-events:auto}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-thumb--hidden{opacity:0;pointer-events:none}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-guides{transition:var(--transition-duration-3)}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-guides--hidden{opacity:0}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-guides--semi-hidden{opacity:.2}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-guides--visible{opacity:1}uc-editor-aspect-ratio-button-control:not(#\\#):not(#\\#):not(#\\#),uc-editor-button-control:not(#\\#):not(#\\#):not(#\\#),uc-editor-crop-button-control:not(#\\#):not(#\\#):not(#\\#),uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#),uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#),uc-editor-operation-control:not(#\\#):not(#\\#):not(#\\#){--l-base-min-width:var(--uc-button-size);--l-base-height:var(--uc-button-size);--opacity-effect:var(--idle-opacity);--color-effect:var(--idle-color-rgb);--background-effect:var(--idle-background);--filter-effect:var(--idle-filter);--idle-color-rgb:var(--uc-secondary-foreground);--idle-opacity:1;--idle-filter:1;--idle-background:var(--uc-secondary);--hover-color-rgb:var(--uc-secondary-foreground);--hover-opacity:1;--hover-filter:.8;--hover-background:var(--uc-secondary-hover);--down-color-rgb:var(--hover-color-rgb);--down-opacity:1;--down-filter:.6;--down-background:var(--uc-secondary);border-radius:var(--uc-radius)}uc-editor-aspect-ratio-button-control:not(#\\#):not(#\\#):not(#\\#)>button,uc-editor-button-control:not(#\\#):not(#\\#):not(#\\#)>button,uc-editor-crop-button-control:not(#\\#):not(#\\#):not(#\\#)>button,uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>button,uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button,uc-editor-operation-control:not(#\\#):not(#\\#):not(#\\#)>button{all:unset;align-items:center;color:var(--color-effect);cursor:pointer;display:grid;grid-template-columns:var(--l-base-min-width) auto;grid-template-rows:100%;height:var(--l-base-height);opacity:var(--opacity-effect);position:relative;transition:var(--l-width-transition)}uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button{grid-template-columns:auto var(--l-base-min-width)}uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button>uc-icon{margin-left:var(--cldtr-gap-mid-1);width:10px}:where(uc-editor-button-control,uc-editor-crop-button-control,uc-editor-aspect-ratio-button-control,uc-editor-freeform-button-control,uc-editor-filter-control,uc-editor-operation-control):not(#\\#):not(#\\#):not(#\\#)>uc-icon>svg{height:var(--size-icon);width:var(--size-icon)}uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>uc-icon.uc-original-icon>svg{height:100%;width:100%}uc-editor-aspect-ratio-button-control.uc-active:not(#\\#):not(#\\#):not(#\\#),uc-editor-button-control.uc-active:not(#\\#):not(#\\#):not(#\\#),uc-editor-crop-button-control.uc-active:not(#\\#):not(#\\#):not(#\\#),uc-editor-filter-control.uc-active:not(#\\#):not(#\\#):not(#\\#),uc-editor-freeform-button-control.uc-active:not(#\\#):not(#\\#):not(#\\#),uc-editor-operation-control.uc-active:not(#\\#):not(#\\#):not(#\\#){--idle-color-rgb:var(--uc-primary-foreground);--idle-background:var(--uc-primary);--idle-opacity:1;--hover-color-rgb:var(--uc-primary-foreground);--hover-background:var(--uc-primary);--hover-opacity:1}uc-editor-filter-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#) .uc-preview[loaded]{opacity:1}uc-editor-filter-control.uc-active:not(#\\#):not(#\\#):not(#\\#) .uc-preview{opacity:0}uc-editor-aspect-ratio-button-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#),uc-editor-button-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#),uc-editor-crop-button-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#),uc-editor-filter-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#),uc-editor-freeform-button-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#),uc-editor-operation-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#){--idle-color-rgb:var(--uc-secondary-foreground)}:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-aspect-ratio-button-control.uc-not_active,:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-button-control.uc-not_active,:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-crop-button-control.uc-not_active,:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-filter-control.uc-not_active,:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-freeform-button-control.uc-not_active,:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-operation-control.uc-not_active{--idle-background:transparent;--hover-background:var(--uc-secondary);outline:1px solid var(--uc-border);outline-offset:-1px}uc-editor-aspect-ratio-button-control:not(#\\#):not(#\\#):not(#\\#)>button:before,uc-editor-button-control:not(#\\#):not(#\\#):not(#\\#)>button:before,uc-editor-crop-button-control:not(#\\#):not(#\\#):not(#\\#)>button:before,uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>button:before,uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button:before,uc-editor-operation-control:not(#\\#):not(#\\#):not(#\\#)>button:before{background-color:var(--background-effect);border-radius:var(--border-radius-editor);content:"";height:100%;left:0;position:absolute;right:0;transition:var(--transition-duration-3);width:100%;z-index:-1}uc-editor-aspect-ratio-button-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title,uc-editor-button-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title,uc-editor-crop-button-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title,uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title,uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title,uc-editor-operation-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title{font-size:.7em;letter-spacing:1.004px;padding-right:var(--cldtr-gap-mid-1);text-transform:uppercase}uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title{padding-left:var(--cldtr-gap-mid-1);padding-right:0}uc-editor-aspect-ratio-button-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon,uc-editor-button-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon,uc-editor-crop-button-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon,uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon,uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon,uc-editor-operation-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon{pointer-events:none}uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-preview{background-repeat:no-repeat;background-size:contain;border-radius:var(--border-radius-editor);filter:brightness(var(--filter-effect));height:var(--l-base-height);left:0;opacity:0;position:absolute;right:0;transition:var(--transition-duration-3);width:100%;z-index:-1}uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>.uc-original-icon{color:var(--color-effect);opacity:.3}uc-editor-image-cropper:not(#\\#):not(#\\#):not(#\\#){color:var(--color-crop-guides);display:block;height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;touch-action:none;width:100%;z-index:10}uc-editor-image-cropper.uc-active_from_editor:not(#\\#):not(#\\#):not(#\\#),uc-editor-image-cropper.uc-active_from_viewer:not(#\\#):not(#\\#):not(#\\#){opacity:1;pointer-events:auto;transform:scale(1) translate(0);transition:transform var(--transition-duration-4) cubic-bezier(.37,0,.63,1) .4s,opacity var(--transition-duration-3)}uc-editor-image-cropper.uc-inactive_to_editor:not(#\\#):not(#\\#):not(#\\#){opacity:0;pointer-events:none;transition:transform var(--transition-duration-4) cubic-bezier(.37,0,.63,1),opacity var(--transition-duration-3) calc(var(--transition-duration-3) + .05s)}uc-editor-image-cropper:not(#\\#):not(#\\#):not(#\\#)>.uc-canvas{z-index:1}uc-editor-image-cropper:not(#\\#):not(#\\#):not(#\\#)>.uc-canvas,uc-editor-image-fader:not(#\\#):not(#\\#):not(#\\#){display:block;height:100%;left:0;position:absolute;top:0;width:100%}uc-editor-image-fader.uc-active_from_viewer:not(#\\#):not(#\\#):not(#\\#){opacity:1;pointer-events:auto;transform:scale(1);transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) step-start;z-index:3}uc-editor-image-fader.uc-active_from_cropper:not(#\\#):not(#\\#):not(#\\#){opacity:1;pointer-events:auto;transform:scale(1);transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) step-end;z-index:3}uc-editor-image-fader.uc-inactive_to_cropper:not(#\\#):not(#\\#):not(#\\#){opacity:0;pointer-events:none;transform:scale(1);transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) step-end;z-index:3}uc-editor-image-fader:not(#\\#):not(#\\#):not(#\\#) .uc-fader-image{content-visibility:auto;display:block;height:100%;left:0;object-fit:scale-down;position:absolute;top:0;transform:scale(1);user-select:none;width:100%}uc-editor-image-fader:not(#\\#):not(#\\#):not(#\\#) .uc-fader-image--preview{background-color:var(--color-image-background);border-top-left-radius:var(--border-radius-base);border-top-right-radius:var(--border-radius-base);opacity:0;transform:scale(1);transition:var(--transition-duration-3)}uc-editor-scroller:not(#\\#):not(#\\#):not(#\\#){align-items:center;display:flex;height:100%;overflow-x:scroll;width:100%}uc-editor-slider:not(#\\#):not(#\\#):not(#\\#){align-items:center;display:flex;height:var(--size-panel-heading);justify-content:center;width:100%}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#){height:100%;position:relative;width:100%}@media only screen and (max-width:600px){uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#){--l-tab-gap:var(--cldtr-gap-mid-1);--l-slider-padding:var(--uc-padding);--l-controls-padding:var(--uc-padding)}}@media only screen and (min-width:601px){uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#){--l-tab-gap:var(--cldtr-gap-max);--l-slider-padding:var(--uc-padding);--l-controls-padding:var(--uc-padding)}}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container{height:100%;overflow:hidden;position:relative;width:100%}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar{background-color:var(--color-fill-contrast);display:grid;grid-template-rows:1fr 1fr;height:100%;position:absolute;transition:opacity var(--transition-duration-3) ease-in-out,transform var(--transition-duration-3) ease-in-out,visibility var(--transition-duration-3) ease-in-out;width:100%}.uc-sub-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-list-aspect-ratio-container>.uc-list-aspect-ratio{align-items:center;display:grid;gap:6px;grid-auto-flow:column;height:var(--size-panel-heading);justify-content:center}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar.uc-sub-toolbar--visible{opacity:1;pointer-events:auto;transform:translateY(0)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar.uc-sub-toolbar--top-hidden{opacity:0;pointer-events:none;transform:translateY(100%)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar.uc-sub-toolbar--bottom-hidden{opacity:0;pointer-events:none;transform:translateY(-100%)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row{align-items:center;display:flex;justify-content:space-between;padding-left:var(--l-controls-padding);padding-right:var(--l-controls-padding)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles{display:grid;grid-auto-flow:column;position:relative;grid-gap:0 var(--l-tab-gap);align-items:center;height:100%}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggles_indicator{background-color:var(--uc-secondary-foreground);bottom:0;height:2px;left:0;position:absolute;transform:translate(0);transition:transform var(--transition-duration-3);width:var(--size-touch-area)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row{position:relative}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content{content-visibility:auto;display:flex;height:100%;left:0;opacity:0;overflow:hidden;position:absolute;top:0;width:100%}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content.uc-tab-content--visible{opacity:1;pointer-events:auto}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content.uc-tab-content--hidden{opacity:0;pointer-events:none}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle.uc-tab-toggle--visible{display:contents}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles.uc-tab-toggles--hidden,uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle.uc-tab-toggle--hidden{display:none}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle>uc-btn-ui{width:var(--uc-button-size)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle>uc-btn-ui>uc-icon>svg{height:var(--size-icon);width:var(--size-icon)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content .uc-controls-list_align{box-sizing:border-box;display:grid;grid-template-areas:". inner .";grid-template-columns:1fr auto 1fr;min-width:100%;padding-left:var(--uc-padding)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content .uc-controls-list_inner{display:grid;gap:6px;grid-area:inner;grid-auto-flow:column}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content .uc-controls-list_inner:last-child{padding-right:var(--uc-padding)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-controls-list_last-item{margin-right:var(--cldtr-gap-max)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-info-tooltip_container{align-items:flex-start;display:flex;height:100%;justify-content:center;position:absolute;width:100%}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-info-tooltip_wrapper{display:flex;flex-direction:column;height:100%;justify-content:flex-end;pointer-events:none;position:absolute;top:calc(-100% - var(--cldtr-gap-mid-2))}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-info-tooltip{background-color:var(--color-text-accent-contrast);border-radius:var(--border-radius-editor);color:var(--color-text-base);font-size:.7em;letter-spacing:1px;opacity:0;padding:3px 6px;text-transform:uppercase;transform:translateY(100%);transition:var(--transition-duration-3);z-index:3}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-info-tooltip_visible{opacity:1;transform:translateY(0)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-slider{padding-left:var(--l-slider-padding);padding-right:var(--l-slider-padding)}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#)>button{--filter-effect:var(--idle-brightness);--opacity-effect:var(--idle-opacity);--color-effect:var(--idle-color-rgb);--background-effect:var(--idle-background);--l-transition-effect:var( --css-transition,color var(--transition-duration-2),background-color var(--transition-duration-2),filter var(--transition-duration-2) );all:unset;align-items:center;background-color:var(--background-effect);border-radius:var(--uc-radius);box-sizing:var(--css-box-sizing,border-box);color:var(--color-effect);cursor:pointer;display:inline-flex;filter:brightness(var(--filter-effect));font-size:1em;height:var(--css-height,var(--uc-button-size));opacity:var(--opacity-effect);padding-left:var(--css-padding-left,14px);padding-right:var(--css-padding-right,14px);transition:var(--l-transition-effect);user-select:none}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#)>button>uc-icon{pointer-events:none}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-text{white-space:nowrap}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-icon{align-items:center;color:var(--color-effect);display:flex;filter:brightness(var(--filter-effect));justify-content:center;transition:var(--l-transition-effect)}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-icon_left{margin-left:0;margin-right:var(--cldtr-gap-mid-1)}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-icon_right{margin-left:var(--cldtr-gap-mid-1);margin-right:0}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-icon_single{margin-left:0;margin-right:0}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-icon_hidden{display:none;margin:0}uc-btn-ui.uc-primary:not(#\\#):not(#\\#):not(#\\#)>button{--idle-color-rgb:var(--uc-primary-foreground);--idle-brightness:1;--idle-opacity:1;--idle-background:var(--uc-primary);--hover-color-rgb:var(--uc-primary-foreground);--hover-brightness:1;--hover-opacity:1;--hover-background:var(--uc-primary-hover);--down-color-rgb:var(--uc-primary-foreground);--down-brightness:.75;--down-opacity:1;--down-background:var(--uc-primary);--active-color-rgb:var(--uc-primary-foreground);--active-brightness:1;--active-opacity:1;--active-background:var(--uc-primary)}uc-btn-ui.uc-primary-icon:not(#\\#):not(#\\#):not(#\\#)>button{--idle-color-rgb:var(--uc-primary);--idle-brightness:1;--idle-opacity:1;--idle-background:transparent;--hover-color-rgb:var(--uc-primary);--hover-brightness:1;--hover-opacity:1;--hover-background:var(--uc-primary-transparent);--down-color-rgb:var(--uc-primary);--down-brightness:.75;--down-opacity:1;--down-background:var(--uc-primary-transparent);--active-color-rgb:var(--uc-primary-foreground);--active-brightness:1;--active-opacity:1;--active-background:var(--uc-primary);padding:0;width:var(--uc-button-size)}uc-btn-ui.uc-secondary:not(#\\#):not(#\\#):not(#\\#)>button{--idle-color-rgb:var(--uc-secondary-foreground);--idle-brightness:1;--idle-opacity:1;--idle-background:var(--uc-secondary);--hover-color-rgb:var(--uc-secondary-foreground);--hover-brightness:1;--hover-opacity:1;--hover-background:var(--uc-secondary-hover);--down-color-rgb:var(--uc-secondary-foreground);--down-brightness:1;--down-opacity:1;--down-background:var(--uc-secondary-hover);--active-color-rgb:var(--uc-secondary-foreground);--active-brightness:1;--active-opacity:1;--active-background:transparent}:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-btn-ui.uc-secondary>button{border:1px solid var(--uc-border)}uc-btn-ui.uc-secondary-icon:not(#\\#):not(#\\#):not(#\\#)>button,uc-btn-ui.uc-tab:not(#\\#):not(#\\#):not(#\\#)>button{--idle-color-rgb:var(--uc-secondary-foreground);--idle-brightness:1;--idle-opacity:1;--idle-background:transparent;--hover-color-rgb:var(--uc-secondary-foreground);--hover-brightness:1;--hover-opacity:1;--hover-background:var(--uc-secondary);--down-color-rgb:var(--uc-secondary-foreground);--down-brightness:1;--down-opacity:1;--down-background:var(--uc-secondary);--active-color-rgb:var(--uc-secondary-foreground);--active-brightness:1;--active-opacity:1;--active-background:transparent;padding:0;width:var(--uc-button-size)}uc-btn-ui.uc-default:not(#\\#):not(#\\#):not(#\\#)>button{--idle-color-rgb:var(--uc-secondary-foreground);--idle-brightness:1;--idle-opacity:1;--idle-background:var(--uc-secondary);--hover-color-rgb:var(--uc-secondary-foreground);--hover-brightness:1;--hover-opacity:1;--hover-background:var(--uc-secondary-hover);--down-color-rgb:var(--uc-secondary-foreground);--down-brightness:.75;--down-opacity:1;--down-background:var(--uc-secondary);--active-color-rgb:var(--uc-primary);--active-brightness:1;--active-opacity:1;--active-background:var(--uc-primary-transparent)}:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-btn-ui.uc-default>button{--idle-background:transparent;--hover-background:var(--uc-secondary);--active-background:var(--uc-foreground);--active-color-rgb:var(--uc-background)}uc-line-loader-ui:not(#\\#):not(#\\#):not(#\\#){height:2px;left:0;opacity:.5;position:absolute;top:0;width:100%;z-index:9999}uc-line-loader-ui:not(#\\#):not(#\\#):not(#\\#) .uc-inner{height:100%;max-width:200px;width:25%}uc-line-loader-ui:not(#\\#):not(#\\#):not(#\\#) .uc-line{background-color:var(--uc-primary);height:100%;transform:translate(-101%);transition:transform 1s;width:100%}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#){--l-thumb-size:24px;--l-zero-dot-size:5px;--l-zero-dot-offset:2px;--idle-color-rgb:var(--uc-foreground);--hover-color-rgb:var(--uc-primary);--down-color-rgb:var(--uc-primary);--color-effect:var(--idle-color-rgb);--l-color:var(--color-effect);align-items:center;display:flex;height:calc(var(--l-thumb-size) + (var(--l-zero-dot-size) + var(--l-zero-dot-offset))*2);justify-content:center;position:relative;width:100%}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-thumb{background-color:var(--l-color);border-radius:50%;height:var(--l-thumb-size);left:0;opacity:1;position:absolute;transform:translate(0);transition:opacity var(--transition-duration-2),background-color var(--transition-duration-2);width:var(--l-thumb-size)}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-steps{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding-left:calc(var(--l-thumb-size)/2);padding-right:calc(var(--l-thumb-size)/2);position:absolute;width:100%}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-border-step{border-right:1px solid var(--uc-foreground);height:10px;opacity:1;transition:border-color var(--transition-duration-2);width:0}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-minor-step{border-right:1px solid var(--uc-foreground);height:4px;opacity:.6;transition:border-color var(--transition-duration-2);width:0}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-zero-dot{background-color:var(--color-primary-accent);border-radius:50%;height:var(--l-zero-dot-size);left:calc(var(--l-thumb-size)/2 - var(--l-zero-dot-size)/2);opacity:0;position:absolute;top:calc(100% - var(--l-zero-dot-offset)*2);transition:var(--transition-duration-3);width:var(--l-zero-dot-size)}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-input{cursor:pointer;height:100%;margin:0;opacity:0;position:absolute;width:calc(100% - 10px)}uc-presence-toggle.uc-transition:not(#\\#):not(#\\#):not(#\\#){transition:opacity var(--transition-duration-3),visibility var(--transition-duration-3)}uc-presence-toggle.uc-visible:not(#\\#):not(#\\#):not(#\\#){opacity:1;pointer-events:inherit}uc-presence-toggle.uc-hidden:not(#\\#):not(#\\#):not(#\\#){opacity:0;pointer-events:none}uc-presence-toggle.uc-initial:not(#\\#):not(#\\#):not(#\\#){display:none!important;transition:none!important}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) [role=button]:focus-visible,[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) button:focus-visible{outline:1px auto Highlight;outline:1px auto -webkit-focus-ring-color}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) .uc-cloud-mask{pointer-events:none}[uc-aspect-ratio-freeform]:not(#\\#):not(#\\#):not(#\\#) button{display:flex}[uc-aspect-ratio-freeform]:not(#\\#):not(#\\#):not(#\\#) uc-icon{display:none}[uc-aspect-ratio-freeform]:not(#\\#):not(#\\#):not(#\\#) .uc-title{padding-left:var(--cldtr-gap-mid-1)}:where(uc-editor-freeform-button-control,uc-editor-aspect-ratio-button-control:last-of-type):not(#\\#):not(#\\#):not(#\\#){margin-right:calc(var(--cldtr-gap-mid-1)*3)}:where([uc-cloud-image-editor]):not(#\\#):not(#\\#):not(#\\#) uc-icon{display:flex;height:100%;justify-content:center;width:100%}:where([uc-cloud-image-editor]):not(#\\#):not(#\\#):not(#\\#) uc-icon svg{height:calc(var(--uc-button-size)/2);width:calc(var(--uc-button-size)/2)}uc-cloud-image-editor-activity:not(#\\#){background-color:var(--uc-background);display:flex;height:100%;overflow:hidden;position:relative;width:100%}[uc-modal]:not(#\\#)>dialog:has(uc-cloud-image-editor-activity[active]){height:100%;width:100%}uc-config:not(#\\#){display:none}uc-copyright:not(#\\#){display:flex;justify-content:center;width:100%}uc-copyright:not(#\\#) .uc-credits{all:unset;background-color:var(--uc-background);border-radius:6px;bottom:12px;color:var(--uc-muted-foreground);cursor:pointer;font-size:12px;font-weight:400;opacity:.9;padding:2px 5px;position:absolute;transition:opacity var(--uc-transition),background-color var(--uc-transition)}uc-copyright:not(#\\#) .uc-credits:focus-visible{outline:1px auto Highlight;outline:1px auto -webkit-focus-ring-color}uc-copyright:not(#\\#) .uc-credits:hover{background-color:var(--uc-muted);opacity:1}:where([uc-drop-area]):not(#\\#){border:1px dashed var(--uc-border);border-radius:calc(var(--uc-radius)*1.75);overflow:hidden;padding:2px;transition:border var(--uc-transition),border-radius var(--uc-transition)}:where([uc-drop-area]):not(#\\#),:where([uc-drop-area]):not(#\\#) .uc-content-wrapper{align-items:center;display:flex;height:100%;justify-content:center;width:100%}:where([uc-drop-area]):not(#\\#) .uc-text{color:var(--uc-muted-foreground);margin:var(--uc-padding);position:relative;transition:color var(--uc-transition)}:where([uc-drop-area])[ghost][drag-state=inactive]:not(#\\#){display:none}:where([uc-drop-area])[ghost]:not([fullscreen]):is([drag-state=active],[drag-state=near],[drag-state=over]):not(#\\#){background:var(--uc-background)}:where([uc-drop-area]):is([drag-state=active],[drag-state=near],[drag-state=over],:hover):not(#\\#){background:var(--uc-primary-transparent);border-color:var(--uc-primary-transparent)}:where(.uc-contrast):not(#\\#) :where([uc-drop-area]):is([drag-state=active],[drag-state=near],[drag-state=over],:hover){background:transparent;border-color:var(--uc-foreground);border-style:solid;border-width:2px;color:var(--uc-foreground)}:where([uc-drop-area]):is([drag-state=active],[drag-state=near]):not(#\\#){opacity:1}:where([uc-drop-area])[drag-state=over]:not(#\\#){border-color:var(--uc-primary);opacity:1}:where([uc-drop-area])[with-icon]:not(#\\#){min-height:180px}:where([uc-drop-area])[with-icon]:not(#\\#) .uc-content-wrapper{display:flex;flex-direction:column}:where([uc-drop-area])[with-icon]:not(#\\#) .uc-text{color:var(--uc-foreground);font-size:1.1em;font-weight:500}:where([uc-drop-area])[with-icon]:not(#\\#) .uc-icon-container{background-color:var(--uc-muted);border-radius:50%;color:var(--uc-foreground);height:64px;margin:var(--uc-padding);overflow:hidden;position:relative;transition:color var(--uc-transition),background-color var(--uc-transition);width:64px}:where([uc-drop-area])[with-icon]:not(#\\#) uc-icon{height:32px;left:calc(50% - 16px);position:absolute;top:calc(50% - 16px);transition:transform var(--uc-transition);width:32px}:where([uc-drop-area])[with-icon]:not(#\\#) uc-icon:last-child{transform:translateY(48px)}:where(.uc-contrast):not(#\\#) :where([uc-drop-area])[with-icon]:hover .uc-icon-container,:where(.uc-contrast):not(#\\#) :where([uc-drop-area])[with-icon]:hover .uc-text{color:var(--uc-foreground)}:where([uc-drop-area])[with-icon]:hover:not(#\\#) .uc-icon-container{background-color:var(--uc-primary-transparent)}:where(.uc-contrast):not(#\\#) :where([uc-drop-area])[with-icon]:hover .uc-icon-container{background-color:var(--uc-muted)}:where([uc-drop-area])[with-icon]:not(#\\#)>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) .uc-icon-container{background-color:var(--uc-primary);color:var(--uc-primary-foreground)}:where([uc-drop-area])[with-icon]:not(#\\#)>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) .uc-text{color:var(--uc-foreground)}:where(.uc-contrast):not(#\\#) :where([uc-drop-area])[with-icon]>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) .uc-text{color:var(--uc-foreground)}:where([uc-drop-area])[with-icon]:not(#\\#)>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) uc-icon:first-child{transform:translateY(-48px)}:where([uc-drop-area])[with-icon]:not(#\\#)>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) uc-icon:last-child{transform:translateY(0)}:where([uc-drop-area])[with-icon]:not(#\\#)>.uc-content-wrapper[drag-state=near] uc-icon:last-child{transform:scale(1.3)}:where([uc-drop-area])[with-icon]:not(#\\#)>.uc-content-wrapper[drag-state=over] uc-icon:last-child{transform:scale(1.5)}:where([uc-drop-area])[fullscreen]:not(#\\#){align-items:center;display:flex;height:calc(100vh - var(--uc-padding)*2);inset:0;justify-content:center;margin:var(--uc-padding);position:fixed;width:calc(100vw - var(--uc-padding)*2);z-index:2147483647}:where([uc-drop-area])[fullscreen]:not(#\\#) .uc-content-wrapper{background-color:var(--uc-background);border-radius:calc(var(--uc-radius)*1.75);box-shadow:var(--uc-dialog-shadow);color:var(--uc-foreground);height:180px;max-width:calc(var(--uc-dialog-width)*.8);transition:color var(--uc-transition),background-color var(--uc-transition),box-shadow var(--uc-transition),border-radius var(--uc-transition),transform var(--uc-transition);width:100%}:where([uc-drop-area])[with-icon][fullscreen][drag-state=active]:not(#\\#)>.uc-content-wrapper,:where([uc-drop-area])[with-icon][fullscreen][drag-state=near]:not(#\\#)>.uc-content-wrapper{opacity:0;transform:translateY(10px)}:where([uc-drop-area])[with-icon][fullscreen][drag-state=over]:not(#\\#)>.uc-content-wrapper{opacity:1;transform:translateY(0)}:is(:where([uc-drop-area])[with-icon][fullscreen]):not(#\\#)>.uc-content-wrapper uc-icon:first-child{transform:translateY(-48px)}:where([uc-drop-area])[clickable]:not(#\\#){cursor:pointer}uc-external-source:not(#\\#){background-color:var(--uc-background);display:flex;flex-direction:column;height:100%;overflow:hidden;position:relative;width:100%}[uc-modal]:not(#\\#)>dialog:has(uc-external-source[active]){height:100%;width:100%}uc-external-source:not(#\\#)>.uc-content{display:grid;flex:1;grid-template-rows:1fr min-content;position:relative}uc-external-source:not(#\\#) iframe{border:none;display:block;height:100%;width:100%}uc-external-source:not(#\\#) .uc-iframe-wrapper{overflow:hidden}uc-external-source:not(#\\#) .uc-toolbar{display:flex;width:100%;grid-gap:var(--uc-padding);align-items:center;border-top:1px solid var(--uc-border);justify-content:space-between;padding:var(--uc-padding)}uc-external-source:not(#\\#) .uc-back-btn{padding-left:0}uc-external-source:not(#\\#) .uc-selection-status-box{align-items:center;color:var(--uc-foreground);display:flex;flex-direction:column;justify-content:center}uc-external-source:not(#\\#) .uc-selection-status-box button{background:none;color:var(--uc-primary);height:auto;padding:0}uc-external-source:not(#\\#) .uc-selection-status-box button:hover{text-decoration:underline}uc-external-source:not(#\\#) uc-activity-header{justify-content:flex-end;left:0;pointer-events:none;position:absolute;right:0;top:0;width:100%;z-index:1}uc-external-source:not(#\\#) uc-activity-header .uc-close-btn{pointer-events:auto}uc-external-source:not(#\\#) .uc-done-btn>span.uc-hidden{pointer-events:none;visibility:hidden}uc-external-source:not(#\\#) .uc-done-btn>uc-spinner{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;width:100%}uc-file-item:not(#\\#){--uc-file-item-gap:4px;--uc-file-item-height:calc(var(--uc-preview-size) + var(--uc-padding)*2 + var(--uc-file-item-gap));display:block;min-height:var(--uc-file-item-height);overflow:hidden}uc-file-item:last-of-type:not(#\\#){--uc-file-item-gap:0}uc-file-item:not(#\\#)>.uc-inner{align-items:center;background-color:var(--uc-muted);border-radius:var(--uc-radius);display:grid;font-size:.925em;gap:2px;grid-template-columns:var(--uc-preview-size) 1fr max-content;margin-bottom:var(--uc-file-item-gap);overflow:hidden;padding:var(--uc-padding);position:relative;transition:background-color var(--uc-transition)}uc-file-item:not(#\\#)>.uc-inner[focused]{background-color:transparent}uc-file-item:not(#\\#)>.uc-inner[uploading] .uc-edit-btn{display:none}uc-file-item:not(#\\#)>:where(.uc-inner[failed],.uc-inner[limit-overflow]){background-color:var(--uc-destructive)}uc-file-item:not(#\\#) .uc-thumb{background-color:var(--uc-secondary);background-position:50%;background-repeat:no-repeat;background-size:cover;border-radius:var(--uc-radius);display:inline-flex;height:var(--uc-preview-size);position:relative;width:var(--uc-preview-size)}uc-file-item:not(#\\#) .uc-file-name-wrapper{align-items:flex-start;color:var(--uc-muted-foreground);display:flex;flex-direction:column;justify-content:center;max-width:100%;overflow:hidden;padding-left:var(--uc-padding);padding-right:var(--uc-padding);text-align:left}uc-file-item:not(#\\#) .uc-file-name{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}uc-file-item:not(#\\#) .uc-file-error{color:var(--uc-destructive-foreground);display:none;font-size:.85em;z-index:2}uc-file-item:not(#\\#) button.uc-edit-btn,uc-file-item:not(#\\#) button.uc-remove-btn{color:var(--uc-muted-foreground)}uc-file-item:not(#\\#) button svg{pointer-events:none}uc-file-item:not(#\\#) button.uc-upload-btn{display:none}uc-file-item:not(#\\#) .uc-badge{align-items:center;background-color:var(--uc-foreground);border-radius:50%;bottom:2px;color:var(--uc-background);display:flex;height:14px;justify-content:center;opacity:0;position:absolute;right:2px;transform:scale(.3);transition:opacity var(--uc-transition),transform var(--uc-transition);width:14px}uc-file-item:not(#\\#)>.uc-inner:where([failed],[limit-overflow],[finished]) .uc-badge{opacity:1;transform:scale(1)}uc-file-item:not(#\\#)>.uc-inner:where([failed],[limit-overflow]) .uc-badge{background-color:var(--uc-destructive-foreground)}uc-file-item:not(#\\#)>.uc-inner:where([failed],[limit-overflow]) .uc-file-error{display:block}uc-file-item:not(#\\#) .uc-badge uc-icon,uc-file-item:not(#\\#) .uc-badge uc-icon svg{height:100%;width:100%}uc-file-item:not(#\\#) .uc-progress-bar{height:2px;opacity:.7;top:calc(100% - 2px)}:where(.uc-contrast):not(#\\#) uc-file-item .uc-progress-bar{opacity:1}uc-file-item:not(#\\#) .uc-file-actions{align-items:center;display:flex;gap:2px;justify-content:center}uc-file-item[mode=grid]:not(#\\#){min-height:auto;overflow:visible}uc-file-item[mode=grid]:not(#\\#) .uc-inner{background-color:transparent;border-radius:0;grid-template-columns:1fr;grid-template-rows:1fr max-content;height:100%;margin-bottom:0;padding:0}uc-file-item[mode=grid]:not(#\\#) .uc-inner[failed] .uc-badge{display:none}uc-file-item[mode=grid]:not(#\\#) .uc-thumb{height:100%;width:100%}uc-file-item[mode=grid]:not(#\\#) .uc-badge{bottom:var(--uc-padding);right:var(--uc-padding)}uc-file-item[mode=grid]:not(#\\#) .uc-file-name-wrapper{padding:0}uc-file-item[mode=grid]:not(#\\#) .uc-file-name:not([hidden])+.uc-file-error{bottom:calc(var(--uc-padding) + var(--uc-font-size))}uc-file-item[mode=grid]:not(#\\#) .uc-file-error{background-color:var(--uc-destructive-foreground);bottom:var(--uc-padding);color:var(--uc-background)}uc-file-item[mode=grid]:not(#\\#) .uc-file-error,uc-file-item[mode=grid]:not(#\\#) .uc-file-hint{border-radius:var(--uc-radius);left:var(--uc-padding);padding:calc(var(--uc-padding)/2) var(--uc-padding);position:absolute;right:var(--uc-padding)}uc-file-item[mode=grid]:not(#\\#) .uc-file-hint{background-color:var(--uc-background);bottom:calc(var(--uc-padding)*2);color:var(--uc-foreground)}uc-file-item[mode=grid]:not(#\\#) .uc-file-actions{position:absolute;right:var(--uc-padding);top:var(--uc-padding)}uc-file-item[mode=grid]:not(#\\#) button{background-color:var(--uc-background)}uc-file-item[mode=grid]:not(#\\#) button:hover{background-color:var(--uc-muted)}uc-file-item[mode=grid]:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#) .uc-progress-bar{height:4px!important;top:auto!important}uc-file-item[mode=grid]:not(#\\#) .uc-progress-bar{background-color:var(--uc-background);border-radius:var(--uc-radius);bottom:var(--uc-padding);left:var(--uc-padding);right:var(--uc-padding);transition:background-color .3s,opacity .3s;width:auto;z-index:1}uc-file-item[mode=grid]:not(#\\#) .uc-progress-bar :is(.uc-fake-progress,.uc-progress){background-color:var(--uc-primary)}uc-file-item[mode=grid]:not(#\\#) .uc-progress-bar[hasfilename]{bottom:calc(var(--uc-padding) + var(--uc-font-size))}uc-icon:not(#\\#){align-items:center;display:inline-flex;height:var(--uc-button-size);justify-content:center;width:var(--uc-button-size)}uc-icon:not(#\\#) svg{height:calc(var(--uc-button-size)/2);overflow:visible;width:calc(var(--uc-button-size)/2)}@supports selector(dialog::backdrop){:where([uc-modal]):not(#\\#)>dialog::backdrop{background-color:#0000001a}:where([uc-modal])[strokes]:not(#\\#)>dialog::backdrop{background-image:var(--modal-backdrop-background-image)}}:where([uc-modal]):not(#\\#)>dialog[open]{opacity:1;transform:translateY(0);visibility:visible}:where([uc-modal]):not(#\\#)>dialog:not([open]){opacity:0;transform:translateY(20px);visibility:hidden}:where([uc-modal]):not(#\\#)>dialog{background-color:var(--uc-background);border:0;border-radius:calc(var(--uc-radius)*1.75);box-shadow:var(--uc-dialog-shadow);display:flex;flex-direction:column;margin:auto;max-height:min(calc(100% - var(--uc-padding)*2),var(--uc-dialog-max-height));max-width:min(calc(100% - var(--uc-padding)*2),var(--uc-dialog-max-width));min-height:var(--uc-button-size);overflow:hidden;padding:0;transition:transform .4s ease,opacity .4s ease;width:min(var(--uc-dialog-width),100%)}:where(.uc-contrast):not(#\\#) :where([uc-modal])>dialog{outline:1px solid var(--uc-border)}uc-progress-bar:not(#\\#){--l-progress-value:0;bottom:0;height:100%;left:0;opacity:1;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:opacity .3s;width:100%}uc-progress-bar.uc-progress-bar--hidden:not(#\\#){opacity:0}uc-progress-bar:not(#\\#) .uc-progress{background-color:var(--uc-primary);height:100%;opacity:1;position:absolute;transform:translate(0);transition:width .6s,opacity .3s;width:calc(var(--l-progress-value)*1%)}uc-progress-bar:not(#\\#) .uc-progress--hidden{opacity:0}uc-progress-bar:not(#\\#) .uc-fake-progress{--l-fake-progress-width:30;animation:fake-progress-animation 1s ease-in-out infinite;background-color:var(--uc-primary);height:100%;opacity:1;position:absolute;transition:opacity .3s;width:calc(var(--l-fake-progress-width)*1%);z-index:1}uc-progress-bar:not(#\\#) .uc-fake-progress--hidden{animation:none;opacity:0}uc-progress-bar-common:not(#\\#){background-color:var(--uc-background);bottom:0;display:block;height:10px;left:0;position:fixed;right:0;transition:opacity .3s;z-index:10000}uc-progress-bar-common:not([active]):not(#\\#){opacity:0;pointer-events:none}uc-select:not(#\\#){display:inline-flex}uc-select:not(#\\#) select{align-items:center;background-color:var(--uc-secondary);border:none;border-radius:var(--uc-radius);color:var(--uc-secondary-foreground);cursor:pointer;display:inline-flex;font-family:inherit;font-size:1em;height:var(--uc-button-size);justify-content:center;padding:0 14px;position:relative;transition:background-color var(--uc-transition);user-select:none;white-space:nowrap}:where([uc-simple-btn]):not(#\\#){display:inline-flex;position:relative}:where([uc-simple-btn]):not(#\\#) button{background-color:var(--uc-simple-btn);color:var(--uc-simple-btn-foreground);font-family:var(--uc-simple-btn-font-family);font-size:var(--uc-simple-btn-font-size);gap:.5em;height:auto;padding:var(--uc-simple-btn-padding)}:where([uc-simple-btn]):not(#\\#) button uc-icon{height:auto;width:auto}:where([uc-simple-btn]):not(#\\#) button uc-icon svg{height:.9em;width:.9em}:where([uc-simple-btn]):not(#\\#) button:hover{background-color:var(--uc-simple-btn-hover)}:where([uc-simple-btn]):not(#\\#)>uc-drop-area{display:contents}:where([uc-simple-btn]):not(#\\#) .uc-visual-drop-area{align-items:center;background-color:transparent;border:1px dashed var(--uc-simple-btn-foreground);border-radius:inherit;color:transparent;display:flex;font-size:var(--uc-simple-btn-font-size);height:100%;justify-content:center;left:0;opacity:0;padding:var(--uc-simple-btn-padding);position:absolute;top:0;transition:opacity var(--uc-transition);width:100%}:where([uc-simple-btn]):not(#\\#)>uc-drop-area[drag-state=active] .uc-visual-drop-area{opacity:1}:where([uc-simple-btn]):not(#\\#)>uc-drop-area[drag-state=inactive] .uc-visual-drop-area{opacity:0}:where([uc-simple-btn]):not(#\\#)>uc-drop-area[drag-state=near] .uc-visual-drop-area{opacity:1}:where([uc-simple-btn]):not(#\\#)>uc-drop-area[drag-state=over] .uc-visual-drop-area{opacity:1}uc-source-btn:not(#\\#)>button{align-items:center;background-color:unset;border-radius:var(--uc-radius);color:var(--uc-foreground);cursor:pointer;display:flex;height:unset;margin-bottom:2px;padding:2px var(--uc-padding);transition:background-color var(--uc-transition),color var(--uc-transition);user-select:none;width:100%}uc-source-btn:last-child:not(#\\#)>button{margin-bottom:0}uc-source-btn:not(#\\#)>button:hover{background-color:var(--uc-primary-transparent)}:where(.uc-contrast):not(#\\#) uc-source-btn>button:hover{background-color:var(--uc-secondary);color:var(--uc-foreground)}uc-source-btn:not(#\\#) uc-icon{display:inline-flex;flex-grow:1;justify-content:center;margin-right:var(--uc-padding);min-width:var(--uc-button-size);opacity:.8}:where(.uc-contrast):not(#\\#) uc-source-btn uc-icon{opacity:1}uc-source-btn:not(#\\#) .uc-txt{align-items:center;border:none;box-sizing:border-box;display:flex;height:var(--uc-button-size);padding:0;white-space:nowrap;width:100%}.uc-spinner:not(#\\#){animation:uc-spinner-keyframes .4s linear infinite;border-color:currentcolor transparent transparent currentcolor;border-radius:50%;border-style:solid;border-width:2px;height:1em;width:1em}uc-start-from:not(#\\#){display:block;overflow-y:auto}uc-start-from:not(#\\#) .uc-content{background-color:var(--uc-background);display:grid;gap:calc(var(--uc-padding)*2);grid-auto-flow:row;height:100%;padding:calc(var(--uc-padding)*2);width:100%}[uc-modal]:not(#\\#)>dialog:has(uc-start-from[active]){width:var(--uc-dialog-width)}[uc-modal]:not(#\\#) uc-start-from uc-drop-area{border-radius:var(--uc-radius)}@media only screen and (max-width:430px){[uc-modal]:not(#\\#) uc-start-from uc-drop-area{display:none}}uc-thumb:not(#\\#){height:100%;width:100%}uc-upload-list:not(#\\#){background-color:var(--uc-background);display:flex;flex-direction:column;height:max-content;overflow:hidden;position:relative;transition:opacity var(--uc-transition);width:100%}uc-upload-list:not(#\\#) .uc-no-files{height:32px;padding:20px}uc-upload-list:not(#\\#) .uc-files{display:block;flex:1;min-height:32px;overflow:auto;padding:0 var(--uc-padding)}uc-upload-list:not(#\\#) .uc-files-wrapper{display:contents}uc-upload-list:not(#\\#) .uc-toolbar{background-color:var(--uc-background);display:flex;gap:4px;justify-content:space-between;padding:var(--uc-padding)}uc-upload-list:not(#\\#) .uc-toolbar-spacer{flex:1}uc-upload-list:not(#\\#) uc-drop-area{border-radius:var(--uc-radius);height:calc(100% - var(--uc-padding)*2);left:0;margin:var(--uc-padding);position:absolute;top:0;width:calc(100% - var(--uc-padding)*2)}uc-upload-list:not(#\\#) uc-activity-header>.uc-header-text{padding:0 var(--uc-padding)}uc-upload-list:not(#\\#) .uc-common-error{align-items:center;background-color:var(--uc-destructive);border-radius:var(--uc-radius);color:var(--uc-destructive-foreground);display:flex;font-size:.925em;justify-content:center;margin:4px var(--uc-padding) 0 var(--uc-padding);padding:var(--uc-padding)}uc-upload-list:not(#\\#) .uc-add-more-btn uc-icon{display:none}uc-upload-list[mode=grid]:not(#\\#) .uc-files{display:flex;flex-wrap:wrap;gap:var(--uc-grid-gap)}uc-upload-list:not(#\\#) .uc-files .uc-add-more-btn,uc-upload-list[mode=grid]:not(#\\#) uc-file-item{aspect-ratio:var(--uc-grid-aspect-ratio);flex:0 0 calc((100% - var(--uc-grid-gap)*(var(--uc-grid-col) - 1))/var(--uc-grid-col));height:var(--uc-grid-preview-image-height);max-width:calc((100% - var(--uc-grid-gap)*(var(--uc-grid-col) - 1))/var(--uc-grid-col))}uc-upload-list:not(#\\#) .uc-files .uc-add-more-btn{display:none}uc-url-source:not(#\\#){background-color:var(--uc-background);display:block}uc-url-source:not(#\\#)>.uc-content{display:grid;grid-gap:4px;grid-template-columns:1fr min-content;padding:var(--uc-padding);padding-top:0}uc-url-source:not(#\\#) .uc-url-input{display:flex}[uc-file-uploader-inline]:not(#\\#):not(#\\#):not(#\\#) uc-start-from{container-type:inline-size;height:100%}[uc-file-uploader-inline]:not(#\\#):not(#\\#):not(#\\#){--cfg-done-activity:"start-from";--cfg-init-activity:"start-from";flex:1}[uc-file-uploader-inline]:not(#\\#):not(#\\#):not(#\\#) uc-activity-header:after{content:"";height:var(--uc-button-size);width:var(--uc-button-size)}[uc-file-uploader-inline]:not(#\\#):not(#\\#):not(#\\#) uc-activity-header .uc-close-btn{display:none}[uc-file-uploader-inline]:not(#\\#):not(#\\#):not(#\\#) uc-copyright .uc-credits{position:static}@container (min-width: 500px){[uc-file-uploader-inline]:not(#\\#):not(#\\#):not(#\\#) uc-start-from .uc-content{grid-template-columns:1fr max-content;height:100%}[uc-file-uploader-inline]:not(#\\#):not(#\\#):not(#\\#) uc-start-from uc-copyright{grid-column:2}[uc-file-uploader-inline]:not(#\\#):not(#\\#):not(#\\#) uc-start-from uc-drop-area{grid-row:span 3}[uc-file-uploader-inline]:not(#\\#):not(#\\#):not(#\\#) uc-start-from:has(uc-copyright[hidden]) uc-drop-area{grid-row:span 2}[uc-file-uploader-inline]:not(#\\#):not(#\\#):not(#\\#) uc-start-from:has(.uc-cancel-btn[hidden]) uc-drop-area{grid-row:span 2}[uc-file-uploader-inline]:not(#\\#):not(#\\#):not(#\\#) uc-start-from:has(uc-copyright[hidden]):has(.uc-cancel-btn[hidden]) uc-drop-area{grid-row:span 1}}:where([uc-file-uploader-minimal]):not(#\\#):not(#\\#):not(#\\#){--cfg-init-activity:"start-from";--cfg-done-activity:"upload-list";display:block;position:relative}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#)>uc-start-from .uc-content{align-items:center;background-color:transparent;display:flex;flex-direction:column;gap:4px;overflow:hidden;padding:0}:where([uc-file-uploader-minimal]>uc-start-from uc-drop-area):not(#\\#):not(#\\#):not(#\\#){align-items:center;background-color:var(--uc-muted);border-radius:calc(var(--uc-radius)*1.75);display:flex;justify-content:center;min-height:calc(var(--uc-preview-size) + var(--uc-padding)*2 + 8px);padding:0;position:relative;text-align:center;width:100%}:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) :where([uc-file-uploader-minimal]>uc-start-from uc-drop-area){background-color:transparent}:where([uc-file-uploader-minimal]>uc-start-from uc-drop-area):not(#\\#):not(#\\#):not(#\\#):before{background-color:var(--uc-background);content:"";height:100%;position:absolute;width:100%;z-index:-1}:where([uc-file-uploader-minimal]:has([single])>uc-start-from uc-drop-area):not(#\\#):not(#\\#):not(#\\#){aspect-ratio:var(--uc-grid-aspect-ratio)}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list uc-activity-header{display:none}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list>.uc-toolbar{background-color:transparent}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list{background-color:var(--uc-background);border:1px dashed var(--uc-border);border-radius:calc(var(--uc-radius)*1.75);height:unset;padding:4px;width:100%}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-files{padding:0}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-toolbar{display:block;padding:0}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-toolbar .uc-cancel-btn,[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-toolbar .uc-done-btn,[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-toolbar .uc-upload-btn{display:none}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-toolbar .uc-add-more-btn{height:calc(var(--uc-preview-size) + var(--uc-padding)*2);margin-top:4px;width:100%}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-toolbar .uc-add-more-btn>span,[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-toolbar .uc-add-more-btn[disabled]{display:none}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-toolbar .uc-add-more-btn>uc-icon{display:flex}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-file-item uc-progress-bar{height:100%!important;top:0!important}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-file-item uc-progress-bar .uc-fake-progress,[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-file-item uc-progress-bar .uc-progress{background-color:var(--uc-primary-transparent);border-radius:var(--uc-radius)}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list uc-drop-area{border-radius:calc(var(--uc-radius)*1.75);height:100%;margin:0;width:100%}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-common-error{margin:4px 0 0}[uc-file-uploader-minimal]:not(#\\#):not(#\\#):not(#\\#) uc-copyright .uc-credits{position:static}[uc-file-uploader-minimal][mode=grid]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-toolbar .uc-add-more-btn{display:none}[uc-file-uploader-minimal][mode=grid]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-files .uc-add-more-btn{display:flex}[uc-file-uploader-minimal][mode=grid]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-files .uc-add-more-btn>span{display:none}[uc-file-uploader-minimal][mode=grid]:not(#\\#):not(#\\#):not(#\\#) uc-upload-list .uc-files .uc-add-more-btn>uc-icon{display:flex}:where([uc-wgt-common]){--cfg-init-activity:"start-from";--cfg-done-activity:""}:where([uc-wgt-common]){--uc-font-family:system-ui;--uc-font-size:14px;--uc-line-height:normal;--uc-simple-btn-font-family:system-ui;--uc-simple-btn-font-size:14px;--uc-button-size:32px;--uc-preview-size:32px;--uc-padding:10px;--uc-radius:8px;--uc-transition:.2s ease;--uc-dialog-width:430px;--uc-dialog-max-width:920px;--uc-dialog-max-height:675px;--uc-simple-btn-padding:7px 14px;--uc-grid-col:3;--uc-grid-preview-image-height:auto;--uc-grid-gap:calc(var(--uc-padding)/2);--uc-grid-aspect-ratio:1/1;--uc-background:var(--uc-background-light);--uc-foreground:var(--uc-foreground-light);--uc-primary:var(--uc-primary-light);--uc-primary-hover:var(--uc-primary-hover-light);--uc-primary-transparent:var(--uc-primary-transparent-light);--uc-primary-foreground:var(--uc-primary-foreground-light);--uc-secondary:var(--uc-secondary-light);--uc-secondary-hover:var(--uc-secondary-hover-light);--uc-secondary-foreground:var(--uc-secondary-foreground-light);--uc-muted:var(--uc-muted-light);--uc-muted-foreground:var(--uc-muted-foreground-light);--uc-destructive:var(--uc-destructive-light);--uc-destructive-foreground:var(--uc-destructive-foreground-light);--uc-border:var(--uc-border-light);--uc-dialog-shadow:var(--uc-dialog-shadow-light);--uc-simple-btn:var(--uc-simple-btn-light);--uc-simple-btn-hover:var(--uc-simple-btn-hover-light);--uc-simple-btn-foreground:var(--uc-simple-btn-foreground-light)}@supports not (color:oklch(0% 0 0)){:where([uc-wgt-common]){--uc-primary-rgb-light:23 75 215;--uc-primary-light:rgb(var(--uc-primary-rgb-light));--uc-primary-hover-light:rgb(var(--uc-primary-rgb-light)/90%);--uc-primary-transparent-light:rgb(var(--uc-primary-rgb-light)/10%);--uc-background-light:#fff;--uc-foreground-light:#181818;--uc-primary-foreground-light:#fff;--uc-secondary-light:hsla(0,0%,9%,.05);--uc-secondary-hover-light:hsla(0,0%,9%,.08);--uc-secondary-foreground-light:#181818;--uc-muted-light:#f5f5f5;--uc-muted-foreground-light:#717171;--uc-destructive-light:rgb(232 19 20/5%);--uc-destructive-foreground-light:#e81314;--uc-border-light:#e4e4e8;--uc-dialog-shadow-light:0px 6px 20px rgba(0,0,0,.1);--uc-simple-btn-light:#ebebeb;--uc-simple-btn-hover-light:#e4e4e4;--uc-simple-btn-foreground-light:#181818;--uc-primary-rgb-dark:87 154 255;--uc-primary-dark:rgb(var(--uc-primary-rgb-dark));--uc-primary-hover-dark:rgb(var(--uc-primary-rgb-dark)/90%);--uc-primary-transparent-dark:rgb(var(--uc-primary-rgb-dark)/7%);--uc-background-dark:#1b1b1b;--uc-foreground-dark:#e1e1e1;--uc-primary-foreground-dark:#000;--uc-secondary-dark:hsla(0,0%,88%,.07);--uc-secondary-hover-dark:hsla(0,0%,88%,.1);--uc-secondary-foreground-dark:#e1e1e1;--uc-muted-dark:#242424;--uc-muted-foreground-dark:#989898;--uc-destructive-dark:rgba(244,90,79,.1);--uc-destructive-foreground-dark:#f45a4f;--uc-border-dark:#3d3d3d;--uc-dialog-shadow-dark:0px 6px 20px rgba(0,0,0,.25);--uc-simple-btn-dark:#242424;--uc-simple-btn-hover-dark:#2b2b2b;--uc-simple-btn-foreground-dark:#fff}}@supports (color:oklch(0% 0 0)){:where([uc-wgt-common]){--uc-primary-oklch-light:47% .22 264;--uc-primary-light:oklch(var(--uc-primary-oklch-light));--uc-primary-hover-light:oklch(var(--uc-primary-oklch-light)/90%);--uc-primary-transparent-light:oklch(var(--uc-primary-oklch-light)/7%);--uc-background-light:oklch(100% 0 0);--uc-foreground-light:oklch(21% 0 0);--uc-primary-foreground-light:oklch(100% 0 0);--uc-secondary-light:oklch(21% 0 0/.05);--uc-secondary-hover-light:oklch(21% 0 0/.08);--uc-secondary-foreground-light:oklch(21% 0 0);--uc-muted-light:oklch(97% 0 0);--uc-muted-foreground-light:oklch(40% 0 0);--uc-destructive-light:oklch(59% .235 28.5/.05);--uc-destructive-foreground-light:oklch(59% .235 28.5);--uc-border-light:oklch(92% 0 0);--uc-dialog-shadow-light:0px 6px 20px oklch(0% 0 0/.1);--uc-simple-btn-light:oklch(94% 0 0);--uc-simple-btn-hover-light:oklch(92% 0 0);--uc-simple-btn-foreground-light:oklch(20% 0 0);--uc-primary-oklch-dark:69% .1768 258.4;--uc-primary-dark:oklch(var(--uc-primary-oklch-dark));--uc-primary-hover-dark:oklch(var(--uc-primary-oklch-dark)/90%);--uc-primary-transparent-dark:oklch(var(--uc-primary-oklch-dark)/7%);--uc-background-dark:oklch(22% 0 0);--uc-foreground-dark:oklch(91% 0 0);--uc-primary-foreground-dark:oklch(0% 0 0);--uc-secondary-dark:oklch(91% 0 0/.07);--uc-secondary-hover-dark:oklch(91% 0 0/.1);--uc-secondary-foreground-dark:oklch(91% 0 0);--uc-muted-dark:oklch(26% 0 0);--uc-muted-foreground-dark:oklch(68% 0 0);--uc-destructive-dark:oklch(67% .191 27.5/.1);--uc-destructive-foreground-dark:oklch(67% .191 27.5);--uc-border-dark:oklch(36% 0 0);--uc-dialog-shadow-dark:0px 6px 20px oklch(0% 0 0/.25);--uc-simple-btn-dark:oklch(26% 0 0);--uc-simple-btn-hover-dark:oklch(29% 0 0);--uc-simple-btn-foreground-dark:oklch(100% 0 0)}}@media only screen and (max-height:600px){:where([uc-wgt-common]){--uc-dialog-max-height:100%}}@media only screen and (max-width:680px){:where([uc-wgt-common]){--uc-grid-col:2}}@media only screen and (max-width:430px){:where([uc-wgt-common]){--uc-dialog-max-width:100vw;--uc-dialog-max-height:var(--uploadcare-blocks-window-height);--uc-grid-col:1}}@media (prefers-color-scheme:light){:where([uc-wgt-common]){--uc-background:var(--uc-background-light);--uc-foreground:var(--uc-foreground-light);--uc-primary:var(--uc-primary-light);--uc-primary-hover:var(--uc-primary-hover-light);--uc-primary-transparent:var(--uc-primary-transparent-light);--uc-primary-foreground:var(--uc-primary-foreground-light);--uc-secondary:var(--uc-secondary-light);--uc-secondary-hover:var(--uc-secondary-hover-light);--uc-secondary-foreground:var(--uc-secondary-foreground-light);--uc-muted:var(--uc-muted-light);--uc-muted-foreground:var(--uc-muted-foreground-light);--uc-destructive:var(--uc-destructive-light);--uc-destructive-foreground:var(--uc-destructive-foreground-light);--uc-border:var(--uc-border-light);--uc-dialog-shadow:var(--uc-dialog-shadow-light);--uc-simple-btn:var(--uc-simple-btn-light);--uc-simple-btn-hover:var(--uc-simple-btn-hover-light);--uc-simple-btn-foreground:var(--uc-simple-btn-foreground-light)}}@media (prefers-color-scheme:dark){:where([uc-wgt-common]){--uc-background:var(--uc-background-dark);--uc-foreground:var(--uc-foreground-dark);--uc-primary:var(--uc-primary-dark);--uc-primary-hover:var(--uc-primary-hover-dark);--uc-primary-transparent:var(--uc-primary-transparent-dark);--uc-primary-foreground:var(--uc-primary-foreground-dark);--uc-secondary:var(--uc-secondary-dark);--uc-secondary-hover:var(--uc-secondary-hover-dark);--uc-secondary-foreground:var(--uc-secondary-foreground-dark);--uc-muted:var(--uc-muted-dark);--uc-muted-foreground:var(--uc-muted-foreground-dark);--uc-destructive:var(--uc-destructive-dark);--uc-destructive-foreground:var(--uc-destructive-foreground-dark);--uc-border:var(--uc-border-dark);--uc-dialog-shadow:var(--uc-dialog-shadow-dark);--uc-simple-btn:var(--uc-simple-btn-dark);--uc-simple-btn-hover:var(--uc-simple-btn-hover-dark);--uc-simple-btn-foreground:var(--uc-simple-btn-foreground-dark)}}:where(.uc-light){--uc-background:var(--uc-background-light);--uc-foreground:var(--uc-foreground-light);--uc-primary:var(--uc-primary-light);--uc-primary-hover:var(--uc-primary-hover-light);--uc-primary-transparent:var(--uc-primary-transparent-light);--uc-primary-foreground:var(--uc-primary-foreground-light);--uc-secondary:var(--uc-secondary-light);--uc-secondary-hover:var(--uc-secondary-hover-light);--uc-secondary-foreground:var(--uc-secondary-foreground-light);--uc-muted:var(--uc-muted-light);--uc-muted-foreground:var(--uc-muted-foreground-light);--uc-destructive:var(--uc-destructive-light);--uc-destructive-foreground:var(--uc-destructive-foreground-light);--uc-border:var(--uc-border-light);--uc-dialog-shadow:var(--uc-dialog-shadow-light);--uc-simple-btn:var(--uc-simple-btn-light);--uc-simple-btn-hover:var(--uc-simple-btn-hover-light);--uc-simple-btn-foreground:var(--uc-simple-btn-foreground-light)}:where(.uc-dark){--uc-background:var(--uc-background-dark);--uc-foreground:var(--uc-foreground-dark);--uc-primary:var(--uc-primary-dark);--uc-primary-hover:var(--uc-primary-hover-dark);--uc-primary-transparent:var(--uc-primary-transparent-dark);--uc-primary-foreground:var(--uc-primary-foreground-dark);--uc-secondary:var(--uc-secondary-dark);--uc-secondary-hover:var(--uc-secondary-hover-dark);--uc-secondary-foreground:var(--uc-secondary-foreground-dark);--uc-muted:var(--uc-muted-dark);--uc-muted-foreground:var(--uc-muted-foreground-dark);--uc-destructive:var(--uc-destructive-dark);--uc-destructive-foreground:var(--uc-destructive-foreground-dark);--uc-border:var(--uc-border-dark);--uc-dialog-shadow:var(--uc-dialog-shadow-dark);--uc-simple-btn:var(--uc-simple-btn-dark);--uc-simple-btn-hover:var(--uc-simple-btn-hover-dark);--uc-simple-btn-foreground:var(--uc-simple-btn-foreground-dark)}:where(.uc-purple){--uc-primary-oklch-light:47% .22 300;--uc-primary-oklch-dark:69% .1768 300}:where(.uc-red){--uc-primary-oklch-light:47% .21 21;--uc-primary-oklch-dark:71% .1768 21}:where(.uc-orange){--uc-primary-oklch-light:47% .1376 51.88;--uc-primary-oklch-dark:69% .1768 51.88}:where(.uc-green){--uc-primary-oklch-light:45% .14 130;--uc-primary-oklch-dark:69% .1768 130}:where(.uc-turquoise){--uc-primary-oklch-light:45% .0854 174;--uc-primary-oklch-dark:69% .1768 174}:where(.uc-gray){--uc-primary-oklch-light:10% 0 0;--uc-primary-oklch-dark:97% 0 0}:where(.uc-contrast){--uc-border-light:oklch(50% 0 0);--uc-border-dark:oklch(50% 0 0);--uc-muted-light:oklch(98% 0 0);--uc-muted-dark:oklch(16% 0 0);--uc-muted-foreground-light:oklch(20% 0 0);--uc-muted-foreground-dark:oklch(80% 0 0);--uc-background-light:oklch(100% 0 0);--uc-foreground-light:oklch(0% 0 0);--uc-background-dark:oklch(10% 0 0);--uc-foreground-dark:oklch(100% 0 0)}:where([uc-wgt-common]){color:var(--uc-foreground);font-family:var(--uc-font-family);font-size:var(--uc-font-size);line-height:var(--uc-line-height)}:where([uc-wgt-common]) *{box-sizing:border-box}:where([uc-wgt-common]) button{align-items:center;border:none;border-radius:var(--uc-radius);cursor:pointer;display:flex;font-family:inherit;font-size:1em;height:var(--uc-button-size);justify-content:center;padding-left:14px;padding-right:14px;transition:background-color var(--uc-transition);user-select:none;white-space:nowrap}:where([uc-wgt-common]) button:focus-visible{outline-offset:2px}:where([uc-wgt-common]) button.uc-primary-btn{background-color:var(--uc-primary);color:var(--uc-primary-foreground)}:where([uc-wgt-common]) button.uc-primary-btn:hover{background-color:var(--uc-primary-hover)}:where([uc-wgt-common]) button.uc-secondary-btn{background-color:var(--uc-secondary);color:var(--uc-secondary-foreground)}:where([uc-wgt-common]) button.uc-secondary-btn:hover{background-color:var(--uc-secondary-hover)}:where([uc-wgt-common].uc-contrast) button.uc-secondary-btn{border:1px solid var(--uc-border)}:where([uc-wgt-common]) button.uc-mini-btn{background-color:transparent;color:var(--uc-secondary-foreground);height:var(--uc-button-size);padding:0}:where([uc-wgt-common]) button.uc-mini-btn:hover{background-color:var(--uc-secondary)}:where([uc-wgt-common]) :is(button[disabled],button.uc-primary-btn[disabled],button.uc-secondary-btn[disabled]){opacity:.5;pointer-events:none}:where([uc-wgt-common]) a{color:var(--uc-primary);text-decoration:none}:where([uc-wgt-common]) a[disabled]{pointer-events:none}:where([uc-wgt-common]) input[type=text]{background-color:var(--uc-background);border:1px solid var(--uc-border);border-radius:var(--uc-radius);color:var(--uc-foreground);display:flex;font-family:inherit;font-size:1em;height:var(--uc-button-size);outline:1px solid transparent;padding-left:10px;padding-right:10px;transition:border-color var(--uc-transition),outline-color var(--uc-transition);width:100%}:where([uc-wgt-common]) input[type=text]::placeholder{color:var(--uc-muted-foreground)}:where([uc-wgt-common]) input[type=text]:focus{border-color:var(--uc-primary-hover);outline-color:var(--uc-primary-hover)}:where([uc-wgt-common]) input[disabled]{opacity:.6;pointer-events:none}:where([uc-wgt-common]) select[disabled],:where([uc-wgt-common]) uc-select[disabled]{opacity:.6;pointer-events:none}:where([uc-wgt-common]):not(#\\#):not(#\\#) [hidden]{display:none}:where([uc-wgt-common]):not(#\\#):not(#\\#) [activity]:not([active],.active){display:none}:where([uc-wgt-common]):not(#\\#):not(#\\#) dialog:not([open]) [activity]{display:none}:where([uc-wgt-common]):not(#\\#):not(#\\#):not(#\\#):not(#\\#) uc-source-btn[type]{all:unset}`,""]);const h=u},659:t=>{"use strict";t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="},741:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},779:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var r="",o=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),o&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),o&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r}).join("")},e.i=function(t,r,o,i,n){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(o)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(a[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);o&&a[u[0]]||(void 0!==n&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=n),r&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=r):u[2]=r),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),e.push(u))}},e}},782:(t,e,r)=>{t.exports=r(237)("./src/core.js")},908:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var o=r(106),i=r.n(o),n=r(779),a=r.n(n)()(i());a.push([t.id,":root{--ck-uploadcare-form-view-width:700px;--ck-uploadcare-external-source-view-height:350px;--ck-uploadcare-color-image-background:oklch(0.97 0 0);--ck-uploadcare-color-icon-error:#db3700;--ck-uploadcare-color-skeleton:#fafafa}.ck .ck-uploadcare-form,.ck .ck-uploadcare-form:not(#\\#){max-width:100%;width:var(--ck-uploadcare-form-view-width)}.ck .ck-uploadcare-form .ck-uploadcare-form__loading .ck-uploadcare-form__loading-spinner,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__loading .ck-uploadcare-form__loading-spinner{align-items:center;background-color:var(--ck-uploadcare-color-image-background);display:flex;flex-direction:column;height:var(--ck-uploadcare-external-source-view-height);justify-content:center;width:100%}.ck .ck-uploadcare-form .ck-uploadcare-form__loading .ck-uploadcare-form__loading-spinner .ck-spinner-container,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__loading .ck-uploadcare-form__loading-spinner .ck-spinner-container{margin-bottom:10px}.ck .ck-uploadcare-form .ck-uploadcare-form__error .ck-uploadcare-form__error-contents,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__error .ck-uploadcare-form__error-contents{align-items:center;background-color:var(--ck-uploadcare-color-image-background);display:flex;flex-direction:column;gap:5px;height:var(--ck-uploadcare-external-source-view-height);justify-content:center;width:100%}.ck .ck-uploadcare-form .ck-uploadcare-form__error .ck-uploadcare-form__error-contents h3,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__error .ck-uploadcare-form__error-contents h3{font-weight:700;margin:0;padding:0}.ck .ck-uploadcare-form .ck-uploadcare-form__error .ck-uploadcare-form__error-contents .ck-icon,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__error .ck-uploadcare-form__error-contents .ck-icon{color:var(--ck-uploadcare-color-icon-error)}.ck .ck-uploadcare-form .ck-uploadcare-form__error .ck-uploadcare-form__error-contents .ck-button,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__error .ck-uploadcare-form__error-contents .ck-button{margin-top:10px}.ck .ck-uploadcare-form .ck-uploadcare-form__skeleton,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__skeleton{height:115px;width:100%}.ck .ck-uploadcare-form .ck-uploadcare-form__skeleton div,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__skeleton div{align-items:center;box-sizing:border-box;display:flex;flex-direction:row;height:50%;justify-content:center;min-width:100%}.ck .ck-uploadcare-form .ck-uploadcare-form__skeleton div span,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__skeleton div span{background-color:var(--ck-uploadcare-color-skeleton);display:block;height:32px;width:32px}.ck .ck-uploadcare-form .ck-uploadcare-form__skeleton div+div,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__skeleton div+div{gap:20px}.ck .ck-uploadcare-form .ck-uploadcare-form__skeleton div+div span:first-child,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__skeleton div+div span:first-child{left:8px;position:absolute;width:80px}.ck .ck-uploadcare-form .ck-uploadcare-form__skeleton div+div span:last-child,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__skeleton div+div span:last-child{position:absolute;right:8px;width:80px}.ck .ck-uploadcare-form .ck-uploadcare-form__skeleton div:first-child,.ck .ck-uploadcare-form:not(#\\#) .ck-uploadcare-form__skeleton div:first-child{gap:4px}.ck .ck-uploadcare-form .mini-btn,.ck .ck-uploadcare-form:not(#\\#) .mini-btn{display:none}.ck .ck-uploadcare-form .uc-viewport,.ck .ck-uploadcare-form:not(#\\#) .uc-viewport{height:var(--ck-uploadcare-external-source-view-height)}.ck .ck-uploadcare-form .uc-primary-btn,.ck .ck-uploadcare-form .uc-secondary-btn,.ck .ck-uploadcare-form uc-btn-ui button,.ck .ck-uploadcare-form:not(#\\#) .uc-primary-btn,.ck .ck-uploadcare-form:not(#\\#) .uc-secondary-btn,.ck .ck-uploadcare-form:not(#\\#) uc-btn-ui button{min-height:var(--ck-ui-component-min-height);min-width:var(--ck-ui-component-min-height);padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}.ck .ck-uploadcare-form .uc-primary-btn,.ck .ck-uploadcare-form uc-btn-ui.uc-primary button,.ck .ck-uploadcare-form:not(#\\#) .uc-primary-btn,.ck .ck-uploadcare-form:not(#\\#) uc-btn-ui.uc-primary button{background:var(--ck-color-button-action-background)}.ck .ck-uploadcare-form .uc-primary-btn:not(.ck-disabled):hover,.ck .ck-uploadcare-form uc-btn-ui.uc-primary button:not(.ck-disabled):hover,.ck .ck-uploadcare-form:not(#\\#) .uc-primary-btn:not(.ck-disabled):hover,.ck .ck-uploadcare-form:not(#\\#) uc-btn-ui.uc-primary button:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck .ck-uploadcare-form .uc-primary-btn:not(.ck-disabled):active,.ck .ck-uploadcare-form uc-btn-ui.uc-primary button:not(.ck-disabled):active,.ck .ck-uploadcare-form:not(#\\#) .uc-primary-btn:not(.ck-disabled):active,.ck .ck-uploadcare-form:not(#\\#) uc-btn-ui.uc-primary button:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background)}.ck .ck-uploadcare-form .uc-primary-btn.ck-disabled,.ck .ck-uploadcare-form uc-btn-ui.uc-primary button.ck-disabled,.ck .ck-uploadcare-form:not(#\\#) .uc-primary-btn.ck-disabled,.ck .ck-uploadcare-form:not(#\\#) uc-btn-ui.uc-primary button.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck .ck-uploadcare-form .uc-secondary-btn,.ck .ck-uploadcare-form uc-btn-ui.uc-secondary button,.ck .ck-uploadcare-form:not(#\\#) .uc-secondary-btn,.ck .ck-uploadcare-form:not(#\\#) uc-btn-ui.uc-secondary button{background:var(--ck-color-button-default-background)}.ck .ck-uploadcare-form .uc-secondary-btn:not(.ck-disabled):hover,.ck .ck-uploadcare-form uc-btn-ui.uc-secondary button:not(.ck-disabled):hover,.ck .ck-uploadcare-form:not(#\\#) .uc-secondary-btn:not(.ck-disabled):hover,.ck .ck-uploadcare-form:not(#\\#) uc-btn-ui.uc-secondary button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck .ck-uploadcare-form .uc-secondary-btn:not(.ck-disabled):active,.ck .ck-uploadcare-form uc-btn-ui.uc-secondary button:not(.ck-disabled):active,.ck .ck-uploadcare-form:not(#\\#) .uc-secondary-btn:not(.ck-disabled):active,.ck .ck-uploadcare-form:not(#\\#) uc-btn-ui.uc-secondary button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background)}.ck .ck-uploadcare-form .uc-secondary-btn.ck-disabled,.ck .ck-uploadcare-form uc-btn-ui.uc-secondary button.ck-disabled,.ck .ck-uploadcare-form:not(#\\#) .uc-secondary-btn.ck-disabled,.ck .ck-uploadcare-form:not(#\\#) uc-btn-ui.uc-secondary button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck .ck-uploadcare-form uc-upload-list .uc-toolbar,.ck .ck-uploadcare-form:not(#\\#) uc-upload-list .uc-toolbar{gap:var(--ck-spacing-large)}.ck .ck-uploadcare-form uc-upload-list .uc-files,.ck .ck-uploadcare-form:not(#\\#) uc-upload-list .uc-files{max-height:var(--ck-uploadcare-external-source-view-height);overflow-y:auto;padding-top:var(--ck-spacing-large)}.ck .ck-uploadcare-form .uc-content,.ck .ck-uploadcare-form:not(#\\#) .uc-content{gap:var(--ck-spacing-large);padding:var(--ck-spacing-large)}.ck .ck-uploadcare-form .uc-content>.uc-iframe-wrapper,.ck .ck-uploadcare-form:not(#\\#) .uc-content>.uc-iframe-wrapper{height:var(--ck-uploadcare-external-source-view-height)}.ck .ck-uploadcare-form .uc-content>.uc-toolbar,.ck .ck-uploadcare-form:not(#\\#) .uc-content>.uc-toolbar{padding:var(--ck-spacing-large) 0 0}.ck .ck-uploadcare-form uc-start-from .uc-content,.ck .ck-uploadcare-form:not(#\\#) uc-start-from .uc-content{gap:0}.ck .ck-uploadcare-form uc-file-item>.uc-inner,.ck .ck-uploadcare-form:not(#\\#) uc-file-item>.uc-inner{font-size:1em}.ck .ck-uploadcare-form uc-file-item>.uc-inner:where([finished]) .uc-badge,.ck .ck-uploadcare-form:not(#\\#) uc-file-item>.uc-inner:where([finished]) .uc-badge{background:var(--ck-color-button-action-active-background)}.ck .ck-uploadcare-form uc-external-source .uc-cancel-btn,.ck .ck-uploadcare-form:not(#\\#) uc-external-source .uc-cancel-btn{pointer-events:none;visibility:hidden}.ck .ck-uploadcare-form uc-activity-header,.ck .ck-uploadcare-form uc-source-list,.ck .ck-uploadcare-form:not(#\\#) uc-activity-header,.ck .ck-uploadcare-form:not(#\\#) uc-source-list{display:none}.ck .ck-uploadcare-form uc-cloud-image-editor-block [icon=closeMax] .uc-icon_left,.ck .ck-uploadcare-form:not(#\\#) uc-cloud-image-editor-block [icon=closeMax] .uc-icon_left{transform:rotate(90deg)}",""]);const s=a},929:t=>{"use strict";var e=[];function r(t){for(var r=-1,o=0;o<e.length;o++)if(e[o].identifier===t){r=o;break}return r}function o(t,o){for(var n={},a=[],s=0;s<t.length;s++){var c=t[s],l=o.base?c[0]+o.base:c[0],u=n[l]||0,d="".concat(l," ").concat(u);n[l]=u+1;var h=r(d),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)e[h].references++,e[h].updater(p);else{var g=i(p,o);o.byIndex=s,e.splice(s,0,{identifier:d,updater:g,references:1})}a.push(d)}return a}function i(t,e){var r=e.domAPI(e);r.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;r.update(t=e)}else r.remove()}}t.exports=function(t,i){var n=o(t=t||[],i=i||{});return function(t){t=t||[];for(var a=0;a<n.length;a++){var s=r(n[a]);e[s].references--}for(var c=o(t,i),l=0;l<n.length;l++){var u=r(n[l]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}n=c}}},947:(t,e,r)=>{"use strict";r.d(e,{A:()=>h});var o=r(106),i=r.n(o),n=r(779),a=r.n(n),s=r(474),c=r.n(s),l=new URL(r(659),r.b),u=a()(i()),d=c()(l);u.push([t.id,`:where([uc-wgt-common]){--uc-font-family:system-ui;--uc-font-size:14px;--uc-line-height:normal;--uc-simple-btn-font-family:system-ui;--uc-simple-btn-font-size:14px;--uc-button-size:32px;--uc-preview-size:32px;--uc-padding:10px;--uc-radius:8px;--uc-transition:.2s ease;--uc-dialog-width:430px;--uc-dialog-max-width:920px;--uc-dialog-max-height:675px;--uc-simple-btn-padding:7px 14px;--uc-grid-col:3;--uc-grid-preview-image-height:auto;--uc-grid-gap:calc(var(--uc-padding)/2);--uc-grid-aspect-ratio:1/1;--uc-background:var(--uc-background-light);--uc-foreground:var(--uc-foreground-light);--uc-primary:var(--uc-primary-light);--uc-primary-hover:var(--uc-primary-hover-light);--uc-primary-transparent:var(--uc-primary-transparent-light);--uc-primary-foreground:var(--uc-primary-foreground-light);--uc-secondary:var(--uc-secondary-light);--uc-secondary-hover:var(--uc-secondary-hover-light);--uc-secondary-foreground:var(--uc-secondary-foreground-light);--uc-muted:var(--uc-muted-light);--uc-muted-foreground:var(--uc-muted-foreground-light);--uc-destructive:var(--uc-destructive-light);--uc-destructive-foreground:var(--uc-destructive-foreground-light);--uc-border:var(--uc-border-light);--uc-dialog-shadow:var(--uc-dialog-shadow-light);--uc-simple-btn:var(--uc-simple-btn-light);--uc-simple-btn-hover:var(--uc-simple-btn-hover-light);--uc-simple-btn-foreground:var(--uc-simple-btn-foreground-light)}@supports not (color:oklch(0% 0 0)){:where([uc-wgt-common]){--uc-primary-rgb-light:23 75 215;--uc-primary-light:rgb(var(--uc-primary-rgb-light));--uc-primary-hover-light:rgb(var(--uc-primary-rgb-light)/90%);--uc-primary-transparent-light:rgb(var(--uc-primary-rgb-light)/10%);--uc-background-light:#fff;--uc-foreground-light:#181818;--uc-primary-foreground-light:#fff;--uc-secondary-light:hsla(0,0%,9%,.05);--uc-secondary-hover-light:hsla(0,0%,9%,.08);--uc-secondary-foreground-light:#181818;--uc-muted-light:#f5f5f5;--uc-muted-foreground-light:#717171;--uc-destructive-light:rgb(232 19 20/5%);--uc-destructive-foreground-light:#e81314;--uc-border-light:#e4e4e8;--uc-dialog-shadow-light:0px 6px 20px rgba(0,0,0,.1);--uc-simple-btn-light:#ebebeb;--uc-simple-btn-hover-light:#e4e4e4;--uc-simple-btn-foreground-light:#181818;--uc-primary-rgb-dark:87 154 255;--uc-primary-dark:rgb(var(--uc-primary-rgb-dark));--uc-primary-hover-dark:rgb(var(--uc-primary-rgb-dark)/90%);--uc-primary-transparent-dark:rgb(var(--uc-primary-rgb-dark)/7%);--uc-background-dark:#1b1b1b;--uc-foreground-dark:#e1e1e1;--uc-primary-foreground-dark:#000;--uc-secondary-dark:hsla(0,0%,88%,.07);--uc-secondary-hover-dark:hsla(0,0%,88%,.1);--uc-secondary-foreground-dark:#e1e1e1;--uc-muted-dark:#242424;--uc-muted-foreground-dark:#989898;--uc-destructive-dark:rgba(244,90,79,.1);--uc-destructive-foreground-dark:#f45a4f;--uc-border-dark:#3d3d3d;--uc-dialog-shadow-dark:0px 6px 20px rgba(0,0,0,.25);--uc-simple-btn-dark:#242424;--uc-simple-btn-hover-dark:#2b2b2b;--uc-simple-btn-foreground-dark:#fff}}@supports (color:oklch(0% 0 0)){:where([uc-wgt-common]){--uc-primary-oklch-light:47% .22 264;--uc-primary-light:oklch(var(--uc-primary-oklch-light));--uc-primary-hover-light:oklch(var(--uc-primary-oklch-light)/90%);--uc-primary-transparent-light:oklch(var(--uc-primary-oklch-light)/7%);--uc-background-light:oklch(100% 0 0);--uc-foreground-light:oklch(21% 0 0);--uc-primary-foreground-light:oklch(100% 0 0);--uc-secondary-light:oklch(21% 0 0/.05);--uc-secondary-hover-light:oklch(21% 0 0/.08);--uc-secondary-foreground-light:oklch(21% 0 0);--uc-muted-light:oklch(97% 0 0);--uc-muted-foreground-light:oklch(40% 0 0);--uc-destructive-light:oklch(59% .235 28.5/.05);--uc-destructive-foreground-light:oklch(59% .235 28.5);--uc-border-light:oklch(92% 0 0);--uc-dialog-shadow-light:0px 6px 20px oklch(0% 0 0/.1);--uc-simple-btn-light:oklch(94% 0 0);--uc-simple-btn-hover-light:oklch(92% 0 0);--uc-simple-btn-foreground-light:oklch(20% 0 0);--uc-primary-oklch-dark:69% .1768 258.4;--uc-primary-dark:oklch(var(--uc-primary-oklch-dark));--uc-primary-hover-dark:oklch(var(--uc-primary-oklch-dark)/90%);--uc-primary-transparent-dark:oklch(var(--uc-primary-oklch-dark)/7%);--uc-background-dark:oklch(22% 0 0);--uc-foreground-dark:oklch(91% 0 0);--uc-primary-foreground-dark:oklch(0% 0 0);--uc-secondary-dark:oklch(91% 0 0/.07);--uc-secondary-hover-dark:oklch(91% 0 0/.1);--uc-secondary-foreground-dark:oklch(91% 0 0);--uc-muted-dark:oklch(26% 0 0);--uc-muted-foreground-dark:oklch(68% 0 0);--uc-destructive-dark:oklch(67% .191 27.5/.1);--uc-destructive-foreground-dark:oklch(67% .191 27.5);--uc-border-dark:oklch(36% 0 0);--uc-dialog-shadow-dark:0px 6px 20px oklch(0% 0 0/.25);--uc-simple-btn-dark:oklch(26% 0 0);--uc-simple-btn-hover-dark:oklch(29% 0 0);--uc-simple-btn-foreground-dark:oklch(100% 0 0)}}@media only screen and (max-height:600px){:where([uc-wgt-common]){--uc-dialog-max-height:100%}}@media only screen and (max-width:680px){:where([uc-wgt-common]){--uc-grid-col:2}}@media only screen and (max-width:430px){:where([uc-wgt-common]){--uc-dialog-max-width:100vw;--uc-dialog-max-height:var(--uploadcare-blocks-window-height);--uc-grid-col:1}}@media (prefers-color-scheme:light){:where([uc-wgt-common]){--uc-background:var(--uc-background-light);--uc-foreground:var(--uc-foreground-light);--uc-primary:var(--uc-primary-light);--uc-primary-hover:var(--uc-primary-hover-light);--uc-primary-transparent:var(--uc-primary-transparent-light);--uc-primary-foreground:var(--uc-primary-foreground-light);--uc-secondary:var(--uc-secondary-light);--uc-secondary-hover:var(--uc-secondary-hover-light);--uc-secondary-foreground:var(--uc-secondary-foreground-light);--uc-muted:var(--uc-muted-light);--uc-muted-foreground:var(--uc-muted-foreground-light);--uc-destructive:var(--uc-destructive-light);--uc-destructive-foreground:var(--uc-destructive-foreground-light);--uc-border:var(--uc-border-light);--uc-dialog-shadow:var(--uc-dialog-shadow-light);--uc-simple-btn:var(--uc-simple-btn-light);--uc-simple-btn-hover:var(--uc-simple-btn-hover-light);--uc-simple-btn-foreground:var(--uc-simple-btn-foreground-light)}}@media (prefers-color-scheme:dark){:where([uc-wgt-common]){--uc-background:var(--uc-background-dark);--uc-foreground:var(--uc-foreground-dark);--uc-primary:var(--uc-primary-dark);--uc-primary-hover:var(--uc-primary-hover-dark);--uc-primary-transparent:var(--uc-primary-transparent-dark);--uc-primary-foreground:var(--uc-primary-foreground-dark);--uc-secondary:var(--uc-secondary-dark);--uc-secondary-hover:var(--uc-secondary-hover-dark);--uc-secondary-foreground:var(--uc-secondary-foreground-dark);--uc-muted:var(--uc-muted-dark);--uc-muted-foreground:var(--uc-muted-foreground-dark);--uc-destructive:var(--uc-destructive-dark);--uc-destructive-foreground:var(--uc-destructive-foreground-dark);--uc-border:var(--uc-border-dark);--uc-dialog-shadow:var(--uc-dialog-shadow-dark);--uc-simple-btn:var(--uc-simple-btn-dark);--uc-simple-btn-hover:var(--uc-simple-btn-hover-dark);--uc-simple-btn-foreground:var(--uc-simple-btn-foreground-dark)}}:where(.uc-light){--uc-background:var(--uc-background-light);--uc-foreground:var(--uc-foreground-light);--uc-primary:var(--uc-primary-light);--uc-primary-hover:var(--uc-primary-hover-light);--uc-primary-transparent:var(--uc-primary-transparent-light);--uc-primary-foreground:var(--uc-primary-foreground-light);--uc-secondary:var(--uc-secondary-light);--uc-secondary-hover:var(--uc-secondary-hover-light);--uc-secondary-foreground:var(--uc-secondary-foreground-light);--uc-muted:var(--uc-muted-light);--uc-muted-foreground:var(--uc-muted-foreground-light);--uc-destructive:var(--uc-destructive-light);--uc-destructive-foreground:var(--uc-destructive-foreground-light);--uc-border:var(--uc-border-light);--uc-dialog-shadow:var(--uc-dialog-shadow-light);--uc-simple-btn:var(--uc-simple-btn-light);--uc-simple-btn-hover:var(--uc-simple-btn-hover-light);--uc-simple-btn-foreground:var(--uc-simple-btn-foreground-light)}:where(.uc-dark){--uc-background:var(--uc-background-dark);--uc-foreground:var(--uc-foreground-dark);--uc-primary:var(--uc-primary-dark);--uc-primary-hover:var(--uc-primary-hover-dark);--uc-primary-transparent:var(--uc-primary-transparent-dark);--uc-primary-foreground:var(--uc-primary-foreground-dark);--uc-secondary:var(--uc-secondary-dark);--uc-secondary-hover:var(--uc-secondary-hover-dark);--uc-secondary-foreground:var(--uc-secondary-foreground-dark);--uc-muted:var(--uc-muted-dark);--uc-muted-foreground:var(--uc-muted-foreground-dark);--uc-destructive:var(--uc-destructive-dark);--uc-destructive-foreground:var(--uc-destructive-foreground-dark);--uc-border:var(--uc-border-dark);--uc-dialog-shadow:var(--uc-dialog-shadow-dark);--uc-simple-btn:var(--uc-simple-btn-dark);--uc-simple-btn-hover:var(--uc-simple-btn-hover-dark);--uc-simple-btn-foreground:var(--uc-simple-btn-foreground-dark)}:where(.uc-purple){--uc-primary-oklch-light:47% .22 300;--uc-primary-oklch-dark:69% .1768 300}:where(.uc-red){--uc-primary-oklch-light:47% .21 21;--uc-primary-oklch-dark:71% .1768 21}:where(.uc-orange){--uc-primary-oklch-light:47% .1376 51.88;--uc-primary-oklch-dark:69% .1768 51.88}:where(.uc-green){--uc-primary-oklch-light:45% .14 130;--uc-primary-oklch-dark:69% .1768 130}:where(.uc-turquoise){--uc-primary-oklch-light:45% .0854 174;--uc-primary-oklch-dark:69% .1768 174}:where(.uc-gray){--uc-primary-oklch-light:10% 0 0;--uc-primary-oklch-dark:97% 0 0}:where(.uc-contrast){--uc-border-light:oklch(50% 0 0);--uc-border-dark:oklch(50% 0 0);--uc-muted-light:oklch(98% 0 0);--uc-muted-dark:oklch(16% 0 0);--uc-muted-foreground-light:oklch(20% 0 0);--uc-muted-foreground-dark:oklch(80% 0 0);--uc-background-light:oklch(100% 0 0);--uc-foreground-light:oklch(0% 0 0);--uc-background-dark:oklch(10% 0 0);--uc-foreground-dark:oklch(100% 0 0)}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#){--color-primary-accent:var(--uc-primary);--color-text-base:var(--uc-foreground);--color-text-accent-contrast:var(--uc-background);--color-fill-contrast:var(--uc-background);--color-modal-backdrop:oklch(0 0 0/.1);--color-image-background:var(--uc-muted);--color-focus-ring:var(--color-primary-accent);--color-crop-guides:var(--uc-foreground);--font-size-ui:var(--uc-font-size);--size-touch-area:var(--uc-button-size);--size-panel-heading:calc(var(--uc-button-size) + var(--uc-padding)*2);--size-ui-min-width:130px;--size-line-width:1px;--size-modal-width:650px;--size-icon:calc(var(--uc-button-size)/2);--border-radius-editor:var(--uc-radius);--border-radius-thumb:var(--uc-radius);--border-radius-ui:var(--uc-radius);--border-radius-base:var(--uc-radius);--cldtr-gap-min:5px;--cldtr-gap-mid-1:10px;--cldtr-gap-mid-2:15px;--cldtr-gap-max:20px;--transition-duration-2:var(--transition-duration-all,.2s);--transition-duration-3:var(--transition-duration-all,.3s);--transition-duration-4:var(--transition-duration-all,.4s);--transition-duration-5:var(--transition-duration-all,.5s);--modal-header-opacity:1;--modal-header-height:var(--size-panel-heading);--modal-toolbar-height:var(--size-panel-heading);--transparent-pixel:url(${d});display:block;height:100%;max-height:100%;width:100%}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) :is([can-handle-paste]:hover,[can-handle-paste]:focus){--can-handle-paste:"true"}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) :is([tabindex][focus-visible],[tabindex]:hover,[with-effects][focus-visible],[with-effects]:hover){--filter-effect:var(--hover-filter)!important;--opacity-effect:var(--hover-opacity)!important;--color-effect:var(--hover-color-rgb)!important;--background-effect:var(--hover-background)!important}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) :is([tabindex]:active,[with-effects]:active){--filter-effect:var(--down-filter)!important;--opacity-effect:var(--down-opacity)!important;--color-effect:var(--down-color-rgb)!important;--background-effect:var(--down-background)!important}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) :is([tabindex][active],[with-effects][active]){--filter-effect:var(--active-filter)!important;--opacity-effect:var(--active-opacity)!important;--color-effect:var(--active-color-rgb)!important;--background-effect:var(--active-background)!important}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) [hidden-scrollbar]::-webkit-scrollbar{display:none}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) [hidden-scrollbar]{-ms-overflow-style:none;scrollbar-width:none}[uc-cloud-image-editor].uc-editor_ON:not(#\\#):not(#\\#):not(#\\#){--modal-header-opacity:0;--modal-header-height:0px;--modal-toolbar-height:calc(var(--size-panel-heading)*2)}[uc-cloud-image-editor].uc-editor_OFF:not(#\\#):not(#\\#):not(#\\#){--modal-header-opacity:1;--modal-header-height:var(--size-panel-heading);--modal-toolbar-height:var(--size-panel-heading)}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper{--l-min-img-height:var(--modal-toolbar-height);--l-max-img-height:100%;--l-edit-button-width:120px;--l-toolbar-horizontal-padding:var(--cldtr-gap-mid-1);display:grid;grid-template-rows:minmax(var(--l-min-img-height),var(--l-max-img-height)) minmax(var(--modal-toolbar-height),auto);height:100%;overflow:hidden;overflow-y:auto;position:relative}@media only screen and (max-width:800px){[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper{--l-edit-button-width:70px;--l-toolbar-horizontal-padding:var(--cldtr-gap-min)}}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport{align-items:center;display:flex;justify-content:center;overflow:hidden}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image{--viewer-image-opacity:1;background-color:var(--color-image-background);box-sizing:border-box;display:block;height:100%;left:0;object-fit:scale-down;opacity:var(--viewer-image-opacity);pointer-events:auto;position:absolute;top:0;transform:scale(1);user-select:none;width:100%;z-index:10}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image.uc-image_visible_viewer{transition:opacity var(--transition-duration-3) ease-in-out,transform var(--transition-duration-4)}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image.uc-image_hidden_to_cropper{--viewer-image-opacity:0;background-image:var(--transparent-pixel);pointer-events:none;transform:scale(1);transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) step-end}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image.uc-image_hidden_effects{--viewer-image-opacity:0;pointer-events:none;transform:scale(1);transition:opacity var(--transition-duration-3) cubic-bezier(.5,0,1,1),transform var(--transition-duration-4)}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-image_container{background-color:var(--color-image-background);display:block;height:100%;position:relative;transition:var(--transition-duration-3);width:100%}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-toolbar{position:relative;transition:.3s}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-toolbar>.uc-toolbar_content{background-color:var(--color-fill-contrast);bottom:0;box-sizing:border-box;height:var(--modal-toolbar-height);left:0;min-height:var(--size-panel-heading);position:absolute;width:100%}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-toolbar>.uc-toolbar_content.uc-toolbar_content__viewer{align-items:center;display:flex;height:var(--size-panel-heading);justify-content:space-between;padding-left:var(--l-toolbar-horizontal-padding);padding-right:var(--l-toolbar-horizontal-padding)}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-toolbar>.uc-toolbar_content.uc-toolbar_content__editor{display:flex}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-info_pan{position:absolute;user-select:none}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-file_type_outer{display:flex;max-width:120px;position:absolute;transform:translate(-40px);user-select:none;z-index:2}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-viewport>.uc-file_type_outer>.uc-file_type{padding:4px .8em}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-network_problems_splash{background-color:var(--color-fill-contrast);display:flex;flex-direction:column;height:100%;position:absolute;width:100%;z-index:4}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_content{align-items:center;display:flex;flex:1;flex-direction:column;justify-content:center}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_content>.uc-network_problems_icon{align-items:center;background-color:var(--uc-muted);border-radius:50%;color:var(--uc-foreground);display:flex;height:40px;justify-content:center;width:40px}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_content>.uc-network_problems_text{color:var(--uc-foreground);font-size:var(--font-size-ui);margin-top:var(--cldtr-gap-max)}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#)>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_footer{align-items:center;display:flex;height:var(--size-panel-heading);justify-content:center}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#)>.uc-svg{border-top-left-radius:var(--border-radius-base);border-top-right-radius:var(--border-radius-base);height:100%;left:0;opacity:inherit;position:absolute;top:0;transition:var(--transition-duration-3);width:100%;z-index:2}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#)>.uc-thumb{--idle-color-rgb:var(--color-text-base);--hover-color-rgb:var(--color-primary-accent);--focus-color-rgb:var(--color-primary-accent);--down-color-rgb:var(--color-primary-accent);--color-effect:var(--idle-color-rgb);color:var(--color-effect);transition:color var(--transition-duration-3),opacity var(--transition-duration-3)}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-thumb--visible{opacity:1;pointer-events:auto}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-thumb--hidden{opacity:0;pointer-events:none}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-guides{transition:var(--transition-duration-3)}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-guides--hidden{opacity:0}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-guides--semi-hidden{opacity:.2}uc-crop-frame:not(#\\#):not(#\\#):not(#\\#) .uc-guides--visible{opacity:1}uc-editor-aspect-ratio-button-control:not(#\\#):not(#\\#):not(#\\#),uc-editor-button-control:not(#\\#):not(#\\#):not(#\\#),uc-editor-crop-button-control:not(#\\#):not(#\\#):not(#\\#),uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#),uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#),uc-editor-operation-control:not(#\\#):not(#\\#):not(#\\#){--l-base-min-width:var(--uc-button-size);--l-base-height:var(--uc-button-size);--opacity-effect:var(--idle-opacity);--color-effect:var(--idle-color-rgb);--background-effect:var(--idle-background);--filter-effect:var(--idle-filter);--idle-color-rgb:var(--uc-secondary-foreground);--idle-opacity:1;--idle-filter:1;--idle-background:var(--uc-secondary);--hover-color-rgb:var(--uc-secondary-foreground);--hover-opacity:1;--hover-filter:.8;--hover-background:var(--uc-secondary-hover);--down-color-rgb:var(--hover-color-rgb);--down-opacity:1;--down-filter:.6;--down-background:var(--uc-secondary);border-radius:var(--uc-radius)}uc-editor-aspect-ratio-button-control:not(#\\#):not(#\\#):not(#\\#)>button,uc-editor-button-control:not(#\\#):not(#\\#):not(#\\#)>button,uc-editor-crop-button-control:not(#\\#):not(#\\#):not(#\\#)>button,uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>button,uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button,uc-editor-operation-control:not(#\\#):not(#\\#):not(#\\#)>button{all:unset;align-items:center;color:var(--color-effect);cursor:pointer;display:grid;grid-template-columns:var(--l-base-min-width) auto;grid-template-rows:100%;height:var(--l-base-height);opacity:var(--opacity-effect);position:relative;transition:var(--l-width-transition)}uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button{grid-template-columns:auto var(--l-base-min-width)}uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button>uc-icon{margin-left:var(--cldtr-gap-mid-1);width:10px}:where(uc-editor-button-control,uc-editor-crop-button-control,uc-editor-aspect-ratio-button-control,uc-editor-freeform-button-control,uc-editor-filter-control,uc-editor-operation-control):not(#\\#):not(#\\#):not(#\\#)>uc-icon>svg{height:var(--size-icon);width:var(--size-icon)}uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>uc-icon.uc-original-icon>svg{height:100%;width:100%}uc-editor-aspect-ratio-button-control.uc-active:not(#\\#):not(#\\#):not(#\\#),uc-editor-button-control.uc-active:not(#\\#):not(#\\#):not(#\\#),uc-editor-crop-button-control.uc-active:not(#\\#):not(#\\#):not(#\\#),uc-editor-filter-control.uc-active:not(#\\#):not(#\\#):not(#\\#),uc-editor-freeform-button-control.uc-active:not(#\\#):not(#\\#):not(#\\#),uc-editor-operation-control.uc-active:not(#\\#):not(#\\#):not(#\\#){--idle-color-rgb:var(--uc-primary-foreground);--idle-background:var(--uc-primary);--idle-opacity:1;--hover-color-rgb:var(--uc-primary-foreground);--hover-background:var(--uc-primary);--hover-opacity:1}uc-editor-filter-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#) .uc-preview[loaded]{opacity:1}uc-editor-filter-control.uc-active:not(#\\#):not(#\\#):not(#\\#) .uc-preview{opacity:0}uc-editor-aspect-ratio-button-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#),uc-editor-button-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#),uc-editor-crop-button-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#),uc-editor-filter-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#),uc-editor-freeform-button-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#),uc-editor-operation-control.uc-not_active:not(#\\#):not(#\\#):not(#\\#){--idle-color-rgb:var(--uc-secondary-foreground)}:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-aspect-ratio-button-control.uc-not_active,:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-button-control.uc-not_active,:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-crop-button-control.uc-not_active,:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-filter-control.uc-not_active,:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-freeform-button-control.uc-not_active,:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-editor-operation-control.uc-not_active{--idle-background:transparent;--hover-background:var(--uc-secondary);outline:1px solid var(--uc-border);outline-offset:-1px}uc-editor-aspect-ratio-button-control:not(#\\#):not(#\\#):not(#\\#)>button:before,uc-editor-button-control:not(#\\#):not(#\\#):not(#\\#)>button:before,uc-editor-crop-button-control:not(#\\#):not(#\\#):not(#\\#)>button:before,uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>button:before,uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button:before,uc-editor-operation-control:not(#\\#):not(#\\#):not(#\\#)>button:before{background-color:var(--background-effect);border-radius:var(--border-radius-editor);content:"";height:100%;left:0;position:absolute;right:0;transition:var(--transition-duration-3);width:100%;z-index:-1}uc-editor-aspect-ratio-button-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title,uc-editor-button-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title,uc-editor-crop-button-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title,uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title,uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title,uc-editor-operation-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title{font-size:.7em;letter-spacing:1.004px;padding-right:var(--cldtr-gap-mid-1);text-transform:uppercase}uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-title{padding-left:var(--cldtr-gap-mid-1);padding-right:0}uc-editor-aspect-ratio-button-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon,uc-editor-button-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon,uc-editor-crop-button-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon,uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon,uc-editor-freeform-button-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon,uc-editor-operation-control:not(#\\#):not(#\\#):not(#\\#)>button uc-icon{pointer-events:none}uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>button .uc-preview{background-repeat:no-repeat;background-size:contain;border-radius:var(--border-radius-editor);filter:brightness(var(--filter-effect));height:var(--l-base-height);left:0;opacity:0;position:absolute;right:0;transition:var(--transition-duration-3);width:100%;z-index:-1}uc-editor-filter-control:not(#\\#):not(#\\#):not(#\\#)>.uc-original-icon{color:var(--color-effect);opacity:.3}uc-editor-image-cropper:not(#\\#):not(#\\#):not(#\\#){color:var(--color-crop-guides);display:block;height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;touch-action:none;width:100%;z-index:10}uc-editor-image-cropper.uc-active_from_editor:not(#\\#):not(#\\#):not(#\\#),uc-editor-image-cropper.uc-active_from_viewer:not(#\\#):not(#\\#):not(#\\#){opacity:1;pointer-events:auto;transform:scale(1) translate(0);transition:transform var(--transition-duration-4) cubic-bezier(.37,0,.63,1) .4s,opacity var(--transition-duration-3)}uc-editor-image-cropper.uc-inactive_to_editor:not(#\\#):not(#\\#):not(#\\#){opacity:0;pointer-events:none;transition:transform var(--transition-duration-4) cubic-bezier(.37,0,.63,1),opacity var(--transition-duration-3) calc(var(--transition-duration-3) + .05s)}uc-editor-image-cropper:not(#\\#):not(#\\#):not(#\\#)>.uc-canvas{z-index:1}uc-editor-image-cropper:not(#\\#):not(#\\#):not(#\\#)>.uc-canvas,uc-editor-image-fader:not(#\\#):not(#\\#):not(#\\#){display:block;height:100%;left:0;position:absolute;top:0;width:100%}uc-editor-image-fader.uc-active_from_viewer:not(#\\#):not(#\\#):not(#\\#){opacity:1;pointer-events:auto;transform:scale(1);transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) step-start;z-index:3}uc-editor-image-fader.uc-active_from_cropper:not(#\\#):not(#\\#):not(#\\#){opacity:1;pointer-events:auto;transform:scale(1);transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) step-end;z-index:3}uc-editor-image-fader.uc-inactive_to_cropper:not(#\\#):not(#\\#):not(#\\#){opacity:0;pointer-events:none;transform:scale(1);transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) step-end;z-index:3}uc-editor-image-fader:not(#\\#):not(#\\#):not(#\\#) .uc-fader-image{content-visibility:auto;display:block;height:100%;left:0;object-fit:scale-down;position:absolute;top:0;transform:scale(1);user-select:none;width:100%}uc-editor-image-fader:not(#\\#):not(#\\#):not(#\\#) .uc-fader-image--preview{background-color:var(--color-image-background);border-top-left-radius:var(--border-radius-base);border-top-right-radius:var(--border-radius-base);opacity:0;transform:scale(1);transition:var(--transition-duration-3)}uc-editor-scroller:not(#\\#):not(#\\#):not(#\\#){align-items:center;display:flex;height:100%;overflow-x:scroll;width:100%}uc-editor-slider:not(#\\#):not(#\\#):not(#\\#){align-items:center;display:flex;height:var(--size-panel-heading);justify-content:center;width:100%}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#){height:100%;position:relative;width:100%}@media only screen and (max-width:600px){uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#){--l-tab-gap:var(--cldtr-gap-mid-1);--l-slider-padding:var(--uc-padding);--l-controls-padding:var(--uc-padding)}}@media only screen and (min-width:601px){uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#){--l-tab-gap:var(--cldtr-gap-max);--l-slider-padding:var(--uc-padding);--l-controls-padding:var(--uc-padding)}}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container{height:100%;overflow:hidden;position:relative;width:100%}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar{background-color:var(--color-fill-contrast);display:grid;grid-template-rows:1fr 1fr;height:100%;position:absolute;transition:opacity var(--transition-duration-3) ease-in-out,transform var(--transition-duration-3) ease-in-out,visibility var(--transition-duration-3) ease-in-out;width:100%}.uc-sub-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-list-aspect-ratio-container>.uc-list-aspect-ratio{align-items:center;display:grid;gap:6px;grid-auto-flow:column;height:var(--size-panel-heading);justify-content:center}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar.uc-sub-toolbar--visible{opacity:1;pointer-events:auto;transform:translateY(0)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar.uc-sub-toolbar--top-hidden{opacity:0;pointer-events:none;transform:translateY(100%)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar.uc-sub-toolbar--bottom-hidden{opacity:0;pointer-events:none;transform:translateY(-100%)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row{align-items:center;display:flex;justify-content:space-between;padding-left:var(--l-controls-padding);padding-right:var(--l-controls-padding)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles{display:grid;grid-auto-flow:column;position:relative;grid-gap:0 var(--l-tab-gap);align-items:center;height:100%}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggles_indicator{background-color:var(--uc-secondary-foreground);bottom:0;height:2px;left:0;position:absolute;transform:translate(0);transition:transform var(--transition-duration-3);width:var(--size-touch-area)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row{position:relative}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content{content-visibility:auto;display:flex;height:100%;left:0;opacity:0;overflow:hidden;position:absolute;top:0;width:100%}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content.uc-tab-content--visible{opacity:1;pointer-events:auto}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content.uc-tab-content--hidden{opacity:0;pointer-events:none}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle.uc-tab-toggle--visible{display:contents}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles.uc-tab-toggles--hidden,uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle.uc-tab-toggle--hidden{display:none}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle>uc-btn-ui{width:var(--uc-button-size)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle>uc-btn-ui>uc-icon>svg{height:var(--size-icon);width:var(--size-icon)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content .uc-controls-list_align{box-sizing:border-box;display:grid;grid-template-areas:". inner .";grid-template-columns:1fr auto 1fr;min-width:100%;padding-left:var(--uc-padding)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content .uc-controls-list_inner{display:grid;gap:6px;grid-area:inner;grid-auto-flow:column}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#)>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content .uc-controls-list_inner:last-child{padding-right:var(--uc-padding)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-controls-list_last-item{margin-right:var(--cldtr-gap-max)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-info-tooltip_container{align-items:flex-start;display:flex;height:100%;justify-content:center;position:absolute;width:100%}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-info-tooltip_wrapper{display:flex;flex-direction:column;height:100%;justify-content:flex-end;pointer-events:none;position:absolute;top:calc(-100% - var(--cldtr-gap-mid-2))}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-info-tooltip{background-color:var(--color-text-accent-contrast);border-radius:var(--border-radius-editor);color:var(--color-text-base);font-size:.7em;letter-spacing:1px;opacity:0;padding:3px 6px;text-transform:uppercase;transform:translateY(100%);transition:var(--transition-duration-3);z-index:3}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-info-tooltip_visible{opacity:1;transform:translateY(0)}uc-editor-toolbar:not(#\\#):not(#\\#):not(#\\#) .uc-slider{padding-left:var(--l-slider-padding);padding-right:var(--l-slider-padding)}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#)>button{--filter-effect:var(--idle-brightness);--opacity-effect:var(--idle-opacity);--color-effect:var(--idle-color-rgb);--background-effect:var(--idle-background);--l-transition-effect:var( --css-transition,color var(--transition-duration-2),background-color var(--transition-duration-2),filter var(--transition-duration-2) );all:unset;align-items:center;background-color:var(--background-effect);border-radius:var(--uc-radius);box-sizing:var(--css-box-sizing,border-box);color:var(--color-effect);cursor:pointer;display:inline-flex;filter:brightness(var(--filter-effect));font-size:1em;height:var(--css-height,var(--uc-button-size));opacity:var(--opacity-effect);padding-left:var(--css-padding-left,14px);padding-right:var(--css-padding-right,14px);transition:var(--l-transition-effect);user-select:none}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#)>button>uc-icon{pointer-events:none}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-text{white-space:nowrap}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-icon{align-items:center;color:var(--color-effect);display:flex;filter:brightness(var(--filter-effect));justify-content:center;transition:var(--l-transition-effect)}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-icon_left{margin-left:0;margin-right:var(--cldtr-gap-mid-1)}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-icon_right{margin-left:var(--cldtr-gap-mid-1);margin-right:0}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-icon_single{margin-left:0;margin-right:0}uc-btn-ui:not(#\\#):not(#\\#):not(#\\#) .uc-icon_hidden{display:none;margin:0}uc-btn-ui.uc-primary:not(#\\#):not(#\\#):not(#\\#)>button{--idle-color-rgb:var(--uc-primary-foreground);--idle-brightness:1;--idle-opacity:1;--idle-background:var(--uc-primary);--hover-color-rgb:var(--uc-primary-foreground);--hover-brightness:1;--hover-opacity:1;--hover-background:var(--uc-primary-hover);--down-color-rgb:var(--uc-primary-foreground);--down-brightness:.75;--down-opacity:1;--down-background:var(--uc-primary);--active-color-rgb:var(--uc-primary-foreground);--active-brightness:1;--active-opacity:1;--active-background:var(--uc-primary)}uc-btn-ui.uc-primary-icon:not(#\\#):not(#\\#):not(#\\#)>button{--idle-color-rgb:var(--uc-primary);--idle-brightness:1;--idle-opacity:1;--idle-background:transparent;--hover-color-rgb:var(--uc-primary);--hover-brightness:1;--hover-opacity:1;--hover-background:var(--uc-primary-transparent);--down-color-rgb:var(--uc-primary);--down-brightness:.75;--down-opacity:1;--down-background:var(--uc-primary-transparent);--active-color-rgb:var(--uc-primary-foreground);--active-brightness:1;--active-opacity:1;--active-background:var(--uc-primary);padding:0;width:var(--uc-button-size)}uc-btn-ui.uc-secondary:not(#\\#):not(#\\#):not(#\\#)>button{--idle-color-rgb:var(--uc-secondary-foreground);--idle-brightness:1;--idle-opacity:1;--idle-background:var(--uc-secondary);--hover-color-rgb:var(--uc-secondary-foreground);--hover-brightness:1;--hover-opacity:1;--hover-background:var(--uc-secondary-hover);--down-color-rgb:var(--uc-secondary-foreground);--down-brightness:1;--down-opacity:1;--down-background:var(--uc-secondary-hover);--active-color-rgb:var(--uc-secondary-foreground);--active-brightness:1;--active-opacity:1;--active-background:transparent}:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-btn-ui.uc-secondary>button{border:1px solid var(--uc-border)}uc-btn-ui.uc-secondary-icon:not(#\\#):not(#\\#):not(#\\#)>button,uc-btn-ui.uc-tab:not(#\\#):not(#\\#):not(#\\#)>button{--idle-color-rgb:var(--uc-secondary-foreground);--idle-brightness:1;--idle-opacity:1;--idle-background:transparent;--hover-color-rgb:var(--uc-secondary-foreground);--hover-brightness:1;--hover-opacity:1;--hover-background:var(--uc-secondary);--down-color-rgb:var(--uc-secondary-foreground);--down-brightness:1;--down-opacity:1;--down-background:var(--uc-secondary);--active-color-rgb:var(--uc-secondary-foreground);--active-brightness:1;--active-opacity:1;--active-background:transparent;padding:0;width:var(--uc-button-size)}uc-btn-ui.uc-default:not(#\\#):not(#\\#):not(#\\#)>button{--idle-color-rgb:var(--uc-secondary-foreground);--idle-brightness:1;--idle-opacity:1;--idle-background:var(--uc-secondary);--hover-color-rgb:var(--uc-secondary-foreground);--hover-brightness:1;--hover-opacity:1;--hover-background:var(--uc-secondary-hover);--down-color-rgb:var(--uc-secondary-foreground);--down-brightness:.75;--down-opacity:1;--down-background:var(--uc-secondary);--active-color-rgb:var(--uc-primary);--active-brightness:1;--active-opacity:1;--active-background:var(--uc-primary-transparent)}:where(.uc-contrast):not(#\\#):not(#\\#):not(#\\#) uc-btn-ui.uc-default>button{--idle-background:transparent;--hover-background:var(--uc-secondary);--active-background:var(--uc-foreground);--active-color-rgb:var(--uc-background)}uc-line-loader-ui:not(#\\#):not(#\\#):not(#\\#){height:2px;left:0;opacity:.5;position:absolute;top:0;width:100%;z-index:9999}uc-line-loader-ui:not(#\\#):not(#\\#):not(#\\#) .uc-inner{height:100%;max-width:200px;width:25%}uc-line-loader-ui:not(#\\#):not(#\\#):not(#\\#) .uc-line{background-color:var(--uc-primary);height:100%;transform:translate(-101%);transition:transform 1s;width:100%}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#){--l-thumb-size:24px;--l-zero-dot-size:5px;--l-zero-dot-offset:2px;--idle-color-rgb:var(--uc-foreground);--hover-color-rgb:var(--uc-primary);--down-color-rgb:var(--uc-primary);--color-effect:var(--idle-color-rgb);--l-color:var(--color-effect);align-items:center;display:flex;height:calc(var(--l-thumb-size) + (var(--l-zero-dot-size) + var(--l-zero-dot-offset))*2);justify-content:center;position:relative;width:100%}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-thumb{background-color:var(--l-color);border-radius:50%;height:var(--l-thumb-size);left:0;opacity:1;position:absolute;transform:translate(0);transition:opacity var(--transition-duration-2),background-color var(--transition-duration-2);width:var(--l-thumb-size)}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-steps{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding-left:calc(var(--l-thumb-size)/2);padding-right:calc(var(--l-thumb-size)/2);position:absolute;width:100%}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-border-step{border-right:1px solid var(--uc-foreground);height:10px;opacity:1;transition:border-color var(--transition-duration-2);width:0}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-minor-step{border-right:1px solid var(--uc-foreground);height:4px;opacity:.6;transition:border-color var(--transition-duration-2);width:0}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-zero-dot{background-color:var(--color-primary-accent);border-radius:50%;height:var(--l-zero-dot-size);left:calc(var(--l-thumb-size)/2 - var(--l-zero-dot-size)/2);opacity:0;position:absolute;top:calc(100% - var(--l-zero-dot-offset)*2);transition:var(--transition-duration-3);width:var(--l-zero-dot-size)}uc-slider-ui:not(#\\#):not(#\\#):not(#\\#) .uc-input{cursor:pointer;height:100%;margin:0;opacity:0;position:absolute;width:calc(100% - 10px)}uc-presence-toggle.uc-transition:not(#\\#):not(#\\#):not(#\\#){transition:opacity var(--transition-duration-3),visibility var(--transition-duration-3)}uc-presence-toggle.uc-visible:not(#\\#):not(#\\#):not(#\\#){opacity:1;pointer-events:inherit}uc-presence-toggle.uc-hidden:not(#\\#):not(#\\#):not(#\\#){opacity:0;pointer-events:none}uc-presence-toggle.uc-initial:not(#\\#):not(#\\#):not(#\\#){display:none!important;transition:none!important}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) [role=button]:focus-visible,[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) button:focus-visible{outline:1px auto Highlight;outline:1px auto -webkit-focus-ring-color}[uc-cloud-image-editor]:not(#\\#):not(#\\#):not(#\\#) .uc-cloud-mask{pointer-events:none}[uc-aspect-ratio-freeform]:not(#\\#):not(#\\#):not(#\\#) button{display:flex}[uc-aspect-ratio-freeform]:not(#\\#):not(#\\#):not(#\\#) uc-icon{display:none}[uc-aspect-ratio-freeform]:not(#\\#):not(#\\#):not(#\\#) .uc-title{padding-left:var(--cldtr-gap-mid-1)}:where(uc-editor-freeform-button-control,uc-editor-aspect-ratio-button-control:last-of-type):not(#\\#):not(#\\#):not(#\\#){margin-right:calc(var(--cldtr-gap-mid-1)*3)}:where([uc-cloud-image-editor]):not(#\\#):not(#\\#):not(#\\#) uc-icon{display:flex;height:100%;justify-content:center;width:100%}:where([uc-cloud-image-editor]):not(#\\#):not(#\\#):not(#\\#) uc-icon svg{height:calc(var(--uc-button-size)/2);width:calc(var(--uc-button-size)/2)}uc-config:not(#\\#){display:none}uc-icon:not(#\\#){align-items:center;display:inline-flex;height:var(--uc-button-size);justify-content:center;width:var(--uc-button-size)}uc-icon:not(#\\#) svg{height:calc(var(--uc-button-size)/2);overflow:visible;width:calc(var(--uc-button-size)/2)}`,""]);const h=u}},e={};function r(o){var i=e[o];if(void 0!==i)return i.exports;var n=e[o]={id:o,exports:{}};return t[o](n,n.exports,r),n.exports}r.m=t,r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.b="undefined"!=typeof document&&document.baseURI||self.location.href;var o={};(()=>{"use strict";r.r(o),r.d(o,{Uploadcare:()=>xc,UploadcareCommand:()=>nt,UploadcareEditing:()=>be,UploadcareImageEdit:()=>Jc,UploadcareImageEditCommand:()=>Nc,UploadcareImageEditEditing:()=>qc,UploadcareImageEditUI:()=>Wc,UploadcareUI:()=>$,UploadcareUploadAdapter:()=>he});var t={};r.r(t),r.d(t,{ActivityBlock:()=>tn,ActivityHeader:()=>ua,BaseComponent:()=>Ne,Block:()=>Yi,BtnUi:()=>ja,CameraSource:()=>fa,CloudImageEditor:()=>mc,CloudImageEditorActivity:()=>Xa,CloudImageEditorBlock:()=>ka,Config:()=>bs,Copyright:()=>vs,CropFrame:()=>xa,Data:()=>we,DropArea:()=>As,EditorAspectRatioButtonControl:()=>Ta,EditorCropButtonControl:()=>Aa,EditorFilterControl:()=>Oa,EditorFreeformButtonControl:()=>Ea,EditorImageCropper:()=>Pa,EditorImageFader:()=>Da,EditorOperationControl:()=>Fa,EditorScroller:()=>Va,EditorSlider:()=>$a,EditorToolbar:()=>Ba,ExternalSource:()=>Ns,ExternalUploadSource:()=>wn,FileItem:()=>Vs,FileUploaderInline:()=>fc,FileUploaderMinimal:()=>vc,FileUploaderRegular:()=>yc,FormInput:()=>Bs,Icon:()=>js,Img:()=>Js,LineLoaderUi:()=>Ha,Modal:()=>tc,ModalEvents:()=>Hi,PACKAGE_NAME:()=>Ki,PACKAGE_VERSION:()=>Gi,PresenceToggle:()=>Wa,ProgressBar:()=>ec,ProgressBarCommon:()=>rc,Select:()=>oc,SimpleBtn:()=>ic,SliderUi:()=>Za,SolutionBlock:()=>nn,SourceBtn:()=>nc,SourceList:()=>ac,Spinner:()=>sc,StartFrom:()=>cc,Thumb:()=>dc,UID:()=>xe,UploadCtxProvider:()=>hc,UploadList:()=>pc,UploadSource:()=>kn,UploaderBlock:()=>la,UrlSource:()=>gc,defineComponents:()=>en,defineLocale:()=>Ni,loadFileUploaderFrom:()=>on,toKebabCase:()=>Ya});var e,i,n,a=r(782),s=r(355),c=r(311);function l(){var t=["118mrIGzn","68VgUBRm","Dropbox","gphotos","Facebook","219957PKpWsi","facebook","13712GIHlsV","19963rgtKRx","1356790MfYlOk","url","local","GDrive","11892735ipVHLS","2597OjOKDx","OneDrive","1827600IdtKNX","onedrive","URL","gdrive","10134750QduOVf","dropbox","GPhotos","Local"];return(l=function(){return t})()}function u(t,e){var r=l();return(u=function(t,e){return r[t-=308]})(t,e)}function d(t,r,o){const i=t.t,n=t.t;switch(r){case e.Local:return{text:n("Insert"===o?"Upload from computer":"Replace from computer"),shortText:n("From computer")};case e.URL:return{text:"Insert"===o?n("Insert via URL"):i("Replace via URL"),shortText:n("Via URL")};case e.Dropbox:return{text:i("Insert"===o?"Insert with Dropbox":"Replace with Dropbox"),shortText:i("With Dropbox")};case e.Facebook:return{text:i("Insert"===o?"Insert with Facebook":"Replace with Facebook"),shortText:i("With Facebook")};case e.GDrive:return{text:i("Insert"===o?"Insert with Google Drive":"Replace with Google Drive"),shortText:i("With Google Drive")};case e.GPhotos:return{text:i("Insert"===o?"Insert with Google Photos":"Replace with Google Photos"),shortText:i("With Google Photos")};case e.OneDrive:return{text:i("Insert"===o?"Insert with OneDrive":"Replace with OneDrive"),shortText:i("With OneDrive")};default:return r}}!function(t){for(var e=u,r=t();;)try{if(966518===parseInt(e(329))/1*(parseInt(e(321))/2)+parseInt(e(326))/3*(parseInt(e(322))/4)+-parseInt(e(330))/5+-parseInt(e(317))/6+parseInt(e(311))/7*(-parseInt(e(328))/8)+parseInt(e(310))/9+-parseInt(e(313))/10)break;r.push(r.shift())}catch(t){r.push(r.shift())}}(l),(i=e||(e={}))[(n=u)(320)]=n(308),i[n(315)]=n(331),i[n(323)]=n(318),i[n(309)]=n(316),i[n(325)]=n(327),i[n(319)]=n(324),i[n(312)]=n(314);var h=r(929),p=r.n(h),g=r(297),m=r.n(g),f=r(102),b=r.n(f),v=r(123),y=r.n(v),w=r(741),_=r.n(w),k=r(621),x={attributes:{"data-cke":!0}};x.setAttributes=y(),x.insert=b().bind(null,"head"),x.domAPI=m(),x.insertStyleElement=_();p()(k.A,x);k.A&&k.A.locals&&k.A.locals;var C=r(387),E={attributes:{"data-cke":!0}};E.setAttributes=y(),E.insert=b().bind(null,"head"),E.domAPI=m(),E.insertStyleElement=_();p()(C.A,E);C.A&&C.A.locals&&C.A.locals;var T=r(184),A={attributes:{"data-cke":!0}};A.setAttributes=y(),A.insert=b().bind(null,"head"),A.domAPI=m(),A.insertStyleElement=_();p()(T.A,A);T.A&&T.A.locals&&T.A.locals;function I(){const t=["Dropbox","uploadcareLicenseKeyDomainLimit","get","config","entries","icon","_normalizeConfigSourceList","plugins","forEach","expired","Uploadcare","trialLimit","GDrive","_createDropdownButtons","usageLimit","565548pHwANJ","_getIntegrationKey","destroy","evaluationLimit","tooltip","208AXNLth","uploadcareLicenseKeyExpired","OneDrive","isEnabled","label","Replace","push","uploadcareLicenseKeyUsageLimit","type","upload","_createToolbarButton","execute","editor","uploadcareLicenseKeyEvaluationLimit","uploadcareLicenseKeyTrialLimit","uploadcareLicenseKeyValid","_licenseKeyCheckInterval","map","_createMenuBarButtons","uploadcare","commands","uploadcareLicenseKeyInvalid","text","159934xlSILm","featureNotAllowed","isImageSelected","afterInit","assetManager","2373178UjGTxo","Facebook","285472wFWlzt","locale","_createButton","_showLicenseError","bind","url","UploadcareUI","GPhotos","uploadcareLicenseKeyNotAllowed","isPremiumPlugin","shortText","invalid","registerIntegration","has","Local","uploadcare.uploader.sourceList","4314860VvaWWB","licenseKey","11113109WZpfGj","init","614304QfsKvm","isOfficialPlugin","domainLimit","Insert","withText","ImageInsertUI","3OFSWOh","URL","pluginName","reduce"];return(I=function(){return t})()}const S=M;function M(t,e){const r=I();return(M=function(t,e){return r[t-=151]})(t,e)}!function(t){const e=M,r=t();for(;;)try{if(987122===-parseInt(e(164))/1+-parseInt(e(169))/2*(parseInt(e(197))/3)+-parseInt(e(171))/4+-parseInt(e(187))/5+-parseInt(e(216))/6+parseInt(e(189))/7+-parseInt(e(221))/8*(-parseInt(e(191))/9))break;r.push(r.shift())}catch(t){r.push(r.shift())}}(I);class $ extends a.Plugin{[S(188)];[S(157)];static get[S(199)](){return S(177)}static get[S(192)](){return!0}static get[S(180)](){return!0}[S(190)](){const t=S;this[t(188)]=this[t(153)][t(204)][t(203)](t(188));const e=this[t(153)];this[t(157)]=setInterval(()=>{const r=t;let o;for(const t in e){const i=t,n=e[i];if(r(156)==n||r(162)==n||r(222)==n||r(202)==n||r(179)==n||r(154)==n||r(155)==n||r(228)==n){delete e[i],o=n,clearInterval(this[r(157)]),this[r(157)]=void 0;break}}r(162)==o&&e[r(174)](r(182)),r(222)==o&&e[r(174)](r(210)),r(202)==o&&e[r(174)](r(193)),r(179)==o&&e[r(174)](r(165),r(211)),r(154)==o&&e[r(174)](r(219)),r(155)==o&&e[r(174)](r(212)),r(228)==o&&e[r(174)](r(215))},1e3)}[S(167)](){const t=S,{editor:e}=this,r=e[t(161)][t(203)](t(160));if(!r)return;const o=this[t(207)](e[t(204)][t(203)](t(186)))[t(200)]((e,r)=>{const o=t,i=this[o(217)](r[o(229)]);return e[i]||(e[i]=[]),e[i][o(227)](r),e},{});e[t(208)][t(184)](t(196))&&e[t(161)][t(203)](t(160))&&Object[t(205)](o)[t(209)](([o,i])=>{const n=t;e[n(208)][n(203)](n(196))[n(183)]({name:o,observable:()=>r,buttonViewCreator:()=>this[n(151)](i),formViewCreator:()=>this[n(214)](i),menuBarButtonViewCreator:()=>this[n(159)](i),override:n(168)!==o})})}[S(218)](){const t=S;super[t(218)](),this[t(157)]&&clearInterval(this[t(157)])}[S(207)](t){const r=S,{locale:o}=this[r(153)];return t[r(158)](t=>{const i=r,n=d(o,t,i(194));switch(t){case e[i(185)]:return{icon:s.IconUploadcareImageUpload,type:e[i(185)],...n};case e[i(198)]:return{icon:s.IconUploadcareLink,type:e[i(198)],...n};case e[i(201)]:return{icon:s.IconDropbox,type:e[i(201)],...n};case e[i(170)]:return{icon:s.IconFacebook,type:e[i(170)],...n};case e[i(213)]:return{icon:s.IconGoogleDrive,type:e[i(213)],...n};case e[i(178)]:return{icon:s.IconGooglePhotos,type:e[i(178)],...n};case e[i(223)]:return{icon:s.IconOneDrive,type:e[i(223)],...n}}})}[S(217)](t){const r=S;switch(t){case e[r(185)]:return r(230);case e[r(198)]:return r(176);default:return r(168)}}[S(173)](t,e){const r=S,o=this[r(153)],i=new t(o[r(172)]),n=o[r(161)][r(203)](r(160));return i[r(175)](r(224)).to(n),i.on(r(152),()=>{n[r(152)](e)}),i}[S(151)](t){const e=S,{locale:r}=this[e(153)],o=this[e(153)][e(208)][e(203)](e(196)),i=t[0],n=this[e(173)](c.ButtonView,i[e(229)]);return n[e(206)]=i[e(206)],n[e(175)](e(225)).to(o,e(166),t=>d(r,i[e(229)],e(t?226:194))[e(163)]),n[e(220)]=!0,n}[S(214)](t){const e=S,{locale:r}=this[e(153)],o=this[e(153)][e(208)][e(203)](e(196));return t[e(158)](t=>{const i=e,n=this[i(173)](c.ButtonView,t[i(229)]);return n[i(195)]=!0,n[i(206)]=t[i(206)],n[i(175)](i(225)).to(o,i(166),e=>d(r,t[i(229)],i(e?226:194))[i(163)]),n})}[S(159)](t){const e=S;return t[e(158)](t=>{const r=e,o=this[r(173)](c.MenuBarMenuListItemButtonView,t[r(229)]);return o[r(206)]=t[r(206)],o[r(225)]=t[r(181)],o})}}var L=r(584),O=r(908),U={attributes:{"data-cke":!0}};U.setAttributes=y(),U.insert=b().bind(null,"head"),U.domAPI=m(),U.insertStyleElement=_();p()(O.A,U);O.A&&O.A.locals&&O.A.locals;function R(t,e){var r=N();return(R=function(t,e){return r[t-=152]})(t,e)}var P=R;function N(){var t=["true","createCollection","1451285fsUuwU","746599UojWll","bindTemplate","div","4610804eljDuR","focusTracker","2014336DXvWHC","getFocusableElement","focusCycler","639978ZbJIPD","64053ypiQKo","fire","4supPFW","12fpvxid","16700VvzzoS","1DoAScm","711uHzZma","forwardCycle"];return(N=function(){return t})()}!function(t){for(var e=R,r=t();;)try{if(186253===parseInt(e(171))/1*(parseInt(e(165))/2)+-parseInt(e(166))/3+parseInt(e(168))/4*(-parseInt(e(156))/5)+-parseInt(e(169))/6*(-parseInt(e(157))/7)+parseInt(e(162))/8+parseInt(e(152))/9*(parseInt(e(170))/10)+-parseInt(e(160))/11)break;r.push(r.shift())}catch(t){r.push(r.shift())}}(N);class z extends c.View{[P(161)];[P(164)];constructor(t){var e=P;super(t),this[e(161)]=new L.FocusTracker,this[e(164)]=new c.FocusCycler({focusables:this[e(155)](),focusTracker:this[e(161)]})}[P(163)](){var t=P;return{tag:t(159),attributes:{"aria-hidden":t(154),tabindex:"0"},on:{focus:this[t(158)].to(()=>{var e=t;this[e(164)][e(167)](e(153))})}}}}var D=F;function F(t,e){var r=B();return(F=function(t,e){return r[t-=121]})(t,e)}!function(t){for(var e=F,r=t();;)try{if(621905===parseInt(e(123))/1*(-parseInt(e(125))/2)+-parseInt(e(122))/3*(-parseInt(e(128))/4)+parseInt(e(131))/5+-parseInt(e(138))/6+-parseInt(e(121))/7*(-parseInt(e(129))/8)+parseInt(e(141))/9+-parseInt(e(137))/10)break;r.push(r.shift())}catch(t){r.push(r.shift())}}(B);class V extends z{constructor(t,e){var r=F;super(t),this[r(127)]({tag:r(134),attributes:{class:["ck",r(130),r(133)],tabindex:"-1"},children:[{tag:r(126),attributes:{class:[r(139),r(132)],"ctx-name":r(135)+e}},this[r(140)]()]})}[D(124)](){var t=D;this[t(136)][t(124)]()}}function B(){var t=["div","uploader-","element","12538830sZgYtw","754434rnfYuZ","uc-light","getFocusableElement","5536098acUSsN","147JWSAfc","258EyYwTt","5qbeFxc","focus","68294newHHt","uc-file-uploader-inline","setTemplate","14036wafzVn","228936tHGURP","ck-reset_all-excluded","3272045kunwSP","ck-uploadcare-theme","ck-uploadcare-form"];return(B=function(){return t})()}function j(){const t=["change","baseURI","toViewElement","aspect-ratio","imageBlock","get","location","origin","(max-width: ","map","x/ ","editing","listenTo","view","400AOrQLt","isArray","plugins","element","2OjiifB","setStyle","domConverter","ImageUtils","image/webp","mapper","16855UyFafv","width","removeStyle","958705KTJbEJ","filter","uploadcareImageId","load","5978584nTJHZU","match","document","2410366NozKOM","hasAttribute","viewToDom","removeClass","findViewImgElement","24AusRfi","px) 100vw, ","imageInline","192886sdiuns","function","image-processing","242409qJBLaq","/-/resize/","height","replace","stopListening","window","7665336nqQNPs","src","some","join","getAttribute","528nszKZA","addClass"];return(j=function(){return t})()}function H(t,e){const r=j();return(H=function(t,e){return r[t-=332]})(t,e)}function q(t,e){const r=H,o=[320,480,768,1024,1200,1600,1920,2400][r(334)](t=>t<=e)[r(373)](e=>t[r(354)](/\/$/,"")+r(352)+e+r(374)+e+"w");return{imageFallbackUrl:t,imageSources:[{srcset:o[r(360)](", "),sizes:r(372)+e+r(346)+e+"px",type:r(386)}]}}function K(t,e,r){const o=t[H(338)](/\/crop\/(\d+)x(\d+)\//);return{width:o?parseInt(o[1],10):e,height:o?parseInt(o[2],10):r}}function G(t,e){const r=H,o=new((0,L.DomEmitterMixin)()),i=t[r(380)][r(369)](r(385)),n=t[r(375)][r(387)][r(366)](e),a=i[r(344)](n),s=t[r(375)][r(377)][r(384)][r(342)](a),c=e[r(361)](r(389)),l=e[r(361)](r(353)),u=r(350);t[r(375)][r(377)][r(364)](t=>{const e=r;t[e(363)](u,n),t[e(383)](e(367),c+"/"+l,a)}),o[r(376)](s,r(336),()=>{const e=r;o[e(355)](s,e(336)),t[e(375)][e(377)][e(364)](t=>{const r=e;t[r(343)](u,n),t[r(332)](r(367),a)})})}function W(t){const e=H;if(Array[e(379)](t)){const r=t[e(373)](W);return t=>r[e(359)](e=>e(t))}if(e(371)==t){const t=L.global[e(356)][e(370)][e(371)];return r=>new URL(r,L.global[e(339)][e(365)])[e(371)]==t}return e(349)==typeof t?t:t instanceof RegExp?r=>!(!r[e(338)](t)&&!r[e(354)](/^https?:\/\//,"")[e(338)](t)):()=>!1}function Z(){var t=["target","2jMrDTL","48979600Ivzofi","2632ijkJKK","includes","816591FUnRok","4519572sduetU","11464173rUsqnS","3107031pRguLO","27784LoGYvi","4dOIClS","7134650mYTHbW"];return(Z=function(){return t})()}function X(t,e){var r=Z();return(X=function(t,e){return r[t-=425]})(t,e)}function Y(t,e){var r=X;return(0,L.getAncestors)(t[r(435)])[r(427)](e)}!function(t){const e=H,r=t();for(;;)try{if(568483===parseInt(e(348))/1*(-parseInt(e(382))/2)+-parseInt(e(351))/3*(parseInt(e(345))/4)+-parseInt(e(388))/5*(parseInt(e(362))/6)+-parseInt(e(340))/7+-parseInt(e(337))/8+-parseInt(e(357))/9+parseInt(e(378))/10*(parseInt(e(333))/11))break;r.push(r.shift())}catch(t){r.push(r.shift())}}(j),function(t){for(var e=X,r=t();;)try{if(833449===-parseInt(e(428))/1*(parseInt(e(436))/2)+parseInt(e(431))/3*(-parseInt(e(433))/4)+-parseInt(e(434))/5+-parseInt(e(429))/6+parseInt(e(426))/7*(-parseInt(e(432))/8)+parseInt(e(430))/9+parseInt(e(425))/10)break;r.push(r.shift())}catch(t){r.push(r.shift())}}(Z);const J=Q;function Q(t,e){const r=tt();return(Q=function(t,e){return r[t-=267]})(t,e)}function tt(){const t=["_initDialog","stopListening","5447190EfSbSd","length","Local","imageInfo","removeAllFiles","78832PrTyGi","162DsyyjN","80645NKBlsP","plugins","get","Insert","setSelection","image","done-click","getSelectedElement","595491kjsUsG","editing","model","_initListeners","removeSelectionAttribute","12RfBFzU","_editing","_insertImage","view","138tRvUsQ","detail","isOpen","getLastPosition","change","hide","element","_insertAsset","uploadCare","ctxElement","imageInline","width","setAttribute","424254HhQVnG","destroy","execute","_api","imageBlock","_formView","show","3111832oRYkHT","ucContextId","selection","getAPI","_dialog","_editor","_type","getOutputCollectionState","source-list","33qYUlrp","status","uuid","309211zkpsrs","attributes","document","EDITOR_TOP_CENTER","configElement","insertImage","initFlow","Replace","linkHref","addEventListener","setCurrentActivity","allEntries","text","stopDelegating","focus","idle","doneFlow"];return(tt=function(){return t})()}!function(t){const e=Q,r=t();for(;;)try{if(516704===-parseInt(e(275))/1+-parseInt(e(280))/2*(-parseInt(e(297))/3)+-parseInt(e(304))/4+parseInt(e(267))/5*(-parseInt(e(284))/6)+-parseInt(e(316))/7+parseInt(e(340))/8*(-parseInt(e(341))/9)+parseInt(e(335))/10*(parseInt(e(313))/11))break;r.push(r.shift())}catch(t){r.push(r.shift())}}(tt);class et extends((0,L.ObservableMixin)()){[J(309)];[J(308)];[J(281)];[J(300)];[J(310)]=null;[J(302)]=null;constructor(t,e,r){const o=J;super(),this[o(309)]=t,this[o(281)]=e,this[o(308)]=t[o(268)][o(269)](c.Dialog),this[o(300)]=e[o(293)][o(307)](),this[o(310)]=r,this[o(281)][o(320)][o(296)](o(312),this[o(310)]),this[o(333)](),this[o(278)](),this[o(300)][o(322)]()}[J(298)](){const t=J;this[t(302)]&&(this[t(302)][t(298)](),this[t(302)]=null),this[t(300)]&&this[t(300)][t(332)](),this[t(334)](),this[t(329)]()}[J(333)](){const t=J,{locale:e,model:r}=this[t(309)],o=r[t(318)][t(306)][t(274)](),i=o&&(o.is(t(290),t(301))||o.is(t(290),t(294)));this[t(302)]=new V(e,this[t(281)][t(305)]),this[t(308)][t(303)]({id:t(292),icon:s.IconUploadcareImageUpload,title:d(e,this[t(310)],t(i?323:270))[t(328)],content:this[t(302)],position:c.DialogViewPosition[t(319)],isModal:!0,onShow:()=>{const e=t;this[e(302)][e(330)]()},onHide:()=>{const e=t;this[e(300)][e(339)](),this[e(309)][e(276)][e(283)][e(330)](),this[e(298)]()},keystrokeHandlerOptions:{filter:e=>!Y(e,this[t(302)][t(290)])}})}[J(278)](){const t=J;this[t(281)][t(293)][t(325)](t(273),()=>{const e=t,{allEntries:r}=this[e(300)][e(311)]();this[e(309)][e(277)][e(288)](t=>{const o=e,i=r[o(336)];for(const e of r){const n=e===r[i-1],{cdnUrl:a,fileInfo:s}=e;if(!a||!s)continue;const{width:c,height:l}=s[o(338)],u=K(a,c,l),d=q(a,u[o(295)]),h={id:s[o(315)],type:o(272),attributes:{imageDimension:u,...d}};this[o(291)](h,n,t)}}),this[e(308)][e(289)]()}),this[t(281)][t(293)][t(325)](t(288),r=>{const o=t;o(331)===r[o(285)][o(314)]&&!r[o(285)][o(327)][o(336)]&&this[o(308)][o(286)]&&(this[o(310)]===e[o(337)]?this[o(300)][o(326)](e[o(337)]):this[o(300)][o(322)]())})}[J(291)](t,e,r){const o=J,i=this[o(309)][o(277)][o(318)][o(306)],n=i[o(274)](),a=!(!n||!n.is(o(290),o(294)));r[o(279)](o(324)),this[o(282)](t,a),e||r[o(271)](i[o(287)]())}[J(282)](t,e){const r=J,o=this[r(309)],{imageDimension:i,imageFallbackUrl:n,imageSources:a}=t[r(317)];o[r(299)](r(321),{imageType:e?r(294):null,source:{uploadcareImageId:t.id,src:n,sources:a,...i}})}}var rt=ot;function ot(t,e){var r=it();return(ot=function(t,e){return r[t-=243]})(t,e)}function it(){var t=["isEnabled","3788VMVYMD","get","plugins","301GHfDaM","refresh","22032732KgeIVu","80728MfyOoB","execute","requires","2721834JFHBNM","commands","_editing","destroy","11QFiesi","123ELBflN","_checkEnabled","_controller","insertImage","4001877aZofbd","7398mtudWY","editor","10DbFzLz","890GGevIV","241303hjjlBs"];return(it=function(){return t})()}!function(t){for(var e=ot,r=t();;)try{if(279460===-parseInt(e(260))/1+-parseInt(e(256))/2*(parseInt(e(251))/3)+-parseInt(e(262))/4*(-parseInt(e(259))/5)+-parseInt(e(246))/6+parseInt(e(265))/7*(-parseInt(e(243))/8)+parseInt(e(255))/9*(-parseInt(e(258))/10)+-parseInt(e(250))/11*(-parseInt(e(267))/12))break;r.push(r.shift())}catch(t){r.push(r.shift())}}(it);class nt extends a.Command{[rt(248)];[rt(253)]=null;static get[rt(245)](){return[c.Dialog,be]}constructor(t){var e=rt;super(t),this[e(248)]=t[e(264)][e(263)](be)}[rt(266)](){var t=rt;this[t(261)]=this[t(252)]()}[rt(244)](t){var e=rt;this[e(253)]&&(this[e(253)][e(249)](),this[e(253)]=null),this[e(253)]=new et(this[e(257)],this[e(248)],t)}[rt(252)](){var t=rt;return this[t(257)][t(247)][t(263)](t(254))[t(261)]}}var at=r(260);function st(t){return"[object Object]"===Object.prototype.toString.call(t)}const ct=/\W|_/g;function lt(t){return t.split(ct).map((t,e)=>t.charAt(0)[e>0?"toUpperCase":"toLowerCase"]()+t.slice(1)).join("")}function ut(t,{ignoreKeys:e}={ignoreKeys:[]}){return Array.isArray(t)?t.map(t=>dt(t,{ignoreKeys:e})):t}function dt(t,{ignoreKeys:e}={ignoreKeys:[]}){if(Array.isArray(t))return ut(t,{ignoreKeys:e});if(!st(t))return t;const r={};for(const o of Object.keys(t)){let i=t[o];e.includes(o)?r[o]=i:(st(i)?i=dt(i,{ignoreKeys:e}):Array.isArray(i)&&(i=ut(i,{ignoreKeys:e})),r[lt(o)]=i)}return r}const ht={factor:2,time:100};function pt(t,e=ht){let r=0;return function t(o){const i=Math.round(e.time*e.factor**r);return o({attempt:r,retry:e=>(t=>new Promise(e=>setTimeout(e,t)))(e??i).then(()=>(r+=1,t(o)))})}(t)}class gt extends Error{}class mt extends gt{originalProgressEvent;constructor(t){super(),this.name="NetworkError",this.message="Network error",Object.setPrototypeOf(this,mt.prototype),this.originalProgressEvent=t}}const ft=(t,e)=>{t&&(t.aborted?Promise.resolve().then(e):t.addEventListener("abort",()=>e(),{once:!0}))};class bt extends gt{isCancel=!0;constructor(t="Request canceled"){super(t),this.name="CancelError",Object.setPrototypeOf(this,bt.prototype)}}const vt=({check:t,interval:e=500,timeout:r,signal:o})=>new Promise((i,n)=>{let a,s;ft(o,()=>{a&&clearTimeout(a),n(new bt("Poll cancelled"))}),r&&(s=setTimeout(()=>{a&&clearTimeout(a),n(new bt("Timed out"))},r));const c=()=>{try{Promise.resolve(t(o)).then(t=>{t?(s&&clearTimeout(s),i(t)):a=setTimeout(c,e)}).catch(t=>{s&&clearTimeout(s),n(t)})}catch(t){s&&clearTimeout(s),n(t)}};a=setTimeout(c,0)}),yt={baseCDN:"https://ucarecdn.com",baseURL:"https://upload.uploadcare.com",maxContentLength:52428800,retryThrottledRequestMaxTimes:1,retryNetworkErrorMaxTimes:3,multipartMinFileSize:26214400,multipartChunkSize:5242880,multipartMinLastPartSize:1048576,maxConcurrentRequests:4,pollingTimeoutMilliseconds:1e4,pusherKey:"79ae88bd931ea68464d9"},wt="application/octet-stream",_t="original",kt=({method:t,url:e,data:r,headers:o={},signal:i,onProgress:n})=>new Promise((a,s)=>{const c=new XMLHttpRequest,l=t?.toUpperCase()||"GET";let u=!1;c.open(l,e,!0),o&&Object.entries(o).forEach(t=>{const[e,r]=t;void 0!==r&&!Array.isArray(r)&&c.setRequestHeader(e,r)}),c.responseType="text",ft(i,()=>{u=!0,c.abort(),s(new bt)}),c.onload=()=>{if(200!=c.status)s(new Error(`Error ${c.status}: ${c.statusText}`));else{const t={method:l,url:e,data:r,headers:o||void 0,signal:i,onProgress:n},s=c.getAllResponseHeaders().trim().split(/[\r\n]+/),u={};s.forEach(function(t){const e=t.split(": "),r=e.shift(),o=e.join(": ");r&&void 0!==r&&(u[r]=o)});const d=c.response,h=c.status;a({request:t,data:d,headers:u,status:h})}},c.onerror=t=>{u||s(new mt(t))},n&&"function"==typeof n&&(c.upload.onprogress=t=>{t.lengthComputable?n({isComputable:!0,value:t.loaded/t.total}):n({isComputable:!1})}),r?c.send(r):c.send()});const xt=function(t,...e){return t};const Ct=t=>"undefined"!=typeof Blob&&t instanceof Blob,Et=t=>"undefined"!=typeof File&&t instanceof File,Tt=t=>!!t&&"object"==typeof t&&!Array.isArray(t)&&"uri"in t&&"string"==typeof t.uri,At=t=>Ct(t)||Et(t)||Tt(t);function It(t,e,r){if(Array.isArray(r))for(const o of r)It(t,`${e}[]`,o);else if((o=r)&&"object"==typeof o&&"data"in o&&At(o.data)){const{name:o,contentType:i}=r,n=xt(r.data,o,i??wt),a=(({name:t})=>t?[t]:[])({name:o,contentType:i});t.push([e,n,...a])}else if((t=>!!t&&"object"==typeof t&&!Array.isArray(t))(r))for(const[o,i]of Object.entries(r))void 0!==i&&t.push([`${e}[${o}]`,String(i)]);else(t=>"string"==typeof t||"number"==typeof t||void 0===t)(r)&&r&&t.push([e,r.toString()]);var o}function St(t){const e=new FormData,r=function(t){const e=[];for(const[r,o]of Object.entries(t))It(e,r,o);return e}(t);for(const t of r){const[r,o,...i]=t;e.append(r,o,...i)}return e}class Mt extends gt{code;request;response;headers;constructor(t,e,r,o,i){super(),this.name="UploadError",this.message=t,this.code=e,this.request=r,this.response=o,this.headers=i,Object.setPrototypeOf(this,Mt.prototype)}}const $t=(t,e,r)=>{const o=new URL(t);return o.pathname=(o.pathname+e).replace("//","/"),r&&(o.search=(t=>{const e=new URLSearchParams;for(const[r,o]of Object.entries(t))o&&"object"==typeof o&&!Array.isArray(o)?Object.entries(o).filter(t=>t[1]??!1).forEach(t=>e.set(`${r}[${t[0]}]`,String(t[1]))):Array.isArray(o)?o.forEach(t=>{e.append(`${r}[]`,t)}):"string"==typeof o&&o?e.set(r,o):"number"==typeof o&&e.set(r,o.toString());return e.toString()})(r)),o.toString()};function Lt(t){return function({libraryName:t,libraryVersion:e,userAgent:r,publicKey:o="",integration:i=""}){const n="JavaScript";return"string"==typeof r?r:"function"==typeof r?r({publicKey:o,libraryName:t,libraryVersion:e,languageName:n,integration:i}):`${[t,e,o].filter(Boolean).join("/")} (${[n,i].filter(Boolean).join("; ")})`}({libraryName:"UploadcareUploadClient",libraryVersion:"6.14.3",...t})}function Ot(t,e){const{retryThrottledRequestMaxTimes:r,retryNetworkErrorMaxTimes:o}=e;return pt(({attempt:e,retry:i})=>t().catch(t=>{if("response"in t&&"RequestThrottledError"===t?.code&&e<r)return i(function(t){const{headers:e}=t||{};if(!e||"string"!=typeof e["retry-after"])return 15e3;const r=parseInt(e["retry-after"],10);return Number.isFinite(r)?1e3*r:15e3}(t));if(t instanceof mt&&e<o)return i(1e3*(e+1));throw t}))}const Ut=t=>{let e="";return(Ct(t)||Et(t)||Tt(t))&&(e=t.type),e||wt},Rt=t=>{let e="";return Et(t)&&t.name?e=t.name:Ct(t)?e="":Tt(t)&&t.name&&(e=t.name),e||_t};function Pt(t){return void 0===t||"auto"===t?"auto":t?"1":"0"}function Nt(t,{publicKey:e,fileName:r,contentType:o,baseURL:i=yt.baseURL,secureSignature:n,secureExpire:a,store:s,signal:c,onProgress:l,source:u="local",integration:d,userAgent:h,retryThrottledRequestMaxTimes:p=yt.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:g=yt.retryNetworkErrorMaxTimes,metadata:m}){return Ot(()=>kt({method:"POST",url:$t(i,"/base/",{jsonerrors:1}),headers:{"X-UC-User-Agent":Lt({publicKey:e,integration:d,userAgent:h})},data:St({file:{data:t,name:r||Rt(t),contentType:o||Ut(t)},UPLOADCARE_PUB_KEY:e,UPLOADCARE_STORE:Pt(s),signature:n,expire:a,source:u,metadata:m}),signal:c,onProgress:l}).then(({data:t,headers:e,request:r})=>{const o=dt(JSON.parse(t));if("error"in o)throw new Mt(o.error.content,o.error.errorCode,r,o,e);return o}),{retryNetworkErrorMaxTimes:g,retryThrottledRequestMaxTimes:p})}var zt,Dt;function Ft(t,{publicKey:e,baseURL:r=yt.baseURL,store:o,fileName:i,checkForUrlDuplicates:n,saveUrlForRecurrentUploads:a,secureSignature:s,secureExpire:c,source:l="url",signal:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p=yt.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:g=yt.retryNetworkErrorMaxTimes,metadata:m}){return Ot(()=>kt({method:"POST",headers:{"X-UC-User-Agent":Lt({publicKey:e,integration:d,userAgent:h})},url:$t(r,"/from_url/",{jsonerrors:1,pub_key:e,source_url:t,store:Pt(o),filename:i,check_URL_duplicates:n?1:void 0,save_URL_duplicates:a?1:void 0,signature:s,expire:c,source:l,metadata:m}),signal:u}).then(({data:t,headers:e,request:r})=>{const o=dt(JSON.parse(t));if("error"in o)throw new Mt(o.error.content,o.error.errorCode,r,o,e);return o}),{retryNetworkErrorMaxTimes:g,retryThrottledRequestMaxTimes:p})}!function(t){t.Token="token",t.FileInfo="file_info"}(zt||(zt={})),function(t){t.Unknown="unknown",t.Waiting="waiting",t.Progress="progress",t.Error="error",t.Success="success"}(Dt||(Dt={}));function Vt(t,{publicKey:e,baseURL:r=yt.baseURL,signal:o,integration:i,userAgent:n,retryThrottledRequestMaxTimes:a=yt.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:s=yt.retryNetworkErrorMaxTimes}={}){return Ot(()=>kt({method:"GET",headers:e?{"X-UC-User-Agent":Lt({publicKey:e,integration:i,userAgent:n})}:void 0,url:$t(r,"/from_url/status/",{jsonerrors:1,token:t}),signal:o}).then(({data:t,headers:e,request:r})=>{const o=dt(JSON.parse(t));if("error"in o&&!(t=>"status"in t&&t.status===Dt.Error)(o))throw new Mt(o.error.content,o.error.errorCode,r,o,e);return o}),{retryNetworkErrorMaxTimes:s,retryThrottledRequestMaxTimes:a})}function Bt(t,{publicKey:e,baseURL:r=yt.baseURL,signal:o,source:i,integration:n,userAgent:a,retryThrottledRequestMaxTimes:s=yt.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:c=yt.retryNetworkErrorMaxTimes}){return Ot(()=>kt({method:"GET",headers:{"X-UC-User-Agent":Lt({publicKey:e,integration:n,userAgent:a})},url:$t(r,"/info/",{jsonerrors:1,pub_key:e,file_id:t,source:i}),signal:o}).then(({data:t,headers:e,request:r})=>{const o=dt(JSON.parse(t));if("error"in o)throw new Mt(o.error.content,o.error.errorCode,r,o,e);return o}),{retryThrottledRequestMaxTimes:s,retryNetworkErrorMaxTimes:c})}function jt(t,{publicKey:e,contentType:r,fileName:o,multipartChunkSize:i=yt.multipartChunkSize,baseURL:n="",secureSignature:a,secureExpire:s,store:c,signal:l,source:u="local",integration:d,userAgent:h,retryThrottledRequestMaxTimes:p=yt.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:g=yt.retryNetworkErrorMaxTimes,metadata:m}){return Ot(()=>kt({method:"POST",url:$t(n,"/multipart/start/",{jsonerrors:1}),headers:{"X-UC-User-Agent":Lt({publicKey:e,integration:d,userAgent:h})},data:St({filename:o||_t,size:t,content_type:r||wt,part_size:i,UPLOADCARE_STORE:Pt(c),UPLOADCARE_PUB_KEY:e,signature:a,expire:s,source:u,metadata:m}),signal:l}).then(({data:t,headers:e,request:r})=>{const o=dt(JSON.parse(t));if("error"in o)throw new Mt(o.error.content,o.error.errorCode,r,o,e);return o.parts=Object.keys(o.parts).map(t=>o.parts[Number(t)]),o}),{retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g})}function Ht(t,e,{contentType:r,signal:o,onProgress:i,retryThrottledRequestMaxTimes:n=yt.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:a=yt.retryNetworkErrorMaxTimes}){return Ot(()=>kt({method:"PUT",url:e,data:t,onProgress:i,signal:o,headers:{"Content-Type":r||wt}}).then(t=>(i&&i({isComputable:!0,value:1}),t)).then(({status:t})=>({code:t})),{retryThrottledRequestMaxTimes:n,retryNetworkErrorMaxTimes:a})}function qt(t,{publicKey:e,baseURL:r=yt.baseURL,source:o="local",signal:i,integration:n,userAgent:a,retryThrottledRequestMaxTimes:s=yt.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:c=yt.retryNetworkErrorMaxTimes}){return Ot(()=>kt({method:"POST",url:$t(r,"/multipart/complete/",{jsonerrors:1}),headers:{"X-UC-User-Agent":Lt({publicKey:e,integration:n,userAgent:a})},data:St({uuid:t,UPLOADCARE_PUB_KEY:e,source:o}),signal:i}).then(({data:t,headers:e,request:r})=>{const o=dt(JSON.parse(t));if("error"in o)throw new Mt(o.error.content,o.error.errorCode,r,o,e);return o}),{retryThrottledRequestMaxTimes:s,retryNetworkErrorMaxTimes:c})}function Kt(t,{publicKey:e,baseURL:r,source:o,integration:i,userAgent:n,retryThrottledRequestMaxTimes:a,retryNetworkErrorMaxTimes:s,signal:c,onProgress:l}){return vt({check:c=>Bt(t,{publicKey:e,baseURL:r,signal:c,source:o,integration:i,userAgent:n,retryThrottledRequestMaxTimes:a,retryNetworkErrorMaxTimes:s}).then(t=>t.isReady?t:(l&&l({isComputable:!0,value:1}),!1)),signal:c})}class Gt{uuid;name;size;isStored;isImage;mimeType;cdnUrl;s3Url;originalFilename;imageInfo;videoInfo;contentInfo;metadata;s3Bucket;defaultEffects=null;constructor(t,{baseCDN:e=yt.baseCDN,fileName:r}={}){const{uuid:o,s3Bucket:i}=t,n=$t(e,`${o}/`),a=i?$t(`https://${i}.s3.amazonaws.com/`,`${o}/${t.filename}`):null;this.uuid=o,this.name=r||t.filename,this.size=t.size,this.isStored=t.isStored,this.isImage=t.isImage,this.mimeType=t.mimeType,this.cdnUrl=n,this.originalFilename=t.originalFilename,this.imageInfo=t.imageInfo,this.videoInfo=t.videoInfo,this.contentInfo=t.contentInfo,this.metadata=t.metadata||null,this.s3Bucket=i||null,this.s3Url=a,function(t){return"defaultEffects"in t}(t)&&(this.defaultEffects=t.defaultEffects)}}const Wt=(t,{signal:e}={})=>{let r=null,o=null;const i=t.map(()=>new AbortController);return ft(e,()=>{i.forEach(t=>t.abort())}),Promise.all(t.map((t,e)=>{const n=(t=>()=>{o=t,i.forEach((e,r)=>r!==t&&e.abort())})(e);return Promise.resolve().then(()=>t({stopRace:n,signal:i[e].signal})).then(t=>(n(),t)).catch(t=>(r=t,null))})).then(t=>{if(null===o)throw r;return t[o]})};var Zt=window.WebSocket;class Xt{events=Object.create({});emit(t,e){this.events[t]?.forEach(t=>t(e))}on(t,e){this.events[t]=this.events[t]||[],this.events[t].push(e)}off(t,e){this.events[t]=e?this.events[t].filter(t=>t!==e):[]}}class Yt{key;disconnectTime;ws=void 0;queue=[];isConnected=!1;subscribers=0;emmitter=new Xt;disconnectTimeoutId=null;constructor(t,e=3e4){this.key=t,this.disconnectTime=e}connect(){if(this.disconnectTimeoutId&&clearTimeout(this.disconnectTimeoutId),!this.isConnected&&!this.ws){const t=`wss://ws.pusherapp.com/app/${this.key}?protocol=5&client=js&version=1.12.2`;this.ws=new Zt(t),this.ws.addEventListener("error",t=>{this.emmitter.emit("error",new Error(t.message))}),this.emmitter.on("connected",()=>{this.isConnected=!0,this.queue.forEach(t=>this.send(t.event,t.data)),this.queue=[]}),this.ws.addEventListener("message",t=>{const e=JSON.parse(t.data.toString());switch(e.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(e.channel,((t,e)=>"success"===t?{status:Dt.Success,...e}:"progress"===t?{status:Dt.Progress,...e}:{status:Dt.Error,...e})(e.event,JSON.parse(e.data)))}})}}disconnect(){const t=()=>{this.ws?.close(),this.ws=void 0,this.isConnected=!1};this.disconnectTime?this.disconnectTimeoutId=setTimeout(()=>{t()},this.disconnectTime):t()}send(t,e){const r=JSON.stringify({event:t,data:e});this.ws?.send(r)}subscribe(t,e){this.subscribers+=1,this.connect();const r=`task-status-${t}`,o={event:"pusher:subscribe",data:{channel:r}};this.emmitter.on(r,e),this.isConnected?this.send(o.event,o.data):this.queue.push(o)}unsubscribe(t){this.subscribers-=1;const e=`task-status-${t}`,r={event:"pusher:unsubscribe",data:{channel:e}};this.emmitter.off(e),this.isConnected?this.send(r.event,r.data):this.queue=this.queue.filter(t=>t.data.channel!==e),0===this.subscribers&&this.disconnect()}onError(t){return this.emmitter.on("error",t),()=>this.emmitter.off("error",t)}}let Jt=null;const Qt=t=>{if(!Jt){const e="undefined"==typeof window?0:3e4;Jt=new Yt(t,e)}return Jt};const te=(t,{publicKey:e,fileName:r,baseURL:o,baseCDN:i,checkForUrlDuplicates:n,saveUrlForRecurrentUploads:a,secureSignature:s,secureExpire:c,store:l,signal:u,onProgress:d,source:h,integration:p,userAgent:g,retryThrottledRequestMaxTimes:m,pusherKey:f=yt.pusherKey,metadata:b})=>{return Promise.resolve((v=f,void Qt(v).connect())).then(()=>Ft(t,{publicKey:e,fileName:r,baseURL:o,checkForUrlDuplicates:n,saveUrlForRecurrentUploads:a,secureSignature:s,secureExpire:c,store:l,signal:u,source:h,integration:p,userAgent:g,retryThrottledRequestMaxTimes:m,metadata:b})).catch(t=>{const e=Qt(f);return e?.disconnect(),Promise.reject(t)}).then(t=>t.type===zt.FileInfo?t:Wt([({signal:r})=>function({token:t,publicKey:e,baseURL:r,integration:o,userAgent:i,retryThrottledRequestMaxTimes:n,retryNetworkErrorMaxTimes:a,onProgress:s,signal:c}){return vt({check:c=>Vt(t,{publicKey:e,baseURL:r,integration:o,userAgent:i,retryThrottledRequestMaxTimes:n,retryNetworkErrorMaxTimes:a,signal:c}).then(e=>{switch(e.status){case Dt.Error:return new Mt(e.error,e.errorCode);case Dt.Waiting:return!1;case Dt.Unknown:return new Mt(`Token "${t}" was not found.`);case Dt.Progress:return s&&("unknown"===e.total?s({isComputable:!1}):s({isComputable:!0,value:e.done/e.total})),!1;case Dt.Success:return s&&s({isComputable:!0,value:e.done/e.total}),e;default:throw new Error("Unknown status")}}),signal:c})}({token:t.token,publicKey:e,baseURL:o,integration:p,userAgent:g,retryThrottledRequestMaxTimes:m,onProgress:d,signal:r}),({signal:e})=>(({token:t,pusherKey:e,signal:r,onProgress:o})=>new Promise((i,n)=>{const a=Qt(e),s=a.onError(n),c=()=>{s(),a.unsubscribe(t)};ft(r,()=>{c(),n(new bt("pusher cancelled"))}),a.subscribe(t,t=>{switch(t.status){case Dt.Progress:o&&("unknown"===t.total?o({isComputable:!1}):o({isComputable:!0,value:t.done/t.total}));break;case Dt.Success:c(),o&&o({isComputable:!0,value:t.done/t.total}),i(t);break;case Dt.Error:c(),n(new Mt(t.msg,t.error_code))}})}))({token:t.token,pusherKey:f,signal:e,onProgress:d})],{signal:u})).then(t=>{if(t instanceof Mt)throw t;return t}).then(t=>Kt(t.uuid,{publicKey:e,baseURL:o,integration:p,userAgent:g,retryThrottledRequestMaxTimes:m,onProgress:d,signal:u})).then(t=>new Gt(t,{baseCDN:i}));var v},ee=new WeakMap,re=async t=>{if(Et(t)||Ct(t))return t.size;if(Tt(t)){return(await(async t=>{if(ee.has(t))return ee.get(t);const e=await fetch(t.uri).then(t=>t.blob());return ee.set(t,e),e})(t)).size}throw new Error("Unknown file type. Cannot determine file size.")},oe=t=>{const e=new RegExp("[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}");return!At(t)&&e.test(t)},ie=t=>{const e=new RegExp("^(?:\\w+:)?\\/\\/([^\\s\\.]+\\.\\S{2}|localhost[\\:?\\d]*)\\S*$");return!At(t)&&e.test(t)},ne=async(t,e,r)=>o=>((t,e,r,o)=>{const i=o*e,n=Math.min(i+o,r);return t.slice(i,n)})(t,o,e,r),ae=async(t,{publicKey:e,fileName:r,fileSize:o,baseURL:i,secureSignature:n,secureExpire:a,store:s,signal:c,onProgress:l,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,contentType:m,multipartChunkSize:f=yt.multipartChunkSize,maxConcurrentRequests:b=yt.maxConcurrentRequests,baseCDN:v,metadata:y})=>{const w=o??await re(t);let _;const k=(t,e)=>{if(!l)return;_||(_=Array(t).fill(0));return r=>{var o;r.isComputable&&(_[e]=r.value,l({isComputable:!0,value:(o=_,o.reduce((t,e)=>t+e,0)/t)}))}};return m||=Ut(t),jt(w,{publicKey:e,contentType:m,fileName:r||Rt(t),baseURL:i,secureSignature:n,secureExpire:a,store:s,signal:c,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,metadata:y,multipartChunkSize:f}).then(async({uuid:r,parts:o})=>{const i=await ne(t,w,f);return Promise.all([r,(n=b,a=o.map((t,r)=>()=>((t,e,{publicKey:r,contentType:o,onProgress:i,signal:n,integration:a,retryThrottledRequestMaxTimes:s,retryNetworkErrorMaxTimes:c})=>Ht(t,e,{publicKey:r,contentType:o,onProgress:i,signal:n,integration:a,retryThrottledRequestMaxTimes:s,retryNetworkErrorMaxTimes:c}))(i(r),t,{publicKey:e,contentType:m,onProgress:k(o.length,r),signal:c,integration:d,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g})),new Promise((t,e)=>{const r=[];let o=!1,i=a.length;const s=[...a],c=()=>{const n=a.length-s.length,l=s.shift();l&&l().then(e=>{o||(r[n]=e,i-=1,i?c():t(r))}).catch(t=>{o=!0,e(t)})};for(let t=0;t<n;t++)c()}))]);var n,a}).then(([t])=>qt(t,{publicKey:e,baseURL:i,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g})).then(t=>t.isReady?t:Kt(t.uuid,{publicKey:e,baseURL:i,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,onProgress:l,signal:c})).then(t=>new Gt(t,{baseCDN:v}))};async function se(t,{publicKey:e,fileName:r,baseURL:o=yt.baseURL,secureSignature:i,secureExpire:n,store:a,signal:s,onProgress:c,source:l,integration:u,userAgent:d,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,contentType:g,multipartMinFileSize:m,multipartChunkSize:f,maxConcurrentRequests:b,baseCDN:v=yt.baseCDN,checkForUrlDuplicates:y,saveUrlForRecurrentUploads:w,pusherKey:_,metadata:k}){if(At(t)){const y=await re(t);return((t,e=yt.multipartMinFileSize)=>t>=e)(y,m)?ae(t,{publicKey:e,contentType:g,multipartChunkSize:f,fileSize:y,fileName:r,baseURL:o,secureSignature:i,secureExpire:n,store:a,signal:s,onProgress:c,source:l,integration:u,userAgent:d,maxConcurrentRequests:b,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,baseCDN:v,metadata:k}):((t,{publicKey:e,fileName:r,baseURL:o,secureSignature:i,secureExpire:n,store:a,contentType:s,signal:c,onProgress:l,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,baseCDN:m,metadata:f})=>Nt(t,{publicKey:e,fileName:r,contentType:s,baseURL:o,secureSignature:i,secureExpire:n,store:a,signal:c,onProgress:l,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,metadata:f}).then(({file:t})=>Kt(t,{publicKey:e,baseURL:o,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,onProgress:l,signal:c})).then(t=>new Gt(t,{baseCDN:m})))(t,{publicKey:e,fileName:r,contentType:g,baseURL:o,secureSignature:i,secureExpire:n,store:a,signal:s,onProgress:c,source:l,integration:u,userAgent:d,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,baseCDN:v,metadata:k})}if(ie(t))return te(t,{publicKey:e,fileName:r,baseURL:o,baseCDN:v,checkForUrlDuplicates:y,saveUrlForRecurrentUploads:w,secureSignature:i,secureExpire:n,store:a,signal:s,onProgress:c,source:l,integration:u,userAgent:d,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,pusherKey:_,metadata:k});if(oe(t))return((t,{publicKey:e,fileName:r,baseURL:o,signal:i,onProgress:n,source:a,integration:s,userAgent:c,retryThrottledRequestMaxTimes:l,retryNetworkErrorMaxTimes:u,baseCDN:d})=>Bt(t,{publicKey:e,baseURL:o,signal:i,source:a,integration:s,userAgent:c,retryThrottledRequestMaxTimes:l,retryNetworkErrorMaxTimes:u}).then(t=>new Gt(t,{baseCDN:d,fileName:r})).then(t=>(n&&n({isComputable:!0,value:1}),t)))(t,{publicKey:e,fileName:r,baseURL:o,signal:s,onProgress:c,source:l,integration:u,userAgent:d,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,baseCDN:v});throw new TypeError(`File uploading from "${t}" is not supported`)}var ce=le;function le(t,e){var r=ue();return(le=function(t,e){return r[t-=388]})(t,e)}function ue(){var t=["getInfo","782510ZpSxSw","225mfrPAc","5201ELNXNL","178eUmnxZ","106712loIgxf","25413NWZzIK","5844vAJeJi","340915nmwhVy","upload","1472920tUJEoy","88jiDLDn","2545135mCdkgd"];return(ue=function(){return t})()}!function(t){for(var e=le,r=t();;)try{if(392904===parseInt(e(391))/1+parseInt(e(400))/2*(-parseInt(e(389))/3)+-parseInt(e(393))/4+-parseInt(e(395))/5+-parseInt(e(390))/6*(-parseInt(e(399))/7)+parseInt(e(388))/8*(parseInt(e(398))/9)+parseInt(e(397))/10*(parseInt(e(394))/11))break;r.push(r.shift())}catch(t){r.push(r.shift())}}(ue);class de{static[ce(392)]({file:t,...e}){return se(t,e)}static[ce(396)](t,e){return Bt(t,e)}}class he extends a.Plugin{static get requires(){return["ImageUploadEditing","ImageUploadProgress",at.FileRepository,be]}static get pluginName(){return"UploadcareUploadAdapter"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}async afterInit(){const t=this.editor;t.config.get("uploadcare")&&(t.plugins.get(at.FileRepository).createUploadAdapter=e=>new pe(e,t),t.plugins.get("ImageUploadEditing").on("uploadComplete",(e,{imageElement:r,data:o})=>{t.model.change(t=>{t.setAttribute("uploadcareImageId",o.uploadcareImageId,r)})}))}}class pe{loader;editor;controller;constructor(t,e){this.loader=t,this.editor=e,this.controller=new AbortController}async upload(){const t=this.editor.t,e=await this.loader.file;return de.upload({file:e,publicKey:this.editor.config.get("uploadcare.pubkey"),baseURL:this.editor.config.get("uploadcare.uploader.baseUrl"),baseCDN:this.editor.config.get("uploadcare.uploader.cdnCname"),signal:this.controller.signal,onProgress:t=>{t&&t.isComputable&&(this.loader.uploadTotal=1,this.loader.uploaded=t.value)}}).then(async t=>{const{imageFallbackUrl:e,imageSources:r}=q(t.cdnUrl,t.imageInfo.width);return{uploadcareImageId:t.uuid,default:e,sources:r}}).catch(()=>{const r=t("Cannot upload file:")+" "+e.name+".";return Promise.reject(r)})}abort(){this.controller.abort()}}const ge=fe;function me(){const t=["435710LUzoUC","10796jpkgyC","_configElement","getAttribute","_initImageProcessingIndicator","isPremiumPlugin","view","uploadcareImageId","119740QFzSRH","document","join","appendChild","#uc-icon-arrow-down","model","pluginName","12lmgeWk","conversion","contentLanguage","commands","\n\t\t\t\t.uc-dropdown-menu__popup { padding: 0; }\n\t\t\t\t.uc-dropdown-menu__popup-menu { gap: 0; }\n\t\t\t\t.uc-dropdown-menu__popup-footer { padding-top: 0; }\n\t\t\t\t.uc-dropdown-menu__separator { margin: 0; }\n\t\t\t","extend","true","configElement","querySelector","downcast","once","1209549EJWlgo","elementToAttribute","iconHrefResolver","removeAttribute","init","add","closeMax","map","afterInit","isOfficialPlugin","listenTo","_initConfig","schema","imageInline","ctxElement","51leLgEM","selection","7548HnypeN","attributeToAttribute","_initCtx","uploadcareImageReplace","uploadcare","9iuzFbA","isRegistered","1030552CuYuDg","fromCharCode","remove","1841rAaAUE","getSelectedElement","cleanupImage","destroy","render","execute","replaceImageSource","_initConversion","uploader-","config","uc-config","2781180DFCgLf","uc-upload-ctx-provider","upcast","data-uc-image-id","editing","ucContextId","get","uploadcare.uploader","insertImage","PictureEditing","imageBlock","href","editor","_ctxElement","for","body","UploadcareEditing","_initSchema","locale","requires","input[uploadcare-file-input]","uploadcare.pubkey"];return(me=function(){return t})()}function fe(t,e){const r=me();return(fe=function(t,e){return r[t-=207]})(t,e)}!function(t){const e=fe,r=t();for(;;)try{if(238224===parseInt(e(223))/1+parseInt(e(224))/2*(-parseInt(e(264))/3)+-parseInt(e(238))/4*(parseInt(e(231))/5)+-parseInt(e(266))/6*(parseInt(e(276))/7)+-parseInt(e(273))/8*(-parseInt(e(271))/9)+parseInt(e(287))/10+-parseInt(e(249))/11)break;r.push(r.shift())}catch(t){r.push(r.shift())}}(me);class be extends a.Plugin{[ge(225)]=null;[ge(214)]=null;static get[ge(237)](){return ge(217)}static get[ge(220)](){return[ge(210),he,c.Dialog]}static get[ge(258)](){return!0}static get[ge(228)](){return!0}[ge(292)];get[ge(245)](){return this[ge(225)]}get[ge(263)](){return this[ge(214)]}constructor(t){const e=ge;super(t),this[e(292)]=(0,L.uid)()}[ge(253)](){const t=ge,e=this[t(213)];e[t(241)][t(254)](t(270),new nt(e))}[ge(257)](){const t=ge;this[t(218)](),this[t(283)](),this[t(260)](),this[t(268)](),this[t(227)](),this[t(259)](this[t(213)],t(279),()=>{const e=t;this[e(225)]&&(this[e(225)][e(275)](),this[e(225)]=null),this[e(214)]&&(this[e(214)][e(275)](),this[e(214)]=null);const r=L.global[e(232)][e(246)](e(221));r&&r[e(275)]()}),async function(t){const e=g([104,103,80,54,56,112,113,99,55,79,66,74,120,57,117,51,122,114,72,97,116,89,85,88,102,48,52,84,100,86,107,77,70,109,119,67,115,53,83,68,65,118,106,50,49,105,87,81,71,101,90,75,76,121,82,108,69,78,110,111,73,98]),r=window[g([68,97,116,101])][g([110,111,119])](),o=t[g([101,100,105,116,111,114])],i=new(window[g([80,114,111,109,105,115,101])])(t=>{o[g([111,110,99,101])](g([114,101,97,100,121]),t)}),n={[g([107,116,121])]:g([69,67]),[g([117,115,101])]:g([115,105,103]),[g([99,114,118])]:g([80,45,50,53,54]),[g([120])]:g([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[g([121])]:g([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[g([97,108,103])]:g([69,83,50,53,54])},a=o[g([99,111,110,102,105,103])][g([103,101,116])](g([108,105,99,101,110,115,101,75,101,121]));function s(t){const e=[new(window[g([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),i[g([116,104,101,110])](()=>new(window[g([80,114,111,109,105,115,101])])(t=>{let e=0;o[g([109,111,100,101,108])][g([111,110])](g([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(r,o)=>{o[0][g([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,1512==e&&(t(),r[g([111,102,102])]())})}))];return window[g([80,114,111,109,105,115,101])][g([114,97,99,101])](e)[g([116,104,101,110])](()=>t)}function c(t){return t[g([115,116,97,114,116,115,87,105,116,104])](g([101,121]))?JSON[g([112,97,114,115,101])](l(t)):null}function l(t){return window[g([97,116,111,98])](t[g([114,101,112,108,97,99,101])](/-/g,g([43]))[g([114,101,112,108,97,99,101])](/_/g,g([47])))}function u(t){let e=5381;function r(t){for(let r=0;r<t[g([108,101,110,103,116,104])];r++){const o=t[g([99,104,97,114,67,111,100,101,65,116])](r);e=(e<<5)+e+o,e&=e}}return function t(e){Array[g([105,115,65,114,114,97,121])](e)?e[g([102,111,114,69,97,99,104])](t):e&&typeof e==g([111,98,106,101,99,116])?Object[g([101,110,116,114,105,101,115])](e)[g([115,111,114,116])]()[g([102,111,114,69,97,99,104])](([e,o])=>{r(e),t(o)}):r(window[g([83,116,114,105,110,103])](e))}(t),e>>>0}function d(t){return t[g([116,111,83,116,114,105,110,103])](16)[g([112,97,100,83,116,97,114,116])](8,g([48]))}function h(t){return t[g([115,112,108,105,116])]("")[g([114,101,118,101,114,115,101])]()[g([106,111,105,110])]("")}function p(){}function g(t){const e=fe;return t[e(256)](t=>String[e(274)](t))[e(233)]("")}!function(t){const r=function(){const t=window[g([83,116,114,105,110,103])](window[g([112,101,114,102,111,114,109,97,110,99,101])][g([110,111,119])]())[g([114,101,112,108,97,99,101])](g([46]),"");let r=g([104]);for(let o=0;o<t[g([108,101,110,103,116,104])];o+=2){let i=window[g([112,97,114,115,101,73,110,116])](t[g([115,117,98,115,116,114,105,110,103])](o,o+2));i>=e[g([108,101,110,103,116,104])]&&(i-=e[g([108,101,110,103,116,104])]),r+=e[i]}return r}();o[r]=g([117,112,108,111,97,100,99,97,114,101,76,105,99,101,110,115,101,75,101,121])+t,t!=g([86,97,108,105,100])&&async function(){await i,o[g([109,111,100,101,108])][g([99,104,97,110,103,101])]=p,o[g([109,111,100,101,108])][g([101,110,113,117,101,117,101,67,104,97,110,103,101])]=p,o[g([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](g([109,111,100,101,108]))}()}(await async function(){let t,e=null,p=null;try{return a==g([71,80,76])?g([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[g([115,112,108,105,116])](g([46]));return 3!=t[g([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=c(t);return e&&r()?e:null;function r(){const t=e[g([106,116,105])],r=window[g([112,97,114,115,101,73,110,116])](t[g([115,117,98,115,116,114,105,110,103])](t[g([108,101,110,103,116,104])]-8),16),o={...e,[g([106,116,105])]:t[g([115,117,98,115,116,114,105,110,103])](0,t[g([108,101,110,103,116,104])]-8)};return delete o[g([118,99])],u(o)==r}}}(),t?(t[g([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(p=function(t,e){return new(window[g([80,114,111,109,105,115,101])])(s=>{if(n())return s(g([86,97,108,105,100]));a(),o[g([100,101,99,111,114,97,116,101])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let c=!1;const l=(0,L.uid)();function p(t){return!!t&&(typeof t===g([111,98,106,101,99,116])||typeof t===g([102,117,110,99,116,105,111,110]))&&typeof t[g([116,104,101,110])]===g([102,117,110,99,116,105,111,110])&&typeof t[g([99,97,116,99,104])]===g([102,117,110,99,116,105,111,110])}function m(o){c(o)[g([116,104,101,110])](t=>t&&t[g([115,116,97,116,117,115])]==g([111,107])?d(u(l+e))!=t[g([118,101,114,105,102,105,99,97,116,105,111,110])]?g([85,115,97,103,101,76,105,109,105,116]):g([86,97,108,105,100]):g([85,115,97,103,101,76,105,109,105,116]))[g([116,104,101,110])](t=>(n(),t),()=>{const t=a();return null==t?(n(),g([86,97,108,105,100])):g(r-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[g([116,104,101,110])](s)[g([99,97,116,99,104])](()=>{s(g([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function n(){const e=g([108,108,99,116,45])+d(u(t)),o=h(d(window[g([77,97,116,104])][g([99,101,105,108])](r/i)));window[g([108,111,99,97,108,83,116,111,114,97,103,101])][g([115,101,116,73,116,101,109])](e,o)}function a(){const e=g([108,108,99,116,45])+d(u(t)),r=window[g([108,111,99,97,108,83,116,111,114,97,103,101])][g([103,101,116,73,116,101,109])](e);return r?window[g([112,97,114,115,101,73,110,116])](h(r),16)*i:null}function c(t){return new(window[g([80,114,111,109,105,115,101])])((e,r)=>{t[g([116,104,101,110])](e,r),window[g([115,101,116,84,105,109,101,111,117,116])](r,12e4)})}}o[g([111,110])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(e,r)=>{if(r[0]!=t)return s(g([85,115,97,103,101,76,105,109,105,116]));r[1]={...r[1],[g([114,101,113,117,101,115,116,73,100])]:l}},{[g([112,114,105,111,114,105,116,121])]:g([104,105,103,104])}),o[g([111,110])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{p(t[g([114,101,116,117,114,110])])&&(c=!0,m(t[g([114,101,116,117,114,110])]))},{[g([112,114,105,111,114,105,116,121])]:g([108,111,119])}),i[g([116,104,101,110])](()=>{c||s(g([85,115,97,103,101,76,105,109,105,116]))})});function n(){return o[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==g([97,117,116,111])}function a(){o[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=g([97,117,116,111])}}(t[g([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[g([106,116,105])])),await async function(){let t=!0;try{const o=a[g([115,112,108,105,116])](g([46])),[i,n,s]=o;return e(i),await r(i,n,s),t}catch{return!1}function e(e){const r=c(e);r&&r[g([97,108,103])]==g([69,83,50,53,54])||(t=!1)}async function r(e,r,o){const i=window[g([85,105,110,116,56,65,114,114,97,121])][g([102,114,111,109])](l(o),t=>t[g([99,104,97,114,67,111,100,101,65,116])](0)),a=(new(window[g([84,101,120,116,69,110,99,111,100,101,114])]))[g([101,110,99,111,100,101])](e+g([46])+r),s=window[g([99,114,121,112,116,111])][g([115,117,98,116,108,101])];if(!s)return;const c=await s[g([105,109,112,111,114,116,75,101,121])](g([106,119,107]),n,{[g([110,97,109,101])]:g([69,67,68,83,65]),[g([110,97,109,101,100,67,117,114,118,101])]:g([80,45,50,53,54])},!1,[g([118,101,114,105,102,121])]);await s[g([118,101,114,105,102,121])]({[g([110,97,109,101])]:g([69,67,68,83,65]),[g([104,97,115,104])]:{[g([110,97,109,101])]:g([83,72,65,45,50,53,54])}},c,i,a)||(t=!1)}}()?function(){const e=t[g([102,101,97,116,117,114,101,115])];return!(!e||!e[g([105,110,99,108,117,100,101,115])](g([42]))&&!e[g([105,110,99,108,117,100,101,115])](g([85,80,76,67])))}()?function(){const e=[g([101,118,97,108,117,97,116,105,111,110]),g([116,114,105,97,108])][g([105,110,99,108,117,100,101,115])](t[g([108,105,99,101,110,115,101,84,121,112,101])])?r/1e3:1766707200;return t[g([101,120,112])]<e}()?g([69,120,112,105,114,101,100]):function(){const e=fe,r=t[g([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!r||0==r[g([108,101,110,103,116,104])])return!0;const{hostname:o}=new URL(window[g([108,111,99,97,116,105,111,110])][e(212)]);if(r[g([105,110,99,108,117,100,101,115])](o))return!0;const i=o[g([115,112,108,105,116])](g([46]));return r[g([102,105,108,116,101,114])](t=>t[g([105,110,99,108,117,100,101,115])](g([42])))[g([109,97,112])](t=>t[g([115,112,108,105,116])](g([46])))[g([102,105,108,116,101,114])](t=>t[g([108,101,110,103,116,104])]<=i[g([108,101,110,103,116,104])])[g([109,97,112])](t=>Array(i[g([108,101,110,103,116,104])]-t[g([108,101,110,103,116,104])])[g([102,105,108,108])](t[0]===g([42])?g([42]):"")[g([99,111,110,99,97,116])](t))[g([115,111,109,101])](t=>i[g([101,118,101,114,121])]((e,r)=>t[r]===e||t[r]===g([42])))}()?(t[g([108,105,99,101,110,115,101,84,121,112,101])]==g([101,118,97,108,117,97,116,105,111,110])&&(e=s(g([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),t[g([108,105,99,101,110,115,101,84,121,112,101])]==g([116,114,105,97,108])&&(e=s(g([84,114,105,97,108,76,105,109,105,116]))),await(e&&p?new(window[g([80,114,111,109,105,115,101])])((t,r)=>{e[g([116,104,101,110])](t,r),p[g([116,104,101,110])](e=>{e!=g([86,97,108,105,100])&&t(e)},r)}):e||p||g([86,97,108,105,100]))):g([68,111,109,97,105,110,76,105,109,105,116]):g([78,111,116,65,108,108,111,119,101,100]):g([73,110,118,97,108,105,100])):g([73,110,118,97,108,105,100]))}catch{return g([73,110,118,97,108,105,100])}}())}(this)}[ge(218)](){const t=ge,e=this[t(213)][t(236)][t(261)];e[t(272)](t(211))&&e[t(243)](t(211),{allowAttributes:[t(230)]}),e[t(272)](t(262))&&e[t(243)](t(262),{allowAttributes:[t(230)]})}[ge(283)](){const t=ge,e=this[t(213)];e[t(239)][t(215)](t(247))[t(267)]({model:t(230),view:t(290)}),e[t(239)][t(215)](t(289))[t(250)]({model:{key:t(230),value:e=>e[t(226)](t(290))},view:{attributes:{"data-uc-image-id":/[a-zA-Z0-9\\-]+/}}});const r=e[t(241)][t(207)](t(282));r&&this[t(259)](r,t(278),(e,[r,o])=>{const i=t;r[i(252)](i(230),o)})}[ge(260)](){const t=ge,e=this[t(213)][t(285)][t(207)](t(208))||{},r=this[t(213)][t(285)][t(207)](t(222))||"";this[t(225)]=(0,L.createElement)(L.global[t(232)],t(286),{...e,pubkey:r,"ctx-name":t(284)+this[t(292)],sourceList:"",imgOnly:t(244),removeCopyright:t(244),localeName:this[t(213)][t(219)][t(240)],externalSourcesEmbedCss:t(242)}),this[t(225)][t(251)]=e=>{const r=t;if(r(255)==e)return r(235)},L.global[t(232)][t(216)][t(234)](this[t(225)])}[ge(268)](){const t=ge;this[t(214)]=(0,L.createElement)(L.global[t(232)],t(288),{"ctx-name":t(284)+this[t(292)]}),L.global[t(232)][t(216)][t(234)](this[t(214)])}[ge(227)](){const t=ge,e=this[t(213)][t(241)][t(207)](t(209));e&&this[t(259)](e,t(281),()=>{const e=t,r=this[e(213)][e(236)][e(232)][e(265)][e(277)]();r&&r[e(226)](e(230))&&this[e(213)][e(291)][e(229)][e(248)](e(280),()=>{G(this[e(213)],r)})});const r=this[t(213)][t(241)][t(207)](t(269));r&&this[t(259)](r,t(281),()=>{const e=t,r=this[e(213)][e(236)][e(232)][e(265)][e(277)]();r&&r[e(226)](e(230))&&this[e(213)][e(291)][e(229)][e(248)](e(280),()=>{G(this[e(213)],r)})})}}var ve=Object.defineProperty,ye=(t,e,r)=>(((t,e,r)=>{e in t?ve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r})(t,"symbol"!=typeof e?e+"":e,r),r);var we=class{constructor(t){t.constructor===Object?this.store=function(t){let e=t=>{var r;for(let o in t)(null==(r=t[o])?void 0:r.constructor)===Object&&(t[o]=e(t[o]));return{...t}};return e(t)}(t):(this._storeIsProxy=!0,this.store=t),this.callbackMap=Object.create(null)}static warn(t,e){console.warn(`Symbiote Data: cannot ${t}. Prop name: `+e)}read(t){return this._storeIsProxy||this.store.hasOwnProperty(t)?this.store[t]:(we.warn("read",t),null)}has(t){return this._storeIsProxy?void 0!==this.store[t]:this.store.hasOwnProperty(t)}add(t,e,r=!1){!r&&Object.keys(this.store).includes(t)||(this.store[t]=e,this.notify(t))}pub(t,e){this._storeIsProxy||this.store.hasOwnProperty(t)?(this.store[t]=e,this.notify(t)):we.warn("publish",t)}multiPub(t){for(let e in t)this.pub(e,t[e])}notify(t){this.callbackMap[t]&&this.callbackMap[t].forEach(e=>{e(this.store[t])})}sub(t,e,r=!0){return this._storeIsProxy||this.store.hasOwnProperty(t)?(this.callbackMap[t]||(this.callbackMap[t]=new Set),this.callbackMap[t].add(e),r&&e(this.store[t]),{remove:()=>{this.callbackMap[t].delete(e),this.callbackMap[t].size||delete this.callbackMap[t]},callback:e}):(we.warn("subscribe",t),null)}static registerCtx(t,e=Symbol()){let r=we.globalStore.get(e);return r?console.warn('State: context UID "'+e+'" already in use'):(r=new we(t),we.globalStore.set(e,r)),r}static deleteCtx(t){we.globalStore.delete(t)}static getCtx(t,e=!0){return we.globalStore.get(t)||(e&&console.warn('State: wrong context UID - "'+t+'"'),null)}};we.globalStore=new Map;var _e=Object.freeze({BIND_ATTR:"set",ATTR_BIND_PRFX:"@",EXT_DATA_CTX_PRFX:"*",NAMED_DATA_CTX_SPLTR:"/",CTX_NAME_ATTR:"ctx-name",CTX_OWNER_ATTR:"ctx-owner",CSS_CTX_PROP:"--ctx-name",EL_REF_ATTR:"ref",AUTO_TAG_PRFX:"sym",REPEAT_ATTR:"repeat",REPEAT_ITEM_TAG_ATTR:"repeat-item-tag",SET_LATER_KEY:"__toSetLater__",USE_TPL:"use-template",ROOT_STYLE_ATTR_NAME:"sym-component"}),ke="1234567890QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm",xe=class{static generate(t="XXXXXXXXX-XXX"){let e="";for(let r=0;r<t.length;r++)e+="-"===t[r]?t[r]:ke.charAt(61*Math.random());return e}};function Ce(t,e,r){let o,i=!0,n=e.split(".");return n.forEach((e,r)=>{r<n.length-1?t=t[e]:o=e}),t?t[o]=r:i=!1,i}var Ee="__default__";var Te="{{",Ae="}}";var Ie=[function(t,e){[...t.querySelectorAll(`[${_e.REPEAT_ATTR}]`)].forEach(t=>{let r,o=t.getAttribute(_e.REPEAT_ITEM_TAG_ATTR);if(o&&(r=window.customElements.get(o)),!r){r=class extends e.BaseComponent{constructor(){super(),o||(this.style.display="contents")}};let i=t.innerHTML;r.template=i,r.reg(o)}for(;t.firstChild;)t.firstChild.remove();let i=t.getAttribute(_e.REPEAT_ATTR);e.sub(i,e=>{if(!e){for(;t.firstChild;)t.firstChild.remove();return}let o,i=[...t.children],n=e=>{e.forEach((t,e)=>{if(i[e])if(i[e].set$)setTimeout(()=>{i[e].set$(t)});else for(let r in t)i[e][r]=t[r];else{o||(o=new DocumentFragment);let e=new r;Object.assign(e.init$,t),o.appendChild(e)}}),o&&t.appendChild(o);let n=i.slice(e.length,i.length);for(let t of n)t.remove()};if(e.constructor===Array)n(e);else if(e.constructor===Object){let t=[];for(let r in e){let o=e[r];Object.defineProperty(o,"_KEY_",{value:r,enumerable:!0}),t.push(o)}n(t)}else console.warn("Symbiote repeat data type error:"),console.log(e)}),t.removeAttribute(_e.REPEAT_ATTR),t.removeAttribute(_e.REPEAT_ITEM_TAG_ATTR)})},function(t,e){if(e.shadowRoot)return;let r=[...t.querySelectorAll("slot")];if(!r.length)return;let o={};r.forEach(t=>{let e=t.getAttribute("name")||Ee;o[e]={slot:t,fr:document.createDocumentFragment()}}),e.initChildren.forEach(t=>{var e;let r=Ee;t instanceof Element&&t.hasAttribute("slot")&&(r=t.getAttribute("slot"),t.removeAttribute("slot")),null==(e=o[r])||e.fr.appendChild(t)}),Object.values(o).forEach(t=>{if(t.fr.childNodes.length)t.slot.parentNode.replaceChild(t.fr,t.slot);else if(t.slot.childNodes.length){let e=document.createDocumentFragment();e.append(...t.slot.childNodes),t.slot.parentNode.replaceChild(e,t.slot)}else t.slot.remove()})},function(t,e){[...t.querySelectorAll(`[${_e.EL_REF_ATTR}]`)].forEach(t=>{let r=t.getAttribute(_e.EL_REF_ATTR);e.ref[r]=t,t.removeAttribute(_e.EL_REF_ATTR)})},function(t,e){[...t.querySelectorAll(`[${_e.BIND_ATTR}]`)].forEach(t=>{let r=t.getAttribute(_e.BIND_ATTR).split(";");[...t.attributes].forEach(e=>{if(e.name.startsWith("-")&&e.value){let o=e.name.replace("-","").split("-").map((t,e)=>t&&e?t[0].toUpperCase()+t.slice(1):t).join("").split("_").map((t,e)=>t&&e?t.toUpperCase():t).join("");r.push(o+":"+e.value),t.removeAttribute(e.name)}}),r.forEach(r=>{if(!r)return;let o,i=r.split(":").map(t=>t.trim()),n=i[0];0===n.indexOf(_e.ATTR_BIND_PRFX)&&(o=!0,n=n.replace(_e.ATTR_BIND_PRFX,""));let a=i[1].split(",").map(t=>t.trim());for(let r of a){let i;r.startsWith("!!")?(i="double",r=r.replace("!!","")):r.startsWith("!")&&(i="single",r=r.replace("!","")),e.sub(r,e=>{"double"===i?e=!!e:"single"===i&&(e=!e),o?(null==e?void 0:e.constructor)===Boolean?e?t.setAttribute(n,""):t.removeAttribute(n):t.setAttribute(n,e):Ce(t,n,e)||(t[_e.SET_LATER_KEY]||(t[_e.SET_LATER_KEY]=Object.create(null)),t[_e.SET_LATER_KEY][n]=e)})}}),t.removeAttribute(_e.BIND_ATTR)})},function(t,e){(function(t){let e,r=[],o=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode:t=>{var e;return!(null==(e=t.parentElement)?void 0:e.hasAttribute("skip-text"))&&t.textContent.includes(Te)&&t.textContent.includes(Ae)&&1}});for(;e=o.nextNode();)r.push(e);return r})(t).forEach(t=>{let r,o=[];for(;t.textContent.includes(Ae);)t.textContent.startsWith(Te)?(r=t.textContent.indexOf(Ae)+2,t.splitText(r),o.push(t)):(r=t.textContent.indexOf(Te),t.splitText(r)),t=t.nextSibling;o.forEach(t=>{let r=t.textContent.replace(Te,"").replace(Ae,"");t.textContent="",e.sub(r,e=>{t.textContent=e})})})}],Se="'",Me='"',$e=/\\([0-9a-fA-F]{1,6} ?)/g;function Le(t){let e=t;var r;(r=t)[0]!==Me&&r[0]!==Se||r[r.length-1]!==Me&&r[r.length-1]!==Se||(e=function(t){return t[0]!==Me&&t[0]!==Se||(t=t.slice(1)),t[t.length-1]!==Me&&t[t.length-1]!==Se||(t=t.slice(0,-1)),t}(e),e=e.replace($e,(t,e)=>String.fromCodePoint(parseInt(e.trim(),16))),e=e.replaceAll("\\\n","\\n"),e=function(t){let e="",r="";for(var o=0;o<t.length;o++){const i=t[o+1];"\\"===t[o]&&'"'===i?(e+='\\"',o++):'"'===t[o]&&"\\"!==r?e+='\\"':e+=t[o],r=t[o]}return e}(e),e=Me+e+Me);try{return JSON.parse(e)}catch(r){throw new Error(`Failed to parse CSS property value: ${e}. Original input: ${t}`)}}var Oe=0,Ue=null,Re=null,Pe=class extends HTMLElement{constructor(){super(),ye(this,"updateCssData",()=>{var t;this.dropCssDataCache(),null==(t=this.__boundCssProps)||t.forEach(t=>{let e=this.getCssData(this.__extractCssName(t),!0);null!==e&&this.$[t]!==e&&(this.$[t]=e)})}),this.init$=Object.create(null),this.cssInit$=Object.create(null),this.tplProcessors=new Set,this.ref=Object.create(null),this.allSubs=new Set,this.pauseRender=!1,this.renderShadow=!1,this.readyToDestroy=!0,this.processInnerHtml=!1,this.allowCustomTemplate=!1,this.ctxOwner=!1}get BaseComponent(){return Pe}initCallback(){}__initCallback(){var t;this.__initialized||(this.__initialized=!0,null==(t=this.initCallback)||t.call(this))}render(t,e=this.renderShadow){let r;if(!e&&!this.constructor.__shadowStylesUrl||this.shadowRoot||this.attachShadow({mode:"open"}),this.allowCustomTemplate){let e=this.getAttribute(_e.USE_TPL);if(e){let r=this.getRootNode(),o=(null==r?void 0:r.querySelector(e))||document.querySelector(e);o?t=o.content.cloneNode(!0):console.warn(`Symbiote template "${e}" is not found...`)}}if(this.processInnerHtml)for(let t of this.tplProcessors)t(this,this);if(t||this.constructor.template){if(this.constructor.template&&!this.constructor.__tpl&&(this.constructor.__tpl=document.createElement("template"),this.constructor.__tpl.innerHTML=this.constructor.template),(null==t?void 0:t.constructor)===DocumentFragment)r=t;else if((null==t?void 0:t.constructor)===String){let e=document.createElement("template");e.innerHTML=t,r=e.content.cloneNode(!0)}else this.constructor.__tpl&&(r=this.constructor.__tpl.content.cloneNode(!0));for(let t of this.tplProcessors)t(r,this)}let o=()=>{r&&(e&&this.shadowRoot.appendChild(r)||this.appendChild(r)),this.__initCallback()};if(this.constructor.__shadowStylesUrl){e=!0;let t=document.createElement("link");t.rel="stylesheet",t.href=this.constructor.__shadowStylesUrl,t.onload=o,this.shadowRoot.prepend(t)}else o()}addTemplateProcessor(t){this.tplProcessors.add(t)}get autoCtxName(){return this.__autoCtxName||(this.__autoCtxName=xe.generate(),this.style.setProperty(_e.CSS_CTX_PROP,`'${this.__autoCtxName}'`)),this.__autoCtxName}get cssCtxName(){return this.getCssData(_e.CSS_CTX_PROP,!0)}get ctxName(){var t;let e=(null==(t=this.getAttribute(_e.CTX_NAME_ATTR))?void 0:t.trim())||this.cssCtxName||this.__cachedCtxName||this.autoCtxName;return this.__cachedCtxName=e,e}get localCtx(){return this.__localCtx||(this.__localCtx=we.registerCtx({},this)),this.__localCtx}get nodeCtx(){return we.getCtx(this.ctxName,!1)||we.registerCtx({},this.ctxName)}static __parseProp(t,e){let r,o;if(t.startsWith(_e.EXT_DATA_CTX_PRFX))r=e.nodeCtx,o=t.replace(_e.EXT_DATA_CTX_PRFX,"");else if(t.includes(_e.NAMED_DATA_CTX_SPLTR)){let e=t.split(_e.NAMED_DATA_CTX_SPLTR);r=we.getCtx(e[0]),o=e[1]}else r=e.localCtx,o=t;return{ctx:r,name:o}}sub(t,e,r=!0){let o=t=>{this.isConnected&&e(t)},i=Pe.__parseProp(t,this);i.ctx.has(i.name)?this.allSubs.add(i.ctx.sub(i.name,o,r)):window.setTimeout(()=>{this.allSubs.add(i.ctx.sub(i.name,o,r))})}notify(t){let e=Pe.__parseProp(t,this);e.ctx.notify(e.name)}has(t){let e=Pe.__parseProp(t,this);return e.ctx.has(e.name)}add(t,e,r=!1){let o=Pe.__parseProp(t,this);o.ctx.add(o.name,e,r)}add$(t,e=!1){for(let r in t)this.add(r,t[r],e)}get $(){if(!this.__stateProxy){let t=Object.create(null);this.__stateProxy=new Proxy(t,{set:(t,e,r)=>{let o=Pe.__parseProp(e,this);return o.ctx.pub(o.name,r),!0},get:(t,e)=>{let r=Pe.__parseProp(e,this);return r.ctx.read(r.name)}})}return this.__stateProxy}set$(t,e=!1){for(let r in t){let o=t[r],i=[String,Number,Boolean];(e||!i.includes(null==o?void 0:o.constructor)||this.$[r]!==o)&&(this.$[r]=o)}}get __ctxOwner(){return this.ctxOwner||this.hasAttribute(_e.CTX_OWNER_ATTR)&&"false"!==this.getAttribute(_e.CTX_OWNER_ATTR)}__initDataCtx(){let t=this.constructor.__attrDesc;if(t)for(let e of Object.values(t))Object.keys(this.init$).includes(e)||(this.init$[e]="");for(let t in this.init$)if(t.startsWith(_e.EXT_DATA_CTX_PRFX))this.nodeCtx.add(t.replace(_e.EXT_DATA_CTX_PRFX,""),this.init$[t],this.__ctxOwner);else if(t.includes(_e.NAMED_DATA_CTX_SPLTR)){let e=t.split(_e.NAMED_DATA_CTX_SPLTR),r=e[0].trim(),o=e[1].trim();if(r&&o){let e=we.getCtx(r,!1);e||(e=we.registerCtx({},r)),e.add(o,this.init$[t])}}else this.localCtx.add(t,this.init$[t]);for(let t in this.cssInit$)this.bindCssData(t,this.cssInit$[t]);this.__dataCtxInitialized=!0}connectedCallback(){var t;if(this.isConnected){if(this.__disconnectTimeout&&window.clearTimeout(this.__disconnectTimeout),!this.connectedOnce){let e=null==(t=this.getAttribute(_e.CTX_NAME_ATTR))?void 0:t.trim();if(e&&this.style.setProperty(_e.CSS_CTX_PROP,`'${e}'`),this.__initDataCtx(),this[_e.SET_LATER_KEY]){for(let t in this[_e.SET_LATER_KEY])Ce(this,t,this[_e.SET_LATER_KEY][t]);delete this[_e.SET_LATER_KEY]}this.initChildren=[...this.childNodes];for(let t of Ie)this.addTemplateProcessor(t);if(this.pauseRender)this.__initCallback();else if(this.constructor.__rootStylesLink){let t=this.getRootNode();if(!t)return;if(null==t?void 0:t.querySelector(`link[${_e.ROOT_STYLE_ATTR_NAME}="${this.constructor.is}"]`))return void this.render();let e=this.constructor.__rootStylesLink.cloneNode(!0);e.setAttribute(_e.ROOT_STYLE_ATTR_NAME,this.constructor.is),e.onload=()=>{this.render()},t.nodeType===Node.DOCUMENT_NODE?t.head.appendChild(e):t.prepend(e)}else this.render()}this.connectedOnce=!0}}destroyCallback(){}disconnectedCallback(){this.connectedOnce&&(this.dropCssDataCache(),this.readyToDestroy&&(this.__disconnectTimeout&&window.clearTimeout(this.__disconnectTimeout),this.__disconnectTimeout=window.setTimeout(()=>{this.destroyCallback();for(let t of this.allSubs)t.remove(),this.allSubs.delete(t);for(let t of this.tplProcessors)this.tplProcessors.delete(t);null==Re||Re.delete(this.updateCssData),(null==Re?void 0:Re.size)||(null==Ue||Ue.disconnect(),Ue=null,Re=null)},100)))}static reg(t,e=!1){t||(Oe++,t=`${_e.AUTO_TAG_PRFX}-${Oe}`),this.__tag=t;let r=window.customElements.get(t);r?e||r===this||console.warn([`Element with tag name "${t}" already registered.`,`You're trying to override it with another class "${this.name}".`,"This is most likely a mistake.","New element will not be registered."].join("\n")):window.customElements.define(t,e?class extends(this){}:this)}static get is(){return this.__tag||this.reg(),this.__tag}static bindAttributes(t){this.observedAttributes=Object.keys(t),this.__attrDesc=t}attributeChangedCallback(t,e,r){var o;if(e===r)return;let i=null==(o=this.constructor.__attrDesc)?void 0:o[t];i?this.__dataCtxInitialized?this.$[i]=r:this.init$[i]=r:this[t]=r}getCssData(t,e=!1){if(this.__cssDataCache||(this.__cssDataCache=Object.create(null)),!Object.keys(this.__cssDataCache).includes(t)){this.__computedStyle||(this.__computedStyle=window.getComputedStyle(this));let r=this.__computedStyle.getPropertyValue(t).trim();try{this.__cssDataCache[t]=Le(r)}catch(r){!e&&console.warn(`CSS Data error: ${t}`),this.__cssDataCache[t]=null}}return this.__cssDataCache[t]}__extractCssName(t){return t.split("--").map((t,e)=>0===e?"":t).join("--")}__initStyleAttrObserver(){Re||(Re=new Set),Re.add(this.updateCssData),Ue||(Ue=new MutationObserver(t=>{"attributes"===t[0].type&&Re.forEach(t=>{t()})})).observe(document,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]})}bindCssData(t,e=""){this.__boundCssProps||(this.__boundCssProps=new Set),this.__boundCssProps.add(t);let r=this.getCssData(this.__extractCssName(t),!0);null===r&&(r=e),this.add(t,r),this.__initStyleAttrObserver()}dropCssDataCache(){this.__cssDataCache=null,this.__computedStyle=null}defineAccessor(t,e,r){let o="__"+t;this[o]=this[t],Object.defineProperty(this,t,{set:t=>{this[o]=t,r?window.setTimeout(()=>{null==e||e(t)}):null==e||e(t)},get:()=>this[o]}),this[t]=this[o]}static set shadowStyles(t){let e=new Blob([t],{type:"text/css"});this.__shadowStylesUrl=URL.createObjectURL(e)}static set rootStyles(t){if(!this.__rootStylesLink){let e=new Blob([t],{type:"text/css"}),r=URL.createObjectURL(e),o=document.createElement("link");o.href=r,o.rel="stylesheet",this.__rootStylesLink=o}}},Ne=Pe;ye(Ne,"template");var ze=class{static _print(t){console.warn(t)}static setDefaultTitle(t){this.defaultTitle=t}static setRoutingMap(t){Object.assign(this.appMap,t);for(let t in this.appMap)this.defaultRoute||!0!==this.appMap[t].default?this.errorRoute||!0!==this.appMap[t].error||(this.errorRoute=t):this.defaultRoute=t}static set routingEventName(t){this.__routingEventName=t}static get routingEventName(){return this.__routingEventName||"sym-on-route"}static readAddressBar(){let t={route:null,options:{}};return window.location.search.split(this.separator).forEach(e=>{if(e.includes("?"))t.route=e.replace("?","");else if(e.includes("=")){let r=e.split("=");t.options[r[0]]=decodeURI(r[1])}else t.options[e]=!0}),t}static notify(){let t=this.readAddressBar(),e=this.appMap[t.route];if(e&&e.title&&(document.title=e.title),null===t.route&&this.defaultRoute)return void this.applyRoute(this.defaultRoute);if(!e&&this.errorRoute)return void this.applyRoute(this.errorRoute);if(!e&&this.defaultRoute)return void this.applyRoute(this.defaultRoute);if(!e)return void this._print(`Route "${t.route}" not found...`);let r=new CustomEvent(ze.routingEventName,{detail:{route:t.route,options:Object.assign(e||{},t.options)}});window.dispatchEvent(r)}static reflect(t,e={}){let r=this.appMap[t];if(!r)return void this._print("Wrong route: "+t);let o="?"+t;for(let t in e)!0===e[t]?o+=this.separator+t:o+=this.separator+t+`=${e[t]}`;let i=r.title||this.defaultTitle||"";window.history.pushState(null,i,o),document.title=i}static applyRoute(t,e={}){this.reflect(t,e),this.notify()}static setSeparator(t){this._separator=t}static get separator(){return this._separator||"&"}static createRouterData(t,e){this.setRoutingMap(e);let r=we.registerCtx({route:null,options:null,title:null},t);return window.addEventListener(this.routingEventName,t=>{var e;r.multiPub({route:t.detail.route,options:t.detail.options,title:(null==(e=t.detail.options)?void 0:e.title)||this.defaultTitle||""})}),ze.notify(),this.initPopstateListener(),r}static initPopstateListener(){this.__onPopstate||(this.__onPopstate=()=>{this.notify()},window.addEventListener("popstate",this.__onPopstate))}static removePopstateListener(){window.removeEventListener("popstate",this.__onPopstate),this.__onPopstate=null}};function De(t,e){for(let r in e)r.includes("-")?t.style.setProperty(r,e[r]):t.style[r]=e[r]}function Fe(t={tag:"div"}){let e=document.createElement(t.tag);if(t.attributes&&function(t,e){for(let r in e)e[r].constructor===Boolean?e[r]?t.setAttribute(r,""):t.removeAttribute(r):t.setAttribute(r,e[r])}(e,t.attributes),t.styles&&De(e,t.styles),t.properties)for(let r in t.properties)e[r]=t.properties[r];return t.processors&&t.processors.forEach(t=>{t(e)}),t.children&&t.children.forEach(t=>{let r=Fe(t);e.appendChild(r)}),e}ze.appMap=Object.create(null);var Ve="idb-store-ready",Be=class{_notifyWhenReady(t=null){window.dispatchEvent(new CustomEvent(Ve,{detail:{dbName:this.name,storeName:this.storeName,event:t}}))}get _updEventName(){return"symbiote-idb-update_"+this.name}_getUpdateEvent(t){return new CustomEvent(this._updEventName,{detail:{key:this.name,newValue:t}})}_notifySubscribers(t){window.localStorage.removeItem(this.name),window.localStorage.setItem(this.name,t),window.dispatchEvent(this._getUpdateEvent(t))}constructor(t,e){this.name=t,this.storeName=e,this.version=1,this.request=window.indexedDB.open(this.name,this.version),this.request.onupgradeneeded=t=>{this.db=t.target.result,this.objStore=this.db.createObjectStore(e,{keyPath:"_key"}),this.objStore.transaction.oncomplete=t=>{this._notifyWhenReady(t)}},this.request.onsuccess=t=>{this.db=t.target.result,this._notifyWhenReady(t)},this.request.onerror=t=>{console.error(t)},this._subscriptionsMap={},this._updateHandler=t=>{if(t.key===this.name&&this._subscriptionsMap[t.newValue]){this._subscriptionsMap[t.newValue].forEach(async e=>{e(await this.read(t.newValue))})}},this._localUpdateHandler=t=>{this._updateHandler(t.detail)},window.addEventListener("storage",this._updateHandler),window.addEventListener(this._updEventName,this._localUpdateHandler)}read(t){let e=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).get(t);return new Promise((r,o)=>{e.onsuccess=e=>{var o;(null==(o=e.target.result)?void 0:o._value)?r(e.target.result._value):(r(null),console.warn(`IDB: cannot read "${t}"`))},e.onerror=t=>{o(t)}})}write(t,e,r=!1){let o={_key:t,_value:e},i=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).put(o);return new Promise((e,o)=>{i.onsuccess=o=>{r||this._notifySubscribers(t),e(o.target.result)},i.onerror=t=>{o(t)}})}delete(t,e=!1){let r=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).delete(t);return new Promise((o,i)=>{r.onsuccess=r=>{e||this._notifySubscribers(t),o(r)},r.onerror=t=>{i(t)}})}getAll(){let t=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).getAll();return new Promise((e,r)=>{t.onsuccess=t=>{let r=t.target.result;e(r.map(t=>t._value))},t.onerror=t=>{r(t)}})}subscribe(t,e){this._subscriptionsMap[t]||(this._subscriptionsMap[t]=new Set);let r=this._subscriptionsMap[t];return r.add(e),{remove:()=>{r.delete(e),r.size||delete this._subscriptionsMap[t]}}}stop(){window.removeEventListener("storage",this._updateHandler),this._subscriptionsMap=null,je.clear(this.name)}},je=class{static get readyEventName(){return Ve}static open(t="symbiote-db",e="store"){let r=t+"/"+e;return this._reg[r]||(this._reg[r]=new Be(t,e)),this._reg[r]}static clear(t){window.indexedDB.deleteDatabase(t);for(let e in this._reg)e.split("/")[0]===t&&delete this._reg[e]}};function He(t){return"[object Object]"===Object.prototype.toString.call(t)}ye(je,"_reg",Object.create(null));const qe=/\W|_/g;function Ke(t){return t.split(qe).map((t,e)=>t.charAt(0)[e>0?"toUpperCase":"toLowerCase"]()+t.slice(1)).join("")}function Ge(t,{ignoreKeys:e}={ignoreKeys:[]}){return Array.isArray(t)?t.map(t=>We(t,{ignoreKeys:e})):t}function We(t,{ignoreKeys:e}={ignoreKeys:[]}){if(Array.isArray(t))return Ge(t,{ignoreKeys:e});if(!He(t))return t;const r={};for(const o of Object.keys(t)){let i=t[o];e.includes(o)?r[o]=i:(He(i)?i=We(i,{ignoreKeys:e}):Array.isArray(i)&&(i=Ge(i,{ignoreKeys:e})),r[Ke(o)]=i)}return r}function Ze({libraryName:t,libraryVersion:e,userAgent:r,publicKey:o="",integration:i=""}){const n="JavaScript";if("string"==typeof r)return r;if("function"==typeof r)return r({publicKey:o,libraryName:t,libraryVersion:e,languageName:n,integration:i});return`${[t,e,o].filter(Boolean).join("/")} (${[n,i].filter(Boolean).join("; ")})`}const Xe={factor:2,time:100};function Ye(t,e=Xe){let r=0;return function t(o){const i=Math.round(e.time*e.factor**r);return o({attempt:r,retry:e=>(t=>new Promise(e=>setTimeout(e,t)))(e??i).then(()=>(r+=1,t(o)))})}(t)}class Je extends Error{}class Qe extends Je{originalProgressEvent;constructor(t){super(),this.name="NetworkError",this.message="Network error",Object.setPrototypeOf(this,Qe.prototype),this.originalProgressEvent=t}}const tr=(t,e)=>{t&&(t.aborted?Promise.resolve().then(e):t.addEventListener("abort",()=>e(),{once:!0}))};class er extends Je{isCancel=!0;constructor(t="Request canceled"){super(t),this.name="CancelError",Object.setPrototypeOf(this,er.prototype)}}const rr=({check:t,interval:e=500,timeout:r,signal:o})=>new Promise((i,n)=>{let a,s;tr(o,()=>{a&&clearTimeout(a),n(new er("Poll cancelled"))}),r&&(s=setTimeout(()=>{a&&clearTimeout(a),n(new er("Timed out"))},r));const c=()=>{try{Promise.resolve(t(o)).then(t=>{t?(s&&clearTimeout(s),i(t)):a=setTimeout(c,e)}).catch(t=>{s&&clearTimeout(s),n(t)})}catch(t){s&&clearTimeout(s),n(t)}};a=setTimeout(c,0)}),or={baseCDN:"https://ucarecdn.com",baseURL:"https://upload.uploadcare.com",maxContentLength:52428800,retryThrottledRequestMaxTimes:1,retryNetworkErrorMaxTimes:3,multipartMinFileSize:26214400,multipartChunkSize:5242880,multipartMinLastPartSize:1048576,maxConcurrentRequests:4,pollingTimeoutMilliseconds:1e4,pusherKey:"79ae88bd931ea68464d9"},ir="application/octet-stream",nr="original",ar=({method:t,url:e,data:r,headers:o={},signal:i,onProgress:n})=>new Promise((a,s)=>{const c=new XMLHttpRequest,l=t?.toUpperCase()||"GET";let u=!1;c.open(l,e,!0),o&&Object.entries(o).forEach(t=>{const[e,r]=t;void 0!==r&&!Array.isArray(r)&&c.setRequestHeader(e,r)}),c.responseType="text",tr(i,()=>{u=!0,c.abort(),s(new er)}),c.onload=()=>{if(200!=c.status)s(new Error(`Error ${c.status}: ${c.statusText}`));else{const t={method:l,url:e,data:r,headers:o||void 0,signal:i,onProgress:n},s=c.getAllResponseHeaders().trim().split(/[\r\n]+/),u={};s.forEach(function(t){const e=t.split(": "),r=e.shift(),o=e.join(": ");r&&void 0!==r&&(u[r]=o)});const d=c.response,h=c.status;a({request:t,data:d,headers:u,status:h})}},c.onerror=t=>{u||s(new Qe(t))},n&&"function"==typeof n&&(c.upload.onprogress=t=>{t.lengthComputable?n({isComputable:!0,value:t.loaded/t.total}):n({isComputable:!1})}),r?c.send(r):c.send()});const sr=function(t,...e){return t};const cr=t=>"undefined"!=typeof Blob&&t instanceof Blob,lr=t=>"undefined"!=typeof File&&t instanceof File,ur=t=>!!t&&"object"==typeof t&&!Array.isArray(t)&&"uri"in t&&"string"==typeof t.uri,dr=t=>cr(t)||lr(t)||ur(t);function hr(t,e,r){if(Array.isArray(r))for(const o of r)hr(t,`${e}[]`,o);else if((o=r)&&"object"==typeof o&&"data"in o&&dr(o.data)){const{name:o,contentType:i}=r,n=sr(r.data,o,i??ir),a=(({name:t})=>t?[t]:[])({name:o,contentType:i});t.push([e,n,...a])}else if((t=>!!t&&"object"==typeof t&&!Array.isArray(t))(r))for(const[o,i]of Object.entries(r))void 0!==i&&t.push([`${e}[${o}]`,String(i)]);else(t=>"string"==typeof t||"number"==typeof t||void 0===t)(r)&&r&&t.push([e,r.toString()]);var o}function pr(t){const e=new FormData,r=function(t){const e=[];for(const[r,o]of Object.entries(t))hr(e,r,o);return e}(t);for(const t of r){const[r,o,...i]=t;e.append(r,o,...i)}return e}class gr extends Je{code;request;response;headers;constructor(t,e,r,o,i){super(),this.name="UploadError",this.message=t,this.code=e,this.request=r,this.response=o,this.headers=i,Object.setPrototypeOf(this,gr.prototype)}}const mr=(t,e,r)=>{const o=new URL(t);return o.pathname=(o.pathname+e).replace("//","/"),r&&(o.search=(t=>{const e=new URLSearchParams;for(const[r,o]of Object.entries(t))o&&"object"==typeof o&&!Array.isArray(o)?Object.entries(o).filter(t=>t[1]??!1).forEach(t=>e.set(`${r}[${t[0]}]`,String(t[1]))):Array.isArray(o)?o.forEach(t=>{e.append(`${r}[]`,t)}):"string"==typeof o&&o?e.set(r,o):"number"==typeof o&&e.set(r,o.toString());return e.toString()})(r)),o.toString()};function fr(t){return Ze({libraryName:"UploadcareUploadClient",libraryVersion:"6.18.2",...t})}function br(t,e){const{retryThrottledRequestMaxTimes:r,retryNetworkErrorMaxTimes:o}=e;return Ye(({attempt:e,retry:i})=>t().catch(t=>{if("response"in t&&"RequestThrottledError"===t?.code&&e<r)return i(function(t){const{headers:e}=t||{};if(!e||"string"!=typeof e["retry-after"])return 15e3;const r=parseInt(e["retry-after"],10);return Number.isFinite(r)?1e3*r:15e3}(t));if(t instanceof Qe&&e<o)return i(1e3*(e+1));throw t}))}const vr=t=>{let e="";return(cr(t)||lr(t)||ur(t))&&(e=t.type),e||ir},yr=t=>{let e="";return lr(t)&&t.name?e=t.name:cr(t)?e="":ur(t)&&t.name&&(e=t.name),e||nr};function wr(t){return void 0===t||"auto"===t?"auto":t?"1":"0"}function _r(t,{publicKey:e,fileName:r,contentType:o,baseURL:i=or.baseURL,secureSignature:n,secureExpire:a,store:s,signal:c,onProgress:l,source:u="local",integration:d,userAgent:h,retryThrottledRequestMaxTimes:p=or.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:g=or.retryNetworkErrorMaxTimes,metadata:m}){return br(()=>ar({method:"POST",url:mr(i,"/base/",{jsonerrors:1}),headers:{"X-UC-User-Agent":fr({publicKey:e,integration:d,userAgent:h})},data:pr({file:{data:t,name:r||yr(t),contentType:o||vr(t)},UPLOADCARE_PUB_KEY:e,UPLOADCARE_STORE:wr(s),signature:n,expire:a,source:u,metadata:m}),signal:c,onProgress:l}).then(({data:t,headers:e,request:r})=>{const o=We(JSON.parse(t));if("error"in o)throw new gr(o.error.content,o.error.errorCode,r,o,e);return o}),{retryNetworkErrorMaxTimes:g,retryThrottledRequestMaxTimes:p})}var kr,xr;function Cr(t,{publicKey:e,baseURL:r=or.baseURL,store:o,fileName:i,checkForUrlDuplicates:n,saveUrlForRecurrentUploads:a,secureSignature:s,secureExpire:c,source:l="url",signal:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p=or.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:g=or.retryNetworkErrorMaxTimes,metadata:m}){return br(()=>ar({method:"POST",headers:{"X-UC-User-Agent":fr({publicKey:e,integration:d,userAgent:h})},url:mr(r,"/from_url/",{jsonerrors:1,pub_key:e,source_url:t,store:wr(o),filename:i,check_URL_duplicates:n?1:void 0,save_URL_duplicates:a?1:void 0,signature:s,expire:c,source:l,metadata:m}),signal:u}).then(({data:t,headers:e,request:r})=>{const o=We(JSON.parse(t));if("error"in o)throw new gr(o.error.content,o.error.errorCode,r,o,e);return o}),{retryNetworkErrorMaxTimes:g,retryThrottledRequestMaxTimes:p})}!function(t){t.Token="token",t.FileInfo="file_info"}(kr||(kr={})),function(t){t.Unknown="unknown",t.Waiting="waiting",t.Progress="progress",t.Error="error",t.Success="success"}(xr||(xr={}));function Er(t,{publicKey:e,baseURL:r=or.baseURL,signal:o,integration:i,userAgent:n,retryThrottledRequestMaxTimes:a=or.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:s=or.retryNetworkErrorMaxTimes}={}){return br(()=>ar({method:"GET",headers:e?{"X-UC-User-Agent":fr({publicKey:e,integration:i,userAgent:n})}:void 0,url:mr(r,"/from_url/status/",{jsonerrors:1,token:t}),signal:o}).then(({data:t,headers:e,request:r})=>{const o=We(JSON.parse(t));if("error"in o&&!(t=>"status"in t&&t.status===xr.Error)(o))throw new gr(o.error.content,o.error.errorCode,r,o,e);return o}),{retryNetworkErrorMaxTimes:s,retryThrottledRequestMaxTimes:a})}function Tr(t,{publicKey:e,baseURL:r=or.baseURL,jsonpCallback:o,secureSignature:i,secureExpire:n,signal:a,source:s,integration:c,userAgent:l,retryThrottledRequestMaxTimes:u=or.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:d=or.retryNetworkErrorMaxTimes}){return br(()=>ar({method:"POST",headers:{"X-UC-User-Agent":fr({publicKey:e,integration:c,userAgent:l})},url:mr(r,"/group/",{jsonerrors:1}),data:pr({files:t,callback:o,pub_key:e,signature:i,expire:n,source:s}),signal:a}).then(({data:t,headers:e,request:r})=>{const o=We(JSON.parse(t));if("error"in o)throw new gr(o.error.content,o.error.errorCode,r,o,e);return o}),{retryNetworkErrorMaxTimes:d,retryThrottledRequestMaxTimes:u})}function Ar(t,{publicKey:e,baseURL:r=or.baseURL,signal:o,source:i,integration:n,userAgent:a,retryThrottledRequestMaxTimes:s=or.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:c=or.retryNetworkErrorMaxTimes}){return br(()=>ar({method:"GET",headers:{"X-UC-User-Agent":fr({publicKey:e,integration:n,userAgent:a})},url:mr(r,"/info/",{jsonerrors:1,pub_key:e,file_id:t,source:i}),signal:o}).then(({data:t,headers:e,request:r})=>{const o=We(JSON.parse(t));if("error"in o)throw new gr(o.error.content,o.error.errorCode,r,o,e);return o}),{retryThrottledRequestMaxTimes:s,retryNetworkErrorMaxTimes:c})}function Ir(t,{publicKey:e,contentType:r,fileName:o,multipartChunkSize:i=or.multipartChunkSize,baseURL:n="",secureSignature:a,secureExpire:s,store:c,signal:l,source:u="local",integration:d,userAgent:h,retryThrottledRequestMaxTimes:p=or.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:g=or.retryNetworkErrorMaxTimes,metadata:m}){return br(()=>ar({method:"POST",url:mr(n,"/multipart/start/",{jsonerrors:1}),headers:{"X-UC-User-Agent":fr({publicKey:e,integration:d,userAgent:h})},data:pr({filename:o||nr,size:t,content_type:r||ir,part_size:i,UPLOADCARE_STORE:wr(c),UPLOADCARE_PUB_KEY:e,signature:a,expire:s,source:u,metadata:m}),signal:l}).then(({data:t,headers:e,request:r})=>{const o=We(JSON.parse(t));if("error"in o)throw new gr(o.error.content,o.error.errorCode,r,o,e);return o.parts=Object.keys(o.parts).map(t=>o.parts[Number(t)]),o}),{retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g})}function Sr(t,e,{contentType:r,signal:o,onProgress:i,retryThrottledRequestMaxTimes:n=or.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:a=or.retryNetworkErrorMaxTimes}){return br(()=>ar({method:"PUT",url:e,data:t,onProgress:i,signal:o,headers:{"Content-Type":r||ir}}).then(t=>(i&&i({isComputable:!0,value:1}),t)).then(({status:t})=>({code:t})),{retryThrottledRequestMaxTimes:n,retryNetworkErrorMaxTimes:a})}function Mr(t,{publicKey:e,baseURL:r=or.baseURL,source:o="local",signal:i,integration:n,userAgent:a,retryThrottledRequestMaxTimes:s=or.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:c=or.retryNetworkErrorMaxTimes}){return br(()=>ar({method:"POST",url:mr(r,"/multipart/complete/",{jsonerrors:1}),headers:{"X-UC-User-Agent":fr({publicKey:e,integration:n,userAgent:a})},data:pr({uuid:t,UPLOADCARE_PUB_KEY:e,source:o}),signal:i}).then(({data:t,headers:e,request:r})=>{const o=We(JSON.parse(t));if("error"in o)throw new gr(o.error.content,o.error.errorCode,r,o,e);return o}),{retryThrottledRequestMaxTimes:s,retryNetworkErrorMaxTimes:c})}function $r(t,{publicKey:e,baseURL:r,source:o,integration:i,userAgent:n,retryThrottledRequestMaxTimes:a,retryNetworkErrorMaxTimes:s,signal:c,onProgress:l}){return rr({check:c=>Ar(t,{publicKey:e,baseURL:r,signal:c,source:o,integration:i,userAgent:n,retryThrottledRequestMaxTimes:a,retryNetworkErrorMaxTimes:s}).then(t=>t.isReady?t:(l&&l({isComputable:!0,value:1}),!1)),signal:c})}class Lr{uuid;name;size;isStored;isImage;mimeType;cdnUrl;s3Url;originalFilename;imageInfo;videoInfo;contentInfo;metadata;s3Bucket;defaultEffects=null;constructor(t,{baseCDN:e=or.baseCDN,fileName:r}={}){const{uuid:o,s3Bucket:i}=t,n=mr(e,`${o}/`),a=i?mr(`https://${i}.s3.amazonaws.com/`,`${o}/${t.filename}`):null;this.uuid=o,this.name=r||t.filename,this.size=t.size,this.isStored=t.isStored,this.isImage=t.isImage,this.mimeType=t.mimeType,this.cdnUrl=n,this.originalFilename=t.originalFilename,this.imageInfo=t.imageInfo,this.videoInfo=t.videoInfo,this.contentInfo=t.contentInfo,this.metadata=t.metadata||null,this.s3Bucket=i||null,this.s3Url=a,function(t){return"defaultEffects"in t}(t)&&(this.defaultEffects=t.defaultEffects)}}const Or=(t,{signal:e}={})=>{let r=null,o=null;const i=t.map(()=>new AbortController);return tr(e,()=>{i.forEach(t=>t.abort())}),Promise.all(t.map((t,e)=>{const n=(t=>()=>{o=t,i.forEach((e,r)=>r!==t&&e.abort())})(e);return Promise.resolve().then(()=>t({stopRace:n,signal:i[e].signal})).then(t=>(n(),t)).catch(t=>(r=t,null))})).then(t=>{if(null===o)throw r;return t[o]})};var Ur=window.WebSocket;class Rr{events=Object.create({});emit(t,e){this.events[t]?.forEach(t=>t(e))}on(t,e){this.events[t]=this.events[t]||[],this.events[t].push(e)}off(t,e){this.events[t]=e?this.events[t].filter(t=>t!==e):[]}}class Pr{key;disconnectTime;ws=void 0;queue=[];isConnected=!1;subscribers=0;emmitter=new Rr;disconnectTimeoutId=null;constructor(t,e=3e4){this.key=t,this.disconnectTime=e}connect(){if(this.disconnectTimeoutId&&clearTimeout(this.disconnectTimeoutId),!this.isConnected&&!this.ws){const t=`wss://ws.pusherapp.com/app/${this.key}?protocol=5&client=js&version=1.12.2`;this.ws=new Ur(t),this.ws.addEventListener("error",t=>{this.emmitter.emit("error",new Error(t.message))}),this.emmitter.on("connected",()=>{this.isConnected=!0,this.queue.forEach(t=>this.send(t.event,t.data)),this.queue=[]}),this.ws.addEventListener("message",t=>{const e=JSON.parse(t.data.toString());switch(e.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(e.channel,((t,e)=>"success"===t?{status:xr.Success,...e}:"progress"===t?{status:xr.Progress,...e}:{status:xr.Error,...e})(e.event,JSON.parse(e.data)))}})}}disconnect(){const t=()=>{this.ws?.close(),this.ws=void 0,this.isConnected=!1};this.disconnectTime?this.disconnectTimeoutId=setTimeout(()=>{t()},this.disconnectTime):t()}send(t,e){const r=JSON.stringify({event:t,data:e});this.ws?.send(r)}subscribe(t,e){this.subscribers+=1,this.connect();const r=`task-status-${t}`,o={event:"pusher:subscribe",data:{channel:r}};this.emmitter.on(r,e),this.isConnected?this.send(o.event,o.data):this.queue.push(o)}unsubscribe(t){this.subscribers-=1;const e=`task-status-${t}`,r={event:"pusher:unsubscribe",data:{channel:e}};this.emmitter.off(e),this.isConnected?this.send(r.event,r.data):this.queue=this.queue.filter(t=>t.data.channel!==e),0===this.subscribers&&this.disconnect()}onError(t){return this.emmitter.on("error",t),()=>this.emmitter.off("error",t)}}let Nr=null;const zr=t=>{if(!Nr){const e="undefined"==typeof window?0:3e4;Nr=new Pr(t,e)}return Nr};const Dr=(t,{publicKey:e,fileName:r,baseURL:o,baseCDN:i,checkForUrlDuplicates:n,saveUrlForRecurrentUploads:a,secureSignature:s,secureExpire:c,store:l,signal:u,onProgress:d,source:h,integration:p,userAgent:g,retryThrottledRequestMaxTimes:m,pusherKey:f=or.pusherKey,metadata:b})=>{return Promise.resolve((v=f,void zr(v).connect())).then(()=>Cr(t,{publicKey:e,fileName:r,baseURL:o,checkForUrlDuplicates:n,saveUrlForRecurrentUploads:a,secureSignature:s,secureExpire:c,store:l,signal:u,source:h,integration:p,userAgent:g,retryThrottledRequestMaxTimes:m,metadata:b})).catch(t=>{const e=zr(f);return e?.disconnect(),Promise.reject(t)}).then(t=>t.type===kr.FileInfo?t:Or([({signal:r})=>function({token:t,publicKey:e,baseURL:r,integration:o,userAgent:i,retryThrottledRequestMaxTimes:n,retryNetworkErrorMaxTimes:a,onProgress:s,signal:c}){return rr({check:c=>Er(t,{publicKey:e,baseURL:r,integration:o,userAgent:i,retryThrottledRequestMaxTimes:n,retryNetworkErrorMaxTimes:a,signal:c}).then(e=>{switch(e.status){case xr.Error:return new gr(e.error,e.errorCode);case xr.Waiting:return!1;case xr.Unknown:return new gr(`Token "${t}" was not found.`);case xr.Progress:return s&&("unknown"===e.total?s({isComputable:!1}):s({isComputable:!0,value:e.done/e.total})),!1;case xr.Success:return s&&s({isComputable:!0,value:e.done/e.total}),e;default:throw new Error("Unknown status")}}),signal:c})}({token:t.token,publicKey:e,baseURL:o,integration:p,userAgent:g,retryThrottledRequestMaxTimes:m,onProgress:d,signal:r}),({signal:e})=>(({token:t,pusherKey:e,signal:r,onProgress:o})=>new Promise((i,n)=>{const a=zr(e),s=a.onError(n),c=()=>{s(),a.unsubscribe(t)};tr(r,()=>{c(),n(new er("pusher cancelled"))}),a.subscribe(t,t=>{switch(t.status){case xr.Progress:o&&("unknown"===t.total?o({isComputable:!1}):o({isComputable:!0,value:t.done/t.total}));break;case xr.Success:c(),o&&o({isComputable:!0,value:t.done/t.total}),i(t);break;case xr.Error:c(),n(new gr(t.msg,t.error_code))}})}))({token:t.token,pusherKey:f,signal:e,onProgress:d})],{signal:u})).then(t=>{if(t instanceof gr)throw t;return t}).then(t=>$r(t.uuid,{publicKey:e,baseURL:o,integration:p,userAgent:g,retryThrottledRequestMaxTimes:m,onProgress:d,signal:u})).then(t=>new Lr(t,{baseCDN:i}));var v},Fr=new WeakMap,Vr=async t=>{if(lr(t)||cr(t))return t.size;if(ur(t)){return(await(async t=>{if(Fr.has(t))return Fr.get(t);const e=await fetch(t.uri).then(t=>t.blob());return Fr.set(t,e),e})(t)).size}throw new Error("Unknown file type. Cannot determine file size.")},Br=t=>{const e=new RegExp("[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}");return!dr(t)&&e.test(t)},jr=t=>{const e=new RegExp("^(?:\\w+:)?\\/\\/([^\\s\\.]+\\.\\S{2}|localhost[\\:?\\d]*)\\S*$");return!dr(t)&&e.test(t)},Hr=async(t,e,r)=>o=>((t,e,r,o)=>{const i=o*e,n=Math.min(i+o,r);return t.slice(i,n)})(t,o,e,r),qr=async(t,{publicKey:e,fileName:r,fileSize:o,baseURL:i,secureSignature:n,secureExpire:a,store:s,signal:c,onProgress:l,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,contentType:m,multipartChunkSize:f=or.multipartChunkSize,maxConcurrentRequests:b=or.maxConcurrentRequests,baseCDN:v,metadata:y})=>{const w=o??await Vr(t);let _;const k=(t,e)=>{if(!l)return;_||(_=Array(t).fill(0));return r=>{var o;r.isComputable&&(_[e]=r.value,l({isComputable:!0,value:(o=_,o.reduce((t,e)=>t+e,0)/t)}))}};return m||=vr(t),Ir(w,{publicKey:e,contentType:m,fileName:r||yr(t),baseURL:i,secureSignature:n,secureExpire:a,store:s,signal:c,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,metadata:y,multipartChunkSize:f}).then(async({uuid:r,parts:o})=>{const i=await Hr(t,w,f);return Promise.all([r,(n=b,a=o.map((t,r)=>()=>((t,e,{publicKey:r,contentType:o,onProgress:i,signal:n,integration:a,retryThrottledRequestMaxTimes:s,retryNetworkErrorMaxTimes:c})=>Sr(t,e,{publicKey:r,contentType:o,onProgress:i,signal:n,integration:a,retryThrottledRequestMaxTimes:s,retryNetworkErrorMaxTimes:c}))(i(r),t,{publicKey:e,contentType:m,onProgress:k(o.length,r),signal:c,integration:d,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g})),new Promise((t,e)=>{const r=[];let o=!1,i=a.length;const s=[...a],c=()=>{const n=a.length-s.length,l=s.shift();l&&l().then(e=>{o||(r[n]=e,i-=1,i?c():t(r))}).catch(t=>{o=!0,e(t)})};for(let t=0;t<n;t++)c()}))]);var n,a}).then(([t])=>Mr(t,{publicKey:e,baseURL:i,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g})).then(t=>t.isReady?t:$r(t.uuid,{publicKey:e,baseURL:i,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,onProgress:l,signal:c})).then(t=>new Lr(t,{baseCDN:v}))};async function Kr(t,{publicKey:e,fileName:r,baseURL:o=or.baseURL,secureSignature:i,secureExpire:n,store:a,signal:s,onProgress:c,source:l,integration:u,userAgent:d,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,contentType:g,multipartMinFileSize:m,multipartChunkSize:f,maxConcurrentRequests:b,baseCDN:v=or.baseCDN,checkForUrlDuplicates:y,saveUrlForRecurrentUploads:w,pusherKey:_,metadata:k}){if(dr(t)){const y=await Vr(t);return((t,e=or.multipartMinFileSize)=>t>=e)(y,m)?qr(t,{publicKey:e,contentType:g,multipartChunkSize:f,fileSize:y,fileName:r,baseURL:o,secureSignature:i,secureExpire:n,store:a,signal:s,onProgress:c,source:l,integration:u,userAgent:d,maxConcurrentRequests:b,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,baseCDN:v,metadata:k}):((t,{publicKey:e,fileName:r,baseURL:o,secureSignature:i,secureExpire:n,store:a,contentType:s,signal:c,onProgress:l,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,baseCDN:m,metadata:f})=>_r(t,{publicKey:e,fileName:r,contentType:s,baseURL:o,secureSignature:i,secureExpire:n,store:a,signal:c,onProgress:l,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,metadata:f}).then(({file:t})=>$r(t,{publicKey:e,baseURL:o,source:u,integration:d,userAgent:h,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:g,onProgress:l,signal:c})).then(t=>new Lr(t,{baseCDN:m})))(t,{publicKey:e,fileName:r,contentType:g,baseURL:o,secureSignature:i,secureExpire:n,store:a,signal:s,onProgress:c,source:l,integration:u,userAgent:d,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,baseCDN:v,metadata:k})}if(jr(t))return Dr(t,{publicKey:e,fileName:r,baseURL:o,baseCDN:v,checkForUrlDuplicates:y,saveUrlForRecurrentUploads:w,secureSignature:i,secureExpire:n,store:a,signal:s,onProgress:c,source:l,integration:u,userAgent:d,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,pusherKey:_,metadata:k});if(Br(t))return((t,{publicKey:e,fileName:r,baseURL:o,signal:i,onProgress:n,source:a,integration:s,userAgent:c,retryThrottledRequestMaxTimes:l,retryNetworkErrorMaxTimes:u,baseCDN:d})=>Ar(t,{publicKey:e,baseURL:o,signal:i,source:a,integration:s,userAgent:c,retryThrottledRequestMaxTimes:l,retryNetworkErrorMaxTimes:u}).then(t=>new Lr(t,{baseCDN:d,fileName:r})).then(t=>(n&&n({isComputable:!0,value:1}),t)))(t,{publicKey:e,fileName:r,baseURL:o,signal:s,onProgress:c,source:l,integration:u,userAgent:d,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,baseCDN:v});throw new TypeError(`File uploading from "${t}" is not supported`)}class Gr{uuid;filesCount;totalSize;isStored;isImage;cdnUrl;files;createdAt;storedAt=null;constructor(t,{baseCDN:e=or.baseCDN}={}){this.uuid=t.id,this.filesCount=t.filesCount;const r=t.files.filter(Boolean);this.totalSize=Object.values(r).reduce((t,e)=>t+e.size,0),this.isStored=!!t.datetimeStored,this.isImage=!!Object.values(r).filter(t=>t.isImage).length,this.cdnUrl=t.cdnUrl,this.files=r.map(t=>new Lr(t,{baseCDN:e})),this.createdAt=t.datetimeCreated,this.storedAt=t.datetimeStored}}function Wr(t,{publicKey:e,fileName:r,baseURL:o=or.baseURL,secureSignature:i,secureExpire:n,store:a,signal:s,onProgress:c,source:l,integration:u,userAgent:d,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,contentType:g,multipartChunkSize:m=or.multipartChunkSize,baseCDN:f=or.baseCDN,checkForUrlDuplicates:b,saveUrlForRecurrentUploads:v,jsonpCallback:y}){if(!(t=>{for(const e of t)if(!dr(e))return!1;return!0})(t)&&!(t=>{for(const e of t)if(!jr(e))return!1;return!0})(t)&&!(t=>{for(const e of t)if(!Br(e))return!1;return!0})(t))throw new TypeError(`Group uploading from "${t}" is not supported`);let w,_=!0;const k=t.length,x=(t,e)=>{if(!c)return;w||(w=Array(t).fill(0));return r=>{if(!r.isComputable||!_)return _=!1,void c({isComputable:!1});var o;w[e]=r.value,c({isComputable:!0,value:(o=w,o.reduce((t,e)=>t+e)/t)})}};return Promise.all(t.map((t,c)=>dr(t)||jr(t)?Kr(t,{publicKey:e,fileName:r,baseURL:o,secureSignature:i,secureExpire:n,store:a,signal:s,onProgress:x(k,c),source:l,integration:u,userAgent:d,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p,contentType:g,multipartChunkSize:m,baseCDN:f,checkForUrlDuplicates:b,saveUrlForRecurrentUploads:v}).then(t=>t.uuid):t)).then(t=>Tr(t,{publicKey:e,baseURL:o,jsonpCallback:y,secureSignature:i,secureExpire:n,signal:s,source:l,integration:u,userAgent:d,retryThrottledRequestMaxTimes:h,retryNetworkErrorMaxTimes:p}).then(t=>new Gr(t,{baseCDN:f})).then(t=>(c&&c({isComputable:!0,value:1}),t)))}class Zr{_concurrency=1;_pending=[];_running=0;_resolvers=new Map;_rejectors=new Map;constructor(t){this._concurrency=t}run(){const t=this._concurrency-this._running;for(let e=0;e<t;e++){const t=this._pending.shift();if(!t)return;const e=this._resolvers.get(t),r=this._rejectors.get(t);if(!e||!r)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(t=>e(t)).catch(t=>r(t))}}add(t,{autoRun:e}={autoRun:!0}){return new Promise((r,o)=>{this._resolvers.set(t,r),this._rejectors.set(t,o),this._pending.push(t),e&&this.run()})}get pending(){return this._pending.length}get running(){return this._running}set concurrency(t){this._concurrency=t,this.run()}get concurrency(){return this._concurrency}}const Xr={button:["toolbar"],checkbox:["toolbar"],menuitem:["menu","menubar"],option:["listbox"],tab:["tablist"]};function Yr(t,e){e.tabIndex=0,e.focus(),t.tabIndex=-1}function Jr(t){let e=t.role||t.type||t.tagName;if(!e)return null;let r=Xr[e.toLowerCase()];if(!r)return null;for(let e of r){let r=t.closest(`[role=${e}]`);if(r)return r}}function Qr(t,e){return"toolbar"===e.role?function(t){let e=[...t.querySelectorAll("*")];return e.filter(t=>"button"===t.role||"button"===t.type||"checkbox"===t.role||"checkbox"===t.type)}(e):e.querySelectorAll(`[role=${t.role}]`)}function to(t){return e=>{let r=!1,o=t?.searchDelayMs||300,i=0,n="";function a(t){let r=Jr(t.target);if(!r)return void s();let a=Qr(t.target,r),c=Array.from(a).indexOf(t.target),l="ArrowDown",u="ArrowUp";if(function(t){let e=t.getAttribute("aria-orientation");if("vertical"===e)return!1;if("horizontal"===e)return!0;let r=t.role;return"menubar"===r||"tablist"===r||"toolbar"===r}(r)&&("rtl"===e.document.dir?(l="ArrowLeft",u="ArrowRight"):(l="ArrowRight",u="ArrowLeft")),t.key===l)t.preventDefault(),Yr(t.target,a[c+1]||a[0]);else if(t.key===u)t.preventDefault(),Yr(t.target,a[c-1]||a[a.length-1]);else if("Home"===t.key)t.preventDefault(),Yr(t.target,a[0]);else if("End"===t.key)t.preventDefault(),Yr(t.target,a[a.length-1]);else if(1===t.key.length&&"tablist"!==r.role){let e=Date.now();e-i<=o?n+=t.key.toLowerCase():n=t.key.toLowerCase(),i=e;let r=Array.from(a).find(t=>t.textContent?.trim()?.toLowerCase()?.startsWith(n));r&&(t.preventDefault(),Yr(t.target,r))}}function s(){r=!1,e.removeEventListener("keydown",a)}function c(t){let o=Jr(t.target);if(o){r||(r=!0,e.addEventListener("keydown",a));let i=Qr(t.target,o);for(let e of i)e!==t.target&&e.setAttribute("tabindex",-1)}else r&&s()}function l(t){t.relatedTarget&&t.relatedTarget!==e.document||s()}function u(t){let e=Jr(t.target);if(e){let r=Qr(t.target,e);for(let e of r)e!==t.target&&e.setAttribute("tabindex",-1);t.target.setAttribute("tabindex",0)}}return e.addEventListener("click",u),e.addEventListener("focusin",c),e.addEventListener("focusout",l),()=>{s(),e.removeEventListener("click",u),e.removeEventListener("focusin",c),e.removeEventListener("focusout",l)}}}function eo(t){let e,r,o=t.split(" ");function i(t){"Enter"!==t.key||"BUTTON"!==t.target.tagName&&"A"!==t.target.tagName||(n(),t.target.classList.add(...o),e=t.target,r=t.target)}function n(){e&&e.classList.remove(...o),r=null}function a(t){0===t.clientX&&0===t.clientY&&r!==t.target&&(n(),t.target.classList.add(...o),e=t.target)}return t=>(t.addEventListener("click",a),t.addEventListener("keydown",i),t.addEventListener("keyup",n),()=>{t.removeEventListener("click",a),t.removeEventListener("keydown",i),t.removeEventListener("keyup",n)})}function ro(){return t=>{let e=[];function r(){let o=e.pop();if(!o)return void t.document.activeElement.blur();let i=o.deref();i&&i.isConnected?i.focus():r()}let o,i=0;function n(r){clearInterval(o);let n=r.getAttribute("aria-controls");o=setInterval(()=>{if(i++>50)return void clearInterval(o);let r=t.document.getElementById(n);if(r){let i=r.querySelector('a, button, select, textarea, input:not([type=radio]), [type=radio]:checked, [tabindex]:not([tabindex="-1"])');i&&(clearInterval(o),r.dispatchEvent(new t.CustomEvent("keyuxJump",{bubbles:!0})),function(r){let o=t.document.activeElement;o&&o!==t.document.body&&e.push(new WeakRef(o)),r.focus({focusVisible:!0})}(i))}},50)}function a(t){t.target.getAttribute("aria-controls")&&"Enter"===t.key&&n(t.target),"Escape"===t.key&&r()}return t.addEventListener("keydown",a),()=>{t.removeEventListener("keydown",a)}}}function oo(t){return Array.isArray(t)?t.map(t=>"object"==typeof t&&null!==t?oo(t):t):"object"!=typeof t||null===t?t:Object.fromEntries(Object.entries(t).map(([t,e])=>{const r=function(t){return t.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`).replace(/__/g,"_")}(t);return"object"==typeof e&&null!==e?[r,oo(e)]:[r,e]}))}function io(t){return{ok:!1,error:t}}class no{constructor(t="https://tlm.uploadcare.com/api/"){this.baseUrl=t}async base(t,e={}){const r=`${this.baseUrl}${t}`;try{const t=await fetch(r,e);if(!t.ok)return io(new Error(`Got non-200 response from "${r}". Status: ${t.status.toString()}`));try{const e=await t.json();return{ok:!0,value:e}}catch(t){return io(new Error(`Error parsing JSON from "${r}". Error: ${t}`))}}catch(t){return io(new Error(`Error fetching data from "${r}". Error: ${t}`))}}async post(t,e,r={}){return await this.base(t,{...r,method:"POST",body:JSON.stringify(oo(e)),headers:{"Content-Type":"application/json",...r.headers||{}}})}async get(t,e={}){return await this.base(t,{method:"GET",...e})}}class ao extends no{constructor(){super()}async sendEvent(t,e){const r=await(async(t,e)=>({success:!0,data:e}))(0,t);if(!r.success)throw console.error("TelemetryAPIService: events: body is invalid",r.error),new Error("TelemetryAPIService: events: body is invalid");return this.post("v1/events",t,e)}}const so=t=>{if(t<=0n)return"0";let e="";for(;t>0n;){e="0123456789abcdefghijklmnopqrstuvwxyz"[Number(t%36n)]+e,t/=36n}return e},co=async t=>{const e=await(async t=>{const e=(new TextEncoder).encode(t),r=await window.crypto.subtle.digest("SHA-256",e),o=Array.from(new Uint8Array(r)).map(t=>t.toString(16).padStart(2,"0")).join("");return BigInt(`0x${o}`)})(t);return so(e).slice(0,10)},lo=async(t,e)=>((t,e)=>{const r=new URL(e);return r.hostname=`${t}.${r.hostname}`,r.toString().replace(/\/$/,"")})(await co(t),e),uo=()=>{const t=[];return{stack:t,promiseReadJpegChunks:e=>new Promise((r,o)=>{let i=2;const n=(t,e)=>{const r=new FileReader;r.addEventListener("load",()=>{e(new DataView(r.result))}),r.addEventListener("error",t=>{o(`Reader error: ${t}`)}),r.readAsArrayBuffer(t)},a=()=>n(e.slice(i,i+128),t=>{let e,r,o;for(e=r=0,o=t.byteLength;o>=0?r<o:r>o;e=o>=0?++r:--r)if(255===t.getUint8(e)){i+=e;break}s()}),s=()=>{const s=i;return n(e.slice(i,i+=4),c=>{if(4!==c.byteLength||255!==c.getUint8(0))return void o("Corrupted");const l=c.getUint8(1);if(218===l)return void r(!0);const u=c.getUint16(2)-2;return n(e.slice(i,i+=u),e=>{e.byteLength===u?(t.push({startPos:s,length:u,marker:l,view:e}),a()):o("Corrupted")})})};FileReader&&DataView||o("Not Support"),n(e.slice(0,2),t=>{65496!==t.getUint16(0)&&o("Not jpeg"),a()})})}},ho=async t=>{const e=[],{promiseReadJpegChunks:r,stack:o}=uo();return await r(t),o.forEach(({marker:t,view:r})=>{226===t&&1229144927===r.getUint32(0)&&1347571526===r.getUint32(4)&&1229735168===r.getUint32(8)&&e.push(r)}),e},po=async(t,e,r)=>{{const o=[],i=[],{promiseReadJpegChunks:n,stack:a}=uo();await n(t),a.forEach(t=>{if(t.marker===e)return o.push(t.startPos),i.push(t.length)});const s=[t.slice(0,2)];for(const t of r){const r=new DataView(new ArrayBuffer(4));r.setUint16(0,65280+e),r.setUint16(2,t.byteLength+2),s.push(r.buffer),s.push(t)}let c=2;for(let e=0;e<o.length;e++)o[e]>c&&s.push(t.slice(c,o[e])),c=o[e]+i[e]+4;return s.push(t.slice(c,t.size)),new Blob(s,{type:t.type})}},go=(t,e)=>po(t,226,e.map(t=>t.buffer)),mo=()=>{const t=document.createElement("canvas"),e=t.getContext("2d");return{canvas:t,ctx:e}},fo=async t=>{let e=null;const{promiseReadJpegChunks:r,stack:o}=uo();return await r(t),o.forEach(({marker:t,view:r})=>{!e&&225===t&&r.byteLength>=14&&1165519206===r.getUint32(0)&&0===r.getUint16(4)&&(e=r)}),e};let bo;const vo=t=>((t,e)=>new Promise((r,o)=>{e&&(t.src=e),t.complete?r(t):(t.addEventListener("load",()=>{r(t)}),t.addEventListener("error",()=>{o(new Error("Failed to load image. Probably not an image."))}))}))(new Image,t),yo=[1,3],wo=[192,193,194,195,197,198,199,201,202,203,205,206,207],_o={squareSide:[Math.floor(Math.sqrt(5e6)),4096,8192,11180,10836,11402,14188,16384],dimension:[4096,8192,16384,32767,65535]},ko=(t,e)=>{const r={};return(...o)=>{const i=e(o,r);return i in r?r[i]:r[i]=t(...o)}},xo=(t,e)=>{const[r]=t,o=Object.keys(e).map(t=>parseInt(t,10)).sort((t,e)=>t-e);for(let t=0;t<o.length;t++){const i=o[t],n=!!e[i];if(i>r&&n)return i;if(i<r&&!n)return i}return r},Co=55,Eo=110,To=165,Ao=255,Io=`rgba(${Co}, ${Eo}, ${To}, ${Ao/255})`,So=(t,e)=>{try{const r=[t-1,e-1,1,1],{canvas:o,ctx:i}=mo();o.width=1,o.height=1;const{canvas:n,ctx:a}=mo();n.width=t,n.height=e,a&&(a.fillStyle=Io,a.fillRect(...r),i.drawImage(n,t-1,e-1,1,1,0,0,1,1));const s=i&&i.getImageData(0,0,1,1).data;let c=!1;return s&&(c=s[0]===Co&&s[1]===Eo&&s[2]===To&&s[3]===Ao),n.width=n.height=1,c}catch(r){return console.error(`Failed to test for max canvas size of ${t}x${e}.`),!1}};function Mo(t){return(...e)=>new Promise(r=>{setTimeout(()=>{const o=t(...e);r(o)},0)})}const $o=Mo(ko(So,xo)),Lo=Mo(ko(So,xo)),Oo=async(t,e)=>{const r=_o.squareSide.find(r=>r*r>=t*e),o=_o.dimension.find(r=>r>=t&&r>=e);if(!r||!o)throw new Error("Not supported");const[i,n]=await Promise.all([$o(r,r),Lo(o,1)]);if(i&&n)return!0;throw new Error("Not supported")},Uo=async(t,e,r)=>{try{const{ctx:o,canvas:i}=mo();return i.width=e,i.height=r,o.imageSmoothingQuality="high",o.drawImage(t,0,0,e,r),t instanceof HTMLImageElement&&(t.src="//:0"),t instanceof HTMLCanvasElement&&(t.width=t.height=1),i}catch(t){throw new Error("Canvas resize error",{cause:t})}},Ro=({img:t,sourceW:e,targetW:r,targetH:o,step:i})=>{const n=function({sourceW:t,targetW:e,targetH:r,step:o}){const i=[];let n=e,a=r;do{i.push([n,a]),n=Math.round(n/o),a=Math.round(a/o)}while(n<t*o);return i.reverse()}({sourceW:e,targetW:r,targetH:o,step:i});return n.reduce((t,[e,r],o)=>t.then(t=>Oo(e,r).then(()=>Uo(t,e,r)).catch(()=>{if(o===n.length-1)throw new Error("Not supported");return t})),Promise.resolve(t))},Po=navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform),No=.71,zo=(t,e)=>{if(t.width*No*t.height*No<e.size)throw new Error("Not required");const r=t.width,o=t.height,i=r/o,n=Math.floor(Math.sqrt(e.size*i)),a=Math.floor(e.size/Math.sqrt(e.size*i));return Oo(n,a).then(()=>{const{ctx:e}=mo();return"imageSmoothingQuality"in e&&!(/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform))&&!Po?(({img:t,targetW:e,targetH:r})=>Uo(t,e,r))({img:t,targetW:n,targetH:a}):Ro({img:t,sourceW:r,targetW:n,targetH:a,step:No})}).catch(()=>Promise.reject("Not supported"))},Do=async(t,e)=>{try{if(await(async t=>{let e=!1;const{promiseReadJpegChunks:r,stack:o}=uo();return await r(t).then(()=>(o.forEach(({marker:t,view:r})=>{if(!e&&wo.indexOf(t)>=0){const t=r.getUint8(5);yo.indexOf(t)<0&&(e=!0)}}),e)).catch(()=>e)})(t))throw new Error("Should skipped");const r=await Promise.allSettled([fo(t),new Promise(t=>{if(void 0!==bo)t(bo);else{const e=new Image;e.addEventListener("load",()=>{bo=e.naturalWidth<e.naturalHeight,e.src="//:0",t(bo)}),e.src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QA6RXhpZgAATU0AKgAAAAgAAwESAAMAAAABAAYAAAEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAIBASIA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k="}}),ho(t)]),o=!r.some(t=>"rejected"===t.status),[i,n,a]=r,s=await(async t=>{try{return await go(t,[])}catch(t){throw new Error(`Failed to strip ICC profile: ${t}`)}})(t).catch(()=>t),c=await vo(URL.createObjectURL(s));URL.revokeObjectURL(c.src);const l=await zo(c,e);let u="image/jpeg",d=e?.quality||.8;!o&&(t=>{const{ctx:e,canvas:r}=mo();r.width=r.height=50,e.drawImage(t,0,0,50,50);const o=e.getImageData(0,0,50,50).data;r.width=r.height=1;for(let t=3;t<o.length;t+=4)if(o[t]<254)return!0;return!1})(l)&&(u="image/png",d=void 0);let h=await((t,e,r)=>new Promise((o,i)=>{t.toBlob(t=>{t?o(t):i("Failed to convert canvas to blob")},e,r),t.width=t.height=1}))(l,u,d);if(o&&"fulfilled"===i.status&&i.value){const t=i.value,e="fulfilled"===n.status&&n.value;h=await(async(t,e,r)=>(r&&((t,e)=>{((t,e)=>{let r,o,i,n;if(t&&!(t.byteLength<14)&&1165519206===t.getUint32(0)&&0===t.getUint16(4)){if(18761===t.getUint16(6))o=!0;else{if(19789!==t.getUint16(6))return;o=!1}if(42===t.getUint16(8,o))for(i=8+t.getUint32(10,o),r=0,n=t.getUint16(i-2,o);n>=0?r<n:r>n;n>=0?++r:--r){if(t.byteLength<i+10)return;274===t.getUint16(i,o)&&e(i+8,o),i+=12}}})(t,(r,o)=>t.setUint16(r,e,o))})(e,1),po(t,225,[e.buffer])))(h,t,e)}return o&&"fulfilled"===a.status&&a.value.length>0&&(h=await go(h,a.value)),h}catch(t){let e;throw t instanceof Error&&(e=t.message),"string"==typeof t&&(e=t),new Error("Failed to shrink image. "+(e?`Message: "${e}".`:""),{cause:t})}};var Fo=Object.freeze({INIT_SOLUTION:"init-solution",CHANGE_CONFIG:"change-config",ACTION_EVENT:"action-event",ERROR_EVENT:"error-event"}),Vo=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"}),Bo=class{_timeoutStore=new Map;_targets=new Set;_debugPrint=null;constructor(t){this._debugPrint=t}bindTarget(t){this._targets.add(t)}unbindTarget(t){this._targets.delete(t)}_dispatch(t,e){for(const r of this._targets)r.dispatchEvent(new CustomEvent(t,{detail:e}));this._debugPrint?.(()=>{const r=e&&"object"==typeof e?{...e}:e;return[`event "${t}"`,r]})}emit(t,e,r={}){const{debounce:o}=r;if("number"!=typeof o&&!o)return void this._dispatch(t,"function"==typeof e?e():e);this._timeoutStore.has(t)&&window.clearTimeout(this._timeoutStore.get(t));const i="number"==typeof o?o:20,n=window.setTimeout(()=>{this._dispatch(t,"function"==typeof e?e():e),this._timeoutStore.delete(t)},i);this._timeoutStore.set(t,n)}};function jo(t,e){let r;const o=(...o)=>{r&&clearTimeout(r),r=setTimeout(()=>t(...o),e)};return o.cancel=()=>{r&&clearTimeout(r)},o}var Ho=t=>t?t.split(",").map(t=>t.trim()).filter(Boolean):[],qo=t=>t.join(","),Ko=t=>{if("string"!=typeof t||!t)return"";let e=t.trim();return e.startsWith("-/")?e=e.slice(2):e.startsWith("/")&&(e=e.slice(1)),e.endsWith("/")&&(e=e.slice(0,e.length-1)),e},Go=(...t)=>t.filter(t=>"string"==typeof t&&!!t).map(t=>Ko(t)).join("/-/"),Wo=(...t)=>{const e=Go(...t);return e?`-/${e}/`:""};function Zo(t){const e=new URL(t),r=e.pathname+e.search+e.hash,o=r.lastIndexOf("http"),i=r.lastIndexOf("/");let n="";return o>=0?n=r.slice(o):i>=0&&(n=r.slice(i+1)),n}function Xo(t){const e=new URL(t),{pathname:r}=e,o=r.indexOf("/"),i=r.indexOf("/",o+1);return r.substring(o+1,i)}function Yo(t){const e=Qo(t),r=new URL(e),o=r.pathname.indexOf("/-/");if(-1===o)return"";return r.pathname.substring(o).slice(1)}function Jo(t){return Yo(t).split("/-/").filter(Boolean).map(t=>Ko(t))}function Qo(t){const e=new URL(t),r=Zo(t),o=ti(r)?ei(r).pathname:r;return e.pathname=e.pathname.replace(o,""),e.search="",e.hash="",e.toString()}function ti(t){return t.startsWith("http")}function ei(t){const e=new URL(t);return{pathname:`${e.origin}${e.pathname??""}`,search:e.search??"",hash:e.hash??""}}var ri=(t,e,r)=>{const o=new URL(Qo(t)),i=r??Zo(t),n=e??"";if(o.pathname.startsWith("//")&&(o.pathname=o.pathname.replace("//","/")),i&&ti(i)){const t=ei(i);o.pathname=`${o.pathname}${n}${t.pathname||""}`,o.search=t.search,o.hash=t.hash}else o.pathname=`${o.pathname}${n}${i||""}`;return o.toString()},oi=(t,e)=>{const r=new URL(t);return r.pathname=`${e}/`,r.toString()},ii=(t,e=",")=>t.trim().split(e).map(t=>t.trim()).filter(t=>t.length>0),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}),ai=["enhance","brightness","exposure","gamma","contrast","saturation","vibrance","warmth","filter","mirror","flip","rotate","crop"];function si(t){return Go(...ai.filter(e=>void 0!==t[e]&&null!==t[e]).map(e=>function(t,e){if("number"==typeof e){const r=e;return ni[t]!==r?`${t}/${r}`:""}if("boolean"==typeof e){const r=e;return ni[t]!==r?`${t}`:""}if("filter"===t&&e){const{name:r,amount:o}=e;return ni.filter===o?"":`${t}/${r}/${o}`}if("crop"===t&&e){const{dimensions:r,coords:o}=e;return`${t}/${r.join("x")}/${o.join(",")}`}return""}(e,t[e])).filter(t=>!!t))}var ci=Go("format/auto","progressive/yes"),li=([t])=>void 0!==t?Number(t):void 0,ui=()=>!0,di=Object.freeze({enhance:li,brightness:li,exposure:li,gamma:li,contrast:li,saturation:li,vibrance:li,warmth:li,filter:([t,e])=>({name:t,amount:void 0!==e?Number(e):100}),mirror:ui,flip:ui,rotate:li,crop:t=>{const[e,r]=t,{dimensions:o,coords:i}=(([t,e])=>{if(!/\d+x\d+/.test(t)||!/\d+,\d+/.test(e))throw new Error("Crop by aspect ratio, percentage or alignment shortcuts is not supported.");return{dimensions:ii(t,"x").map(Number),coords:ii(e).map(Number)}})([e,r]);return{dimensions:o,coords:i}}});function hi(t){const e={};for(const r of t){const[t,...o]=r.split("/");if(!t||!ai.includes(t))continue;const i=t,n=di[i];try{const t=n(o);e[i]=t}catch(t){console.warn([`Failed to parse URL operation "${r}". It will be ignored.`,t instanceof Error?`Error message: "${t.message}"`:t,"If you need this functionality, please feel free to open an issue at https://github.com/uploadcare/blocks/issues/new"].join("\n"))}}return e}var pi=Object.freeze({CROP:"crop",TUNING:"tuning",FILTERS:"filters"}),gi=Object.freeze([pi.CROP,pi.TUNING,pi.FILTERS]),mi=Object.freeze(["brightness","exposure","gamma","contrast","saturation","vibrance","warmth","enhance"]),fi=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"]),bi=Object.freeze(["rotate","mirror","flip"]),vi=ni,yi=Object.freeze({brightness:{zero:vi.brightness,range:[-100,100],keypointsNumber:2},exposure:{zero:vi.exposure,range:[-500,500],keypointsNumber:2},gamma:{zero:vi.gamma,range:[0,1e3],keypointsNumber:2},contrast:{zero:vi.contrast,range:[-100,500],keypointsNumber:2},saturation:{zero:vi.saturation,range:[-100,500],keypointsNumber:1},vibrance:{zero:vi.vibrance,range:[-100,500],keypointsNumber:1},warmth:{zero:vi.warmth,range:[-100,100],keypointsNumber:1},enhance:{zero:vi.enhance,range:[0,100],keypointsNumber:1},filter:{zero:vi.filter,range:[0,100],keypointsNumber:1}}),wi="https://ucarecdn.com",_i={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:qo(gi),maxLocalFileSizeBytes:0,thumbSize:76,showEmptyList:!1,useLocalImageEditor:!1,useCloudImageEditor:!0,removeCopyright:!1,cropPreset:"",imageShrink:"",modalScrollLock:!0,modalBackdropStrokes:!1,sourceListWrap:!0,remoteTabSessionKey:"",cdnCname:wi,cdnCnamePrefixed:"https://ucarecd.net",baseUrl:"https://upload.uploadcare.com",socialBaseUrl:"https://social.uploadcare.com",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:6e5,secureUploadsSignatureResolver:null,secureDeliveryProxyUrlResolver:null,iconHrefResolver:null,fileValidators:[],collectionValidators:[],validationTimeout:15e3,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},ki=Object.freeze(_i),xi=(t,e)=>new Intl.PluralRules(t).select(e),Ci=t=>t,Ei="{{",Ti="}}",Ai="plural:";function Ii(t,e={},r={}){const{openToken:o=Ei,closeToken:i=Ti,transform:n=Ci}=r;for(const r in e){const a=e[r],s=null!=a?a.toString():void 0,c="string"==typeof s?n(s):String(s);t=t.replaceAll(o+r+i,c)}return t}var Si="--uploadcare-blocks-window-height",Mi=class t{static clientsRegistry=new Set;static flush=jo(()=>{document.documentElement.style.setProperty(Si,`${window.innerHeight}px`)},100);static registerClient(e){0===t.clientsRegistry.size&&t.attachTracker(),t.clientsRegistry.add(e)}static unregisterClient(e){t.clientsRegistry.delete(e),0===t.clientsRegistry.size&&t.detachTracker()}static attachTracker(){window.addEventListener("resize",t.flush,{passive:!0,capture:!0}),t.flush()}static detachTracker(){window.removeEventListener("resize",t.flush,{capture:!0}),document.documentElement.style.removeProperty(Si)}},$i=t=>({"*currentActivity":null,"*currentActivityParams":{},"*history":[],"*historyBack":null,"*closeModal":()=>{t.modalManager?.close(t.$["*currentActivity"]),t.set$({"*currentActivity":null})}}),Li=t=>({...$i(t),"*commonProgress":0,"*uploadList":[],"*uploadQueue":new Zr(1),"*collectionErrors":[],"*collectionState":null,"*groupInfo":null,"*uploadTrigger":new Set,"*secureUploadsManager":null}),Oi={"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’ve chosen {{total}} {{plural:file(total)}}. At least {{min}} {{plural:file(min)}} required.","files-count-limit-error-too-many":"You’ve 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"},Ui=new Map,Ri=new Map,Pi=(t,e)=>{Ui.has(t)&&console.log(`Locale ${t} is already defined. Overwriting...`),Ui.set(t,{...Oi,...e})},Ni=(t,e)=>{"function"==typeof e?((t,e)=>{Ri.set(t,e)})(t,e):Pi(t,e)};Ni("en",Oi);var zi=t=>`*l10n/${t}`,Di=class{_blockInstance=null;_localeName="";_callbacks=new Set;_boundBlocks=new Map;constructor(t){this._blockInstance=t;for(const[t,e]of Object.entries(Oi)){const r=!this._blockInstance.has(zi(t))||!this._blockInstance.$[zi(t)];this._blockInstance.add(zi(t),e,r)}setTimeout(()=>{t.subConfigValue("localeName",async t=>{if(!this._blockInstance||!t)return;this._localeName=t;const e=await(async t=>{if(!Ui.has(t)){if(!Ri.has(t))throw new Error(`Locale ${t} is not defined`);const e=Ri.get(t),r=await e();Pi(t,r)}return Ui.get(t)})(t);if("en"!==t&&this._localeName!==t)return;const r=this._blockInstance.cfg.localeDefinitionOverride?.[t];for(const[t,o]of Object.entries(e)){const e=r?.[t];this._blockInstance.add(zi(t),e??o,!0);for(const t of this._callbacks)t()}}),t.subConfigValue("localeDefinitionOverride",t=>{if(!t)return;const e=t[this._localeName];if(e)for(const[t,r]of Object.entries(e)){this._blockInstance?.add(zi(t),r,!0);for(const t of this._callbacks)t()}})})}onLocaleChange(t){const e=jo(t,0);return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}bindL10n(t,e,r){t.$[e]=r(),this._boundBlocks.has(t)||this._boundBlocks.set(t,new Map),this._boundBlocks.get(t)?.get(e)?.();const o=this.onLocaleChange(()=>{t.$[e]=r()});this._boundBlocks.get(t)?.set(e,o)}destroyL10nBindings(t){const e=this._boundBlocks.get(t);if(e){for(const t of e.values())t();this._boundBlocks.delete(t)}}destroy(){this._callbacks.clear()}};function Fi(t,e){[...t.querySelectorAll("[l10n]")].forEach(t=>{const r=t.getAttribute("l10n");if(!r)return;const o=r.split(";");for(const r of o)r&&Vi(t,r,e)})}var Vi=(t,e,r)=>{let o="textContent",i=!1;if(e.includes(":")){const t=e.split(":");if(2!==t.length)return void console.warn(`l10n attribute value should be in format "property:key" or "key". Found: ${e}`);const r=t;o=r[0],e=r[1],o.startsWith("@")&&(o=o.slice(1),i=!0)}const n=e;r.has(n)&&r.sub(n,e=>{if(!e)return;r.l10nProcessorSubs.has(n)||r.l10nProcessorSubs.set(n,new Set);const i=r.l10nProcessorSubs.get(n);i?.forEach(t=>{t.remove(),i.delete(t),r.allSubs.delete(t)});const a=zi(e).replace("*","");r.nodeCtx.has(a)||r.nodeCtx.add(a,e);const s=r.nodeCtx.sub(a,()=>{t[o]=r.l10n(e)});i?.add(s),r.allSubs.add(s),t.removeAttribute("l10n")});const a=zi(e);r.has(a)||r.add(a,""),r.sub(a,()=>{i?t.setAttribute(o,r.l10n(e)):t[o]=r.l10n(e)}),t.removeAttribute("l10n")},Bi=class{_listeners=new Map;_scope=[];addEventListener(t,e){const r=t=>{const r=t.target;r instanceof Node&&this._scope.some(t=>t===r||t.contains(r))&&e(t)};this._listeners.set(e,r),window.addEventListener(t,r)}removeEventListener(t,e){const r=this._listeners.get(e);r&&window.removeEventListener(t,r),this._listeners.delete(e)}get CustomEvent(){return window.CustomEvent}get document(){return window.document}get navigator(){return window.navigator}registerScope(t){this._scope.push(t)}destroy(){this._scope=[];for(const t of this._listeners.values())window.removeEventListener("keydown",t),window.removeEventListener("keyup",t);this._listeners.clear()}},ji=class{_destroyKeyUX;_scopedWindow;constructor(){this._scopedWindow=new Bi,this._destroyKeyUX=function(t,e){let r=e.map(e=>e(t));return()=>{r.forEach(t=>t())}}(this._scopedWindow,[to(),eo("is-pressed"),ro(),t=>{let e,r;function o(t){if("true"===t.target.getAttribute("aria-hidden")){e=t.target,e.setAttribute("aria-hidden","false"),r=e.hidden,r&&(e.hidden=!1);let o=t.target.querySelector('a, button, select, textarea, input:not([type=radio]), [type=radio]:checked, [tabindex]:not([tabindex="-1"])');o&&(o.tabIndex=0)}}function i(t){!e||!e.contains(t.target)||t.relatedTarget&&e.contains(t.relatedTarget)||(t.target.tabIndex=-1,e.setAttribute("aria-hidden","true"),r&&(e.hidden=!0),e=null)}return t.addEventListener("keyuxJump",o),t.addEventListener("focusout",i),()=>{t.removeEventListener("keyuxJump",o),t.removeEventListener("focusout",i)}}])}registerBlock(t){this._scopedWindow.registerScope(t)}destroy(){this._destroyKeyUX?.(),this._scopedWindow.destroy()}},Hi=Object.freeze({ADD:"modal:add",DELETE:"modal:delete",OPEN:"modal:open",CLOSE:"modal:close",CLOSE_ALL:"modal:closeAll",DESTROY:"modal:destroy"}),qi=class{_modals=new Map;_activeModals=new Set;_subscribers=new Map;_block;constructor(t){this._block=t}_debugPrint(...t){this._block.debugPrint("[modal-manager]",...t)}registerModal(t,e){this._modals.set(t,e),this._notify(Hi.ADD,{id:t,modal:e})}deleteModal(t){if(!this._modals.has(t))return!1;const e=this._modals.get(t);return this._modals.delete(t),this._activeModals.delete(t),this._notify(Hi.DELETE,{id:t,modal:e}),!0}open(t){if(!this._modals.has(t))return this._debugPrint(`Modal with ID "${t}" not found`),!1;const e=this._modals.get(t);return this._activeModals.add(t),this._notify(Hi.OPEN,{modal:e,id:t}),!0}close(t){if(!this._modals.has(t)||!this._activeModals.has(t))return this._debugPrint(`Modal with ID "${t}" not found or not active`),!1;const e=this._modals.get(t);return this._activeModals.delete(t),this._notify(Hi.CLOSE,{id:t,modal:e}),!0}toggle(t){return this._modals.has(t)?this._activeModals.has(t)?this.close(t):this.open(t):(this._debugPrint(`Modal with ID "${t}" not found`),!1)}get hasActiveModals(){return this._activeModals.size>0}back(){if(0===this._activeModals.size)return this._debugPrint("No active modals to go back from"),!1;const t=Array.from(this._activeModals).pop();return!!t&&this.close(t)}closeAll(){const t=this._activeModals.size;return this._activeModals.clear(),this._notify(Hi.CLOSE_ALL,{}),t}subscribe(t,e){return this._subscribers.has(t)||this._subscribers.set(t,new Set),this._subscribers.get(t)?.add(e),()=>this.unsubscribe(t,e)}unsubscribe(t,e){this._subscribers.has(t)&&this._subscribers.get(t)?.delete(e)}_notify(t,e){if(this._subscribers.has(t))for(const r of this._subscribers.get(t)??new Set)try{r(e)}catch(t){this._block.telemetryManager.sendEventError(t,"modal subscriber"),this._debugPrint("Error in modal subscriber:",t)}}destroy(){this.closeAll(),this._modals.clear(),this._subscribers.clear(),this._notify(Hi.DESTROY,{})}},Ki="blocks",Gi="1.24.5",Wi=class{_sessionId=crypto.randomUUID();_telemetryInstance;_block;_config=structuredClone(ki);_initialized=!1;_lastPayload=null;_queue;constructor(t){this._block=t,this._telemetryInstance=new ao,this._queue=new Zr(10);for(const t of Object.keys(this._config))this._block.subConfigValue(t,e=>{this._initialized&&this._config[t]!==e&&this.sendEvent({eventType:Fo.CHANGE_CONFIG}),this._setConfig(t,e)})}_init(t){t!==Fo.INIT_SOLUTION||this._initialized||(this._initialized=!0)}_setConfig(t,e){this._config[t]!==e&&(this._config[t]=e)}_formattingPayload(t){const e=t.payload?{...t.payload}:{};e.activity&&(e.activity=void 0);const r={...t};return t.eventType!==Fo.INIT_SOLUTION&&t.eventType!==Fo.CHANGE_CONFIG||(r.config=this._config),{...r,appVersion:Gi,appName:Ki,sessionId:this._sessionId,component:this._solution,activity:this._activity,projectPubkey:this._config.pubkey,userAgent:navigator.userAgent,eventType:r.eventType??"",eventTimestamp:this._timestamp,payload:{location:this._location,...e}}}_excludedEvents(t){return!(!t||![Vo.CHANGE,Vo.COMMON_UPLOAD_PROGRESS,Vo.FILE_ADDED,Vo.FILE_REMOVED,Vo.FILE_UPLOAD_START,Vo.FILE_UPLOAD_PROGRESS,Vo.FILE_UPLOAD_SUCCESS,Vo.FILE_UPLOAD_FAILED].includes(t))}sendEvent(t){const e=this._formattingPayload({eventType:t.eventType,payload:t.payload,config:t.config});this._init(t.eventType);if(this._excludedEvents(t.eventType))return;this._lastPayload&&this._checkObj(this._lastPayload,e)||this._queue.add(async()=>{this._lastPayload=e,await this._telemetryInstance.sendEvent(e)})}sendEventError(t,e="unknown"){this.sendEvent({eventType:Fo.ERROR_EVENT,payload:{metadata:{event:"error",text:`Error in ${e}`,error:t.message}}})}sendEventCloudImageEditor(t,e,r={}){this.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{tabId:e,node:t.currentTarget?.tagName,event:t.type,...r}}})}_checkObj(t,e){if(JSON.stringify(t)===JSON.stringify(e))return!0;if("object"!=typeof t||"object"!=typeof e||null==t||null==e)return!1;const r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(const o of r){if(!Object.hasOwn(e,o))return!1;if(!this._checkObj(t[o],e[o]))return!1}return!0}get _timestamp(){return Date.now()}get _solution(){if(!this._block.has("*solution"))return null;const t=this._block.$["*solution"];return t?t.toLowerCase():null}get _activity(){return this._block.has("*currentActivity")?this._block.$["*currentActivity"]??null:null}get _location(){return location.origin}},Zi=t=>`*cfg/${t}`;function Xi(t,e){const r=t.querySelectorAll("[data-testid]");if(0===r.length)return;const o=new WeakMap;for(const t of r){const e=t.getAttribute("data-testid");e&&o.set(t,e)}e.subConfigValue("testMode",t=>{if(!t){for(const t of r)t.removeAttribute("data-testid");return}const i=e.testId;for(const t of r){const e=o.get(t);e&&t.setAttribute("data-testid",`${i}--${e}`)}})}var Yi=class extends Ne{__cfgProxy;l10nProcessorSubs=new Map;static StateConsumerScope=null;static styleAttrs=[];requireCtxName=!1;activityType=null;init$={};l10n(t,e={}){if(!t)return"";const r=this.$[zi(t)]||t,o=function(t){const e=[];let r=t.indexOf(Ei);for(;-1!==r;){const o=t.indexOf(Ti,r);if(-1===o)break;const i=t.substring(r+2,o);if(i.startsWith(Ai)){const n=t.substring(r+2,o).replace(Ai,""),a=n.substring(0,n.indexOf("(")),s=n.substring(n.indexOf("(")+1,n.indexOf(")"));e.push({variable:i,pluralKey:a,countVariable:s})}r=t.indexOf(Ei,o)}return e}(r);for(const t of o)e[t.variable]=this.pluralize(t.pluralKey,Number(e[t.countVariable]));return Ii(r,e)}pluralize(t,e){const r=this.l10n("locale-id")||"en",o=xi(r,e);return this.l10n(`${t}__${o}`)}bindL10n(t,e){this.localeManager?.bindL10n(this,t,e)}constructor(){super(),this.addTemplateProcessor(Fi),this.addTemplateProcessor(Xi)}emit(t,e,r){const o=this.has("*eventEmitter")?this.$["*eventEmitter"]:void 0;o&&(o.emit(t,e,r),this.telemetryManager.sendEvent({eventType:t,payload:"function"==typeof e?e():e}))}hasBlockInCtx(t){for(const e of this.blocksRegistry)if(t(e))return!0;return!1}setOrAddState(t,e){this.add$({[t]:e},!0)}connectedCallback(){this.constructor.styleAttrs.forEach(t=>{this.setAttribute(t,"")}),this.hasAttribute("retpl")&&(this.constructor.template=null,this.processInnerHtml=!0),this.requireCtxName?(({element:t,attribute:e,onSuccess:r,onTimeout:o,timeout:i=300})=>{const n=t.getAttribute(e);if(null!==n)return void r(n);const a=new MutationObserver(t=>{const e=t[t.length-1];e&&c(e)});a.observe(t,{attributes:!0,attributeFilter:[e]});const s=window.setTimeout(()=>{a.disconnect(),o()},i),c=o=>{const i=t.getAttribute(e);"attributes"===o.type&&o.attributeName===e&&null!==i&&(window.clearTimeout(s),a.disconnect(),r(i))}})({element:this,attribute:"ctx-name",onSuccess:()=>{super.connectedCallback()},onTimeout:()=>{console.error("Attribute `ctx-name` is required and it is not set.")}}):super.connectedCallback(),Mi.registerClient(this)}disconnectedCallback(){super.disconnectedCallback(),Mi.unregisterClient(this)}initCallback(){this.has("*blocksRegistry")||this.add("*blocksRegistry",new Set);this.$["*blocksRegistry"].add(this),this.has("*eventEmitter")||this.add("*eventEmitter",new Bo(this.debugPrint.bind(this))),this.has("*localeManager")||this.add("*localeManager",new Di(this)),this.cfg.qualityInsights&&!this.has("*telemetryManager")&&this.add("*telemetryManager",new Wi(this)),this.has("*a11y")||this.add("*a11y",new ji),this.has("*modalManager")||this.add("*modalManager",new qi(this)),this.sub(zi("locale-id"),t=>{const e=(t=>{const e=new Intl.Locale(t);let r="ltr";const o=e.getTextInfo?.().direction;return o?r=o:e.textInfo?.direction&&(r=e.textInfo.direction),r})(t);this.style.direction="ltr"===e?"":e}),this.subConfigValue("testMode",t=>{t&&this.testId?this.setAttribute("data-testid",this.testId):this.removeAttribute("data-testid")})}get testId(){return window.customElements.getName(this.constructor)}get modalManager(){return this.has("*modalManager")?this.$["*modalManager"]:void 0}get telemetryManager(){return this.cfg.qualityInsights?this.has("*telemetryManager")&&this.$["*telemetryManager"]:{sendEvent:()=>{},sendEventCloudImageEditor:()=>{},sendEventError:()=>{}}}get localeManager(){return this.has("*localeManager")?this.$["*localeManager"]:null}get a11y(){return this.has("*a11y")?this.$["*a11y"]:null}get blocksRegistry(){return this.$["*blocksRegistry"]}destroyCallback(){super.destroyCallback();const t=this.blocksRegistry;t?.delete(this),this.localeManager?.destroyL10nBindings(this),this.l10nProcessorSubs=new Map,we.deleteCtx(this),0===t?.size&&setTimeout(()=>{this.destroyCtxCallback()},0)}destroyCtxCallback(){we.deleteCtx(this.ctxName),this.localeManager?.destroy(),this.modalManager?.destroy()}async proxyUrl(t){if(this.cfg.secureDeliveryProxy&&this.cfg.secureDeliveryProxyUrlResolver&&console.warn("Both secureDeliveryProxy and secureDeliveryProxyUrlResolver are set. The secureDeliveryProxyUrlResolver will be used."),this.cfg.secureDeliveryProxyUrlResolver)try{return await this.cfg.secureDeliveryProxyUrlResolver(t,{uuid:Xo(t),cdnUrlModifiers:Yo(t),fileName:Zo(t)})}catch(e){return console.error("Failed to resolve secure delivery proxy URL. Falling back to the default URL.",e),this.telemetryManager.sendEventError(e,"secureDeliveryProxyUrlResolver. Failed to resolve secure delivery proxy URL. Falling back to the default URL."),t}return this.cfg.secureDeliveryProxy?Ii(this.cfg.secureDeliveryProxy,{previewUrl:t},{transform:t=>window.encodeURIComponent(t)}):t}get cfg(){if(!this.__cfgProxy){const t=Object.create(null);this.__cfgProxy=new Proxy(t,{set:(t,e,r)=>{if("string"!=typeof e)return!1;const o=Zi(e);return this.has(o)||this.add(o,ki[e]),this.$[o]=r,!0},get:(t,e)=>{const r=Zi(e);return this.has(r)||this.add(r,ki[e]),this.$[Zi(e)]}})}return this.__cfgProxy}subConfigValue(t,e){const r=Zi(t);this.has(r)||this.add(r,ki[t]),this.sub(r,e)}debugPrint(...t){if(!this.cfg.debug)return;let e=t;if("function"==typeof t?.[0]){e=(0,t[0])()}console.log(`[${this.ctxName}]`,...e)}static reg(t){t?t.startsWith("uc-")&&super.reg(t):super.reg()}},Ji="active",Qi="___ACTIVITY_IS_ACTIVE___",tn=class t extends Yi{historyTracked=!1;[Qi];init$=$i(this);_debouncedHistoryFlush=jo(this._historyFlush.bind(this),10);_deactivate(){const e=t._activityCallbacks.get(this);this[Qi]=!1,this.removeAttribute(Ji),e?.deactivateCallback?.()}_activate(){const e=t._activityCallbacks.get(this);this.$["*historyBack"]=this.historyBack.bind(this),this[Qi]=!0,this.setAttribute(Ji,""),e?.activateCallback?.(),this._debouncedHistoryFlush(),this.emit(Vo.ACTIVITY_CHANGE,{activity:this.activityType})}initCallback(){super.initCallback(),this.activityType&&(this.hasAttribute("activity")||this.setAttribute("activity",this.activityType),this.sub("*currentActivity",t=>{try{this.activityType!==t&&this[Qi]?this._deactivate():this.activityType!==t||this[Qi]||this._activate()}catch(t){this.telemetryManager.sendEventError(t,`activity "${this.activityType}"`),console.error(`Error in activity "${this.activityType}". `,t),this.$["*currentActivity"]=this.$["*history"][this.$["*history"].length-1]??null}t||(this.$["*history"]=[])}))}_historyFlush(){let t=this.$["*history"];t&&(t.length>10&&(t=t.slice(t.length-11,t.length-1)),this.historyTracked&&t[t.length-1]!==this.activityType&&t.push(this.activityType),this.$["*history"]=t)}_isActivityRegistered(){return!!this.activityType&&t._activityCallbacks.has(this)}static _activityCallbacks=new Map;static activities;get isActivityActive(){return!!this[Qi]}get couldOpenActivity(){return!0}registerActivity(e,r={}){const{onActivate:o,onDeactivate:i}=r;t._activityCallbacks.set(this,{activateCallback:o,deactivateCallback:i})}unregisterActivity(){this.isActivityActive&&this._deactivate(),t._activityCallbacks.delete(this)}destroyCallback(){super.destroyCallback(),this._isActivityRegistered()&&this.unregisterActivity();const e=this.$["*currentActivity"];!![...this.blocksRegistry].find(r=>r instanceof t&&r.activityType===e)||(this.$["*currentActivity"]=null,this.modalManager?.closeAll())}get activityKey(){return this.ctxName+this.activityType}get activityParams(){return this.$["*currentActivityParams"]}get initActivity(){return this.getCssData("--cfg-init-activity")}get doneActivity(){return this.getCssData("--cfg-done-activity")}historyBack(){const t=this.$["*history"];if(t){let e=t.pop();for(;e===this.activityType;)e=t.pop();let r=!!e;if(e){const t=[...this.blocksRegistry].find(t=>t.activityType===e);r=t?.couldOpenActivity??!1}e=r?e:void 0,e&&this.modalManager?.open(e),this.$["*currentActivity"]=e,this.$["*history"]=t,e||this.modalManager?.closeAll()}}};function en(t){for(const e in t){let r=[...e].reduce((t,e)=>(e.toUpperCase()===e&&(e=`-${e.toLowerCase()}`),t+=e),"");r.startsWith("-")&&(r=r.replace("-","")),r.startsWith("uc-")||(r=`uc-${r}`),t[e].reg&&t[e].reg(r)}}tn.activities=Object.freeze({START_FROM:"start-from",CAMERA:"camera",DRAW:"draw",UPLOAD_LIST:"upload-list",URL:"url",CLOUD_IMG_EDIT:"cloud-image-edit",EXTERNAL:"external"});var rn="UC";function on(t,e=!1){return new Promise((r,o)=>{if("object"!=typeof document)return void r(null);if("object"==typeof window&&window[rn])return void r(window[rn]);const i=document.createElement("script");i.async=!0,i.src=t,i.onerror=()=>{o()},i.onload=()=>{const t=window[rn];e&&en(t),r(t)},document.head.appendChild(i)})}var nn=class extends Yi{static styleAttrs=["uc-wgt-common"];requireCtxName=!0;init$=(t=>({...Li(t),"*solution":null}))(this);static _template="";initCallback(){super.initCallback(),this.a11y?.registerBlock(this)}static set template(t){this._template="<svg width='0' height='0' style='position:absolute'><symbol viewBox='0 0 24 24' id='uc-icon-about' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M11.152 14.12v.1h1.523v-.1c.007-.409.053-.752.138-1.028.086-.277.22-.517.405-.72.188-.202.434-.397.735-.586.32-.191.593-.412.82-.66.232-.249.41-.531.533-.847.125-.32.187-.678.187-1.076 0-.579-.137-1.085-.41-1.518a2.717 2.717 0 0 0-1.14-1.018c-.49-.245-1.062-.367-1.715-.367-.597 0-1.142.114-1.636.34-.49.228-.884.564-1.182 1.008-.299.44-.46.98-.485 1.619h1.62c.024-.377.118-.684.282-.922a1.48 1.48 0 0 1 .617-.532c.25-.114.51-.17.784-.17.301 0 .575.063.82.191.248.124.447.302.597.533.149.23.223.504.223.82 0 .263-.05.502-.149.72a1.91 1.91 0 0 1-.405.574 3.48 3.48 0 0 1-.575.453 4.22 4.22 0 0 0-.847.66c-.234.242-.415.558-.543.949-.125.39-.19.916-.197 1.577Zm.053 3.03c.21.206.46.31.75.31.196 0 .374-.049.534-.144a1.1 1.1 0 0 0 .383-.384c.1-.163.15-.343.15-.538a1 1 0 0 0-.32-.746 1.019 1.019 0 0 0-.746-.314c-.291 0-.542.105-.751.314-.21.206-.314.455-.314.746 0 .295.104.547.314.756ZM24 12c0 6.627-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0s12 5.373 12 12Zm-1.5 0c0 5.799-4.701 10.5-10.5 10.5S1.5 17.799 1.5 12 6.201 1.5 12 1.5 22.5 6.201 22.5 12Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-add' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M12.75 21a.75.75 0 0 1-1.5 0v-8.25H3a.75.75 0 0 1 0-1.5h8.25V3a.75.75 0 0 1 1.5 0v8.25H21a.75.75 0 0 1 0 1.5h-8.25V21Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-arrow-down' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M11.5 23.03a.75.75 0 0 0 .999 0l9.29-8.276a.75.75 0 0 0-.998-1.12l-8.042 7.164V1.53a.75.75 0 0 0-1.5 0v19.267l-8.04-7.163a.75.75 0 0 0-.998 1.12z'/></symbol><symbol fill='none' viewBox='0 0 9 6' id='uc-icon-arrow-dropdown' xmlns='http://www.w3.org/2000/svg'><path stroke='currentColor' d='m1.5 1.667 3 2.666 3-2.666' opacity='.5'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-aspect-ratio' xmlns='http://www.w3.org/2000/svg'><path stroke='currentColor' d='M7.395 22.5H2.454v-5.25m14.824 5.25h4.94v-5.25m0-10.5V1.5h-4.94m-9.883 0H2.454v5.25'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-back' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M20.251 12a.75.75 0 0 1-.75.75H6.067l5.72 5.85a.75.75 0 1 1-1.072 1.05L4.136 12.92a1.292 1.292 0 0 1 0-1.842l6.579-6.728a.75.75 0 1 1 1.072 1.048l-5.72 5.851H19.5a.75.75 0 0 1 .75.75Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-badge-error' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M13.6 18.4a1.6 1.6 0 1 1-3.2 0 1.6 1.6 0 0 1 3.2 0zM12 4.5A1.5 1.5 0 0 1 13.5 6v7a1.5 1.5 0 0 1-3 0V6A1.5 1.5 0 0 1 12 4.5z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-badge-success' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='m10.5 18.204 7.6-8.183a1.5 1.5 0 0 0-2.2-2.042l-5.4 5.817-2.4-2.586a1.5 1.5 0 1 0-2.2 2.041l4.6 4.953Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-box' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M1.01 4.148a.75.75 0 0 1 .75.75v4.348a4.437 4.437 0 0 1 2.988-1.153c1.734 0 3.23.992 3.978 2.438a4.478 4.478 0 0 1 3.978-2.438c2.49 0 4.488 2.044 4.488 4.543 0 2.5-1.999 4.544-4.488 4.544a4.478 4.478 0 0 1-3.978-2.438 4.478 4.478 0 0 1-3.978 2.438C2.26 17.18.26 15.135.26 12.636V4.898a.75.75 0 0 1 .75-.75Zm.75 8.488c0 1.692 1.348 3.044 2.988 3.044s2.989-1.352 2.989-3.044c0-1.691-1.349-3.043-2.989-3.043S1.76 10.945 1.76 12.636Zm10.944-3.043c-1.64 0-2.988 1.352-2.988 3.043 0 1.692 1.348 3.044 2.988 3.044s2.988-1.352 2.988-3.044c0-1.69-1.348-3.043-2.988-3.043Zm4.328-1.23a.75.75 0 0 1 1.052.128l2.333 2.983 2.333-2.983a.75.75 0 0 1 1.181.924l-2.562 3.277 2.562 3.276a.75.75 0 1 1-1.181.924l-2.333-2.983-2.333 2.983a.75.75 0 1 1-1.181-.924l2.562-3.276-2.562-3.277a.75.75 0 0 1 .129-1.052Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-camera' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M7.65 2.55a.75.75 0 0 1 .6-.3h7.5a.75.75 0 0 1 .6.3l2.025 2.7H21a3 3 0 0 1 3 3v10.5a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V8.25a3 3 0 0 1 3-3h2.625zm.975 1.2L6.6 6.45a.75.75 0 0 1-.6.3H3a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h18a1.5 1.5 0 0 0 1.5-1.5V8.25a1.5 1.5 0 0 0-1.5-1.5h-3a.75.75 0 0 1-.6-.3l-2.025-2.7zm3.375 6a3.375 3.375 0 1 0 0 6.75 3.375 3.375 0 0 0 0-6.75zm-4.875 3.375a4.875 4.875 0 1 1 9.75 0 4.875 4.875 0 0 1-9.75 0z'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-camera-full' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' clip-rule='evenodd' d='M2 4.667a2 2 0 0 0-2 2V16a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6.667a2 2 0 0 0-2-2h-2.667l-2-2.667H6.667l-2 2.667H2Zm8 10a3.667 3.667 0 1 0 0-7.334 3.667 3.667 0 0 0 0 7.334Z' fill='currentColor'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-close' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M4.604 4.604a.75.75 0 0 1 1.06 0L12 10.939l6.335-6.335a.75.75 0 1 1 1.061 1.06L13.061 12l6.335 6.335a.75.75 0 1 1-1.06 1.061L12 13.061l-6.335 6.335a.75.75 0 0 1-1.061-1.06L10.939 12 4.604 5.665a.75.75 0 0 1 0-1.061z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-collapse' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M3.116 12a.75.75 0 0 1 .75-.75h16.268a.75.75 0 0 1 0 1.5H3.866a.75.75 0 0 1-.75-.75Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-default' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M11.501.392a.75.75 0 0 1 .998 0l6.704 5.972a.75.75 0 0 1-.998 1.12l-5.455-4.86v13.439a.75.75 0 0 1-1.5 0V2.625l-5.454 4.86a.75.75 0 1 1-.998-1.12zM.857 16.73a.75.75 0 0 1 .75.75v4.914h20.786v-4.914a.75.75 0 0 1 1.5 0v5.664a.75.75 0 0 1-.75.75H.857a.75.75 0 0 1-.75-.75v-5.664a.75.75 0 0 1 .75-.75z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-dropbox' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M6.019 1.92a.75.75 0 0 1 .806 0L12 5.219l5.176-3.297a.75.75 0 0 1 .806 0l5.577 3.553a.75.75 0 0 1 0 1.265l-4.574 2.914 4.574 2.914a.75.75 0 0 1 0 1.265l-5.577 3.554a.75.75 0 0 1-.806 0L12 14.089l-5.175 3.297a.75.75 0 0 1-.806 0L.44 13.833a.75.75 0 0 1 0-1.266l4.575-2.914L.44 6.74a.75.75 0 0 1 0-1.265zm.403 8.616L2.24 13.2l4.182 2.664 4.181-2.664zm6.975 2.664 4.182 2.664L21.76 13.2l-4.181-2.664zm2.776-3.547L12 12.311 7.828 9.653 12 6.995zm1.406-.882 4.181-2.664-4.181-2.664-4.182 2.664zm-6.976-2.664L6.422 3.443 2.24 6.107 6.422 8.77zM5.791 18.544a.75.75 0 0 1 1.035-.23l5.175 3.297 5.175-3.297a.75.75 0 1 1 .806 1.265l-5.578 3.554a.75.75 0 0 1-.806 0L6.02 19.579a.75.75 0 0 1-.23-1.035z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-edit-file' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M18.558 2.804a.78.78 0 0 0-.557.235l-.008.007-2.472 2.46 3.847 3.848 2.46-2.473.004-.003a.78.78 0 0 0 0-1.108l-.004-.003-2.712-2.728a.78.78 0 0 0-.558-.235Zm-.248 7.613-3.852-3.852-8.93 8.887-1.516 5.41 5.41-1.515 8.888-8.93Zm-.636-8.934a2.28 2.28 0 0 1 2.512.505l2.702 2.717.002.002a2.278 2.278 0 0 1 0 3.234l-.002.002-12.541 12.602a.75.75 0 0 1-.33.193l-6.884 1.928a.75.75 0 0 1-.925-.924l1.928-6.885a.75.75 0 0 1 .193-.33l12.603-12.54a2.28 2.28 0 0 1 .742-.504Z' clip-rule='evenodd'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-error' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M13 13h-2V7h2m0 10h-2v-2h2M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-evernote' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M9.804 2.27v-.048c.055-.263.313-.562.85-.562h.44c.142 0 .325.014.526.033.066.009.124.023.267.06l.13.032h.002c.319.079.515.275.644.482a1.461 1.461 0 0 1 .16.356l.004.012a.75.75 0 0 0 .603.577l1.191.207a1988.512 1988.512 0 0 0 2.332.402c.512.083 1.1.178 1.665.442.64.3 1.19.795 1.376 1.77.548 2.931.657 5.829.621 8a39.233 39.233 0 0 1-.125 2.602 17.518 17.518 0 0 1-.092.849.735.735 0 0 0-.024.112c-.378 2.705-1.269 3.796-2.04 4.27-.746.457-1.53.451-2.217.447h-.192c-.46 0-1.073-.23-1.581-.635-.518-.412-.763-.87-.763-1.217 0-.45.188-.688.355-.786.161-.095.436-.137.796.087a.75.75 0 1 0 .792-1.274c-.766-.476-1.64-.52-2.345-.108-.7.409-1.098 1.188-1.098 2.08 0 .996.634 1.84 1.329 2.392.704.56 1.638.96 2.515.96l.185.002c.667.009 1.874.025 3.007-.67 1.283-.786 2.314-2.358 2.733-5.276a4.213 4.213 0 0 0 .056-.335c.023-.184.051-.445.079-.772.055-.655.111-1.585.13-2.704.037-2.234-.074-5.239-.647-8.301v-.002c-.294-1.544-1.233-2.391-2.215-2.85-.777-.363-1.623-.496-2.129-.576a8.872 8.872 0 0 1-.25-.041l-.006-.001-1.99-.345-.761-.132a2.93 2.93 0 0 0-.182-.338A2.532 2.532 0 0 0 12.379.329l-.091-.023a3.967 3.967 0 0 0-.493-.103L11.769.2a7.846 7.846 0 0 0-.675-.04h-.44c-.733 0-1.368.284-1.795.742L2.416 7.431c-.468.428-.751 1.071-.751 1.81 0 .02 0 .041.003.062l.003.034c.017.21.038.468.096.796.107.715.275 1.47.391 1.994.029.13.055.245.075.342l.002.008c.258 1.141.641 1.94.978 2.466.168.263.323.456.444.589a2.808 2.808 0 0 0 .192.194c1.536 1.562 3.713 2.196 5.731 2.08.13-.005.35-.032.537-.073a2.627 2.627 0 0 0 .652-.24c.425-.26.75-.661.992-1.046.184-.294.342-.61.473-.915a3.8 3.8 0 0 0 .627.493 5.022 5.022 0 0 0 1.97.709l.023.002.018.003.11.016c.088.014.205.035.325.058l.056.014c.088.022.164.04.235.061a1.736 1.736 0 0 1 .145.048l.03.014c.765.34 1.302 1.09 1.302 1.871a.75.75 0 0 0 1.5 0c0-1.456-.964-2.69-2.18-3.235a3.595 3.595 0 0 0-.679-.217l-.063-.015a10.616 10.616 0 0 0-.606-.105l-.02-.003-.03-.003h-.002a3.542 3.542 0 0 1-1.331-.485c-.471-.298-.788-.692-.828-1.234a.75.75 0 0 0-1.48-.106l-.001.003-.004.017a8.23 8.23 0 0 1-.092.352 9.963 9.963 0 0 1-.298.892c-.132.34-.29.68-.47.966-.174.276-.339.454-.478.549a1.178 1.178 0 0 1-.221.072 1.949 1.949 0 0 1-.241.036h-.013l-.032.002c-1.684.1-3.423-.437-4.604-1.65a.746.746 0 0 0-.053-.05L4.84 14.6a1.348 1.348 0 0 1-.07-.073 2.99 2.99 0 0 1-.293-.392c-.242-.379-.558-1.014-.778-1.985a54.1 54.1 0 0 0-.083-.376 27.494 27.494 0 0 1-.367-1.872l-.003-.02a6.791 6.791 0 0 1-.08-.67c.004-.277.086-.475.2-.609l.067-.067a.63.63 0 0 1 .292-.145h.05c.18 0 1.095.055 2.013.115l1.207.08.534.037a.747.747 0 0 0 .052.002c.782 0 1.349-.206 1.759-.585l.005-.005c.553-.52.622-1.225.622-1.76V6.24l-.026-.565A774.97 774.97 0 0 1 9.885 4.4c-.042-.961-.081-1.939-.081-2.13ZM4.995 6.953a251.126 251.126 0 0 1 2.102.137l.508.035c.48-.004.646-.122.715-.185.07-.068.146-.209.147-.649l-.024-.548a791.69 791.69 0 0 1-.095-2.187L4.995 6.953Zm16.122 9.996Zm-5.479-5.323a.75.75 0 0 0 1.014.31 2.04 2.04 0 0 1 .304-.089 1.84 1.84 0 0 1 .544-.039c.215.023.321.06.37.085.033.016.039.026.047.04a.75.75 0 0 0 1.289-.767c-.337-.567-.906-.783-1.552-.85a3.334 3.334 0 0 0-1.002.062c-.27.056-.531.14-.705.234a.75.75 0 0 0-.31 1.014Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-expand' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='m12 8.337-8.47 8.47a.75.75 0 0 1-1.06-1.06l8.605-8.606a1.29 1.29 0 0 1 1.85 0l8.605 8.605a.75.75 0 1 1-1.06 1.06L12 8.338Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-external-source-placeholder' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M6.341 3.27a10.5 10.5 0 0 1 5.834-1.77.75.75 0 0 0 0-1.5 12 12 0 1 0 12 12 .75.75 0 0 0-1.5 0A10.5 10.5 0 1 1 6.34 3.27Zm14.145 1.48a.75.75 0 1 0-1.06-1.062L9.925 13.19V7.95a.75.75 0 1 0-1.5 0V15c0 .414.336.75.75.75h7.05a.75.75 0 0 0 0-1.5h-5.24l9.501-9.5Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-facebook' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M12 1.5C6.201 1.5 1.5 6.201 1.5 12c0 4.943 3.416 9.089 8.016 10.204v-6.108H7.383a.75.75 0 0 1-.75-.75v-3.281a.75.75 0 0 1 .75-.75h2.133V9.393c0-.958.225-2.511 1.38-3.65 1.194-1.177 3.174-1.718 6.254-1.056a.75.75 0 0 1 .592.733v2.754a.75.75 0 0 1-.75.75c-.692 0-1.203.026-1.584.082-.387.057-.578.137-.675.202-.109.073-.237.205-.237 1.029v1.078h2.39a.75.75 0 0 1 .742.866l-.516 3.281a.75.75 0 0 1-.74.634h-1.876v6.106C19.09 21.082 22.5 16.939 22.5 12c0-5.799-4.701-10.5-10.5-10.5zM0 12C0 5.373 5.373 0 12 0s12 5.373 12 12c0 5.995-4.395 10.961-10.138 11.856a.75.75 0 0 1-.866-.74v-7.77a.75.75 0 0 1 .75-.75h1.984l.28-1.781h-2.264a.75.75 0 0 1-.75-.75v-1.828c0-.829.089-1.729.9-2.274.363-.244.807-.37 1.293-.441a9.623 9.623 0 0 1 1.053-.086V6.04c-2.41-.405-3.645.132-4.293.771-.737.728-.933 1.793-.933 2.582v2.672a.75.75 0 0 1-.75.75H8.133v1.78h2.133a.75.75 0 0 1 .75.75v7.772a.75.75 0 0 1-.865.741C4.4 22.968 0 18 0 12z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-file' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M2.895 1.201c0-.473.383-.857.857-.857h8.4c.227 0 .445.09.606.251l8.4 8.4c.16.16.25.379.25.606v13.2a.857.857 0 0 1-.856.857h-16.8a.857.857 0 0 1-.857-.857zm1.714.857v19.886h15.085V10.458h-7.542a.857.857 0 0 1-.858-.857V2.058zm8.4 1.213 5.473 5.473H13.01z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-flickr' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M5.959 7.926c-2.298 0-4.14 1.834-4.14 4.073 0 2.241 1.842 4.075 4.14 4.075 2.302 0 4.145-1.834 4.145-4.075 0-2.238-1.843-4.073-4.145-4.073Zm-5.64 4.073c0-3.086 2.533-5.573 5.64-5.573 3.11 0 5.645 2.486 5.645 5.573 0 3.089-2.535 5.575-5.645 5.575-3.107 0-5.64-2.487-5.64-5.575Zm18.07-4.073c-2.301 0-4.144 1.835-4.144 4.073 0 2.24 1.843 4.075 4.145 4.075 2.299 0 4.141-1.834 4.141-4.075 0-2.239-1.842-4.073-4.141-4.073Zm-5.644 4.073c0-3.087 2.535-5.573 5.645-5.573 3.108 0 5.641 2.487 5.641 5.573 0 3.088-2.533 5.575-5.641 5.575-3.11 0-5.645-2.486-5.645-5.575Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-gdrive' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M7.736 1.818a.75.75 0 0 1 .647-.37h7.587a.75.75 0 0 1 .655.383l7.233 12.946a.75.75 0 0 1-.003.737l-3.794 6.66a.75.75 0 0 1-.651.378H4.59a.75.75 0 0 1-.651-.378l-3.794-6.66a.75.75 0 0 1 .005-.75zm.64 1.876L1.663 15.148l2.93 5.145 6.655-11.581zm3.736 6.526-2.398 4.173H14.5zm4.116 4.173h5.697L15.53 2.947H9.677zm5.685 1.5H8.852l-2.966 5.16h13.088z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-gphotos' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M12.51 0c-.702 0-1.272.57-1.272 1.273V7.35A6.381 6.381 0 0 0 0 11.489c0 .703.57 1.273 1.273 1.273H7.35A6.381 6.381 0 0 0 11.488 24c.704 0 1.274-.57 1.274-1.273V16.65A6.381 6.381 0 0 0 24 12.51c0-.703-.57-1.273-1.273-1.273H16.65A6.381 6.381 0 0 0 12.511 0Zm.252 11.232V1.53a4.857 4.857 0 0 1 0 9.702Zm-1.53.006H1.53a4.857 4.857 0 0 1 9.702 0Zm1.536 1.524a4.857 4.857 0 0 0 9.702 0h-9.702Zm-6.136 4.857c0-2.598 2.04-4.72 4.606-4.85v9.7a4.857 4.857 0 0 1-4.606-4.85Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-huddle' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M6.204 2.002c-.252.23-.357.486-.357.67V21.07c0 .15.084.505.313.812.208.28.499.477.929.477.519 0 .796-.174.956-.365.178-.212.286-.535.286-.924v-.013l.117-6.58c.004-1.725 1.419-3.883 3.867-3.883 1.33 0 2.332.581 2.987 1.364.637.762.95 1.717.95 2.526v6.47c0 .392.11.751.305.995.175.22.468.41 1.008.41.52 0 .816-.198 1.002-.437.207-.266.31-.633.31-.969V14.04c0-2.81-1.943-5.108-4.136-5.422a5.971 5.971 0 0 0-3.183.41c-.912.393-1.538.96-1.81 1.489a.75.75 0 0 1-1.417-.344v-7.5c0-.587-.47-1.031-1.242-1.031-.315 0-.638.136-.885.36ZM5.194.892A2.844 2.844 0 0 1 7.09.142c1.328 0 2.742.867 2.742 2.53v5.607a6.358 6.358 0 0 1 1.133-.629 7.47 7.47 0 0 1 3.989-.516c3.056.436 5.425 3.482 5.425 6.906v6.914c0 .602-.177 1.313-.627 1.89-.47.605-1.204 1.016-2.186 1.016-.96 0-1.698-.37-2.179-.973-.46-.575-.633-1.294-.633-1.933v-6.469c0-.456-.19-1.071-.602-1.563-.394-.471-.986-.827-1.836-.827-1.447 0-2.367 1.304-2.367 2.39v.014l-.117 6.58c-.001.64-.177 1.333-.637 1.881-.48.57-1.2.9-2.105.9-.995 0-1.7-.5-2.132-1.081-.41-.552-.61-1.217-.61-1.708V2.672c0-.707.366-1.341.847-1.78Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-info' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M11 9h2V7h-2m1 13c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-18A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2m-1 15h2v-6h-2v6Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-local' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M3 3.75a1.5 1.5 0 0 0-1.5 1.5v13.5a1.5 1.5 0 0 0 1.5 1.5h18a1.5 1.5 0 0 0 1.5-1.5V9A1.5 1.5 0 0 0 21 7.5h-9a.75.75 0 0 1-.643-.364L9.325 3.75zm-3 1.5a3 3 0 0 1 3-3h6.75a.75.75 0 0 1 .643.364L12.425 6H21a3 3 0 0 1 3 3v9.75a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-microphone' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' clip-rule='evenodd' d='M7.5 4.781a4.5 4.5 0 0 1 9 0v6.469a4.5 4.5 0 1 1-9 0V4.781Zm4.5-3a3 3 0 0 0-3 3v6.469a3 3 0 1 0 6 0V4.781a3 3 0 0 0-3-3Zm-8.156 8.11a.75.75 0 0 1 .75.75 7.406 7.406 0 1 0 14.812 0 .75.75 0 0 1 1.5 0 8.907 8.907 0 0 1-8.156 8.875v2.703h3.258a.75.75 0 1 1 0 1.5H7.992a.75.75 0 0 1 0-1.5h3.258v-2.703a8.907 8.907 0 0 1-8.156-8.875.75.75 0 0 1 .75-.75Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-microphone-mute' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' clip-rule='evenodd' d='M7.5 4.781a4.5 4.5 0 0 1 9 0V6l3.524-3.524a.75.75 0 1 1 1.061 1.06L5.036 19.585a.75.75 0 0 1-1.06-1.06l1.656-1.657a8.88 8.88 0 0 1-2.538-6.227.75.75 0 0 1 1.5 0c0 2.009.8 3.83 2.1 5.166l1.771-1.772A4.483 4.483 0 0 1 7.5 11.25V4.781Zm2.037 8.182L15 7.5V4.781a3 3 0 1 0-6 0v6.469c0 .637.198 1.227.537 1.713Zm10.62-3.072a.75.75 0 0 1 .75.75 8.907 8.907 0 0 1-8.157 8.875v2.703h3.258a.75.75 0 1 1 0 1.5H7.992a.75.75 0 0 1 0-1.5h3.258v-2.703a8.855 8.855 0 0 1-3.035-.811.75.75 0 1 1 .638-1.358 7.406 7.406 0 0 0 10.553-6.707.75.75 0 0 1 .75-.75ZM15 10.81a.75.75 0 0 1 1.5 0v.439a4.5 4.5 0 0 1-5 4.473.75.75 0 1 1 .166-1.491A3 3 0 0 0 15 11.25v-.44Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-mobile-photo-camera' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M7.65 2.55a.75.75 0 0 1 .6-.3h7.5a.75.75 0 0 1 .6.3l2.025 2.7H21a3 3 0 0 1 3 3v10.5a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V8.25a3 3 0 0 1 3-3h2.625zm.975 1.2L6.6 6.45a.75.75 0 0 1-.6.3H3a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h18a1.5 1.5 0 0 0 1.5-1.5V8.25a1.5 1.5 0 0 0-1.5-1.5h-3a.75.75 0 0 1-.6-.3l-2.025-2.7zm3.375 6a3.375 3.375 0 1 0 0 6.75 3.375 3.375 0 0 0 0-6.75zm-4.875 3.375a4.875 4.875 0 1 1 9.75 0 4.875 4.875 0 0 1-9.75 0z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-mobile-video-camera' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' clip-rule='evenodd' d='M0 6.75a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v1.078L22.873 5A.75.75 0 0 1 24 5.648v12.704a.75.75 0 0 1-1.123.65L18 16.207v1.043a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V6.75Zm18 7.728 4.5 2.58V6.95L18 9.562v4.916ZM16.5 6.75a1.5 1.5 0 0 0-1.5-1.5H3a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h12a1.5 1.5 0 0 0 1.5-1.5V6.75Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-ngdrive' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M7.736 1.818a.75.75 0 0 1 .647-.37h7.587a.75.75 0 0 1 .655.383l7.233 12.946a.75.75 0 0 1-.003.737l-3.794 6.66a.75.75 0 0 1-.651.378H4.59a.75.75 0 0 1-.651-.378l-3.794-6.66a.75.75 0 0 1 .005-.75zm.64 1.876L1.663 15.148l2.93 5.145 6.655-11.581zm3.736 6.526-2.398 4.173H14.5zm4.116 4.173h5.697L15.53 2.947H9.677zm5.685 1.5H8.852l-2.966 5.16h13.088z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-onedrive' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M13.616 4.147a7.689 7.689 0 0 0-7.642 3.285A6.299 6.299 0 0 0 1.455 17.3c.684.894 2.473 2.658 5.17 2.658h12.141c.95 0 1.882-.256 2.697-.743.815-.486 1.514-1.247 1.964-2.083a5.26 5.26 0 0 0-3.713-7.612 7.69 7.69 0 0 0-6.098-5.373ZM3.34 17.15c.674.63 1.761 1.308 3.284 1.308h12.142a3.76 3.76 0 0 0 2.915-1.383l-7.494-4.489L3.34 17.15Zm10.875-6.25 2.47-1.038a5.239 5.239 0 0 1 1.427-.389 6.19 6.19 0 0 0-10.3-1.952 6.338 6.338 0 0 1 2.118.813l4.285 2.567Zm4.55.033c-.512 0-1.019.104-1.489.307l-.006.003-1.414.594 6.521 3.906a3.76 3.76 0 0 0-3.357-4.8l-.254-.01ZM4.097 9.617A4.799 4.799 0 0 1 6.558 8.9c.9 0 1.84.25 2.587.713l3.4 2.037-10.17 4.28a4.799 4.799 0 0 1 1.721-6.312Z'/></symbol><symbol fill='none' viewBox='0 0 10 10' id='uc-icon-pause' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' d='M1 0h2.5v10H1zM6.5 0H9v10H6.5z'/></symbol><symbol fill='none' viewBox='0 0 10 10' id='uc-icon-play' xmlns='http://www.w3.org/2000/svg'><path d='m1 0 9 5-9 5V0Z' fill='currentColor'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-remove-file' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M11.955 3.3A2.969 2.969 0 0 0 8.998 6h5.914a2.97 2.97 0 0 0-2.957-2.7zM16.416 6a4.47 4.47 0 0 0-8.922 0h-2.32a.755.755 0 0 0-.111.008H3.075a.75.75 0 1 0 0 1.5h1.35V19.35a2.85 2.85 0 0 0 2.85 2.85h9.45a2.85 2.85 0 0 0 2.85-2.85V7.508h1.35a.75.75 0 0 0 0-1.5h-1.989A.754.754 0 0 0 18.825 6zM5.925 7.508V19.35a1.35 1.35 0 0 0 1.35 1.35h9.45a1.35 1.35 0 0 0 1.35-1.35V7.508z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-select' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='m7 10 5 5 5-5H7Z'/></symbol><symbol fill='none' viewBox='0 0 20 20' id='uc-icon-square' xmlns='http://www.w3.org/2000/svg'><rect width='20' height='20' rx='4' fill='#fff'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-upload' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M11.501.392a.75.75 0 0 1 .998 0l6.704 5.972a.75.75 0 0 1-.998 1.12l-5.455-4.86v13.439a.75.75 0 0 1-1.5 0V2.625l-5.454 4.86a.75.75 0 1 1-.998-1.12zM.857 16.73a.75.75 0 0 1 .75.75v4.914h20.786v-4.914a.75.75 0 0 1 1.5 0v5.664a.75.75 0 0 1-.75.75H.857a.75.75 0 0 1-.75-.75v-5.664a.75.75 0 0 1 .75-.75z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-upload-error' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M13 13h-2V7h2m0 10h-2v-2h2M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2Z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-url' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M19.11 3.67c-1.71-1.709-4.578-1.682-6.408.148l-2.22 2.22a.75.75 0 0 1-1.062-1.06l2.222-2.221C14.018.381 17.836.276 20.17 2.61l1.22 1.22c2.335 2.334 2.23 6.153-.147 8.529l-2.22 2.22a.75.75 0 0 1-1.062-1.06l2.222-2.221c1.83-1.83 1.856-4.698.147-6.408zm-3.36 4.58a.75.75 0 0 1 0 1.06l-6.439 6.44a.75.75 0 0 1-1.06-1.06l6.439-6.44a.75.75 0 0 1 1.06 0zM6.04 9.42a.75.75 0 0 1 0 1.061l-2.222 2.222c-1.83 1.83-1.856 4.698-.147 6.407l1.22 1.22c1.71 1.71 4.578 1.683 6.408-.147l2.221-2.221a.75.75 0 1 1 1.06 1.06l-2.22 2.222c-2.377 2.376-6.195 2.481-8.53.147l-1.22-1.22c-2.334-2.334-2.228-6.153.148-8.53l2.221-2.22a.75.75 0 0 1 1.06 0z'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-video-camera' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' clip-rule='evenodd' d='M0 6.75a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v1.078L22.873 5A.75.75 0 0 1 24 5.648v12.704a.75.75 0 0 1-1.123.65L18 16.207v1.043a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V6.75Zm18 7.728 4.5 2.58V6.95L18 9.562v4.916ZM16.5 6.75a1.5 1.5 0 0 0-1.5-1.5H3a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h12a1.5 1.5 0 0 0 1.5-1.5V6.75Z'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-video-camera-full' xmlns='http://www.w3.org/2000/svg'><path d='M2 3.333a2 2 0 0 0-2 2v9.334a2 2 0 0 0 2 2h10.938a2 2 0 0 0 2-2v-2.013L20 15.646V4.354l-5.063 3.03v-2.05a2 2 0 0 0-2-2H2Z' fill='currentColor'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-vk' xmlns='http://www.w3.org/2000/svg'><path fill='currentColor' fill-rule='evenodd' d='M6.341 3.27a10.5 10.5 0 0 1 5.834-1.77.75.75 0 0 0 0-1.5 12 12 0 1 0 12 12 .75.75 0 0 0-1.5 0A10.5 10.5 0 1 1 6.34 3.27Zm14.145 1.48a.75.75 0 1 0-1.06-1.062L9.925 13.19V7.95a.75.75 0 1 0-1.5 0V15c0 .414.336.75.75.75h7.05a.75.75 0 0 0 0-1.5h-5.24l9.501-9.5Z'/></symbol></svg>"+t+"<slot></slot>"}static get template(){return this._template}},an=1.5,sn=100/3;function cn(t,e){for(const[r,o]of Object.entries(e))t.setAttributeNS(null,r,o.toString())}function ln(t,e={}){const r=document.createElementNS("http://www.w3.org/2000/svg",t);return cn(r,e),r}function un(t,e,r){const{x:o,y:i,width:n,height:a}=t,s=e.includes("w")?0:1,c=e.includes("n")?0:1,l=0===s?-1:1,u=0===c?-1:1,d=[o+s*n+an*l,i+c*a+an*u-24*r*u],h=[o+s*n+an*l,i+c*a+an*u],p=[o+s*n-24*r*l+an*l,i+c*a+an*u];return{d:`M ${d[0]} ${d[1]} L ${h[0]} ${h[1]} L ${p[0]} ${p[1]}`,center:[h[0],h[1]]}}function dn(t,e,r){const{x:o,y:i,width:n,height:a}=t,s="n"===e||"s"===e,c=s?.5:"w"===e?0:1,l="w"===e||"e"===e?.5:"n"===e?0:1,u="w"===e?-1:"e"===e?1:0,d="n"===e?-1:"s"===e?1:0;let h,p;s?(h=[o+c*n-34*r/2,i+l*a+an*d],p=[o+c*n+34*r/2,i+l*a+an*d]):(h=[o+c*n+an*u,i+l*a-34*r/2],p=[o+c*n+an*u,i+l*a+34*r/2]);return{d:`M ${h[0]} ${h[1]} L ${p[0]} ${p[1]}`,center:[(h[0]+p[0])/2,(h[1]+p[1])/2]}}function hn(t,e){let{x:r}=t,{y:o}=t;return t.x<e.x?r=e.x:t.x+t.width>e.x+e.width&&(r=e.x+e.width-t.width),t.y<e.y?o=e.y:t.y+t.height>e.y+e.height&&(o=e.y+e.height-t.height),{...t,x:r,y:o}}function pn({direction:t,...e}){switch(t){case"n":return function({rect:t,delta:e,aspectRatio:r,imageBox:o}){const[,i]=e;let{y:n,width:a,height:s}=t;n+=i,s-=i,r&&(a=s*r);let c=t.x+t.width/2-a/2;return n<=o.y&&(n=o.y,s=t.y+t.height-n,r&&(a=s*r,c=t.x+t.width/2-a/2)),c<=o.x&&(c=o.x,n=t.y+t.height-s),c+a>=o.x+o.width&&(c=Math.max(o.x,o.x+o.width-a),a=o.x+o.width-c,r&&(s=a/r),n=t.y+t.height-s),s<1&&(s=1,r&&(a=s*r,c=t.x+t.width/2-a/2),n=t.y+t.height-s),a<1&&(a=1,r&&(s=a/r,c=t.x+t.width/2-a/2),n=t.y+t.height-s),{x:c,y:n,width:a,height:s}}(e);case"w":return function({rect:t,delta:e,aspectRatio:r,imageBox:o}){const[i]=e;let{x:n,width:a,height:s}=t;n+=i,a-=i,r&&(s=a/r);let c=t.y+t.height/2-s/2;return n<=o.x&&(n=o.x,a=t.x+t.width-n,r&&(s=a/r,c=t.y+t.height/2-s/2)),c<=o.y&&(c=o.y,n=t.x+t.width-a),c+s>=o.y+o.height&&(c=Math.max(o.y,o.y+o.height-s),s=o.y+o.height-c,r&&(a=s*r),n=t.x+t.width-a),s<1&&(s=1,r&&(a=s*r),c=t.y+t.height/2-s/2,n=t.x+t.width-a),a<1&&(a=1,r&&(s=a/r),c=t.y+t.height/2-s/2,n=t.x+t.width-a),{x:n,y:c,width:a,height:s}}(e);case"s":return function({rect:t,delta:e,aspectRatio:r,imageBox:o}){const[,i]=e;let{y:n,width:a,height:s}=t;s+=i,r&&(a=s*r);let c=t.x+t.width/2-a/2;return n+s>=o.y+o.height&&(s=o.y+o.height-n,r&&(a=s*r),c=t.x+t.width/2-a/2),c<=o.x&&(c=o.x,n=t.y),c+a>=o.x+o.width&&(c=Math.max(o.x,o.x+o.width-a),a=o.x+o.width-c,r&&(s=a/r),n=t.y),s<1&&(s=1,r&&(a=s*r),c=t.x+t.width/2-a/2),a<1&&(a=1,r&&(s=a/r),c=t.x+t.width/2-a/2),{x:c,y:n,width:a,height:s}}(e);case"e":return function({rect:t,delta:e,aspectRatio:r,imageBox:o}){const[i]=e;let{x:n,width:a,height:s}=t;a+=i,r&&(s=a/r);let c=t.y+t.height/2-s/2;return n+a>=o.x+o.width&&(a=o.x+o.width-n,r&&(s=a/r),c=t.y+t.height/2-s/2),c<=o.y&&(c=o.y,n=t.x),c+s>=o.y+o.height&&(c=Math.max(o.y,o.y+o.height-s),s=o.y+o.height-c,r&&(a=s*r),n=t.x),s<1&&(s=1,r&&(a=s*r),c=t.y+t.height/2-s/2),a<1&&(a=1,r&&(s=a/r),c=t.y+t.height/2-s/2),{x:n,y:c,width:a,height:s}}(e);case"nw":return function({rect:t,delta:e,aspectRatio:r,imageBox:o}){let[i,n]=e,{x:a,y:s,width:c,height:l}=t;return a+i<o.x&&(i=o.x-a),s+n<o.y&&(n=o.y-s),a+=i,c-=i,s+=n,l-=n,r&&Math.abs(c/l)>r?(n=c/r-l,l+=n,s-=n,s<=o.y&&(l-=o.y-s,c=l*r,a=t.x+t.width-c,s=o.y)):r&&(i=l*r-c,c+=i,a-=i,a<=o.x&&(c-=o.x-a,l=c/r,a=o.x,s=t.y+t.height-l)),l<1&&(l=1,r&&(c=l*r),a=t.x+t.width-c,s=t.y+t.height-l),c<1&&(c=1,r&&(l=c/r),a=t.x+t.width-c,s=t.y+t.height-l),{x:a,y:s,width:c,height:l}}(e);case"ne":return function({rect:t,delta:e,aspectRatio:r,imageBox:o}){let[i,n]=e,{x:a,y:s,width:c,height:l}=t;return a+c+i>o.x+o.width&&(i=o.x+o.width-a-c),s+n<o.y&&(n=o.y-s),c+=i,s+=n,l-=n,r&&Math.abs(c/l)>r?(n=c/r-l,l+=n,s-=n,s<=o.y&&(l-=o.y-s,c=l*r,a=t.x,s=o.y)):r&&(i=l*r-c,c+=i,a+c>=o.x+o.width&&(c=o.x+o.width-a,l=c/r,a=o.x+o.width-c,s=t.y+t.height-l)),l<1&&(l=1,r&&(c=l*r),s=t.y+t.height-l),c<1&&(c=1,r&&(l=c/r),s=t.y+t.height-l),{x:a,y:s,width:c,height:l}}(e);case"sw":return function({rect:t,delta:e,aspectRatio:r,imageBox:o}){let[i,n]=e,{x:a,y:s,width:c,height:l}=t;return a+i<o.x&&(i=o.x-a),s+l+n>o.y+o.height&&(n=o.y+o.height-s-l),a+=i,c-=i,l+=n,r&&Math.abs(c/l)>r?(n=c/r-l,l+=n,s+l>=o.y+o.height&&(l=o.y+o.height-s,c=l*r,a=t.x+t.width-c,s=o.y+o.height-l)):r&&(i=l*r-c,c+=i,a-=i,a<=o.x&&(c-=o.x-a,l=c/r,a=o.x,s=t.y)),l<1&&(l=1,r&&(c=l*r),a=t.x+t.width-c),c<1&&(c=1,r&&(l=c/r),a=t.x+t.width-c),{x:a,y:s,width:c,height:l}}(e);case"se":return function({rect:t,delta:e,aspectRatio:r,imageBox:o}){let[i,n]=e,{x:a,y:s,width:c,height:l}=t;return a+c+i>o.x+o.width&&(i=o.x+o.width-a-c),s+l+n>o.y+o.height&&(n=o.y+o.height-s-l),c+=i,l+=n,r&&Math.abs(c/l)>r?(n=c/r-l,l+=n,s+l>=o.y+o.height&&(l=o.y+o.height-s,c=l*r,a=t.x,s=o.y+o.height-l)):r&&(i=l*r-c,c+=i,a+c>=o.x+o.width&&(c=o.x+o.width-a,l=c/r,a=o.x+o.width-c,s=t.y)),l<1&&(l=1,r&&(c=l*r)),c<1&&(c=1,r&&(l=c/r)),{x:a,y:s,width:c,height:l}}(e);default:return e.rect}}function gn({width:t,height:e},r){const o=r/90%2!=0;return{width:o?e:t,height:o?t:e}}function mn(t,e,r){let o,i;t/e>r?(o=Math.round(e*r),i=e):(o=t,i=Math.round(t/r));const n=Math.round((t-o)/2),a=Math.round((e-i)/2);return n+o>t&&(o=t-n),a+i>e&&(i=e-a),{x:n,y:a,width:o,height:i}}function fn(t){return{x:Math.round(t.x),y:Math.round(t.y),width:Math.round(t.width),height:Math.round(t.height)}}function bn(t,e,r){return Math.min(Math.max(t,e),r)}var vn=["free"],yn=t=>{const e=ii(t);if(!e||0===e.length)return[];const r=[];for(const t of e){const e=t.trim();if(!e)continue;const o=e.indexOf(":");if(-1===o&&!vn.includes(e)){console.warn(`Invalid crop preset: ${e}`);continue}const i=Number(e.slice(0,o)),n=Number(e.slice(o+1));!(!Number.isFinite(i)||!Number.isFinite(n)||i<=0||n<=0)||vn.includes(e)?r.push({id:xe.generate(),type:"aspect-ratio",width:vn.includes(e)?0:i,height:vn.includes(e)?0:n,hasFreeform:vn.includes(e)}):console.warn(`Invalid crop preset: ${e}`)}return r},wn=Object.freeze({FACEBOOK:"facebook",DROPBOX:"dropbox",GDRIVE:"gdrive",GPHOTOS:"gphotos",FLICKR:"flickr",VK:"vk",EVERNOTE:"evernote",BOX:"box",ONEDRIVE:"onedrive",HUDDLE:"huddle"}),_n=Object.freeze({MOBILE_VIDEO_CAMERA:"mobile-video-camera",MOBILE_PHOTO_CAMERA:"mobile-photo-camera"}),kn=Object.freeze({LOCAL:"local",DROP_AREA:"drop-area",CAMERA:"camera",EXTERNAL:"external",API:"js-api",URL:"url",DRAW:"draw",..._n,...wn});function xn(t){return Ze({...t,libraryName:Ki,libraryVersion:Gi})}var Cn=t=>"number"!=typeof t?0:Math.floor(t/1e3),En=class{_block;_secureToken=null;constructor(t){this._block=t}_debugPrint(...t){this._block.debugPrint("[secure-uploads]",...t)}async getSecureToken(){const{secureSignature:t,secureExpire:e,secureUploadsSignatureResolver:r}=this._block.cfg;if((t||e)&&r&&console.warn("Both secureSignature/secureExpire and secureUploadsSignatureResolver are set. secureUploadsSignatureResolver will be used."),r){if(!this._secureToken||((t,{threshold:e})=>{const{secureExpire:r}=t,o=Cn(Date.now()),i=Number(r);return o+Cn(e)>=i})(this._secureToken,{threshold:this._block.cfg.secureUploadsExpireThreshold})){this._secureToken?this._debugPrint("Secure signature is expired. Resolving a new one..."):this._debugPrint("Secure signature is not set yet.");try{const t=await r();t?t.secureSignature&&t.secureExpire?(this._debugPrint("Secure signature resolved:",t),this._debugPrint("Secure signature will expire in",new Date(1e3*Number(t.secureExpire)).toISOString()),this._secureToken=t):console.error("Secure signature resolver returned an invalid result:",t):(this._debugPrint("Secure signature resolver returned nothing."),this._secureToken=null)}catch(t){console.error("Secure signature resolving failed. Falling back to the previous one.",t),this._block.telemetryManager.sendEventError(t,"secureUploadsSignatureResolver. Secure signature resolving failed. Falling back to the previous one.")}}return this._secureToken}return t&&e?(this._debugPrint("Secure signature and expire are set. Using them...",{secureSignature:t,secureExpire:e}),{secureSignature:t,secureExpire:e}):null}},Tn=(t,e)=>{if(t.failedCount>0)return{type:"SOME_FILES_HAS_ERRORS",message:e.l10n("some-files-were-not-uploaded")}},An=(t,e)=>{const r=t.totalCount,o=e.cfg.multiple?e.cfg.multipleMin:0,i=e.cfg.multiple?e.cfg.multipleMax:1;if(o&&r<o){return{type:"TOO_FEW_FILES",message:e.l10n("files-count-limit-error-too-few",{min:o,max:i,total:r}),payload:{total:r,min:o,max:i}}}if(i&&r>i){return{type:"TOO_MANY_FILES",message:e.l10n("files-count-limit-error-too-many",{min:o,max:i,total:r}),payload:{total:r,min:o,max:i}}}},In={safariDesktop:(()=>{const t=navigator.userAgent;return/Macintosh|Windows/.test(t)&&/Version\/[\d.]+.*Safari/.test(t)&&!/Chrome|Chromium|Edg|OPR/.test(t)})()},Sn={htmlMediaCapture:"capture"in document.createElement("input")},Mn="image/*",$n="video/*",Ln=In.safariDesktop?[Mn]:[Mn,...["image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/avif","image/avif-sequence",".heif",".heifs",".heic",".heics",".avif",".avifs"]],On=t=>t?t.filter(t=>"string"==typeof t).flatMap(t=>ii(t)):[],Un=(t,e)=>e.some(e=>{if(e.endsWith("*")){const r=e.replace("*","");return t.startsWith(r)}return t===e}),Rn=t=>{const e=t?.type;return!!e&&Un(e,Ln)},Pn=(t,e)=>{const r=e.cfg.imgOnly,o=e.cfg.accept,i=On([...r?Ln:[],o]);if(!i.length)return;const n=t.mimeType,a=t.name;if(!n||!a)return;const s=Un(n,i),c=((t,e)=>e.some(e=>!!e.startsWith(".")&&t.toLowerCase().endsWith(e.toLowerCase())))(a,i);return s||c?void 0:{type:"FORBIDDEN_FILE_TYPE",message:e.l10n("file-type-not-allowed"),payload:{entry:t}}},Nn=(t,e)=>{const r=e.cfg.imgOnly,o=t.isImage;if(r&&!o&&(t.fileInfo||!t.externalUrl)&&(t.fileInfo||t.mimeType))return{type:"NOT_AN_IMAGE",message:e.l10n("images-only-accepted"),payload:{entry:t}}},zn=1e3,Dn=Object.freeze({AUTO:"auto",BYTE:"byte",KB:"kb",MB:"mb",GB:"gb",TB:"tb",PB:"pb"}),Fn=t=>Math.ceil(100*t)/100,Vn=(t,e=Dn.AUTO)=>{const r=e===Dn.AUTO;if(e===Dn.BYTE||r&&t<1e3){return`${t} ${"one"===xi("en-US",t)?"byte":"bytes"}`}return e===Dn.KB||r&&t<1e6?`${Fn(t/1e3)} KB`:e===Dn.MB||r&&t<zn**3?`${Fn(t/1e6)} MB`:e===Dn.GB||r&&t<zn**4?`${Fn(t/zn**3)} GB`:e===Dn.TB||r&&t<zn**5?`${Fn(t/zn**4)} TB`:`${Fn(t/zn**5)} PB`},Bn=(t,e)=>{const r=e.cfg.maxLocalFileSizeBytes,o=t.size;if(r&&o&&o>r)return{type:"FILE_SIZE_EXCEEDED",message:e.l10n("files-max-size-limit-error",{maxFileSize:Vn(r)}),payload:{entry:t}}},jn=(t,e)=>{const{internalId:r}=t,o=e._uploadCollection.read(r),i=o?.getValue("uploadError");if(!i)return;if(i instanceof gr)return{type:"UPLOAD_ERROR",message:i.message,payload:{entry:t,error:i}};if(i instanceof Qe)return{type:"NETWORK_ERROR",message:i.message,payload:{entry:t,error:i}};const n=i instanceof Error?i:new Error("Unknown error",{cause:i});return{type:"UNKNOWN_ERROR",message:n.message,payload:{entry:t,error:n}}},Hn="File validator execution has failed",qn="File validator execution has timed out",Kn="Collection validator execution has failed",Gn="Missing message. We recommend adding message: value.",Wn=t=>"function"==typeof t?{runOn:"change",validator:t}:t,Zn=class{_blockInstance;_uploadCollection;_commonFileValidators=[Nn,Pn,Bn,jn];_commonCollectionValidators=[An,Tn];_queue=new Zr(20);_runQueueDebounced=jo(()=>{this._queue.run()},500);_entryValidationState=new Map;constructor(t){this._blockInstance=t,this._uploadCollection=this._blockInstance.uploadCollection;const e=()=>{this.runFileValidators("change"),this.runCollectionValidators()};this._blockInstance.subConfigValue("maxLocalFileSizeBytes",e),this._blockInstance.subConfigValue("multipleMin",e),this._blockInstance.subConfigValue("multipleMax",e),this._blockInstance.subConfigValue("multiple",e),this._blockInstance.subConfigValue("imgOnly",e),this._blockInstance.subConfigValue("accept",e),this._blockInstance.subConfigValue("validationConcurrency",t=>{this._queue.concurrency=t})}runFileValidators(t,e){const r=e??this._uploadCollection.items();for(const e of r){const r=this._uploadCollection.read(e);r&&this._runFileValidatorsForEntry(r,t)}}runCollectionValidators(){const t=this._blockInstance.api.getOutputCollectionState(),e=[];for(const r of[...this._commonCollectionValidators,...this._blockInstance.cfg.collectionValidators])try{const o=r(t,this._blockInstance.api);if(!o)continue;o&&(e.push(this._addCustomTypeToValidationError(o)),o.message||console.warn(Gn))}catch(t){console.warn(Kn,t)}this._blockInstance.$["*collectionErrors"]=e,e.length>0&&this._blockInstance.emit(Vo.COMMON_UPLOAD_FAILED,()=>this._blockInstance.api.getOutputCollectionState(),{debounce:!0})}cleanupValidationForEntry(t){const e=this._entryValidationState.get(t.uid);e&&(e.abortController?.abort(),this._entryValidationState.delete(t.uid))}async _runFileValidatorsForEntry(t,e){const r=this._getValidatorDescriptorsForEntry(t,e);if(0===r.length)return;t.setMultipleValues({isQueuedForValidation:!0,isValidationPending:!0});const o=this._blockInstance.api.getOutputItem(t.uid),i=this._getEntryValidationState(t);i.promise&&await i.promise;const{promise:n,resolve:a}=(()=>{let t=()=>{},e=()=>{};return{promise:new Promise((r,o)=>{t=r,e=o}),resolve:t,reject:e}})();i.promise=n;const s=new AbortController;i.abortController=s;const c=this._blockInstance.cfg.validationTimeout,l=this._getValidatorDescriptors(),u=new Set(r.map(t=>t.validator)),d=[];for(const t of l)if(!u.has(t.validator)){const e=i.lastErrorThrownByValidator.get(t.validator);e&&d.push(e)}const h=r.map(t=>async()=>{if(!this._blockInstance.isConnected)return;const e=setTimeout(()=>{i.skippedValidators.add(t.validator),s.abort(),console.warn(qn)},c);try{const e=await t.validator(o,this._blockInstance.api,{signal:s.signal});if(!e||s.signal.aborted)return void i.lastErrorThrownByValidator.set(t.validator,void 0);const r=this._addCustomTypeToValidationError(e);i.lastErrorThrownByValidator.set(t.validator,r),d.push(r),e.message||console.warn(Gn)}catch(e){s.signal.aborted||(i.skippedValidators.add(t.validator),console.warn(Hn,e),this._blockInstance.telemetryManager.sendEventError(e,`file validator. ${Hn}`))}finally{clearTimeout(e),"change"!==t.runOn&&i.skippedValidators.add(t.validator)}});if(this._runQueueDebounced(),await this._queue.add(async()=>{t.setValue("isQueuedForValidation",!1),await Promise.all(h.map(t=>t())).catch(()=>{})},{autoRun:!1}),s.signal.aborted)return t.setMultipleValues({isQueuedForValidation:!1,isValidationPending:!1}),void a();t.setMultipleValues({isValidationPending:!1,isQueuedForValidation:!1,errors:d}),a()}_addCustomTypeToValidationError(t){return{...t,type:t.type??"CUSTOM_ERROR"}}_getEntryValidationState(t){const e=this._entryValidationState.get(t.uid);if(e)return e;const r={abortController:void 0,skippedValidators:new WeakSet,promise:void 0,lastErrorThrownByValidator:new WeakMap};return this._entryValidationState.set(t.uid,r),r}_getValidatorDescriptors(){return[...this._commonFileValidators,...this._blockInstance.cfg.fileValidators].map(Wn)}_getValidatorDescriptorsForEntry(t,e){const r=this._getEntryValidationState(t);return this._getValidatorDescriptors().filter(t=>!r.skippedValidators.has(t.validator)).filter(t=>t.runOn===e)}},Xn="[Typed State] Wrong property name: ",Yn=class{__typedSchema;__ctxId;__schema;__data;constructor(t,e){this.__typedSchema=t,this.__ctxId=e||xe.generate(),this.__schema=Object.keys(t).reduce((e,r)=>(t[r]&&(e[r]=t[r].value),e),{}),this.__data=we.registerCtx(this.__schema,this.__ctxId)}get uid(){return this.__ctxId}setValue(t,e){if(!Object.hasOwn(this.__typedSchema,t)||!this.__typedSchema[t])return void console.warn(Xn+t);const r=this.__typedSchema[t],o=e?.constructor===r.type,i=e instanceof r.type,n=r.nullable&&null===e;o||i||n?this.__data.pub(t,e):console.warn("[Typed State] Wrong property type: "+t)}setMultipleValues(t){for(const[e,r]of Object.entries(t))this.setValue(e,r)}getValue(t){return Object.hasOwn(this.__typedSchema,t)||console.warn(Xn+t),this.__data.read(t)}subscribe(t,e){return this.__data.sub(t,e)}remove(){we.deleteCtx(this.__ctxId)}},Jn=class{__typedSchema;__ctxId;__data;__watchList;__subsMap=Object.create(null);__propertyObservers=new Set;__collectionObservers=new Set;__items=new Set;__removed=new Set;__added=new Set;__observeTimeout;__notifyTimeout;__notifyObservers;constructor(t){this.__typedSchema=t.typedSchema,this.__ctxId=t.ctxName||xe.generate(),this.__data=we.registerCtx({},this.__ctxId),this.__watchList=t.watchList||[];let e=Object.create(null);this.__notifyObservers=(t,r)=>{this.__observeTimeout&&window.clearTimeout(this.__observeTimeout),e[t]||(e[t]=new Set),e[t].add(r),this.__observeTimeout=window.setTimeout(()=>{0!==Object.keys(e).length&&(this.__propertyObservers.forEach(t=>{t({...e})}),e=Object.create(null))})},t.handler&&this.observeCollection(t.handler)}notify(){this.__notifyTimeout&&window.clearTimeout(this.__notifyTimeout),this.__notifyTimeout=window.setTimeout(()=>{const t=new Set(this.__added),e=new Set(this.__removed);this.__added.clear(),this.__removed.clear();for(const r of this.__collectionObservers)r?.([...this.__items],t,e)})}observeCollection(t){return this.__collectionObservers.add(t),this.__items.size>0&&this.notify(),()=>{this.unobserveCollection(t)}}unobserveCollection(t){this.__collectionObservers.delete(t)}add(t){const e=new Yn(this.__typedSchema);for(const[r,o]of Object.entries(t))void 0!==o&&e.setValue(r,o);return this.__items.add(e.uid),this.notify(),this.__data.add(e.uid,e),this.__added.add(e),this.__watchList.forEach(t=>{this.__subsMap[e.uid]||(this.__subsMap[e.uid]=[]),this.__subsMap[e.uid]?.push(e.subscribe(t,()=>{this.__notifyObservers(t,e.uid)}))}),e.uid}read(t){return this.__data.read(t)}readProp(t,e){const r=this.read(t);return r?r.getValue(e):(console.warn(`Item with id ${t} not found`),null)}publishProp(t,e,r){const o=this.read(t);o?o.setValue(e,r):console.warn(`Item with id ${t} not found`)}remove(t){const e=this.read(t);e&&this.__removed.add(e),this.__items.delete(t),this.notify(),this.__data.pub(t,null),delete this.__subsMap[t]}clearAll(){this.__items.forEach(t=>{this.remove(t)})}observeProperties(t){return this.__propertyObservers.add(t),()=>{this.unobserveProperties(t)}}unobserveProperties(t){this.__propertyObservers.delete(t)}findItems(t){const e=[];return this.__items.forEach(r=>{const o=this.read(r);o&&t(o)&&e.push(r)}),e}items(){return[...this.__items]}get size(){return this.__items.size}destroy(){we.deleteCtx(this.__ctxId),this.__propertyObservers=new Set,this.__collectionObservers=new Set;for(const t in this.__subsMap)this.__subsMap[t]?.forEach(t=>{t.remove()}),delete this.__subsMap[t]}},Qn=Object.freeze({PHOTO:"photo",VIDEO:"video"}),ta=Object.freeze({IDLE:"idle",SHOT:"shot",PLAY:"play",PAUSE:"pause",RESUME:"resume",STOP:"stop",RETAKE:"retake",ACCEPT:"accept"}),ea=t=>({isVideoRecordingEnabled:Ho(t.cameraModes).includes(Qn.VIDEO),isPhotoEnabled:Ho(t.cameraModes).includes(Qn.PHOTO)}),ra=new RegExp(`^/?(${/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/i.source})(?:/(-/(?:[^/]+/)+)?([^/]*))?$`,"i");function oa(t){const e=new Map;return(...r)=>{const o=JSON.stringify(r);if(e.has(o))return e.get(o);const i=t(...r);return e.set(o,i),i}}var ia=new Set;function na(t){ia.has(t)||(ia.add(t),console.warn(t))}function aa(t){const e={},r={progress:()=>t.$["*commonProgress"],errors:()=>t.$["*collectionErrors"],group:()=>t.$["*groupInfo"],totalCount:()=>t.uploadCollection.size,failedCount:()=>e.failedEntries.length,successCount:()=>e.successEntries.length,uploadingCount:()=>e.uploadingEntries.length,status:()=>e.isFailed?"failed":e.isUploading?"uploading":e.isSuccess?"success":"idle",isSuccess:()=>e.allEntries.length>0&&0===e.errors.length&&e.successEntries.length===e.allEntries.length,isUploading:()=>e.allEntries.some(t=>"uploading"===t.status),isFailed:()=>e.errors.length>0||e.failedEntries.length>0,allEntries:()=>t.getOutputData(),successEntries:()=>e.allEntries.filter(t=>"success"===t.status),failedEntries:()=>e.allEntries.filter(t=>"failed"===t.status),uploadingEntries:()=>e.allEntries.filter(t=>"uploading"===t.status),idleEntries:()=>e.allEntries.filter(t=>"idle"===t.status)},o=function(t){let e=!1;return setTimeout(()=>{e=!0},0),r=>(...o)=>(e&&na(t),r(...o))}("You're trying to access the OutputCollectionState asynchronously. In this case, the data you retrieve will be newer than it was when the OutputCollectionState was created or when the event was dispatched. If you want to retain the state at a specific moment in time, you should use the spread operator like this: `{...outputCollectionState}` or `{...e.detail}`");for(const[t,i]of Object.entries(r)){const r=t,n=oa(o(i));Object.defineProperty(e,r,{get:n,enumerable:!0})}return e}var sa=class{_ctx;constructor(t){this._ctx=t}get _uploadCollection(){return this._ctx.uploadCollection}get cfg(){return this._ctx.cfg}get l10n(){return this._ctx.l10n.bind(this._ctx)}addFileFromUrl=(t,{silent:e,fileName:r,source:o}={})=>{const i=this._uploadCollection.add({externalUrl:t,fileName:r??null,silent:e??!1,source:o??kn.API});return this.getOutputItem(i)};addFileFromUuid=(t,{silent:e,fileName:r,source:o}={})=>{const i=this._uploadCollection.add({uuid:t,fileName:r??null,silent:e??!1,source:o??kn.API});return this.getOutputItem(i)};addFileFromCdnUrl=(t,{silent:e,fileName:r,source:o}={})=>{const i=(({url:t,cdnBase:e})=>{const r=new URL(e),o=new URL(wi),i=new URL(t);if(r.host!==i.host&&o.host!==i.host)return null;const n=ra.exec(i.pathname);if(!n)return null;const[,a,s,c]=n;return a?{uuid:a,cdnUrlModifiers:s||"",filename:c||null}:null})({url:t,cdnBase:this.cfg.cdnCname});if(!i)throw new Error("Invalid CDN URL");const n=this._uploadCollection.add({uuid:i.uuid,cdnUrl:t,cdnUrlModifiers:i.cdnUrlModifiers,fileName:r??i.filename??null,silent:e??!1,source:o??kn.API});return this.getOutputItem(n)};addFileFromObject=(t,{silent:e,fileName:r,source:o,fullPath:i}={})=>{const n=this._uploadCollection.add({file:t,isImage:Rn(t),mimeType:t.type,fileName:r??t.name,fileSize:t.size,silent:e??!1,source:o??kn.API,fullPath:i??null});return this.getOutputItem(n)};removeFileByInternalId=t=>{if(!this._uploadCollection.read(t))throw new Error(`File with internalId ${t} not found`);this._uploadCollection.remove(t)};removeAllFiles(){this._uploadCollection.clearAll()}uploadAll=()=>{const t=this._uploadCollection.items().filter(t=>{const e=this._uploadCollection.read(t);return!!e&&!(e.getValue("isRemoved")||e.getValue("isUploading")||e.getValue("fileInfo")||0!==e.getValue("errors").length||e.getValue("isValidationPending")||e.getValue("isQueuedForValidation"))});0!==t.length&&(this._ctx.$["*uploadTrigger"]=new Set(t),this._ctx.emit(Vo.COMMON_UPLOAD_START,this.getOutputCollectionState()))};openSystemDialog=(t={})=>{const e=qo(On([this.cfg.accept??"",...this.cfg.imgOnly?Ln:[]])),r="uploadcare-file-input",o=document.createElement("input");if(o.setAttribute(r,""),De(o,{opacity:0,height:0,width:0,visibility:"hidden",position:"absolute",top:0,left:0}),o.type="file",o.multiple=this.cfg.multiple,t.captureCamera){o.capture=this.cfg.cameraCapture;const{isPhotoEnabled:e,isVideoRecordingEnabled:r}=ea(this.cfg);t.modeCamera===Qn.PHOTO&&e?o.accept=Mn:t.modeCamera===Qn.VIDEO&&r?o.accept=$n:o.accept=[Mn,r&&$n].filter(Boolean).join(",")}else o.accept=e;o.addEventListener("change",()=>{o.files&&([...o.files].forEach(e=>{this.addFileFromObject(e,{source:t.captureCamera?kn.CAMERA:kn.LOCAL})}),this._ctx.modalManager?.open(tn.activities.UPLOAD_LIST),this._ctx.$["*currentActivity"]=tn.activities.UPLOAD_LIST,o.remove())},{once:!0}),document.querySelectorAll(`[${r}]`).forEach(t=>{t.remove()}),document.body.appendChild(o),o.dispatchEvent(new MouseEvent("click"))};getOutputItem(t){const e=we.getCtx(t).store,r=e.fileInfo,o=e.isRemoved?"removed":e.errors.length>0?"failed":e.fileInfo?"success":e.isUploading?"uploading":"idle";return{uuid:r?.uuid??e.uuid??null,internalId:t,name:r?.originalFilename??e.fileName,size:r?.size??e.fileSize,isImage:r?.isImage??e.isImage,mimeType:r?.mimeType??e.mimeType,file:e.file,externalUrl:e.externalUrl,cdnUrlModifiers:e.cdnUrlModifiers,cdnUrl:e.cdnUrl??r?.cdnUrl??null,fullPath:e.fullPath,uploadProgress:e.uploadProgress,fileInfo:r??null,metadata:e.metadata??r?.metadata??null,isSuccess:"success"===o,isUploading:"uploading"===o,isFailed:"failed"===o,isRemoved:"removed"===o,isValidationPending:e.isValidationPending,errors:e.errors,status:o,source:e?.source}}getOutputCollectionState(){return aa(this._ctx)}initFlow=(t=!1)=>{if(this._uploadCollection.size>0&&!t)this._ctx.modalManager?.open(tn.activities.UPLOAD_LIST),this._ctx.set$({"*currentActivity":tn.activities.UPLOAD_LIST});else if(1===this._sourceList?.length){const t=this._sourceList[0];if("local"===t)return this._ctx.$["*currentActivity"]=tn.activities.UPLOAD_LIST,void this.openSystemDialog();if("camera"===t&&Sn.htmlMediaCapture){const{isPhotoEnabled:t,isVideoRecordingEnabled:e}=ea(this.cfg);if(t&&e)return void this._ctx.set$({"*currentActivity":tn.activities.START_FROM});if(t||e)return void this.openSystemDialog({captureCamera:!0,modeCamera:t?Qn.PHOTO:Qn.VIDEO});this.openSystemDialog({captureCamera:!0,modeCamera:Qn.PHOTO})}const e=[...this._ctx.$["*blocksRegistry"]].find(e=>"type"in e&&e.type===t);e?.activate(),this._ctx.$["*currentActivity"]&&this._ctx.modalManager?.open(this._ctx.$["*currentActivity"])}else this._ctx.modalManager?.open(tn.activities.START_FROM),this._ctx.set$({"*currentActivity":tn.activities.START_FROM})};doneFlow=()=>{this._ctx.set$({"*currentActivity":this._ctx.doneActivity,"*history":this._ctx.doneActivity?[this._ctx.doneActivity]:[]}),this._ctx.$["*currentActivity"]||this._ctx.modalManager?.closeAll()};setCurrentActivity=(t,...e)=>{this._ctx.hasBlockInCtx(e=>e.activityType===t)?this._ctx.set$({"*currentActivityParams":e??{},"*currentActivity":t}):console.warn(`Activity type "${t}" not found in the context`)};getCurrentActivity=()=>this._ctx.$["*currentActivity"];setModalState=t=>{!t||this._ctx.$["*currentActivity"]?t?this._ctx.modalManager?.open(this._ctx.$["*currentActivity"]):(this._ctx.modalManager?.close(this._ctx.$["*currentActivity"]),this._ctx.$["*currentActivity"]=null):console.warn('Can\'t open modal without current activity. Please use "setCurrentActivity" method first.')};get _sourceList(){let t=[];return this.cfg.sourceList&&(t=ii(this.cfg.sourceList)),t}},ca=Object.freeze({file:Object.freeze({type:File,value:null,nullable:!0}),externalUrl:Object.freeze({type:String,value:null,nullable:!0}),fileName:Object.freeze({type:String,value:null,nullable:!0}),fileSize:Object.freeze({type:Number,value:null,nullable:!0}),lastModified:Object.freeze({type:Number,value:Date.now()}),uploadProgress:Object.freeze({type:Number,value:0}),uuid:Object.freeze({type:String,value:null,nullable:!0}),isImage:Object.freeze({type:Boolean,value:!1}),mimeType:Object.freeze({type:String,value:null,nullable:!0}),ctxName:Object.freeze({type:String,value:null,nullable:!0}),cdnUrl:Object.freeze({type:String,value:null,nullable:!0}),cdnUrlModifiers:Object.freeze({type:String,value:null,nullable:!0}),fileInfo:Object.freeze({type:Lr,value:null,nullable:!0}),isUploading:Object.freeze({type:Boolean,value:!1}),abortController:Object.freeze({type:AbortController,value:null,nullable:!0}),thumbUrl:Object.freeze({type:String,value:null,nullable:!0}),silent:Object.freeze({type:Boolean,value:!1}),source:Object.freeze({type:String,value:null,nullable:!0}),fullPath:Object.freeze({type:String,value:null,nullable:!0}),metadata:Object.freeze({type:Object,value:null,nullable:!0}),errors:Object.freeze({type:Array,value:[]}),uploadError:Object.freeze({type:Error,value:null,nullable:!0}),isRemoved:Object.freeze({type:Boolean,value:!1}),isQueuedForUploading:Object.freeze({type:Boolean,value:!1}),isValidationPending:Object.freeze({type:Boolean,value:!1}),isQueuedForValidation:Object.freeze({type:Boolean,value:!1})}),la=class t extends tn{static extSrcList;static sourceTypes;couldBeCtxOwner=!1;isCtxOwner=!1;_unobserveCollection;_unobserveCollectionProperties;init$=Li(this);get hasCtxOwner(){return this.hasBlockInCtx(e=>e instanceof t&&(e.isCtxOwner&&e.isConnected&&e!==this))}initCallback(){if(super.initCallback(),!this.has("*uploadCollection")){const t=new Jn({typedSchema:ca,watchList:["uploadProgress","uploadError","fileInfo","errors","cdnUrl","isUploading","isValidationPending"]});this.add("*uploadCollection",t)}this.has("*publicApi")||this.add("*publicApi",new sa(this)),this.has("*validationManager")||this.add("*validationManager",new Zn(this)),!this.hasCtxOwner&&this.couldBeCtxOwner&&this._initCtxOwner()}get validationManager(){if(!this.has("*validationManager"))throw new Error("Unexpected error: ValidationManager is not initialized");return this.$["*validationManager"]}get api(){if(!this.has("*publicApi"))throw new Error("Unexpected error: UploaderPublicApi is not initialized");return this.$["*publicApi"]}getAPI(){return this.api}get uploadCollection(){if(!this.has("*uploadCollection"))throw new Error("Unexpected error: TypedCollection is not initialized");return this.$["*uploadCollection"]}destroyCtxCallback(){this.uploadCollection.destroy(),this.$["*uploadCollection"]=null,super.destroyCtxCallback()}disconnectedCallback(){super.disconnectedCallback(),this.isCtxOwner&&this._unobserveUploadCollection()}connectedCallback(){super.connectedCallback(),this.isCtxOwner&&this._observeUploadCollection()}destroyCallback(){super.destroyCallback(),this._flushOutputItems.cancel()}_initCtxOwner(){this.isCtxOwner=!0,this._observeUploadCollection(),this.subConfigValue("maxConcurrentRequests",t=>{this.$["*uploadQueue"].concurrency=Number(t)||1}),this.$["*secureUploadsManager"]||(this.$["*secureUploadsManager"]=new En(this))}_observeUploadCollection(){this._unobserveUploadCollection(),this._unobserveCollection=this.uploadCollection.observeCollection(this._handleCollectionUpdate),this._unobserveCollectionProperties=this.uploadCollection.observeProperties(this._handleCollectionPropertiesUpdate)}_unobserveUploadCollection(){this._unobserveCollectionProperties?.(),this._unobserveCollection?.(),this._unobserveCollectionProperties=void 0,this._unobserveCollection=void 0}async _createGroup(t){const e=await this.getUploadClientOptions(),r=t.allEntries.map(t=>t.uuid+(t.cdnUrlModifiers?`/${t.cdnUrlModifiers}`:"")),o=new AbortController,i=await Wr(r,{...e,signal:o.signal});if(this.$["*collectionState"]!==t)return void o.abort();this.$["*groupInfo"]=i;const n=this.api.getOutputCollectionState();this.emit(Vo.GROUP_CREATED,n),this.emit(Vo.CHANGE,()=>this.api.getOutputCollectionState(),{debounce:!0}),this.$["*collectionState"]=n}_flushOutputItems=jo(async()=>{if(this.getOutputData().length!==this.uploadCollection.size)return;const t=this.api.getOutputCollectionState();this.$["*collectionState"]=t,this.emit(Vo.CHANGE,()=>this.api.getOutputCollectionState(),{debounce:!0}),this.cfg.groupOutput&&t.totalCount>0&&"success"===t.status&&this._createGroup(t)},300);_handleCollectionUpdate=(t,e,r)=>{(e.size||r.size)&&(this.$["*groupInfo"]=null),this.validationManager.runFileValidators("add",[...e].map(t=>t.uid));for(const t of e)t.getValue("silent")||this.emit(Vo.FILE_ADDED,this.api.getOutputItem(t.uid));this.validationManager.runCollectionValidators();for(const t of r){this.$["*uploadTrigger"].delete(t.uid),this.validationManager.cleanupValidationForEntry(t),t.getValue("abortController")?.abort(),t.setMultipleValues({isRemoved:!0,abortController:null,isUploading:!1,uploadProgress:0});const e=t?.getValue("thumbUrl");e&&URL.revokeObjectURL(e),this.emit(Vo.FILE_REMOVED,this.api.getOutputItem(t.uid))}this.$["*uploadList"]=t.map(t=>({uid:t})),this._flushCommonUploadProgress(),this._flushOutputItems()};_handleCollectionPropertiesUpdate=t=>{this._flushOutputItems();const e=this.uploadCollection,r=[...new Set(Object.entries(t).filter(([t])=>["uploadError","fileInfo","cdnUrl","cdnUrlModifiers"].includes(t)).flatMap(([,t])=>[...t]))];if(r.length>0&&setTimeout(()=>{const e=r.filter(e=>t.fileInfo?.has(e)&&!!we.getCtx(e).store.fileInfo);e.length>0&&this.validationManager.runFileValidators("upload",e),this.validationManager.runFileValidators("change",r)}),t.uploadProgress){for(const e of t.uploadProgress){const{isUploading:t,silent:r}=we.getCtx(e).store;t&&!r&&this.emit(Vo.FILE_UPLOAD_PROGRESS,this.api.getOutputItem(e))}this._flushCommonUploadProgress()}if(t.isUploading)for(const e of t.isUploading){const{isUploading:t,silent:r}=we.getCtx(e).store;t&&!r&&this.emit(Vo.FILE_UPLOAD_START,this.api.getOutputItem(e))}if(t.fileInfo){for(const e of t.fileInfo){const{fileInfo:t,silent:r}=we.getCtx(e).store;t&&!r&&this.emit(Vo.FILE_UPLOAD_SUCCESS,this.api.getOutputItem(e))}this.cfg.cropPreset&&this.setInitialCrop(),this.cfg.cloudImageEditorAutoOpen&&this.openCloudImageEditor()}if(t.errors){this.validationManager.runCollectionValidators();for(const e of t.errors){const{errors:t}=we.getCtx(e).store;t.length>0&&(this.emit(Vo.FILE_UPLOAD_FAILED,this.api.getOutputItem(e)),this.emit(Vo.COMMON_UPLOAD_FAILED,()=>this.api.getOutputCollectionState(),{debounce:!0}))}const r=e.findItems(t=>!!t.getValue("fileInfo")),o=e.findItems(t=>t.getValue("errors").length>0);e.size>0&&0===o.length&&e.size===r.length&&0===this.$["*collectionErrors"].length&&this.emit(Vo.COMMON_UPLOAD_SUCCESS,this.api.getOutputCollectionState())}if(t.cdnUrl){[...t.cdnUrl].filter(t=>!!this.uploadCollection.read(t)?.getValue("cdnUrl")).forEach(t=>{this.emit(Vo.FILE_URL_CHANGED,this.api.getOutputItem(t))}),this.$["*groupInfo"]=null}};_flushCommonUploadProgress=()=>{let t=0;const e=[...this.$["*uploadTrigger"]].filter(t=>!!this.uploadCollection.read(t));e.forEach(e=>{const r=this.uploadCollection.readProp(e,"uploadProgress");"number"==typeof r&&(t+=r)});const r=e.length?Math.round(t/e.length):0;this.$["*commonProgress"]!==r&&(this.$["*commonProgress"]=r,this.emit(Vo.COMMON_UPLOAD_PROGRESS,this.api.getOutputCollectionState()))};openCloudImageEditor(){const[t]=this.uploadCollection.findItems(t=>!!t.getValue("fileInfo")&&t.getValue("isImage")).map(t=>this.uploadCollection.read(t));t&&1===this.uploadCollection.size&&this.cfg.useCloudImageEditor&&this.hasBlockInCtx(t=>t.activityType===tn.activities.CLOUD_IMG_EDIT)&&(this.$["*currentActivityParams"]={internalId:t.uid},this.$["*currentActivity"]=tn.activities.CLOUD_IMG_EDIT,this.modalManager?.open(tn.activities.CLOUD_IMG_EDIT))}setInitialCrop(){const t=yn(this.cfg.cropPreset);if(t){const[e]=t,r=this.uploadCollection.findItems(t=>!!t.getValue("fileInfo")&&t.getValue("isImage")&&!t.getValue("cdnUrlModifiers")?.includes("/crop/")).map(t=>this.uploadCollection.read(t)).filter(Boolean);for(const t of r){const r=t.getValue("fileInfo");if(!r||!r.imageInfo){console.warn("Failed to get image info for entry",t.uid);continue}const{width:o,height:i}=r.imageInfo,n=mn(o,i,"number"==typeof e?.width&&"number"==typeof e?.height&&e.width>0&&e.height>0?e.width/e.height:1),a=Wo(`crop/${n.width}x${n.height}/${n.x},${n.y}`,"preview"),s=t.getValue("cdnUrl");s?(t.setMultipleValues({cdnUrlModifiers:a,cdnUrl:ri(s,a)}),1===this.uploadCollection.size&&this.cfg.useCloudImageEditor&&this.hasBlockInCtx(t=>t.activityType===tn.activities.CLOUD_IMG_EDIT)&&(this.$["*currentActivityParams"]={internalId:t.uid},this.$["*currentActivity"]=tn.activities.CLOUD_IMG_EDIT,this.modalManager?.open(tn.activities.CLOUD_IMG_EDIT))):console.warn("Failed to get cdnUrl for entry",t.uid)}}}async getMetadataFor(t){const e=this.cfg.metadata||void 0;if("function"==typeof e){const r=this.api.getOutputItem(t);return await e(r)}return e}async getUploadClientOptions(){const t=this.$["*secureUploadsManager"],e=await t.getSecureToken().catch(()=>null);return{store:this.cfg.store,publicKey:this.cfg.pubkey,baseCDN:this.cfg.cdnCname,baseURL:this.cfg.baseUrl,userAgent:xn,integration:this.cfg.userAgentIntegration,secureSignature:e?.secureSignature,secureExpire:e?.secureExpire,retryThrottledRequestMaxTimes:this.cfg.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:this.cfg.retryNetworkErrorMaxTimes,multipartMinFileSize:this.cfg.multipartMinFileSize,multipartChunkSize:this.cfg.multipartChunkSize,maxConcurrentRequests:this.cfg.multipartMaxConcurrentRequests,multipartMaxAttempts:this.cfg.multipartMaxAttempts,checkForUrlDuplicates:!!this.cfg.checkForUrlDuplicates,saveUrlForRecurrentUploads:!!this.cfg.saveUrlForRecurrentUploads}}getOutputData(){return this.uploadCollection.items().map(t=>this.api.getOutputItem(t))}};la.extSrcList=Object.freeze({...wn}),la.sourceTypes=Object.freeze({...kn});var ua=class extends tn{},da={width:{ideal:1920},height:{ideal:1080},frameRate:{ideal:30}},ha=["camera","microphone"];function pa(t){return`${Math.floor(t/60).toString().padStart(2,"0")}:${Math.floor(t%60).toString().padStart(2,"0")}`}var ga="image/jpeg",ma="video/webm",fa=class extends la{couldBeCtxOwner=!0;activityType=tn.activities.CAMERA;_unsubPermissions=null;_capturing=!1;_chunks=[];_mediaRecorder=null;_stream=null;_selectedAudioId=null;_selectedCameraId=null;_activeTab=null;_options={};_canvas=null;_ctx=null;_cameraDevices=[];_audioDevices=[];_permissionResponses={};constructor(){super(),this.init$={...this.init$,video:null,videoTransformCss:null,videoHidden:!0,messageHidden:!0,requestBtnHidden:void 0!==navigator.permissions,cameraSelectOptions:null,cameraSelectHidden:!0,l10nMessage:"",switcher:null,panels:null,timer:null,timerHidden:!0,cameraHidden:!0,cameraActionsHidden:!0,audioSelectOptions:null,audioSelectHidden:!0,audioSelectDisabled:!0,audioToggleMicrophoneHidden:!0,tabCameraHidden:!0,tabVideoHidden:!0,currentIcon:"camera-full",currentTimelineIcon:"play",toggleMicrophoneIcon:"microphone",_startTime:0,_elapsedTime:0,_animationFrameId:null,mutableClassButton:"uc-shot-btn uc-camera-action",onCameraSelectChange:t=>{const e=t.target;e&&(this._selectedCameraId=e.value,this._capture())},onAudioSelectChange:t=>{const e=t.target;e&&(this._selectedAudioId=e.value,this._capture())},onCancel:()=>{this.historyBack()},onShot:()=>{this.telemetryManager.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{event:"shot-camera",node:this.tagName,tabId:this._activeTab}}}),this._shot()},onRequestPermissions:()=>this._capture(),onStartCamera:()=>{this.telemetryManager.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{event:"start-camera",node:this.tagName,tabId:this._activeTab}}}),this._chooseActionWithCamera()},onStartRecording:()=>this._startRecording(),onStopRecording:()=>this._stopRecording(),onToggleRecording:()=>this._toggleRecording(),onToggleAudio:()=>this._toggleEnableAudio(),onRetake:()=>{this.telemetryManager.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{event:"retake-camera",node:this.tagName,tabId:this._activeTab}}}),this._retake()},onAccept:()=>{this.telemetryManager.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{event:"accept-camera",node:this.tagName,tabId:this._activeTab}}}),this._accept()},onClickTab:t=>{const e=t.currentTarget,r=e?.getAttribute("data-id");r&&this._handleActiveTab(r)}}}_chooseActionWithCamera=()=>{if(this._activeTab===Qn.PHOTO&&this._shot(),this._activeTab===Qn.VIDEO){if("recording"===this._mediaRecorder?.state)return void this._stopRecording();this._startRecording()}};_updateTimer=()=>{const t=Math.floor((performance.now()-this.$._startTime+this.$._elapsedTime)/1e3);if("number"==typeof this.cfg.maxVideoRecordingDuration&&this.cfg.maxVideoRecordingDuration>0){const e=this.cfg.maxVideoRecordingDuration-t;if(e<=0){const t=this.ref.timer;return t&&(t.textContent=pa(e)),void this._stopRecording()}const r=this.ref.timer;r&&(r.textContent=pa(e))}else{const e=this.ref.timer;e&&(e.textContent=pa(t))}this._animationFrameId=requestAnimationFrame(this._updateTimer)};_startTimer=()=>{this.$._startTime=performance.now(),this.$._elapsedTime=0,this._updateTimer()};_stopTimer=()=>{this._animationFrameId&&cancelAnimationFrame(this._animationFrameId)};_startTimeline=()=>{const t=this.ref.video;if(!t)return;const e=t.currentTime,r=t.duration||1,o=this.ref.line;o&&(o.style.transform=`scaleX(${e/r})`);const i=this.ref.timer;i&&(i.textContent=pa(e)),this._animationFrameId=requestAnimationFrame(this._startTimeline)};_stopTimeline=()=>{this._animationFrameId&&cancelAnimationFrame(this._animationFrameId)};_animationFrameId=null;_startRecording=()=>{try{this._chunks=[],this._options={...this.cfg.mediaRecorderOptions};const{mimeType:t}=this.cfg.mediaRecorderOptions||{};t&&MediaRecorder.isTypeSupported(t)?this._options.mimeType=t:MediaRecorder.isTypeSupported(ma)?this._options.mimeType=ma:this._options.mimeType="video/mp4",this._stream&&(this._mediaRecorder=new MediaRecorder(this._stream,this._options),this._mediaRecorder.start(),this._mediaRecorder.addEventListener("dataavailable",t=>{this._chunks.push(t.data)}),this._startTimer(),this.classList.add("uc-recording"),this._setCameraState(ta.PLAY))}catch(t){console.error("Failed to start recording",t),this.telemetryManager.sendEventError(t,"camera recording. Failed to start recording")}};_stopRecording=()=>{this._mediaRecorder?.addEventListener("stop",()=>{this._previewVideo(),this._stopTimer(),this._setCameraState(ta.STOP)}),this._mediaRecorder?.stop(),this.classList.remove("uc-recording"),this.telemetryManager.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{event:"stop-camera",node:this.tagName,tabId:this._activeTab}}})};_toggleRecording=()=>{"recording"!==this._mediaRecorder?.state&&(!this.ref.video.paused&&!this.ref.video.ended&&this.ref.video.readyState>2?this.ref.video.pause():this.ref.video.paused&&this.ref.video.play())};_toggleEnableAudio=()=>{this._stream?.getAudioTracks().forEach(t=>{t.enabled=!t.enabled,this.$.toggleMicrophoneIcon=t.enabled?"microphone":"microphone-mute",this.$.audioSelectDisabled=!t.enabled})};_previewVideo=()=>{try{const t=new Blob(this._chunks,{type:this._mediaRecorder?.mimeType}),e=URL.createObjectURL(t),r=this.ref.video;if(!r)return;r.muted=!1,r.volume=1,this.$.video=null,r.src=e,r.addEventListener("play",()=>{this._startTimeline(),this.set$({currentTimelineIcon:"pause"})}),r.addEventListener("pause",()=>{this.set$({currentTimelineIcon:"play"}),this._stopTimeline()})}catch(t){console.error("Failed to preview video",t),this.telemetryManager.sendEventError(t,"camera previewing. Failed to preview video")}};_retake=()=>{if(this._setCameraState(ta.RETAKE),this._activeTab===Qn.VIDEO){this.$.video=this._stream;const t=this.ref.video;t&&(t.muted=!0)}this.ref.video?.play?.()};_accept=()=>{if(this._setCameraState(ta.ACCEPT),this._activeTab===Qn.PHOTO)return void this._canvas?.toBlob(t=>{if(!t)return;const e=this._createFile("camera","jpeg",ga,t);this._toSend(e)},ga);const t=new Blob(this._chunks,{type:this._mediaRecorder?.mimeType}),e=this._guessExtensionByMime(this._mediaRecorder?.mimeType),r=this._createFile("video",e,`video/${e}`,t);this._toSend(r),this._chunks=[]};_handlePhoto=t=>{t===ta.SHOT&&this.set$({tabVideoHidden:!0,cameraHidden:!0,tabCameraHidden:!0,cameraActionsHidden:!1,cameraSelectHidden:!0}),t!==ta.RETAKE&&t!==ta.ACCEPT||this.set$({tabVideoHidden:!this._cameraModes.includes(Qn.VIDEO),tabCameraHidden:!this._cameraModes.includes(Qn.PHOTO),cameraHidden:!1,cameraActionsHidden:!0,cameraSelectHidden:this._cameraDevices.length<=1})};_handleVideo=t=>{t===ta.PLAY&&this.set$({timerHidden:!1,tabCameraHidden:!0,cameraSelectHidden:!0,audioSelectHidden:!0,currentTimelineIcon:"pause",currentIcon:"square",mutableClassButton:"uc-shot-btn uc-camera-action uc-stop-record"}),t===ta.STOP&&this.set$({timerHidden:!1,cameraHidden:!0,audioToggleMicrophoneHidden:!0,cameraActionsHidden:!1}),t!==ta.RETAKE&&t!==ta.ACCEPT||this.set$({timerHidden:!0,tabVideoHidden:!this._cameraModes.includes(Qn.VIDEO),tabCameraHidden:!this._cameraModes.includes(Qn.PHOTO),cameraHidden:!1,cameraActionsHidden:!0,audioToggleMicrophoneHidden:!this.cfg.enableAudioRecording,currentIcon:"video-camera-full",mutableClassButton:"uc-shot-btn uc-camera-action",audioSelectHidden:!this.cfg.enableAudioRecording||this._audioDevices.length<=1,cameraSelectHidden:this._cameraDevices.length<=1})};_setCameraState=t=>{this._activeTab!==Qn.PHOTO||"shot"!==t&&"retake"!==t&&"accept"!==t||this._handlePhoto(t),this._activeTab!==Qn.VIDEO||"play"!==t&&"stop"!==t&&"retake"!==t&&"accept"!==t&&"pause"!==t&&"resume"!==t||this._handleVideo(t)};_shot(){if(this._setCameraState("shot"),this._canvas=document.createElement("canvas"),this._ctx=this._canvas.getContext("2d"),!this._ctx)throw new Error("Failed to get canvas context");this._canvas.height=this.ref.video.videoHeight,this._canvas.width=this.ref.video.videoWidth,this.cfg.cameraMirror&&(this._ctx.translate(this._canvas.width,0),this._ctx.scale(-1,1)),this._ctx.drawImage(this.ref.video,0,0),this.ref.video.pause()}_handleActiveTab=t=>{const e=this.ref.switcher;e?.querySelectorAll("button").forEach(e=>{e.classList.toggle("uc-active",e.getAttribute("data-id")===t)}),t===Qn.PHOTO&&this.set$({currentIcon:"camera-full",audioSelectHidden:!0,audioToggleMicrophoneHidden:!0}),t===Qn.VIDEO&&this.set$({currentTimelineIcon:"play",currentIcon:"video-camera-full",audioSelectHidden:!this.cfg.enableAudioRecording||this._audioDevices.length<=1,audioToggleMicrophoneHidden:!this.cfg.enableAudioRecording}),this.telemetryManager.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{event:"camera-tab-switch",node:this.tagName,tabId:t}}}),this._activeTab=t};_createFile=(t,e,r,o)=>{const i=Date.now();return new File([o],`${t}-${i}.${e}`,{lastModified:i,type:r})};_guessExtensionByMime(t){const e={mp4:"mp4",ogg:"ogg",webm:"webm",quicktime:"mov","x-matroska":"mkv"};if(""===t)return"webm";if(t){const r=t.split("/");if("video"===r?.[0]){const t=r.slice(1).join("/"),o=t?.split(";")[0];if(o&&e[o])return e[o]}}return"avi"}_toSend=t=>{this.api.addFileFromObject(t,{source:kn.CAMERA}),this.set$({"*currentActivity":tn.activities.UPLOAD_LIST}),this.modalManager?.open(tn.activities.UPLOAD_LIST)};get _cameraModes(){return ii(this.cfg.cameraModes).filter(t=>t===Qn.PHOTO||t===Qn.VIDEO)}_setPermissionsState=jo(t=>{this.classList.toggle("uc-initialized","granted"===t);const e=this._activeTab===Qn.VIDEO&&this.cfg.enableAudioRecording,r=this._activeTab===Qn.PHOTO?"camera-full":"video-camera-full";"granted"===t?this.set$({videoHidden:!1,cameraHidden:!1,tabCameraHidden:!this._cameraModes.includes(Qn.PHOTO),tabVideoHidden:!this._cameraModes.includes(Qn.VIDEO),messageHidden:!0,timerHidden:!0,currentIcon:r,audioToggleMicrophoneHidden:!e,audioSelectHidden:!e}):"prompt"===t?(this.$.l10nMessage="camera-permissions-prompt",this.set$({videoHidden:!0,cameraHidden:!0,tabCameraHidden:!0,messageHidden:!1}),this._stopCapture()):(this.$.l10nMessage="camera-permissions-denied",this.set$({videoHidden:!0,messageHidden:!1,tabCameraHidden:!this._cameraModes.includes(Qn.PHOTO),tabVideoHidden:!this._cameraModes.includes(Qn.VIDEO),cameraActionsHidden:!0,mutableClassButton:"uc-shot-btn uc-camera-action"}),this._stopCapture())},300);_makeStreamInactive=()=>{if(!this._stream)return!1;const t=this._stream?.getAudioTracks(),e=this._stream?.getVideoTracks();return t.forEach(t=>{t.stop()}),e.forEach(t=>{t.stop()}),!0};_stopCapture=()=>{if(this._capturing){this.ref.video.volume=0;const t=this.$.video?.getTracks?.();t?.[0]?.stop(),this.$.video=null,this._makeStreamInactive(),this._stopTimer(),this._capturing=!1}};_capture=async()=>{const t={video:{...da},audio:!!this.cfg.enableAudioRecording&&{}};this._selectedCameraId&&(t.video={deviceId:{exact:this._selectedCameraId}}),this._selectedAudioId&&this.cfg.enableAudioRecording&&(t.audio={deviceId:{exact:this._selectedAudioId}}),this.ref.video&&(this.ref.video.volume=0);try{this._setPermissionsState("prompt"),this._stream=await navigator.mediaDevices.getUserMedia(t),this._stream.addEventListener("inactive",()=>{this._setPermissionsState("denied")}),this.$.video=this._stream,this._capturing=!0,this._setPermissionsState("granted")}catch(t){this._setPermissionsState("denied"),console.log("Failed to capture camera",t),this.telemetryManager.sendEventError(t,"camera capturing. Failed to capture camera")}};_handlePermissionsChange=()=>{this._capture()};_permissionAccess=async()=>{try{for(const t of ha){const e=await navigator.permissions.query({name:t});this._permissionResponses[t]=e,e.addEventListener("change",this._handlePermissionsChange)}}catch(t){console.log("Failed to use permissions API. Fallback to manual request mode.",t),this.telemetryManager.sendEventError(t,"camera permissions. Failed to use permissions API"),this._capture()}};_getPermission=()=>{};_requestDeviceAccess=async()=>{try{await navigator.mediaDevices.getUserMedia({video:!0,audio:this.cfg.enableAudioRecording}),await this._getDevices(),navigator.mediaDevices.addEventListener("devicechange",this._getDevices)}catch(t){this.telemetryManager.sendEventError(t,"camera devices. Failed to get user media"),console.log("Failed to get user media",t)}};_getDevices=async()=>{try{const t=await navigator.mediaDevices.enumerateDevices();this._cameraDevices=t.filter(t=>"videoinput"===t.kind).map((t,e)=>({text:t.label.trim()||`${this.l10n("caption-camera")} ${e+1}`,value:t.deviceId})),this._audioDevices=this.cfg.enableAudioRecording?t.filter(t=>"audioinput"===t.kind).map(t=>({text:t.label.trim(),value:t.deviceId})):[],this._cameraDevices.length>1&&this.set$({cameraSelectOptions:this._cameraDevices,cameraSelectHidden:!1}),this._selectedCameraId=this._cameraDevices[0]?.value??null,this._audioDevices.length>1&&this.set$({audioSelectOptions:this._audioDevices,audioSelectHidden:!1}),this._selectedAudioId=this._audioDevices[0]?.value??null}catch(t){this.telemetryManager.sendEventError(t,"camera devices. Failed to get devices"),console.log("Failed to get devices",t)}};_onActivate=async()=>{await this._permissionAccess(),await this._requestDeviceAccess(),await this._capture(),this._handleCameraModes(this._cameraModes)};_onDeactivate=async()=>{this._unsubPermissions&&this._unsubPermissions();Boolean(window.chrome)||this._setPermissionsState("denied"),this._stopCapture()};_handleCameraModes=t=>{this.$.tabVideoHidden=!t.includes(Qn.VIDEO),this.$.tabCameraHidden=!t.includes(Qn.PHOTO);const e=t[0];!e||this._activeTab&&t.includes(this._activeTab)||this._handleActiveTab(e)};initCallback(){super.initCallback(),this.registerActivity(this.activityType,{onActivate:this._onActivate,onDeactivate:this._onDeactivate}),this.subConfigValue("cameraMirror",t=>{this.$.videoTransformCss=t?"scaleX(-1)":null}),this.subConfigValue("enableAudioRecording",t=>{this.$.audioToggleMicrophoneHidden=!t,this.$.audioSelectDisabled=!t}),this.subConfigValue("cameraModes",t=>{if(!this.isActivityActive)return;const e=Ho(t);this._handleCameraModes(e.filter(t=>t===Qn.PHOTO||t===Qn.VIDEO))})}_destroy(){for(const t of ha)this._permissionResponses[t]?.removeEventListener("change",this._handlePermissionsChange);navigator.mediaDevices?.removeEventListener("devicechange",this._getDevices)}async destroyCallback(){super.destroyCallback(),this._destroy()}};fa.template='\n <uc-activity-header>\n <button\n type="button"\n class="uc-mini-btn"\n set="onclick: *historyBack"\n l10n="@title:back"\n >\n <uc-icon name="back"></uc-icon>\n </button>\n <div set="@hidden: !cameraSelectHidden">\n <uc-icon name="camera"></uc-icon>\n <span l10n="caption-camera"></span>\n </div>\n <uc-select\n class="uc-camera-select"\n set="$.options: cameraSelectOptions; @hidden: cameraSelectHidden; onchange: onCameraSelectChange"\n >\n </uc-select>\n <button\n type="button"\n class="uc-mini-btn uc-close-btn"\n set="onclick: *closeModal"\n l10n="@title:a11y-activity-header-button-close;@aria-label:a11y-activity-header-button-close"\n >\n <uc-icon name="close"></uc-icon>\n </button>\n </uc-activity-header>\n <div class="uc-content">\n <video\n muted\n autoplay\n playsinline\n set="srcObject: video; style.transform: videoTransformCss; @hidden: videoHidden"\n ref="video"\n ></video>\n <div class="uc-message-box" set="@hidden: messageHidden">\n <span l10n="l10nMessage"></span>\n <button\n type="button"\n set="onclick: onRequestPermissions; @hidden: requestBtnHidden"\n l10n="camera-permissions-request"\n ></button>\n </div>\n </div>\n\n <div class="uc-controls">\n <div ref="switcher" class="uc-switcher" set="@hidden:!timerHidden">\n <button\n data-id="photo"\n type="button"\n class="uc-switch uc-mini-btn"\n set="onclick: onClickTab; @hidden: tabCameraHidden"\n >\n <uc-icon name="camera"></uc-icon>\n </button>\n <button\n data-id="video"\n type="button"\n class="uc-switch uc-mini-btn"\n set="onclick: onClickTab; @hidden: tabVideoHidden"\n >\n <uc-icon name="video-camera"></uc-icon>\n </button>\n </div>\n\n <button\n class="uc-secondary-btn uc-recording-timer"\n set="@hidden:timerHidden; onclick: onToggleRecording"\n >\n <uc-icon set="@name: currentTimelineIcon"></uc-icon>\n <span ref="timer"> 00:00 </span>\n <span ref="line" class="uc-line"></span>\n </button>\n\n <div\n class="uc-camera-actions uc-camera-action"\n set="@hidden: cameraActionsHidden"\n >\n <button type="button" class="uc-secondary-btn" set="onclick: onRetake">\n Retake\n </button>\n <button\n type="button"\n class="uc-primary-btn"\n set="onclick: onAccept"\n data-testid="accept"\n >\n Accept\n </button>\n </div>\n\n <button\n type="button"\n class="uc-shot-btn uc-camera-action"\n data-testid="shot"\n set="onclick: onStartCamera; @class: mutableClassButton; @hidden: cameraHidden;"\n >\n <uc-icon set="@name: currentIcon"></uc-icon>\n </button>\n\n <div class="uc-select">\n <button\n class="uc-mini-btn uc-btn-microphone"\n set="onclick: onToggleAudio; @hidden: audioToggleMicrophoneHidden;"\n >\n <uc-icon set="@name:toggleMicrophoneIcon"></uc-icon>\n </button>\n\n <uc-select\n class="uc-audio-select"\n set="$.options: audioSelectOptions; onchange: onAudioSelectChange; @hidden: audioSelectHidden; @disabled: audioSelectDisabled"\n >\n </uc-select>\n </div>\n </div>\n';var ba="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";function va(...t){return t.reduce((t,e)=>{if("string"==typeof e)return t[e]=!0,t;for(const r of Object.keys(e))t[r]=e[r];return t},{})}function ya(...t){const e=va(...t);return Object.keys(e).reduce((t,r)=>(e[r]&&t.push(r),t),[]).join(" ")}var wa=t=>gi.includes(t);var _a=`\n <svg width='0' height='0' style='position:absolute'><symbol fill='none' viewBox='0 0 9 6' id='uc-icon-arrow-dropdown' xmlns='http://www.w3.org/2000/svg'><path stroke='currentColor' d='m1.5 1.667 3 2.666 3-2.666' opacity='.5'/></symbol><symbol viewBox='0 0 24 24' id='uc-icon-aspect-ratio' xmlns='http://www.w3.org/2000/svg'/><symbol viewBox='0 0 20 20' id='uc-icon-brightness' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M15 10a5 5 0 0 1-5 5m5-5a5 5 0 0 0-5-5m5 5h-5m0 5a5 5 0 0 1 0-10m0 10V5m0 15v-3M2.93 2.929 5.05 5.05M0 10h3m-.07 7.071 2.12-2.121M10 0v3m7.07 14.071-2.12-2.121M20 10h-3m.07-7.071L14.95 5.05m-.626 2.45H10m4.324 5H10'/></symbol><symbol fill='currentColor' viewBox='0 0 20 20' id='uc-icon-closeMax' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' d='M8.232 10 3.585 5.353l1.768-1.768L10 8.232l4.648-4.647 1.767 1.768L11.768 10l4.647 4.648-1.767 1.767L10 11.768l-4.647 4.647-1.768-1.767L8.232 10Z' clip-rule='evenodd'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-contrast' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M2 10a8 8 0 1 0 16 0 8 8 0 1 0-16 0m8-8v16m8-8h-8m7.598 2.5H10m6.24 2.5H10m7.6-7.5H10M16.242 5H10'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-crop' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M20 14H7.005C6.45 14 6 13.55 6 12.995V0M0 6h13.067c.515 0 .933.418.933.933V20M14.5.4 13 2l1.5 1.6M13 2h2a3 3 0 0 1 3 3v2M5.5 19.6 7 18l-1.5-1.6M7 18H5a3 3 0 0 1-3-3v-2'/></symbol><symbol fill='currentColor' viewBox='0 0 20 20' id='uc-icon-done' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' d='m18.057 6.333-9.365 9.125a1.25 1.25 0 0 1-1.768-.023L1.92 10.296l1.791-1.744 4.132 4.243 8.47-8.253 1.744 1.79Z' clip-rule='evenodd'/></symbol><symbol fill='currentColor' viewBox='0 0 25 24' id='uc-icon-edit-file' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' d='M18.558 2.804a.78.78 0 0 0-.557.235l-.008.007-2.472 2.46 3.847 3.848 2.46-2.473.004-.003a.78.78 0 0 0 0-1.108l-.004-.003-2.712-2.728a.78.78 0 0 0-.558-.235Zm-.248 7.613-3.852-3.852-8.93 8.887-1.516 5.41 5.41-1.515 8.888-8.93Zm-.636-8.934a2.28 2.28 0 0 1 2.512.505l2.702 2.717.002.002a2.278 2.278 0 0 1 0 3.234l-.002.002-12.541 12.602a.75.75 0 0 1-.33.193l-6.884 1.928a.75.75 0 0 1-.925-.924l1.928-6.885a.75.75 0 0 1 .193-.33l12.603-12.54a2.28 2.28 0 0 1 .742-.504Z' clip-rule='evenodd'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-enhance' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M19 13h-2m0 0a4 4 0 0 1-4-4m4 4a4 4 0 0 0-4 4m0-8V7m0 2a4 4 0 0 1-4 4m-2 0h2m0 0a4 4 0 0 1 4 4m0 0v2M8 8.5H6.5m0 0a2 2 0 0 1-2-2m2 2a2 2 0 0 0-2 2m0-4V5m0 1.5a2 2 0 0 1-2 2M1 8.5h1.5m0 0a2 2 0 0 1 2 2m0 0V12M12 3h-1m0 0a1 1 0 0 1-1-1m1 1a1 1 0 0 0-1 1m0-2V1m0 1a1 1 0 0 1-1 1M8 3h1m0 0a1 1 0 0 1 1 1m0 0v1'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-exposure' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M10 20v-3M2.93 2.929 5.05 5.05M0 10h3m-.07 7.071 2.12-2.121M10 0v3m7.07 14.071-2.12-2.121M20 10h-3m.07-7.071L14.95 5.05M5 10a5 5 0 1 0 10 0 5 5 0 1 0-10 0'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-filters' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M4.5 6.5a5.5 5.5 0 1 0 11 0 5.5 5.5 0 1 0-11 0m-3.5 6a5.5 5.5 0 1 0 11 0 5.5 5.5 0 1 0-11 0m7 0a5.5 5.5 0 1 0 11 0 5.5 5.5 0 1 0-11 0'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-flip' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M19.6 5 18 3.5 16.4 5m3.2 10L18 16.5 16.4 15M18 3.523v12.954M3.3 8.5h10.654c.301 0 .415-.395.159-.554L3.459 1.286A.3.3 0 0 0 3 1.542V8.2a.3.3 0 0 0 .3.3zm0 3h10.654c.301 0 .415.395.159.554l-10.654 6.66A.3.3 0 0 1 3 18.458v-6.66a.3.3 0 0 1 .3-.3z'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-gamma' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M17 3C9 6 2.5 11.5 2.5 17.5m0 0h1m-1 0v-1m14 1h1m-3 0h1m-3 0h1m-3 0h1m-3 0h1m-3 0h1m-3 0h1m-3-14v-1m0 3v-1m0 3v-1m0 3v-1m0 3v-1m0 3v-1m0 3v-1'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-mirror' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M5 .4 3.5 2 5 3.6M15 .4 16.5 2 15 3.6M3.52 2h12.957M8.5 16.7V6.046c0-.301-.394-.415-.554-.159L1.287 16.541a.3.3 0 0 0 .255.459H8.2a.3.3 0 0 0 .3-.3zm3 0V6.046c0-.301.395-.415.555-.159l6.659 10.654a.3.3 0 0 1-.255.459H11.8a.3.3 0 0 1-.3-.3z'/></symbol><symbol viewBox='0 0 40 40' id='uc-icon-original' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.5' d='M0 40 40 0'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-rotate' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M13.5.4 12 2l1.5 1.6M12.023 2H14.4A3.6 3.6 0 0 1 18 5.6V8M4 17h9a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1z'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-sad' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M2 17c4.418-4 11.582-4 16 0M16.5 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-11 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-saturation' xmlns='http://www.w3.org/2000/svg'><defs><linearGradient id='ruc-icon-id__a' x1='10.001' y1='1' x2='10.001' y2='19' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient></defs><circle cx='10.001' cy='10' r='9' transform='rotate(90 10 10)' fill='url(#ruc-icon-id__a)'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-slider' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M0 10h11m0 0a2 2 0 1 0 4 0m-4 0a2 2 0 1 1 4 0m0 0h5'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-tuning' xmlns='http://www.w3.org/2000/svg'><path stroke-linejoin='round' fill='none' stroke='currentColor' stroke-width='1.2' d='M8 10h11M1 10h4M1 4.5h11m3 0h4m-18 11h11m3 0h4m-7-11a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0M5 10a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0m7 5.5a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0'/></symbol><symbol viewBox='0 0 20 20' id='uc-icon-vibrance' xmlns='http://www.w3.org/2000/svg'><path d='M2.125 5.64A8.96 8.96 0 0 0 1.001 10a8.96 8.96 0 0 0 1.124 4.36V5.64z' fill='url(#uuc-icon-id__a)'/><path d='M2.875 15.499V4.502a9.053 9.053 0 0 1 1.75-1.72v14.437a9.05 9.05 0 0 1-1.75-1.72z' fill='url(#uuc-icon-id__b)'/><path d='M5.375 17.722c.548.33 1.134.601 1.75.809V1.469a8.956 8.956 0 0 0-1.75.81v15.443z' fill='url(#uuc-icon-id__c)'/><path d='M7.875 1.253v17.495c.564.136 1.15.22 1.75.244V1.008a9 9 0 0 0-1.75.245z' fill='url(#uuc-icon-id__d)'/><path d='M10.375 1.008v17.984a9 9 0 0 0 1.75-.244V1.252a9 9 0 0 0-1.75-.244z' fill='url(#uuc-icon-id__e)'/><path d='M12.875 1.469V18.53a8.957 8.957 0 0 0 1.75-.808V2.277a8.957 8.957 0 0 0-1.75-.808z' fill='url(#uuc-icon-id__f)'/><path d='M15.375 2.78v14.44a9.053 9.053 0 0 0 1.75-1.72v-11a9.054 9.054 0 0 0-1.75-1.72z' fill='url(#uuc-icon-id__g)'/><path d='M17.875 5.638v8.724A8.959 8.959 0 0 0 19.001 10a8.96 8.96 0 0 0-1.126-4.362z' fill='url(#uuc-icon-id__h)'/><defs><linearGradient id='uuc-icon-id__a' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__b' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__c' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__d' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__e' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__f' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__g' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient><linearGradient id='uuc-icon-id__h' x1='19.001' y1='10' x2='1.001' y2='10' gradientUnits='userSpaceOnUse'><stop stop-color='#DE15FF'/><stop offset='.203' stop-color='#0029FF'/><stop offset='.479' stop-color='#2AE4F0'/><stop offset='.604' stop-color='#15EF11'/><stop offset='.75' stop-color='#FAE528'/><stop offset='1' stop-color='#EB2A2A'/></linearGradient></defs></symbol><symbol viewBox='0 0 20 20' id='uc-icon-warmth' xmlns='http://www.w3.org/2000/svg'><path d='m7.5 13.05.429.42.171-.175v-.244h-.6zm5 0h-.6v.245l.172.175.428-.42zM8.1 3.5c0-1.05.85-1.9 1.9-1.9V.4a3.1 3.1 0 0 0-3.1 3.1h1.2zm0 9.55V3.5H6.9v9.55h1.2zm-1 2.45c0-.79.315-1.506.829-2.03l-.858-.84A4.088 4.088 0 0 0 5.9 15.5h1.2zm2.9 2.9a2.9 2.9 0 0 1-2.9-2.9H5.9a4.1 4.1 0 0 0 4.1 4.1v-1.2zm2.9-2.9a2.9 2.9 0 0 1-2.9 2.9v1.2a4.1 4.1 0 0 0 4.1-4.1h-1.2zm-.829-2.03c.514.524.829 1.24.829 2.03h1.2c0-1.117-.447-2.13-1.171-2.87l-.858.84zM11.9 3.5v9.55h1.2V3.5h-1.2zM10 1.6c1.05 0 1.9.85 1.9 1.9h1.2A3.1 3.1 0 0 0 10 .4v1.2z' fill='currentColor'/><path d='M10 14V8' stroke='currentColor' stroke-width='1.2' stroke-linecap='round'/><path d='M14 3h3m-3 3h3m-3 3h3m-8 6.5a1 1 0 1 0 2 0 1 1 0 1 0-2 0' stroke='currentColor' stroke-width='1.2'/></symbol></svg>\n <div class="uc-wrapper uc-wrapper_desktop">\n <uc-presence-toggle class="uc-network_problems_splash" set="visible: presence.networkProblems;">\n <div class="uc-network_problems_content">\n <div class="uc-network_problems_icon">\n <uc-icon name="sad"></uc-icon>\n </div>\n <div class="uc-network_problems_text">Network error</div>\n </div>\n <div class="uc-network_problems_footer">\n <uc-btn-ui theme="primary" text="Retry" set="onclick: *on.retryNetwork"></uc-btn-ui>\n </div>\n </uc-presence-toggle>\n <div class="uc-viewport">\n <div class="uc-file_type_outer">\n <div class="uc-file_type">{{fileType}}</div>\n </div>\n <div class="uc-image_container" ref="img-container-el">\n <img src="${ba}" class="uc-image uc-image_visible_from_editor" ref="img-el" />\n <uc-editor-image-cropper ref="cropper-el"></uc-editor-image-cropper>\n <uc-editor-image-fader ref="fader-el"></uc-editor-image-fader>\n </div>\n <div class="uc-info_pan">{{msg}}</div>\n </div>\n <div class="uc-toolbar">\n <uc-line-loader-ui set="active: showLoader"></uc-line-loader-ui>\n <div class="uc-toolbar_content uc-toolbar_content__editor">\n <uc-editor-toolbar></uc-editor-toolbar>\n </div>\n </div>\n </div>\n`,ka=class extends Yi{ctxOwner=!0;static styleAttrs=["uc-cloud-image-editor"];_debouncedShowLoader=jo(this._showLoader.bind(this),300);constructor(){var t;super(),this.init$={...this.init$,...(t=this,{"*originalUrl":null,"*faderEl":null,"*cropperEl":null,"*imgEl":null,"*imgContainerEl":null,"*networkProblems":!1,"*imageSize":null,"*editorTransformations":{},"*cropPresetList":[],"*currentAspectRatio":null,"*tabList":gi,"*tabId":pi.CROP,entry:null,extension:null,editorMode:!1,modalCaption:"",isImage:!1,msg:"",src:ba,fileType:"",showLoader:!1,uuid:null,cdnUrl:null,cropPreset:"",tabs:qo([...gi]),"presence.networkProblems":!1,"presence.modalCaption":!0,"presence.editorToolbar":!1,"presence.viewerToolbar":!0,"*on.retryNetwork":()=>{const e=t.querySelectorAll("img");for(const t of e){const e=t.src;t.src=ba,t.src=e}t.$["*networkProblems"]=!1},"*on.apply":e=>{if(!e)return;const r=t.$["*originalUrl"],o=Wo(si(e),"preview"),i={originalUrl:r,cdnUrlModifiers:o,cdnUrl:ri(r,o),transformations:e};t.dispatchEvent(new CustomEvent("apply",{detail:i,bubbles:!0,composed:!0})),t.remove()},"*on.cancel":()=>{t.remove(),t.dispatchEvent(new CustomEvent("cancel",{bubbles:!0,composed:!0}))}})}}_showLoader(t){this.$.showLoader=t}_waitForSize(){return new Promise((t,e)=>{const r=window.setTimeout(()=>{e(new Error("[cloud-image-editor] timeout waiting for non-zero container size"))},3e3),o=new ResizeObserver(e=>{const[i]=e;i&&i.contentRect.width>0&&i.contentRect.height>0&&(window.clearTimeout(r),o.disconnect(),window.setTimeout(()=>t(),0))});o.observe(this)})}initCallback(){super.initCallback(),this.$["*faderEl"]=this.ref["fader-el"],this.$["*cropperEl"]=this.ref["cropper-el"],this.$["*imgContainerEl"]=this.ref["img-container-el"],this.initEditor()}async updateImage(){if(this.isConnected){if(await this._waitForSize(),this.$.cdnUrl){const t=this.$.cdnUrl,e=Xo(t),r=oi(t,e);if(r===this.$["*originalUrl"])return;this.$["*originalUrl"]=r;const o=hi(Jo(t));this.$["*editorTransformations"]=o}else{if(!this.$.uuid)throw new Error("No UUID nor CDN URL provided");{const t=oi(this.cfg.cdnCname,this.$.uuid);if(t===this.$["*originalUrl"])return;this.$["*originalUrl"]=t,this.$["*editorTransformations"]={}}}this.$["*tabId"]===pi.CROP?this.$["*cropperEl"]?.deactivate({reset:!0}):this.$["*faderEl"]?.deactivate();try{const t=this.$["*originalUrl"],e=await this.proxyUrl(ri(t,Wo("json"))),r=await fetch(e).then(t=>t.json()),{width:o,height:i}=r;this.$["*imageSize"]={width:o,height:i},this.$["*tabId"]===pi.CROP?this.$["*cropperEl"]?.activate(this.$["*imageSize"]):this.$["*faderEl"]?.activate({url:t})}catch(t){t&&(this.telemetryManager.sendEventError(t,"cloud editor image. Failed to load image info"),console.error("Failed to load image info",t))}}}async initEditor(){try{await this._waitForSize()}catch(t){return void(this.isConnected&&console.error(t.message))}this.ref["img-el"].addEventListener("load",()=>{this._debouncedShowLoader(!1),this.$.src!==ba&&(this.$["*networkProblems"]=!1)}),this.ref["img-el"].addEventListener("error",()=>{this._debouncedShowLoader(!1),this.$["*networkProblems"]=!0}),this.sub("src",t=>{const e=this.ref["img-el"];e.src!==t&&(e.src=t||ba)}),this.sub("tabs",t=>{this.$["*tabList"]=(t=>{if(!t)return gi;const e=Ho(t).filter(wa);return 0===e.length?gi:e})(t)}),this.sub("*tabId",t=>{this.ref["img-el"].className=ya("uc-image",{"uc-image_hidden_to_cropper":t===pi.CROP,"uc-image_hidden_effects":t!==pi.CROP})}),this.classList.add("uc-editor_ON"),this.sub("*networkProblems",t=>{this.$["presence.networkProblems"]=t,this.$["presence.modalCaption"]=!t}),this.sub("*editorTransformations",t=>{if(0===Object.keys(t).length)return;const e=this.$["*originalUrl"],r=Wo(si(t),"preview"),o={originalUrl:e,cdnUrlModifiers:r,cdnUrl:ri(e,r),transformations:t};this.dispatchEvent(new CustomEvent("change",{detail:o,bubbles:!0,composed:!0}))},!1),this.sub("uuid",t=>t&&this.updateImage()),this.sub("cdnUrl",t=>t&&this.updateImage()),this.sub("cropPreset",t=>{const e=yn(t);let r=null;if(this.$.cdnUrl){const t=hi(Jo(this.$.cdnUrl));if(Array.isArray(t?.crop?.dimensions)){const[o,i]=t.crop.dimensions;r=((t,e,r,o=.1)=>{const i=t/e;let n=null,a=1/0;for(const t of r){const[e,r]=[t.width,t.height],o=e/r,s=Math.abs(i-o);s<a&&(a=s,n=t)}if(n){const[t,e]=[n.width,n.height],r=t/e;if(Math.abs(i-r)/r>o)return null}return n})(o,i,e,.1)}}this.$["*cropPresetList"]=e,this.$["*currentAspectRatio"]=r??e?.[0]??null})}};ka.template=_a,ka.bindAttributes({uuid:"uuid","cdn-url":"cdnUrl","crop-preset":"cropPreset",tabs:"tabs"});var xa=class extends Yi{_handlePointerUp;_handlePointerMove;_handleSvgPointerMove;_backdropMaskId=`backdrop-mask-${xe.generate()}`;_backdropMask;_backdropMaskInner;_frameThumbs;_frameGuides;_draggingThumb;_hoverThumb;_dragStartPoint;_dragStartCrop;_frameImage;_guidesHidden=!1;constructor(){super(),this.init$={...this.init$,dragging:!1},this._handlePointerUp=this._handlePointerUp_.bind(this),this._handlePointerMove=this._handlePointerMove_.bind(this),this._handleSvgPointerMove=this._handleSvgPointerMove_.bind(this)}_shouldThumbBeDisabled(t){const e=this.$["*imageBox"];if(!e)return!1;if(""===t&&e.height<=1&&e.width<=1)return!0;const r=e.height<=1&&(t.includes("n")||t.includes("s")),o=e.width<=1&&(t.includes("e")||t.includes("w"));return r||o}_createBackdrop(){const t=this.$["*cropBox"];if(!t)return;const{x:e,y:r,width:o,height:i}=t,n=this.ref["svg-el"],a=ln("mask",{id:this._backdropMaskId}),s=ln("rect",{x:0,y:0,width:"100%",height:"100%",fill:"white"}),c=ln("rect",{x:e,y:r,width:o,height:i,fill:"black"});a.appendChild(s),a.appendChild(c);const l=ln("rect",{x:0,y:0,width:"100%",height:"100%",fill:"var(--color-image-background)","fill-opacity":.85,mask:`url(#${this._backdropMaskId})`});n.appendChild(l),n.appendChild(a),this._backdropMask=a,this._backdropMaskInner=c}_resizeBackdrop(){this._backdropMask&&(this._backdropMask.style.display="none",window.requestAnimationFrame(()=>{this._backdropMask&&(this._backdropMask.style.display="block")}))}_updateBackdrop(){const t=this.$["*cropBox"];if(!t)return;const{x:e,y:r,width:o,height:i}=t;this._backdropMaskInner&&cn(this._backdropMaskInner,{x:e,y:r,width:o,height:i})}_updateFrame(){const t=this.$["*cropBox"];if(t&&this._frameGuides&&this._frameThumbs){for(const e of Object.values(this._frameThumbs)){if(!e)continue;const{direction:r,pathNode:o,interactionNode:i,groupNode:n}=e,a=""===r,s=2===r.length,{x:c,y:l,width:u,height:d}=t;if(a){cn(i,{x:c,y:l,width:u,height:d})}else{const e=bn(Math.min(u,d)/82/2,0,1),n=s?un(t,r,e):dn(t,r,e),a=n.center;if(!a)continue;const c=Math.max(24*bn(Math.min(u,d)/24/3,0,1),6);cn(i,{x:a[0]-c,y:a[1]-c,width:2*c,height:2*c}),cn(o,{d:n.d})}const h=this._shouldThumbBeDisabled(r);n.setAttribute("class",ya("uc-thumb",{"uc-thumb--hidden":h,"uc-thumb--visible":!h}))}cn(this._frameGuides,{x:t.x-.5,y:t.y-.5,width:t.width+1,height:t.height+1})}}_createThumb(t,e){const r=ln("g");r.classList.add("uc-thumb"),r.setAttribute("with-effects","");const o=ln("rect",{fill:"transparent"}),i=ln("path",{stroke:"currentColor",fill:"none","stroke-width":3});r.appendChild(i),r.appendChild(o),t[e]={direction:e,pathNode:i,interactionNode:o,groupNode:r},""===e&&(r.style.cursor="move"),o.addEventListener("pointerdown",this._handlePointerDown.bind(this,e))}_createThumbs(){const t={};for(let e=0;e<3;e++)for(let r=0;r<3;r++){const o=`${["n","","s"][e]}${["w","","e"][r]}`;""!==o&&this._createThumb(t,o)}return this._createThumb(t,""),t}_createGuides(){const t=ln("svg"),e=ln("rect",{x:0,y:0,width:"100%",height:"100%",fill:"none",stroke:"currentColor","stroke-width":1,"stroke-opacity":.5});t.appendChild(e);for(let e=1;e<=2;e++){const r=ln("line",{x1:sn*e+"%",y1:"0%",x2:sn*e+"%",y2:"100%",stroke:"currentColor","stroke-width":1,"stroke-opacity":.3});t.appendChild(r)}for(let e=1;e<=2;e++){const r=ln("line",{x1:"0%",y1:sn*e+"%",x2:"100%",y2:sn*e+"%",stroke:"currentColor","stroke-width":1,"stroke-opacity":.3});t.appendChild(r)}return t.classList.add("uc-guides","uc-guides--semi-hidden"),t}_createFrame(){const t=this.ref["svg-el"],e=document.createDocumentFragment(),r=this._createGuides();e.appendChild(r);const o=this._createThumbs();for(const{groupNode:t}of Object.values(o))e.appendChild(t);t.appendChild(e),this._frameThumbs=o,this._frameGuides=r}_handlePointerDown(t,e){if(!this._frameThumbs)return;const r=this._frameThumbs[t];if(!r)return;if(this._shouldThumbBeDisabled(t))return;const o=this.$["*cropBox"],i=this.ref["svg-el"],{x:n,y:a}=i.getBoundingClientRect(),s=e.x-n,c=e.y-a;this.$.dragging=!0,this._draggingThumb=r,this._dragStartPoint=[s,c],this._dragStartCrop={...o}}_handlePointerUp_(t){this._updateCursor(),this.$.dragging&&(t.stopPropagation(),t.preventDefault(),this.$.dragging=!1)}_handlePointerMove_(t){if(!this.$.dragging||!this._dragStartPoint||!this._draggingThumb)return;t.stopPropagation(),t.preventDefault();const e=this.ref["svg-el"],{x:r,y:o}=e.getBoundingClientRect(),i=t.x-r,n=t.y-o,a=i-this._dragStartPoint[0],s=n-this._dragStartPoint[1],{direction:c}=this._draggingThumb,l=this._calcCropBox(c,[a,s]);l&&(this.$["*cropBox"]=l)}_calcCropBox(t,e){const[r,o]=e,i=this.$["*imageBox"];let n=this._dragStartCrop??this.$["*cropBox"];const a=this.$["*currentAspectRatio"],s=a?a.width/a.height:void 0;if(n=""===t?function({rect:t,delta:[e,r],imageBox:o}){return hn({...t,x:t.x+e,y:t.y+r},o)}({rect:n,delta:[r,o],imageBox:i}):pn({rect:n,delta:[r,o],direction:t,aspectRatio:s,imageBox:i}),Object.values(n).every(t=>Number.isFinite(t)&&t>=0))return hn(fn(n),i);console.error("CropFrame is trying to create invalid rectangle",{payload:n})}_handleSvgPointerMove_(t){if(!this._frameThumbs)return;const e=Object.values(this._frameThumbs).find(e=>{if(!e)return!1;if(this._shouldThumbBeDisabled(e.direction))return!1;const r=e.interactionNode.getBoundingClientRect(),o=function(t,[e,r]){return t.x<=e&&e<=t.x+t.width&&t.y<=r&&r<=t.y+t.height}({x:r.x,y:r.y,width:r.width,height:r.height},[t.x,t.y]);return o});this._hoverThumb=e,this._updateCursor()}_updateCursor(){const t=this._hoverThumb;var e;this.ref["svg-el"].style.cursor=t?""===(e=t.direction)?"move":["e","w"].includes(e)?"ew-resize":["n","s"].includes(e)?"ns-resize":["nw","se"].includes(e)?"nwse-resize":"nesw-resize":"initial"}_createMask(t){if(this._frameImage)return void this._frameImage.setAttribute("href",t);const e=this.ref["svg-el"],r=document.createDocumentFragment(),o=ln("image",{href:t});o.setAttribute("class","uc-cloud-mask"),r.appendChild(o),e.appendChild(r),this._frameImage=o}_updateMask(){const t=this.$["*cropBox"];if(!t||!this._frameImage)return;const{x:e,y:r,width:o,height:i}=t;cn(this._frameImage,{x:e,y:r,height:i,width:o})}_render(){this._updateBackdrop(),this._updateFrame(),this._updateMask()}toggleThumbs(t){if(this._frameThumbs)for(const e of Object.values(this._frameThumbs)){if(!e)continue;const{groupNode:r}=e;r.setAttribute("class",ya("uc-thumb",{"uc-thumb--hidden":!t,"uc-thumb--visible":t}))}}initCallback(){super.initCallback(),this._createBackdrop(),this._createFrame(),this.sub("*imageBox",()=>{this._resizeBackdrop(),window.requestAnimationFrame(()=>{this._render()})}),this.sub("*cropBox",t=>{t&&(this._guidesHidden=t.height<=1||t.width<=1,window.requestAnimationFrame(()=>{this._render()}))}),this.subConfigValue("cloudImageEditorMaskHref",t=>{t&&this._createMask(t)}),this.sub("dragging",t=>{this._frameGuides&&this._frameGuides.setAttribute("class",ya({"uc-guides--hidden":this._guidesHidden,"uc-guides--visible":!this._guidesHidden&&t,"uc-guides--semi-hidden":!this._guidesHidden&&!t}))});this.ref["svg-el"].addEventListener("pointermove",this._handleSvgPointerMove,!0),document.addEventListener("pointermove",this._handlePointerMove,!0),document.addEventListener("pointerup",this._handlePointerUp,!0)}destroyCallback(){super.destroyCallback();this.ref["svg-el"].removeEventListener("pointermove",this._handleSvgPointerMove,!0),document.removeEventListener("pointermove",this._handlePointerMove),document.removeEventListener("pointerup",this._handlePointerUp)}};xa.template=' <svg class="uc-svg" ref="svg-el" xmlns="http://www.w3.org/2000/svg"></svg> ';var Ca=class extends Yi{_titleEl;constructor(){super(),this.init$={...this.init$,active:!1,title:"",icon:"","on.click":null,"title-prop":""}}initCallback(){super.initCallback(),this._titleEl=this.ref["title-el"],this.sub("title",t=>{const e=this._titleEl;e&&(e.style.display=t?"block":"none")}),this.sub("active",t=>{this.className=ya({"uc-active":t,"uc-not_active":!t})}),this.sub("on.click",t=>{this.onclick=t??null})}};Ca.template='\n <button role="option" type="button" set="@aria-label:title-prop;" l10n="@title:title-prop;">\n <uc-icon ref="icon-el" set="@name: icon;"></uc-icon>\n <div class="uc-title" ref="title-el">{{title}}</div>\n </button>\n';var Ea=class extends Ca{initCallback(){super.initCallback(),this.$.icon="arrow-dropdown",this.$["on.click"]=this.handleClick.bind(this),this.sub("*currentAspectRatio",t=>{this.$.title=t.hasFreeform?this.l10n("freeform-crop"):this.l10n("crop-to-shape",{value:`${t.width}:${t.height}`}),this.bindL10n("title-prop",()=>this.$.title)})}handleClick(){this.$["*showListAspectRatio"]=!0}};Ea.template=' \n <button role="option" type="button" set="@aria-label:title-prop;" l10n="@title:title-prop;">\n <div class="uc-title" ref="title-el">{{title}}</div>\n <uc-icon ref="icon-el" set="@name: icon;"></uc-icon>\n </button> \n';var Ta=class extends Ca{constructor(){super(),this.init$={...this.init$,active:!1,once:!1}}initCallback(){super.initCallback(),this.defineAccessor("aspectRatio",t=>{if(!t)return;const e=!!t.hasFreeform;this.$.title=e?this.l10n("custom"):`${t.width}:${t.height}`,e||this._renderRectBasedOnAspectRatio(t),e&&this.setAttribute("uc-aspect-ratio-freeform",""),this._aspectRatio=t,this.bindL10n("title-prop",()=>this.l10n("a11y-cloud-editor-apply-aspect-ratio",{name:e?this.l10n("custom").toLowerCase():this.l10n("crop-to-shape",{value:`${t.width}:${t.height}`}).toLowerCase(),value:""}))}),this.sub("*currentAspectRatio",t=>{this.$.active=t&&t.id===this._aspectRatio?.id||t?.width===this._aspectRatio?.width&&t?.height===this._aspectRatio?.height}),this.$["on.click"]=this.handleClick.bind(this)}handleClick(){const t=this.$["*currentAspectRatio"];t?.id!==this._aspectRatio?.id&&(this.$["*currentAspectRatio"]=this._aspectRatio)}_renderRectBasedOnAspectRatio(t){const{width:e,height:r}=(t=>{let e=12,r=12;return t.width/t.height>=1?(e=12,r=Math.round(12*t.height/t.width)):(r=12,e=Math.round(12*t.width/t.height)),{width:e,height:r}})(t),o=ln("rect",{"stroke-linejoin":"round",fill:"none",stroke:"currentColor","stroke-width":1.2,"fill-rule":"evenodd",x:(16-e)/2,y:(16-r)/2,rx:2,width:e,height:r}),i=this.ref["icon-el"]?.ref?.svg;i&&(i.innerHTML="",i.appendChild(o))}_aspectRatio};var Aa=class extends Ca{_operation=void 0;initCallback(){super.initCallback(),this.defineAccessor("operation",t=>{t&&(this._operation=t,this.$.icon=t,this.bindL10n("title-prop",()=>this.l10n("a11y-cloud-editor-apply-crop",{name:this.l10n(t).toLowerCase()})))}),this.$["on.click"]=t=>{if(!this._operation)return;const e=this.$["*cropperEl"],r=e.getValue(this._operation),o=function(t,e){if("rotate"===t)return function(t){let e=t+90;return e=e>=360?0:e,e}("number"==typeof e?e:0);if("mirror"===t||"flip"===t)return!e;throw new Error(`Unsupported operation: ${t}`)}(this._operation,r);this.telemetryManager.sendEventCloudImageEditor(t,this.$["*tabId"],{operation:this._operation,next:o,prev:r}),e.setValue(this._operation,o)}}};function Ia(t){const e=new Image;return{promise:new Promise((r,o)=>{e.src=t,e.onload=()=>r(),e.onerror=t=>o(t)}),image:e,cancel:()=>{0===e.naturalWidth&&(e.src=ba)}}}function Sa(t){const e=[];for(const r of t){const t=Ia(r);e.push(t)}const r=e.map(t=>t.image);return{promise:Promise.allSettled(e.map(t=>t.promise)),images:r,cancel:()=>{e.forEach(t=>{t.cancel()})}}}var Ma="original",$a=class extends Yi{_operation="filter";_filter;_originalUrl="";constructor(){super(),this.init$={...this.init$,disabled:!1,min:0,max:100,value:0,defaultValue:0,zero:0,"on.input":t=>{const e=this.$["*faderEl"];e?.set(t),this.$.value=t}}}setOperation(t,e){this._operation=t,this._filter=e,this._initializeValues();const r=this.$["*faderEl"],o=this._originalUrl||this.$["*originalUrl"];r&&o&&r.activate({url:o,operation:this._operation,value:this._filter===Ma?void 0:this.$.value,filter:this._filter===Ma?void 0:this._filter,fromViewer:!1})}_initializeValues(){const t=this._operation,{range:e,zero:r}=yi[t],[o,i]=e;this.$.min=o,this.$.max=i,this.$.zero=r;const n=this.$["*editorTransformations"][t];if("filter"===t){let t=Number(i);const e=n;if(e){const{name:r,amount:o}=e;t=r===this._filter?o:i}return this.$.value=t,void(this.$.defaultValue=t)}const a=void 0!==n?n:r;this.$.value=a,this.$.defaultValue=a}apply(){const t={...this.$["*editorTransformations"]};"filter"===this._operation?this._filter&&this._filter!==Ma?t.filter={name:this._filter,amount:this.$.value}:delete t.filter:t[this._operation]=this.$.value,this.$["*editorTransformations"]=t}cancel(){const t=this.$["*faderEl"];t?.deactivate({hide:!1})}initCallback(){super.initCallback(),this.sub("*originalUrl",t=>{this._originalUrl=t}),this.sub("value",t=>{const e=`${this._filter??this._operation} ${t}`;this.$["*operationTooltip"]=e})}};function La(t){const e=t.match(/^([A-Za-z]+)\s+(\d+)$/);if(!e)return null;const[,r,o]=e;return r&&void 0!==o?{filter:r,value:Number(o)}:null}$a.template='\n <uc-slider-ui\n ref="slider-el"\n set="disabled: disabled; min: min; max: max; defaultValue: defaultValue; zero: zero; onInput: on.input;"\n ></uc-slider-ui>\n';var Oa=class extends Ca{_operation="";_filter="";_originalUrl="";_observer;_cancelPreload;constructor(){super(),this.init$={...this.init$,active:!1,title:"",icon:"",isOriginal:!1,iconSize:"20","on.click":null}}_previewSrc(){const t=parseInt(window.getComputedStyle(this).getPropertyValue("--l-base-min-width"),10),e=window.devicePixelRatio,r=Math.ceil(e*t),o=e>=2?"lightest":"normal",i={...this.$["*editorTransformations"]};return i[this._operation]=this._filter!==Ma?{name:this._filter,amount:100}:void 0,ri(this._originalUrl,Wo(ci,si(i),`quality/${o}`,`scale_crop/${r}x${r}/center`))}async _observerCallback(t,e){const r=t[0];if(r?.isIntersecting){const t=await this.proxyUrl(this._previewSrc()),r=this.ref["preview-el"],{promise:o,cancel:i}=Ia(t);this._cancelPreload=i,o.catch(t=>{this.$["*networkProblems"]=!0,console.error("Failed to load image",{error:t})}).finally(()=>{r.style.backgroundImage=`url(${t})`,r.setAttribute("loaded",""),e.unobserve(this)})}else this._cancelPreload?.()}initCallback(){super.initCallback(),this.$["on.click"]=t=>{if(this.$.active){if(!this.$.isOriginal){this.$["*sliderEl"].setOperation(this._operation,this._filter),this.$["*showSlider"]=!0}}else{const t=this.$["*sliderEl"];t.setOperation(this._operation,this._filter),t.apply()}this.telemetryManager.sendEventCloudImageEditor(t,this.$["*tabId"],{operation:La(this.$["*operationTooltip"])}),this.$["*currentFilter"]=this._filter},this.defineAccessor("filter",t=>{this._operation="filter",this._filter=t,this.$.isOriginal=t===Ma,this.$.icon=this.$.isOriginal?"original":"slider",this.bindL10n("title-prop",()=>this.l10n("a11y-cloud-editor-apply-filter",{name:t.toLowerCase()}))}),this._observer=new window.IntersectionObserver(this._observerCallback.bind(this),{threshold:[0,1]});const t=this.$["*originalUrl"];if(this._originalUrl=t,this.$.isOriginal){this.ref["icon-el"].classList.add("uc-original-icon")}else this._observer.observe(this);this.sub("*currentFilter",t=>{this.$.active=t&&t===this._filter}),this.sub("isOriginal",t=>{this.$.iconSize=t?40:20}),this.sub("active",t=>{if(this.$.isOriginal)return;this.ref["icon-el"].style.opacity=t?"1":"0";const e=this.ref["preview-el"];t?e.style.opacity="0":e.style.backgroundImage&&(e.style.opacity="1")}),this.sub("*networkProblems",async t=>{if(!t){const t=await this.proxyUrl(this._previewSrc()),e=this.ref["preview-el"];e.style.backgroundImage&&(e.style.backgroundImage="none",e.style.backgroundImage=`url(${t})`)}})}destroyCallback(){super.destroyCallback(),this._observer?.disconnect(),this._cancelPreload?.()}};Oa.template='\n <button type="button" role="option" l10n="@title:title-prop;@aria-label:title-prop">\n <div class="uc-preview" ref="preview-el"></div>\n <uc-icon ref="icon-el" set="@name: icon; @size: iconSize;"></uc-icon>\n </button>\n';var Ua=(t,e)=>{let r,o=!1,i=0;const n=(...n)=>{o?(r&&clearTimeout(r),r=setTimeout(()=>{Date.now()-i>=e&&(t(...n),i=Date.now())},Math.max(e-(Date.now()-i),0))):(t(...n),i=Date.now(),o=!0)};return Object.defineProperty(n,"cancel",{configurable:!1,writable:!1,enumerable:!1,value:()=>{r&&clearTimeout(r)}}),n};function Ra(t,e,r){const o=window.devicePixelRatio,i=Math.min(Math.ceil(e*o),3e3),n=o>=2?"lightest":"normal";return ri(t,Wo(ci,si(r),`quality/${n}`,`stretch/off/-/resize/${i}x`,`@clib/${Ki}/${Gi}/uc-cloud-image-editor/`))}var Pa=class extends Yi{ctxOwner=!0;_commitDebounced;_handleResizeThrottled;_imageSize={width:0,height:0};_canvas;_ctx=null;_isActive=!1;_observer;_cancelPreload;constructor(){super(),this.init$={...this.init$,image:null,"*padding":20,"*operations":{rotate:0,mirror:!1,flip:!1},"*imageBox":{x:0,y:0,width:0,height:0},"*cropBox":{x:0,y:0,width:0,height:0}},this._commitDebounced=jo(this._commit.bind(this),300),this._handleResizeThrottled=Ua(this._handleResize.bind(this),100)}_handleResize(){this.isConnected&&this._isActive&&(this._initCanvas(),this._syncTransformations(),this._alignImage(),this._alignCrop(),this._draw())}_syncTransformations(){const t=function(t,e){const r={};for(const o of e){const e=t[o];(Object.hasOwn(t,o)||void 0!==e)&&(r[o]=e)}return r}(this.$["*editorTransformations"],Object.keys(this.$["*operations"])),e={...this.$["*operations"],...t};this.$["*operations"]=e}_initCanvas(){const t=this.ref["canvas-el"],e=t.getContext("2d"),r=this.offsetWidth,o=this.offsetHeight,i=window.devicePixelRatio;t.style.width=`${r}px`,t.style.height=`${o}px`,t.width=r*i,t.height=o*i,e?.scale(i,i),this._canvas=t,this._ctx=e}_alignImage(){if(!this._isActive||!this.$.image)return;const t=this.$.image,e=this.$["*padding"],r=this.$["*operations"],{rotate:o}=r,i=this.offsetWidth,n=this.offsetHeight,a=gn({width:t.naturalWidth,height:t.naturalHeight},o);let s;if(a.width>i-2*e||a.height>n-2*e){const t=a.width/a.height;if(t>i/n){const r=i-2*e,o=r/t;s={x:0+e,y:e+(n-2*e)/2-o/2,width:r,height:o}}else{const r=n-2*e,o=r*t;s={x:e+(i-2*e)/2-o/2,y:0+e,width:o,height:r}}}else{const{width:t,height:r}=a;s={x:e+(i-2*e)/2-t/2,y:e+(n-2*e)/2-r/2,width:t,height:r}}this.$["*imageBox"]=fn(s)}_alignCrop(){let t=this.$["*cropBox"];const e=this.$["*imageBox"],r=this.$["*operations"],{rotate:o}=r,i=this.$["*editorTransformations"].crop,{width:n,x:a,y:s}=e;if(i){const{dimensions:[r,c],coords:[l,u]}=i,{width:d}=gn(this._imageSize,o),h=n/d;t=hn(fn({x:a+l*h,y:s+u*h,width:r*h,height:c*h}),e)}const c=this.$["*currentAspectRatio"],l=c?c.width/c.height:void 0;if(p=e,!((h=t).x>=p.x&&h.y>=p.y&&h.x+h.width<=p.x+p.width&&h.y+h.height<=p.y+p.height)||l&&(u=t,d=l,!(Math.abs(u.width/u.height-d)<.1))){const r=e.width/e.height;let o=e.width,i=e.height;l&&(r>l?o=Math.min(e.height*l,e.width):i=Math.min(e.width/l,e.height)),t={x:e.x+e.width/2-o/2,y:e.y+e.height/2-i/2,width:o,height:i}}var u,d,h,p;this.$["*cropBox"]=hn(fn(t),e)}_drawImage(){const t=this._ctx;if(!t)return;const e=this.$.image,r=this.$["*imageBox"],o=this.$["*operations"],{mirror:i,flip:n,rotate:a}=o,s=gn({width:r.width,height:r.height},a);t.save(),t.translate(r.x+r.width/2,r.y+r.height/2),t.rotate(a*Math.PI*-1/180),t.scale(i?-1:1,n?-1:1),t.drawImage(e,-s.width/2,-s.height/2,s.width,s.height),t.restore()}_draw(){if(!(this._isActive&&this.$.image&&this._canvas&&this._ctx))return;const t=this._canvas;this._ctx.clearRect(0,0,t.width,t.height),this._drawImage()}_animateIn({fromViewer:t}){this.$.image&&(this.ref["frame-el"].toggleThumbs(!0),this._transitionToImage(),setTimeout(()=>{this.className=ya({"uc-active_from_viewer":t,"uc-active_from_editor":!t,"uc-inactive_to_editor":!1})}))}_getCropDimensions(){const t=this.$["*cropBox"],e=this.$["*imageBox"],r=this.$["*operations"],{rotate:o}=r,{width:i,height:n}=e,{width:a,height:s}=gn(this._imageSize,o),{width:c,height:l}=t,u=i/a,d=n/s;return[bn(Math.round(c/u),1,a),bn(Math.round(l/d),1,s)]}_getCropTransformation(){const t=this.$["*cropBox"],e=this.$["*imageBox"],r=this.$["*operations"],{rotate:o}=r,{width:i,height:n,x:a,y:s}=e,{width:c,height:l}=gn(this._imageSize,o),{x:u,y:d}=t,h=i/c,p=n/l,g=this._getCropDimensions(),m={dimensions:g,coords:[bn(Math.round((u-a)/h),0,c-g[0]),bn(Math.round((d-s)/p),0,l-g[1])]};if(function(t){if(!t)return!0;const e=[({dimensions:t,coords:e})=>[...t,...e].every(t=>Number.isInteger(t)&&Number.isFinite(t)),({dimensions:t,coords:e})=>t.every(t=>t>0)&&e.every(t=>t>=0)];return e.every(e=>e(t))}(m)){if(g[0]!==c||g[1]!==l)return m}else console.error("Cropper is trying to create invalid crop object",{payload:m})}_commit(){if(!this.isConnected||!this._imageSize)return;const t=this.$["*operations"],{rotate:e,mirror:r,flip:o}=t,i=this._getCropTransformation(),n={...this.$["*editorTransformations"],crop:i,rotate:e,mirror:r,flip:o};this.$["*editorTransformations"]=n}setValue(t,e){this.$["*operations"]={...this.$["*operations"],[t]:e},this._isActive&&(this._alignImage(),this._alignCrop(),this._draw())}getValue(t){return this.$["*operations"][t]}async activate(t,{fromViewer:e}={}){if(!this._isActive){this._isActive=!0,this._imageSize=t,this.removeEventListener("transitionend",this._reset);try{const t=this.$["*originalUrl"],r=this.$["*editorTransformations"];this.$.image=await this._waitForImage(t,r),this._syncTransformations(),this._animateIn({fromViewer:e})}catch(t){console.error("Failed to activate cropper",{error:t}),this.telemetryManager.sendEventError(t,"cloud editor image. Failed to activate cropper")}this._observer=new ResizeObserver(t=>{const[e]=t;if(!e)return;e.contentRect.width>0&&e.contentRect.height>0&&this._isActive&&this.$.image&&this._handleResizeThrottled()}),this._observer.observe(this)}}deactivate({reset:t=!1}={}){this._isActive&&(!t&&this._commit(),this._isActive=!1,this._transitionToCrop(),this.className=ya({"uc-active_from_viewer":!1,"uc-active_from_editor":!1,"uc-inactive_to_editor":!0}),this.ref["frame-el"].toggleThumbs(!1),this.addEventListener("transitionend",this._reset,{once:!0}),this._observer?.disconnect())}_transitionToCrop(){const t=this._getCropDimensions(),e=this.$["*cropBox"],r=Math.min(this.offsetWidth,t[0])/e.width,o=Math.min(this.offsetHeight,t[1])/e.height,i=Math.min(r,o),n=e.x+e.width/2,a=e.y+e.height/2;this.style.transform=`scale(${i}) translate(${(this.offsetWidth/2-n)/i}px, ${(this.offsetHeight/2-a)/i}px)`,this.style.transformOrigin=`${n}px ${a}px`}_transitionToImage(){const t=this.$["*cropBox"],e=t.x+t.width/2,r=t.y+t.height/2;this.style.transform="scale(1)",this.style.transformOrigin=`${e}px ${r}px`}_reset(){this._isActive||(this.$.image=null)}async _waitForImage(t,e){const r=this.offsetWidth;e={...e,crop:void 0,rotate:void 0,flip:void 0,mirror:void 0};const o=await this.proxyUrl(Ra(t,r,e)),{promise:i,cancel:n,image:a}=Ia(o),s=this._handleImageLoading(o);return a.addEventListener("load",s,{once:!0}),a.addEventListener("error",s,{once:!0}),this._cancelPreload?.(),this._cancelPreload=n,i.then(()=>a).catch(t=>(console.error("Failed to load image",{error:t}),this.$["*networkProblems"]=!0,a))}_handleImageLoading(t){const e="crop",r=this.$["*loadingOperations"];let o=r.get(e);return o||(o=new Map,r.set(e,o)),o.get(t)||(o.set(t,!0),this.$["*loadingOperations"]=r),()=>{const o=r.get(e);o?.has(t)&&(o.delete(t),this.$["*loadingOperations"]=r)}}initCallback(){super.initCallback(),this.sub("*imageBox",()=>{this._draw()}),this.sub("*cropBox",()=>{this.$.image&&this._commitDebounced()}),this.sub("*currentAspectRatio",()=>{this._alignCrop()}),setTimeout(()=>{this.sub("*networkProblems",t=>{t||this._isActive&&this.activate(this._imageSize,{fromViewer:!1})})},0)}destroyCallback(){super.destroyCallback(),this._observer?.disconnect()}};function Na(t,e,r){const o=r-1,i=new Array(r);for(let r=o;r>=0;r-=1)i[r]=Math.ceil((r*e+(o-r)*t)/o);return i}function za(t,e){const r=yi[t].keypointsNumber,{range:o,zero:i}=yi[t];return[...new Set([...Na(o[0],i,r+1),...Na(i,o[1],r+1),i,e])].sort((t,e)=>t-e)}Pa.template='\n <canvas class="uc-canvas" ref="canvas-el"></canvas>\n <uc-crop-frame ref="frame-el"></uc-crop-frame>\n';var Da=class extends Yi{_isActive=!1;_hidden=!0;_operation="initial";_filter;_value;_transformations={};_keypoints=[];_container;_previewImage;_cancelLastImages;_cancelBatchPreload;_url;_fromViewer;_raf=0;_addKeypointDebounced=jo(this._addKeypoint.bind(this),600);constructor(){super(),this.classList.add("uc-inactive_to_cropper")}_handleImageLoading(t){const e=this._operation,r=this.$["*loadingOperations"];r.has(e)||r.set(e,new Map);const o=r.get(e);return o&&!o.get(t)&&(o.set(t,!0),this.$["*loadingOperations"]=r),()=>{const o=r.get(e);o?.has(t)&&(o.delete(t),this.$["*loadingOperations"]=r)}}_flush(){window.cancelAnimationFrame(this._raf),this._raf=window.requestAnimationFrame(()=>{for(const t of this._keypoints){const{image:e}=t;e&&(e.style.opacity=t.opacity.toString(),e.style.zIndex=t.zIndex.toString())}})}_imageSrc({url:t=this._url,filter:e=this._filter??void 0,operation:r,value:o}={}){if(!t)throw new Error("URL is not defined");const i={...this._transformations};r&&("filter"===r?e&&"number"==typeof o&&(i.filter={name:e,amount:o}):"number"==typeof o&&(i[r]=o));const n=this.offsetWidth;return this.proxyUrl(Ra(t,n,i))}async _constructKeypoint(t,e){return{src:await this._imageSrc({operation:t,value:e}),image:void 0,opacity:0,zIndex:0,value:e}}_isSame(t,e){return this._operation===t&&this._filter===e}async _addKeypoint(t,e,r){const o=()=>!this._isSame(t,e)||this._value!==r||!!this._keypoints.find(t=>t.value===r);if(o())return;const i=await this._constructKeypoint(t,r),n=new Image;n.src=i.src;const a=this._handleImageLoading(i.src);n.addEventListener("load",a,{once:!0}),n.addEventListener("error",a,{once:!0}),i.image=n,n.classList.add("uc-fader-image"),n.addEventListener("load",()=>{if(o())return;const e=this._keypoints;let a=e.findIndex(t=>t.value>r);-1===a&&(a=e.length);const s=e[a],c=s?.image,l=this._container;!l||c&&!l.contains(c)||(e.splice(a,0,i),c&&l.insertBefore(n,c),this._update(t,r))},{once:!0}),n.addEventListener("error",()=>{this.$["*networkProblems"]=!0},{once:!0})}set(t){const e="string"==typeof t?parseInt(t,10):t;(function(t){return"string"==typeof t&&t in yi})(this._operation)&&Number.isFinite(e)&&(this._update(this._operation,e),this._addKeypointDebounced(this._operation,this._filter,e))}_update(t,e){this._operation=t,this._value=e;const{zero:r}=yi[t],o=this._keypoints.map(t=>t.value),i=function(t,e,r){const o=function(t){const e=[];for(let r=0;r<t.length-1;r+=1){const o=t[r],i=t[r+1];"number"==typeof o&&"number"==typeof i&&e.push([o,i])}return e}(t).find(([t,r])=>t<=e&&e<=r);if(!o)return t.map(()=>0);const[i,n]=o;return t.map(t=>{const o=Math.abs(i-n)||1,a=Math.abs(e-i)/o;return i===t?e>r?1:1-a:n===t?e>=r?a:1:0})}(o,e,r),n=function(t,e){return t.map((r,o)=>r<e?t.length-o:o)}(o,r);this._keypoints.forEach((t,e)=>{const r=i[e],o=n[e];"number"==typeof r&&(t.opacity=r),"number"==typeof o&&(t.zIndex=o)}),this._flush()}_createPreviewImage(){const t=new Image;return t.classList.add("uc-fader-image","uc-fader-image--preview"),t.style.opacity="0",t}async _initNodes(){const t=document.createDocumentFragment();this._previewImage=this._previewImage||this._createPreviewImage();const e=this._previewImage;this.contains(e)||t.appendChild(e);const r=document.createElement("div");t.appendChild(r);const o=this._keypoints.map(t=>t.src),{images:i,promise:n,cancel:a}=Sa(o);i.forEach(t=>{const e=this._handleImageLoading(t.src);t.addEventListener("load",e),t.addEventListener("error",e)}),this._cancelLastImages=()=>{a(),this._cancelLastImages=void 0};const s=this._operation,c=this._filter;await n,this._isActive&&this._isSame(s,c)&&(this._container?.remove(),this._container=r,this._keypoints.forEach((t,e)=>{const r=i[e];r&&(r.classList.add("uc-fader-image"),t.image=r,this._container?.appendChild(r))}),this.appendChild(t),this._flush())}async setTransformations(t){if(this._transformations=t,this._previewImage){const t=await this._imageSrc(),e=this._handleImageLoading(t);this._previewImage.src=t,this._previewImage.addEventListener("load",e,{once:!0}),this._previewImage.addEventListener("error",e,{once:!0}),this._previewImage.style.opacity="1",this._previewImage.addEventListener("error",()=>{this.$["*networkProblems"]=!0},{once:!0})}}async preload({url:t,filter:e,operation:r,value:o}){if(!r||"number"!=typeof o)return;this._cancelBatchPreload?.();const i=za(r,o),n=await Promise.all(i.map(o=>this._imageSrc({url:t,filter:e,operation:r,value:o}))),{cancel:a}=Sa(n);this._cancelBatchPreload=a}_setOriginalSrc(t){const e=this._previewImage||this._createPreviewImage();if(this.contains(e)||this.appendChild(e),this._previewImage=e,e.src===t)return e.style.opacity="1",e.style.transform="scale(1)",void(this.className=ya({"uc-active_from_viewer":this._fromViewer,"uc-active_from_cropper":!this._fromViewer,"uc-inactive_to_cropper":!1}));e.style.opacity="0";const r=this._handleImageLoading(t);e.addEventListener("error",r,{once:!0}),e.src=t,e.addEventListener("load",()=>{r(),e&&(e.style.opacity="1",e.style.transform="scale(1)",this.className=ya({"uc-active_from_viewer":this._fromViewer,"uc-active_from_cropper":!this._fromViewer,"uc-inactive_to_cropper":!1}))},{once:!0}),e.addEventListener("error",()=>{this.$["*networkProblems"]=!0},{once:!0})}async activate({url:t,operation:e,value:r,filter:o,fromViewer:i}){this._isActive=!0,this._hidden=!1,this._url=t,this._operation=e??"initial",this._value=r,this._filter=o,this._fromViewer=i;if("number"!=typeof r&&!o){const t=await this._imageSrc({operation:e,value:r});return this._setOriginalSrc(t),void this._container?.remove()}e&&"number"==typeof r&&(this._keypoints=await Promise.all(za(e,r).map(t=>this._constructKeypoint(e,t))),this._update(e,r),this._initNodes())}deactivate({hide:t=!0}={}){this._isActive=!1,this._cancelLastImages?.(),this._cancelBatchPreload?.(),t&&!this._hidden?(this._hidden=!0,this._previewImage&&(this._previewImage.style.transform="scale(1)"),this.className=ya({"uc-active_from_viewer":!1,"uc-active_from_cropper":!1,"uc-inactive_to_cropper":!0}),this.addEventListener("transitionend",()=>{this._container?.remove()},{once:!0})):this._container?.remove()}},Fa=class extends Ca{_operation="";initCallback(){super.initCallback(),this.$["on.click"]=t=>{this.$["*sliderEl"].setOperation(this._operation),this.$["*showSlider"]=!0,this.$["*currentOperation"]=this._operation,this.telemetryManager.sendEventCloudImageEditor(t,this.$["*tabId"],{operation:La(this.$["*operationTooltip"])})},this.defineAccessor("operation",t=>{t&&(this._operation=t,this.$.icon=t,this.bindL10n("title-prop",()=>this.l10n("a11y-cloud-editor-apply-tuning",{name:this.l10n(t).toLowerCase()})),this.bindL10n("title",()=>this.l10n(t)))}),this.sub("*editorTransformations",t=>{if(!this._operation)return;const{zero:e}=yi[this._operation],r=t[this._operation],o=void 0!==r&&r!==e;this.$.active=o})}},Va=class extends Yi{initCallback(){super.initCallback(),this.addEventListener("wheel",t=>{t.preventDefault();const{deltaY:e,deltaX:r}=t;Math.abs(r)>1?this.scrollLeft+=r:this.scrollLeft+=e},{passive:!1}),this.addEventListener("scroll",()=>{},{passive:!0})}};Va.template=" <slot></slot> ";var Ba=class extends Yi{_debouncedShowLoader;_cancelPreload;_updateInfoTooltip;constructor(){super(),this.init$={...this.init$,"*sliderEl":null,"*listAspectRatioEl":null,"*loadingOperations":new Map,"*showSlider":!1,"*showListAspectRatio":!1,hideSliderOrList:!1,"*currentFilter":Ma,"*currentOperation":null,showLoader:!1,filters:fi,colorOperations:mi,cropOperations:bi,"*operationTooltip":null,"presence.mainToolbar":!0,"presence.subToolbar":!1,"presence.tabToggles":!0,"presence.tabContent.crop":!1,"presence.tabContent.tuning":!1,"presence.tabContent.filters":!1,"presence.tabToggle.crop":!0,"presence.tabToggle.tuning":!0,"presence.tabToggle.filters":!0,"presence.subTopToolbarStyles":{hidden:"uc-sub-toolbar--top-hidden",visible:"uc-sub-toolbar--visible"},"presence.subBottomToolbarStyles":{hidden:"uc-sub-toolbar--bottom-hidden",visible:"uc-sub-toolbar--visible"},"presence.tabContentStyles":{hidden:"uc-tab-content--hidden",visible:"uc-tab-content--visible"},"presence.tabToggleStyles":{hidden:"uc-tab-toggle--hidden",visible:"uc-tab-toggle--visible"},"presence.tabTogglesStyles":{hidden:"uc-tab-toggles--hidden",visible:"uc-tab-toggles--visible"},"on.cancel":t=>{this.telemetryManager.sendEventCloudImageEditor(t,this.$["*tabId"],{action:"cancel"}),this._cancelPreload?.();(0,this.$["*on.cancel"])()},"on.apply":t=>{this.telemetryManager.sendEventCloudImageEditor(t,this.$["*tabId"],{action:"apply"});(0,this.$["*on.apply"])(this.$["*editorTransformations"])},"on.applySlider":t=>{this.telemetryManager.sendEventCloudImageEditor(t,this.$["*tabId"],{action:"apply-slider",operation:La(this.$["*operationTooltip"])});this.ref["slider-el"].apply(),this._onSliderClose()},"on.cancelSlider":t=>{this.telemetryManager.sendEventCloudImageEditor(t,this.$["*tabId"],{action:"cancel-slider"});this.ref["slider-el"].cancel(),this._onSliderClose()},"on.clickTab":t=>{const e=t.currentTarget,r=e?.getAttribute("data-id");r&&(this.telemetryManager.sendEventCloudImageEditor(t,r),this._activateTab(r,{fromViewer:!1}))},tab_role:"tab",[`tab_${pi.TUNING}`]:`tab_${pi.TUNING}`,[`tab_${pi.CROP}`]:`tab_${pi.CROP}`,[`tab_${pi.FILTERS}`]:`tab_${pi.FILTERS}`,cancel:"cancel",apply:"apply","a11y-editor-tab-filters":"a11y-editor-tab-filters","a11y-editor-tab-tuning":"a11y-editor-tab-tuning","a11y-editor-tab-crop":"a11y-editor-tab-crop"},this._debouncedShowLoader=jo(this._showLoader.bind(this),500),this._updateInfoTooltip=jo(this._updateInfoTooltipHandler.bind(this),0)}_onSliderClose(){if(this.$["*showSlider"]=!1,this.$["*tabId"]===pi.CROP&&(this.$["*showListAspectRatio"]=!1),this.$["*tabId"]===pi.TUNING){this.ref["tooltip-el"].classList.toggle("uc-info-tooltip_visible",!1)}}_createOperationControl(t){const e=new Fa;return e.operation=t,e}_createFilterControl(t){const e=new Oa;return e.filter=t,e}_createToggleControl(t){const e=new Aa;return e.operation=t,e}_createAspectRatioControl(t){const e=new Ta;return e.aspectRatio=t,e}_createFreeformControl(){return new Ea}_clearListAspectRatio(){const t=this.$["*listAspectRatioEl"];t&&(t.innerHTML="")}_renderControlsList(t){const e=this.ref[`controls-list-${t}`],r=document.createDocumentFragment();if(this._clearListAspectRatio(),t===pi.CROP){const t=this.$["*cropPresetList"],e=t.length>=3;if(e){const t=this._createFreeformControl();r.appendChild(t)}for(const o of t){const t=this._createAspectRatioControl(o);if(r.appendChild(t),e){const e=this.$["*listAspectRatioEl"];e?.appendChild(t)}}for(const t of this.$.cropOperations){const e=this._createToggleControl(t);r.appendChild(e)}}else if(t===pi.FILTERS){const t=this.$.filters;[Ma,...t].forEach(t=>{const e=this._createFilterControl(t);r.appendChild(e)})}else if(t===pi.TUNING)for(const t of this.$.colorOperations){const e=this._createOperationControl(t);r.appendChild(e)}[...r.children].forEach((t,e)=>{e===r.childNodes.length-1&&t.classList.add("uc-controls-list_last-item")}),e.innerHTML="",e.appendChild(r)}_activateTab(t,{fromViewer:e}={}){this.$["*tabId"]=t;const r=this.$["*faderEl"],o=this.$["*cropperEl"];t===pi.CROP?(r?.deactivate(),o?.activate(this.$["*imageSize"],{fromViewer:e})):(r?.activate({url:this.$["*originalUrl"],fromViewer:e}),o?.deactivate());for(const e of gi){const r=e===t;this.ref[`tab-toggle-${e}`].active=r,r?(this._renderControlsList(t),this._syncTabIndicator()):this._unmountTabControls(e),this.$[`presence.tabContent.${e}`]=r}}_unmountTabControls(t){const e=this.ref[`controls-list-${t}`];e&&(e.innerHTML="")}_syncTabIndicator(){const t=this.ref[`tab-toggle-${this.$["*tabId"]}`];this.ref["tabs-indicator"].style.transform=`translateX(${t.offsetLeft}px)`}async _preloadEditedImage(){if(this.$["*imgContainerEl"]&&this.$["*originalUrl"]){const t=this.$["*imgContainerEl"].offsetWidth,e=await this.proxyUrl(Ra(this.$["*originalUrl"],t,this.$["*editorTransformations"]));this._cancelPreload?.();const{cancel:r}=Sa([e]);this._cancelPreload=()=>{r(),this._cancelPreload=void 0}}}_showLoader(t){this.$.showLoader=t}_updateInfoTooltipHandler(){const t=this.$["*editorTransformations"],e=this.$["*currentOperation"];let r="",o=!1;if(this.$["*tabId"]===pi.FILTERS)if(o=!0,this.$["*currentFilter"]&&t?.filter?.name===this.$["*currentFilter"]){const e=t?.filter?.amount||100;r=`${this.$["*currentFilter"]} ${e}`}else r=this.l10n(Ma);else if(this.$["*tabId"]===pi.TUNING&&e){o=!0;const i=t?.[e]||yi[e].zero;r=`${this.l10n(e)} ${i}`}o&&(this.$["*operationTooltip"]=r),this.ref["tooltip-el"].classList.toggle("uc-info-tooltip_visible",o)}initCallback(){super.initCallback(),this.$["*sliderEl"]=this.ref["slider-el"],this.$["*listAspectRatioEl"]=this.ref["list-el"],this.sub("*imageSize",t=>{t&&setTimeout(()=>{this._activateTab(this.$["*tabId"],{fromViewer:!0})},0)}),this.sub("*editorTransformations",t=>{const e=t?.filter?.name;this.$["*currentFilter"]!==e&&(this.$["*currentFilter"]=e)}),this.sub("*currentFilter",()=>{this._updateInfoTooltip()}),this.sub("*currentOperation",()=>{this._updateInfoTooltip()}),this.sub("*tabId",()=>{this._updateInfoTooltip()}),this.sub("*originalUrl",()=>{this.$["*faderEl"]?.deactivate()}),this.sub("*editorTransformations",t=>{this._preloadEditedImage(),this.$["*faderEl"]?.setTransformations(t)}),this.sub("*loadingOperations",t=>{let e=!1;for(const[,r]of t.entries()){if(e)break;for(const[,t]of r.entries())if(t){e=!0;break}}this._debouncedShowLoader(e)}),this.sub("*showSlider",t=>{this.$["presence.subToolbar"]=t,this.$["presence.mainToolbar"]=!t,this.$.hideSliderOrList=!0}),this.sub("*showListAspectRatio",t=>{this.$["presence.subToolbar"]=t,this.$["presence.mainToolbar"]=!t,this.$.hideSliderOrList=!1}),this.sub("*tabList",t=>{this.$["presence.tabToggles"]=t.length>1;for(const e of gi){this.$[`presence.tabToggle.${e}`]=t.includes(e);this.ref[`tab-toggle-${e}`].style.gridColumn=`${t.indexOf(e)+1}`}if(!t.includes(this.$["*tabId"])&&t.length>0){const[e]=t;e&&this._activateTab(e,{fromViewer:!1})}}),this._updateInfoTooltip()}destroyCallback(){this.$["*showSlider"]=!1,this.$["*showListAspectRatio"]=!1}};Ba.template=`\n <uc-line-loader-ui set="active: showLoader"></uc-line-loader-ui>\n <div class="uc-info-tooltip_container">\n <div class="uc-info-tooltip_wrapper">\n <div ref="tooltip-el" class="uc-info-tooltip uc-info-tooltip_hidden">{{*operationTooltip}}</div>\n </div>\n </div>\n <div class="uc-toolbar-container">\n <uc-presence-toggle\n role="tablist"\n class="uc-sub-toolbar"\n set="visible: presence.mainToolbar; styles: presence.subTopToolbarStyles"\n >\n <div class="uc-tab-content-row">${gi.map(function(t){return`\n <uc-presence-toggle\n id="tab_${t}"\n class="uc-tab-content"\n set="visible: presence.tabContent.${t}; styles: presence.tabContentStyles"\n >\n <uc-editor-scroller hidden-scrollbar>\n <div class="uc-controls-list_align">\n <div\n role="listbox"\n aria-orientation="horizontal"\n class="uc-controls-list_inner"\n ref="controls-list-${t}"\n ></div>\n </div>\n </uc-editor-scroller>\n </uc-presence-toggle>\n `}).join("")}</div>\n <div class="uc-controls-row">\n <uc-presence-toggle\n class="uc-tab-toggles"\n set="visible: presence.tabToggles; styles: presence.tabTogglesStyles"\n >\n <div ref="tabs-indicator" class="uc-tab-toggles_indicator"></div>\n ${gi.map(function(t){return`\n <uc-presence-toggle\n class="uc-tab-toggle"\n set="visible: presence.tabToggle.${t}; styles: presence.tabToggleStyles;"\n >\n <uc-btn-ui\n theme="tab"\n ref="tab-toggle-${t}"\n data-id="${t}"\n icon="${t}"\n set="onclick: on.clickTab; aria-role:tab_role; aria-controls:tab_${t}; title-prop: a11y-editor-tab-${t}"\n >\n </uc-btn-ui>\n </uc-presence-toggle>\n `}).join("")}\n </uc-presence-toggle>\n <uc-btn-ui style="order: -1" theme="secondary-icon" icon="closeMax" set="onclick: on.cancel; title-prop:cancel">\n </uc-btn-ui>\n <uc-btn-ui theme="primary-icon" icon="done" set="onclick: on.apply; title-prop:apply"> </uc-btn-ui>\n </div>\n </uc-presence-toggle>\n <uc-presence-toggle\n class="uc-sub-toolbar"\n set="visible: presence.subToolbar; styles: presence.subBottomToolbarStyles"\n >\n <div class="uc-slider" set="@hidden:!hideSliderOrList">\n <uc-editor-slider ref="slider-el"></uc-editor-slider>\n </div>\n\n <div set="@hidden:hideSliderOrList" class="uc-list-aspect-ratio-container">\n <div class="uc-list-aspect-ratio" ref="list-el"></div>\n </div>\n <div class="uc-controls-row">\n <uc-btn-ui theme="secondary" set="onclick: on.cancelSlider" l10n="@text:cancel"> </uc-btn-ui>\n <uc-btn-ui theme="primary" set="onclick: on.applySlider" l10n="@text:apply"> </uc-btn-ui>\n </div>\n </uc-presence-toggle>\n </div>\n`;var ja=class extends Yi{_iconReversed=!1;_iconSingle=!1;_iconHidden=!1;constructor(){super(),this.init$={...this.init$,text:"",icon:"",iconCss:this._iconCss(),theme:null,"aria-role":"","aria-controls":"","title-prop":""},this.defineAccessor("active",t=>{t?this.setAttribute("active",""):this.removeAttribute("active")})}_iconCss(){return ya("uc-icon",{"uc-icon_left":!this._iconReversed,"uc-icon_right":this._iconReversed,"uc-icon_hidden":this._iconHidden,"uc-icon_single":this._iconSingle})}initCallback(){super.initCallback(),this.sub("icon",t=>{this._iconSingle=!this.$.text,this._iconHidden=!t,this.$.iconCss=this._iconCss()}),this.sub("theme",t=>{t&&"custom"!==t&&(this.className=`uc-${t}`)}),this.sub("text",()=>{this._iconSingle=!1}),this.hasAttribute("theme")||this.setAttribute("theme","default"),this.defineAccessor("aria-role",t=>{this.$["aria-role"]=t||""}),this.defineAccessor("aria-controls",t=>{this.$["aria-controls"]=t||""}),this.defineAccessor("title-prop",t=>{this.$["title-prop"]=t||""})}set reverse(t){this.hasAttribute("reverse")?(this.style.flexDirection="row-reverse",this._iconReversed=!0):(this._iconReversed=!1,this.style.flexDirection="")}};ja.bindAttributes({text:"text",icon:"icon",reverse:"reverse",theme:"theme"}),ja.template='\n <button\n type="button"\n set="@role:aria-role; @aria-controls: aria-controls; @aria-label:title-prop"\n l10n="@title:title-prop;"\n >\n <uc-icon set="className: iconCss; @name: icon; @hidden: !icon"></uc-icon>\n <div class="uc-text">{{text}}</div>\n </button>\n';var Ha=class extends Yi{_active=!1;_handleTransitionEndRight=()=>{const t=this.ref["line-el"];t.style.transition="initial",t.style.opacity="0",t.style.transform="translateX(-101%)",this._active&&this._start()};initCallback(){super.initCallback(),this.defineAccessor("active",t=>{"boolean"==typeof t&&(t?this._start():this._stop())})}_start(){this._active=!0;const{width:t}=this.getBoundingClientRect(),e=this.ref["line-el"];e.style.transition="transform 1s",e.style.opacity="1",e.style.transform=`translateX(${t}px)`,e.addEventListener("transitionend",this._handleTransitionEndRight,{once:!0})}_stop(){this._active=!1}};Ha.template='\n <div class="uc-inner">\n <div class="uc-line" ref="line-el"></div>\n </div>\n';var qa="uc-transition",Ka="uc-visible",Ga="uc-hidden",Wa=class extends Yi{_visible=!1;_visibleStyle=Ka;_hiddenStyle=Ga;_externalTransitions=!1;constructor(){super(),this.defineAccessor("styles",t=>{t&&(this._externalTransitions=!0,this._visibleStyle=t.visible??Ka,this._hiddenStyle=t.hidden??Ga)}),this.defineAccessor("visible",t=>{"boolean"==typeof t&&(this._visible=t,this._handleVisible())})}_handleVisible(){this.style.visibility=this._visible?"inherit":"hidden",function(t,...e){const r=va(...e);for(const e of Object.keys(r))t.classList.toggle(e,Boolean(r[e]))}(this,{[qa]:!this._externalTransitions,[this._visibleStyle]:this._visible,[this._hiddenStyle]:!this._visible}),this.setAttribute("aria-hidden",this._visible?"false":"true")}initCallback(){super.initCallback(),this.classList.toggle("uc-initial",!0),this._externalTransitions||this.classList.add(qa),this._handleVisible(),setTimeout(()=>{this.classList.toggle("uc-initial",!1)},0)}};Wa.template="<slot></slot> ";var Za=class extends Yi{_observer;_thumbSize=0;_zero=0;_zeroDotEl;_stepsCount;constructor(){super(),this.init$={...this.init$,disabled:!1,min:0,max:100,onInput:null,onChange:null,defaultValue:0,"on.sliderInput":()=>{const t=Number.parseInt(this._inputEl().value,10);this._updateValue(t),this.$.onInput?.(t)},"on.sliderChange":()=>{const t=Number.parseInt(this._inputEl().value,10);this.$.onChange?.(t)}},this.setAttribute("with-effects","")}initCallback(){super.initCallback(),this.defineAccessor("disabled",t=>{this.$.disabled=t}),this.defineAccessor("min",t=>{this.$.min=t}),this.defineAccessor("max",t=>{this.$.max=t}),this.defineAccessor("defaultValue",t=>{this.$.defaultValue=t;this._inputEl().value=String(t),this._updateValue(t)}),this.defineAccessor("zero",t=>{this._zero=t}),this.defineAccessor("onInput",t=>{t&&(this.$.onInput=t)}),this.defineAccessor("onChange",t=>{t&&(this.$.onChange=t)}),this._updateSteps(),this._observer=new ResizeObserver(()=>{this._updateSteps();const t=Number.parseInt(this._inputEl().value,10);this._updateValue(t)}),this._observer.observe(this),this._thumbSize=Number.parseInt(window.getComputedStyle(this).getPropertyValue("--l-thumb-size"),10),setTimeout(()=>{const t=Number.parseInt(this._inputEl().value,10);this._updateValue(t)},0),this.sub("disabled",t=>{const e=this._inputEl();t?e.setAttribute("disabled","disabled"):e.removeAttribute("disabled")});const t=this._inputEl();t.addEventListener("focus",()=>{this.style.setProperty("--color-effect","var(--hover-color-rgb)")}),t.addEventListener("blur",()=>{this.style.setProperty("--color-effect","var(--idle-color-rgb)")})}_inputEl(){return this.ref["input-el"]}_thumbEl(){return this.ref["thumb-el"]}_stepsEl(){return this.ref["steps-el"]}_updateValue(t){this._updateZeroDot(t);const{width:e}=this.getBoundingClientRect(),r=100/(this.$.max-this.$.min)*(t-this.$.min)*(e-this._thumbSize)/100;window.requestAnimationFrame(()=>{this._thumbEl().style.transform=`translateX(${r}px)`})}_updateZeroDot(t){if(!this._zeroDotEl)return;this._zeroDotEl.style.opacity=t===this._zero?"0":"1";const{width:e}=this.getBoundingClientRect(),r=100/(this.$.max-this.$.min)*(this._zero-this.$.min)*(e-this._thumbSize)/100;window.requestAnimationFrame(()=>{this._zeroDotEl&&(this._zeroDotEl.style.transform=`translateX(${r}px)`)})}_updateSteps(){const t=this._stepsEl(),{width:e}=t.getBoundingClientRect(),r=Math.ceil(e/2),o=Math.ceil(r/15)-2;if(this._stepsCount===o)return;const i=document.createDocumentFragment(),n=document.createElement("div"),a=document.createElement("div");n.className="uc-minor-step",a.className="uc-border-step",i.appendChild(a);for(let t=0;t<o;t+=1)i.appendChild(n.cloneNode());i.appendChild(a.cloneNode());for(let t=0;t<o;t+=1)i.appendChild(n.cloneNode());i.appendChild(a.cloneNode());const s=document.createElement("div");s.className="uc-zero-dot",i.appendChild(s),this._zeroDotEl=s,t.innerHTML="",t.appendChild(i),this._stepsCount=o}destroyCallback(){super.destroyCallback(),this._observer?.disconnect()}};Za.template='\n <div class="uc-steps" ref="steps-el"></div>\n <div ref="thumb-el" class="uc-thumb"></div>\n <input\n class="uc-input"\n type="range"\n ref="input-el"\n set="oninput: on.sliderInput; onchange: on.sliderChange; @min: min; @max: max; @value: defaultValue;"\n />\n';var Xa=class extends la{couldBeCtxOwner=!0;activityType=tn.activities.CLOUD_IMG_EDIT;_entry;_instance;get activityParams(){const t=super.activityParams;if("internalId"in t)return t;throw new Error("Cloud Image Editor activity params not found")}initCallback(){super.initCallback(),this.registerActivity(this.activityType,{onActivate:()=>this.mountEditor(),onDeactivate:()=>this.unmountEditor()}),this.subConfigValue("cropPreset",t=>{this._instance&&this._instance.getAttribute("crop-preset")!==t&&this._instance.setAttribute("crop-preset",t)}),this.subConfigValue("cloudImageEditorTabs",t=>{this._instance&&this._instance.getAttribute("tabs")!==t&&this._instance.setAttribute("tabs",t)})}handleApply(t){if(!this._entry)return;const e=t.detail;this._entry.setMultipleValues({cdnUrl:e.cdnUrl,cdnUrlModifiers:e.cdnUrlModifiers}),this.modalManager?.close(tn.activities.CLOUD_IMG_EDIT),this.historyBack()}handleCancel(){this.modalManager?.close(tn.activities.CLOUD_IMG_EDIT),this.historyBack()}mountEditor(){const{internalId:t}=this.activityParams,e=this.uploadCollection.read(t);if(!e)throw new Error(`Entry with internalId "${t}" not found`);this._entry=e;const r=this._entry.getValue("cdnUrl");if(!r)throw new Error(`Entry with internalId "${t}" hasn't uploaded yet`);const o=new ka,i=this.cfg.cropPreset,n=this.cfg.cloudImageEditorTabs;o.setAttribute("ctx-name",this.ctxName),o.setAttribute("cdn-url",r),i&&o.setAttribute("crop-preset",i),n&&o.setAttribute("tabs",n),o.addEventListener("apply",t=>{const e=t;this.handleApply(e),this.debugPrint('editor event "apply"',e.detail)}),o.addEventListener("cancel",t=>{const e=t;this.handleCancel(),this.debugPrint('editor event "cancel"',e.detail)}),o.addEventListener("change",t=>{const e=t;this.debugPrint('editor event "change"',e.detail)}),this.innerHTML="",this.appendChild(o),this._instance=o}unmountEditor(){this._instance=void 0,this._entry=void 0,this.innerHTML=""}},Ya=t=>t.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g)?.map(t=>t.toLowerCase()).join("-"),Ja=[{test:t=>!!t.accept&&!!t.imgOnly,message:"There could be a mistake.\nBoth `accept` and `imgOnly` parameters are set.\nThe value of `accept` will be concatenated with the internal image mime types list."},{test:t=>null!==t.enableVideoRecording,message:"The `enableVideoRecording` parameter is deprecated and will be removed in the next major release.\nPlease use the `cameraModes` parameter instead."},{test:t=>null!==t.defaultCameraMode,message:"The `defaultCameraMode` parameter is deprecated and will be removed in the next major release.\nPlease use the `cameraModes` parameter instead."}],Qa=jo(t=>{for(const{test:e,message:r}of Ja)e(t)&&na(r)},0),ts=t=>t instanceof Promise||Boolean(t&&"object"==typeof t&&"then"in t&&"function"==typeof t.then),es=[{key:"cameraModes",deps:["enableVideoRecording"],fn:({cameraModes:t,enableVideoRecording:e})=>{if(null===e)return t;let r=Ho(t);return e&&!r.includes("video")?r=r.concat("video"):e||(r=r.filter(t=>"video"!==t)),qo(r)}},{key:"cameraModes",deps:["defaultCameraMode"],fn:({cameraModes:t,defaultCameraMode:e})=>{if(null===e)return t;let r=Ho(t);return r=r.sort((t,r)=>t===e?-1:r===e?1:0),qo(r)}},{key:"cdnCname",deps:["pubkey","cdnCnamePrefixed"],fn:({pubkey:t,cdnCname:e,cdnCnamePrefixed:r})=>t&&(e===wi||((t,e)=>{try{const r=new URL(t),o=new URL(e);return r.hostname.endsWith(o.hostname)}catch{return!1}})(e,r))?lo(t,r):e}],rs=({key:t,setValue:e,getValue:r,computationControllers:o})=>{for(const i of es)if(i.deps.includes(t)){const t={[i.key]:r(i.key)};for(const e of i.deps)t[e]=r(e);const n=new AbortController;let a;o.get(i.key)?.abort(),o.set(i.key,n);try{a=i.fn(t,{signal:n.signal})}catch(t){return o.get(i.key)===n&&o.delete(i.key),void console.error(`Failed to compute value for "${i.key}"`,t)}ts(a)?a.then(t=>{n.signal.aborted||e(i.key,t)}).catch(t=>{n.signal.aborted||console.error(`Failed to compute value for "${i.key}"`,t)}).finally(()=>{o.get(i.key)===n&&o.delete(i.key)}):e(i.key,a)}},os=t=>String(t),is=t=>{const e=Number(t);if(Number.isNaN(e))throw new Error(`Invalid number: "${t}"`);return e},ns=t=>{if(null==t)return!1;if("boolean"==typeof t)return t;if("true"===t)return!0;if(""===t)return!0;if("false"===t)return!1;throw new Error(`Invalid boolean: "${t}"`)},as=t=>{if("object"==typeof t)return t;throw new Error("Invalid value. Must be an object.")},ss=t=>{if("function"==typeof t)return t;throw new Error("Invalid value. Must be a function.")},cs=t=>{if(Array.isArray(t))return t;throw new Error("Must be an array.")},ls={pubkey:os,multiple:ns,multipleMin:is,multipleMax:is,confirmUpload:ns,imgOnly:ns,accept:os,externalSourcesPreferredTypes:os,externalSourcesEmbedCss:os,store:t=>"auto"===t?t:ns(t),cameraMirror:ns,cameraCapture:t=>{const e=os(t);if("user"!==e&&"environment"!==e&&""!==e)throw new Error(`Invalid value: "${e}"`);return e},sourceList:os,topLevelOrigin:os,maxLocalFileSizeBytes:is,thumbSize:is,showEmptyList:ns,useLocalImageEditor:ns,useCloudImageEditor:ns,cloudImageEditorTabs:os,removeCopyright:ns,cropPreset:os,imageShrink:os,modalScrollLock:ns,modalBackdropStrokes:ns,sourceListWrap:ns,remoteTabSessionKey:os,cdnCname:os,cdnCnamePrefixed:os,baseUrl:os,socialBaseUrl:os,secureSignature:os,secureExpire:os,secureDeliveryProxy:os,retryThrottledRequestMaxTimes:is,retryNetworkErrorMaxTimes:is,multipartMinFileSize:is,multipartChunkSize:is,maxConcurrentRequests:is,multipartMaxConcurrentRequests:is,multipartMaxAttempts:is,checkForUrlDuplicates:ns,saveUrlForRecurrentUploads:ns,groupOutput:ns,userAgentIntegration:os,debug:ns,localeName:os,metadata:t=>{if("object"==typeof t&&!Array.isArray(t))return t;if("function"==typeof t)return t;throw new Error("Invalid metadata value. Must be an object or function.")},secureUploadsExpireThreshold:is,localeDefinitionOverride:t=>as(t),secureUploadsSignatureResolver:t=>ss(t),secureDeliveryProxyUrlResolver:t=>ss(t),iconHrefResolver:t=>ss(t),fileValidators:cs,collectionValidators:cs,validationTimeout:is,validationConcurrency:is,cameraModes:t=>{const e=os(t),r=Ho(e);if(r.some(t=>!Object.values(Qn).includes(t)))throw new Error(`Invalid value: "${JSON.stringify(r)}"`);return e},defaultCameraMode:t=>{const e=os(t);if(!Object.values(Qn).includes(e))throw new Error(`Invalid value: "${e}"`);return e},enableAudioRecording:ns,enableVideoRecording:ns,mediaRecorderOptions:as,maxVideoRecordingDuration:is,filesViewMode:t=>{const e=os(t);if(["grid","list"].includes(e))return e;throw new Error(`Invalid value: "${e}"`)},gridShowFileNames:ns,cloudImageEditorAutoOpen:ns,cloudImageEditorMaskHref:os,testMode:ns,qualityInsights:ns},us=[...new Set(["debug",...Object.keys(ki)])],ds=["metadata","localeDefinitionOverride","secureUploadsSignatureResolver","secureDeliveryProxyUrlResolver","iconHrefResolver","fileValidators","collectionValidators","mediaRecorderOptions"],hs=t=>ds.includes(t),ps=us.filter(t=>!hs(t)),gs={...Object.fromEntries(ps.map(t=>[Ya(t),t])),...Object.fromEntries(ps.map(t=>[t.toLowerCase(),t]))},ms={...Object.fromEntries(ps.map(t=>[Ya(t),Zi(t)])),...Object.fromEntries(ps.map(t=>[t.toLowerCase(),Zi(t)]))},fs=t=>`__${t}`,bs=class extends Yi{requireCtxName=!0;constructor(){super(),this.init$={...this.init$,...Object.fromEntries(Object.entries(ki).map(([t,e])=>[Zi(t),e])),computationControllers:new Map}}_flushValueToAttribute(t,e){if(!hs(t)){const r=[...new Set([Ya(t),t.toLowerCase()])];for(const t of r)null==e?this.removeAttribute(t):this.getAttribute(t)!==e.toString()&&this.setAttribute(t,e.toString())}}_flushValueToState(t,e){this.$[Zi(t)]!==e&&(this.$[Zi(t)]=null==e?ki[t]:e)}_setValue(t,e){const r=this,o=((t,e)=>{if(null!=e)try{return ls[t](e)}catch(e){return console.error(`Invalid value for config key "${t}".`,e),ki[t]}})(t,e),i=fs(t);r[i]!==o&&(this._assertSameValueDifferentReference(t,r[i],o),r[i]=o,this._flushValueToAttribute(t,o),this._flushValueToState(t,o),this.debugPrint(`[uc-config] "${t}"`,o),Qa(this.cfg))}_getValue(t){return this[fs(t)]??this.$[Zi(t)]}_assertSameValueDifferentReference(t,e,r){this.cfg.debug&&r!==e&&"object"==typeof r&&"object"==typeof e&&JSON.stringify(r)===JSON.stringify(e)&&(console.warn(`[uc-config] Option "${t}" value is the same as the previous one but the reference is different`),console.warn("[uc-config] You should avoid changing the reference of the object to prevent unnecessary calculations"),console.warn(`[uc-config] "${t}" previous value:`,e),console.warn(`[uc-config] "${t}" new value:`,r))}initCallback(){super.initCallback();const t=this;for(const t of ps)this.sub(Zi(t),e=>{this._setValue(t,e)},!1);for(const e of us){const r=t[e]??this.$[Zi(e)];r!==ki[e]&&this._setValue(e,r),Object.defineProperty(this,e,{set:t=>{this._setValue(e,t)},get:()=>this._getValue(e)})}for(const t of us)this.sub(Zi(t),()=>{rs({key:t,setValue:this._setValue.bind(this),getValue:this._getValue.bind(this),computationControllers:this.computationControllers})})}attributeChangedCallback(t,e,r){if(e===r)return;const o=this,i=gs[t];i&&(o[i]=r)}get computationControllers(){return this.$.computationControllers}};bs.bindAttributes(ms);for(const t of us)bs.prototype[t]=void 0;var vs=class extends Yi{initCallback(){super.initCallback(),this.subConfigValue("removeCopyright",t=>{this.toggleAttribute("hidden",!!t)})}static template='\n <a\n href="https://uploadcare.com/?utm_source=copyright&utm_medium=referral&utm_campaign=v4"\n target="_blank noopener"\n class="uc-credits"\n >Powered by Uploadcare</a\n >\n '};function ys(t){return new Promise(e=>{"function"!=typeof window.FileReader&&e(!1);try{const r=new FileReader;r.onerror=()=>{e(!0)};const o=t=>{"loadend"!==t.type&&r.abort(),e(!1)};r.onloadend=o,r.onprogress=o,r.readAsDataURL(t)}catch{e(!1)}})}function ws(t,e){return new Promise(r=>{let o=0;const i=[],n=t=>{if(!t)return console.warn("Unexpectedly received empty content entry",{scope:"drag-and-drop"}),void r(null);t.isFile?(o++,t.file(n=>{o--;const a=new File([n],n.name,{type:n.type||e});i.push({type:"file",file:a,fullPath:t.fullPath}),0===o&&r(i)})):t.isDirectory&&a(t.createReader())},a=t=>{o++,t.readEntries(t=>{o--;for(const e of t)n(e);0===o&&r(i)})};n(t)})}var _s=Object.freeze({ACTIVE:0,INACTIVE:1,NEAR:2,OVER:3}),ks=["focus"],xs=new Map;function Cs(t){let e=0;const r=document.body,o=new Set;let i=_s.INACTIVE;const n=e=>{t.shouldIgnore()&&e!==_s.INACTIVE||(i!==e&&o.forEach(t=>{t(e)}),i=e)},a=()=>e>0;var s;s=e=>t.onChange(e),o.add(s);const c=()=>{e=0,n(_s.INACTIVE)},l=()=>{e+=1,i===_s.INACTIVE&&n(_s.ACTIVE)},u=()=>{e-=1,a()||n(_s.INACTIVE)},d=t=>{t.preventDefault(),e=0,n(_s.INACTIVE)},h=r=>{if(t.shouldIgnore())return;a()||(e+=1);const o=[r.x,r.y],i=t.element.getBoundingClientRect(),s=Math.floor(function(t,e){const r=Math.max(Math.min(t[0],e.x+e.width),e.x),o=Math.max(Math.min(t[1],e.y+e.height),e.y);return Math.sqrt((t[0]-r)*(t[0]-r)+(t[1]-o)*(t[1]-o))}(o,i)),c=s<100,l=r.composedPath().includes(t.element);xs.set(t.element,s);const u=Math.min(...xs.values())===s;l&&u?(r.preventDefault(),n(_s.OVER)):n(c&&u?_s.NEAR:_s.ACTIVE)},p=async e=>{if(t.shouldIgnore())return;e.preventDefault();const{dataTransfer:r}=e;if(!r)return;const o=await function(t){const e=[],r=[];for(let o=0;o<t.items.length;o++){const i=t.items[o];if(i)if("file"===i.kind){const t=i.type,o=i;if("function"==typeof o.webkitGetAsEntry||"function"==typeof o.getAsEntry){const i="function"==typeof o.webkitGetAsEntry?o.webkitGetAsEntry():o.getAsEntry?.();i&&r.push(ws(i,t).then(t=>{t&&e.push(...t)}));continue}const n=i.getAsFile();n&&r.push(ys(n).then(t=>{t||e.push({type:"file",file:n})}))}else"string"===i.kind&&/^text\/uri-list/.test(i.type)&&r.push(new Promise(t=>{i.getAsString(r=>{e.push({type:"url",url:r}),t()})}))}return Promise.all(r).then(()=>e)}(r);t.onItems(o),n(_s.INACTIVE)};return r.addEventListener("drop",d),r.addEventListener("dragleave",u),r.addEventListener("dragenter",l),r.addEventListener("dragover",h),t.element.addEventListener("drop",p),ks.forEach(t=>{window.addEventListener(t,c)}),()=>{xs.delete(t.element),r.removeEventListener("drop",d),r.removeEventListener("dragleave",u),r.removeEventListener("dragenter",l),r.removeEventListener("dragover",h),t.element.removeEventListener("drop",p),ks.forEach(t=>{window.removeEventListener(t,c)})}}var Es="uc-drop-area",Ts=`${Es}/registry`,As=class extends la{static styleAttrs=[...super.styleAttrs,"uc-drop-area"];_destroyDropzone=null;_destroyContentWrapperDropzone=null;_onAreaClicked=null;constructor(){super(),this.init$={...this.init$,state:_s.INACTIVE,withIcon:!1,isClickable:!1,isFullscreen:!1,isEnabled:!0,isVisible:!0,isInitFlow:!1,text:"",[Ts]:new Set}}isActive(){if(!this.$.isEnabled)return!1;const t=this.getBoundingClientRect(),e=t.width>0&&t.height>0,r=t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth),o=window.getComputedStyle(this),i="hidden"!==o.visibility&&"none"!==o.display;return e&&i&&r}initCallback(){super.initCallback(),this.bindL10n("text",()=>this.l10n("drop-files-here"));this.$[Ts].add(this),this.defineAccessor("disabled",t=>{this.set$({isEnabled:!ns(t)})}),this.defineAccessor("clickable",t=>{this.set$({isClickable:ns(t)})}),this.defineAccessor("initflow",t=>{this.set$({isInitFlow:ns(t)})}),this.defineAccessor("with-icon",t=>{this.set$({withIcon:ns(t)})}),this.defineAccessor("fullscreen",t=>{this.set$({isFullscreen:ns(t)})}),this.defineAccessor("text",t=>{"string"==typeof t?this.bindL10n("text",()=>this.l10n(t)||t):this.bindL10n("text",()=>this.l10n("drop-files-here"))}),this._destroyDropzone=Cs({element:this,shouldIgnore:()=>this._shouldIgnore(),onChange:t=>{this.$.state=t},onItems:t=>{t.length&&(t.forEach(t=>{"url"===t.type?this.api.addFileFromUrl(t.url,{source:kn.DROP_AREA}):"file"===t.type&&this.api.addFileFromObject(t.file,{source:kn.DROP_AREA,fullPath:t.fullPath})}),this.uploadCollection.size&&(this.modalManager?.open(tn.activities.UPLOAD_LIST),this.set$({"*currentActivity":tn.activities.UPLOAD_LIST})))}});const t=this.ref["content-wrapper"];if(t&&(this._destroyContentWrapperDropzone=Cs({element:t,onChange:e=>{const r=Object.entries(_s).find(([,t])=>t===e)?.[0].toLowerCase();r&&t.setAttribute("drag-state",r)},onItems:()=>{},shouldIgnore:()=>this._shouldIgnore()})),this.sub("state",t=>{const e=Object.entries(_s).find(([,e])=>e===t)?.[0].toLowerCase();e&&this.setAttribute("drag-state",e)}),this.subConfigValue("sourceList",t=>{const e=ii(t);this.$.isEnabled=e.includes(kn.LOCAL),this.$.isVisible=this.$.isEnabled||!this.querySelector("[data-default-slot]")}),this.sub("isVisible",t=>{this.toggleAttribute("hidden",!t)}),this.sub("isClickable",t=>{this.toggleAttribute("clickable",t)}),this.$.isClickable){const t=t=>{if(t instanceof KeyboardEvent){if("Space"===t.code||"Enter"===t.code){if(this.$.isInitFlow)return void this.api.initFlow();this.api.openSystemDialog()}}else if(t instanceof MouseEvent){if(this.$.isInitFlow)return void this.api.initFlow();this.api.openSystemDialog()}};this._onAreaClicked=t,this.addEventListener("keydown",t),this.addEventListener("click",t)}}_shouldIgnore(){if(!this.$.isEnabled)return!0;if(!this._couldHandleFiles())return!0;if(!this.$.isFullscreen)return!1;const t=this.$[Ts];if(0===t.size)return!1;return[...t].filter(t=>t!==this).filter(t=>t.isActive()).length>0}_couldHandleFiles(){const t=this.cfg.multiple,e=this.cfg.multipleMax,r=this.uploadCollection.size;return!(t&&e&&r>=e)&&!(!t&&r>0)}destroyCallback(){super.destroyCallback();const t=this.$[Ts];t.delete(this),0===t.size&&we.deleteCtx(Es),this._destroyDropzone?.(),this._destroyContentWrapperDropzone?.(),this._onAreaClicked&&(this.removeEventListener("keydown",this._onAreaClicked),this.removeEventListener("click",this._onAreaClicked),this._onAreaClicked=null)}};As.template='\n <slot>\n <div data-default-slot hidden></div>\n <div ref="content-wrapper" class="uc-content-wrapper" set="@hidden: !isVisible">\n <div class="uc-icon-container" set="@hidden: !withIcon">\n <uc-icon name="default"></uc-icon>\n <uc-icon name="arrow-down"></uc-icon>\n </div>\n <span class="uc-text">{{text}}</span>\n </div>\n </slot>\n',As.bindAttributes({"with-icon":null,clickable:null,text:null,fullscreen:null,disabled:null,initflow:null});var Is=()=>{const t=globalThis.top??globalThis.parent??globalThis.self;try{return t.location.origin}catch(t){return console.warn("Unable to access top-level window location:",t),globalThis.location.origin}},Ss=t=>t.replace(/[\\-\\[]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Ms=(t,e="i")=>{const r=t.split("*").map(Ss);return new RegExp(`^${r.join(".+")}$`,e)},$s=["--uc-font-family","--uc-font-size","--uc-line-height","--uc-button-size","--uc-preview-size","--uc-input-size","--uc-padding","--uc-radius","--uc-transition","--uc-background","--uc-foreground","--uc-primary","--uc-primary-hover","--uc-primary-transparent","--uc-primary-foreground","--uc-secondary","--uc-secondary-hover","--uc-secondary-foreground","--uc-muted","--uc-muted-foreground","--uc-destructive","--uc-destructive-foreground","--uc-border"],Ls=(t,e)=>window.getComputedStyle(t).getPropertyValue(e).trim(),Os=t=>{const e={};for(const r of $s){const o=Ls(t,r);o&&(e[r]=o)}return e},Us=["selected-files-change","toolbar-state-change"],Rs=class{_handlerMap=new Map;_context;_getTargetOrigin;constructor(t,e){this._context=t,this._getTargetOrigin=e,window.addEventListener("message",this._handleMessage)}_handleMessage=t=>{if(t.source!==this._context)return;const e=t.data;if(!(t=>{if(!t)return!1;if("object"!=typeof t)return!1;if(!("type"in t))return!1;const e=t.type;return"string"==typeof e&&!!Us.includes(e)})(e))return;const r=this._handlerMap.get(e.type);if(r)for(const t of r)t(e)};on(t,e){const r=this._handlerMap.get(t)??new Set;this._handlerMap.has(t)||this._handlerMap.set(t,r),r.add(e)}send(t){const e=this._getTargetOrigin();this._context.postMessage(t,e)}destroy(){window.removeEventListener("message",this._handleMessage)}};var Ps={[wn.GDRIVE]:"ngdrive"},Ns=class extends la{couldBeCtxOwner=!0;activityType=tn.activities.EXTERNAL;_messageBridge;constructor(){super(),this.init$={...this.init$,activityIcon:"",activityCaption:"",selectedList:[],total:0,isSelectionReady:!1,isDoneBtnEnabled:!1,couldSelectAll:!1,couldDeselectAll:!1,showSelectionStatus:!1,showDoneBtn:!1,counterText:"",doneBtnTextClass:"uc-hidden",toolbarVisible:!0,onDone:()=>{for(const t of this.$.selectedList){const e=this.extractUrlFromSelectedFile(t),{filename:r}=t,{externalSourceType:o}=this.activityParams;this.api.addFileFromUrl(e,{fileName:r,source:o})}this.$["*currentActivity"]=tn.activities.UPLOAD_LIST,this.modalManager?.open(tn.activities.UPLOAD_LIST)},onCancel:()=>{this.historyBack()},onSelectAll:()=>{this._messageBridge?.send({type:"select-all"})},onDeselectAll:()=>{this._messageBridge?.send({type:"deselect-all"})}}}get activityParams(){const t=super.activityParams;if("externalSourceType"in t)return t;throw new Error("External Source activity params not found")}initCallback(){super.initCallback(),this.registerActivity(this.activityType,{onActivate:()=>{const{externalSourceType:t}=this.activityParams;if(!t)return this.modalManager?.close(this.$["*currentActivity"]),this.$["*currentActivity"]=null,void console.error(`Param "externalSourceType" is required for activity "${this.activityType}"`);this.set$({activityCaption:`${t[0]?.toUpperCase()}${t?.slice(1)}`,activityIcon:t}),this.mountIframe()}}),this.sub("*currentActivityParams",t=>{this.isActivityActive&&(this.unmountIframe(),this.mountIframe())}),this.sub("*currentActivity",t=>{t!==this.activityType&&this.unmountIframe()}),this.subConfigValue("multiple",t=>{this.$.showSelectionStatus=t}),this.subConfigValue("localeName",t=>{this.setupL10n()}),this.subConfigValue("externalSourcesEmbedCss",t=>{this.applyEmbedCss(t)})}extractUrlFromSelectedFile(t){if(t.alternatives){const e=ii(this.cfg.externalSourcesPreferredTypes);for(const r of e){const e=Ms(r);for(const[r,o]of Object.entries(t.alternatives))if(e.test(r))return o}}return t.url}handleToolbarStateChange(t){this.set$({toolbarVisible:t.isVisible})}async handleSelectedFilesChange(t){this.cfg.multiple===t.isMultipleMode?(this.bindL10n("counterText",()=>this.l10n("selected-count",{count:t.selectedCount,total:t.total})),this.set$({doneBtnTextClass:t.isReady?"":"uc-hidden",isSelectionReady:t.isReady,isDoneBtnEnabled:t.isReady&&t.selectedFiles.length>0,showSelectionStatus:t.isMultipleMode&&t.total>0,couldSelectAll:t.selectedCount<t.total,couldDeselectAll:t.selectedCount===t.total,selectedList:t.selectedFiles,showDoneBtn:t.total>0})):console.error("Multiple mode mismatch")}handleIframeLoad(){this.applyEmbedCss(this.cfg.externalSourcesEmbedCss),this.applyTheme(),this.setupL10n()}applyTheme(){this._messageBridge?.send({type:"set-theme-definition",theme:Os(this)})}applyEmbedCss(t){this._messageBridge?.send({type:"set-embed-css",css:t})}setupL10n(){this._messageBridge?.send({type:"set-locale-definition",localeDefinition:this.cfg.localeName})}remoteUrl(){const{pubkey:t,remoteTabSessionKey:e,socialBaseUrl:r,multiple:o}=this.cfg,{externalSourceType:i}=this.activityParams,n=Ps[i]??i,a={lang:this.l10n("social-source-lang")?.split("-")?.[0]||"en",public_key:t,images_only:(!1).toString(),session_key:e,wait_for_theme:!0,multiple:o.toString(),origin:this.cfg.topLevelOrigin||Is(),debug:this.cfg.debug},s=new URL(`/window4/${n}`,r);return s.search=function(t){const e=[];for(const[r,o]of Object.entries(t))null==o||"string"==typeof o&&0===o.length||e.push(`${r}=${encodeURIComponent(o)}`);return e.join("&")}(a),s.toString()}mountIframe(){const t=Fe({tag:"iframe",attributes:{src:this.remoteUrl(),marginheight:0,marginwidth:0,frameborder:0,allowTransparency:!0}});t.addEventListener("load",this.handleIframeLoad.bind(this)),this.ref.iframeWrapper.innerHTML="",this.ref.iframeWrapper.appendChild(t),t.contentWindow&&(this._messageBridge?.destroy(),this._messageBridge=new Rs(t.contentWindow,()=>this.cfg.socialBaseUrl),this._messageBridge.on("selected-files-change",this.handleSelectedFilesChange.bind(this)),this._messageBridge.on("toolbar-state-change",this.handleToolbarStateChange.bind(this)),this.resetSelectionStatus())}unmountIframe(){this._messageBridge?.destroy(),this._messageBridge=void 0,this.ref.iframeWrapper.innerHTML="",this.resetSelectionStatus()}resetSelectionStatus(){this.set$({selectedList:[],total:0,isDoneBtnEnabled:!1,couldSelectAll:!1,couldDeselectAll:!1,showSelectionStatus:!1,showDoneBtn:!1})}};Ns.template='\n <uc-activity-header>\n <button\n type="button"\n class="uc-mini-btn uc-close-btn"\n set="onclick: *historyBack"\n l10n="@title:a11y-activity-header-button-close;@aria-label:a11y-activity-header-button-close"\n >\n <uc-icon name="close"></uc-icon>\n </button>\n </uc-activity-header>\n <div class="uc-content">\n <div ref="iframeWrapper" class="uc-iframe-wrapper"></div>\n <div class="uc-toolbar" set="@hidden: !toolbarVisible">\n <button type="button" class="uc-cancel-btn uc-secondary-btn" set="onclick: onCancel" l10n="cancel"></button>\n <div set="@hidden: !showSelectionStatus" class="uc-selection-status-box">\n <span>{{counterText}}</span>\n <button type="button" set="onclick: onSelectAll; @hidden: !couldSelectAll" l10n="select-all"></button>\n <button type="button" set="onclick: onDeselectAll; @hidden: !couldDeselectAll" l10n="deselect-all"></button>\n </div>\n <button\n type="button"\n class="uc-done-btn uc-primary-btn"\n set="onclick: onDone; @disabled: !isDoneBtnEnabled; @hidden: !showDoneBtn"\n >\n <uc-spinner set="@hidden: isSelectionReady"></uc-spinner>\n <span l10n="done" set="@class: doneBtnTextClass"></span>\n </button>\n </div>\n </div>\n';var zs=/^([0-9]+)x([0-9]+)(?:\s+(\d{1,2}|100)%)?$/i,Ds=class extends la{_entrySubs=new Set;_entry=null;_withEntry(t){return(...e)=>{const r=this._entry;if(r)return t(r,...e);console.warn("No entry found")}}_subEntry(t,e){this._withEntry((t,e,r)=>{const o=t.subscribe(e,t=>{this.isConnected&&r(t)});this._entrySubs.add(o)})(t,e)}_reset(){for(const t of this._entrySubs)t.remove();this._entrySubs=new Set,this._entry=null}disconnectedCallback(){super.disconnectedCallback(),this._entrySubs=new Set}},Fs=Object.freeze({FINISHED:Symbol("FINISHED"),FAILED:Symbol("FAILED"),UPLOADING:Symbol("UPLOADING"),VALIDATION:Symbol("VALIDATION"),QUEUED_UPLOADING:Symbol("QUEUED-UPLOADING"),QUEUED_VALIDATION:Symbol("QUEUED-VALIDATION"),IDLE:Symbol("IDLE")}),Vs=class t extends Ds{couldBeCtxOwner=!0;pauseRender=!0;_renderedOnce=!1;_observer;_isIntersecting=!1;_thumbRect;constructor(){super(),this.init$={...this.init$,uid:"",itemName:"",errorText:"",hint:"",thumbUrl:"",progressValue:0,progressVisible:!1,badgeIcon:"",isFinished:!1,isFailed:!1,isUploading:!1,isFocused:!1,isEditable:!1,showFileNames:!1,state:Fs.IDLE,ariaLabelStatusFile:"",onEdit:this._withEntry(t=>{this.telemetryManager.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{event:"edit-file",node:this.tagName}}}),this.$["*currentActivityParams"]={internalId:t.uid},this.modalManager?.open(tn.activities.CLOUD_IMG_EDIT),this.$["*currentActivity"]=tn.activities.CLOUD_IMG_EDIT}),onRemove:()=>{this.telemetryManager.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{event:"remove-file",node:this.tagName}}}),this.uploadCollection.remove(this.$.uid)},onUpload:()=>{this.upload()}}}_calculateState=this._withEntry(t=>{let e=Fs.IDLE;t.getValue("errors").length>0?e=Fs.FAILED:t.getValue("isQueuedForUploading")?e=Fs.QUEUED_UPLOADING:t.getValue("isQueuedForValidation")?e=Fs.QUEUED_VALIDATION:t.getValue("isValidationPending")?e=Fs.VALIDATION:t.getValue("isUploading")?e=Fs.UPLOADING:t.getValue("fileInfo")&&(e=Fs.FINISHED),this.$.state=e});_debouncedCalculateState=jo(this._calculateState.bind(this),100);_updateHintAndProgress=this._withEntry(Ua((t,e)=>{const r=t.getValue("errors")?.[0]?.message,o=t.getValue("source"),i=t.getValue("externalUrl"),n=e===Fs.FINISHED,a=e===Fs.UPLOADING,s=e===Fs.QUEUED_UPLOADING,c=e===Fs.QUEUED_VALIDATION,l=e===Fs.VALIDATION,u=t.getValue("fileName");let d="";r?d="":!n&&i&&o&&Object.values(wn).includes(o)&&(d=this.l10n("waiting-for",{source:this.l10n(`src-type-${o}`)})),this.set$({hint:d,errorText:r,progressVisible:a||s||c||l,progressValue:c||l?0:t.getValue("uploadProgress"),ariaLabelStatusFile:u&&this.l10n("a11y-file-item-status",{fileName:u,status:this.l10n(e?.description?.toLocaleLowerCase()??"").toLocaleLowerCase()})})},100));_handleState=this._withEntry((t,e)=>{e===Fs.FAILED?this.$.badgeIcon="badge-error":e===Fs.FINISHED&&(this.$.badgeIcon="badge-success"),e===Fs.UPLOADING&&(this.$.isFocused=!1),this.set$({isFailed:e===Fs.FAILED,isUploading:e===Fs.UPLOADING,isFinished:e===Fs.FINISHED,isEditable:this.cfg.useCloudImageEditor&&t.getValue("isImage")&&t.getValue("cdnUrl")}),this._updateHintAndProgress(e)});_reset(){super._reset(),this._debouncedCalculateState.cancel()}_observerCallback(t){const[e]=t;e&&(this._isIntersecting=e.isIntersecting,this._thumbRect=e.boundingClientRect,e.isIntersecting&&!this._renderedOnce&&(this.render(),this._renderedOnce=!0))}_handleEntryId(t){this._reset();const e=this.uploadCollection?.read(t);this._entry=e,e&&(this._subEntry("isQueuedForValidation",()=>{this._debouncedCalculateState()}),this._subEntry("isValidationPending",()=>{this._debouncedCalculateState()}),this._subEntry("uploadProgress",()=>{this._debouncedCalculateState()}),this._subEntry("isQueuedForUploading",()=>{this._debouncedCalculateState()}),this._subEntry("fileName",t=>{this.$.itemName=t||e.getValue("externalUrl")||this.l10n("file-no-name"),this._debouncedCalculateState()}),this._subEntry("externalUrl",t=>{this.$.itemName=e.getValue("fileName")||t||this.l10n("file-no-name")}),this._subEntry("fileInfo",()=>{this._debouncedCalculateState()}),this._subEntry("errors",()=>this._debouncedCalculateState()),this._subEntry("isUploading",()=>this._debouncedCalculateState()),this._subEntry("fileSize",()=>this._debouncedCalculateState()),this._subEntry("mimeType",()=>this._debouncedCalculateState()),this._subEntry("isImage",()=>this._debouncedCalculateState()))}_updateShowFileNames(t){"list"===this.cfg.filesViewMode?this.$.showFileNames=!0:this.$.showFileNames=t}initCallback(){super.initCallback(),this.sub("uid",t=>{this._handleEntryId(t)}),this.sub("state",t=>{this._handleState(t)}),this.subConfigValue("useCloudImageEditor",()=>this._debouncedCalculateState()),this.subConfigValue("filesViewMode",t=>{this._updateShowFileNames(this.cfg.gridShowFileNames),this.setAttribute("mode",t)}),this.subConfigValue("gridShowFileNames",t=>{this._updateShowFileNames(t)}),this.onclick=()=>{t.activeInstances.forEach(t=>{t===this?t.setAttribute("focused",""):t.removeAttribute("focused")})},this.sub("*uploadTrigger",t=>{this._entry&&!t.has(this._entry.uid)||setTimeout(()=>this.isConnected&&this.upload())}),t.activeInstances.add(this)}destroyCallback(){super.destroyCallback(),t.activeInstances.delete(this),this._reset()}connectedCallback(){super.connectedCallback(),this._observer=new window.IntersectionObserver(this._observerCallback.bind(this),{threshold:[0,1]}),this._observer.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this._observer?.disconnect()}_settingsOfShrink(){return(t=>{if("string"!=typeof t)return!1;const e=zs.exec(t.toLocaleLowerCase())??[];if(0===e.length)return!1;const r=Number(e[1])*Number(e[2]);return r>268435456?(console.warn(`Shrinked size can not be larger than ${Math.floor(268.435456)}MP. You have set ${e[1]}x${e[2]} (${Math.ceil(r/1e3/100)/10}MP).`),!1):{quality:e[3]?Number(e[3])/100:void 0,size:r}})(this.cfg.imageShrink)}async _processShrink(t){const e=this._settingsOfShrink();return e?await Do(t,e):(console.warn("Image shrink settings are invalid, skipping shrinking"),t)}upload=this._withEntry(async t=>{if(!this.uploadCollection.read(t.uid))return;if(t.getValue("fileInfo")||t.getValue("isUploading")||t.getValue("errors").length>0||t.getValue("isValidationPending"))return;const e=this.cfg.multiple?this.cfg.multipleMax:1;if(!(e&&this.uploadCollection.size>e)){t.setMultipleValues({isUploading:!0,errors:[],isQueuedForUploading:!0}),this._debouncedCalculateState();try{const e=new AbortController;t.setValue("abortController",e);const r=async()=>{t.setValue("isQueuedForUploading",!1);let r=t.getValue("file");if(r instanceof File&&this.cfg.imageShrink)try{r=await this._processShrink(r)}catch{}const o=r||t.getValue("externalUrl")||t.getValue("uuid");if(!o)throw new Error("No file input");const i={...await this.getUploadClientOptions(),fileName:t.getValue("fileName")??void 0,source:t.getValue("source")??void 0,onProgress:e=>{if(e.isComputable){const r=100*e.value;t.setValue("uploadProgress",r)}},signal:e.signal,metadata:await this.getMetadataFor(t.uid)};return this.debugPrint("upload options",o,i),Kr(o,i)},o=await this.$["*uploadQueue"].add(r);t.setMultipleValues({fileInfo:o,isQueuedForUploading:!1,isUploading:!1,fileName:o.originalFilename,fileSize:o.size,isImage:o.isImage??!1,mimeType:o.contentInfo?.mime?.mime??o.mimeType,uuid:o.uuid,cdnUrl:t.getValue("cdnUrl")??o.cdnUrl,cdnUrlModifiers:t.getValue("cdnUrlModifiers")??"",uploadProgress:100,source:t.getValue("source")??null}),t===this._entry&&this._debouncedCalculateState()}catch(e){this.telemetryManager.sendEventError(e,"file upload. Failed to upload file"),e instanceof er&&e.isCancel?t.setMultipleValues({isUploading:!1,uploadProgress:0}):e instanceof Je?t.setMultipleValues({isUploading:!1,uploadProgress:0,uploadError:e}):(console.error("Unknown upload error",e),t.setMultipleValues({isUploading:!1,uploadProgress:0,uploadError:new Error("Something went wrong",{cause:e})})),t===this._entry&&this._debouncedCalculateState()}}});static template='\n <div class="uc-inner" set="@finished: isFinished; @uploading: isUploading; @failed: isFailed; @focused: isFocused">\n <uc-thumb set="uid:uid;badgeIcon:badgeIcon"></uc-thumb>\n\n <div aria-atomic="true" aria-live="polite" class="uc-file-name-wrapper" set="@aria-label:ariaLabelStatusFile;">\n <span class="uc-file-name" set="@hidden: !showFileNames">{{itemName}}</span>\n <span class="uc-file-error" set="@hidden: !errorText;">{{errorText}}</span>\n <span class="uc-file-hint" set="@hidden: !hint">{{hint}}</span>\n </div>\n <div class="uc-file-actions">\n <button\n type="button"\n l10n="@title:file-item-edit-button;@aria-label:file-item-edit-button"\n class="uc-edit-btn uc-mini-btn"\n set="onclick: onEdit; @hidden: !isEditable"\n >\n <uc-icon name="edit-file"></uc-icon>\n </button>\n <button\n type="button"\n l10n="@title:file-item-remove-button;@aria-label:file-item-remove-button"\n class="uc-remove-btn uc-mini-btn"\n set="onclick: onRemove;"\n >\n <uc-icon name="remove-file"></uc-icon>\n </button>\n <button type="button" class="uc-upload-btn uc-mini-btn" set="onclick: onUpload;">\n <uc-icon name="upload"></uc-icon>\n </button>\n </div>\n <uc-progress-bar\n class="uc-progress-bar"\n set="value: progressValue; visible: progressVisible; @hasFileName: showFileNames;"\n >\n </uc-progress-bar>\n </div>\n';static activeInstances=new Set},Bs=class extends la{requireCtxName=!0;_validationInputElement=null;_dynamicInputsContainer=null;_createValidationInput(){const t=document.createElement("input");return t.type="text",t.name=this.ctxName,t.required=this.cfg.multipleMin>0,t.tabIndex=-1,De(t,{opacity:0,height:0,width:0}),t}initCallback(){super.initCallback(),this._validationInputElement=this._createValidationInput(),this.appendChild(this._validationInputElement),this.sub("*collectionState",t=>{{if(!this._dynamicInputsContainer){const t=document.createElement("div");this.appendChild(t),this._dynamicInputsContainer=t}if(!this._validationInputElement){const t=this._createValidationInput();this.appendChild(t),this._validationInputElement=t}if(this._dynamicInputsContainer.innerHTML="","uploading"===t.status||"idle"===t.status)return this._validationInputElement.value="",void this._validationInputElement.setCustomValidity("");if("failed"===t.status){const e=t.errors[0]?.message;return this._validationInputElement.value="",void this._validationInputElement.setCustomValidity(e??"")}const e=t.group?t.group:null;if(e)return this._validationInputElement.value=e.cdnUrl??"",void this._validationInputElement.setCustomValidity("");const r=t.allEntries.map(t=>t.cdnUrl).filter(t=>"string"==typeof t);if(!this.cfg.multiple&&1===r.length&&r[0])return this._validationInputElement.value=r[0],void this._validationInputElement.setCustomValidity("");this._validationInputElement.remove(),this._validationInputElement=null;const o=new DocumentFragment;for(const t of r){const e=document.createElement("input");e.type="hidden",e.name=`${this.ctxName}[]`,e.value=t,o.appendChild(e)}this._dynamicInputsContainer.replaceChildren(o)}},!1)}},js=class extends Yi{constructor(){super(),this.init$={...this.init$,name:"",href:""}}initCallback(){super.initCallback(),this.sub("name",t=>{if(!t)return;let e=`#uc-icon-${t}`;this.subConfigValue("iconHrefResolver",r=>{if(r){const o=r(t);e=o??e}this.$.href=e})}),this.setAttribute("aria-hidden","true")}};js.template='\n <svg ref="svg" xmlns="http://www.w3.org/2000/svg">\n <use set="@href: href;"></use>\n </svg>\n',js.bindAttributes({name:"name"});var Hs="--uc-img-",qs="unresolved",Ks=!window.location.host.trim()||window.location.host.includes(":")||window.location.hostname.includes("localhost"),Gs=Object.freeze({PREVIEW:"PREVIEW",MAIN:"MAIN"}),Ws=Object.freeze({"dev-mode":{},pubkey:{},uuid:{},src:{},lazy:{default:1},intersection:{},breakpoints:{},"cdn-cname":{default:"https://ucarecdn.com"},"proxy-cname":{},"secure-delivery-proxy":{},"hi-res-support":{default:1},"ultra-res-support":{},format:{},"cdn-operations":{},progressive:{},quality:{},"is-background-for":{},"is-preview-blur":{default:1}}),Zs=Object.create(null);for(const t in Ws)Zs[Hs+t]=Ws[t]?.default||"";var Xs=class extends Ne{cssInit$=Zs;$$(t){return this.$[Hs+t]}set$$(t){for(const e in t)this.$[Hs+e]=t[e]}sub$$(t,e){this.sub(Hs+t,t=>{null!==t&&""!==t&&e(t)})}analyticsParams(){return`-/@clib/${Ki}/${Gi}/uc-img/`}initAttributes(t){[...this.attributes].forEach(e=>{Ws[e.name]||t.setAttribute(e.name,e.value)})}initIntersection(t,e){this._isnObserver=new IntersectionObserver(r=>{r.forEach(r=>{r.isIntersecting&&(e(),this._isnObserver.unobserve(t))})},{root:null,rootMargin:"0px"}),this._isnObserver.observe(t),this._observed||(this._observed=new Set),this._observed.add(t)}destroyCallback(){super.destroyCallback(),this._isnObserver&&(this._observed.forEach(t=>{this._isnObserver.unobserve(t)}),this._isnObserver=null),we.deleteCtx(this)}static get observedAttributes(){return Object.keys(Ws)}attributeChangedCallback(t,e,r){window.setTimeout(()=>{this.$[Hs+t]=r})}},Ys=class extends Xs{_img=new Image;_imgPreview=new Image;_fmtAbs(t){return!t.includes("//")&&!Ks&&(t=new URL(t,document.baseURI).href),t}_validateSize(t){if(""!==t?.trim()){const e=t.match(/\d+/)[0],r=t.match(/[a-zA-Z]+/)[0],o=parseInt(e,10);if(Number(o)>5e3&&this.hasFormatJPG)return 5e3+r;if(Number(o)>3e3&&!this.hasFormatJPG)return 3e3+r}return t}_getCdnModifiers(t,e){const r={format:this.$$("format"),quality:this.$$("quality"),resize:this._validateSize(t),blur:e,"cdn-operations":this.$$("cdn-operations"),analytics:this.analyticsParams()};return Wo(...(t=>Object.entries(t).filter(([t,e])=>void 0!==e&&""!==e).map(([t,e])=>"cdn-operations"===t||"analytics"===t?e:`${t}/${e}`))(r))}_getUrlBase(t="",e=""){if(this.$$("src").startsWith("data:")||this.$$("src").startsWith("blob:"))return this.$$("src");if(Ks&&this.$$("src")&&!this.$$("src").includes("//"))return this._proxyUrl(this.$$("src"));const r=this._getCdnModifiers(t,e);return this.$$("src").startsWith(this.$$("cdn-cname"))?ri(this.$$("src"),r):this.$$("cdn-cname")&&this.$$("uuid")||this.$$("uuid")?this._proxyUrl(ri(oi(this.$$("cdn-cname"),this.$$("uuid")),r)):this.$$("proxy-cname")?this._proxyUrl(ri(this.$$("proxy-cname"),r,this._fmtAbs(this.$$("src")))):this.$$("pubkey")?this._proxyUrl(ri(`https://${this.$$("pubkey")}.ucr.io/`,r,this._fmtAbs(this.$$("src")))):void 0}_proxyUrl(t){return this.$$("secure-delivery-proxy")?Ii(this.$$("secure-delivery-proxy"),{previewUrl:t},{transform:t=>window.encodeURIComponent(t)}):t}_getElSize(t,e=1,r=!0){const o=t.getBoundingClientRect(),i=e*Math.round(o.width),n=r?"":e*Math.round(o.height);return i||n?`${i||""}x${n||""}`:null}_setupEventProxy(t){const e=t=>{t.stopPropagation();const e=new Event(t.type,t);this.dispatchEvent(e)},r=["load","error"];for(const o of r)t.addEventListener(o,e)}get img(){return this.hasPreviewImage||(this._setupConfigForImage({elNode:this._img}),this.appendChild(this._img)),this._img}get currentImg(){return this.hasPreviewImage?{type:Gs.PREVIEW,img:this._imgPreview}:{type:Gs.MAIN,img:this.img}}get hasPreviewImage(){return this.$$("is-preview-blur")}get bgSelector(){return this.$$("is-background-for")}get breakpoints(){if(this.$$("breakpoints")){const e=ii(this.$$("breakpoints"));return t=e.map(t=>parseInt(t,10)),[...new Set(t)]}return null;var t}get hasFormatJPG(){return"jpeg"===this.$$("format").toLowerCase()}renderBg(t){const e=new Set;e.add(`url("${this._getUrlBase(this._getElSize(t))}") 1x`),this.$$("hi-res-support")&&e.add(`url("${this._getUrlBase(this._getElSize(t,2))}") 2x`),this.$$("ultra-res-support")&&e.add(`url("${this._getUrlBase(this._getElSize(t,3))}") 3x`);const r=`image-set(${[...e].join(", ")})`;t.style.setProperty("background-image",r),t.style.setProperty("background-image","-webkit-"+r)}getSrcset(){const t=new Set;return this.breakpoints?this.breakpoints.forEach(e=>{t.add(this._getUrlBase(e+"x")+` ${this._validateSize(e+"w")}`),this.$$("hi-res-support")&&t.add(this._getUrlBase(2*e+"x")+` ${this._validateSize(2*e+"w")}`),this.$$("ultra-res-support")&&t.add(this._getUrlBase(3*e+"x")+` ${this._validateSize(3*e+"w")}`)}):(t.add(this._getUrlBase(this._getElSize(this.currentImg.img))+" 1x"),this.$$("hi-res-support")&&t.add(this._getUrlBase(this._getElSize(this.currentImg.img,2))+" 2x"),this.$$("ultra-res-support")&&t.add(this._getUrlBase(this._getElSize(this.currentImg.img,3))+" 3x")),[...t].join()}getSrc(){return this._getUrlBase()}get srcUrlPreview(){return this._getUrlBase("100x","100")}renderBackground(){[...document.querySelectorAll(this.bgSelector)].forEach(t=>{this.$$("intersection")?this.initIntersection(t,()=>{this.renderBg(t)}):this.renderBg(t)})}_appendURL({elNode:t,src:e,srcset:r}){e&&(t.src=e),r&&(t.srcset=r)}_setupConfigForImage({elNode:t}){this._setupEventProxy(t),this.initAttributes(t)}loaderImage({src:t,srcset:e,elNode:r}){return new Promise((o,i)=>{this._setupConfigForImage({elNode:r}),r.setAttribute(qs,""),r.addEventListener("load",()=>{r.removeAttribute(qs),o(r)}),r.addEventListener("error",()=>{i(!1)}),this._appendURL({elNode:r,src:t,srcset:e})})}async renderImage(){if(this.$$("intersection"))return this.hasPreviewImage&&(this._setupConfigForImage({elNode:this._imgPreview}),this.appendChild(this._imgPreview)),void this.initIntersection(this.currentImg.img,async()=>{this.hasPreviewImage&&(this._imgPreview.src=this.srcUrlPreview);try{await this.loaderImage({src:this.getSrc(),srcset:this.getSrcset(),elNode:this._img}),this.hasPreviewImage&&await this._imgPreview.remove(),this.appendChild(this._img)}catch(t){this.hasPreviewImage&&await(this._imgPreview?.remove()),this.appendChild(this._img)}});try{this.hasPreviewImage&&(await this.loaderImage({src:this.srcUrlPreview,elNode:this._imgPreview}),this.appendChild(this._imgPreview)),await this.loaderImage({src:this.getSrc(),srcset:this.getSrcset(),elNode:this._img}),this.hasPreviewImage&&await(this._imgPreview?.remove()),this.appendChild(this._img)}catch(t){this.hasPreviewImage&&await(this._imgPreview?.remove()),this.appendChild(this._img)}}init(){this.bgSelector?this.renderBackground():this.renderImage()}},Js=class extends Ys{initCallback(){super.initCallback(),this.sub$$("src",()=>{this.init()}),this.sub$$("uuid",()=>{this.init()}),this.sub$$("lazy",t=>{this.$$("is-background-for")||this.$$("is-preview-blur")||(this.img.loading=t?"lazy":"eager")})}},Qs=null,tc=class extends Yi{static styleAttrs=[...super.styleAttrs,"uc-modal"];static StateConsumerScope="modal";_mouseDownTarget;handleModalOpen;handleModalClose;handleModalCloseAll;constructor(){super(),this.init$={...this.init$,closeClicked:this._handleDialogClose}}_handleBackdropClick=()=>{this._closeDialog()};_closeDialog=()=>{this.modalManager?.close(this.id),this.modalManager?.hasActiveModals||(document.body.style.overflow="")};_handleDialogClose=()=>{this._closeDialog()};_handleDialogMouseDown=t=>{this._mouseDownTarget=t.target};_handleDialogMouseUp=t=>{const e=t.target;e===this.ref.dialog&&e===this._mouseDownTarget&&this._closeDialog()};show(){const t=this.ref.dialog;"function"==typeof t.showModal?(this.setAttribute("aria-modal","true"),t.showModal()):t.setAttribute("open",""),this.cfg.modalScrollLock&&(document.body.style.overflow="hidden")}hide(){const t=this.ref.dialog;"function"==typeof t.close?(this.setAttribute("aria-modal","false"),t.close()):t.removeAttribute("open")}_handleModalOpen({id:t}){t===this.id?(Qs=t,this.show(),this.emit(Vo.MODAL_OPEN,{modalId:t},{debounce:!0})):this.hide()}_handleModalClose({id:t}){t===this.id&&(this.hide(),this.emit(Vo.MODAL_CLOSE,{modalId:t,hasActiveModals:this.modalManager?.hasActiveModals},{debounce:!0}))}_handleModalCloseAll(t){this.hide(),Qs===this.id&&this.emit(Vo.MODAL_CLOSE,{modalId:Qs,hasActiveModals:this.modalManager?.hasActiveModals},{debounce:!0})}initCallback(){super.initCallback(),this.modalManager?.registerModal(this.id,this);const t=this.ref.dialog;t.addEventListener("close",this._handleDialogClose),t.addEventListener("mousedown",this._handleDialogMouseDown),t.addEventListener("mouseup",this._handleDialogMouseUp),this.subConfigValue("modalBackdropStrokes",t=>{t?this.setAttribute("strokes",""):this.removeAttribute("strokes")}),this.handleModalOpen=this._handleModalOpen.bind(this),this.handleModalClose=this._handleModalClose.bind(this),this.handleModalCloseAll=this._handleModalCloseAll.bind(this),this.modalManager?.subscribe(Hi.OPEN,this.handleModalOpen),this.modalManager?.subscribe(Hi.CLOSE,this.handleModalClose),this.modalManager?.subscribe(Hi.CLOSE_ALL,this.handleModalCloseAll)}destroyCallback(){super.destroyCallback(),document.body.style.overflow="",this._mouseDownTarget=void 0;const t=this.ref.dialog;t.removeEventListener("close",this._handleDialogClose),t.removeEventListener("mousedown",this._handleDialogMouseDown),t.removeEventListener("mouseup",this._handleDialogMouseUp),this.modalManager?.unsubscribe(Hi.OPEN,this.handleModalOpen),this.modalManager?.unsubscribe(Hi.CLOSE,this.handleModalClose),this.modalManager?.unsubscribe(Hi.CLOSE_ALL,this.handleModalCloseAll)}};tc.template='\n <dialog ref="dialog">\n <slot></slot>\n </dialog>\n';var ec=class extends Yi{_value=0;_visible=!0;constructor(){super(),this.init$={...this.init$,width:0,opacity:0}}initCallback(){super.initCallback();this.ref.fakeProgressLine.addEventListener("animationiteration",()=>{const t=this.ref.fakeProgressLine;this._visible?this._value>0&&t.classList.add("uc-fake-progress--hidden"):t.classList.add("uc-fake-progress--hidden")}),this.defineAccessor("value",t=>{null!=t&&(this._value=t,this._visible&&this.style.setProperty("--l-progress-value",this._value.toString()))}),this.defineAccessor("visible",t=>{this._visible=t,this.classList.toggle("uc-progress-bar--hidden",!t)})}};ec.template='\n <div ref="fakeProgressLine" class="uc-fake-progress"></div>\n <div ref="realProgressLine" class="uc-progress"></div>\n';var rc=class extends la{_unobserveCollectionCb;constructor(){super(),this.init$={...this.init$,visible:!1,value:0,"*commonProgress":0}}initCallback(){super.initCallback(),this._unobserveCollectionCb=this.uploadCollection.observeProperties(()=>{const t=this.uploadCollection.items().some(t=>{const e=this.uploadCollection.read(t);return e?.getValue("isUploading")??!1});this.$.visible=t}),this.sub("visible",t=>{t?this.setAttribute("active",""):this.removeAttribute("active")}),this.sub("*commonProgress",t=>{this.$.value=t})}destroyCallback(){super.destroyCallback(),this._unobserveCollectionCb?.(),this._unobserveCollectionCb=void 0}};rc.template=' <uc-progress-bar set="visible: visible; value: value"></uc-progress-bar> ';var oc=class extends Yi{constructor(){super(),this.init$={...this.init$,currentText:"",options:[],selectHtml:"",onSelect:t=>{t.preventDefault(),t.stopPropagation();const e=this.ref.select;this.value=e.value,this.$.currentText=this.$.options.find(t=>t.value===this.value)?.text||"",this.dispatchEvent(new Event("change"))}}}initCallback(){super.initCallback(),this.sub("options",t=>{this.$.currentText=t?.[0]?.text||"";let e="";t?.forEach(t=>{e+=`<option value="${t.value}">${t.text}</option>`}),this.$.selectHtml=e})}};oc.template=' <select ref="select" set="innerHTML: selectHtml; onchange: onSelect"></select> ';var ic=class extends la{static styleAttrs=[...super.styleAttrs,"uc-simple-btn"];couldBeCtxOwner=!0;constructor(){super(),this.init$={...this.init$,withDropZone:!0,onClick:()=>{this.api.initFlow()},"button-text":""}}initCallback(){super.initCallback(),this.defineAccessor("dropzone",t=>{void 0!==t&&(this.$.withDropZone=ns(t))}),this.subConfigValue("multiple",t=>{this.$["button-text"]=t?"upload-files":"upload-file"})}};ic.template='\n <uc-drop-area set="@disabled: !withDropZone">\n <button type="button" set="onclick: onClick">\n <uc-icon name="upload"></uc-icon>\n <span l10n="button-text"></span>\n <slot></slot>\n <div class="uc-visual-drop-area" l10n="drop-files-here"></div>\n </button>\n </uc-drop-area>\n',ic.bindAttributes({dropzone:null});var nc=class extends la{couldBeCtxOwner=!0;type=void 0;_registeredTypes={};constructor(){super(),this.init$={...this.init$,iconName:"default","src-type":""}}initTypes(){this.registerType({type:kn.LOCAL,activate:()=>(this.api.openSystemDialog(),!1)}),this.registerType({type:kn.URL,activity:tn.activities.URL,textKey:"from-url"}),this.registerType({type:kn.CAMERA,activity:tn.activities.CAMERA,activate:()=>{const t=Sn.htmlMediaCapture;return t&&this.api.openSystemDialog({captureCamera:!0}),!t}}),this.registerType({type:"draw",activity:tn.activities.DRAW,icon:"edit-draw"});for(const t of Object.values(_n))this.registerType({type:t,activity:tn.activities.CAMERA,activate:()=>{const e=Sn.htmlMediaCapture;return e&&this.api.openSystemDialog({captureCamera:!0,modeCamera:"mobile-photo-camera"===t?Qn.PHOTO:Qn.VIDEO}),!e}});for(const t of Object.values(wn))this.registerType({type:t,activity:tn.activities.EXTERNAL,activityParams:{externalSourceType:t}})}initCallback(){super.initCallback(),this.initTypes(),this.defineAccessor("type",t=>{t&&this.applyType(t)})}registerType(t){this._registeredTypes[t.type]=t}getType(t){return this._registeredTypes[t]}activate(){if(!this.type)return;const t=this._registeredTypes[this.type];if(!t)return;const{activity:e,activate:r,activityParams:o={}}=t;(r?r():!!e)&&e&&(this.modalManager?.open(e),this.set$({"*currentActivityParams":o,"*currentActivity":e}))}applyType(t){const e=this._registeredTypes[t];if(!e)return void console.warn(`Unsupported source type: ${t}`);const{textKey:r=t,icon:o=t}=e;this.$["src-type"]=`src-type-${r}`,this.$.iconName=o,this.onclick=()=>{this.activate()}}};nc.template='\n <button type="button">\n <uc-icon set="@name: iconName"></uc-icon>\n <div class="uc-txt" l10n="src-type"></div>\n </button>\n',nc.bindAttributes({type:null});var ac=class extends Yi{initCallback(){super.initCallback(),this.subConfigValue("sourceList",t=>{const e=ii(t);let r="";e.forEach(t=>{"instagram"!==t?"camera"===t&&Sn.htmlMediaCapture?this.subConfigValue("cameraModes",t=>{const e=Ho(t);e.forEach(t=>{r+=`<uc-source-btn role="listitem" type="mobile-${t}-camera"></uc-source-btn>`}),0===e.length&&(r+='<uc-source-btn role="listitem" type="mobile-photo-camera"></uc-source-btn>')}):r+=`<uc-source-btn role="listitem" type="${t}"></uc-source-btn>`:console.error("Instagram source was removed because the Instagram Basic Display API hasn't been available since December 4, 2024. Official statement, see here:https://developers.facebook.com/blog/post/2024/09/04/update-on-instagram-basic-display-api/?locale=en_US")}),this.cfg.sourceListWrap?this.innerHTML=r:this.outerHTML=r})}},sc=class extends Ne{};sc.template=' <div class="uc-spinner"></div> ';var cc=class extends tn{historyTracked=!0;activityType=tn.activities.START_FROM;initCallback(){super.initCallback(),this.registerActivity(this.activityType??"")}};function lc(t,e=40){if("image/svg+xml"===t.type)return URL.createObjectURL(t);const r=document.createElement("canvas"),o=r.getContext("2d");if(!o)return Promise.reject(new Error("Canvas context not supported"));const i=new Image,n=new Promise((t,n)=>{i.onload=()=>{const a=i.height/i.width;a>1?(r.width=e,r.height=e*a):(r.height=e,r.width=e/a),o.fillStyle="rgb(240, 240, 240)",o.fillRect(0,0,r.width,r.height),o.drawImage(i,0,0,r.width,r.height),r.toBlob(e=>{if(!e)return void n();const r=URL.createObjectURL(e);t(r)})},i.onerror=t=>{n(t)}});return i.src=URL.createObjectURL(t),n}function uc(t="hsl(209, 21%, 65%)",e=32,r=32){return function(t){const e=new Blob([t],{type:"image/svg+xml"});return URL.createObjectURL(e)}(`\n <svg width="${e}" height="${r}" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" fill="${t}" d="M9.68848 8.70068C9.68848 8.42454 9.91233 8.20068 10.1885 8.20068H15.0885C15.2211 8.20068 15.3483 8.25336 15.442 8.34713L20.342 13.2471C20.4358 13.3409 20.4885 13.4681 20.4885 13.6007V21.3007C20.4885 21.5768 20.2646 21.8007 19.9885 21.8007H10.1885C9.91233 21.8007 9.68848 21.5768 9.68848 21.3007V8.70068ZM10.6885 9.20068V20.8007H19.4885V14.1007L15.0885 14.1007C14.8123 14.1007 14.5885 13.8768 14.5885 13.6007L14.5885 9.20068H10.6885ZM15.5885 9.90779L18.7814 13.1007L15.5885 13.1007L15.5885 9.90779Z"/>\n </svg>\n `)}cc.template=' <div class="uc-content"><slot></slot></div> ';var dc=class extends Ds{_renderedGridOnce=!1;_thumbRect=null;_isIntersecting=!1;_firstViewMode=this.cfg.filesViewMode;_observer;constructor(){super(),this.init$={...this.init$,thumbUrl:"",badgeIcon:"",uid:""}}_calculateThumbSize(t=!1){t&&(this._thumbRect=this.getBoundingClientRect());let e=Math.max(parseInt(String(this?._thumbRect?.height||0),10),parseInt(String(this?._thumbRect?.width||0),10),this.cfg.thumbSize);return window.devicePixelRatio>1&&(e*=window.devicePixelRatio),Math.min(e,3e3)}_generateThumbnail=this._withEntry(async(t,e=!1)=>{const r=t.getValue("fileInfo"),o=t.getValue("isImage"),i=t.getValue("uuid"),n=t.getValue("thumbUrl"),a=this._calculateThumbSize(e);if(r&&o&&i){const e=await this.proxyUrl(ri(oi(this.cfg.cdnCname,i),Wo(t.getValue("cdnUrlModifiers"),"stretch/off",`scale_crop/${a}x${a}/center`)));if(n===e)return;const{promise:r}=Ia(e);return void r.then(()=>{t.setValue("thumbUrl",e),n?.startsWith("blob:")&&URL.revokeObjectURL(n)}).catch(async()=>{if(!n?.startsWith("blob:"))try{const e=t.getValue("file");if(!e)return;const r=await lc(e,a);t.setValue("thumbUrl",r)}catch(e){this.telemetryManager.sendEventError(e,"thumbnail generation. Failed to generate thumb from file");const r=window.getComputedStyle(this).getPropertyValue("--uc-muted-foreground");t.setValue("thumbUrl",uc(r))}})}if(t.getValue("thumbUrl"))return;const s=t.getValue("file");if(s?.type.includes("image"))try{const e=await lc(s,a);t.setValue("thumbUrl",e)}catch(e){this.telemetryManager.sendEventError(e,"thumbnail generation. Failed to generate thumb from file");const r=window.getComputedStyle(this).getPropertyValue("--uc-muted-foreground");t.setValue("thumbUrl",uc(r))}else{const e=window.getComputedStyle(this).getPropertyValue("--uc-muted-foreground");t.setValue("thumbUrl",uc(e))}});_debouncedGenerateThumb=jo(this._generateThumbnail.bind(this),100);_observerCallback(t){const[e]=t;e&&(this._isIntersecting=e.isIntersecting,e.isIntersecting&&(this._thumbRect=e.boundingClientRect,this._debouncedGenerateThumb(),this._observer?.disconnect()),0===e.intersectionRatio&&this._debouncedGenerateThumb.cancel())}_reset(){super._reset(),this._debouncedGenerateThumb.cancel()}_handleEntryId(t){this._reset();const e=this.uploadCollection?.read(t);this._entry=e,e&&(this._subEntry("fileInfo",t=>{t?.isImage&&this._isIntersecting&&this._debouncedGenerateThumb()}),this._subEntry("thumbUrl",t=>{this.$.thumbUrl=t?`url(${t})`:""}),this._subEntry("cdnUrlModifiers",()=>{this._isIntersecting&&this._debouncedGenerateThumb()}),this._isIntersecting&&this._debouncedGenerateThumb())}initCallback(){super.initCallback(),this.defineAccessor("badgeIcon",t=>{this.$.badgeIcon=t}),this.defineAccessor("uid",t=>{this.set$({uid:t})}),this.sub("uid",t=>{this._handleEntryId(t)}),this.subConfigValue("filesViewMode",t=>{"grid"!==t||this._renderedGridOnce||("list"===this._firstViewMode&&this._debouncedGenerateThumb(!0),this._renderedGridOnce=!0)}),this.setAttribute("role","img")}connectedCallback(){super.connectedCallback(),this._observer=new window.IntersectionObserver(this._observerCallback.bind(this),{threshold:.1}),this._observer.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this._entrySubs=new Set,this._debouncedGenerateThumb.cancel(),this._observer?.disconnect()}};dc.template='\n <div class="uc-thumb" set="style.backgroundImage: thumbUrl">\n <div class="uc-badge">\n <uc-icon set="@name: badgeIcon"></uc-icon>\n </div>\n </div>\n',dc.bindAttributes({badgeIcon:null,uid:null});var hc=class extends la{static styleAttrs=["uc-wgt-common"];static EventType=Vo;requireCtxName=!0;initCallback(){super.initCallback(),this.$["*eventEmitter"].bindTarget(this)}destroyCallback(){super.destroyCallback(),this.$["*eventEmitter"].unbindTarget(this)}},pc=class extends la{couldBeCtxOwner=!0;historyTracked=!0;activityType=tn.activities.UPLOAD_LIST;constructor(){super(),this.init$={...this.init$,doneBtnVisible:!1,doneBtnEnabled:!1,uploadBtnVisible:!1,addMoreBtnVisible:!1,addMoreBtnEnabled:!1,headerText:"",commonErrorMessage:"",hasFiles:!1,onAdd:()=>{this.telemetryManager.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{event:"add-more",node:this.tagName}}}),this.api.initFlow(!0)},onUpload:()=>{this.emit(Vo.UPLOAD_CLICK),this.api.uploadAll(),this._throttledHandleCollectionUpdate()},onDone:()=>{this.emit(Vo.DONE_CLICK,this.api.getOutputCollectionState()),this.api.doneFlow()},onCancel:()=>{this.telemetryManager.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{event:"clear-all",node:this.tagName}}}),this.uploadCollection.clearAll()}}}_throttledHandleCollectionUpdate=Ua(()=>{this.isConnected&&(this._updateUploadsState(),this.couldOpenActivity||this.$["*currentActivity"]!==this.activityType||this.historyBack(),this.cfg.confirmUpload||this.api.uploadAll())},300);_updateUploadsState(){const t=this.api.getOutputCollectionState(),e={total:t.totalCount,succeed:t.successCount,uploading:t.uploadingCount,failed:t.failedCount,validatingBeforeUploading:t.idleEntries.filter(t=>t.isValidationPending).length},r=!t.errors.some(t=>"TOO_MANY_FILES"===t.type||"TOO_FEW_FILES"===t.type),o=t.errors.some(t=>"TOO_MANY_FILES"===t.type),i=t.totalCount===(this.cfg.multiple?this.cfg.multipleMax:1),n=t.allEntries.some(t=>t.isValidationPending),a=0===e.failed&&0===t.errors.length&&!n;let s=!1,c=!1,l=!1;if(e.total-e.succeed-e.uploading-e.failed>0&&r&&a)s=!0;else{c=!0;const o=!this.cfg.groupOutput||!!t.group;l=e.total===e.succeed&&r&&a&&o}this.set$({doneBtnVisible:c,doneBtnEnabled:l,uploadBtnVisible:s,addMoreBtnEnabled:0===e.total||!o&&!i,addMoreBtnVisible:!i||this.cfg.multiple,hasFiles:e.total>0}),this.bindL10n("headerText",()=>this._getHeaderText(e))}_getHeaderText(t){const e=e=>{let r=t[e];return"uploading"===e&&(r+=t.validatingBeforeUploading),this.l10n(`header-${e}`,{count:r})};return t.uploading>0||t.validatingBeforeUploading>0?e("uploading"):t.failed>0?e("failed"):t.succeed>0?e("succeed"):e("total")}get couldOpenActivity(){return this.cfg.showEmptyList||this.uploadCollection.size>0}initCallback(){super.initCallback(),this.registerActivity(this.activityType),this.subConfigValue("multiple",this._throttledHandleCollectionUpdate),this.subConfigValue("multipleMin",this._throttledHandleCollectionUpdate),this.subConfigValue("multipleMax",this._throttledHandleCollectionUpdate),this.sub("*groupInfo",t=>{t&&this._throttledHandleCollectionUpdate()}),this.subConfigValue("filesViewMode",t=>{this.setAttribute("mode",t)}),this.sub("*currentActivity",t=>{this.couldOpenActivity||t!==this.activityType||(this.$["*currentActivity"]=this.initActivity)}),this.uploadCollection.observeProperties(this._throttledHandleCollectionUpdate),this.uploadCollection.observeCollection(this._throttledHandleCollectionUpdate),this.sub("*collectionErrors",t=>{const e=t.filter(t=>"SOME_FILES_HAS_ERRORS"!==t.type)[0];e?this.set$({commonErrorMessage:e.message}):this.set$({commonErrorMessage:null})})}destroyCallback(){super.destroyCallback(),this.uploadCollection.unobserveProperties(this._throttledHandleCollectionUpdate),this.uploadCollection.unobserveCollection(this._throttledHandleCollectionUpdate)}};pc.template='\n <uc-activity-header>\n <span aria-live="polite" class="uc-header-text">{{headerText}}</span>\n <button\n type="button"\n class="uc-mini-btn uc-close-btn"\n set="onclick: *closeModal"\n l10n="@title:a11y-activity-header-button-close;@aria-label:a11y-activity-header-button-close"\n >\n <uc-icon name="close"></uc-icon>\n </button>\n </uc-activity-header>\n\n <div class="uc-no-files" set="@hidden: hasFiles">\n <slot name="empty"><span l10n="no-files"></span></slot>\n </div>\n\n <div class="uc-files">\n <div class="uc-files-wrapper" repeat="*uploadList" repeat-item-tag="uc-file-item"></div>\n <button\n type="button"\n class="uc-add-more-btn uc-secondary-btn"\n set="onclick: onAdd; @disabled: !addMoreBtnEnabled; @hidden: !addMoreBtnVisible"\n >\n <uc-icon name="add"></uc-icon><span l10n="add-more"></span>\n </button>\n </div>\n\n <div class="uc-common-error" set="@hidden: !commonErrorMessage; textContent: commonErrorMessage;"></div>\n\n <div class="uc-toolbar">\n <button type="button" class="uc-cancel-btn uc-secondary-btn" set="onclick: onCancel;" l10n="clear"></button>\n <div class="uc-toolbar-spacer"></div>\n <button\n type="button"\n class="uc-add-more-btn uc-secondary-btn"\n set="onclick: onAdd; @disabled: !addMoreBtnEnabled; @hidden: !addMoreBtnVisible"\n >\n <uc-icon name="add"></uc-icon><span l10n="add-more"></span>\n </button>\n <button\n type="button"\n class="uc-upload-btn uc-primary-btn"\n set="@hidden: !uploadBtnVisible; onclick: onUpload;"\n l10n="upload"\n ></button>\n <button\n type="button"\n class="uc-done-btn uc-primary-btn"\n set="@hidden: !doneBtnVisible; onclick: onDone; @disabled: !doneBtnEnabled"\n l10n="done"\n ></button>\n </div>\n\n <uc-drop-area ghost></uc-drop-area>\n';var gc=class extends la{couldBeCtxOwner=!0;activityType=tn.activities.URL;constructor(){super(),this.init$={...this.init$,importDisabled:!0,onUpload:t=>{t.preventDefault(),this.telemetryManager.sendEvent({eventType:Fo.ACTION_EVENT,payload:{metadata:{event:"upload-from-url",node:this.tagName}}});const e=this.ref.input.value;this.api.addFileFromUrl(e,{source:kn.URL}),this.modalManager?.open(tn.activities.UPLOAD_LIST),this.$["*currentActivity"]=tn.activities.UPLOAD_LIST},onCancel:()=>{this.historyBack()},onInput:t=>{const e=t.target?.value??"";this.set$({importDisabled:!e})}}}initCallback(){super.initCallback(),this.registerActivity(this.activityType??"",{onActivate:()=>{const t=this.ref.input;t.value="",t.focus()}})}};gc.template='\n <uc-activity-header>\n <button type="button" class="uc-mini-btn" set="onclick: *historyBack" l10n="@title:back;@aria-label:back">\n <uc-icon name="back"></uc-icon>\n </button>\n <div>\n <uc-icon name="url"></uc-icon>\n <span l10n="caption-from-url"></span>\n </div>\n <button\n type="button"\n class="uc-mini-btn uc-close-btn"\n set="onclick: *closeModal"\n l10n="@title:a11y-activity-header-button-close;@aria-label:a11y-activity-header-button-close"\n >\n <uc-icon name="close"></uc-icon>\n </button>\n </uc-activity-header>\n <form class="uc-content">\n <label>\n <input placeholder="https://" class="uc-url-input" type="text" ref="input" set="oninput: onInput" />\n </label>\n <button\n type="submit"\n class="uc-url-upload-btn uc-primary-btn"\n set="onclick: onUpload; @disabled: importDisabled"\n l10n="upload-url"\n ></button>\n </form>\n';var mc=class extends ka{static styleAttrs=[...super.styleAttrs,"uc-wgt-common"];constructor(){super(),this.init$={...this.init$,"*solution":this.tagName}}initCallback(){super.initCallback(),this.telemetryManager.sendEvent({eventType:Fo.INIT_SOLUTION}),this.a11y?.registerBlock(this)}},fc=class extends nn{static styleAttrs=[...super.styleAttrs,"uc-file-uploader-inline"];constructor(){super(),this.init$={...this.init$,couldCancel:!1,"*solution":this.tagName,cancel:()=>{if(this.couldHistoryBack){const t=this.$["*historyBack"];return void t?.()}this.couldShowList&&(this.$["*currentActivity"]=tn.activities.UPLOAD_LIST)}}}get couldHistoryBack(){const t=this.$["*history"];return!(!t||t.length<=1)&&t[t.length-1]!==tn.activities.START_FROM}get couldShowList(){const t=this.$["*uploadList"];return this.cfg.showEmptyList||Array.isArray(t)&&t.length>0}initCallback(){super.initCallback(),this.telemetryManager.sendEvent({eventType:Fo.INIT_SOLUTION});const t=this.ref.uBlock;t&&(this.sub("*currentActivity",e=>{e||(this.$["*currentActivity"]=t.initActivity||tn.activities.START_FROM)}),this.sub("*uploadList",e=>{Array.isArray(e)&&e.length>0&&this.$["*currentActivity"]===(t.initActivity||tn.activities.START_FROM)&&(this.$["*currentActivity"]=tn.activities.UPLOAD_LIST)}),this.sub("*history",()=>{this.$.couldCancel=this.couldHistoryBack||this.couldShowList}))}};fc.template='\n <uc-start-from>\n <uc-drop-area with-icon clickable></uc-drop-area>\n <uc-source-list role="list" wrap></uc-source-list>\n <button\n type="button"\n l10n="start-from-cancel"\n class="uc-cancel-btn uc-secondary-btn"\n set="onclick: cancel; @hidden: !couldCancel"\n ></button>\n <uc-copyright></uc-copyright>\n </uc-start-from>\n <uc-upload-list ref="uBlock"></uc-upload-list>\n <uc-camera-source></uc-camera-source>\n <uc-url-source></uc-url-source>\n <uc-external-source></uc-external-source>\n <uc-cloud-image-editor-activity></uc-cloud-image-editor-activity>\n';var bc="active",vc=class extends nn{static styleAttrs=[...super.styleAttrs,"uc-file-uploader-minimal"];handleModalOpen;handleModalClose;constructor(){super(),this.init$={...this.init$,singleUpload:!1,isHiddenStartFrom:!1,classUploadList:"",classStartFrom:"","*solution":this.tagName}}_handleModalOpen(t){t.id===tn.activities.CLOUD_IMG_EDIT&&this.set$({classUploadList:bc}),this.$["*currentActivity"]===tn.activities.UPLOAD_LIST&&this.set$({classUploadList:bc,isHiddenStartFrom:!0});const e=this.$["*uploadList"];(!e||e.length<=0)&&this.set$({classStartFrom:bc})}_handleModalClose(t){t.id===this.$["*currentActivity"]&&(this.$["*currentActivity"]=tn.activities.UPLOAD_LIST,this.set$({isHiddenStartFrom:!1})),t.id===tn.activities.CLOUD_IMG_EDIT&&(this.$["*currentActivity"]=tn.activities.UPLOAD_LIST)}initCallback(){super.initCallback(),this.telemetryManager.sendEvent({eventType:Fo.INIT_SOLUTION});const t=this.ref.uBlock;t&&(this.sub("*currentActivity",e=>{e===tn.activities.UPLOAD_LIST&&this.modalManager?.closeAll(),e||(this.$["*currentActivity"]=t.initActivity||tn.activities.START_FROM)}),this.sub("*uploadList",e=>{Array.isArray(e)&&e.length>0?(this.$["*currentActivity"]=tn.activities.UPLOAD_LIST,this.set$({classStartFrom:""})):(this.set$({classUploadList:"",isHiddenStartFrom:!1}),this.$["*currentActivity"]=t.initActivity||tn.activities.START_FROM)}),this.subConfigValue("confirmUpload",t=>{!1!==t&&(this.cfg.confirmUpload=!1)}),this.subConfigValue("filesViewMode",t=>{this.setAttribute("mode",t),this.subConfigValue("multiple",e=>{"grid"===t?(e?this.style.removeProperty("--uc-grid-col"):this.style.setProperty("--uc-grid-col","1"),this.$.singleUpload=!e):(this.style.removeProperty("--uc-grid-col"),this.$.singleUpload=!1)})}),this.handleModalOpen=t=>{this._handleModalOpen(t)},this.handleModalClose=t=>{this._handleModalClose(t)},this.modalManager?.subscribe(Hi.OPEN,this.handleModalOpen),this.modalManager?.subscribe(Hi.CLOSE,this.handleModalClose))}destroyCallback(){super.destroyCallback(),this.modalManager?.unsubscribe(Hi.OPEN,this.handleModalOpen),this.modalManager?.unsubscribe(Hi.CLOSE,this.handleModalClose)}};vc.template='\n <uc-start-from set="@hidden: isHiddenStartFrom; @class:classStartFrom">\n <uc-drop-area set="@single:singleUpload;" initflow clickable tabindex="0" l10n="choose-file"></uc-drop-area>\n <uc-copyright></uc-copyright>\n </uc-start-from>\n <uc-upload-list set="@class:classUploadList" ref="uBlock"></uc-upload-list>\n\n <uc-modal id="start-from" strokes block-body-scrolling>\n <uc-start-from>\n <uc-drop-area with-icon clickable></uc-drop-area>\n <uc-source-list role="list" wrap></uc-source-list>\n <button type="button" l10n="start-from-cancel" class="uc-secondary-btn" set="onclick: *historyBack"></button>\n </uc-start-from>\n </uc-modal>\n\n <uc-modal id="camera" strokes block-body-scrolling>\n <uc-camera-source></uc-camera-source>\n </uc-modal>\n\n <uc-modal id="url" strokes block-body-scrolling>\n <uc-url-source></uc-url-source>\n </uc-modal>\n\n <uc-modal id="external" strokes block-body-scrolling>\n <uc-external-source></uc-external-source>\n </uc-modal>\n\n <uc-modal id="cloud-image-edit" strokes block-body-scrolling>\n <uc-cloud-image-editor-activity></uc-cloud-image-editor-activity>\n </uc-modal>\n';var yc=class extends nn{static styleAttrs=[...super.styleAttrs,"uc-file-uploader-regular"];constructor(){super();const t={...this.init$,isHidden:!1,"*solution":this.tagName};this.init$=t}initCallback(){super.initCallback(),this.telemetryManager.sendEvent({eventType:Fo.INIT_SOLUTION}),this.defineAccessor("headless",t=>{this.set$({isHidden:ns(t)})})}};yc.template='\n <uc-simple-btn set="@hidden: isHidden"></uc-simple-btn>\n\n <uc-modal id="start-from" strokes block-body-scrolling>\n <uc-start-from>\n <uc-drop-area with-icon clickable></uc-drop-area>\n <uc-source-list role="list" wrap></uc-source-list>\n <button type="button" l10n="start-from-cancel" class="uc-secondary-btn" set="onclick: *historyBack"></button>\n <uc-copyright></uc-copyright>\n </uc-start-from>\n </uc-modal>\n\n <uc-modal id="upload-list" strokes block-body-scrolling>\n <uc-upload-list></uc-upload-list>\n </uc-modal>\n\n <uc-modal id="camera" strokes block-body-scrolling>\n <uc-camera-source></uc-camera-source>\n </uc-modal>\n\n <uc-modal id="url" strokes block-body-scrolling>\n <uc-url-source></uc-url-source>\n </uc-modal>\n\n <uc-modal id="external" strokes block-body-scrolling>\n <uc-external-source></uc-external-source>\n </uc-modal>\n\n <uc-modal id="cloud-image-edit" strokes block-body-scrolling>\n <uc-cloud-image-editor-activity></uc-cloud-image-editor-activity>\n </uc-modal>\n',yc.bindAttributes({headless:null});const wc=_c;function _c(t,e){const r=kc();return(_c=function(t,e){return r[t-=378]})(t,e)}function kc(){const t=["locale","requires","224388pTszNb","isPremiumPlugin","editor","46898DfaidH","164226spvuxJ","defineComponents","pluginName","uploadcare.locale","349040oyZhqM","123lkaUHO","uploadcare.uploader.sourceList","8AdOtfx","4537320GJGhxc","_defineLocale","get","231wFEPII","defineLocale","3080695hpCktc","Uploadcare","301xwBgWC","define","contentLanguage","config","URL","Local","isOfficialPlugin","4942107iXegwZ"];return(kc=function(){return t})()}!function(t){const e=_c,r=t();for(;;)try{if(957268===parseInt(e(381))/1+parseInt(e(384))/2*(-parseInt(e(390))/3)+parseInt(e(392))/4*(parseInt(e(398))/5)+parseInt(e(385))/6*(parseInt(e(400))/7)+parseInt(e(393))/8+-parseInt(e(378))/9+parseInt(e(389))/10*(-parseInt(e(396))/11))break;r.push(r.shift())}catch(t){r.push(r.shift())}}(kc);class xc extends a.Plugin{static get[wc(380)](){return[be,$]}static get[wc(387)](){return wc(399)}static get[wc(406)](){return!0}static get[wc(382)](){return!0}constructor(r){const o=wc;super(r),r[o(403)][o(401)](o(391),[e[o(405)],e[o(404)]]),t[o(386)](t),this[o(394)]()}[wc(394)](){const e=wc,r=this[e(383)][e(403)][e(395)](e(388)),o=this[e(383)][e(379)][e(402)];r&&t[e(397)](o,r)}}class Cc extends c.View{constructor(t){super(t);const e=t.t,r=this.bindTemplate,o=new c.SpinnerView;o.isVisible=!0,this.setTemplate({tag:"div",attributes:{class:["ck-uploadcare-form__loading"],tabindex:"-1"},children:[{tag:"div",attributes:{class:["ck-uploadcare-form__loading-spinner"]},children:[o,{text:r.to("imageUploadProgress",t=>e("Loading image...")+" ("+(t||0)+"%)")}]},{tag:"div",attributes:{class:["ck-uploadcare-form__skeleton"]},children:[{tag:"div",children:[{tag:"span"},{tag:"span"},{tag:"span"}]},{tag:"div",children:[{tag:"span"},{tag:"span"},{tag:"span"},{tag:"span"},{tag:"span"}]}]}]})}}class Ec extends c.View{constructor(t){super(t);const e=t.t;this.set("errorType",null);const r=new c.ButtonView(t);r.label=e({id:"Try again (Uploadcare)",string:"Try again"}),r.withText=!0,r.class="ck-button-action",r.on("execute",()=>{this.fire("retry")}),r.bind("isVisible").to(this,"errorType",t=>"NotFound"!==t);const o=new c.IconView;o.content=s.IconError,o.extendTemplate({attributes:{style:{width:"50px",height:"50px"}}});const i=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck-uploadcare-form__error"],tabindex:"-1"},children:[{tag:"div",attributes:{class:["ck-uploadcare-form__error-contents"]},children:[o,{tag:"h3",attributes:{style:{fontWeight:"bold"}},children:[{text:e("Unable to load")}]},{text:i.to("errorType",t=>e("NotFound"!==t?"We were unable to load the image due to network connection issues.":"The image was not found. Its source may have been removed."))},r]},{tag:"div",attributes:{class:["ck-uploadcare-form__skeleton"]},children:[{tag:"div",children:[{tag:"span"},{tag:"span"},{tag:"span"}]},{tag:"div",children:[{tag:"span"},{tag:"span"},{tag:"span"},{tag:"span"},{tag:"span"}]}]}]})}}function Tc(t,e){const r=Ac();return(Tc=function(t,e){return r[t-=472]})(t,e)}function Ac(){const t=["2407650bnEUNu","uc-cloud-image-editor","98168nkliTm","17462BZSaiv","imageSrc","4640154AKwTMG","setTemplate","set","5241402nNjETa","10776FLSOrV","ck-uploadcare-theme","497IWlUre","4897450IlBSYN","165wnUciG","411lursyG","image-edit","41PrRsxL","bindTemplate","uc-light"];return(Ac=function(){return t})()}!function(t){const e=Tc,r=t();for(;;)try{if(842714===-parseInt(e(473))/1*(parseInt(e(479))/2)+parseInt(e(490))/3*(-parseInt(e(485))/4)+-parseInt(e(488))/5+-parseInt(e(481))/6+-parseInt(e(487))/7*(parseInt(e(478))/8)+parseInt(e(484))/9+parseInt(e(476))/10*(parseInt(e(489))/11))break;r.push(r.shift())}catch(t){r.push(r.shift())}}(Ac);class Ic extends c.View{constructor(t,e){const r=Tc;super(t);const o=this[r(474)];this[r(483)](r(480),""),this[r(482)]({tag:r(477),attributes:{...e,class:[r(475),r(486)],"ctx-name":r(472),"cdn-url":o.to(r(480))}})}}const Sc=Mc;function Mc(t,e){const r=$c();return(Mc=function(t,e){return r[t-=225]})(t,e)}function $c(){const t=["1458264pffGRP","11ExUnqt","setTemplate","toLowerCase","focus","addEventListener","_focusableView","279987rOnvNZ","1676304BSuzZa","42LynzaP","8GZZCuy","_waitForImageEditorComponent","retry","_addErrorViewListeners","length","detail","1046410maTSoy","628070ZNulax","cdnUrl","nodeName","_editingView","_addUploadcareImageEditorListeners","ready","add","disconnect","change:status","cancel","3CGdURd","div","createCollection","uc-cloud-image-editor","70974dREUaS","_loadingView","_items","set","clear","ck-uploadcare-form","observe","querySelector","219728LNPJGt","element","getFocusableElement","filter","9bgkkkv","addMany","ck-reset_all-excluded","addedNodes","error","apply","target","fire","_setView","once","render","status","_errorView","uploading"];return($c=function(){return t})()}!function(t){const e=Mc,r=t();for(;;)try{if(143124===parseInt(e(246))/1*(parseInt(e(250))/2)+parseInt(e(226))/3*(-parseInt(e(229))/4)+parseInt(e(236))/5+parseInt(e(227))/6+-parseInt(e(228))/7*(parseInt(e(258))/8)+-parseInt(e(262))/9*(-parseInt(e(235))/10)+-parseInt(e(277))/11*(parseInt(e(276))/12))break;r.push(r.shift())}catch(t){r.push(r.shift())}}($c);class Lc extends z{[Sc(252)];[Sc(251)];[Sc(274)];[Sc(239)];[Sc(225)];constructor(t,e,r){const o=Sc;super(t),this[o(252)]=this[o(248)](),this[o(251)]=new Cc(t),this[o(274)]=new Ec(t),this[o(239)]=new Ic(t,r),this[o(225)]=new c.View(t),this[o(225)][o(278)](this[o(260)]()),this[o(253)](o(273),e),this[o(278)]({tag:o(247),attributes:{class:["ck",o(264),o(255)],tabindex:"-1"},children:this[o(252)]}),this[o(270)](),this[o(271)](o(272),()=>{const t=o;this[t(230)](this[t(259)],e=>{this[t(240)](e)})}),this.on(o(244),()=>{this[o(270)]()}),this[o(232)]()}[Sc(280)](){const t=Sc;this[t(259)][t(280)]()}[Sc(270)](){const t=Sc;switch(this[t(252)][t(254)](),this[t(273)]){case t(275):this[t(252)][t(242)](this[t(251)]);break;case t(266):this[t(252)][t(242)](this[t(274)]);break;case t(241):this[t(252)][t(263)]([this[t(239)],this[t(225)]])}}[Sc(230)](t,e){const r=Sc,o=r(249),i=t[r(257)](o);if(i)return e(i);const n=new MutationObserver(i=>{const a=r,s=i[a(261)](e=>e[a(268)]===t&&e[a(265)][a(233)]>0&&e[a(265)][0][a(238)][a(279)]()===o);s[a(233)]&&(n[a(243)](),e(s[0][a(265)][0]))});n[r(256)](t,{childList:!0,subtree:!0})}[Sc(240)](t){const e=Sc;t[e(281)](e(267),t=>{const r=e;this[r(269)](r(267),{imageSrc:t[r(234)][r(237)]})}),t[e(281)](e(245),()=>{const t=e;this[t(269)](t(245))})}[Sc(232)](){const t=Sc;this[t(274)].on(t(231),()=>{const e=t;this[e(269)](e(231))})}}class Oc extends((0,L.ObservableMixin)()){_editor;_dialog;_imageElement;_imageCache;_controller;_attributes;constructor(t,e,r){super(),this._editor=t,this._dialog=e,this._imageElement=r,this._imageCache=this._editor.plugins.get("UploadcareImageEditUI").imageCache,this._attributes=this._editor.config.get("uploadcare.editor")||{},this.set({isActive:!0,imageStatus:"ready",imageErrorType:null,imageId:null,imageSrc:null,imageDimension:null,imageUploadProgress:null}),this._prepareImage(),this._showDialog()}destroy(){this.isActive=!1,this.stopListening(),this.stopDelegating(),"uploading"===this.imageStatus&&this._controller&&this._controller.abort()}async _prepareImage(){const t=this._imageElement,e=t.getAttribute("uploadcareImageId"),r=t.getAttribute("src");if(e)await this._loadImageInfo(e,r);else if(this._imageCache.has(r)){const t=this._imageCache.get(r);this.imageStatus="ready",this.imageErrorType=null,this.imageSrc=t.url,this.imageDimension=t.dimension,this.imageId=t.id}else this.imageStatus="uploading",this.imageUploadProgress=0,this._controller=new AbortController,await this._uploadImage(this._imageElement,this._controller)}_showDialog(){const{locale:t}=this._editor,e=t.t,r=new Lc(t,this.imageStatus,this._attributes);r.bind("status").to(this,"imageStatus"),r._loadingView.bind("imageUploadProgress").to(this,"imageUploadProgress"),r._editingView.bind("imageSrc").to(this,"imageSrc"),r._errorView.bind("errorType").to(this,"imageErrorType"),this._addEditViewListeners(r,this._imageElement),this._dialog.show({id:"uploadcareImageEdit",icon:s.IconUploadcareImageEdit,title:e({id:"Edit Image (Uploadcare)",string:"Edit image"}),content:r,position:c.DialogViewPosition.EDITOR_TOP_CENTER,isModal:!0,onShow:()=>{r.focus()},onHide:()=>{r.destroy(),this.destroy()},keystrokeHandlerOptions:{filter:t=>!Y(t,r.element)}})}_loadImageInfo(t,e){return de.getInfo(t,{publicKey:this._editor.config.get("uploadcare.pubkey"),baseURL:this._editor.config.get("uploadcare.uploader.baseUrl")}).then(r=>{const{width:o,height:i}=r.imageInfo;this.imageStatus="ready",this.imageErrorType=null,this.imageSrc=e,this.imageDimension={width:o,height:i},this.imageId=t}).catch(t=>{this.imageStatus="error",this.imageErrorType="FileNotFoundError"===t.code?"NotFound":"Network",this.imageSrc=null,this.imageDimension=null,this.imageId=null,this.imageUploadProgress=null})}_uploadImage(t,e){return this._getImageAsFile(t).then(t=>de.upload({publicKey:this._editor.config.get("uploadcare.pubkey"),baseURL:this._editor.config.get("uploadcare.uploader.baseUrl"),baseCDN:this._editor.config.get("uploadcare.uploader.cdnCname"),signal:e.signal,file:t,onProgress:t=>{t&&t.isComputable&&(this.imageUploadProgress=Math.ceil(100*t.value))}})).then(e=>{const{width:r,height:o}=e.imageInfo;this.imageStatus="ready",this.imageErrorType=null,this.imageSrc=e.cdnUrl,this.imageDimension={width:r,height:o},this.imageId=e.uuid,this.imageUploadProgress=null;const i=t.getAttribute("src");this._imageCache.set(i,{id:e.uuid,url:e.cdnUrl,dimension:this.imageDimension})}).catch(t=>{this.imageStatus="error",this.imageErrorType="FileNotFoundError"===t.code?"NotFound":"Network",this.imageSrc=null,this.imageDimension=null,this.imageId=null,this.imageUploadProgress=null})}_addEditViewListeners(t,e){t.on("apply",(t,r)=>{this._replaceImage(e,r.imageSrc,this.imageId),this._dialog.hide()}),t.on("retry",()=>{this.imageStatus="uploading",this.imageUploadProgress=0,this._controller=new AbortController,this._uploadImage(this._imageElement,this._controller)}),t.on("cancel",()=>{this._dialog.hide()})}_replaceImage(t,e,r){const o=this._editor,{width:i,height:n}=K(e,this.imageDimension.width,this.imageDimension.height),{imageFallbackUrl:a,imageSources:s}=q(e,i);o.model.change(e=>{if("$graveyard"===t.root.rootName){o.execute("insertImage",{imageType:t.is("element","imageInline")?"imageInline":null,source:{...Object.fromEntries(t.getAttributes()),uploadcareImageId:r,src:a,sources:s,width:i,height:n}});const c=t.getChildren();t=o.model.document.selection.getSelectedElement();for(const r of c)e.append(e.cloneElement(r),t)}else e.setSelection(t,"on"),o.execute("uploadcareImageReplace",{...Object.fromEntries(t.getAttributes()),uploadcareImageId:r,src:a,sources:s,width:i,height:n},t);e.setSelection(t,"on")})}async _getImageAsFile(t){const e=L.global.window,r=L.global.document.location.href,o=new e.URL(t.getAttribute("src"),r);if("data:"===o.protocol){const t=o.href.split(","),r=t[0].match(/:(.*?);/)[1],i=r.split("/")[1],n=e.atob(t[t.length-1]);let a=n.length;const s=new e.Uint8Array(a);for(;a--;)s[a]=n.charCodeAt(a);return new e.File([s],"image."+i,{type:r})}const i=o.href.split("/"),n=i[i.length-1],a=n.split(".")[1];return e.fetch(o.href).then(t=>t.clone().blob()).then(t=>new e.File([t],n,{type:"image/"+a}))}}const Uc=Rc;function Rc(t,e){const r=Pc();return(Rc=function(t,e){return r[t-=330]})(t,e)}function Pc(){const t=["editor","16049UNwrNo","1120960kCehDd","8uuIjHT","plugins","model","1097730bvxdod","9087LACEla","execute","refresh","129588yyqWaG","isActive","document","1FJCvLA","requires","555670HNaaIQ","_isEditable","set","config","40OgrPyt","imageInline","1221353zHYbmc","selection","isEnabled","uploadcare.allowExternalImagesEditing","element","3996YncxtK","unbind","get","imageBlock","bind","imageEditController","284CiJnkh","getSelectedElement"];return(Pc=function(){return t})()}!function(t){const e=Rc,r=t();for(;;)try{if(187310===parseInt(e(330))/1*(-parseInt(e(332))/2)+parseInt(e(358))/3*(parseInt(e(349))/4)+parseInt(e(336))/5*(parseInt(e(361))/6)+parseInt(e(338))/7*(-parseInt(e(354))/8)+-parseInt(e(357))/9+-parseInt(e(353))/10+parseInt(e(352))/11*(parseInt(e(343))/12))break;r.push(r.shift())}catch(t){r.push(r.shift())}}(Pc);class Nc extends a.Command{[Uc(348)];static get[Uc(331)](){return[c.Dialog]}[Uc(333)];constructor(t){const e=Uc;super(t),this[e(348)]=void 0,this[e(333)]=function(t){const e=H,r=W(t);return t=>!(!t||!t.is(e(381),e(368))&&!t.is(e(381),e(347)))&&(!!t[e(341)](e(335))||!!t[e(341)](e(358))&&r(t[e(361)](e(358))))}(t[e(335)][e(345)](e(341))||[]),this[e(334)]({isActive:!1})}[Uc(360)](){const t=Uc,e=this[t(351)][t(356)][t(363)][t(339)][t(350)]();this[t(340)]=this[t(333)](e)}[Uc(359)](){const t=Uc;this[t(348)]&&(this[t(344)](t(362)),this[t(348)]=void 0);const e=this[t(351)][t(356)][t(363)][t(339)][t(350)]();e&&(e.is(t(342),t(346))||e.is(t(342),t(337)))&&(this[t(348)]=new Oc(this[t(351)],this[t(351)][t(355)][t(345)](c.Dialog),e),this[t(347)](t(362)).to(this[t(348)],t(362)))}}function zc(){const t=["505445InpLHS","sizes","12kJbtOF","setAttributes","72ZdrqId","168550FcwqYG","refresh","1287eEJhuu","10pbkjGN","document","getSelectedElement","447zNWuIJ","imageInline","change","41952oZkFuy","element","editor","execute","isEnabled","1604NnGMjX","selection","imageBlock","1548963TwTDXj","825812ZerzNf","146517nyLnnh","model","srcset","removeAttribute"];return(zc=function(){return t})()}const Dc=Fc;function Fc(t,e){const r=zc();return(Fc=function(t,e){return r[t-=170]})(t,e)}!function(t){const e=Fc,r=t();for(;;)try{if(141531===-parseInt(e(197))/1+parseInt(e(183))/2*(-parseInt(e(175))/3)+parseInt(e(187))/4+parseInt(e(192))/5*(-parseInt(e(194))/6)+parseInt(e(188))/7*(parseInt(e(196))/8)+-parseInt(e(186))/9*(parseInt(e(172))/10)+-parseInt(e(171))/11*(-parseInt(e(178))/12))break;r.push(r.shift())}catch(t){r.push(r.shift())}}(zc);class Vc extends a.Command{[Dc(170)](){const t=Dc,e=this[t(180)][t(189)][t(173)][t(184)][t(174)]();this[t(182)]=Boolean(e&&(e.is(t(179),t(185))||e.is(t(179),t(176))))}[Dc(181)](t){const e=Dc,r=this[e(180)][e(189)][e(173)][e(184)][e(174)]();this[e(180)][e(189)][e(177)](o=>{const i=e;o[i(195)](t,r),o[i(191)](i(190),r),o[i(191)](i(193),r)})}}const Bc=jc;function jc(t,e){const r=Hc();return(jc=function(t,e){return r[t-=365]})(t,e)}function Hc(){const t=["isOfficialPlugin","1358520egRgbu","705189KGJhcc","ImageUtils","add","uploadcareImageReplace","235566PryqKy","pluginName","2133128aFnpbG","ImageEditing","UploadcareImageEditEditing","4020863sumDeb","isPremiumPlugin","commands","12BPgQOO","1596390NOWhUn","init","uploadcareImageEdit","1SMCSHC","requires","4199472FaAvyY"];return(Hc=function(){return t})()}!function(t){const e=jc,r=t();for(;;)try{if(416247===-parseInt(e(381))/1*(-parseInt(e(378))/2)+parseInt(e(365))/3+-parseInt(e(377))/4*(parseInt(e(385))/5)+parseInt(e(369))/6+-parseInt(e(374))/7+parseInt(e(371))/8+parseInt(e(383))/9)break;r.push(r.shift())}catch(t){r.push(r.shift())}}(Hc);class qc extends a.Plugin{static get[Bc(370)](){return Bc(373)}static get[Bc(382)](){const t=Bc;return[be,c.Notification,t(366),t(372)]}static get[Bc(384)](){return!0}static get[Bc(375)](){return!0}[Bc(379)](){const t=Bc,{editor:e}=this;e[t(376)][t(367)](t(380),new Nc(e)),e[t(376)][t(367)](t(368),new Vc(e))}}var Kc=r(947),Gc={attributes:{"data-cke":!0}};Gc.setAttributes=y(),Gc.insert=b().bind(null,"head"),Gc.domAPI=m(),Gc.insertStyleElement=_();p()(Kc.A,Gc);Kc.A&&Kc.A.locals&&Kc.A.locals;class Wc extends a.Plugin{_imageCache=new Map;static get pluginName(){return"UploadcareImageEditUI"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}get imageCache(){return this._imageCache}init(){const t=this.editor;t.ui.componentFactory.add("uploadcareImageEdit",e=>{const r=t.commands.get("uploadcareImageEdit"),o=new c.ButtonView(e),i=e.t;return o.set({icon:s.IconUploadcareImageEdit,tooltip:!0,label:i({id:"Edit Image (Uploadcare)",string:"Edit image"})}),o.bind("isEnabled").to(r),o.bind("isOn").to(r,"isActive"),this.listenTo(o,"execute",()=>{t.execute("uploadcareImageEdit"),t.editing.view.focus()}),o}),this._initConfig()}_initConfig(){const t=(0,L.createElement)(document,"uc-config",{"ctx-name":"image-edit",removeCopyright:"true",localeName:this.editor.locale.contentLanguage});document.body.appendChild(t),this.listenTo(this.editor,"destroy",()=>{t.remove()})}}var Zc=Yc;function Xc(){var t=["2298345lbBTsX","517410nvCRCY","isOfficialPlugin","6XSEMYF","669591KhCmuz","12gutwpi","isPremiumPlugin","pluginName","104wVKMwg","2848964GXQCQU","4848872EkKYrg","264606wkKtKp","UploadcareImageEdit","10013850mJcKdd","requires"];return(Xc=function(){return t})()}function Yc(t,e){var r=Xc();return(Yc=function(t,e){return r[t-=415]})(t,e)}!function(t){for(var e=Yc,r=t();;)try{if(869028===-parseInt(e(416))/1*(-parseInt(e(424))/2)+-parseInt(e(429))/3+-parseInt(e(422))/4+-parseInt(e(428))/5+-parseInt(e(418))/6*(-parseInt(e(423))/7)+parseInt(e(421))/8*(-parseInt(e(417))/9)+parseInt(e(426))/10)break;r.push(r.shift())}catch(t){r.push(r.shift())}}(Xc);class Jc extends a.Plugin{static get[Zc(420)](){return Zc(425)}static get[Zc(427)](){return[qc,Wc]}static get[Zc(415)](){return!0}static get[Zc(419)](){return!0}}function Qc(t,e){var r=tl();return(Qc=function(t,e){return r[t-=284]})(t,e)}function tl(){var t=["608769tbfDQU","10mDTXvX","3Mqxzir","972930EsMsQO","1713435FYzHAQ","32590tfqcsw","40FDbyAw","107805fYgZqs","1236916DARAjW","3311HPlLvS","4291749xBqqco"];return(tl=function(){return t})()}!function(t){for(var e=Qc,r=t();;)try{if(330111===parseInt(e(292))/1*(parseInt(e(286))/2)+parseInt(e(287))/3*(parseInt(e(293))/4)+parseInt(e(289))/5+parseInt(e(288))/6+-parseInt(e(285))/7*(-parseInt(e(291))/8)+-parseInt(e(284))/9+-parseInt(e(290))/10*(parseInt(e(294))/11))break;r.push(r.shift())}catch(t){r.push(r.shift())}}(tl)})(),(window.CKEditor5=window.CKEditor5||{}).uploadcare=o})();