@oktis-works/admin 0.20.0 → 0.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/dist/client/_astro/{ActivityWidget.DtG_8-bC.js → ActivityWidget.Dzoi-bq3.js} +1 -1
  2. package/dist/client/_astro/{AdminBar.DWgISuE1.js → AdminBar.eT1ch_B6.js} +1 -1
  3. package/dist/client/_astro/{ApiKeysManager.9WL8yofB.js → ApiKeysManager.kbTE1CPk.js} +1 -1
  4. package/dist/client/_astro/{AtGlanceWidget.B5byv-Z6.js → AtGlanceWidget.w23IIv06.js} +1 -1
  5. package/dist/client/_astro/{BaseLayout.Dw2OoSEv.css → BaseLayout.Rpr86VwM.css} +1 -1
  6. package/dist/client/_astro/{CommentsManager.C5gleTZN.js → CommentsManager.BN7i1RHa.js} +1 -1
  7. package/dist/client/_astro/ContentEditor.BlsJ2bwD.js +1 -0
  8. package/dist/client/_astro/{ContentTypeWorkspace.wFn1FHsk.js → ContentTypeWorkspace.BPVuQgzA.js} +1 -1
  9. package/dist/client/_astro/{DashboardHome.CoVmaWtV.js → DashboardHome.DXzu_IXZ.js} +1 -1
  10. package/dist/client/_astro/{DashboardLayout.astro_astro_type_script_index_0_lang.BEDbOjeH.js → DashboardLayout.astro_astro_type_script_index_0_lang.DmNSzErX.js} +1 -1
  11. package/dist/client/_astro/{FieldGroupEditor.DixyIeAD.js → FieldGroupEditor.DsqphEgt.js} +1 -1
  12. package/dist/client/_astro/{FieldGroupList.KCRsCtjN.js → FieldGroupList.pW2Um9om.js} +1 -1
  13. package/dist/client/_astro/FieldRenderer.AYtSBfHZ.js +3 -0
  14. package/dist/client/_astro/{Footer.Bis7kk52.js → Footer.5Lcn2VXz.js} +1 -1
  15. package/dist/client/_astro/{GeneralSettings.DWUL4EPc.js → GeneralSettings.B-H8Rzy7.js} +1 -1
  16. package/dist/client/_astro/{LogsManager.wobqWCrD.js → LogsManager.Crd8q2te.js} +1 -1
  17. package/dist/client/_astro/{MediaLibrary.B_DxFMQi.js → MediaLibrary.Cv6Ry3u9.js} +1 -1
  18. package/dist/client/_astro/{MenuManager.CB6j6yQw.js → MenuManager.D25ika09.js} +1 -1
  19. package/dist/client/_astro/{Modal.eJIvbMT2.js → Modal.572hmVvb.js} +1 -1
  20. package/dist/client/_astro/{PluginManager.CT-7t4Wz.js → PluginManager.DLfgQFPF.js} +1 -1
  21. package/dist/client/_astro/{PostTypesManager.LW5RMORG.js → PostTypesManager.C3RbmOZT.js} +1 -1
  22. package/dist/client/_astro/{QuickDraftWidget.zabr8JfM.js → QuickDraftWidget.BtSGzhKq.js} +1 -1
  23. package/dist/client/_astro/{ReadingSettings.BiSPyKOf.js → ReadingSettings.ZFDaeo5U.js} +1 -1
  24. package/dist/client/_astro/{ResourceHubs.CmV4Mz6z.js → ResourceHubs.Cx9fbCv1.js} +1 -1
  25. package/dist/client/_astro/{TaxonomiesManager.BzFfeZEj.js → TaxonomiesManager.BLsvmjaL.js} +1 -1
  26. package/dist/client/_astro/TaxonomyTermsManager.C_xEh8Ab.js +1 -0
  27. package/dist/client/_astro/ThemeCustomizer.yx8rEKcL.js +577 -0
  28. package/dist/client/_astro/{ThemeManager.BVqp2Bk3.js → ThemeManager.BpS3m7Qc.js} +2 -2
  29. package/dist/client/_astro/{UserCreateForm.D2dkK0S5.js → UserCreateForm.BYwgAqKk.js} +1 -1
  30. package/dist/client/_astro/{UsersManager.CUU4ncDR.js → UsersManager.DODMr48D.js} +1 -1
  31. package/dist/client/_astro/{WebhooksManager.DV2TWIOt.js → WebhooksManager.DmWIW272.js} +1 -1
  32. package/dist/client/_astro/ar.BCtMLfbL.js +1 -0
  33. package/dist/client/_astro/clone.oDfZEkVn.js +1 -0
  34. package/dist/client/_astro/es-ES.BfYd3kCv.js +1 -0
  35. package/dist/client/_astro/he.pQFPO6hc.js +1 -0
  36. package/dist/client/_astro/{i18n.BFBHzd3w.js → i18n.A82w5XQu.js} +1 -1
  37. package/dist/client/_astro/it.ZpeUogpB.js +1 -0
  38. package/dist/client/_astro/ja.Ch5X4gaR.js +1 -0
  39. package/dist/client/_astro/pl.DDgkAPXr.js +1 -0
  40. package/dist/client/_astro/{pt-BR.DB_qjzov.js → pt-BR.zZcF2v3X.js} +1 -1
  41. package/dist/client/_astro/ru.CAjJz8Cj.js +1 -0
  42. package/dist/client/_astro/sw.CehAEkRN.js +1 -0
  43. package/dist/client/_astro/tr.Sf1XkPHa.js +1 -0
  44. package/dist/client/_astro/uk.-2u2eOOq.js +1 -0
  45. package/dist/client/_astro/yo.os9m69tq.js +1 -0
  46. package/dist/client/_astro/zh-CN.Bt1lpQQu.js +1 -0
  47. package/dist/server/chunks/{404_BMps-rRP.mjs → 404_BjHJCErQ.mjs} +1 -1
  48. package/dist/server/chunks/{BaseLayout_eq-iwg5V.mjs → BaseLayout_DrIrAANk.mjs} +1 -1
  49. package/dist/server/chunks/{ContentEditor_CD80dY0I.mjs → ContentEditor_BhXk6xd0.mjs} +4 -3
  50. package/dist/server/chunks/{DashboardLayout_CrO_yWkB.mjs → DashboardLayout_DxMWAFCu.mjs} +2 -2
  51. package/dist/server/chunks/{FieldRenderer_BSvrsqN8.mjs → FieldRenderer_CD8prpXz.mjs} +3 -61
  52. package/dist/server/chunks/{MediaLibrary_BGZEgsua.mjs → MediaLibrary_BY9b_CPa.mjs} +2 -2
  53. package/dist/server/chunks/{Modal_QxIjzTdp.mjs → Modal_BmuvdwoB.mjs} +1 -1
  54. package/dist/server/chunks/{_id__BIPcYNtN.mjs → _id__BeIHLdfs.mjs} +2 -2
  55. package/dist/server/chunks/{_slug__XNFTP0Q1.mjs → _slug__Dsz2U4cu.mjs} +1 -1
  56. package/dist/server/chunks/{access_D-_mBK3K.mjs → access_ClmMoH40.mjs} +3 -3
  57. package/dist/server/chunks/{api-keys_z4-GVRaL.mjs → api-keys_DLbrSM4U.mjs} +3 -3
  58. package/dist/server/chunks/{ar_DObFFdrO.mjs → ar_Cgz1nkYN.mjs} +30 -3
  59. package/dist/server/chunks/clone_FT3Zf-Bf.mjs +59 -0
  60. package/dist/server/chunks/{comments_qCxr0Y8w.mjs → comments_Cg1jrxti.mjs} +2 -2
  61. package/dist/server/chunks/{custom-fields_Dp3OiD0S.mjs → custom-fields_CVJsfyk6.mjs} +2 -2
  62. package/dist/server/chunks/customize_BW-P44BY.mjs +1549 -0
  63. package/dist/server/chunks/{edit_BxXS3NT6.mjs → edit_DdmQd4K3.mjs} +2 -2
  64. package/dist/server/chunks/{es-ES_D6jd6T7H.mjs → es-ES_Bw0g3h9x.mjs} +30 -3
  65. package/dist/server/chunks/{he_DwGJwonL.mjs → he_BcJYW2q8.mjs} +30 -3
  66. package/dist/server/chunks/{i18n_jhv_lr6z.mjs → i18n_C-sgJSi1.mjs} +14 -13
  67. package/dist/server/chunks/{index_tQk65WtE.mjs → index_BSQio-Py.mjs} +2 -2
  68. package/dist/server/chunks/{index_DVQd057F.mjs → index_BktteRMy.mjs} +2 -2
  69. package/dist/server/chunks/{index_aa5_ET2K.mjs → index_Bv2fgBnE.mjs} +3 -3
  70. package/dist/server/chunks/{index_BuUzsa32.mjs → index_Bw0pBVRv.mjs} +2 -2
  71. package/dist/server/chunks/{index_CaR204jg.mjs → index_DxNPNwIw.mjs} +2 -2
  72. package/dist/server/chunks/{it_CMLpQyoj.mjs → it_CgOxhoxy.mjs} +30 -3
  73. package/dist/server/chunks/{ja_CYRz0pHv.mjs → ja_0swn1wUm.mjs} +30 -3
  74. package/dist/server/chunks/{login_JwlFuBYd.mjs → login_BCRPUCQz.mjs} +1 -1
  75. package/dist/server/chunks/{logs_td2w_HCW.mjs → logs_DlzM1kpI.mjs} +2 -2
  76. package/dist/server/chunks/{menus_Brbqh27T.mjs → menus_pMKatAHX.mjs} +2 -2
  77. package/dist/server/chunks/{new_M5jNG81S.mjs → new_B3cNZZO2.mjs} +2 -2
  78. package/dist/server/chunks/{new_aklFjYkE.mjs → new_C9JrPY2y.mjs} +2 -2
  79. package/dist/server/chunks/{pl_BuXVPvU1.mjs → pl_eLBKfEwP.mjs} +30 -3
  80. package/dist/server/chunks/{plugins_KhcXhLHj.mjs → plugins_BTPNe18c.mjs} +2 -2
  81. package/dist/server/chunks/{post-types_DD3nerIE.mjs → post-types_DIYWDXCR.mjs} +2 -2
  82. package/dist/server/chunks/{pt-BR_Barbcx-V.mjs → pt-BR_AVNE88MZ.mjs} +1 -0
  83. package/dist/server/chunks/{reading_ghF5feXj.mjs → reading_BBV5Dsg0.mjs} +2 -2
  84. package/dist/server/chunks/{ru_C56ltukG.mjs → ru_Dt3fMzac.mjs} +30 -3
  85. package/dist/server/chunks/{sw_Dhw0GAgD.mjs → sw_oPyQwKSK.mjs} +30 -3
  86. package/dist/server/chunks/{taxonomies_CsUEhmvC.mjs → taxonomies_G6ROt7Dn.mjs} +2 -2
  87. package/dist/server/chunks/{taxonomy_BfNm0HUh.mjs → taxonomy_B59mViQc.mjs} +4 -3
  88. package/dist/server/chunks/{themes_DnFB-Bio.mjs → themes_CygkZJbP.mjs} +6 -4
  89. package/dist/server/chunks/{tr_zELRy7A-.mjs → tr_DG1ipiJ0.mjs} +30 -3
  90. package/dist/server/chunks/{uk_DVOqp1x6.mjs → uk_DCWgX6k4.mjs} +30 -3
  91. package/dist/server/chunks/{upload_D5xS-Nri.mjs → upload_BOPk3diJ.mjs} +2 -2
  92. package/dist/server/chunks/{webhooks_B_6eHrir.mjs → webhooks_BiHf1cMk.mjs} +2 -2
  93. package/dist/server/chunks/{yo_BqgZcoxs.mjs → yo_DsFzhH21.mjs} +30 -3
  94. package/dist/server/chunks/{zh-CN_Dz2D1XUc.mjs → zh-CN_OaG8XYVK.mjs} +30 -3
  95. package/dist/server/entry.mjs +28 -28
  96. package/dist/server/virtual_astro_middleware.mjs +1 -1
  97. package/package.json +1 -1
  98. package/dist/client/_astro/ContentEditor.C0RpyhzW.js +0 -1
  99. package/dist/client/_astro/FieldRenderer.BjnbGFPe.js +0 -3
  100. package/dist/client/_astro/TaxonomyTermsManager.CvCxMf0u.js +0 -1
  101. package/dist/client/_astro/ThemeCustomizer.BIct4Scf.js +0 -49
  102. package/dist/client/_astro/ar.BeEmOTlL.js +0 -1
  103. package/dist/client/_astro/es-ES.C0DI0CK6.js +0 -1
  104. package/dist/client/_astro/he.RF4swhtn.js +0 -1
  105. package/dist/client/_astro/it.DhCR9YsW.js +0 -1
  106. package/dist/client/_astro/ja.DPrxHQvU.js +0 -1
  107. package/dist/client/_astro/pl.6VCoPa7y.js +0 -1
  108. package/dist/client/_astro/ru.Cv0Z6X2y.js +0 -1
  109. package/dist/client/_astro/sw.BBMIgY-Y.js +0 -1
  110. package/dist/client/_astro/tr.BWEmWhCE.js +0 -1
  111. package/dist/client/_astro/uk.DDXJXOmn.js +0 -1
  112. package/dist/client/_astro/yo.DNoEBLJd.js +0 -1
  113. package/dist/client/_astro/zh-CN.CVKBB6Ky.js +0 -1
  114. package/dist/server/chunks/customize_zTqT6Yj2.mjs +0 -233
@@ -1,4 +1,4 @@
1
- import{D as e,S as t,T as n,a as r,b as i,c as a,d as o,f as s,h as c,i as l,l as u,p as d,r as f,s as p,u as m,x as h}from"./solid.Ck4Vtfe4.js";import{_ as g,a as _,f as v,i as y,l as b,m as x,o as S,p as C,r as w,s as T,t as E,u as D,v as O}from"./web.DD6VKaIp.js";import{n as k}from"./i18n.BFBHzd3w.js";import{t as ee}from"./preload-helper.oCYlU9a4.js";import{n as A}from"./api.53l1ob4Z.js";import{t as te}from"./FloatingPanel.BetdW5N2.js";import{t as ne}from"./lucide.s17cczpi.js";import{t as re}from"./iconsAndAliases.ujTnkhnl.js";import{t as ie}from"./FbIcon.Bn4e_qFb.js";var ae=g(`<div class=fb-tabs><div class=fb-tabs__list role=tablist></div><div class=fb-tabs__panel role=tabpanel>`),oe=g(`<span class=fb-tabs__badge>`),se=g(`<button type=button role=tab class=fb-tabs__tab><span></span><!$><!/>`);function ce(e){return(()=>{var t=S(ae),n=t.firstChild,i=n.nextSibling;return b(n,u(f,{get each(){return e.tabs},children:t=>(()=>{var n=S(se),i=n.firstChild,a=i.nextSibling,[o,s]=T(a.nextSibling);return n.$$click=()=>e.onChange(t.id),b(i,()=>t.label),b(n,u(r,{get when(){return t.badge},get children(){var e=S(oe);return b(e,()=>t.badge),e}}),o,s),d(r=>{var i=e.active===t.id,a=!!t.disabled,o=e.active===t.id,s=t.disabled;return i!==r.e&&n.classList.toggle(`is-active`,r.e=i),a!==r.t&&n.classList.toggle(`is-disabled`,r.t=a),o!==r.a&&C(n,`aria-selected`,r.a=o),s!==r.o&&x(n,`disabled`,r.o=s),r},{e:void 0,t:void 0,a:void 0,o:void 0}),v(),n})()})),b(i,()=>e.children),d(()=>C(n,`aria-label`,e.ariaLabel)),t})()}_([`click`]);var le=Symbol.for(`preact-signals`);function ue(){if(P>1){P--;return}let e,t=!1;for((function(){let e=pe;for(pe=void 0;e!==void 0;){let t=e.S;if(t.v===e.v)for(let n=t.t;n!==void 0;n=n.x)n.i===e.i&&(n.i=t.i);e=e.o}})();fe!==void 0;){let n=fe;for(fe=void 0,me++;n!==void 0;){let r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&be(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(me=0,P--,t)throw e}function j(e){if(P>0)return e();ge=++he,P++;try{return e()}finally{ue()}}var M,de,fe;function N(e){let t=M,n=de;M=void 0,de=void 0;try{return e()}finally{M=t,de=n}}var pe,P=0,me=0,he=0,ge=0,_e=0;function ve(e){if(M===void 0)return;let t=e.n;if(t===void 0||t.t!==M)return t={i:0,S:e,p:M.s,n:void 0,t:M,e:void 0,x:void 0,r:t},M.s!==void 0&&(M.s.n=t),M.s=t,e.n=t,32&M.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=M.s,t.n=void 0,M.s.n=t,M.s=t),t}function F(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}F.prototype.brand=le,F.prototype.h=function(){return!0},F.prototype.S=function(e){let t=this.t;t!==e&&e.e===void 0&&(e.x=t,this.t=e,t===void 0?N(()=>{var e;(e=this.W)==null||e.call(this)}):t.e=e)},F.prototype.U=function(e){if(this.t!==void 0){let t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n,n===void 0&&N(()=>{var e;(e=this.Z)==null||e.call(this)}))}},F.prototype.subscribe=function(e){return ke(()=>{let t=this.value;N(()=>e(t))},{name:`sub`})},F.prototype.valueOf=function(){return this.value},F.prototype.toString=function(){return this.value+``},F.prototype.toJSON=function(){return this.value},F.prototype.peek=function(){return N(()=>this.value)},Object.defineProperty(F.prototype,"value",{get(){let e=ve(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(me>100)throw Error(`Cycle detected`);(function(e){P!==0&&me===0&&e.l!==ge&&(e.l=ge,pe={S:e,v:e.v,i:e.i,o:pe})})(this),this.v=e,this.i++,_e++,P++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{ue()}}}});function ye(e,t){return new F(e,t)}function be(e){for(let t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function xe(e){for(let t=e.s;t!==void 0;t=t.n){let n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Se(e){let t,n=e.s;for(;n!==void 0;){let e=n.p;n.i===-1?(n.S.U(n),e!==void 0&&(e.n=n.n),n.n!==void 0&&(n.n.p=e)):t=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=e}e.s=t}function Ce(e,t){F.call(this,void 0,t),this.x=e,this.s=void 0,this.g=_e-1,this.f=4}Ce.prototype=new F,Ce.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===_e))return!0;if(this.g=_e,this.f|=1,this.i>0&&!be(this))return this.f&=-2,!0;let e=M;try{xe(this),M=this;let e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return M=e,Se(this),this.f&=-2,!0},Ce.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(let e=this.s;e!==void 0;e=e.n)e.S.S(e)}F.prototype.S.call(this,e)},Ce.prototype.U=function(e){if(this.t!==void 0&&(F.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(let e=this.s;e!==void 0;e=e.n)e.S.U(e)}},Ce.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Ce.prototype,"value",{get(){if(1&this.f)throw Error(`Cycle detected`);let e=ve(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function we(e,t){return new Ce(e,t)}function Te(e){let t=e.m;if(e.m=void 0,typeof t==`function`){P++;let n=M;M=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,Ee(e),t}finally{M=n,ue()}}}function Ee(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Te(e)}function De(e){if(M!==this)throw Error(`Out-of-order effect`);Se(this),M=e,this.f&=-2,8&this.f&&Ee(this),ue()}function Oe(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,de&&de.push(this)}Oe.prototype.c=function(){let e=this.S();try{if(8&this.f||this.x===void 0)return;let e=this.x();typeof e==`function`&&(this.m=e)}finally{e()}},Oe.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,Te(this),xe(this),P++;let e=M;return M=this,De.bind(this,e)},Oe.prototype.N=function(){2&this.f||(this.f|=2,this.u=fe,fe=this)},Oe.prototype.d=function(){this.f|=8,1&this.f||Ee(this)},Oe.prototype.dispose=function(){this.d()};function ke(e,t){let n=new Oe(e,t);try{n.c()}catch(e){throw n.d(),e}let r=n.d.bind(n);return r[Symbol.dispose]=r,r}var Ae=Object.create,je=Object.defineProperty,Me=Object.defineProperties,Ne=Object.getOwnPropertyDescriptor,Pe=Object.getOwnPropertyDescriptors,Fe=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,Re=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),ze=e=>{throw TypeError(e)},Be=(e,t,n)=>t in e?je(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ve=(e,t)=>{for(var n in t||={})Ie.call(t,n)&&Be(e,n,t[n]);if(Fe)for(var n of Fe(t))Le.call(t,n)&&Be(e,n,t[n]);return e},He=(e,t)=>Me(e,Pe(t)),Ue=(e,t)=>je(e,`name`,{value:t,configurable:!0}),We=e=>[,,,Ae(e?.[Re(`metadata`)]??null)],Ge=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],Ke=e=>e!==void 0&&typeof e!=`function`?ze(`Function expected`):e,qe=(e,t,n,r,i)=>({kind:Ge[e],name:t,metadata:r,addInitializer:e=>n._?ze(`Already initialized`):i.push(Ke(e||null))}),Je=(e,t)=>Be(t,Re(`metadata`),e[3]),Ye=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i<o;i++)t&1?a[i].call(n):r=a[i].call(n,r);return r},Xe=(e,t,n,r,i,a)=>{var o,s,c,l,u,d=t&7,f=!!(t&8),p=!!(t&16),m=d>3?e.length+1:d?f?1:2:0,h=Ge[d+5],g=d>3&&(e[m-1]=[]),_=e[m]||(e[m]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&Ne(d<4?i:{get[n](){return $e(this,a)},set[n](e){return tt(this,a,e)}},n));d?p&&d<4&&Ue(a,(d>2?`set `:d>1?`get `:``)+n):Ue(i,n);for(var y=r.length-1;y>=0;y--)l=qe(d,n,c={},e[3],_),d&&(l.static=f,l.private=p,u=l.access={has:p?e=>Qe(i,e):e=>n in e},d^3&&(u.get=p?e=>(d^1?$e:nt)(e,i,d^4?a:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>tt(e,i,t,d^4?a:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?p?a:v[h]:d>4?void 0:{get:v.get,set:v.set}:i,l),c._=1,d^4||s===void 0?Ke(s)&&(d>4?g.unshift(s):d?p?a=s:v[h]=s:i=s):typeof s!=`object`||!s?ze(`Object expected`):(Ke(o=s.get)&&(v.get=o),Ke(o=s.set)&&(v.set=o),Ke(o=s.init)&&g.unshift(o));return d||Je(e,i),v&&je(i,n,v),p?d^4?a:v:i},Ze=(e,t,n)=>t.has(e)||ze(`Cannot `+n),Qe=(e,t)=>Object(t)===t?e.has(t):ze(`Cannot use the "in" operator on this value`),$e=(e,t,n)=>(Ze(e,t,`read from private field`),n?n.call(e):t.get(e)),et=(e,t,n)=>t.has(e)?ze(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),tt=(e,t,n,r)=>(Ze(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),nt=(e,t,n)=>(Ze(e,t,`access private method`),n);function rt(e,t){if(t){let n;return we(()=>{let r=e();return r&&n&&t(n,r)?n:(n=r,r)})}return we(e)}function it(e,t){if(Object.is(e,t))return!0;if(e===null||t===null)return!1;if(typeof e==`function`&&typeof t==`function`)return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:!e.some((e,n)=>!it(e,t[n]));if(typeof e==`object`&&typeof t==`object`){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(n=>!it(e[n],t[n]))}return!1}function I({get:e},t){return{init(e){return ye(e)},get(){return e.call(this).value},set(t){let n=e.call(this);n.peek()!==t&&(n.value=t)}}}function L(e,t){let n=new WeakMap;return function(){let t=n.get(this);return t||(t=rt(e.bind(this)),n.set(this,t)),t.value}}function at(e=!0){return function(t,n){n.addInitializer(function(){let t=n.kind===`field`||n.static?this:Object.getPrototypeOf(this),r=Object.getOwnPropertyDescriptor(t,n.name);r&&Object.defineProperty(t,n.name,He(Ve({},r),{enumerable:e}))})}}function ot(...e){let t=e.map(e=>ke(e));return()=>t.forEach(e=>e())}var st,ct,lt,ut,dt,ft=[I],R,pt,mt,ht,gt,z,_t,vt,yt,bt,xt,St,Ct,wt;dt=[I],ut=[I],lt=[at()],ct=[at()],st=[at()];var Tt=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,Ye(R,5,this),et(this,z),et(this,pt,Ye(R,8,this)),Ye(R,11,this),et(this,_t,Ye(R,12,this)),Ye(R,15,this),et(this,xt,Ye(R,16,this)),Ye(R,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return $e(this,z,Ct)}get initial(){return $e(this,z,ht)}get previous(){return $e(this,z,yt)}set current(e){let t=N(()=>$e(this,z,Ct));e&&t&&this.equals(t,e)||j(()=>{$e(this,z,ht)||tt(this,z,e,gt),tt(this,z,t,bt),tt(this,z,e,wt)})}reset(e=this.defaultValue){j(()=>{tt(this,z,void 0,bt),tt(this,z,e,gt),tt(this,z,e,wt)})}};R=We(null),pt=new WeakMap,z=new WeakSet,_t=new WeakMap,xt=new WeakMap,mt=Xe(R,20,`#initial`,ft,z,pt),ht=mt.get,gt=mt.set,vt=Xe(R,20,`#previous`,dt,z,_t),yt=vt.get,bt=vt.set,St=Xe(R,20,`#current`,ut,z,xt),Ct=St.get,wt=St.set,Xe(R,2,`current`,lt,Tt),Xe(R,2,`initial`,ct,Tt),Xe(R,2,`previous`,st,Tt),Je(R,Tt);function Et(e){return N(()=>{let t={};for(let n in e)t[n]=e[n];return t})}var Dt,Ot=class{constructor(){et(this,Dt,new WeakMap)}get(e,t){return e?$e(this,Dt).get(e)?.get(t):void 0}set(e,t,n){if(e)return $e(this,Dt).has(e)||$e(this,Dt).set(e,new Map),$e(this,Dt).get(e)?.set(t,n)}clear(e){return e?$e(this,Dt).get(e)?.clear():void 0}};Dt=new WeakMap;var kt=Object.create,At=Object.defineProperty,jt=Object.getOwnPropertyDescriptor,Mt=Object.getOwnPropertySymbols,Nt=Object.prototype.hasOwnProperty,Pt=Object.prototype.propertyIsEnumerable,Ft=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),It=e=>{throw TypeError(e)},Lt=Math.pow,Rt=(e,t,n)=>t in e?At(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zt=(e,t)=>{for(var n in t||={})Nt.call(t,n)&&Rt(e,n,t[n]);if(Mt)for(var n of Mt(t))Pt.call(t,n)&&Rt(e,n,t[n]);return e},Bt=(e,t)=>At(e,`name`,{value:t,configurable:!0}),Vt=e=>[,,,kt(e?.[Ft(`metadata`)]??null)],Ht=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],Ut=e=>e!==void 0&&typeof e!=`function`?It(`Function expected`):e,Wt=(e,t,n,r,i)=>({kind:Ht[e],name:t,metadata:r,addInitializer:e=>n._?It(`Already initialized`):i.push(Ut(e||null))}),Gt=(e,t)=>Rt(t,Ft(`metadata`),e[3]),Kt=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i<o;i++)t&1?a[i].call(n):r=a[i].call(n,r);return r},qt=(e,t,n,r,i,a)=>{var o,s,c,l,u,d=t&7,f=!!(t&8),p=!!(t&16),m=d>3?e.length+1:d?f?1:2:0,h=Ht[d+5],g=d>3&&(e[m-1]=[]),_=e[m]||(e[m]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&jt(d<4?i:{get[n](){return Xt(this,a)},set[n](e){return Qt(this,a,e)}},n));d?p&&d<4&&Bt(a,(d>2?`set `:d>1?`get `:``)+n):Bt(i,n);for(var y=r.length-1;y>=0;y--)l=Wt(d,n,c={},e[3],_),d&&(l.static=f,l.private=p,u=l.access={has:p?e=>Yt(i,e):e=>n in e},d^3&&(u.get=p?e=>(d^1?Xt:$t)(e,i,d^4?a:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>Qt(e,i,t,d^4?a:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?p?a:v[h]:d>4?void 0:{get:v.get,set:v.set}:i,l),c._=1,d^4||s===void 0?Ut(s)&&(d>4?g.unshift(s):d?p?a=s:v[h]=s:i=s):typeof s!=`object`||!s?It(`Object expected`):(Ut(o=s.get)&&(v.get=o),Ut(o=s.set)&&(v.set=o),Ut(o=s.init)&&g.unshift(o));return d||Gt(e,i),v&&At(i,n,v),p?d^4?a:v:i},Jt=(e,t,n)=>t.has(e)||It(`Cannot `+n),Yt=(e,t)=>Object(t)===t?e.has(t):It(`Cannot use the "in" operator on this value`),Xt=(e,t,n)=>(Jt(e,t,`read from private field`),n?n.call(e):t.get(e)),Zt=(e,t,n)=>t.has(e)?It(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),Qt=(e,t,n,r)=>(Jt(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),$t=(e,t,n)=>(Jt(e,t,`access private method`),n),en=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},tn=class e{constructor(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,n){let{top:r,left:i,width:a,height:o,scale:s}=this,c=new e(i+t,r+n,a,o);return c.scale=zt({},s),c}get boundingRectangle(){let{width:e,height:t,left:n,top:r,right:i,bottom:a}=this;return{width:e,height:t,left:n,top:r,right:i,bottom:a}}get center(){let{left:e,top:t,right:n,bottom:r}=this;return new en((e+n)/2,(t+r)/2)}get area(){let{width:e,height:t}=this;return e*t}equals(t){if(!(t instanceof e))return!1;let{left:n,top:r,width:i,height:a}=this;return n===t.left&&r===t.top&&i===t.width&&a===t.height}containsPoint(e){let{top:t,left:n,bottom:r,right:i}=this;return t<=e.y&&e.y<=r&&n<=e.x&&e.x<=i}intersectionArea(t){return t instanceof e?nn(this,t):0}intersectionRatio(e){let{area:t}=this,n=this.intersectionArea(e);return n/(e.area+t-n)}get bottom(){let{top:e,height:t}=this;return e+t}get right(){let{left:e,width:t}=this;return e+t}get aspectRatio(){let{width:e,height:t}=this;return e/t}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:n,width:r,height:i}){return new e(n,t,r,i)}static delta(e,t,n={x:`center`,y:`center`}){let r=(e,t)=>{let r=n[t],i=t===`x`?e.left:e.top,a=t===`x`?e.width:e.height;return r==`start`?i:r==`end`?i+a:i+a/2};return en.delta({x:r(e,`x`),y:r(e,`y`)},{x:r(t,`x`),y:r(t,`y`)})}static intersectionRatio(t,n){return e.from(t).intersectionRatio(e.from(n))}};function nn(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;return r<i&&n<a?o*s:0}var rn,an,on,sn,cn,ln=class extends (on=Tt,an=[L],rn=[L],on){constructor(e){let t=en.from(e);super(t,(e,t)=>en.equals(e,t)),Kt(cn,5,this),Zt(this,sn,0),this.velocity={x:0,y:0}}get delta(){return en.delta(this.current,this.initial)}get direction(){let{current:e,previous:t}=this;if(!t)return null;let n={x:e.x-t.x,y:e.y-t.y};return!n.x&&!n.y?null:Math.abs(n.x)>Math.abs(n.y)?n.x>0?`right`:`left`:n.y>0?`down`:`up`}get current(){return super.current}set current(e){let{current:t}=this,n=en.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),a=i-Xt(this,sn),o=e=>Math.round(e/a*100);j(()=>{Qt(this,sn,i),this.velocity={x:o(r.x),y:o(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(en.from(e)),this.velocity={x:0,y:0}}};cn=Vt(on),sn=new WeakMap,qt(cn,2,`delta`,an,ln),qt(cn,2,`direction`,rn,ln),Gt(cn,ln);function un({x:e,y:t},n){let r=Math.abs(e),i=Math.abs(t);return typeof n==`number`?Math.sqrt(Lt(r,2)+Lt(i,2))>n:`x`in n&&`y`in n?r>n.x&&i>n.y:`x`in n?r>n.x:`y`in n&&i>n.y}var dn=(e=>(e.Horizontal=`x`,e.Vertical=`y`,e))(dn||{}),fn=Object.values(dn),pn=Object.create,mn=Object.defineProperty,hn=Object.defineProperties,gn=Object.getOwnPropertyDescriptor,_n=Object.getOwnPropertyDescriptors,vn=Object.getOwnPropertySymbols,yn=Object.prototype.hasOwnProperty,bn=Object.prototype.propertyIsEnumerable,xn=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),Sn=e=>{throw TypeError(e)},Cn=(e,t,n)=>t in e?mn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wn=(e,t)=>{for(var n in t||={})yn.call(t,n)&&Cn(e,n,t[n]);if(vn)for(var n of vn(t))bn.call(t,n)&&Cn(e,n,t[n]);return e},Tn=(e,t)=>hn(e,_n(t)),En=(e,t)=>mn(e,`name`,{value:t,configurable:!0}),Dn=(e,t)=>{var n={};for(var r in e)yn.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&vn)for(var r of vn(e))t.indexOf(r)<0&&bn.call(e,r)&&(n[r]=e[r]);return n},On=e=>[,,,pn(e?.[xn(`metadata`)]??null)],kn=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],An=e=>e!==void 0&&typeof e!=`function`?Sn(`Function expected`):e,jn=(e,t,n,r,i)=>({kind:kn[e],name:t,metadata:r,addInitializer:e=>n._?Sn(`Already initialized`):i.push(An(e||null))}),Mn=(e,t)=>Cn(t,xn(`metadata`),e[3]),B=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i<o;i++)t&1?a[i].call(n):r=a[i].call(n,r);return r},V=(e,t,n,r,i,a)=>{var o,s,c,l,u,d=t&7,f=!!(t&8),p=!!(t&16),m=d>3?e.length+1:d?f?1:2:0,h=kn[d+5],g=d>3&&(e[m-1]=[]),_=e[m]||(e[m]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&gn(d<4?i:{get[n](){return H(this,a)},set[n](e){return Fn(this,a,e)}},n));d?p&&d<4&&En(a,(d>2?`set `:d>1?`get `:``)+n):En(i,n);for(var y=r.length-1;y>=0;y--)l=jn(d,n,c={},e[3],_),d&&(l.static=f,l.private=p,u=l.access={has:p?e=>Pn(i,e):e=>n in e},d^3&&(u.get=p?e=>(d^1?H:In)(e,i,d^4?a:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>Fn(e,i,t,d^4?a:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?p?a:v[h]:d>4?void 0:{get:v.get,set:v.set}:i,l),c._=1,d^4||s===void 0?An(s)&&(d>4?g.unshift(s):d?p?a=s:v[h]=s:i=s):typeof s!=`object`||!s?Sn(`Object expected`):(An(o=s.get)&&(v.get=o),An(o=s.set)&&(v.set=o),An(o=s.init)&&g.unshift(o));return d||Mn(e,i),v&&mn(i,n,v),p?d^4?a:v:i},Nn=(e,t,n)=>t.has(e)||Sn(`Cannot `+n),Pn=(e,t)=>Object(t)===t?e.has(t):Sn(`Cannot use the "in" operator on this value`),H=(e,t,n)=>(Nn(e,t,`read from private field`),n?n.call(e):t.get(e)),U=(e,t,n)=>t.has(e)?Sn(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),Fn=(e,t,n,r)=>(Nn(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),In=(e,t,n)=>(Nn(e,t,`access private method`),n);function Ln(e,t){return{plugin:e,options:t}}function Rn(e){return t=>Ln(e,t)}function zn(e){return typeof e==`function`?{plugin:e,options:void 0}:e}var Bn=[I],Vn,Hn,Un,W=class{constructor(e,t){this.manager=e,this.options=t,U(this,Hn,B(Vn,8,this,!1)),B(Vn,11,this),U(this,Un,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return N(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){let t=ke(e.bind(this));return H(this,Un).add(t),t}destroy(){H(this,Un).forEach(e=>e())}static configure(e){return Ln(this,e)}};Vn=On(null),Hn=new WeakMap,Un=new WeakMap,V(Vn,4,`disabled`,Bn,W,Hn),Mn(Vn,W);var Wn=class extends W{},Gn,Kn=class{constructor(e){this.manager=e,this.instances=new Map,U(this,Gn,[])}get values(){return Array.from(this.instances.values())}set values(e){let t=e.map(zn).reduce((e,t)=>{let n=e.find(({plugin:e})=>e===t.plugin);return n?(n.options=t.options,e):[...e,t]},[]),n=t.map(({plugin:e})=>e);for(let e of H(this,Gn))if(!n.includes(e)){if(e.prototype instanceof Wn)continue;this.unregister(e)}for(let{plugin:e,options:n}of t)this.register(e,n);Fn(this,Gn,n)}get(e){return this.instances.get(e)}register(e,t){let n=this.instances.get(e);if(n)return n.options!==t&&(n.options=t),n;let r=new e(this.manager,t);return this.instances.set(e,r),r}unregister(e){let t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(let e of this.instances.values())e.destroy();this.instances.clear()}};Gn=new WeakMap;function qn(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}var Jn=[],Yn,Xn,Zn=class extends W{constructor(e){super(e),U(this,Yn),U(this,Xn),this.computeCollisions=this.computeCollisions.bind(this),Fn(this,Xn,ye(Jn)),this.destroy=ot(()=>{let e=this.computeCollisions(),t=N(()=>this.manager.dragOperation.position.current);if(e!==Jn){let e=H(this,Yn);if(Fn(this,Yn,t),e&&t.x==e.x&&t.y==e.y)return}else Fn(this,Yn,void 0);H(this,Xn).value=e},()=>{let{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){N(()=>{e?H(this,Xn).value=this.computeCollisions():Fn(this,Yn,void 0)})}computeCollisions(e,t){let{registry:n,dragOperation:r}=this.manager,{source:i,shape:a,status:o}=r;if(!o.initialized||!a)return Jn;let s=[],c=[];for(let a of e??n.droppables){if(a.disabled||i&&!a.accepts(i))continue;let e=t??a.collisionDetector;if(!e)continue;c.push(a),a.shape;let n=N(()=>e({droppable:a,dragOperation:r}));n&&(a.collisionPriority!=null&&(n.priority=a.collisionPriority),s.push(n))}return c.length===0?Jn:(s.sort(qn),s)}get collisions(){return H(this,Xn).value}};Yn=new WeakMap,Xn=new WeakMap;var Qn,$n,er=[I],tr,nr,rr,ir,ar,or,sr;$n=[I],Qn=[I];var cr=class e{constructor(e,t){U(this,ir,B(rr,8,this)),B(rr,11,this),U(this,ar),U(this,or,B(rr,12,this)),B(rr,15,this),U(this,sr,B(rr,16,this)),B(rr,19,this);let{effects:n,id:r,data:i={},disabled:a=!1,register:o=!0}=e,s=r;Fn(this,ar,ye(r)),this.manager=t,this.data=i,this.disabled=a,this.effects=()=>[()=>{let{id:e,manager:t}=this;if(e!==s)return s=e,t?.registry.register(this),()=>t?.registry.unregister(this)},...n?.()??[]],this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),t&&o&&queueMicrotask(this.register)}get id(){let t=H(this,ar).value;return e.pendingIdChanges?.get(this)??t}set id(t){t!==(e.pendingIdChanges?.get(this)??H(this,ar).peek())&&(e.pendingIdChanges||(e.pendingIdChanges=new Map,queueMicrotask(()=>{var t;return In(t=e,tr,nr).call(t)})),e.pendingIdChanges.set(this,t))}register(){return this.manager?.registry.register(this)}unregister(){var e;(e=this.manager)==null||e.registry.unregister(this)}destroy(){var e;(e=this.manager)==null||e.registry.unregister(this)}};rr=On(null),tr=new WeakSet,nr=function(){let e=cr.pendingIdChanges;cr.pendingIdChanges=null,e&&j(()=>{for(let[t,n]of e)H(t,ar).value=n})},ir=new WeakMap,ar=new WeakMap,or=new WeakMap,sr=new WeakMap,V(rr,4,`manager`,er,cr,ir),V(rr,4,`data`,$n,cr,or),V(rr,4,`disabled`,Qn,cr,sr),U(cr,tr),Mn(rr,cr),cr.pendingIdChanges=null;var lr=cr,ur=class{constructor(){this.map=ye(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{let n=this.map.peek(),r=n.get(e),i=()=>this.unregister(e,t);if(r===t)return i;r&&r.id===e&&(this.cleanupFunctions.get(r)?.(),this.cleanupFunctions.delete(r));let a=new Map(n);for(let[r,i]of n)if(i===t&&r!==e){a.delete(r);break}a.set(e,t),this.map.value=a;let o=ot(...t.effects());return this.cleanupFunctions.set(t,o),i},this.unregister=(e,t)=>{let n=this.map.peek();if(n.get(e)!==t)return;this.cleanupFunctions.get(t)?.(),this.cleanupFunctions.delete(t);let r=new Map(n);r.delete(e),this.map.value=r}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(e){return this.map.value.has(e)}get(e){return this.map.value.get(e)}destroy(){for(let e of this)this.cleanupFunctions.get(e)?.(),e.destroy();this.map.value=new Map}},dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr=class extends (_r=lr,gr=[I],hr=[I],mr=[I],pr=[L],fr=[L],dr=[L],_r){constructor(e,t){var n=e,{modifiers:r,type:i,sensors:a,plugins:o,effects:s}=n,c=Dn(n,[`modifiers`,`type`,`sensors`,`plugins`,`effects`]);super(Tn(wn({},c),{effects:()=>[...s?.()??[],()=>{let{manager:e,plugins:t}=this;if(e&&t)for(let n of t){let{plugin:t}=zn(n);e.registry.plugins.register(t)}}]}),t),B(vr,5,this),U(this,yr,B(vr,8,this)),B(vr,11,this),U(this,br,B(vr,12,this)),B(vr,15,this),U(this,xr,B(vr,16,this,this.isDragSource?`dragging`:`idle`)),B(vr,19,this),this.type=i,this.sensors=a,this.modifiers=r,this.alignment=c.alignment,this.plugins=o}pluginConfig(e){if(this.plugins)for(let t of this.plugins){let n=zn(t);if(n.plugin===e)return n.options}}get isDropping(){return this.status===`dropping`&&this.isDragSource}get isDragging(){return this.status===`dragging`&&this.isDragSource}get isDragSource(){return this.manager?.dragOperation.source?.id===this.id}};vr=On(_r),yr=new WeakMap,br=new WeakMap,xr=new WeakMap,V(vr,4,`type`,gr,Sr,yr),V(vr,4,`modifiers`,hr,Sr,br),V(vr,4,`status`,mr,Sr,xr),V(vr,2,`isDropping`,pr,Sr),V(vr,2,`isDragging`,fr,Sr),V(vr,2,`isDragSource`,dr,Sr),Mn(vr,Sr);var Cr,wr,Tr,Er,Dr,Or,kr,G,Ar,jr,Mr,Nr,Pr,Fr=class extends (kr=lr,Or=[I],Dr=[I],Er=[I],Tr=[I],wr=[I],Cr=[L],kr){constructor(e,t){var n=e,{accept:r,collisionDetector:i,collisionPriority:a,type:o}=n,s=Dn(n,[`accept`,`collisionDetector`,`collisionPriority`,`type`]);super(s,t),B(G,5,this),U(this,Ar,B(G,8,this)),B(G,11,this),U(this,jr,B(G,12,this)),B(G,15,this),U(this,Mr,B(G,16,this)),B(G,19,this),U(this,Nr,B(G,20,this)),B(G,23,this),U(this,Pr,B(G,24,this)),B(G,27,this),this.accept=r,this.collisionDetector=i,this.collisionPriority=a,this.type=o}accepts(e){let{accept:t}=this;return t?typeof t==`function`?t(e):e.type?Array.isArray(t)?t.includes(e.type):e.type===t:!1:!0}get isDropTarget(){return this.manager?.dragOperation.target?.id===this.id}};G=On(kr),Ar=new WeakMap,jr=new WeakMap,Mr=new WeakMap,Nr=new WeakMap,Pr=new WeakMap,V(G,4,`accept`,Or,Fr,Ar),V(G,4,`type`,Dr,Fr,jr),V(G,4,`collisionDetector`,Er,Fr,Mr),V(G,4,`collisionPriority`,Tr,Fr,Nr),V(G,4,`shape`,wr,Fr,Pr),V(G,2,`isDropTarget`,Cr,Fr),Mn(G,Fr);var Ir=class{constructor(){this.registry=new Map}addEventListener(e,t){let{registry:n}=this,r=new Set(n.get(e));return r.add(t),n.set(e,r),()=>this.removeEventListener(e,t)}removeEventListener(e,t){let{registry:n}=this,r=new Set(n.get(e));r.delete(t),n.set(e,r)}dispatch(e,...t){let{registry:n}=this,r=n.get(e);if(r)for(let e of r)e(...t)}},Lr=class extends Ir{constructor(e){super(),this.manager=e}dispatch(e,t){let n=[t,this.manager];super.dispatch(e,...n)}};function Rr(e,t=!0){let n=!1;return Tn(wn({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var zr=class extends Wn{constructor(e){super(e);let t=(e,t)=>e.map(({id:e})=>e).join(``)===t.map(({id:e})=>e).join(``),n=[];this.destroy=ot(()=>{let{dragOperation:t,collisionObserver:r}=e;t.status.initializing&&(n=[],r.enable())},()=>{let{collisionObserver:r,monitor:i}=e,{collisions:a}=r;if(r.isDisabled()||lr.pendingIdChanges)return;let o=Rr({collisions:a});if(i.dispatch(`collision`,o),o.defaultPrevented||t(a,n))return;n=a;let[s]=a;N(()=>{s?.id!==e.dragOperation.target?.id&&(r.disable(),e.actions.setDropTarget(s?.id).then(()=>{r.enable()}))})})}},Br=(e=>(e[e.Lowest=0]=`Lowest`,e[e.Low=1]=`Low`,e[e.Normal=2]=`Normal`,e[e.High=3]=`High`,e[e.Highest=4]=`Highest`,e))(Br||{}),Vr=(e=>(e[e.Collision=0]=`Collision`,e[e.ShapeIntersection=1]=`ShapeIntersection`,e[e.PointerIntersection=2]=`PointerIntersection`,e))(Vr||{}),Hr,Ur,Wr,Gr,Kr,qr,Jr=[I],Yr,Xr;qr=[L],Kr=[L],Gr=[L],Wr=[L],Ur=[L],Hr=[L];var Zr=class{constructor(){B(Yr,5,this),U(this,Xr,B(Yr,8,this,`idle`)),B(Yr,11,this)}get current(){return this.value}get idle(){return this.value===`idle`}get initializing(){return this.value===`initializing`}get initialized(){let{value:e}=this;return e!==`idle`&&e!==`initialization-pending`}get dragging(){return this.value===`dragging`}get dropped(){return this.value===`dropped`}set(e){this.value=e}};Yr=On(null),Xr=new WeakMap,V(Yr,4,`value`,Jr,Zr,Xr),V(Yr,2,`current`,qr,Zr),V(Yr,2,`idle`,Kr,Zr),V(Yr,2,`initializing`,Gr,Zr),V(Yr,2,`initialized`,Wr,Zr),V(Yr,2,`dragging`,Ur,Zr),V(Yr,2,`dropped`,Hr,Zr),Mn(Yr,Zr);var Qr=class{constructor(e){this.manager=e}setDragSource(e){let{dragOperation:t}=this.manager;t.sourceIdentifier=typeof e==`string`||typeof e==`number`?e:e.id}setDropTarget(e){return N(()=>{let{dragOperation:t}=this.manager,n=e??null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;let r=Rr({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch(`dragover`,r),this.manager.renderer.rendering.then(()=>r.defaultPrevented)})}start(e){return N(()=>{let{dragOperation:t}=this.manager;if(e.source!=null&&this.setDragSource(e.source),!t.source)throw Error(`Cannot start a drag operation without a drag source`);if(!t.status.idle)throw Error(`Cannot start a drag operation while another is active`);let n=new AbortController,{event:r,coordinates:i}=e;j(()=>{t.status.set(`initialization-pending`),t.shape=null,t.canceled=!1,t.activatorEvent=r??null,t.position.reset(i)});let a=Rr({operation:t.snapshot()});return this.manager.monitor.dispatch(`beforedragstart`,a),a.defaultPrevented?(t.reset(),n.abort(),n):(t.status.set(`initializing`),t.controller=n,this.manager.renderer.rendering.then(()=>{if(n.signal.aborted)return;let{status:e}=t;e.current===`initializing`&&j(()=>{t.status.set(`dragging`),this.manager.monitor.dispatch(`dragstart`,{nativeEvent:r,operation:t.snapshot(),cancelable:!1})})}),n)})}move(e){return N(()=>{let{dragOperation:t}=this.manager,{status:n,controller:r}=t;if(!n.dragging||!r||r.signal.aborted)return;let i=Rr({nativeEvent:e.event,operation:t.snapshot(),by:e.by,to:e.to},e.cancelable??!0);(e.propagate??!0)&&this.manager.monitor.dispatch(`dragmove`,i),queueMicrotask(()=>{if(i.defaultPrevented)return;let n=e.to??{x:t.position.current.x+(e.by?.x??0),y:t.position.current.y+(e.by?.y??0)};t.position.current=n})})}stop(e={}){return N(()=>{let{dragOperation:t}=this.manager,{controller:n}=t;if(!n||n.signal.aborted)return;let r,i=()=>{let e={resume:()=>{},abort:()=>{}};return r=new Promise((t,n)=>{e.resume=t,e.abort=n}),e};n.abort();let a=()=>{this.manager.renderer.rendering.then(()=>{t.status.set(`dropped`);let e=N(()=>t.source?.status===`dropping`),r=()=>{t.controller===n&&(t.controller=void 0),t.reset()};if(e){let{source:e}=t,n=ke(()=>{e?.status===`idle`&&(n(),r())})}else this.manager.renderer.rendering.then(r)})};t.canceled=e.canceled??!1,this.manager.monitor.dispatch(`dragend`,{nativeEvent:e.event,operation:t.snapshot(),canceled:e.canceled??!1,suspend:i}),r?r.then(a).catch(()=>t.reset()):a()})}},$r=class extends W{constructor(e,t){super(e,t),this.manager=e,this.options=t}},ei=class extends AbortController{constructor(e,t){super(),this.constraints=e,this.onActivate=t,this.activated=!1;for(let t of e??[])t.controller=this}onEvent(e){if(!this.activated){if(this.constraints?.length)for(let t of this.constraints)t.onEvent(e);else this.activate(e)}}activate(e){this.activated||(this.activated=!0,this.onActivate(e))}abort(e){this.activated=!1,super.abort(e)}},ti,ni=class{constructor(e){this.options=e,U(this,ti)}set controller(e){Fn(this,ti,e),e.signal.addEventListener(`abort`,()=>this.abort())}activate(e){var t;(t=H(this,ti))==null||t.activate(e)}};ti=new WeakMap;var ri=class extends W{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},ii=class{constructor(e){this.draggables=new ur,this.droppables=new ur,this.plugins=new Kn(e),this.sensors=new Kn(e),this.modifiers=new Kn(e)}register(e,t){if(e instanceof Sr)return this.draggables.register(e.id,e);if(e instanceof Fr)return this.droppables.register(e.id,e);if(e.prototype instanceof ri)return this.modifiers.register(e,t);if(e.prototype instanceof $r)return this.sensors.register(e,t);if(e.prototype instanceof W)return this.plugins.register(e,t);throw Error(`Invalid instance type`)}unregister(e){if(e instanceof lr)return e instanceof Sr?this.draggables.unregister(e.id,e):e instanceof Fr?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof ri)return this.modifiers.unregister(e);if(e.prototype instanceof $r)return this.sensors.unregister(e);if(e.prototype instanceof W)return this.plugins.unregister(e);throw Error(`Invalid instance type`)}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}},ai,oi,si,ci,li,ui,di,fi,pi=[L],mi,hi,gi,K,_i,vi,yi,bi,xi,Si;fi=[I],di=[I],ui=[I],li=[I],ci=[I],si=[L],oi=[L],ai=[L];var Ci=class{constructor(e){B(K,5,this),U(this,mi),U(this,hi),U(this,gi,new Tt(void 0,(e,t)=>e&&t?e.equals(t):e===t)),this.status=new Zr,U(this,_i,B(K,8,this,!1)),B(K,11,this),U(this,vi,B(K,12,this,null)),B(K,15,this),U(this,yi,B(K,16,this,null)),B(K,19,this),U(this,bi,B(K,20,this,null)),B(K,23,this),U(this,xi,B(K,24,this,[])),B(K,27,this),this.position=new ln({x:0,y:0}),U(this,Si,{x:0,y:0}),Fn(this,mi,e)}get shape(){let{current:e,initial:t,previous:n}=H(this,gi);return!e||!t?null:{current:e,initial:t,previous:n}}set shape(e){e?H(this,gi).current=e:H(this,gi).reset()}get source(){let e=this.sourceIdentifier;if(e==null)return null;let t=H(this,mi).registry.draggables.get(e);return t&&Fn(this,hi,t),t??H(this,hi)??null}get target(){let e=this.targetIdentifier;return e==null?null:H(this,mi).registry.droppables.get(e)??null}get transform(){let{x:e,y:t}=this.position.delta,n={x:e,y:t};for(let e of this.modifiers)n=e.apply(Tn(wn({},this.snapshot()),{transform:n}));return Fn(this,Si,n),n}snapshot(){return N(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:H(this,Si),shape:this.shape?Et(this.shape):null,position:Et(this.position),status:Et(this.status),canceled:this.canceled}))}reset(){j(()=>{this.status.set(`idle`),this.sourceIdentifier=null,this.targetIdentifier=null,H(this,gi).reset(),this.position.reset({x:0,y:0}),Fn(this,Si,{x:0,y:0}),this.modifiers=[]})}};K=On(null),mi=new WeakMap,hi=new WeakMap,gi=new WeakMap,_i=new WeakMap,vi=new WeakMap,yi=new WeakMap,bi=new WeakMap,xi=new WeakMap,Si=new WeakMap,V(K,2,`shape`,pi,Ci),V(K,4,`canceled`,fi,Ci,_i),V(K,4,`activatorEvent`,di,Ci,vi),V(K,4,`sourceIdentifier`,ui,Ci,yi),V(K,4,`targetIdentifier`,li,Ci,bi),V(K,4,`modifiers`,ci,Ci,xi),V(K,2,`source`,si,Ci),V(K,2,`target`,oi,Ci),V(K,2,`transform`,ai,Ci),Mn(K,Ci);var wi={get rendering(){return Promise.resolve()}};function Ti(e,t){return typeof e==`function`?e(t):e??t}var Ei=class{constructor(e){this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach(e=>e.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};let t=e??{},n=Ti(t.plugins,[]),r=Ti(t.sensors,[]),i=Ti(t.modifiers,[]),a=t.renderer??wi,o=new Lr(this),s=new ii(this);this.registry=s,this.monitor=o,this.renderer=a,this.actions=new Qr(this),this.dragOperation=new Ci(this),this.collisionObserver=new Zn(this),this.plugins=[zr,...n],this.modifiers=i,this.sensors=r;let{destroy:c}=this,l=ot(()=>{let e=N(()=>this.dragOperation.modifiers),t=this.modifiers;for(let n of e)t.includes(n)||n.destroy();this.dragOperation.modifiers=(this.dragOperation.source?.modifiers)?.map(e=>{let{plugin:t,options:n}=zn(e);return new t(this,n)})??t});this.destroy=()=>{l(),c()}}get plugins(){return this.registry.plugins.values}set plugins(e){this.registry.plugins.values=e}get modifiers(){return this.registry.modifiers.values}set modifiers(e){this.registry.modifiers.values=e}get sensors(){return this.registry.sensors.values}set sensors(e){this.registry.sensors.values=e}},Di=e=>{throw TypeError(e)},Oi=(e,t,n)=>t.has(e)||Di(`Cannot `+n),q=(e,t,n)=>(Oi(e,t,`read from private field`),t.get(e)),ki=(e,t,n)=>t.has(e)?Di(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),Ai=(e,t,n,r)=>(Oi(e,t,`write to private field`),t.set(e,n),n),ji=(e,t,n)=>(Oi(e,t,`access private method`),n);function Mi(e){return e?e instanceof KeyframeEffect||`getKeyframes`in e&&typeof e.getKeyframes==`function`:!1}function Ni(e,t){let n=e.getAnimations(),r=null;for(let e of n){if(e.playState!==`running`)continue;let{effect:n}=e,i=(Mi(n)?n.getKeyframes():[]).filter(t);i.length>0&&(r=[i[i.length-1],e])}return r}function Pi(e){let{width:t,height:n,top:r,left:i,bottom:a,right:o}=e.getBoundingClientRect();return{width:t,height:n,top:r,left:i,bottom:a,right:o}}function Fi(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function Ii(e){return`nodeType`in e}function Li(e){return e?Fi(e)?e:Ii(e)?`defaultView`in e?e.defaultView??window:e.ownerDocument?.defaultView??window:window:window}function Ri(e){let{Document:t}=Li(e);return e instanceof t||`nodeType`in e&&e.nodeType===Node.DOCUMENT_NODE}function zi(e){return!e||Fi(e)?!1:e instanceof Li(e).HTMLElement||`namespaceURI`in e&&typeof e.namespaceURI==`string`&&e.namespaceURI.endsWith(`html`)}function Bi(e){return e instanceof Li(e).SVGElement||`namespaceURI`in e&&typeof e.namespaceURI==`string`&&e.namespaceURI.endsWith(`svg`)}function Vi(e){return e?Fi(e)?e.document:Ii(e)?Ri(e)?e:zi(e)||Bi(e)?e.ownerDocument:document:document:document}function Hi(e){let{documentElement:t}=Vi(e),n=Li(e).visualViewport,r=n?.width??t.clientWidth,i=n?.height??t.clientHeight,a=n?.offsetTop??0,o=n?.offsetLeft??0;return{top:a,left:o,right:o+r,bottom:a+i,width:r,height:i}}function Ui(e,t){if(Wi(e)&&e.open===!1)return!1;let{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(e);return n===`visible`&&r===`visible`&&i===`visible`}function Wi(e){return e.tagName===`DETAILS`}function Gi(e,t=e.getBoundingClientRect(),n=0){let r=t,{ownerDocument:i}=e,a=i.defaultView??window,o=e.parentElement;for(;o&&o!==i.documentElement;){if(!Ui(o)){let e=o.getBoundingClientRect(),t=n*(e.bottom-e.top),i=n*(e.right-e.left),a=n*(e.bottom-e.top),s=n*(e.right-e.left);r={top:Math.max(r.top,e.top-t),right:Math.min(r.right,e.right+i),bottom:Math.min(r.bottom,e.bottom+a),left:Math.max(r.left,e.left-s),width:0,height:0},r.width=r.right-r.left,r.height=r.bottom-r.top}o=o.parentElement}let s=a.visualViewport,c=s?.offsetTop??0,l=s?.offsetLeft??0,u=s?.width??a.innerWidth,d=s?.height??a.innerHeight,f=n*d,p=n*u;return r={top:Math.max(r.top,c-f),right:Math.min(r.right,l+u+p),bottom:Math.min(r.bottom,c+d+f),left:Math.max(r.left,l-p),width:0,height:0},r.width=r.right-r.left,r.height=r.bottom-r.top,r.width<0&&(r.width=0),r.height<0&&(r.height=0),r}function Ki(e){return{x:e.clientX,y:e.clientY}}var qi=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ji(e=document,t=new Set){if(t.has(e))return[];t.add(e);let n=[e];for(let r of Array.from(e.querySelectorAll(`iframe, frame`)))try{let e=r.contentDocument;e&&!t.has(e)&&n.push(...Ji(e,t))}catch{}try{let r=e.defaultView;if(r&&r!==window.top){let i=r.parent;i&&i.document&&i.document!==e&&n.push(...Ji(i.document,t))}}catch{}return n}function Yi(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Xi(){let e=Yi()?window.visualViewport:null;return{x:e?.offsetLeft??0,y:e?.offsetTop??0}}function Zi(e){return!e||!Ii(e)?!1:e instanceof Li(e).ShadowRoot}function Qi(e){if(e&&Ii(e)){let t=e.getRootNode();if(Zi(t)||t instanceof Document)return t}return Vi(e)}function $i(e){return e.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function ea(e){let t=`input, textarea, select, canvas, [contenteditable]`,n=e.cloneNode(!0),r=Array.from(e.querySelectorAll(t));return Array.from(n.querySelectorAll(t)).forEach((e,t)=>{let n=r[t];ta(e)&&ta(n)&&(e.type!==`file`&&(e.value=n.value),e.type===`radio`&&e.name&&(e.name=`Cloned__${e.name}`)),na(e)&&na(n)&&n.width>0&&n.height>0&&e.getContext(`2d`)?.drawImage(n,0,0)}),n}function ta(e){return`value`in e}function na(e){return e.tagName===`CANVAS`}function ra(e,{x:t,y:n}){let r=e.elementFromPoint(t,n);if(ia(r)){let{contentDocument:e}=r;if(e){let{left:i,top:a}=r.getBoundingClientRect();return ra(e,{x:t-i,y:n-a})}}return r}function ia(e){return e?.tagName===`IFRAME`}var aa=new WeakMap;function oa(e){return e.closest(`
1
+ import{D as e,S as t,T as n,a as r,b as i,c as a,d as o,f as s,h as c,i as l,l as u,p as d,r as f,s as p,u as m,x as h}from"./solid.Ck4Vtfe4.js";import{_ as g,a as _,f as v,i as y,l as b,m as x,o as S,p as C,r as w,s as T,t as E,u as D,v as O}from"./web.DD6VKaIp.js";import{n as k}from"./i18n.A82w5XQu.js";import{t as ee}from"./preload-helper.oCYlU9a4.js";import{n as A}from"./api.53l1ob4Z.js";import{t as te}from"./FloatingPanel.BetdW5N2.js";import{t as ne}from"./lucide.s17cczpi.js";import{t as re}from"./iconsAndAliases.ujTnkhnl.js";import{t as ie}from"./FbIcon.Bn4e_qFb.js";var ae=g(`<div class=fb-tabs><div class=fb-tabs__list role=tablist></div><div class=fb-tabs__panel role=tabpanel>`),oe=g(`<span class=fb-tabs__badge>`),se=g(`<button type=button role=tab class=fb-tabs__tab><span></span><!$><!/>`);function ce(e){return(()=>{var t=S(ae),n=t.firstChild,i=n.nextSibling;return b(n,u(f,{get each(){return e.tabs},children:t=>(()=>{var n=S(se),i=n.firstChild,a=i.nextSibling,[o,s]=T(a.nextSibling);return n.$$click=()=>e.onChange(t.id),b(i,()=>t.label),b(n,u(r,{get when(){return t.badge},get children(){var e=S(oe);return b(e,()=>t.badge),e}}),o,s),d(r=>{var i=e.active===t.id,a=!!t.disabled,o=e.active===t.id,s=t.disabled;return i!==r.e&&n.classList.toggle(`is-active`,r.e=i),a!==r.t&&n.classList.toggle(`is-disabled`,r.t=a),o!==r.a&&C(n,`aria-selected`,r.a=o),s!==r.o&&x(n,`disabled`,r.o=s),r},{e:void 0,t:void 0,a:void 0,o:void 0}),v(),n})()})),b(i,()=>e.children),d(()=>C(n,`aria-label`,e.ariaLabel)),t})()}_([`click`]);var le=Symbol.for(`preact-signals`);function ue(){if(P>1){P--;return}let e,t=!1;for((function(){let e=pe;for(pe=void 0;e!==void 0;){let t=e.S;if(t.v===e.v)for(let n=t.t;n!==void 0;n=n.x)n.i===e.i&&(n.i=t.i);e=e.o}})();fe!==void 0;){let n=fe;for(fe=void 0,me++;n!==void 0;){let r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&be(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(me=0,P--,t)throw e}function j(e){if(P>0)return e();ge=++he,P++;try{return e()}finally{ue()}}var M,de,fe;function N(e){let t=M,n=de;M=void 0,de=void 0;try{return e()}finally{M=t,de=n}}var pe,P=0,me=0,he=0,ge=0,_e=0;function ve(e){if(M===void 0)return;let t=e.n;if(t===void 0||t.t!==M)return t={i:0,S:e,p:M.s,n:void 0,t:M,e:void 0,x:void 0,r:t},M.s!==void 0&&(M.s.n=t),M.s=t,e.n=t,32&M.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=M.s,t.n=void 0,M.s.n=t,M.s=t),t}function F(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}F.prototype.brand=le,F.prototype.h=function(){return!0},F.prototype.S=function(e){let t=this.t;t!==e&&e.e===void 0&&(e.x=t,this.t=e,t===void 0?N(()=>{var e;(e=this.W)==null||e.call(this)}):t.e=e)},F.prototype.U=function(e){if(this.t!==void 0){let t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n,n===void 0&&N(()=>{var e;(e=this.Z)==null||e.call(this)}))}},F.prototype.subscribe=function(e){return ke(()=>{let t=this.value;N(()=>e(t))},{name:`sub`})},F.prototype.valueOf=function(){return this.value},F.prototype.toString=function(){return this.value+``},F.prototype.toJSON=function(){return this.value},F.prototype.peek=function(){return N(()=>this.value)},Object.defineProperty(F.prototype,"value",{get(){let e=ve(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(me>100)throw Error(`Cycle detected`);(function(e){P!==0&&me===0&&e.l!==ge&&(e.l=ge,pe={S:e,v:e.v,i:e.i,o:pe})})(this),this.v=e,this.i++,_e++,P++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{ue()}}}});function ye(e,t){return new F(e,t)}function be(e){for(let t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function xe(e){for(let t=e.s;t!==void 0;t=t.n){let n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Se(e){let t,n=e.s;for(;n!==void 0;){let e=n.p;n.i===-1?(n.S.U(n),e!==void 0&&(e.n=n.n),n.n!==void 0&&(n.n.p=e)):t=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=e}e.s=t}function Ce(e,t){F.call(this,void 0,t),this.x=e,this.s=void 0,this.g=_e-1,this.f=4}Ce.prototype=new F,Ce.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===_e))return!0;if(this.g=_e,this.f|=1,this.i>0&&!be(this))return this.f&=-2,!0;let e=M;try{xe(this),M=this;let e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return M=e,Se(this),this.f&=-2,!0},Ce.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(let e=this.s;e!==void 0;e=e.n)e.S.S(e)}F.prototype.S.call(this,e)},Ce.prototype.U=function(e){if(this.t!==void 0&&(F.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(let e=this.s;e!==void 0;e=e.n)e.S.U(e)}},Ce.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Ce.prototype,"value",{get(){if(1&this.f)throw Error(`Cycle detected`);let e=ve(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function we(e,t){return new Ce(e,t)}function Te(e){let t=e.m;if(e.m=void 0,typeof t==`function`){P++;let n=M;M=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,Ee(e),t}finally{M=n,ue()}}}function Ee(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Te(e)}function De(e){if(M!==this)throw Error(`Out-of-order effect`);Se(this),M=e,this.f&=-2,8&this.f&&Ee(this),ue()}function Oe(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,de&&de.push(this)}Oe.prototype.c=function(){let e=this.S();try{if(8&this.f||this.x===void 0)return;let e=this.x();typeof e==`function`&&(this.m=e)}finally{e()}},Oe.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,Te(this),xe(this),P++;let e=M;return M=this,De.bind(this,e)},Oe.prototype.N=function(){2&this.f||(this.f|=2,this.u=fe,fe=this)},Oe.prototype.d=function(){this.f|=8,1&this.f||Ee(this)},Oe.prototype.dispose=function(){this.d()};function ke(e,t){let n=new Oe(e,t);try{n.c()}catch(e){throw n.d(),e}let r=n.d.bind(n);return r[Symbol.dispose]=r,r}var Ae=Object.create,je=Object.defineProperty,Me=Object.defineProperties,Ne=Object.getOwnPropertyDescriptor,Pe=Object.getOwnPropertyDescriptors,Fe=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,Re=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),ze=e=>{throw TypeError(e)},Be=(e,t,n)=>t in e?je(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ve=(e,t)=>{for(var n in t||={})Ie.call(t,n)&&Be(e,n,t[n]);if(Fe)for(var n of Fe(t))Le.call(t,n)&&Be(e,n,t[n]);return e},He=(e,t)=>Me(e,Pe(t)),Ue=(e,t)=>je(e,`name`,{value:t,configurable:!0}),We=e=>[,,,Ae(e?.[Re(`metadata`)]??null)],Ge=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],Ke=e=>e!==void 0&&typeof e!=`function`?ze(`Function expected`):e,qe=(e,t,n,r,i)=>({kind:Ge[e],name:t,metadata:r,addInitializer:e=>n._?ze(`Already initialized`):i.push(Ke(e||null))}),Je=(e,t)=>Be(t,Re(`metadata`),e[3]),Ye=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i<o;i++)t&1?a[i].call(n):r=a[i].call(n,r);return r},Xe=(e,t,n,r,i,a)=>{var o,s,c,l,u,d=t&7,f=!!(t&8),p=!!(t&16),m=d>3?e.length+1:d?f?1:2:0,h=Ge[d+5],g=d>3&&(e[m-1]=[]),_=e[m]||(e[m]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&Ne(d<4?i:{get[n](){return $e(this,a)},set[n](e){return tt(this,a,e)}},n));d?p&&d<4&&Ue(a,(d>2?`set `:d>1?`get `:``)+n):Ue(i,n);for(var y=r.length-1;y>=0;y--)l=qe(d,n,c={},e[3],_),d&&(l.static=f,l.private=p,u=l.access={has:p?e=>Qe(i,e):e=>n in e},d^3&&(u.get=p?e=>(d^1?$e:nt)(e,i,d^4?a:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>tt(e,i,t,d^4?a:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?p?a:v[h]:d>4?void 0:{get:v.get,set:v.set}:i,l),c._=1,d^4||s===void 0?Ke(s)&&(d>4?g.unshift(s):d?p?a=s:v[h]=s:i=s):typeof s!=`object`||!s?ze(`Object expected`):(Ke(o=s.get)&&(v.get=o),Ke(o=s.set)&&(v.set=o),Ke(o=s.init)&&g.unshift(o));return d||Je(e,i),v&&je(i,n,v),p?d^4?a:v:i},Ze=(e,t,n)=>t.has(e)||ze(`Cannot `+n),Qe=(e,t)=>Object(t)===t?e.has(t):ze(`Cannot use the "in" operator on this value`),$e=(e,t,n)=>(Ze(e,t,`read from private field`),n?n.call(e):t.get(e)),et=(e,t,n)=>t.has(e)?ze(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),tt=(e,t,n,r)=>(Ze(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),nt=(e,t,n)=>(Ze(e,t,`access private method`),n);function rt(e,t){if(t){let n;return we(()=>{let r=e();return r&&n&&t(n,r)?n:(n=r,r)})}return we(e)}function it(e,t){if(Object.is(e,t))return!0;if(e===null||t===null)return!1;if(typeof e==`function`&&typeof t==`function`)return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:!e.some((e,n)=>!it(e,t[n]));if(typeof e==`object`&&typeof t==`object`){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(n=>!it(e[n],t[n]))}return!1}function I({get:e},t){return{init(e){return ye(e)},get(){return e.call(this).value},set(t){let n=e.call(this);n.peek()!==t&&(n.value=t)}}}function L(e,t){let n=new WeakMap;return function(){let t=n.get(this);return t||(t=rt(e.bind(this)),n.set(this,t)),t.value}}function at(e=!0){return function(t,n){n.addInitializer(function(){let t=n.kind===`field`||n.static?this:Object.getPrototypeOf(this),r=Object.getOwnPropertyDescriptor(t,n.name);r&&Object.defineProperty(t,n.name,He(Ve({},r),{enumerable:e}))})}}function ot(...e){let t=e.map(e=>ke(e));return()=>t.forEach(e=>e())}var st,ct,lt,ut,dt,ft=[I],R,pt,mt,ht,gt,z,_t,vt,yt,bt,xt,St,Ct,wt;dt=[I],ut=[I],lt=[at()],ct=[at()],st=[at()];var Tt=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,Ye(R,5,this),et(this,z),et(this,pt,Ye(R,8,this)),Ye(R,11,this),et(this,_t,Ye(R,12,this)),Ye(R,15,this),et(this,xt,Ye(R,16,this)),Ye(R,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return $e(this,z,Ct)}get initial(){return $e(this,z,ht)}get previous(){return $e(this,z,yt)}set current(e){let t=N(()=>$e(this,z,Ct));e&&t&&this.equals(t,e)||j(()=>{$e(this,z,ht)||tt(this,z,e,gt),tt(this,z,t,bt),tt(this,z,e,wt)})}reset(e=this.defaultValue){j(()=>{tt(this,z,void 0,bt),tt(this,z,e,gt),tt(this,z,e,wt)})}};R=We(null),pt=new WeakMap,z=new WeakSet,_t=new WeakMap,xt=new WeakMap,mt=Xe(R,20,`#initial`,ft,z,pt),ht=mt.get,gt=mt.set,vt=Xe(R,20,`#previous`,dt,z,_t),yt=vt.get,bt=vt.set,St=Xe(R,20,`#current`,ut,z,xt),Ct=St.get,wt=St.set,Xe(R,2,`current`,lt,Tt),Xe(R,2,`initial`,ct,Tt),Xe(R,2,`previous`,st,Tt),Je(R,Tt);function Et(e){return N(()=>{let t={};for(let n in e)t[n]=e[n];return t})}var Dt,Ot=class{constructor(){et(this,Dt,new WeakMap)}get(e,t){return e?$e(this,Dt).get(e)?.get(t):void 0}set(e,t,n){if(e)return $e(this,Dt).has(e)||$e(this,Dt).set(e,new Map),$e(this,Dt).get(e)?.set(t,n)}clear(e){return e?$e(this,Dt).get(e)?.clear():void 0}};Dt=new WeakMap;var kt=Object.create,At=Object.defineProperty,jt=Object.getOwnPropertyDescriptor,Mt=Object.getOwnPropertySymbols,Nt=Object.prototype.hasOwnProperty,Pt=Object.prototype.propertyIsEnumerable,Ft=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),It=e=>{throw TypeError(e)},Lt=Math.pow,Rt=(e,t,n)=>t in e?At(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zt=(e,t)=>{for(var n in t||={})Nt.call(t,n)&&Rt(e,n,t[n]);if(Mt)for(var n of Mt(t))Pt.call(t,n)&&Rt(e,n,t[n]);return e},Bt=(e,t)=>At(e,`name`,{value:t,configurable:!0}),Vt=e=>[,,,kt(e?.[Ft(`metadata`)]??null)],Ht=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],Ut=e=>e!==void 0&&typeof e!=`function`?It(`Function expected`):e,Wt=(e,t,n,r,i)=>({kind:Ht[e],name:t,metadata:r,addInitializer:e=>n._?It(`Already initialized`):i.push(Ut(e||null))}),Gt=(e,t)=>Rt(t,Ft(`metadata`),e[3]),Kt=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i<o;i++)t&1?a[i].call(n):r=a[i].call(n,r);return r},qt=(e,t,n,r,i,a)=>{var o,s,c,l,u,d=t&7,f=!!(t&8),p=!!(t&16),m=d>3?e.length+1:d?f?1:2:0,h=Ht[d+5],g=d>3&&(e[m-1]=[]),_=e[m]||(e[m]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&jt(d<4?i:{get[n](){return Xt(this,a)},set[n](e){return Qt(this,a,e)}},n));d?p&&d<4&&Bt(a,(d>2?`set `:d>1?`get `:``)+n):Bt(i,n);for(var y=r.length-1;y>=0;y--)l=Wt(d,n,c={},e[3],_),d&&(l.static=f,l.private=p,u=l.access={has:p?e=>Yt(i,e):e=>n in e},d^3&&(u.get=p?e=>(d^1?Xt:$t)(e,i,d^4?a:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>Qt(e,i,t,d^4?a:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?p?a:v[h]:d>4?void 0:{get:v.get,set:v.set}:i,l),c._=1,d^4||s===void 0?Ut(s)&&(d>4?g.unshift(s):d?p?a=s:v[h]=s:i=s):typeof s!=`object`||!s?It(`Object expected`):(Ut(o=s.get)&&(v.get=o),Ut(o=s.set)&&(v.set=o),Ut(o=s.init)&&g.unshift(o));return d||Gt(e,i),v&&At(i,n,v),p?d^4?a:v:i},Jt=(e,t,n)=>t.has(e)||It(`Cannot `+n),Yt=(e,t)=>Object(t)===t?e.has(t):It(`Cannot use the "in" operator on this value`),Xt=(e,t,n)=>(Jt(e,t,`read from private field`),n?n.call(e):t.get(e)),Zt=(e,t,n)=>t.has(e)?It(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),Qt=(e,t,n,r)=>(Jt(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),$t=(e,t,n)=>(Jt(e,t,`access private method`),n),en=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},tn=class e{constructor(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,n){let{top:r,left:i,width:a,height:o,scale:s}=this,c=new e(i+t,r+n,a,o);return c.scale=zt({},s),c}get boundingRectangle(){let{width:e,height:t,left:n,top:r,right:i,bottom:a}=this;return{width:e,height:t,left:n,top:r,right:i,bottom:a}}get center(){let{left:e,top:t,right:n,bottom:r}=this;return new en((e+n)/2,(t+r)/2)}get area(){let{width:e,height:t}=this;return e*t}equals(t){if(!(t instanceof e))return!1;let{left:n,top:r,width:i,height:a}=this;return n===t.left&&r===t.top&&i===t.width&&a===t.height}containsPoint(e){let{top:t,left:n,bottom:r,right:i}=this;return t<=e.y&&e.y<=r&&n<=e.x&&e.x<=i}intersectionArea(t){return t instanceof e?nn(this,t):0}intersectionRatio(e){let{area:t}=this,n=this.intersectionArea(e);return n/(e.area+t-n)}get bottom(){let{top:e,height:t}=this;return e+t}get right(){let{left:e,width:t}=this;return e+t}get aspectRatio(){let{width:e,height:t}=this;return e/t}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:n,width:r,height:i}){return new e(n,t,r,i)}static delta(e,t,n={x:`center`,y:`center`}){let r=(e,t)=>{let r=n[t],i=t===`x`?e.left:e.top,a=t===`x`?e.width:e.height;return r==`start`?i:r==`end`?i+a:i+a/2};return en.delta({x:r(e,`x`),y:r(e,`y`)},{x:r(t,`x`),y:r(t,`y`)})}static intersectionRatio(t,n){return e.from(t).intersectionRatio(e.from(n))}};function nn(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;return r<i&&n<a?o*s:0}var rn,an,on,sn,cn,ln=class extends (on=Tt,an=[L],rn=[L],on){constructor(e){let t=en.from(e);super(t,(e,t)=>en.equals(e,t)),Kt(cn,5,this),Zt(this,sn,0),this.velocity={x:0,y:0}}get delta(){return en.delta(this.current,this.initial)}get direction(){let{current:e,previous:t}=this;if(!t)return null;let n={x:e.x-t.x,y:e.y-t.y};return!n.x&&!n.y?null:Math.abs(n.x)>Math.abs(n.y)?n.x>0?`right`:`left`:n.y>0?`down`:`up`}get current(){return super.current}set current(e){let{current:t}=this,n=en.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),a=i-Xt(this,sn),o=e=>Math.round(e/a*100);j(()=>{Qt(this,sn,i),this.velocity={x:o(r.x),y:o(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(en.from(e)),this.velocity={x:0,y:0}}};cn=Vt(on),sn=new WeakMap,qt(cn,2,`delta`,an,ln),qt(cn,2,`direction`,rn,ln),Gt(cn,ln);function un({x:e,y:t},n){let r=Math.abs(e),i=Math.abs(t);return typeof n==`number`?Math.sqrt(Lt(r,2)+Lt(i,2))>n:`x`in n&&`y`in n?r>n.x&&i>n.y:`x`in n?r>n.x:`y`in n&&i>n.y}var dn=(e=>(e.Horizontal=`x`,e.Vertical=`y`,e))(dn||{}),fn=Object.values(dn),pn=Object.create,mn=Object.defineProperty,hn=Object.defineProperties,gn=Object.getOwnPropertyDescriptor,_n=Object.getOwnPropertyDescriptors,vn=Object.getOwnPropertySymbols,yn=Object.prototype.hasOwnProperty,bn=Object.prototype.propertyIsEnumerable,xn=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),Sn=e=>{throw TypeError(e)},Cn=(e,t,n)=>t in e?mn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wn=(e,t)=>{for(var n in t||={})yn.call(t,n)&&Cn(e,n,t[n]);if(vn)for(var n of vn(t))bn.call(t,n)&&Cn(e,n,t[n]);return e},Tn=(e,t)=>hn(e,_n(t)),En=(e,t)=>mn(e,`name`,{value:t,configurable:!0}),Dn=(e,t)=>{var n={};for(var r in e)yn.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&vn)for(var r of vn(e))t.indexOf(r)<0&&bn.call(e,r)&&(n[r]=e[r]);return n},On=e=>[,,,pn(e?.[xn(`metadata`)]??null)],kn=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],An=e=>e!==void 0&&typeof e!=`function`?Sn(`Function expected`):e,jn=(e,t,n,r,i)=>({kind:kn[e],name:t,metadata:r,addInitializer:e=>n._?Sn(`Already initialized`):i.push(An(e||null))}),Mn=(e,t)=>Cn(t,xn(`metadata`),e[3]),B=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i<o;i++)t&1?a[i].call(n):r=a[i].call(n,r);return r},V=(e,t,n,r,i,a)=>{var o,s,c,l,u,d=t&7,f=!!(t&8),p=!!(t&16),m=d>3?e.length+1:d?f?1:2:0,h=kn[d+5],g=d>3&&(e[m-1]=[]),_=e[m]||(e[m]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&gn(d<4?i:{get[n](){return H(this,a)},set[n](e){return Fn(this,a,e)}},n));d?p&&d<4&&En(a,(d>2?`set `:d>1?`get `:``)+n):En(i,n);for(var y=r.length-1;y>=0;y--)l=jn(d,n,c={},e[3],_),d&&(l.static=f,l.private=p,u=l.access={has:p?e=>Pn(i,e):e=>n in e},d^3&&(u.get=p?e=>(d^1?H:In)(e,i,d^4?a:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>Fn(e,i,t,d^4?a:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?p?a:v[h]:d>4?void 0:{get:v.get,set:v.set}:i,l),c._=1,d^4||s===void 0?An(s)&&(d>4?g.unshift(s):d?p?a=s:v[h]=s:i=s):typeof s!=`object`||!s?Sn(`Object expected`):(An(o=s.get)&&(v.get=o),An(o=s.set)&&(v.set=o),An(o=s.init)&&g.unshift(o));return d||Mn(e,i),v&&mn(i,n,v),p?d^4?a:v:i},Nn=(e,t,n)=>t.has(e)||Sn(`Cannot `+n),Pn=(e,t)=>Object(t)===t?e.has(t):Sn(`Cannot use the "in" operator on this value`),H=(e,t,n)=>(Nn(e,t,`read from private field`),n?n.call(e):t.get(e)),U=(e,t,n)=>t.has(e)?Sn(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),Fn=(e,t,n,r)=>(Nn(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),In=(e,t,n)=>(Nn(e,t,`access private method`),n);function Ln(e,t){return{plugin:e,options:t}}function Rn(e){return t=>Ln(e,t)}function zn(e){return typeof e==`function`?{plugin:e,options:void 0}:e}var Bn=[I],Vn,Hn,Un,W=class{constructor(e,t){this.manager=e,this.options=t,U(this,Hn,B(Vn,8,this,!1)),B(Vn,11,this),U(this,Un,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return N(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){let t=ke(e.bind(this));return H(this,Un).add(t),t}destroy(){H(this,Un).forEach(e=>e())}static configure(e){return Ln(this,e)}};Vn=On(null),Hn=new WeakMap,Un=new WeakMap,V(Vn,4,`disabled`,Bn,W,Hn),Mn(Vn,W);var Wn=class extends W{},Gn,Kn=class{constructor(e){this.manager=e,this.instances=new Map,U(this,Gn,[])}get values(){return Array.from(this.instances.values())}set values(e){let t=e.map(zn).reduce((e,t)=>{let n=e.find(({plugin:e})=>e===t.plugin);return n?(n.options=t.options,e):[...e,t]},[]),n=t.map(({plugin:e})=>e);for(let e of H(this,Gn))if(!n.includes(e)){if(e.prototype instanceof Wn)continue;this.unregister(e)}for(let{plugin:e,options:n}of t)this.register(e,n);Fn(this,Gn,n)}get(e){return this.instances.get(e)}register(e,t){let n=this.instances.get(e);if(n)return n.options!==t&&(n.options=t),n;let r=new e(this.manager,t);return this.instances.set(e,r),r}unregister(e){let t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(let e of this.instances.values())e.destroy();this.instances.clear()}};Gn=new WeakMap;function qn(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}var Jn=[],Yn,Xn,Zn=class extends W{constructor(e){super(e),U(this,Yn),U(this,Xn),this.computeCollisions=this.computeCollisions.bind(this),Fn(this,Xn,ye(Jn)),this.destroy=ot(()=>{let e=this.computeCollisions(),t=N(()=>this.manager.dragOperation.position.current);if(e!==Jn){let e=H(this,Yn);if(Fn(this,Yn,t),e&&t.x==e.x&&t.y==e.y)return}else Fn(this,Yn,void 0);H(this,Xn).value=e},()=>{let{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){N(()=>{e?H(this,Xn).value=this.computeCollisions():Fn(this,Yn,void 0)})}computeCollisions(e,t){let{registry:n,dragOperation:r}=this.manager,{source:i,shape:a,status:o}=r;if(!o.initialized||!a)return Jn;let s=[],c=[];for(let a of e??n.droppables){if(a.disabled||i&&!a.accepts(i))continue;let e=t??a.collisionDetector;if(!e)continue;c.push(a),a.shape;let n=N(()=>e({droppable:a,dragOperation:r}));n&&(a.collisionPriority!=null&&(n.priority=a.collisionPriority),s.push(n))}return c.length===0?Jn:(s.sort(qn),s)}get collisions(){return H(this,Xn).value}};Yn=new WeakMap,Xn=new WeakMap;var Qn,$n,er=[I],tr,nr,rr,ir,ar,or,sr;$n=[I],Qn=[I];var cr=class e{constructor(e,t){U(this,ir,B(rr,8,this)),B(rr,11,this),U(this,ar),U(this,or,B(rr,12,this)),B(rr,15,this),U(this,sr,B(rr,16,this)),B(rr,19,this);let{effects:n,id:r,data:i={},disabled:a=!1,register:o=!0}=e,s=r;Fn(this,ar,ye(r)),this.manager=t,this.data=i,this.disabled=a,this.effects=()=>[()=>{let{id:e,manager:t}=this;if(e!==s)return s=e,t?.registry.register(this),()=>t?.registry.unregister(this)},...n?.()??[]],this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),t&&o&&queueMicrotask(this.register)}get id(){let t=H(this,ar).value;return e.pendingIdChanges?.get(this)??t}set id(t){t!==(e.pendingIdChanges?.get(this)??H(this,ar).peek())&&(e.pendingIdChanges||(e.pendingIdChanges=new Map,queueMicrotask(()=>{var t;return In(t=e,tr,nr).call(t)})),e.pendingIdChanges.set(this,t))}register(){return this.manager?.registry.register(this)}unregister(){var e;(e=this.manager)==null||e.registry.unregister(this)}destroy(){var e;(e=this.manager)==null||e.registry.unregister(this)}};rr=On(null),tr=new WeakSet,nr=function(){let e=cr.pendingIdChanges;cr.pendingIdChanges=null,e&&j(()=>{for(let[t,n]of e)H(t,ar).value=n})},ir=new WeakMap,ar=new WeakMap,or=new WeakMap,sr=new WeakMap,V(rr,4,`manager`,er,cr,ir),V(rr,4,`data`,$n,cr,or),V(rr,4,`disabled`,Qn,cr,sr),U(cr,tr),Mn(rr,cr),cr.pendingIdChanges=null;var lr=cr,ur=class{constructor(){this.map=ye(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{let n=this.map.peek(),r=n.get(e),i=()=>this.unregister(e,t);if(r===t)return i;r&&r.id===e&&(this.cleanupFunctions.get(r)?.(),this.cleanupFunctions.delete(r));let a=new Map(n);for(let[r,i]of n)if(i===t&&r!==e){a.delete(r);break}a.set(e,t),this.map.value=a;let o=ot(...t.effects());return this.cleanupFunctions.set(t,o),i},this.unregister=(e,t)=>{let n=this.map.peek();if(n.get(e)!==t)return;this.cleanupFunctions.get(t)?.(),this.cleanupFunctions.delete(t);let r=new Map(n);r.delete(e),this.map.value=r}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(e){return this.map.value.has(e)}get(e){return this.map.value.get(e)}destroy(){for(let e of this)this.cleanupFunctions.get(e)?.(),e.destroy();this.map.value=new Map}},dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr=class extends (_r=lr,gr=[I],hr=[I],mr=[I],pr=[L],fr=[L],dr=[L],_r){constructor(e,t){var n=e,{modifiers:r,type:i,sensors:a,plugins:o,effects:s}=n,c=Dn(n,[`modifiers`,`type`,`sensors`,`plugins`,`effects`]);super(Tn(wn({},c),{effects:()=>[...s?.()??[],()=>{let{manager:e,plugins:t}=this;if(e&&t)for(let n of t){let{plugin:t}=zn(n);e.registry.plugins.register(t)}}]}),t),B(vr,5,this),U(this,yr,B(vr,8,this)),B(vr,11,this),U(this,br,B(vr,12,this)),B(vr,15,this),U(this,xr,B(vr,16,this,this.isDragSource?`dragging`:`idle`)),B(vr,19,this),this.type=i,this.sensors=a,this.modifiers=r,this.alignment=c.alignment,this.plugins=o}pluginConfig(e){if(this.plugins)for(let t of this.plugins){let n=zn(t);if(n.plugin===e)return n.options}}get isDropping(){return this.status===`dropping`&&this.isDragSource}get isDragging(){return this.status===`dragging`&&this.isDragSource}get isDragSource(){return this.manager?.dragOperation.source?.id===this.id}};vr=On(_r),yr=new WeakMap,br=new WeakMap,xr=new WeakMap,V(vr,4,`type`,gr,Sr,yr),V(vr,4,`modifiers`,hr,Sr,br),V(vr,4,`status`,mr,Sr,xr),V(vr,2,`isDropping`,pr,Sr),V(vr,2,`isDragging`,fr,Sr),V(vr,2,`isDragSource`,dr,Sr),Mn(vr,Sr);var Cr,wr,Tr,Er,Dr,Or,kr,G,Ar,jr,Mr,Nr,Pr,Fr=class extends (kr=lr,Or=[I],Dr=[I],Er=[I],Tr=[I],wr=[I],Cr=[L],kr){constructor(e,t){var n=e,{accept:r,collisionDetector:i,collisionPriority:a,type:o}=n,s=Dn(n,[`accept`,`collisionDetector`,`collisionPriority`,`type`]);super(s,t),B(G,5,this),U(this,Ar,B(G,8,this)),B(G,11,this),U(this,jr,B(G,12,this)),B(G,15,this),U(this,Mr,B(G,16,this)),B(G,19,this),U(this,Nr,B(G,20,this)),B(G,23,this),U(this,Pr,B(G,24,this)),B(G,27,this),this.accept=r,this.collisionDetector=i,this.collisionPriority=a,this.type=o}accepts(e){let{accept:t}=this;return t?typeof t==`function`?t(e):e.type?Array.isArray(t)?t.includes(e.type):e.type===t:!1:!0}get isDropTarget(){return this.manager?.dragOperation.target?.id===this.id}};G=On(kr),Ar=new WeakMap,jr=new WeakMap,Mr=new WeakMap,Nr=new WeakMap,Pr=new WeakMap,V(G,4,`accept`,Or,Fr,Ar),V(G,4,`type`,Dr,Fr,jr),V(G,4,`collisionDetector`,Er,Fr,Mr),V(G,4,`collisionPriority`,Tr,Fr,Nr),V(G,4,`shape`,wr,Fr,Pr),V(G,2,`isDropTarget`,Cr,Fr),Mn(G,Fr);var Ir=class{constructor(){this.registry=new Map}addEventListener(e,t){let{registry:n}=this,r=new Set(n.get(e));return r.add(t),n.set(e,r),()=>this.removeEventListener(e,t)}removeEventListener(e,t){let{registry:n}=this,r=new Set(n.get(e));r.delete(t),n.set(e,r)}dispatch(e,...t){let{registry:n}=this,r=n.get(e);if(r)for(let e of r)e(...t)}},Lr=class extends Ir{constructor(e){super(),this.manager=e}dispatch(e,t){let n=[t,this.manager];super.dispatch(e,...n)}};function Rr(e,t=!0){let n=!1;return Tn(wn({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var zr=class extends Wn{constructor(e){super(e);let t=(e,t)=>e.map(({id:e})=>e).join(``)===t.map(({id:e})=>e).join(``),n=[];this.destroy=ot(()=>{let{dragOperation:t,collisionObserver:r}=e;t.status.initializing&&(n=[],r.enable())},()=>{let{collisionObserver:r,monitor:i}=e,{collisions:a}=r;if(r.isDisabled()||lr.pendingIdChanges)return;let o=Rr({collisions:a});if(i.dispatch(`collision`,o),o.defaultPrevented||t(a,n))return;n=a;let[s]=a;N(()=>{s?.id!==e.dragOperation.target?.id&&(r.disable(),e.actions.setDropTarget(s?.id).then(()=>{r.enable()}))})})}},Br=(e=>(e[e.Lowest=0]=`Lowest`,e[e.Low=1]=`Low`,e[e.Normal=2]=`Normal`,e[e.High=3]=`High`,e[e.Highest=4]=`Highest`,e))(Br||{}),Vr=(e=>(e[e.Collision=0]=`Collision`,e[e.ShapeIntersection=1]=`ShapeIntersection`,e[e.PointerIntersection=2]=`PointerIntersection`,e))(Vr||{}),Hr,Ur,Wr,Gr,Kr,qr,Jr=[I],Yr,Xr;qr=[L],Kr=[L],Gr=[L],Wr=[L],Ur=[L],Hr=[L];var Zr=class{constructor(){B(Yr,5,this),U(this,Xr,B(Yr,8,this,`idle`)),B(Yr,11,this)}get current(){return this.value}get idle(){return this.value===`idle`}get initializing(){return this.value===`initializing`}get initialized(){let{value:e}=this;return e!==`idle`&&e!==`initialization-pending`}get dragging(){return this.value===`dragging`}get dropped(){return this.value===`dropped`}set(e){this.value=e}};Yr=On(null),Xr=new WeakMap,V(Yr,4,`value`,Jr,Zr,Xr),V(Yr,2,`current`,qr,Zr),V(Yr,2,`idle`,Kr,Zr),V(Yr,2,`initializing`,Gr,Zr),V(Yr,2,`initialized`,Wr,Zr),V(Yr,2,`dragging`,Ur,Zr),V(Yr,2,`dropped`,Hr,Zr),Mn(Yr,Zr);var Qr=class{constructor(e){this.manager=e}setDragSource(e){let{dragOperation:t}=this.manager;t.sourceIdentifier=typeof e==`string`||typeof e==`number`?e:e.id}setDropTarget(e){return N(()=>{let{dragOperation:t}=this.manager,n=e??null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;let r=Rr({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch(`dragover`,r),this.manager.renderer.rendering.then(()=>r.defaultPrevented)})}start(e){return N(()=>{let{dragOperation:t}=this.manager;if(e.source!=null&&this.setDragSource(e.source),!t.source)throw Error(`Cannot start a drag operation without a drag source`);if(!t.status.idle)throw Error(`Cannot start a drag operation while another is active`);let n=new AbortController,{event:r,coordinates:i}=e;j(()=>{t.status.set(`initialization-pending`),t.shape=null,t.canceled=!1,t.activatorEvent=r??null,t.position.reset(i)});let a=Rr({operation:t.snapshot()});return this.manager.monitor.dispatch(`beforedragstart`,a),a.defaultPrevented?(t.reset(),n.abort(),n):(t.status.set(`initializing`),t.controller=n,this.manager.renderer.rendering.then(()=>{if(n.signal.aborted)return;let{status:e}=t;e.current===`initializing`&&j(()=>{t.status.set(`dragging`),this.manager.monitor.dispatch(`dragstart`,{nativeEvent:r,operation:t.snapshot(),cancelable:!1})})}),n)})}move(e){return N(()=>{let{dragOperation:t}=this.manager,{status:n,controller:r}=t;if(!n.dragging||!r||r.signal.aborted)return;let i=Rr({nativeEvent:e.event,operation:t.snapshot(),by:e.by,to:e.to},e.cancelable??!0);(e.propagate??!0)&&this.manager.monitor.dispatch(`dragmove`,i),queueMicrotask(()=>{if(i.defaultPrevented)return;let n=e.to??{x:t.position.current.x+(e.by?.x??0),y:t.position.current.y+(e.by?.y??0)};t.position.current=n})})}stop(e={}){return N(()=>{let{dragOperation:t}=this.manager,{controller:n}=t;if(!n||n.signal.aborted)return;let r,i=()=>{let e={resume:()=>{},abort:()=>{}};return r=new Promise((t,n)=>{e.resume=t,e.abort=n}),e};n.abort();let a=()=>{this.manager.renderer.rendering.then(()=>{t.status.set(`dropped`);let e=N(()=>t.source?.status===`dropping`),r=()=>{t.controller===n&&(t.controller=void 0),t.reset()};if(e){let{source:e}=t,n=ke(()=>{e?.status===`idle`&&(n(),r())})}else this.manager.renderer.rendering.then(r)})};t.canceled=e.canceled??!1,this.manager.monitor.dispatch(`dragend`,{nativeEvent:e.event,operation:t.snapshot(),canceled:e.canceled??!1,suspend:i}),r?r.then(a).catch(()=>t.reset()):a()})}},$r=class extends W{constructor(e,t){super(e,t),this.manager=e,this.options=t}},ei=class extends AbortController{constructor(e,t){super(),this.constraints=e,this.onActivate=t,this.activated=!1;for(let t of e??[])t.controller=this}onEvent(e){if(!this.activated){if(this.constraints?.length)for(let t of this.constraints)t.onEvent(e);else this.activate(e)}}activate(e){this.activated||(this.activated=!0,this.onActivate(e))}abort(e){this.activated=!1,super.abort(e)}},ti,ni=class{constructor(e){this.options=e,U(this,ti)}set controller(e){Fn(this,ti,e),e.signal.addEventListener(`abort`,()=>this.abort())}activate(e){var t;(t=H(this,ti))==null||t.activate(e)}};ti=new WeakMap;var ri=class extends W{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},ii=class{constructor(e){this.draggables=new ur,this.droppables=new ur,this.plugins=new Kn(e),this.sensors=new Kn(e),this.modifiers=new Kn(e)}register(e,t){if(e instanceof Sr)return this.draggables.register(e.id,e);if(e instanceof Fr)return this.droppables.register(e.id,e);if(e.prototype instanceof ri)return this.modifiers.register(e,t);if(e.prototype instanceof $r)return this.sensors.register(e,t);if(e.prototype instanceof W)return this.plugins.register(e,t);throw Error(`Invalid instance type`)}unregister(e){if(e instanceof lr)return e instanceof Sr?this.draggables.unregister(e.id,e):e instanceof Fr?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof ri)return this.modifiers.unregister(e);if(e.prototype instanceof $r)return this.sensors.unregister(e);if(e.prototype instanceof W)return this.plugins.unregister(e);throw Error(`Invalid instance type`)}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}},ai,oi,si,ci,li,ui,di,fi,pi=[L],mi,hi,gi,K,_i,vi,yi,bi,xi,Si;fi=[I],di=[I],ui=[I],li=[I],ci=[I],si=[L],oi=[L],ai=[L];var Ci=class{constructor(e){B(K,5,this),U(this,mi),U(this,hi),U(this,gi,new Tt(void 0,(e,t)=>e&&t?e.equals(t):e===t)),this.status=new Zr,U(this,_i,B(K,8,this,!1)),B(K,11,this),U(this,vi,B(K,12,this,null)),B(K,15,this),U(this,yi,B(K,16,this,null)),B(K,19,this),U(this,bi,B(K,20,this,null)),B(K,23,this),U(this,xi,B(K,24,this,[])),B(K,27,this),this.position=new ln({x:0,y:0}),U(this,Si,{x:0,y:0}),Fn(this,mi,e)}get shape(){let{current:e,initial:t,previous:n}=H(this,gi);return!e||!t?null:{current:e,initial:t,previous:n}}set shape(e){e?H(this,gi).current=e:H(this,gi).reset()}get source(){let e=this.sourceIdentifier;if(e==null)return null;let t=H(this,mi).registry.draggables.get(e);return t&&Fn(this,hi,t),t??H(this,hi)??null}get target(){let e=this.targetIdentifier;return e==null?null:H(this,mi).registry.droppables.get(e)??null}get transform(){let{x:e,y:t}=this.position.delta,n={x:e,y:t};for(let e of this.modifiers)n=e.apply(Tn(wn({},this.snapshot()),{transform:n}));return Fn(this,Si,n),n}snapshot(){return N(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:H(this,Si),shape:this.shape?Et(this.shape):null,position:Et(this.position),status:Et(this.status),canceled:this.canceled}))}reset(){j(()=>{this.status.set(`idle`),this.sourceIdentifier=null,this.targetIdentifier=null,H(this,gi).reset(),this.position.reset({x:0,y:0}),Fn(this,Si,{x:0,y:0}),this.modifiers=[]})}};K=On(null),mi=new WeakMap,hi=new WeakMap,gi=new WeakMap,_i=new WeakMap,vi=new WeakMap,yi=new WeakMap,bi=new WeakMap,xi=new WeakMap,Si=new WeakMap,V(K,2,`shape`,pi,Ci),V(K,4,`canceled`,fi,Ci,_i),V(K,4,`activatorEvent`,di,Ci,vi),V(K,4,`sourceIdentifier`,ui,Ci,yi),V(K,4,`targetIdentifier`,li,Ci,bi),V(K,4,`modifiers`,ci,Ci,xi),V(K,2,`source`,si,Ci),V(K,2,`target`,oi,Ci),V(K,2,`transform`,ai,Ci),Mn(K,Ci);var wi={get rendering(){return Promise.resolve()}};function Ti(e,t){return typeof e==`function`?e(t):e??t}var Ei=class{constructor(e){this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach(e=>e.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};let t=e??{},n=Ti(t.plugins,[]),r=Ti(t.sensors,[]),i=Ti(t.modifiers,[]),a=t.renderer??wi,o=new Lr(this),s=new ii(this);this.registry=s,this.monitor=o,this.renderer=a,this.actions=new Qr(this),this.dragOperation=new Ci(this),this.collisionObserver=new Zn(this),this.plugins=[zr,...n],this.modifiers=i,this.sensors=r;let{destroy:c}=this,l=ot(()=>{let e=N(()=>this.dragOperation.modifiers),t=this.modifiers;for(let n of e)t.includes(n)||n.destroy();this.dragOperation.modifiers=(this.dragOperation.source?.modifiers)?.map(e=>{let{plugin:t,options:n}=zn(e);return new t(this,n)})??t});this.destroy=()=>{l(),c()}}get plugins(){return this.registry.plugins.values}set plugins(e){this.registry.plugins.values=e}get modifiers(){return this.registry.modifiers.values}set modifiers(e){this.registry.modifiers.values=e}get sensors(){return this.registry.sensors.values}set sensors(e){this.registry.sensors.values=e}},Di=e=>{throw TypeError(e)},Oi=(e,t,n)=>t.has(e)||Di(`Cannot `+n),q=(e,t,n)=>(Oi(e,t,`read from private field`),t.get(e)),ki=(e,t,n)=>t.has(e)?Di(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),Ai=(e,t,n,r)=>(Oi(e,t,`write to private field`),t.set(e,n),n),ji=(e,t,n)=>(Oi(e,t,`access private method`),n);function Mi(e){return e?e instanceof KeyframeEffect||`getKeyframes`in e&&typeof e.getKeyframes==`function`:!1}function Ni(e,t){let n=e.getAnimations(),r=null;for(let e of n){if(e.playState!==`running`)continue;let{effect:n}=e,i=(Mi(n)?n.getKeyframes():[]).filter(t);i.length>0&&(r=[i[i.length-1],e])}return r}function Pi(e){let{width:t,height:n,top:r,left:i,bottom:a,right:o}=e.getBoundingClientRect();return{width:t,height:n,top:r,left:i,bottom:a,right:o}}function Fi(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function Ii(e){return`nodeType`in e}function Li(e){return e?Fi(e)?e:Ii(e)?`defaultView`in e?e.defaultView??window:e.ownerDocument?.defaultView??window:window:window}function Ri(e){let{Document:t}=Li(e);return e instanceof t||`nodeType`in e&&e.nodeType===Node.DOCUMENT_NODE}function zi(e){return!e||Fi(e)?!1:e instanceof Li(e).HTMLElement||`namespaceURI`in e&&typeof e.namespaceURI==`string`&&e.namespaceURI.endsWith(`html`)}function Bi(e){return e instanceof Li(e).SVGElement||`namespaceURI`in e&&typeof e.namespaceURI==`string`&&e.namespaceURI.endsWith(`svg`)}function Vi(e){return e?Fi(e)?e.document:Ii(e)?Ri(e)?e:zi(e)||Bi(e)?e.ownerDocument:document:document:document}function Hi(e){let{documentElement:t}=Vi(e),n=Li(e).visualViewport,r=n?.width??t.clientWidth,i=n?.height??t.clientHeight,a=n?.offsetTop??0,o=n?.offsetLeft??0;return{top:a,left:o,right:o+r,bottom:a+i,width:r,height:i}}function Ui(e,t){if(Wi(e)&&e.open===!1)return!1;let{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(e);return n===`visible`&&r===`visible`&&i===`visible`}function Wi(e){return e.tagName===`DETAILS`}function Gi(e,t=e.getBoundingClientRect(),n=0){let r=t,{ownerDocument:i}=e,a=i.defaultView??window,o=e.parentElement;for(;o&&o!==i.documentElement;){if(!Ui(o)){let e=o.getBoundingClientRect(),t=n*(e.bottom-e.top),i=n*(e.right-e.left),a=n*(e.bottom-e.top),s=n*(e.right-e.left);r={top:Math.max(r.top,e.top-t),right:Math.min(r.right,e.right+i),bottom:Math.min(r.bottom,e.bottom+a),left:Math.max(r.left,e.left-s),width:0,height:0},r.width=r.right-r.left,r.height=r.bottom-r.top}o=o.parentElement}let s=a.visualViewport,c=s?.offsetTop??0,l=s?.offsetLeft??0,u=s?.width??a.innerWidth,d=s?.height??a.innerHeight,f=n*d,p=n*u;return r={top:Math.max(r.top,c-f),right:Math.min(r.right,l+u+p),bottom:Math.min(r.bottom,c+d+f),left:Math.max(r.left,l-p),width:0,height:0},r.width=r.right-r.left,r.height=r.bottom-r.top,r.width<0&&(r.width=0),r.height<0&&(r.height=0),r}function Ki(e){return{x:e.clientX,y:e.clientY}}var qi=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ji(e=document,t=new Set){if(t.has(e))return[];t.add(e);let n=[e];for(let r of Array.from(e.querySelectorAll(`iframe, frame`)))try{let e=r.contentDocument;e&&!t.has(e)&&n.push(...Ji(e,t))}catch{}try{let r=e.defaultView;if(r&&r!==window.top){let i=r.parent;i&&i.document&&i.document!==e&&n.push(...Ji(i.document,t))}}catch{}return n}function Yi(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Xi(){let e=Yi()?window.visualViewport:null;return{x:e?.offsetLeft??0,y:e?.offsetTop??0}}function Zi(e){return!e||!Ii(e)?!1:e instanceof Li(e).ShadowRoot}function Qi(e){if(e&&Ii(e)){let t=e.getRootNode();if(Zi(t)||t instanceof Document)return t}return Vi(e)}function $i(e){return e.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function ea(e){let t=`input, textarea, select, canvas, [contenteditable]`,n=e.cloneNode(!0),r=Array.from(e.querySelectorAll(t));return Array.from(n.querySelectorAll(t)).forEach((e,t)=>{let n=r[t];ta(e)&&ta(n)&&(e.type!==`file`&&(e.value=n.value),e.type===`radio`&&e.name&&(e.name=`Cloned__${e.name}`)),na(e)&&na(n)&&n.width>0&&n.height>0&&e.getContext(`2d`)?.drawImage(n,0,0)}),n}function ta(e){return`value`in e}function na(e){return e.tagName===`CANVAS`}function ra(e,{x:t,y:n}){let r=e.elementFromPoint(t,n);if(ia(r)){let{contentDocument:e}=r;if(e){let{left:i,top:a}=r.getBoundingClientRect();return ra(e,{x:t-i,y:n-a})}}return r}function ia(e){return e?.tagName===`IFRAME`}var aa=new WeakMap;function oa(e){return e.closest(`
2
2
  input:not([disabled]),
3
3
  select:not([disabled]),
4
4
  textarea:not([disabled]),
@@ -1 +1 @@
1
- import{S as e,a as t,f as n,h as r,l as i,p as a,r as o}from"./solid.Ck4Vtfe4.js";import{_ as s,a as c,f as l,l as u,m as d,o as f,p,s as m,u as h}from"./web.DD6VKaIp.js";import{n as g}from"./i18n.BFBHzd3w.js";import{n as _}from"./api.53l1ob4Z.js";import{t as v}from"./FbIcon.Bn4e_qFb.js";var y=s(`<div class="notice notice--error">`),b=s(`<div class=fb-list__toolbar><label class=fb-list__filter><span></span><select class=input><option value></option><!$><!/></select></label><input class="input fb-list__search"type=search>`),x=s(`<div class=fb-groups-table__head><span></span><span></span><span></span><span></span><span></span><span>`),S=s(`<section class="card fb-groups-table">`),ee=s(`<p class="muted fb-import-hint">`),te=s(`<div class=fb-modal-backdrop><div class=fb-modal><div class=fb-modal__header><h3></h3><button type=button class=fb-modal__close></button></div><div class=fb-modal__body><p class=muted></p><label class=fb-import-dropzone><input id=import-file-input type=file accept=.json hidden><!$><!/><span></span></label><!$><!/></div><div class=fb-modal__footer><button type=button class="btn btn-secondary"></button><button type=button class="btn btn-primary">`),C=s(`<div class=fb-list><!$><!/><div class=fb-list__header><div><span class=fb-eyebrow></span><h2></h2><p class=muted></p></div><div class=fb-list__header-actions><label class=fb-import-btn><input type=file accept=.json hidden><button type=button class="btn btn-secondary"><!$><!/> <!$><!/></button></label><a class="btn btn-primary"href=/settings/custom-fields/new>+ <!$><!/></a></div></div><!$><!/><!$><!/>`),w=s(`<p class=muted>`),T=s(`<option><!$><!/> (<!$><!/>)`),E=s(`<div class=fb-empty-groups><!$><!/><h4></h4><p class=muted></p><a class="btn btn-primary"href=/settings/custom-fields/new>`),D=s(`<div class=fb-groups-table__row role=button tabindex=0><div class=fb-groups-table__title><strong></strong><code></code></div><span class="fb-groups-table__desc muted"></span><span class=fb-groups-table__location></span><span class=fb-groups-table__count></span><span><span class=badge></span></span><div class=fb-groups-table__actions><button type=button class=fb-row-action></button><button type=button class=fb-row-action></button><button type=button class=fb-row-action></button><button type=button class=fb-row-action></button><button type=button class="fb-row-action is-danger">`);function O(){let{t:s}=g(),[c,O]=r([]),[k,A]=r([]),[j,M]=r(``),[N,ne]=r(``),[P,F]=r(!0),[I,L]=r(``);e(async()=>{try{let[e,t]=await Promise.all([_.getContentTypes(),_.getFieldGroups()]);A(e),O(t),e[0]&&M(e[0].slug)}catch(e){L(e instanceof Error?e.message:String(e))}finally{F(!1)}});let R=e=>[...new Set((e.locationRules??[]).flat().filter(e=>e.param===`content_type`&&e.operator===`eq`&&e.value).map(e=>e.value))],re=e=>{let t=R(e);return t.length===0?s(`settings.customFields.groups.allContentTypes`):t.map(e=>k().find(t=>t.slug===e)?.pluralLabel??e).join(`, `)},z=n(()=>{let e=N().trim().toLowerCase();return c().filter(e=>!e.key.startsWith(`core-fields-`)).filter(t=>{let n=R(t);return(!j()||n.length===0||n.includes(j()))&&(!e||t.title.toLowerCase().includes(e)||t.key.toLowerCase().includes(e))})}),B=e=>{window.location.href=`/settings/custom-fields/${e}`},V=async e=>{try{let t=await _.getFieldGroup(e.id);await _.createFieldGroup({...t,id:void 0,key:`${t.key}-copy-${Date.now().toString(36)}`,title:`${t.title} ${s(`settings.customFields.form.copySuffix`)}`}),await H()}catch(e){L(e instanceof Error?e.message:String(e))}},ie=async e=>{try{let t=await _.getFieldGroup(e.id);await _.updateFieldGroup(e.id,{...t,active:!e.active}),await H()}catch(e){L(e instanceof Error?e.message:String(e))}},ae=async e=>{if(window.confirm(s(`settings.customFields.actions.confirmDelete`)))try{await _.deleteFieldGroup(e.id),await H()}catch(e){L(e instanceof Error?e.message:String(e))}},H=async()=>{let e=await _.getFieldGroups();O(e)},[oe,U]=r(!1),[W,G]=r(null),[K,q]=r(!1),se=async e=>{try{let t=await _.exportFieldGroup(e.id),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`${e.key}.json`,document.body.appendChild(r),r.click(),r.remove(),URL.revokeObjectURL(n)}catch(e){L(e instanceof Error?e.message:String(e))}},J=e=>{let t=e.currentTarget;t.files&&t.files[0]&&G(t.files[0])},ce=async()=>{let e=W();if(e){q(!0);try{let t=await e.text(),n=JSON.parse(t),r=(await _.importFieldGroups(n)).results.filter(e=>!e.success);r.length>0?L(r.map(e=>`${e.key}: ${e.error}`).join(`; `)):L(``),U(!1),G(null),await H()}catch(e){L(e instanceof Error?e.message:String(e))}finally{q(!1)}}},Y=e=>s(`settings.customFields.actions.${e}`),X=e=>s(`settings.customFields.groups.${e}`);return(()=>{var e=f(C),n=e.firstChild,[r,c]=m(n.nextSibling),g=r.nextSibling,_=g.firstChild,O=_.firstChild,A=O.nextSibling,F=A.nextSibling,L=_.nextSibling.firstChild,R=L.firstChild,H=R.nextSibling,q=H.firstChild,[Z,le]=m(q.nextSibling),ue=Z.nextSibling.nextSibling,[de,fe]=m(ue.nextSibling),Q=L.nextSibling,pe=Q.firstChild.nextSibling,[me,he]=m(pe.nextSibling),ge=g.nextSibling,[$,_e]=m(ge.nextSibling),ve=$.nextSibling,[ye,be]=m(ve.nextSibling);return u(e,i(t,{get when(){return I()},get children(){var e=f(y);return u(e,I),e}}),r,c),u(O,()=>s(`settings.customFields.listEyebrow`)),u(A,()=>X(`title`)),u(F,()=>s(`settings.customFields.description`)),R.addEventListener(`change`,J),H.$$click=()=>U(!0),u(H,i(v,{name:`upload`,class:`fb-btn-icon`}),Z,le),u(H,()=>Y(`import`),de,fe),u(Q,()=>X(`new`),me,he),u(e,i(t,{get when(){return!P()},get fallback(){return(()=>{var e=f(w);return u(e,()=>s(`settings.customFields.loading`)),e})()},get children(){return[(()=>{var e=f(b),t=e.firstChild,n=t.firstChild,r=n.nextSibling,c=r.firstChild,h=c.nextSibling,[g,_]=m(h.nextSibling),v=t.nextSibling;return u(n,()=>s(`settings.customFields.contentType`)),r.addEventListener(`change`,e=>M(e.currentTarget.value)),u(c,()=>X(`allContentTypes`)),u(r,i(o,{get each(){return k()},children:e=>(()=>{var t=f(T),n=t.firstChild,[r,i]=m(n.nextSibling),o=r.nextSibling.nextSibling,[s,c]=m(o.nextSibling);return s.nextSibling,u(t,()=>e.pluralLabel,r,i),u(t,()=>e.slug,s,c),a(()=>d(t,`value`,e.slug)),t})()}),g,_),v.$$input=e=>ne(e.currentTarget.value),a(()=>p(v,`placeholder`,X(`search`))),a(()=>d(r,`value`,j())),a(()=>d(v,`value`,N())),l(),e})(),(()=>{var e=f(S);return u(e,i(t,{get when(){return z().length>0},get fallback(){return(()=>{var e=f(E),t=e.firstChild,[n,r]=m(t.nextSibling),a=n.nextSibling,o=a.nextSibling,s=o.nextSibling;return u(e,i(v,{name:`columns-3`,class:`fb-empty-icon`}),n,r),u(a,()=>X(`empty`)),u(o,()=>X(`emptyHint`)),u(s,()=>X(`new`)),e})()},get children(){return[(()=>{var e=f(x),t=e.firstChild,n=t.nextSibling,r=n.nextSibling,i=r.nextSibling,a=i.nextSibling;return u(t,()=>X(`groupName`)),u(n,()=>s(`settings.customFields.form.description`)),u(r,()=>X(`appliesTo`)),u(i,()=>X(`fields`)),u(a,()=>X(`status`)),e})(),i(o,{get each(){return z()},children:e=>(()=>{var t=f(D),n=t.firstChild,r=n.firstChild,i=r.nextSibling,o=n.nextSibling,s=o.nextSibling,c=s.nextSibling,d=c.nextSibling,p=d.firstChild,m=d.nextSibling,g=m.firstChild,_=g.nextSibling,v=_.nextSibling,y=v.nextSibling,b=y.nextSibling;return t.$$keydown=t=>{t.key===`Enter`&&B(e.id)},t.$$click=()=>B(e.id),u(r,()=>e.title),u(i,()=>e.key),u(o,()=>String(e.metadata?.description??`—`)),u(s,()=>re(e)),u(c,()=>e.fieldCount),u(p,(()=>{var t=h(()=>!!e.active);return()=>t()?X(`active`):X(`inactive`)})()),m.$$click=e=>e.stopPropagation(),g.$$click=()=>B(e.id),u(g,()=>Y(`edit`)),_.$$click=()=>void se(e),u(_,()=>Y(`export`)),v.$$click=()=>void V(e),u(v,()=>Y(`duplicate`)),y.$$click=()=>void ie(e),u(y,(()=>{var t=h(()=>!!e.active);return()=>t()?Y(`deactivate`):Y(`activate`)})()),b.$$click=()=>void ae(e),u(b,()=>Y(`delete`)),a(t=>{var n=!!e.active,r=!e.active;return n!==t.e&&p.classList.toggle(`badge-success`,t.e=n),r!==t.t&&p.classList.toggle(`badge-secondary`,t.t=r),t},{e:void 0,t:void 0}),l(),t})()})]}})),e})()]}}),$,_e),u(e,i(t,{get when(){return oe()},get children(){var e=f(te),n=e.firstChild,r=n.firstChild,o=r.firstChild,c=o.nextSibling,g=r.nextSibling,_=g.firstChild,y=_.nextSibling,b=y.firstChild,x=b.nextSibling,[S,C]=m(x.nextSibling),w=S.nextSibling,T=y.nextSibling,[E,D]=m(T.nextSibling),O=g.nextSibling.firstChild,k=O.nextSibling;return e.$$click=()=>{U(!1),G(null)},n.$$click=e=>e.stopPropagation(),u(o,()=>Y(`import`)),c.$$click=()=>{U(!1),G(null)},u(c,i(v,{name:`x`})),u(_,()=>s(`settings.customFields.import.description`)),y.$$click=()=>document.getElementById(`import-file-input`)?.click(),b.addEventListener(`change`,J),u(y,i(v,{name:`upload`,class:`fb-dropzone-icon`}),S,C),u(w,(()=>{var e=h(()=>!!W());return()=>e()?W().name:s(`settings.customFields.import.dropzone`)})()),u(g,i(t,{get when(){return W()},get children(){var e=f(ee);return u(e,()=>s(`settings.customFields.import.hint`)),e}}),E,D),O.$$click=()=>{U(!1),G(null)},u(O,()=>s(`common.cancel`)),k.$$click=ce,u(k,(()=>{var e=h(()=>!!K());return()=>e()?s(`common.loading`):Y(`import`)})()),a(e=>{var t=s(`common.close`),n=!W()||K();return t!==e.e&&p(c,`aria-label`,e.e=t),n!==e.t&&d(k,`disabled`,e.t=n),e},{e:void 0,t:void 0}),l(),e}}),ye,be),l(),e})()}c([`click`,`input`,`keydown`]);export{O as FieldGroupList};
1
+ import{S as e,a as t,f as n,h as r,l as i,p as a,r as o}from"./solid.Ck4Vtfe4.js";import{_ as s,a as c,f as l,l as u,m as d,o as f,p,s as m,u as h}from"./web.DD6VKaIp.js";import{n as g}from"./i18n.A82w5XQu.js";import{n as _}from"./api.53l1ob4Z.js";import{t as v}from"./FbIcon.Bn4e_qFb.js";var y=s(`<div class="notice notice--error">`),b=s(`<div class=fb-list__toolbar><label class=fb-list__filter><span></span><select class=input><option value></option><!$><!/></select></label><input class="input fb-list__search"type=search>`),x=s(`<div class=fb-groups-table__head><span></span><span></span><span></span><span></span><span></span><span>`),S=s(`<section class="card fb-groups-table">`),ee=s(`<p class="muted fb-import-hint">`),te=s(`<div class=fb-modal-backdrop><div class=fb-modal><div class=fb-modal__header><h3></h3><button type=button class=fb-modal__close></button></div><div class=fb-modal__body><p class=muted></p><label class=fb-import-dropzone><input id=import-file-input type=file accept=.json hidden><!$><!/><span></span></label><!$><!/></div><div class=fb-modal__footer><button type=button class="btn btn-secondary"></button><button type=button class="btn btn-primary">`),C=s(`<div class=fb-list><!$><!/><div class=fb-list__header><div><span class=fb-eyebrow></span><h2></h2><p class=muted></p></div><div class=fb-list__header-actions><label class=fb-import-btn><input type=file accept=.json hidden><button type=button class="btn btn-secondary"><!$><!/> <!$><!/></button></label><a class="btn btn-primary"href=/settings/custom-fields/new>+ <!$><!/></a></div></div><!$><!/><!$><!/>`),w=s(`<p class=muted>`),T=s(`<option><!$><!/> (<!$><!/>)`),E=s(`<div class=fb-empty-groups><!$><!/><h4></h4><p class=muted></p><a class="btn btn-primary"href=/settings/custom-fields/new>`),D=s(`<div class=fb-groups-table__row role=button tabindex=0><div class=fb-groups-table__title><strong></strong><code></code></div><span class="fb-groups-table__desc muted"></span><span class=fb-groups-table__location></span><span class=fb-groups-table__count></span><span><span class=badge></span></span><div class=fb-groups-table__actions><button type=button class=fb-row-action></button><button type=button class=fb-row-action></button><button type=button class=fb-row-action></button><button type=button class=fb-row-action></button><button type=button class="fb-row-action is-danger">`);function O(){let{t:s}=g(),[c,O]=r([]),[k,A]=r([]),[j,M]=r(``),[N,ne]=r(``),[P,F]=r(!0),[I,L]=r(``);e(async()=>{try{let[e,t]=await Promise.all([_.getContentTypes(),_.getFieldGroups()]);A(e),O(t),e[0]&&M(e[0].slug)}catch(e){L(e instanceof Error?e.message:String(e))}finally{F(!1)}});let R=e=>[...new Set((e.locationRules??[]).flat().filter(e=>e.param===`content_type`&&e.operator===`eq`&&e.value).map(e=>e.value))],re=e=>{let t=R(e);return t.length===0?s(`settings.customFields.groups.allContentTypes`):t.map(e=>k().find(t=>t.slug===e)?.pluralLabel??e).join(`, `)},z=n(()=>{let e=N().trim().toLowerCase();return c().filter(e=>!e.key.startsWith(`core-fields-`)).filter(t=>{let n=R(t);return(!j()||n.length===0||n.includes(j()))&&(!e||t.title.toLowerCase().includes(e)||t.key.toLowerCase().includes(e))})}),B=e=>{window.location.href=`/settings/custom-fields/${e}`},V=async e=>{try{let t=await _.getFieldGroup(e.id);await _.createFieldGroup({...t,id:void 0,key:`${t.key}-copy-${Date.now().toString(36)}`,title:`${t.title} ${s(`settings.customFields.form.copySuffix`)}`}),await H()}catch(e){L(e instanceof Error?e.message:String(e))}},ie=async e=>{try{let t=await _.getFieldGroup(e.id);await _.updateFieldGroup(e.id,{...t,active:!e.active}),await H()}catch(e){L(e instanceof Error?e.message:String(e))}},ae=async e=>{if(window.confirm(s(`settings.customFields.actions.confirmDelete`)))try{await _.deleteFieldGroup(e.id),await H()}catch(e){L(e instanceof Error?e.message:String(e))}},H=async()=>{let e=await _.getFieldGroups();O(e)},[oe,U]=r(!1),[W,G]=r(null),[K,q]=r(!1),se=async e=>{try{let t=await _.exportFieldGroup(e.id),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`${e.key}.json`,document.body.appendChild(r),r.click(),r.remove(),URL.revokeObjectURL(n)}catch(e){L(e instanceof Error?e.message:String(e))}},J=e=>{let t=e.currentTarget;t.files&&t.files[0]&&G(t.files[0])},ce=async()=>{let e=W();if(e){q(!0);try{let t=await e.text(),n=JSON.parse(t),r=(await _.importFieldGroups(n)).results.filter(e=>!e.success);r.length>0?L(r.map(e=>`${e.key}: ${e.error}`).join(`; `)):L(``),U(!1),G(null),await H()}catch(e){L(e instanceof Error?e.message:String(e))}finally{q(!1)}}},Y=e=>s(`settings.customFields.actions.${e}`),X=e=>s(`settings.customFields.groups.${e}`);return(()=>{var e=f(C),n=e.firstChild,[r,c]=m(n.nextSibling),g=r.nextSibling,_=g.firstChild,O=_.firstChild,A=O.nextSibling,F=A.nextSibling,L=_.nextSibling.firstChild,R=L.firstChild,H=R.nextSibling,q=H.firstChild,[Z,le]=m(q.nextSibling),ue=Z.nextSibling.nextSibling,[de,fe]=m(ue.nextSibling),Q=L.nextSibling,pe=Q.firstChild.nextSibling,[me,he]=m(pe.nextSibling),ge=g.nextSibling,[$,_e]=m(ge.nextSibling),ve=$.nextSibling,[ye,be]=m(ve.nextSibling);return u(e,i(t,{get when(){return I()},get children(){var e=f(y);return u(e,I),e}}),r,c),u(O,()=>s(`settings.customFields.listEyebrow`)),u(A,()=>X(`title`)),u(F,()=>s(`settings.customFields.description`)),R.addEventListener(`change`,J),H.$$click=()=>U(!0),u(H,i(v,{name:`upload`,class:`fb-btn-icon`}),Z,le),u(H,()=>Y(`import`),de,fe),u(Q,()=>X(`new`),me,he),u(e,i(t,{get when(){return!P()},get fallback(){return(()=>{var e=f(w);return u(e,()=>s(`settings.customFields.loading`)),e})()},get children(){return[(()=>{var e=f(b),t=e.firstChild,n=t.firstChild,r=n.nextSibling,c=r.firstChild,h=c.nextSibling,[g,_]=m(h.nextSibling),v=t.nextSibling;return u(n,()=>s(`settings.customFields.contentType`)),r.addEventListener(`change`,e=>M(e.currentTarget.value)),u(c,()=>X(`allContentTypes`)),u(r,i(o,{get each(){return k()},children:e=>(()=>{var t=f(T),n=t.firstChild,[r,i]=m(n.nextSibling),o=r.nextSibling.nextSibling,[s,c]=m(o.nextSibling);return s.nextSibling,u(t,()=>e.pluralLabel,r,i),u(t,()=>e.slug,s,c),a(()=>d(t,`value`,e.slug)),t})()}),g,_),v.$$input=e=>ne(e.currentTarget.value),a(()=>p(v,`placeholder`,X(`search`))),a(()=>d(r,`value`,j())),a(()=>d(v,`value`,N())),l(),e})(),(()=>{var e=f(S);return u(e,i(t,{get when(){return z().length>0},get fallback(){return(()=>{var e=f(E),t=e.firstChild,[n,r]=m(t.nextSibling),a=n.nextSibling,o=a.nextSibling,s=o.nextSibling;return u(e,i(v,{name:`columns-3`,class:`fb-empty-icon`}),n,r),u(a,()=>X(`empty`)),u(o,()=>X(`emptyHint`)),u(s,()=>X(`new`)),e})()},get children(){return[(()=>{var e=f(x),t=e.firstChild,n=t.nextSibling,r=n.nextSibling,i=r.nextSibling,a=i.nextSibling;return u(t,()=>X(`groupName`)),u(n,()=>s(`settings.customFields.form.description`)),u(r,()=>X(`appliesTo`)),u(i,()=>X(`fields`)),u(a,()=>X(`status`)),e})(),i(o,{get each(){return z()},children:e=>(()=>{var t=f(D),n=t.firstChild,r=n.firstChild,i=r.nextSibling,o=n.nextSibling,s=o.nextSibling,c=s.nextSibling,d=c.nextSibling,p=d.firstChild,m=d.nextSibling,g=m.firstChild,_=g.nextSibling,v=_.nextSibling,y=v.nextSibling,b=y.nextSibling;return t.$$keydown=t=>{t.key===`Enter`&&B(e.id)},t.$$click=()=>B(e.id),u(r,()=>e.title),u(i,()=>e.key),u(o,()=>String(e.metadata?.description??`—`)),u(s,()=>re(e)),u(c,()=>e.fieldCount),u(p,(()=>{var t=h(()=>!!e.active);return()=>t()?X(`active`):X(`inactive`)})()),m.$$click=e=>e.stopPropagation(),g.$$click=()=>B(e.id),u(g,()=>Y(`edit`)),_.$$click=()=>void se(e),u(_,()=>Y(`export`)),v.$$click=()=>void V(e),u(v,()=>Y(`duplicate`)),y.$$click=()=>void ie(e),u(y,(()=>{var t=h(()=>!!e.active);return()=>t()?Y(`deactivate`):Y(`activate`)})()),b.$$click=()=>void ae(e),u(b,()=>Y(`delete`)),a(t=>{var n=!!e.active,r=!e.active;return n!==t.e&&p.classList.toggle(`badge-success`,t.e=n),r!==t.t&&p.classList.toggle(`badge-secondary`,t.t=r),t},{e:void 0,t:void 0}),l(),t})()})]}})),e})()]}}),$,_e),u(e,i(t,{get when(){return oe()},get children(){var e=f(te),n=e.firstChild,r=n.firstChild,o=r.firstChild,c=o.nextSibling,g=r.nextSibling,_=g.firstChild,y=_.nextSibling,b=y.firstChild,x=b.nextSibling,[S,C]=m(x.nextSibling),w=S.nextSibling,T=y.nextSibling,[E,D]=m(T.nextSibling),O=g.nextSibling.firstChild,k=O.nextSibling;return e.$$click=()=>{U(!1),G(null)},n.$$click=e=>e.stopPropagation(),u(o,()=>Y(`import`)),c.$$click=()=>{U(!1),G(null)},u(c,i(v,{name:`x`})),u(_,()=>s(`settings.customFields.import.description`)),y.$$click=()=>document.getElementById(`import-file-input`)?.click(),b.addEventListener(`change`,J),u(y,i(v,{name:`upload`,class:`fb-dropzone-icon`}),S,C),u(w,(()=>{var e=h(()=>!!W());return()=>e()?W().name:s(`settings.customFields.import.dropzone`)})()),u(g,i(t,{get when(){return W()},get children(){var e=f(ee);return u(e,()=>s(`settings.customFields.import.hint`)),e}}),E,D),O.$$click=()=>{U(!1),G(null)},u(O,()=>s(`common.cancel`)),k.$$click=ce,u(k,(()=>{var e=h(()=>!!K());return()=>e()?s(`common.loading`):Y(`import`)})()),a(e=>{var t=s(`common.close`),n=!W()||K();return t!==e.e&&p(c,`aria-label`,e.e=t),n!==e.t&&d(k,`disabled`,e.t=n),e},{e:void 0,t:void 0}),l(),e}}),ye,be),l(),e})()}c([`click`,`input`,`keydown`]);export{O as FieldGroupList};
@@ -0,0 +1,3 @@
1
+ import{S as e,a as t,f as n,h as r,i,l as a,p as o,r as s,s as c}from"./solid.Ck4Vtfe4.js";import{_ as l,a as u,f as d,l as f,m as p,o as m,p as h,s as g,t as _,u as v}from"./web.DD6VKaIp.js";import{t as y}from"./preload-helper.oCYlU9a4.js";import{n as b}from"./api.53l1ob4Z.js";import"./src.CYKGYEyR.js";function x(e){return e==null?!0:typeof e==`string`?e.trim()===``:Array.isArray(e)?e.length===0:!1}function S(e,t,n,r){return!t||!x(e)||(r.push({field:n,code:`REQUIRED`,message:`${n} é obrigatório`}),!1)}function C(e,t,n,r){if(x(e))return;let i=String(e),a=t.minLength??t.minimum,o=t.characterLimit??t.maxLength;a!==void 0&&i.length<a&&r.push({field:n,code:`MIN_LENGTH`,message:`${n} deve ter pelo menos ${a} caracteres`}),o!==void 0&&i.length>o&&r.push({field:n,code:`CHARACTER_LIMIT`,message:`${n} excede o limite de ${o} caracteres`})}function w(e,t,n){x(e)||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(e))||n.push({field:t,code:`INVALID_EMAIL`,message:`${t} não é um e-mail válido`})}function T(e,t,n){if(!x(e))try{let t=new URL(String(e));if(![`http:`,`https:`].includes(t.protocol))throw Error(`protocol`)}catch{n.push({field:t,code:`INVALID_URL`,message:`${t} não é uma URL válida (http/https)`})}}function E(e,t,n,r){if(x(e))return;let i=Number(e);if(Number.isNaN(i)){r.push({field:n,code:`NOT_A_NUMBER`,message:`${n} deve ser um número`});return}let a=t.minValue??t.min,o=t.maxValue??t.max,s=t.step;if(a!==void 0&&i<a&&r.push({field:n,code:`MIN_VALUE`,message:`${n} deve ser maior ou igual a ${a}`}),o!==void 0&&i>o&&r.push({field:n,code:`MAX_VALUE`,message:`${n} deve ser menor ou igual a ${o}`}),s!==void 0&&s>0){let e=a??0;Math.abs((i-e)/s-Math.round((i-e)/s))>1e-9&&r.push({field:n,code:`STEP_MISMATCH`,message:`${n} deve seguir o incremento de ${s}`})}}function D(e){let t=e.choices??[];return new Set(t.map(e=>String(e.value)))}function O(e,t,n,r,i){n||t.has(String(e))||i.push({field:r,code:`INVALID_CHOICE`,message:`${r} contém um valor fora das opções permitidas`})}function k(e,t,n,r){let i=t.minSelections,a=t.maxSelections;i!==void 0&&e.length<i&&r.push({field:n,code:`MIN_SELECTIONS`,message:`${n} requer no mínimo ${i} seleção(ões)`}),a!==void 0&&e.length>a&&r.push({field:n,code:`MAX_SELECTIONS`,message:`${n} permite no máximo ${a} seleção(ões)`})}function A(e,t,n,r){if(x(e))return;let i=!!t.multiple,a=!!(t.allowCustom??!1),o=D(t);if(i){if(!Array.isArray(e)){r.push({field:n,code:`NOT_ARRAY`,message:`${n} deve ser uma lista`});return}if(!a)for(let t of e)O(t,o,!1,n,r);k(e,t,n,r);return}O(e,o,a,n,r),Array.isArray(e)&&r.push({field:n,code:`SINGLE_ONLY`,message:`${n} aceita apenas um valor`})}function j(e,t,n,r){if(x(e))return;if(!Array.isArray(e)){r.push({field:n,code:`NOT_ARRAY`,message:`${n} deve ser uma lista de valores`});return}let i=D(t);for(let t of e)O(t,i,!0,n,r);k(e,t,n,r)}function ee(e,t,n,r){x(e)||O(e,D(t),!!t.allowCustom,n,r)}function te(e,t,n){e!=null&&typeof e!=`boolean`&&e!==0&&e!==1&&e!==`0`&&e!==`1`&&n.push({field:t,code:`NOT_BOOLEAN`,message:`${t} deve ser verdadeiro ou falso`})}function M(e,t,n,r){if(typeof e!=`object`||!e||Array.isArray(e)){r.push({field:n,code:`INVALID_MEDIA`,message:`${n} deve referenciar uma mídia válida`});return}let i=e,a=t.mimeTypes??[];a.length>0&&i.mimeType&&(a.map(e=>e.toLowerCase()).includes(i.mimeType.toLowerCase())||r.push({field:n,code:`INVALID_MIME`,message:`${n} não aceita arquivos do tipo ${i.mimeType}`}));let o=t.maxSize,s=t.minSize;if(i.size!==void 0&&(o!==void 0&&i.size>o&&r.push({field:n,code:`FILE_TOO_LARGE`,message:`${n} excede o tamanho máximo de ${Math.round(o/1024)}KB`}),s!==void 0&&i.size<s&&r.push({field:n,code:`FILE_TOO_SMALL`,message:`${n} está abaixo do tamanho mínimo de ${Math.round(s/1024)}KB`})),i.width!==void 0&&i.height!==void 0){let e=t.minWidth,a=t.maxWidth,o=t.minHeight,s=t.maxHeight;e!==void 0&&i.width<e&&r.push({field:n,code:`MIN_WIDTH`,message:`${n} requer largura mínima de ${e}px`}),a!==void 0&&i.width>a&&r.push({field:n,code:`MAX_WIDTH`,message:`${n} permite largura máxima de ${a}px`}),o!==void 0&&i.height<o&&r.push({field:n,code:`MIN_HEIGHT`,message:`${n} requer altura mínima de ${o}px`}),s!==void 0&&i.height>s&&r.push({field:n,code:`MAX_HEIGHT`,message:`${n} permite altura máxima de ${s}px`})}}function N(e,t,n,r){x(e)||M(e,t,n,r)}function P(e,t,n,r){x(e)||M(e,t,n,r)}function ne(e,t,n,r){if(e==null)return;if(!Array.isArray(e)){r.push({field:n,code:`NOT_ARRAY`,message:`${n} deve ser uma lista de imagens`});return}let i=t.minSelections!==void 0||t.maxSelections!==void 0;if(e.length===0&&!i)return;let a=t.minSelections,o=t.maxSelections;a!==void 0&&e.length<a&&r.push({field:n,code:`MIN_SELECTIONS`,message:`${n} requer no mínimo ${a} imagem(ns)`}),o!==void 0&&e.length>o&&r.push({field:n,code:`MAX_SELECTIONS`,message:`${n} permite no máximo ${o} imagem(ns)`});for(let i of e)M(i,t,n,r)}function re(e,t,n,r){if(x(e))return;let i=t.multiple!==!1,a=t.minSelections,o=t.maxSelections,s=Array.isArray(e)?e:[e];for(let e of s)if(typeof e!=`string`&&typeof e!=`number`){r.push({field:n,code:`INVALID_ID`,message:`${n} contém um identificador inválido`});return}i?(o!==void 0&&s.length>o&&r.push({field:n,code:`MAX_SELECTIONS`,message:`${n} permite no máximo ${o} seleção(ões)`}),a!==void 0&&s.length<a&&r.push({field:n,code:`MIN_SELECTIONS`,message:`${n} requer no mínimo ${a} seleção(ões)`})):s.length>1&&r.push({field:n,code:`SINGLE_ONLY`,message:`${n} aceita apenas um valor`})}function ie(e,t,n){if(x(e))return;if(typeof e!=`object`||!e){n.push({field:t,code:`INVALID_LINK`,message:`${t} deve ser um objeto de link`});return}let r=e;if(!r.url||typeof r.url!=`string`){n.push({field:t,code:`LINK_URL_REQUIRED`,message:`${t} requer uma URL`});return}try{let e=new URL(r.url);if(![`http:`,`https:`,`mailto:`,`tel:`].includes(e.protocol)&&!r.url.startsWith(`#`)&&!r.url.startsWith(`/`))throw Error(`protocol`)}catch{!r.url.startsWith(`#`)&&!r.url.startsWith(`/`)&&!r.url.startsWith(`?`)&&n.push({field:t,code:`INVALID_URL`,message:`${t} contém uma URL inválida`})}r.target!==void 0&&![`_self`,`_blank`].includes(String(r.target))&&n.push({field:t,code:`INVALID_TARGET`,message:`${t} aceita apenas _self ou _blank`})}function ae(e,t,n){if(x(e))return;if(typeof e!=`object`||!e){n.push({field:t,code:`INVALID_MAP`,message:`${t} deve conter endereço e coordenadas`});return}let r=e;x(r.address)&&n.push({field:t,code:`ADDRESS_REQUIRED`,message:`${t} requer um endereço`});let i=Number(r.lat),a=Number(r.lng);(!Number.isFinite(i)||i<-90||i>90)&&n.push({field:t,code:`INVALID_LATITUDE`,message:`${t} contém latitude inválida (-90 a 90)`}),(!Number.isFinite(a)||a<-180||a>180)&&n.push({field:t,code:`INVALID_LONGITUDE`,message:`${t} contém longitude inválida (-180 a 180)`})}var oe=/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;function se(e,t,n,r){if(x(e))return;let i=String(e),a=i.startsWith(`rgba(`);if(a&&!t.enableOpacity){r.push({field:n,code:`OPACITY_DISABLED`,message:`${n} não permite transparência`});return}if(!a&&!oe.test(i)){r.push({field:n,code:`INVALID_COLOR`,message:`${n} deve ser uma cor em formato hexadecimal válido`});return}let o=t.palette??[];o.length>0&&(o.map(e=>e.toLowerCase()).includes(i.toLowerCase())||r.push({field:n,code:`NOT_IN_PALETTE`,message:`${n} deve usar uma cor da paleta definida`}))}function ce(e,t){if(e.type===`clone`||e.type===`repeater`||e.type===`group`||e.type===`flexible_content`)return null;let n=e.config??{},r=[];switch(S(t,e.required,e.label,r),e.type){case`text`:case`textarea`:case`password`:C(t,n,e.label,r);break;case`slug`:C(t,n,e.label,r),!x(t)&&!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(String(t))&&r.push({field:e.label,code:`INVALID_SLUG`,message:`${e.label} deve ser um slug válido (a-z, 0-9 e hífens)`});break;case`email`:w(t,e.label,r);break;case`url`:case`oembed`:T(t,e.label,r);break;case`number`:case`range`:E(t,n,e.label,r);break;case`wysiwyg`:C(t,n,e.label,r);break;case`select`:A(t,n,e.label,r);break;case`checkbox`:j(t,n,e.label,r);break;case`radio`:ee(t,n,e.label,r);break;case`true_false`:te(t,e.label,r);break;case`image`:N(t,n,e.label,r);break;case`file`:P(t,n,e.label,r);break;case`gallery`:ne(t,n,e.label,r);break;case`link`:ie(t,e.label,r);break;case`page_link`:case`post_object`:case`relationship`:case`taxonomy`:case`user`:re(t,n,e.label,r);break;case`google_map`:ae(t,e.label,r);break;case`color_picker`:se(t,n,e.label,r)}return r[0]?.message??null}var le=new Set(`a.abbr.b.blockquote.br.code.dd.div.dl.dt.em.figcaption.figure.h1.h2.h3.h4.h5.h6.hr.i.img.li.ol.p.pre.q.s.span.strong.sub.sup.u.ul`.split(`.`)),ue=new Set([`br`,`hr`,`img`]),de=new Set([`script`,`style`,`iframe`,`object`,`embed`,`svg`,`math`,`textarea`,`title`,`noscript`,`template`]),fe=new Set([`class`,`title`,`alt`,`width`,`height`,`href`,`src`,`target`,`rel`]),pe=new Set([`http`,`https`,`mailto`,`tel`]),me=new Set([`http`,`https`]),F={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`,colon:`:`,tab:` `,newline:`
2
+ `,sol:`/`,lpar:`(`,rpar:`)`,num:`#`,period:`.`,excl:`!`,comma:`,`};function I(e){return e.replace(/&#x([0-9a-fA-F]+);?/g,(e,t)=>L(parseInt(t,16))).replace(/&#(\d+);?/g,(e,t)=>L(parseInt(t,10))).replace(/&([a-zA-Z][a-zA-Z0-9]{1,30});?/g,(e,t)=>F[t in F?t:t.toLowerCase()]??e)}function L(e){if(!Number.isFinite(e)||e<0||e>1114111)return``;try{return String.fromCodePoint(e)}catch{return``}}function R(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`)}function z(e){return e.replace(/&(?![a-zA-Z][a-zA-Z0-9]{1,30};|#[0-9]{1,7};|#[xX][0-9a-fA-F]{1,6};)|[<>]/g,e=>e===`&`?`&amp;`:e===`<`?`&lt;`:`&gt;`)}function B(e,t){let n=I(e).replace(/[\t\n\r]/g,``).trim(),r=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(n);return!r||t.has(r[1].toLowerCase())}function V(e){return R(I(e))}function he(e){let t=[],n=e.length,r=0,i=e=>e===` `||e===` `||e===`
3
+ `||e===`\r`||e===`\f`;for(;r<n;){for(;r<n&&(i(e.charAt(r))||e.charAt(r)===`/`);)r++;if(r>=n)break;let a=``;for(;r<n&&!i(e.charAt(r))&&e.charAt(r)!==`=`&&e.charAt(r)!==`>`&&e.charAt(r)!==`/`&&e.charAt(r)!==`<`;)a+=e.charAt(r),r++;if(!a){r++;continue}let o=``,s=r;for(;s<n&&i(e.charAt(s));)s++;if(s<n&&e.charAt(s)===`=`){for(s++;s<n&&i(e.charAt(s));)s++;if(s<n&&(e.charAt(s)===`"`||e.charAt(s)===`'`)){let t=e.charAt(s);s++;let r=s;for(;s<n&&e.charAt(s)!==t;)s++;o=e.slice(r,s),s++}else{let t=s;for(;s<n&&!i(e.charAt(s))&&e.charAt(s)!==`>`;)s++;o=e.slice(t,s)}r=s}t.push([a.toLowerCase(),o])}return t}function ge(e,t){let n=[],r=new Set,i=!1;for(let[e,a]of t)if(fe.has(e)&&!r.has(e)&&(e!==`href`||B(a,pe))&&(e!==`src`||B(a,me))){if(e===`target`){if(V(a)!==`_blank`)continue;i=!0;continue}e!==`rel`&&(r.add(e),n.push(`${e}="${V(a)}"`))}return e===`a`&&i&&(n.push(`target="_blank"`),n.push(`rel="noopener noreferrer"`)),n.length>0?` ${n.join(` `)}`:``}function H(e){if(typeof e!=`string`||e.length===0)return``;let t=e.toLowerCase(),n=e.length,r=[],i=``,a=0;for(;a<n;){let o=e.indexOf(`<`,a);if(o===-1){i+=z(e.slice(a));break}if(o>a&&(i+=z(e.slice(a,o))),e.startsWith(`<!--`,o)){let t=e.indexOf(`-->`,o+4);a=t===-1?n:t+3;continue}if(e.charAt(o+1)===`!`||e.charAt(o+1)===`?`){let t=e.indexOf(`>`,o+2);a=t===-1?n:t+1;continue}let s=/^<(\/?)([a-zA-Z][a-zA-Z0-9]*)(?=[\s/>])/.exec(e.slice(o,Math.min(o+64,n)));if(!s){i+=`&lt;`,a=o+1;continue}let c=s[1]===`/`,l=s[2].toLowerCase(),u=o+s[0].length,d=``;for(;u<n;){let t=e[u];if(d)t===d&&(d=``);else if(t===`"`||t===`'`)d=t;else if(t===`>`)break;u++}if(u>=n)break;let f=e.slice(o+s[0].length,u);if(a=u+1,!c&&de.has(l)){let r=t.indexOf(`</${l}`,a);if(r===-1)break;let i=e.indexOf(`>`,r);a=i===-1?n:i+1;continue}if(c){let e=r.lastIndexOf(l);if(e!==-1){for(let t=r.length-1;t>=e;t--)i+=`</${r[t]}>`;r.length=e}continue}if(!le.has(l))continue;let p=ge(l,he(f));ue.has(l)?i+=`<${l}${p} />`:(i+=`<${l}${p}>`,r.push(l))}for(let e=r.length-1;e>=0;e--)i+=`</${r[e]}>`;return i}var _e=l(`<ul class=relationship-picker__selection>`),ve=l(`<li class=relationship-picker__empty>Buscando...`),ye=l(`<li class=relationship-picker__empty>Nenhum resultado`),be=l(`<ul class=relationship-picker__results><!$><!/><!$><!/><!$><!/>`),xe=l(`<div class=relationship-picker><!$><!/><input type=search class=input><!$><!/>`),Se=l(`<li><!$><!/><button type=button aria-label=Remover>×`),Ce=l(`<li><button type=button><!$><!/><span class=relationship-picker__type>`);function we(e){let[i,c]=r(``),[l,u]=r([]),[_,y]=r([]),[x,S]=r(!1),[C,w]=r(!1),T=n(()=>{let t=e.value;return Array.isArray(t)?t.map(String):t?[String(t)]:[]}),E=async()=>{S(!0);try{let t=await b.getContent({type:e.postType,status:`PUBLISHED`,search:i()||void 0,limit:10});u(t.data.filter(e=>!T().includes(e.id)).map(e=>({id:e.id,title:e.title,type:e.type}))),w(!0)}catch{u([])}finally{S(!1)}},D=t=>{y(e=>[...e,t]),e.multiple?e.onChange([...T(),t.id]):(e.onChange(t.id),c(``)),u([]),w(!1)},O=t=>{y(e=>e.filter(e=>e.id!==t));let n=T().filter(e=>e!==t);e.onChange(e.multiple?n:n[0]??null)},k=async()=>{C()||await E()};return(()=>{var n=m(xe),r=n.firstChild,[u,y]=g(r.nextSibling),b=u.nextSibling,S=b.nextSibling,[A,j]=g(S.nextSibling);return f(n,a(t,{get when(){return _().length>0||T().length>0},get children(){var e=m(_e);return f(e,a(s,{get each(){return _()},children:e=>(()=>{var t=m(Se),n=t.firstChild,[r,i]=g(n.nextSibling),a=r.nextSibling;return f(t,()=>e.title,r,i),a.$$click=()=>O(e.id),d(),t})()})),e}}),u,y),b.addEventListener(`blur`,()=>setTimeout(()=>w(!1),150)),b.$$input=e=>{c(e.currentTarget.value),E()},b.addEventListener(`focus`,()=>void k()),f(n,a(t,{get when(){return v(()=>!!C())()&&(x()||l().length>0)},get children(){var e=m(be),n=e.firstChild,[r,i]=g(n.nextSibling),o=r.nextSibling,[c,u]=g(o.nextSibling),p=c.nextSibling,[h,_]=g(p.nextSibling);return f(e,a(t,{get when(){return x()},get children(){return m(ve)}}),r,i),f(e,a(s,{get each(){return l()},children:e=>(()=>{var t=m(Ce),n=t.firstChild,r=n.firstChild,[i,a]=g(r.nextSibling),o=i.nextSibling;return n.$$click=()=>D(e),n.$$mousedown=e=>e.preventDefault(),f(n,()=>e.title,i,a),f(o,()=>e.type),d(),t})()}),c,u),f(e,a(t,{get when(){return v(()=>!x())()&&l().length===0},get children(){return m(ye)}}),h,_),e}}),A,j),o(()=>h(b,`placeholder`,e.placeholder??`Buscar conteúdo...`)),o(()=>p(b,`value`,i())),d(),n})()}u([`input`,`click`,`mousedown`]);var Te=l(`<div class="fb-plugin-field-renderer fb-plugin-field-renderer--loading"><div class=fb-spinner aria-hidden=true></div><span>Carregando editor...`),Ee=l(`<div class=fb-renderer-error><i data-lucide=alert-circle aria-hidden=true></i><span>`),De=l(`<div class="fb-plugin-field-renderer fb-plugin-field-renderer--fallback"><!$><!/><!$><!/>`),Oe=l(`<div class=fb-plugin-field-renderer>`),ke=l(`<textarea class="input fb-plugin-fallback-textarea">`),Ae=l(`<input type=number class=input>`),je=l(`<input type=text class=input>`);function Me(n){let[o,s]=r(null),[l,u]=r(null),[d,p]=r(!0),[h,v]=r(!1);e(async()=>{let e=[n.adminRendererPath,n.adminComponentPath].filter(Boolean);for(let t of e)try{let e=await y(()=>import(t),[]),n=e.default||e.PluginFieldRenderer||e.PluginFieldConfig||Object.values(e)[0];if(n){s(n),p(!1);return}}catch(e){console.debug(`[PluginFieldRenderer] Failed to load ${t}:`,e)}n.adminRendererPath&&!h()&&v(!0),u(`Componente de renderização não encontrado`),p(!1)});let b=e=>{n.onChange(e)};return a(c,{get children(){return[a(i,{get when(){return d()},get children(){return m(Te)}}),a(i,{get when(){return l()||!o()},get children(){var e=m(De),r=e.firstChild,[i,o]=g(r.nextSibling),s=i.nextSibling,[c,u]=g(s.nextSibling);return f(e,a(t,{get when(){return l()},get children(){var e=m(Ee),t=e.firstChild.nextSibling;return f(t,l),e}}),i,o),f(e,a(Ne,{get field(){return n.field},get value(){return n.value},onChange:b,get disabled(){return n.disabled},get _t(){return n._t}}),c,u),e}}),a(i,{when:!0,get children(){var e=m(Oe);return f(e,a(_,{get component(){return o()},get field(){return n.field},get value(){return n.value},onChange:b,get disabled(){return n.disabled},get _t(){return n._t}})),e}})]}})}function Ne(e){let{field:t,value:n,onChange:r,disabled:i}=e,a=t.config?.inputType||`textarea`,o=t.config?.placeholder||``,s=t.config?.rows||4;return a===`textarea`||a===`code`||a===`markdown`?(()=>{var e=m(ke);return e.$$input=e=>r(e.currentTarget.value),p(e,`value`,n),h(e,`placeholder`,o),h(e,`rows`,s),p(e,`disabled`,i),h(e,`spellcheck`,!1),d(),e})():a===`number`?(()=>{var e=m(Ae);return e.$$input=e=>r(Number(e.currentTarget.value)||0),p(e,`value`,n),h(e,`placeholder`,o),p(e,`disabled`,i),d(),e})():(()=>{var e=m(je);return e.$$input=e=>r(e.currentTarget.value),p(e,`value`,n),h(e,`placeholder`,o),p(e,`disabled`,i),d(),e})()}u([`input`]);var Pe=l(`<span class=field-renderer__required>*`),Fe=l(`<p class=field-renderer__instructions>`),Ie=l(`<p class=field-renderer__error role=alert>`),Le=l(`<div class=field-renderer><label class=field-renderer__label><!$><!/><!$><!/></label><!$><!/><!$><!/><!$><!/>`),U=l(`<input type=text class=input>`),Re=l(`<textarea class=input>`),ze=l(`<div class=field-renderer__wysiwyg><div class=field-renderer__wysiwyg-toolbar role=toolbar><select class=input value><option value></option><option value="<h1>"></option><option value="<h2>"></option><option value="<h3>"></option><option value="<h4>"></option><option value="<blockquote>"></option><option value="<pre>"></option></select><span class=field-renderer__wysiwyg-divider></span><button type=button><strong></strong></button><button type=button><em></em></button><button type=button><u></u></button><span class=field-renderer__wysiwyg-divider></span><button type=button></button><button type=button></button><button type=button></button></div><div class="field-renderer__wysiwyg-body input"role=textbox aria-multiline=true>`),Be=l(`<input type=number class=input>`),Ve=l(`<input type=email class=input>`),He=l(`<input type=url class=input placeholder=https://>`),Ue=l(`<input type=password class=input>`),We=l(`<input type=checkbox>`),W=l(`<select class=input>`),G=l(`<option>`),K=l(`<div class=field-renderer__choices>`),Ge=l(`<label><input type=radio> <!$><!/>`),Ke=l(`<label><input type=checkbox> <!$><!/>`),qe=l(`<input type=date class=input>`),Je=l(`<input type=datetime-local class=input>`),Ye=l(`<input type=time class=input>`),Xe=l(`<input type=color class=input>`),Ze=l(`<div class=field-renderer__map><input type=text class=input placeholder=Endereço><input type=number class=input placeholder="Latitude (-90 a 90)"step=any min=-90 max=90><input type=number class=input placeholder="Longitude (-180 a 180)"step=any min=-180 max=180>`),Qe=l(`<div class=field-renderer__link><input type=url class=input placeholder="https:// ou /caminho"><select class=input><option value=_self>Mesma janela</option><option value=_blank>Nova janela`),$e=l(`<div class=field-renderer__rows><!$><!/><button type=button class=btn>+ Adicionar linha`),et=l(`<div class=field-renderer__rows><!$><!/><select class=input value><option value>+ Adicionar layout...</option><!$><!/>`),q=l(`<div class=field-renderer__row><div class=field-renderer__row-header><span><!$><!/> <!$><!/></span><button type=button class=btn>↑</button><button type=button class=btn>↓</button><button type=button class="btn btn-danger">Remover</button></div><!$><!/>`),tt=l(`<p class=field-renderer__instructions>Layout "<!$><!/>" não encontrado.`),nt=l(`<fieldset class=field-renderer__group>`),rt=l(`<div class=field-renderer__row><div class=field-renderer__row-header><span>Linha <!$><!/></span><button type=button class="btn btn-danger">Remover</button></div><!$><!/>`),it=l(`<input type=file class=input>`);function J(e){return e==null||e===``||Array.isArray(e)&&e.length===0||typeof e==`boolean`&&!e}function Y(e){return e.toLowerCase().normalize(`NFD`).replace(/[̀-ͯ]/g,``).replace(/[^a-z0-9]+/g,`-`).replace(/(^-|-$)/g,``)}function X(e,t){if(typeof t==`boolean`)return!!e===t;let n=Number(e),r=Number(t);return e===t||!Number.isNaN(n)&&!Number.isNaN(r)&&n===r}function Z(e,t){let n=e.conditionalLogic;return!n?.groups||n.groups.length===0||n.groups.map(e=>{let n=e.rules??[];if(n.length===0)return!0;let r=n.map(e=>{let n=t[e.field];switch(e.operator){case`eq`:return X(n,e.value);case`neq`:return!X(n,e.value);case`gt`:return Number(n)>Number(e.value);case`lt`:return Number(n)<Number(e.value);case`contains`:return Array.isArray(n)?n.includes(e.value):String(n??``).includes(String(e.value));case`pattern_matches`:try{return new RegExp(String(e.value)).test(String(n??``))}catch{return!1}case`has_any_value`:return!J(n);case`has_no_value`:return J(n);default:return!1}});return e.match===`ANY`?r.some(Boolean):r.every(Boolean)}).some(Boolean)}var at=new Set([`message`,`tab`,`accordion`]);function Q(e){let i=()=>Z(e.field,e.values),[s,c]=r(!1),l=()=>e.values[e.field.name],u=n(()=>s()?ce(e.field,e.values[e.field.name]):null),d=t=>{c(!0),e.onChange(e.field.name,t)};return a(t,{get when(){return v(()=>!!i())()&&!at.has(e.field.type)},get children(){var n=m(Le),r=n.firstChild,i=r.firstChild,[s,c]=g(i.nextSibling),p=s.nextSibling,[_,v]=g(p.nextSibling),y=r.nextSibling,[b,x]=g(y.nextSibling),S=b.nextSibling,[C,w]=g(S.nextSibling),T=C.nextSibling,[E,D]=g(T.nextSibling);return f(r,()=>e.field.label,s,c),f(r,a(t,{get when(){return e.field.required},get children(){return m(Pe)}}),_,v),f(n,a(t,{get when(){return e.field.instructions},get children(){var t=m(Fe);return f(t,()=>e.field.instructions),t}}),b,x),f(n,a(ot,{get field(){return e.field},get value(){return l()},onChange:d,get values(){return e.values},get t(){return e.t}}),C,w),f(n,a(t,{get when(){return u()},get children(){var e=m(Ie);return f(e,u),e}}),E,D),o(()=>h(n,`data-field-type`,e.field.type)),n}})}function ot(e){let n=()=>e.field.config??{},r=e=>{if(!e)return;document.execCommand(`formatBlock`,!1,e);let t=document.querySelector(`.field-renderer__wysiwyg-body[contenteditable="true"]:focus`);t&&t.dispatchEvent(new Event(`input`,{bubbles:!0}))},i=e=>{document.execCommand(e,!1);let t=document.querySelector(`.field-renderer__wysiwyg-body[contenteditable="true"]:focus`);t&&t.dispatchEvent(new Event(`input`,{bubbles:!0}))},c=()=>{let t=window.prompt(e.t(`content.editor.linkPrompt`)||``);if(t){document.execCommand(`createLink`,!1,t);let e=document.querySelector(`.field-renderer__wysiwyg-body[contenteditable="true"]:focus`);e&&e.dispatchEvent(new Event(`input`,{bubbles:!0}))}};switch(e.field.type){case`text`:return(()=>{var t=m(U);return t.addEventListener(`blur`,t=>e.onChange(t.currentTarget.value.trim())),t.$$input=t=>e.onChange(t.currentTarget.value),o(e=>{var r=n().placeholder,i=n().maxLength??n().characterLimit;return r!==e.e&&h(t,`placeholder`,e.e=r),i!==e.t&&h(t,`maxlength`,e.t=i),e},{e:void 0,t:void 0}),o(()=>p(t,`value`,e.value??n().defaultValue??``)),d(),t})();case`textarea`:return(()=>{var t=m(Re);return t.$$input=t=>e.onChange(t.currentTarget.value),o(e=>{var r=n().rows??4,i=n().placeholder,a=n().maxLength??n().characterLimit;return r!==e.e&&h(t,`rows`,e.e=r),i!==e.t&&h(t,`placeholder`,e.t=i),a!==e.a&&h(t,`maxlength`,e.a=a),e},{e:void 0,t:void 0,a:void 0}),o(()=>p(t,`value`,e.value??n().defaultValue??``)),d(),t})();case`wysiwyg`:return(()=>{var t=m(ze),a=t.firstChild,s=a.firstChild,l=s.firstChild,u=l.nextSibling,g=u.nextSibling,_=g.nextSibling,v=_.nextSibling,y=v.nextSibling,b=y.nextSibling,x=s.nextSibling.nextSibling,S=x.firstChild,C=x.nextSibling,w=C.firstChild,T=C.nextSibling,E=T.firstChild,D=T.nextSibling.nextSibling,O=D.nextSibling,k=O.nextSibling,A=a.nextSibling;return s.addEventListener(`change`,e=>r(e.currentTarget.value)),f(l,()=>e.t(`content.editor.formatParagraph`)),f(u,()=>e.t(`content.editor.formatH1`)),f(g,()=>e.t(`content.editor.formatH2`)),f(_,()=>e.t(`content.editor.formatH3`)),f(v,()=>e.t(`content.editor.formatH4`)),f(y,()=>e.t(`content.editor.formatBlockquote`)),f(b,()=>e.t(`content.editor.formatCode`)),x.$$click=()=>i(`bold`),f(S,()=>e.t(`content.editor.bold`)),C.$$click=()=>i(`italic`),f(w,()=>e.t(`content.editor.italic`)),T.$$click=()=>i(`underline`),f(E,()=>e.t(`content.editor.underline`)),D.$$click=()=>i(`insertUnorderedList`),f(D,()=>e.t(`content.editor.bulletList`)),O.$$click=()=>i(`insertOrderedList`),f(O,()=>e.t(`content.editor.numberedList`)),k.$$click=()=>c(),f(k,()=>e.t(`content.editor.link`)),A.addEventListener(`blur`,t=>{let n=H(t.currentTarget.innerHTML);n!==t.currentTarget.innerHTML&&(t.currentTarget.innerHTML=n,e.onChange(n))}),A.$$input=t=>{let n=t.currentTarget.innerHTML;e.onChange(n)},h(A,`contenteditable`,!0),o(t=>{var r=e.t(`content.editor.toolbar`),i=e.t(`content.editor.format`),o=n().placeholder,c=e.value??n().defaultValue??``;return r!==t.e&&h(a,`aria-label`,t.e=r),i!==t.t&&h(s,`aria-label`,t.t=i),o!==t.a&&h(A,`data-placeholder`,t.a=o),c!==t.o&&p(A,`innerHTML`,t.o=c),t},{e:void 0,t:void 0,a:void 0,o:void 0}),d(),t})();case`number`:case`range`:return(()=>{var t=m(Be);return t.$$input=t=>e.onChange(t.currentTarget.value===``?void 0:Number(t.currentTarget.value)),o(e=>{var r=n().min??n().minValue,i=n().max??n().maxValue,a=n().step;return r!==e.e&&h(t,`min`,e.e=r),i!==e.t&&h(t,`max`,e.t=i),a!==e.a&&h(t,`step`,e.a=a),e},{e:void 0,t:void 0,a:void 0}),o(()=>p(t,`value`,e.value??n().defaultValue??``)),d(),t})();case`email`:return(()=>{var t=m(Ve);return t.$$input=t=>e.onChange(t.currentTarget.value),o(()=>p(t,`value`,e.value??n().defaultValue??``)),d(),t})();case`url`:return(()=>{var t=m(He);return t.$$input=t=>e.onChange(t.currentTarget.value),o(()=>p(t,`value`,e.value??n().defaultValue??``)),d(),t})();case`password`:return(()=>{var t=m(Ue);return t.$$input=t=>e.onChange(t.currentTarget.value),o(()=>p(t,`value`,e.value??n().defaultValue??``)),d(),t})();case`slug`:return(()=>{var t=m(U);return t.addEventListener(`blur`,t=>e.onChange(Y(t.currentTarget.value.trim()))),t.$$input=t=>e.onChange(Y(t.currentTarget.value)),o(()=>h(t,`placeholder`,n().placeholder)),o(()=>p(t,`value`,e.value??n().defaultValue??``)),d(),t})();case`true_false`:return(()=>{var t=m(We);return t.addEventListener(`change`,t=>e.onChange(t.currentTarget.checked)),o(()=>p(t,`checked`,!!e.value)),t})();case`select`:return(()=>{var t=m(W);return t.addEventListener(`change`,t=>e.onChange(t.currentTarget.multiple?Array.from(t.currentTarget.selectedOptions).map(e=>e.value):t.currentTarget.value)),f(t,a(s,{get each(){return n().choices??[]},children:e=>(()=>{var t=m(G);return f(t,()=>e.label),o(()=>p(t,`value`,e.value)),t})()})),o(()=>p(t,`multiple`,n().multiple===!0)),o(()=>p(t,`value`,n().multiple===!0?Array.isArray(e.value)?e.value:[]:e.value??n().defaultValue??``)),t})();case`radio`:return(()=>{var t=m(K);return f(t,a(s,{get each(){return n().choices??[]},children:t=>(()=>{var n=m(Ge),r=n.firstChild,i=r.nextSibling.nextSibling,[a,s]=g(i.nextSibling);return r.addEventListener(`change`,()=>e.onChange(t.value)),f(n,()=>t.label,a,s),o(()=>h(r,`name`,e.field.name)),o(()=>p(r,`checked`,e.value===t.value)),n})()})),t})();case`checkbox`:return(()=>{var t=m(K);return f(t,a(s,{get each(){return n().choices??[]},children:t=>{let n=()=>Array.isArray(e.value)&&e.value.includes(t.value);return(()=>{var r=m(Ke),i=r.firstChild,a=i.nextSibling.nextSibling,[s,c]=g(a.nextSibling);return i.addEventListener(`change`,n=>{let r=Array.isArray(e.value)?[...e.value]:[];e.onChange(n.currentTarget.checked?[...r,t.value]:r.filter(e=>e!==t.value))}),f(r,()=>t.label,s,c),o(()=>p(i,`checked`,n())),r})()}})),t})();case`date_picker`:return(()=>{var t=m(qe);return t.$$input=t=>e.onChange(t.currentTarget.value),o(()=>p(t,`value`,e.value??n().defaultValue??``)),d(),t})();case`date_time_picker`:return(()=>{var t=m(Je);return t.$$input=t=>e.onChange(t.currentTarget.value),o(()=>p(t,`value`,e.value??n().defaultValue??``)),d(),t})();case`time_picker`:return(()=>{var t=m(Ye);return t.$$input=t=>e.onChange(t.currentTarget.value),o(()=>p(t,`value`,e.value??n().defaultValue??``)),d(),t})();case`color_picker`:return(()=>{var t=m(Xe);return t.addEventListener(`change`,t=>e.onChange(t.currentTarget.value)),o(()=>p(t,`value`,e.value??n().defaultValue??``)),t})();case`image`:case`file`:return a($,{multiple:!1,get onChange(){return e.onChange},get accept(){return e.field.type===`image`?`image/*`:void 0}});case`gallery`:return a($,{multiple:!0,get onChange(){return e.onChange},accept:`image/*`});case`google_map`:return(()=>{var t=m(Ze),n=t.firstChild,r=n.nextSibling,i=r.nextSibling;return n.$$input=t=>{let n=e.value??{};e.onChange({...n,address:t.currentTarget.value})},r.$$input=t=>{let n=e.value??{};e.onChange({...n,lat:Number(t.currentTarget.value)})},i.$$input=t=>{let n=e.value??{};e.onChange({...n,lng:Number(t.currentTarget.value)})},o(()=>p(n,`value`,e.value?.address??``)),o(()=>p(r,`value`,e.value?.lat??``)),o(()=>p(i,`value`,e.value?.lng??``)),d(),t})();case`link`:return(()=>{var t=m(Qe),n=t.firstChild,r=n.nextSibling;return n.$$input=t=>{let n=e.value??{};e.onChange({...n,url:t.currentTarget.value})},r.addEventListener(`change`,t=>{let n=e.value??{};e.onChange({...n,target:t.currentTarget.value})}),o(()=>p(n,`value`,e.value?.url??``)),o(()=>p(r,`value`,e.value?.target??`_self`)),d(),t})();case`relationship`:case`post_object`:return a(we,{get postType(){return n().postType},get multiple(){return n().multiple!==!1},get value(){return e.value},get onChange(){return e.onChange}});case`taxonomy`:case`user`:return a(ct,{get field(){return e.field},get value(){return e.value},get onChange(){return e.onChange},get multiple(){return n().multiple!==!1}});case`repeater`:{let t=()=>Array.isArray(e.value)?e.value:[];return(()=>{var n=m($e),r=n.firstChild,[i,o]=g(r.nextSibling),c=i.nextSibling;return f(n,a(s,{get each(){return t()},children:(n,r)=>a(st,{get field(){return e.field},row:n,get index(){return r()},get t(){return e.t},onUpdate:n=>{let i=[...t()];i[r()]=n,e.onChange(i)},onRemove:()=>{e.onChange(t().filter((e,t)=>t!==r()))}})}),i,o),c.$$click=()=>e.onChange([...t(),{}]),d(),n})()}case`flexible_content`:{let r=()=>e.field.layouts.length>0?e.field.layouts:n().layouts??[],i=()=>(Array.isArray(e.value)?e.value:[]).map(e=>({fc_layout:String(e.fc_layout??``),data:e}));return(()=>{var n=m(et),c=n.firstChild,[l,u]=g(c.nextSibling),h=l.nextSibling,_=h.firstChild.nextSibling,[v,y]=g(_.nextSibling);return f(n,a(s,{get each(){return i()},children:(n,c)=>{let l=()=>r().find(e=>e.name===n.fc_layout),u=()=>{let{fc_layout:e,...t}=n.data;return t};return(()=>{var r=m(q),h=r.firstChild,_=h.firstChild,v=_.firstChild,[y,b]=g(v.nextSibling),x=y.nextSibling.nextSibling,[S,C]=g(x.nextSibling),w=_.nextSibling,T=w.nextSibling,E=T.nextSibling,D=h.nextSibling,[O,k]=g(D.nextSibling);return f(_,()=>l()?.label||n.fc_layout||`Linha`,y,b),f(_,()=>c()+1,S,C),w.$$click=()=>{let t=[...Array.isArray(e.value)?e.value:[]];[t[c()-1],t[c()]]=[t[c()],t[c()-1]],e.onChange(t)},T.$$click=()=>{let t=[...Array.isArray(e.value)?e.value:[]];[t[c()],t[c()+1]]=[t[c()+1],t[c()]],e.onChange(t)},E.$$click=()=>e.onChange((Array.isArray(e.value)?e.value:[]).filter((e,t)=>t!==c())),f(r,a(t,{get when(){return l()},get fallback(){return(()=>{var e=m(tt),t=e.firstChild.nextSibling,[r,i]=g(t.nextSibling);return r.nextSibling,f(e,()=>n.fc_layout,r,i),e})()},get children(){return a(s,{get each(){return l().subFields??[]},children:t=>a(Q,{field:t,get values(){return u()},get t(){return e.t},onChange:(t,n)=>{let r=[...Array.isArray(e.value)?e.value:[]];r[c()]={...r[c()],[t]:n},e.onChange(r)}})})}}),O,k),o(e=>{var t=c()===0,n=c()===i().length-1;return t!==e.e&&p(w,`disabled`,e.e=t),n!==e.t&&p(T,`disabled`,e.t=n),e},{e:void 0,t:void 0}),d(),r})()}}),l,u),h.addEventListener(`change`,t=>{t.currentTarget.value&&(e.onChange([...Array.isArray(e.value)?e.value:[],{fc_layout:t.currentTarget.value}]),t.currentTarget.value=``)}),f(h,a(s,{get each(){return r()},children:e=>(()=>{var t=m(G);return f(t,()=>e.label??e.name),o(()=>p(t,`value`,e.name)),t})()}),v,y),n})()}case`group`:return(()=>{var t=m(nt);return f(t,a(s,{get each(){return e.field.subFields??[]},children:t=>a(Q,{field:t,get values(){return e.value??{}},get t(){return e.t},onChange:(t,n)=>e.onChange({...e.value??{},[t]:n})})})),t})();default:return e.field.isPluginType&&(e.field.adminRendererPath||e.field.adminComponentPath)?a(Me,{get field(){return e.field},get value(){return e.value},get onChange(){return e.onChange},get adminRendererPath(){return e.field.adminRendererPath},get adminComponentPath(){return e.field.adminComponentPath},get _t(){return e.t}}):(()=>{var t=m(U);return t.$$input=t=>e.onChange(t.currentTarget.value),d(),t})()}}function st(e){return(()=>{var t=m(rt),n=t.firstChild,r=n.firstChild,i=r.firstChild.nextSibling,[o,c]=g(i.nextSibling),l=r.nextSibling,u=n.nextSibling,[p,h]=g(u.nextSibling);return f(r,()=>e.index+1,o,c),l.$$click=()=>e.onRemove(),f(t,a(s,{get each(){return e.field.subFields??[]},children:t=>a(Q,{field:t,get values(){return e.row},get t(){return e.t},onChange:(t,n)=>e.onUpdate({...e.row,[t]:n})})}),p,h),d(),t})()}function $(e){return(()=>{var t=m(it);return t.addEventListener(`change`,t=>{let n=Array.from(t.currentTarget.files??[]);e.onChange(e.multiple?n:n[0])}),o(n=>{var r=e.multiple,i=e.accept;return r!==n.e&&p(t,`multiple`,n.e=r),i!==n.t&&h(t,`accept`,n.t=i),n},{e:void 0,t:void 0}),t})()}function ct(e){let t=()=>Array.isArray(e.value)?e.value:e.value?[e.value]:[];return(()=>{var n=m(W);return n.addEventListener(`change`,t=>{let n=Array.from(t.currentTarget.selectedOptions).map(e=>e.value);e.onChange(e.multiple?n:n[0])}),f(n,a(s,{get each(){return e.field.config?.choices??[]},children:e=>(()=>{var n=m(G);return f(n,()=>e.label),o(()=>p(n,`selected`,t().includes(e.value))),o(()=>p(n,`value`,e.value)),n})()})),o(t=>{var r=e.multiple,i=Math.min(6,Math.max(3,(e.field.config?.choices??[]).length||3));return r!==t.e&&p(n,`multiple`,t.e=r),i!==t.t&&h(n,`size`,t.t=i),t},{e:void 0,t:void 0}),n})()}u([`input`,`click`]);export{Z as n,H as r,Q as t};
@@ -1,4 +1,4 @@
1
- import{p as e}from"./solid.Ck4Vtfe4.js";import{_ as t,l as n,o as r,p as i}from"./web.DD6VKaIp.js";import{n as a}from"./i18n.BFBHzd3w.js";var o=t(`<footer class=admin-footer role=contentinfo><div class=footer-content><div class=footer-left><p class=footer-version><span class=product-name>OkCMS</span></p></div><nav class=footer-links><a href=https://oktisworks.com target=_blank rel="noopener noreferrer"></a><a href=https://github.com/oktis-works/cms target=_blank rel="noopener noreferrer"></a><a href=https://docs.oktisworks.com target=_blank rel="noopener noreferrer"></a><a href=https://oktisworks.com/community target=_blank rel="noopener noreferrer"></a></nav><div class=footer-right><p class=footer-powered></p></div></div><style>
1
+ import{p as e}from"./solid.Ck4Vtfe4.js";import{_ as t,l as n,o as r,p as i}from"./web.DD6VKaIp.js";import{n as a}from"./i18n.A82w5XQu.js";var o=t(`<footer class=admin-footer role=contentinfo><div class=footer-content><div class=footer-left><p class=footer-version><span class=product-name>OkCMS</span></p></div><nav class=footer-links><a href=https://oktisworks.com target=_blank rel="noopener noreferrer"></a><a href=https://github.com/oktis-works/cms target=_blank rel="noopener noreferrer"></a><a href=https://docs.oktisworks.com target=_blank rel="noopener noreferrer"></a><a href=https://oktisworks.com/community target=_blank rel="noopener noreferrer"></a></nav><div class=footer-right><p class=footer-powered></p></div></div><style>
2
2
  .admin-footer {
3
3
  position: static;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{S as e,a as t,f as n,h as r,l as i}from"./solid.Ck4Vtfe4.js";import{_ as a,l as o,o as s,s as c,u as l}from"./web.DD6VKaIp.js";import{a as u,i as d,n as f,o as p,r as m,s as h}from"./i18n.BFBHzd3w.js";import{n as g}from"./api.53l1ob4Z.js";import{i as _,n as v,r as y,s as b}from"./src.CYKGYEyR.js";import{t as x}from"./TimezoneSelect.DDwsrzLo.js";var S=a(`<div class="notice notice--error">`),C=a(`<div class=notice>`),w=a(`<form><div class=form-grid></div><div class=media-details__actions>`),T=a(`<div class=general-settings><!$><!/><!$><!/><!$><!/>`),E=a(`<p class=muted>`),D=a(`<label class=general-settings__tz><!$><!/><!$><!/>`);function O(){let{t:a}=f(),[O,k]=r({}),[A,j]=r(``),[M,N]=r(!1),[P,F]=r(``),[I,L]=r(``),[R,z]=r(!1),B=n(()=>p.map(e=>({value:e,label:`${d[e]} ${u[e]}`}))),V=n(()=>[{key:`siteTitle`,label:a(`settings.general.fields.siteTitle`),type:`text`,placeholder:a(`settings.general.fields.siteTitlePlaceholder`)},{key:`siteDescription`,label:a(`settings.general.fields.siteDescription`),type:`text`,placeholder:a(`settings.general.fields.siteDescriptionPlaceholder`)},{key:`language`,label:a(`settings.general.fields.language`),type:`select`,options:B()}]);e(async()=>{try{let e=await g.getSettings(`general`),t={};for(let n of e)t[n.key]=typeof n.value==`string`?n.value:JSON.stringify(n.value??``);for(let e of V())t[e.key]===void 0&&(t[e.key]=``);j(t.language??``),k(t),N(!0)}catch(e){F(e instanceof Error?e.message:String(e))}});let H=async e=>{e.preventDefault(),F(``),L(``),z(!0);try{let e=await g.getSettings(`general`),t=new Map(e.map(e=>[e.key,e]));await g.updateSettings(V().map(e=>{let n=t.get(e.key);return{key:e.key,value:O()[e.key]??``,group:n?.group??`general`,type:n?.type??`string`}}));let n=O().language??``;if(h(n)&&n!==A()){m(n),window.location.reload();return}L(a(`settings.general.saved`))}catch(e){F(e instanceof Error?e.message:String(e))}finally{z(!1)}};return(()=>{var e=s(T),n=e.firstChild,[r,u]=c(n.nextSibling),d=r.nextSibling,[f,p]=c(d.nextSibling),m=f.nextSibling,[h,g]=c(m.nextSibling);return o(e,i(t,{get when(){return P()},get children(){var e=s(S);return o(e,P),e}}),r,u),o(e,i(t,{get when(){return I()},get children(){var e=s(C);return o(e,I),e}}),f,p),o(e,i(t,{get when(){return M()},get fallback(){return(()=>{var e=s(E);return o(e,()=>a(`settings.general.loading`)),e})()},get children(){return i(y,{get children(){var e=s(w),t=e.firstChild,n=t.nextSibling;return e.addEventListener(`submit`,H),o(t,()=>V().map(e=>e.type===`select`?i(b,{get name(){return e.key},get label(){return e.label},get value(){return O()[e.key]??``},get options(){return e.options??[]},onChange:t=>k({...O(),[e.key]:t})}):e.type===`timezone`?(()=>{var t=s(D),n=t.firstChild,[r,a]=c(n.nextSibling),l=r.nextSibling,[u,d]=c(l.nextSibling);return o(t,()=>e.label,r,a),o(t,i(x,{get value(){return O()[e.key]??``},get placeholder(){return e.placeholder??``},get searchPlaceholder(){return e.placeholder??``},onChange:t=>k({...O(),[e.key]:t})}),u,d),t})():i(_,{get name(){return e.key},get label(){return e.label},get placeholder(){return l(()=>`placeholder`in e)()?e.placeholder:``},get value(){return O()[e.key]??``},onInput:t=>k({...O(),[e.key]:t})}))),o(n,i(v,{variant:`primary`,type:`submit`,get disabled(){return R()},get loading(){return R()},get children(){return a(`settings.general.save`)}})),e}})}}),h,g),e})()}export{O as GeneralSettings};
1
+ import{S as e,a as t,f as n,h as r,l as i}from"./solid.Ck4Vtfe4.js";import{_ as a,l as o,o as s,s as c,u as l}from"./web.DD6VKaIp.js";import{a as u,i as d,n as f,o as p,r as m,s as h}from"./i18n.A82w5XQu.js";import{n as g}from"./api.53l1ob4Z.js";import{i as _,n as v,r as y,s as b}from"./src.CYKGYEyR.js";import{t as x}from"./TimezoneSelect.DDwsrzLo.js";var S=a(`<div class="notice notice--error">`),C=a(`<div class=notice>`),w=a(`<form><div class=form-grid></div><div class=media-details__actions>`),T=a(`<div class=general-settings><!$><!/><!$><!/><!$><!/>`),E=a(`<p class=muted>`),D=a(`<label class=general-settings__tz><!$><!/><!$><!/>`);function O(){let{t:a}=f(),[O,k]=r({}),[A,j]=r(``),[M,N]=r(!1),[P,F]=r(``),[I,L]=r(``),[R,z]=r(!1),B=n(()=>p.map(e=>({value:e,label:`${d[e]} ${u[e]}`}))),V=n(()=>[{key:`siteTitle`,label:a(`settings.general.fields.siteTitle`),type:`text`,placeholder:a(`settings.general.fields.siteTitlePlaceholder`)},{key:`siteDescription`,label:a(`settings.general.fields.siteDescription`),type:`text`,placeholder:a(`settings.general.fields.siteDescriptionPlaceholder`)},{key:`language`,label:a(`settings.general.fields.language`),type:`select`,options:B()}]);e(async()=>{try{let e=await g.getSettings(`general`),t={};for(let n of e)t[n.key]=typeof n.value==`string`?n.value:JSON.stringify(n.value??``);for(let e of V())t[e.key]===void 0&&(t[e.key]=``);j(t.language??``),k(t),N(!0)}catch(e){F(e instanceof Error?e.message:String(e))}});let H=async e=>{e.preventDefault(),F(``),L(``),z(!0);try{let e=await g.getSettings(`general`),t=new Map(e.map(e=>[e.key,e]));await g.updateSettings(V().map(e=>{let n=t.get(e.key);return{key:e.key,value:O()[e.key]??``,group:n?.group??`general`,type:n?.type??`string`}}));let n=O().language??``;if(h(n)&&n!==A()){m(n),window.location.reload();return}L(a(`settings.general.saved`))}catch(e){F(e instanceof Error?e.message:String(e))}finally{z(!1)}};return(()=>{var e=s(T),n=e.firstChild,[r,u]=c(n.nextSibling),d=r.nextSibling,[f,p]=c(d.nextSibling),m=f.nextSibling,[h,g]=c(m.nextSibling);return o(e,i(t,{get when(){return P()},get children(){var e=s(S);return o(e,P),e}}),r,u),o(e,i(t,{get when(){return I()},get children(){var e=s(C);return o(e,I),e}}),f,p),o(e,i(t,{get when(){return M()},get fallback(){return(()=>{var e=s(E);return o(e,()=>a(`settings.general.loading`)),e})()},get children(){return i(y,{get children(){var e=s(w),t=e.firstChild,n=t.nextSibling;return e.addEventListener(`submit`,H),o(t,()=>V().map(e=>e.type===`select`?i(b,{get name(){return e.key},get label(){return e.label},get value(){return O()[e.key]??``},get options(){return e.options??[]},onChange:t=>k({...O(),[e.key]:t})}):e.type===`timezone`?(()=>{var t=s(D),n=t.firstChild,[r,a]=c(n.nextSibling),l=r.nextSibling,[u,d]=c(l.nextSibling);return o(t,()=>e.label,r,a),o(t,i(x,{get value(){return O()[e.key]??``},get placeholder(){return e.placeholder??``},get searchPlaceholder(){return e.placeholder??``},onChange:t=>k({...O(),[e.key]:t})}),u,d),t})():i(_,{get name(){return e.key},get label(){return e.label},get placeholder(){return l(()=>`placeholder`in e)()?e.placeholder:``},get value(){return O()[e.key]??``},onInput:t=>k({...O(),[e.key]:t})}))),o(n,i(v,{variant:`primary`,type:`submit`,get disabled(){return R()},get loading(){return R()},get children(){return a(`settings.general.save`)}})),e}})}}),h,g),e})()}export{O as GeneralSettings};
@@ -1 +1 @@
1
- import{S as e,a as t,h as n,l as r,p as i,r as a}from"./solid.Ck4Vtfe4.js";import{_ as o,a as s,f as c,l,m as u,o as d,p as f,s as p,u as m}from"./web.DD6VKaIp.js";import{n as h}from"./i18n.BFBHzd3w.js";import{n as g}from"./api.53l1ob4Z.js";var _=o(`<div class="notice notice--error">`),v=o(`<div class="notice notice--success">`),y=o(`<div class=table-scroll><table class=table><thead><tr><th></th><th></th><th></th><th></th><th></th><th></th></tr></thead><tbody>`),b=o(`<div class="resource-hub logs-manager"><!$><!/><!$><!/><section class=card><div class=card-header-row><div><h3></h3><p></p></div></div><form class="resource-form logs-retention-form"><label><!$><!/><input class=input type=number min=1 max=3650 required></label><button class="btn btn-primary"type=submit></button></form></section><section class=card><div class=card-header-row><h3></h3><button class=btn type=button></button></div><div class=logs-filters><input class=input><input class=input><button class=btn type=button></button></div><!$><!/>`),x=o(`<p>`),S=o(`<tr><td></td><td><code></code></td><td><!$><!/><!$><!/></td><td></td><td></td><td>`);function C(){let{t:o}=h(),[s,C]=n([]),[w,T]=n(90),[E,D]=n(``),[O,k]=n(``),[A,j]=n(``),[M,N]=n(``),[P,F]=n(!0),I=async()=>{F(!0),j(``);try{let[e,t]=await Promise.all([g.getAuditLogConfig(),g.listAuditLogs({limit:500,action:E()||void 0,resourceType:O()||void 0})]);T(e.retentionDays),C(t.data)}catch(e){j(e instanceof Error?e.message:String(e))}finally{F(!1)}};e(I);let L=async e=>{e.preventDefault();try{let e=await g.updateAuditLogConfig(w());T(e.retentionDays),N(o(`logs.retentionSaved`)),await I()}catch(e){j(e instanceof Error?e.message:String(e))}};return(()=>{var e=d(b),n=e.firstChild,[h,g]=p(n.nextSibling),C=h.nextSibling,[j,N]=p(C.nextSibling),F=j.nextSibling,R=F.firstChild,z=R.firstChild.firstChild,B=z.nextSibling,V=R.nextSibling,H=V.firstChild,U=H.firstChild,[W,ee]=p(U.nextSibling),G=W.nextSibling,te=H.nextSibling,K=F.nextSibling,q=K.firstChild,J=q.firstChild,Y=J.nextSibling,X=q.nextSibling,Z=X.firstChild,Q=Z.nextSibling,$=Q.nextSibling,ne=X.nextSibling,[re,ie]=p(ne.nextSibling);return l(e,r(t,{get when(){return A()},get children(){var e=d(_);return l(e,A),e}}),h,g),l(e,r(t,{get when(){return M()},get children(){var e=d(v);return l(e,M),e}}),j,N),l(z,()=>o(`logs.retentionTitle`)),l(B,()=>o(`logs.retentionDescription`)),V.addEventListener(`submit`,L),l(H,()=>o(`logs.retentionDays`),W,ee),G.$$input=e=>T(Number(e.currentTarget.value)),l(te,()=>o(`common.save`)),l(J,()=>o(`logs.historyTitle`)),Y.$$click=()=>void I(),l(Y,()=>o(`common.refresh`)),Z.$$input=e=>D(e.currentTarget.value),Q.$$input=e=>k(e.currentTarget.value),$.$$click=()=>void I(),l($,()=>o(`common.filter`)),l(K,r(t,{get when(){return!P()},get fallback(){return(()=>{var e=d(x);return l(e,()=>o(`logs.loading`)),e})()},get children(){return r(t,{get when(){return s().length>0},get fallback(){return(()=>{var e=d(x);return l(e,()=>o(`logs.empty`)),e})()},get children(){var e=d(y),t=e.firstChild.firstChild,n=t.firstChild.firstChild,i=n.nextSibling,c=i.nextSibling,u=c.nextSibling,f=u.nextSibling,h=f.nextSibling,g=t.nextSibling;return l(n,()=>o(`logs.columns.date`)),l(i,()=>o(`logs.columns.action`)),l(c,()=>o(`logs.columns.resource`)),l(u,()=>o(`logs.columns.user`)),l(f,()=>o(`logs.columns.status`)),l(h,()=>o(`logs.columns.ip`)),l(g,r(a,{get each(){return s()},children:e=>(()=>{var t=d(S),n=t.firstChild,r=n.nextSibling,i=r.firstChild,a=r.nextSibling,s=a.firstChild,[c,u]=p(s.nextSibling),f=c.nextSibling,[h,g]=p(f.nextSibling),_=a.nextSibling,v=_.nextSibling,y=v.nextSibling;return l(n,(()=>{var t=m(()=>!!e.created_at);return()=>t()?new Date(e.created_at).toLocaleString():`—`})()),l(i,()=>e.action),l(a,()=>e.resourceType,c,u),l(a,(()=>{var t=m(()=>!!e.resourceId);return()=>t()?`:${e.resourceId}`:``})(),h,g),l(_,()=>e.userId??o(`logs.system`)),l(v,()=>String(e.changes?.status??`—`)),l(y,()=>e.ipAddress??`—`),t})()})),e}})}}),re,ie),i(e=>{var t=o(`logs.actionFilter`),n=o(`logs.resourceFilter`);return t!==e.e&&f(Z,`placeholder`,e.e=t),n!==e.t&&f(Q,`placeholder`,e.t=n),e},{e:void 0,t:void 0}),i(()=>u(G,`value`,w())),i(()=>u(Z,`value`,E())),i(()=>u(Q,`value`,O())),c(),e})()}s([`input`,`click`]);export{C as LogsManager};
1
+ import{S as e,a as t,h as n,l as r,p as i,r as a}from"./solid.Ck4Vtfe4.js";import{_ as o,a as s,f as c,l,m as u,o as d,p as f,s as p,u as m}from"./web.DD6VKaIp.js";import{n as h}from"./i18n.A82w5XQu.js";import{n as g}from"./api.53l1ob4Z.js";var _=o(`<div class="notice notice--error">`),v=o(`<div class="notice notice--success">`),y=o(`<div class=table-scroll><table class=table><thead><tr><th></th><th></th><th></th><th></th><th></th><th></th></tr></thead><tbody>`),b=o(`<div class="resource-hub logs-manager"><!$><!/><!$><!/><section class=card><div class=card-header-row><div><h3></h3><p></p></div></div><form class="resource-form logs-retention-form"><label><!$><!/><input class=input type=number min=1 max=3650 required></label><button class="btn btn-primary"type=submit></button></form></section><section class=card><div class=card-header-row><h3></h3><button class=btn type=button></button></div><div class=logs-filters><input class=input><input class=input><button class=btn type=button></button></div><!$><!/>`),x=o(`<p>`),S=o(`<tr><td></td><td><code></code></td><td><!$><!/><!$><!/></td><td></td><td></td><td>`);function C(){let{t:o}=h(),[s,C]=n([]),[w,T]=n(90),[E,D]=n(``),[O,k]=n(``),[A,j]=n(``),[M,N]=n(``),[P,F]=n(!0),I=async()=>{F(!0),j(``);try{let[e,t]=await Promise.all([g.getAuditLogConfig(),g.listAuditLogs({limit:500,action:E()||void 0,resourceType:O()||void 0})]);T(e.retentionDays),C(t.data)}catch(e){j(e instanceof Error?e.message:String(e))}finally{F(!1)}};e(I);let L=async e=>{e.preventDefault();try{let e=await g.updateAuditLogConfig(w());T(e.retentionDays),N(o(`logs.retentionSaved`)),await I()}catch(e){j(e instanceof Error?e.message:String(e))}};return(()=>{var e=d(b),n=e.firstChild,[h,g]=p(n.nextSibling),C=h.nextSibling,[j,N]=p(C.nextSibling),F=j.nextSibling,R=F.firstChild,z=R.firstChild.firstChild,B=z.nextSibling,V=R.nextSibling,H=V.firstChild,U=H.firstChild,[W,ee]=p(U.nextSibling),G=W.nextSibling,te=H.nextSibling,K=F.nextSibling,q=K.firstChild,J=q.firstChild,Y=J.nextSibling,X=q.nextSibling,Z=X.firstChild,Q=Z.nextSibling,$=Q.nextSibling,ne=X.nextSibling,[re,ie]=p(ne.nextSibling);return l(e,r(t,{get when(){return A()},get children(){var e=d(_);return l(e,A),e}}),h,g),l(e,r(t,{get when(){return M()},get children(){var e=d(v);return l(e,M),e}}),j,N),l(z,()=>o(`logs.retentionTitle`)),l(B,()=>o(`logs.retentionDescription`)),V.addEventListener(`submit`,L),l(H,()=>o(`logs.retentionDays`),W,ee),G.$$input=e=>T(Number(e.currentTarget.value)),l(te,()=>o(`common.save`)),l(J,()=>o(`logs.historyTitle`)),Y.$$click=()=>void I(),l(Y,()=>o(`common.refresh`)),Z.$$input=e=>D(e.currentTarget.value),Q.$$input=e=>k(e.currentTarget.value),$.$$click=()=>void I(),l($,()=>o(`common.filter`)),l(K,r(t,{get when(){return!P()},get fallback(){return(()=>{var e=d(x);return l(e,()=>o(`logs.loading`)),e})()},get children(){return r(t,{get when(){return s().length>0},get fallback(){return(()=>{var e=d(x);return l(e,()=>o(`logs.empty`)),e})()},get children(){var e=d(y),t=e.firstChild.firstChild,n=t.firstChild.firstChild,i=n.nextSibling,c=i.nextSibling,u=c.nextSibling,f=u.nextSibling,h=f.nextSibling,g=t.nextSibling;return l(n,()=>o(`logs.columns.date`)),l(i,()=>o(`logs.columns.action`)),l(c,()=>o(`logs.columns.resource`)),l(u,()=>o(`logs.columns.user`)),l(f,()=>o(`logs.columns.status`)),l(h,()=>o(`logs.columns.ip`)),l(g,r(a,{get each(){return s()},children:e=>(()=>{var t=d(S),n=t.firstChild,r=n.nextSibling,i=r.firstChild,a=r.nextSibling,s=a.firstChild,[c,u]=p(s.nextSibling),f=c.nextSibling,[h,g]=p(f.nextSibling),_=a.nextSibling,v=_.nextSibling,y=v.nextSibling;return l(n,(()=>{var t=m(()=>!!e.created_at);return()=>t()?new Date(e.created_at).toLocaleString():`—`})()),l(i,()=>e.action),l(a,()=>e.resourceType,c,u),l(a,(()=>{var t=m(()=>!!e.resourceId);return()=>t()?`:${e.resourceId}`:``})(),h,g),l(_,()=>e.userId??o(`logs.system`)),l(v,()=>String(e.changes?.status??`—`)),l(y,()=>e.ipAddress??`—`),t})()})),e}})}}),re,ie),i(e=>{var t=o(`logs.actionFilter`),n=o(`logs.resourceFilter`);return t!==e.e&&f(Z,`placeholder`,e.e=t),n!==e.t&&f(Q,`placeholder`,e.t=n),e},{e:void 0,t:void 0}),i(()=>u(G,`value`,w())),i(()=>u(Z,`value`,E())),i(()=>u(Q,`value`,O())),c(),e})()}s([`input`,`click`]);export{C as LogsManager};
@@ -1 +1 @@
1
- import{S as e,a as t,h as n,l as r,p as i,r as a}from"./solid.Ck4Vtfe4.js";import{_ as o,a as s,f as ee,l as c,m as l,o as u,p as d,s as f,u as p}from"./web.DD6VKaIp.js";import{n as m}from"./i18n.BFBHzd3w.js";import{n as h}from"./api.53l1ob4Z.js";import{a as g,i as _,n as v,o as y,s as te}from"./src.CYKGYEyR.js";var ne=o(`<div class="notice notice--error">`),re=o(`<div class=notice>`),ie=o(`<div class=media-grid>`),ae=o(`<div class=media-library><!$><!/><!$><!/><div class=upload-zone><p><strong></strong> ou</p><label class="btn btn-primary"style=cursor:pointer><!$><!/><input type=file multiple style=display:none></label><p class=muted></p></div><div class=toolbar><!$><!/><!$><!/><!$><!/></div><!$><!/><!$><!/><!$><!/>`),oe=o(`<p class=muted>`),se=o(`<img loading=lazy>`,!0,!1,!1),ce=o(`<button type=button class=media-card><div class=media-card__preview></div><div class=media-card__meta><span class=media-card__name></span><span class=muted><!$><!/> · <!$><!/>`),le=o(`<span class=media-card__ext>`),ue=o(`<img>`),de=o(`<video controls>`),fe=o(`<audio controls>`),pe=o(`<iframe>`),me=o(`<div class="media-card__ext media-modal__file-icon">`),he=o(`<dt>`),ge=o(`<dd>`),_e=o(`<div class=media-modal><div class=media-modal__preview><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/></div><div class=media-modal__layout><div class=media-modal__fields><!$><!/><!$><!/><!$><!/><label class=field__label><!$><!/><textarea class="input media-modal__textarea"name=media-description></textarea></label></div><dl class="media-details__list media-modal__facts"><dt></dt><dd></dd><dt></dt><dd></dd><dt></dt><dd></dd><!$><!/><dt></dt><dd></dd><dt></dt><dd class=media-details__url><code></code><button class="btn btn-secondary btn-sm"type=button></button></dd></dl></div><div class=media-modal__replace><label class="btn btn-secondary"style=cursor:pointer><!$><!/><input type=file style=display:none></label><span class=muted></span></div><div class=media-details__actions><!$><!/><!$><!/><!$><!/>`);function ve(e){return Number.isFinite(e)?e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`:`—`}function b(e){return e.mime_type.startsWith(`image/`)}function ye(e){return e.mime_type.startsWith(`video/`)}function be(e){return e.mime_type.startsWith(`audio/`)}function xe(e){return e.mime_type===`application/pdf`}function x(e){return e.title?.trim()||e.filename}function Se(e){let t=e.metadata,n=Number(t?.width),r=Number(t?.height);return n>0&&r>0?`${n} × ${r} px`:null}function S(e){return{title:e.title??e.filename,alt:e.alt??``,caption:e.caption??``,description:e.description??``}}function C(o){let{t:s}=m(),[C,w]=n([]),[Ce,T]=n(0),[E,D]=n(1),[O,we]=n(``),[k,A]=n(``),[j,M]=n(``),[Te,N]=n(``),[Ee,P]=n(!1),[F,I]=n(null),[L,R]=n({title:``,alt:``,caption:``,description:``}),[De,z]=n(!1),[Oe,B]=n(!1),[ke,V]=n(!1),H=e=>h.mediaUrl(e.url),U=async()=>{try{let e=await h.listMedia({page:E(),limit:24,search:O()||void 0,mimeType:k()||void 0});w(e.data??[]),T(e.total??0)}catch(e){M(e instanceof Error?e.message:String(e))}};e(U);let W=async()=>{D(1),await U()},Ae=e=>{I(e),R(S(e)),M(``)},G=async e=>{if(e.length===0)return;P(!0),M(``),N(``);let t=0;for(let n of Array.from(e))try{await h.uploadMedia(n,{alt:``}),t+=1}catch(e){M(`${n.name}: ${e instanceof Error?e.message:String(e)}`)}P(!1),t>0&&(N(s(`media.toasts.uploaded`,{count:t})),D(1),await U())},je=async e=>{if(confirm(s(`media.details.confirmDelete`,{filename:e.filename})))try{await h.deleteMedia(e.id),F()?.id===e.id&&I(null),await U()}catch(e){M(e instanceof Error?e.message:String(e))}},Me=async()=>{let e=F();if(e){B(!0),M(``);try{let t=await h.updateMedia(e.id,L()),n={...e,...t};I(n),R(S(n)),N(s(`media.details.saved`)),await U()}catch(e){M(e instanceof Error?e.message:String(e))}finally{B(!1)}}},Ne=async e=>{let t=F();if(t){V(!0),M(``);try{let n=await h.replaceMediaFile(t.id,e),r={...t,...n};I(r),R(S(r)),N(s(`media.details.replaced`)),await U()}catch(e){M(e instanceof Error?e.message:String(e))}finally{V(!1)}}},Pe=async e=>{try{await navigator.clipboard.writeText(e),N(s(`media.details.copied`))}catch{M(s(`media.details.copyError`))}};return(()=>{var e=u(ae),n=e.firstChild,[m,h]=f(n.nextSibling),S=m.nextSibling,[w,T]=f(S.nextSibling),M=w.nextSibling,N=M.firstChild,P=N.firstChild,B=N.nextSibling,V=B.firstChild,[Fe,Ie]=f(V.nextSibling),K=Fe.nextSibling,Le=B.nextSibling,q=M.nextSibling,Re=q.firstChild,[J,Y]=f(Re.nextSibling),ze=J.nextSibling,[X,Be]=f(ze.nextSibling),Ve=X.nextSibling,[He,Z]=f(Ve.nextSibling),Ue=q.nextSibling,[Q,We]=f(Ue.nextSibling),Ge=Q.nextSibling,[$,Ke]=f(Ge.nextSibling),qe=$.nextSibling,[Je,Ye]=f(qe.nextSibling);return c(e,r(t,{get when(){return j()},get children(){var e=u(ne);return c(e,j),e}}),m,h),c(e,r(t,{get when(){return Te()},get children(){var e=u(re);return c(e,Te),e}}),w,T),M.addEventListener(`drop`,e=>{e.preventDefault(),z(!1),e.dataTransfer&&G(e.dataTransfer.files)}),M.addEventListener(`dragleave`,()=>z(!1)),M.addEventListener(`dragover`,e=>{e.preventDefault(),z(!0)}),c(P,()=>s(`media.upload.dropzone`)),c(B,(()=>{var e=p(()=>!!Ee());return()=>e()?s(`media.upload.uploading`):s(`media.upload.select`)})(),Fe,Ie),K.addEventListener(`change`,e=>{e.currentTarget.files&&G(e.currentTarget.files),e.currentTarget.value=``}),c(Le,()=>s(`media.upload.hint`)),c(q,r(_,{name:`media-search`,get placeholder(){return s(`media.toolbar.search`)},get value(){return O()},onInput:e=>{we(e),W()}}),J,Y),c(q,r(te,{name:`media-mime`,get placeholder(){return s(`media.toolbar.allTypes`)},get value(){return k()},get options(){return[{value:`image/png`,label:s(`media.mimeTypes.png`)},{value:`image/jpeg`,label:s(`media.mimeTypes.jpeg`)},{value:`image/gif`,label:s(`media.mimeTypes.gif`)},{value:`image/webp`,label:s(`media.mimeTypes.webp`)},{value:`image/svg+xml`,label:s(`media.mimeTypes.svg`)},{value:`application/pdf`,label:s(`media.mimeTypes.pdf`)},{value:`video/mp4`,label:s(`media.mimeTypes.mp4`)},{value:`audio/mpeg`,label:s(`media.mimeTypes.mp3`)}]},onChange:e=>{A(e),W()}}),X,Be),c(q,r(v,{variant:`secondary`,onClick:()=>void W(),get children(){return s(`media.toolbar.searchBtn`)}}),He,Z),c(e,r(t,{get when(){return C().length>0},get fallback(){return(()=>{var e=u(oe);return c(e,()=>s(`media.empty`)),e})()},get children(){var e=u(ie);return c(e,r(a,{get each(){return C()},children:e=>(()=>{var n=u(ce),a=n.firstChild,o=a.nextSibling.firstChild,s=o.nextSibling,l=s.firstChild,[p,m]=f(l.nextSibling),h=p.nextSibling.nextSibling,[g,_]=f(h.nextSibling);return n.$$click=()=>Ae(e),c(a,r(t,{get when(){return b(e)},get fallback(){return(()=>{var t=u(le);return c(t,()=>e.mime_type.split(`/`)[1]?.toUpperCase()??`FILE`),t})()},get children(){var t=u(se);return i(n=>{var r=H(e),i=e.alt??x(e);return r!==n.e&&d(t,`src`,n.e=r),i!==n.t&&d(t,`alt`,n.t=i),n},{e:void 0,t:void 0}),t}})),c(o,()=>x(e)),c(s,()=>e.filename,p,m),c(s,()=>ve(e.size),g,_),i(t=>{var r=F()?.id===e.id,i=x(e);return r!==t.e&&n.classList.toggle(`media-card--selected`,t.e=r),i!==t.t&&d(o,`title`,t.t=i),t},{e:void 0,t:void 0}),ee(),n})()})),e}}),Q,We),c(e,r(y,{get page(){return E()},limit:24,get total(){return Ce()},onPageChange:e=>{D(e),U()}}),$,Ke),c(e,r(g,{get open(){return!!F()},get title(){return p(()=>!!F())()?x(F()):s(`media.details.title`)},onClose:()=>I(null),get children(){return r(t,{get when(){return F()},children:e=>(()=>{var n=u(_e),a=n.firstChild,o=a.firstChild,[m,h]=f(o.nextSibling),g=m.nextSibling,[y,te]=f(g.nextSibling),ne=y.nextSibling,[re,ie]=f(ne.nextSibling),ae=re.nextSibling,[oe,se]=f(ae.nextSibling),ce=oe.nextSibling,[le,S]=f(ce.nextSibling),C=a.nextSibling,w=C.firstChild,Ce=w.firstChild,[T,E]=f(Ce.nextSibling),D=T.nextSibling,[O,we]=f(D.nextSibling),k=O.nextSibling,[A,j]=f(k.nextSibling),M=A.nextSibling,Te=M.firstChild,[N,Ee]=f(Te.nextSibling),P=N.nextSibling,F=w.nextSibling,De=F.firstChild,z=De.nextSibling,B=z.nextSibling,V=B.nextSibling,U=V.nextSibling,W=U.nextSibling,Ae=W.nextSibling,[G,Fe]=f(Ae.nextSibling),Ie=G.nextSibling,K=Ie.nextSibling,Le=K.nextSibling,q=Le.nextSibling.firstChild,Re=q.nextSibling,J=C.nextSibling,Y=J.firstChild,ze=Y.firstChild,[X,Be]=f(ze.nextSibling),Ve=X.nextSibling,He=Y.nextSibling,Z=J.nextSibling,Ue=Z.firstChild,[Q,We]=f(Ue.nextSibling),Ge=Q.nextSibling,[$,Ke]=f(Ge.nextSibling),qe=$.nextSibling,[Je,Ye]=f(qe.nextSibling);return c(a,r(t,{get when(){return b(e())},get children(){var t=u(ue);return i(n=>{var r=H(e()),i=L().alt||x(e());return r!==n.e&&d(t,`src`,n.e=r),i!==n.t&&d(t,`alt`,n.t=i),n},{e:void 0,t:void 0}),t}}),m,h),c(a,r(t,{get when(){return ye(e())},get children(){var t=u(de);return i(()=>d(t,`src`,H(e()))),t}}),y,te),c(a,r(t,{get when(){return be(e())},get children(){var t=u(fe);return i(()=>d(t,`src`,H(e()))),t}}),re,ie),c(a,r(t,{get when(){return xe(e())},get children(){var t=u(pe);return i(n=>{var r=x(e()),i=H(e());return r!==n.e&&d(t,`title`,n.e=r),i!==n.t&&d(t,`src`,n.t=i),n},{e:void 0,t:void 0}),t}}),oe,se),c(a,r(t,{get when(){return p(()=>!(b(e())||ye(e())||be(e())))()&&!xe(e())},get children(){var t=u(me);return c(t,()=>e().mime_type.split(`/`)[1]?.toUpperCase()??`FILE`),t}}),le,S),c(w,r(_,{name:`media-title`,get label(){return s(`media.details.titleField`)},get value(){return L().title},onInput:e=>R({...L(),title:e})}),T,E),c(w,r(_,{name:`media-alt`,get label(){return s(`media.details.alt`)},get value(){return L().alt},onInput:e=>R({...L(),alt:e})}),O,we),c(w,r(_,{name:`media-caption`,get label(){return s(`media.details.caption`)},get value(){return L().caption},onInput:e=>R({...L(),caption:e})}),A,j),c(M,()=>s(`media.details.description`),N,Ee),P.$$input=e=>R({...L(),description:e.currentTarget.value}),c(De,()=>s(`media.details.file`)),c(z,()=>e().filename),c(B,()=>s(`media.details.type`)),c(V,()=>e().mime_type),c(U,()=>s(`media.details.size`)),c(W,()=>ve(e().size)),c(F,r(t,{get when(){return Se(e())},get children(){return[(()=>{var e=u(he);return c(e,()=>s(`media.details.dimensions`)),e})(),(()=>{var t=u(ge);return c(t,()=>Se(e())),t})()]}}),G,Fe),c(Ie,()=>s(`media.details.uploaded`)),c(K,(()=>{var t=p(()=>!!e().created_at);return()=>t()?new Date(e().created_at).toLocaleString():`—`})()),c(Le,()=>s(`media.details.url`)),c(q,()=>H(e())),Re.$$click=()=>void Pe(H(e())),c(Re,()=>s(`media.details.copy`)),c(Y,(()=>{var e=p(()=>!!ke());return()=>e()?s(`media.details.replacing`):s(`media.details.replace`)})(),X,Be),Ve.addEventListener(`change`,e=>{let t=e.currentTarget.files?.[0];t&&Ne(t),e.currentTarget.value=``}),c(He,()=>s(`media.details.replaceHint`)),c(Z,r(v,{variant:`primary`,get disabled(){return Oe()},get loading(){return Oe()},onClick:()=>void Me(),get children(){return s(`media.details.save`)}}),Q,We),c(Z,r(v,{variant:`danger`,onClick:()=>void je(e()),get children(){return s(`media.details.delete`)}}),$,Ke),c(Z,r(v,{variant:`secondary`,onClick:()=>I(null),get children(){return s(`media.details.close`)}}),Je,Ye),i(()=>l(Ve,`disabled`,ke())),i(()=>l(P,`value`,L().description)),ee(),n})()})}}),Je,Ye),i(e=>{var t=!!(De()||o.focusUpload),n=Ee();return t!==e.e&&M.classList.toggle(`upload-zone--active`,e.e=t),n!==e.t&&l(K,`disabled`,e.t=n),e},{e:void 0,t:void 0}),e})()}s([`click`,`input`]);export{C as MediaLibrary};
1
+ import{S as e,a as t,h as n,l as r,p as i,r as a}from"./solid.Ck4Vtfe4.js";import{_ as o,a as s,f as ee,l as c,m as l,o as u,p as d,s as f,u as p}from"./web.DD6VKaIp.js";import{n as m}from"./i18n.A82w5XQu.js";import{n as h}from"./api.53l1ob4Z.js";import{a as g,i as _,n as v,o as y,s as te}from"./src.CYKGYEyR.js";var ne=o(`<div class="notice notice--error">`),re=o(`<div class=notice>`),ie=o(`<div class=media-grid>`),ae=o(`<div class=media-library><!$><!/><!$><!/><div class=upload-zone><p><strong></strong> ou</p><label class="btn btn-primary"style=cursor:pointer><!$><!/><input type=file multiple style=display:none></label><p class=muted></p></div><div class=toolbar><!$><!/><!$><!/><!$><!/></div><!$><!/><!$><!/><!$><!/>`),oe=o(`<p class=muted>`),se=o(`<img loading=lazy>`,!0,!1,!1),ce=o(`<button type=button class=media-card><div class=media-card__preview></div><div class=media-card__meta><span class=media-card__name></span><span class=muted><!$><!/> · <!$><!/>`),le=o(`<span class=media-card__ext>`),ue=o(`<img>`),de=o(`<video controls>`),fe=o(`<audio controls>`),pe=o(`<iframe>`),me=o(`<div class="media-card__ext media-modal__file-icon">`),he=o(`<dt>`),ge=o(`<dd>`),_e=o(`<div class=media-modal><div class=media-modal__preview><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/></div><div class=media-modal__layout><div class=media-modal__fields><!$><!/><!$><!/><!$><!/><label class=field__label><!$><!/><textarea class="input media-modal__textarea"name=media-description></textarea></label></div><dl class="media-details__list media-modal__facts"><dt></dt><dd></dd><dt></dt><dd></dd><dt></dt><dd></dd><!$><!/><dt></dt><dd></dd><dt></dt><dd class=media-details__url><code></code><button class="btn btn-secondary btn-sm"type=button></button></dd></dl></div><div class=media-modal__replace><label class="btn btn-secondary"style=cursor:pointer><!$><!/><input type=file style=display:none></label><span class=muted></span></div><div class=media-details__actions><!$><!/><!$><!/><!$><!/>`);function ve(e){return Number.isFinite(e)?e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`:`—`}function b(e){return e.mime_type.startsWith(`image/`)}function ye(e){return e.mime_type.startsWith(`video/`)}function be(e){return e.mime_type.startsWith(`audio/`)}function xe(e){return e.mime_type===`application/pdf`}function x(e){return e.title?.trim()||e.filename}function Se(e){let t=e.metadata,n=Number(t?.width),r=Number(t?.height);return n>0&&r>0?`${n} × ${r} px`:null}function S(e){return{title:e.title??e.filename,alt:e.alt??``,caption:e.caption??``,description:e.description??``}}function C(o){let{t:s}=m(),[C,w]=n([]),[Ce,T]=n(0),[E,D]=n(1),[O,we]=n(``),[k,A]=n(``),[j,M]=n(``),[Te,N]=n(``),[Ee,P]=n(!1),[F,I]=n(null),[L,R]=n({title:``,alt:``,caption:``,description:``}),[De,z]=n(!1),[Oe,B]=n(!1),[ke,V]=n(!1),H=e=>h.mediaUrl(e.url),U=async()=>{try{let e=await h.listMedia({page:E(),limit:24,search:O()||void 0,mimeType:k()||void 0});w(e.data??[]),T(e.total??0)}catch(e){M(e instanceof Error?e.message:String(e))}};e(U);let W=async()=>{D(1),await U()},Ae=e=>{I(e),R(S(e)),M(``)},G=async e=>{if(e.length===0)return;P(!0),M(``),N(``);let t=0;for(let n of Array.from(e))try{await h.uploadMedia(n,{alt:``}),t+=1}catch(e){M(`${n.name}: ${e instanceof Error?e.message:String(e)}`)}P(!1),t>0&&(N(s(`media.toasts.uploaded`,{count:t})),D(1),await U())},je=async e=>{if(confirm(s(`media.details.confirmDelete`,{filename:e.filename})))try{await h.deleteMedia(e.id),F()?.id===e.id&&I(null),await U()}catch(e){M(e instanceof Error?e.message:String(e))}},Me=async()=>{let e=F();if(e){B(!0),M(``);try{let t=await h.updateMedia(e.id,L()),n={...e,...t};I(n),R(S(n)),N(s(`media.details.saved`)),await U()}catch(e){M(e instanceof Error?e.message:String(e))}finally{B(!1)}}},Ne=async e=>{let t=F();if(t){V(!0),M(``);try{let n=await h.replaceMediaFile(t.id,e),r={...t,...n};I(r),R(S(r)),N(s(`media.details.replaced`)),await U()}catch(e){M(e instanceof Error?e.message:String(e))}finally{V(!1)}}},Pe=async e=>{try{await navigator.clipboard.writeText(e),N(s(`media.details.copied`))}catch{M(s(`media.details.copyError`))}};return(()=>{var e=u(ae),n=e.firstChild,[m,h]=f(n.nextSibling),S=m.nextSibling,[w,T]=f(S.nextSibling),M=w.nextSibling,N=M.firstChild,P=N.firstChild,B=N.nextSibling,V=B.firstChild,[Fe,Ie]=f(V.nextSibling),K=Fe.nextSibling,Le=B.nextSibling,q=M.nextSibling,Re=q.firstChild,[J,Y]=f(Re.nextSibling),ze=J.nextSibling,[X,Be]=f(ze.nextSibling),Ve=X.nextSibling,[He,Z]=f(Ve.nextSibling),Ue=q.nextSibling,[Q,We]=f(Ue.nextSibling),Ge=Q.nextSibling,[$,Ke]=f(Ge.nextSibling),qe=$.nextSibling,[Je,Ye]=f(qe.nextSibling);return c(e,r(t,{get when(){return j()},get children(){var e=u(ne);return c(e,j),e}}),m,h),c(e,r(t,{get when(){return Te()},get children(){var e=u(re);return c(e,Te),e}}),w,T),M.addEventListener(`drop`,e=>{e.preventDefault(),z(!1),e.dataTransfer&&G(e.dataTransfer.files)}),M.addEventListener(`dragleave`,()=>z(!1)),M.addEventListener(`dragover`,e=>{e.preventDefault(),z(!0)}),c(P,()=>s(`media.upload.dropzone`)),c(B,(()=>{var e=p(()=>!!Ee());return()=>e()?s(`media.upload.uploading`):s(`media.upload.select`)})(),Fe,Ie),K.addEventListener(`change`,e=>{e.currentTarget.files&&G(e.currentTarget.files),e.currentTarget.value=``}),c(Le,()=>s(`media.upload.hint`)),c(q,r(_,{name:`media-search`,get placeholder(){return s(`media.toolbar.search`)},get value(){return O()},onInput:e=>{we(e),W()}}),J,Y),c(q,r(te,{name:`media-mime`,get placeholder(){return s(`media.toolbar.allTypes`)},get value(){return k()},get options(){return[{value:`image/png`,label:s(`media.mimeTypes.png`)},{value:`image/jpeg`,label:s(`media.mimeTypes.jpeg`)},{value:`image/gif`,label:s(`media.mimeTypes.gif`)},{value:`image/webp`,label:s(`media.mimeTypes.webp`)},{value:`image/svg+xml`,label:s(`media.mimeTypes.svg`)},{value:`application/pdf`,label:s(`media.mimeTypes.pdf`)},{value:`video/mp4`,label:s(`media.mimeTypes.mp4`)},{value:`audio/mpeg`,label:s(`media.mimeTypes.mp3`)}]},onChange:e=>{A(e),W()}}),X,Be),c(q,r(v,{variant:`secondary`,onClick:()=>void W(),get children(){return s(`media.toolbar.searchBtn`)}}),He,Z),c(e,r(t,{get when(){return C().length>0},get fallback(){return(()=>{var e=u(oe);return c(e,()=>s(`media.empty`)),e})()},get children(){var e=u(ie);return c(e,r(a,{get each(){return C()},children:e=>(()=>{var n=u(ce),a=n.firstChild,o=a.nextSibling.firstChild,s=o.nextSibling,l=s.firstChild,[p,m]=f(l.nextSibling),h=p.nextSibling.nextSibling,[g,_]=f(h.nextSibling);return n.$$click=()=>Ae(e),c(a,r(t,{get when(){return b(e)},get fallback(){return(()=>{var t=u(le);return c(t,()=>e.mime_type.split(`/`)[1]?.toUpperCase()??`FILE`),t})()},get children(){var t=u(se);return i(n=>{var r=H(e),i=e.alt??x(e);return r!==n.e&&d(t,`src`,n.e=r),i!==n.t&&d(t,`alt`,n.t=i),n},{e:void 0,t:void 0}),t}})),c(o,()=>x(e)),c(s,()=>e.filename,p,m),c(s,()=>ve(e.size),g,_),i(t=>{var r=F()?.id===e.id,i=x(e);return r!==t.e&&n.classList.toggle(`media-card--selected`,t.e=r),i!==t.t&&d(o,`title`,t.t=i),t},{e:void 0,t:void 0}),ee(),n})()})),e}}),Q,We),c(e,r(y,{get page(){return E()},limit:24,get total(){return Ce()},onPageChange:e=>{D(e),U()}}),$,Ke),c(e,r(g,{get open(){return!!F()},get title(){return p(()=>!!F())()?x(F()):s(`media.details.title`)},onClose:()=>I(null),get children(){return r(t,{get when(){return F()},children:e=>(()=>{var n=u(_e),a=n.firstChild,o=a.firstChild,[m,h]=f(o.nextSibling),g=m.nextSibling,[y,te]=f(g.nextSibling),ne=y.nextSibling,[re,ie]=f(ne.nextSibling),ae=re.nextSibling,[oe,se]=f(ae.nextSibling),ce=oe.nextSibling,[le,S]=f(ce.nextSibling),C=a.nextSibling,w=C.firstChild,Ce=w.firstChild,[T,E]=f(Ce.nextSibling),D=T.nextSibling,[O,we]=f(D.nextSibling),k=O.nextSibling,[A,j]=f(k.nextSibling),M=A.nextSibling,Te=M.firstChild,[N,Ee]=f(Te.nextSibling),P=N.nextSibling,F=w.nextSibling,De=F.firstChild,z=De.nextSibling,B=z.nextSibling,V=B.nextSibling,U=V.nextSibling,W=U.nextSibling,Ae=W.nextSibling,[G,Fe]=f(Ae.nextSibling),Ie=G.nextSibling,K=Ie.nextSibling,Le=K.nextSibling,q=Le.nextSibling.firstChild,Re=q.nextSibling,J=C.nextSibling,Y=J.firstChild,ze=Y.firstChild,[X,Be]=f(ze.nextSibling),Ve=X.nextSibling,He=Y.nextSibling,Z=J.nextSibling,Ue=Z.firstChild,[Q,We]=f(Ue.nextSibling),Ge=Q.nextSibling,[$,Ke]=f(Ge.nextSibling),qe=$.nextSibling,[Je,Ye]=f(qe.nextSibling);return c(a,r(t,{get when(){return b(e())},get children(){var t=u(ue);return i(n=>{var r=H(e()),i=L().alt||x(e());return r!==n.e&&d(t,`src`,n.e=r),i!==n.t&&d(t,`alt`,n.t=i),n},{e:void 0,t:void 0}),t}}),m,h),c(a,r(t,{get when(){return ye(e())},get children(){var t=u(de);return i(()=>d(t,`src`,H(e()))),t}}),y,te),c(a,r(t,{get when(){return be(e())},get children(){var t=u(fe);return i(()=>d(t,`src`,H(e()))),t}}),re,ie),c(a,r(t,{get when(){return xe(e())},get children(){var t=u(pe);return i(n=>{var r=x(e()),i=H(e());return r!==n.e&&d(t,`title`,n.e=r),i!==n.t&&d(t,`src`,n.t=i),n},{e:void 0,t:void 0}),t}}),oe,se),c(a,r(t,{get when(){return p(()=>!(b(e())||ye(e())||be(e())))()&&!xe(e())},get children(){var t=u(me);return c(t,()=>e().mime_type.split(`/`)[1]?.toUpperCase()??`FILE`),t}}),le,S),c(w,r(_,{name:`media-title`,get label(){return s(`media.details.titleField`)},get value(){return L().title},onInput:e=>R({...L(),title:e})}),T,E),c(w,r(_,{name:`media-alt`,get label(){return s(`media.details.alt`)},get value(){return L().alt},onInput:e=>R({...L(),alt:e})}),O,we),c(w,r(_,{name:`media-caption`,get label(){return s(`media.details.caption`)},get value(){return L().caption},onInput:e=>R({...L(),caption:e})}),A,j),c(M,()=>s(`media.details.description`),N,Ee),P.$$input=e=>R({...L(),description:e.currentTarget.value}),c(De,()=>s(`media.details.file`)),c(z,()=>e().filename),c(B,()=>s(`media.details.type`)),c(V,()=>e().mime_type),c(U,()=>s(`media.details.size`)),c(W,()=>ve(e().size)),c(F,r(t,{get when(){return Se(e())},get children(){return[(()=>{var e=u(he);return c(e,()=>s(`media.details.dimensions`)),e})(),(()=>{var t=u(ge);return c(t,()=>Se(e())),t})()]}}),G,Fe),c(Ie,()=>s(`media.details.uploaded`)),c(K,(()=>{var t=p(()=>!!e().created_at);return()=>t()?new Date(e().created_at).toLocaleString():`—`})()),c(Le,()=>s(`media.details.url`)),c(q,()=>H(e())),Re.$$click=()=>void Pe(H(e())),c(Re,()=>s(`media.details.copy`)),c(Y,(()=>{var e=p(()=>!!ke());return()=>e()?s(`media.details.replacing`):s(`media.details.replace`)})(),X,Be),Ve.addEventListener(`change`,e=>{let t=e.currentTarget.files?.[0];t&&Ne(t),e.currentTarget.value=``}),c(He,()=>s(`media.details.replaceHint`)),c(Z,r(v,{variant:`primary`,get disabled(){return Oe()},get loading(){return Oe()},onClick:()=>void Me(),get children(){return s(`media.details.save`)}}),Q,We),c(Z,r(v,{variant:`danger`,onClick:()=>void je(e()),get children(){return s(`media.details.delete`)}}),$,Ke),c(Z,r(v,{variant:`secondary`,onClick:()=>I(null),get children(){return s(`media.details.close`)}}),Je,Ye),i(()=>l(Ve,`disabled`,ke())),i(()=>l(P,`value`,L().description)),ee(),n})()})}}),Je,Ye),i(e=>{var t=!!(De()||o.focusUpload),n=Ee();return t!==e.e&&M.classList.toggle(`upload-zone--active`,e.e=t),n!==e.t&&l(K,`disabled`,e.t=n),e},{e:void 0,t:void 0}),e})()}s([`click`,`input`]);export{C as MediaLibrary};