Server : Apache System : Linux 122.228.205.92.host.secureserver.net 5.14.0-362.18.1.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jan 29 07:05:48 EST 2024 x86_64 User : ondostategov ( 1002) PHP Version : 8.1.33 Disable Function : NONE Directory : /home/ondostategov/public_html/wp-includes/js/dist/ |
/*! This file is auto-generated */
(()=>{var e,t,n={66:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)};var n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function s(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function i(e,t,n){return e.concat(t).map((function(e){return s(e,n)}))}function r(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function a(e,t){try{return t in e}catch(e){return!1}}function o(e,t,n){var i={};return n.isMergeableObject(e)&&r(e).forEach((function(t){i[t]=s(e[t],n)})),r(t).forEach((function(r){(function(e,t){return a(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(a(e,r)&&n.isMergeableObject(t[r])?i[r]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(r,n)(e[r],t[r],n):i[r]=s(t[r],n))})),i}function l(e,n,r){(r=r||{}).arrayMerge=r.arrayMerge||i,r.isMergeableObject=r.isMergeableObject||t,r.cloneUnlessOtherwiseSpecified=s;var a=Array.isArray(n);return a===Array.isArray(e)?a?r.arrayMerge(e,n,r):o(e,n,r):s(n,r)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return l(e,n,t)}),{})};var c=l;e.exports=c},83:(e,t,n)=>{"use strict";
/**
* @license React
* use-sync-external-store-shim.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var s=n(1609);var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=s.useState,a=s.useEffect,o=s.useLayoutEffect,l=s.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),s=r({inst:{value:n,getSnapshot:t}}),i=s[0].inst,u=s[1];return o((function(){i.value=n,i.getSnapshot=t,c(i)&&u({inst:i})}),[e,n,t]),a((function(){return c(i)&&u({inst:i}),e((function(){c(i)&&u({inst:i})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==s.useSyncExternalStore?s.useSyncExternalStore:u},422:(e,t,n)=>{"use strict";e.exports=n(83)},1233:e=>{"use strict";e.exports=window.wp.preferences},1609:e=>{"use strict";e.exports=window.React},4660:e=>{e.exports=function(){function e(t,n,s){function i(a,o){if(!n[a]){if(!t[a]){if(r)return r(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,n,s)}return n[a].exports}for(var r=void 0,a=0;a<s.length;a++)i(s[a]);return i}return e}()({1:[function(e,t,n){"use strict";var s="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var s in n)i(n,s)&&(e[s]=n[s])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var r={arraySet:function(e,t,n,s,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+s),i);else for(var r=0;r<s;r++)e[i+r]=t[n+r]},flattenChunks:function(e){var t,n,s,i,r,a;for(s=0,t=0,n=e.length;t<n;t++)s+=e[t].length;for(a=new Uint8Array(s),i=0,t=0,n=e.length;t<n;t++)r=e[t],a.set(r,i),i+=r.length;return a}},a={arraySet:function(e,t,n,s,i){for(var r=0;r<s;r++)e[i+r]=t[n+r]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,r)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,a))},n.setTyped(s)},{}],2:[function(e,t,n){"use strict";var s=e("./common"),i=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){r=!1}for(var a=new s.Buf8(256),o=0;o<256;o++)a[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&r||!e.subarray&&i))return String.fromCharCode.apply(null,s.shrinkBuf(e,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n}a[254]=a[254]=1,n.string2buf=function(e){var t,n,i,r,a,o=e.length,l=0;for(r=0;r<o;r++)55296==(64512&(n=e.charCodeAt(r)))&&r+1<o&&56320==(64512&(i=e.charCodeAt(r+1)))&&(n=65536+(n-55296<<10)+(i-56320),r++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=new s.Buf8(l),a=0,r=0;a<l;r++)55296==(64512&(n=e.charCodeAt(r)))&&r+1<o&&56320==(64512&(i=e.charCodeAt(r+1)))&&(n=65536+(n-55296<<10)+(i-56320),r++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new s.Buf8(e.length),n=0,i=t.length;n<i;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,s,i,r,o=t||e.length,c=new Array(2*o);for(s=0,n=0;n<o;)if((i=e[n++])<128)c[s++]=i;else if((r=a[i])>4)c[s++]=65533,n+=r-1;else{for(i&=2===r?31:3===r?15:7;r>1&&n<o;)i=i<<6|63&e[n++],r--;r>1?c[s++]=65533:i<65536?c[s++]=i:(i-=65536,c[s++]=55296|i>>10&1023,c[s++]=56320|1023&i)}return l(c,s)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},{"./common":1}],3:[function(e,t,n){"use strict";function s(e,t,n,s){for(var i=65535&e,r=e>>>16&65535,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{r=r+(i=i+t[s++]|0)|0}while(--a);i%=65521,r%=65521}return i|r<<16}t.exports=s},{}],4:[function(e,t,n){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,n){"use strict";function s(){for(var e,t=[],n=0;n<256;n++){e=n;for(var s=0;s<8;s++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}var i=s();function r(e,t,n,s){var r=i,a=s+n;e^=-1;for(var o=s;o<a;o++)e=e>>>8^r[255&(e^t[o])];return~e}t.exports=r},{}],6:[function(e,t,n){"use strict";function s(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}t.exports=s},{}],7:[function(e,t,n){"use strict";var s=30,i=12;t.exports=function(e,t){var n,r,a,o,l,c,u,d,h,p,f,m,g,v,y,x,b,w,_,j,S,C,k,E,P;n=e.state,r=e.next_in,E=e.input,a=r+(e.avail_in-5),o=e.next_out,P=e.output,l=o-(t-e.avail_out),c=o+(e.avail_out-257),u=n.dmax,d=n.wsize,h=n.whave,p=n.wnext,f=n.window,m=n.hold,g=n.bits,v=n.lencode,y=n.distcode,x=(1<<n.lenbits)-1,b=(1<<n.distbits)-1;e:do{g<15&&(m+=E[r++]<<g,g+=8,m+=E[r++]<<g,g+=8),w=v[m&x];t:for(;;){if(m>>>=_=w>>>24,g-=_,0==(_=w>>>16&255))P[o++]=65535&w;else{if(!(16&_)){if(64&_){if(32&_){n.mode=i;break e}e.msg="invalid literal/length code",n.mode=s;break e}w=v[(65535&w)+(m&(1<<_)-1)];continue t}for(j=65535&w,(_&=15)&&(g<_&&(m+=E[r++]<<g,g+=8),j+=m&(1<<_)-1,m>>>=_,g-=_),g<15&&(m+=E[r++]<<g,g+=8,m+=E[r++]<<g,g+=8),w=y[m&b];;){if(m>>>=_=w>>>24,g-=_,16&(_=w>>>16&255)){if(S=65535&w,g<(_&=15)&&(m+=E[r++]<<g,(g+=8)<_&&(m+=E[r++]<<g,g+=8)),(S+=m&(1<<_)-1)>u){e.msg="invalid distance too far back",n.mode=s;break e}if(m>>>=_,g-=_,S>(_=o-l)){if((_=S-_)>h&&n.sane){e.msg="invalid distance too far back",n.mode=s;break e}if(C=0,k=f,0===p){if(C+=d-_,_<j){j-=_;do{P[o++]=f[C++]}while(--_);C=o-S,k=P}}else if(p<_){if(C+=d+p-_,(_-=p)<j){j-=_;do{P[o++]=f[C++]}while(--_);if(C=0,p<j){j-=_=p;do{P[o++]=f[C++]}while(--_);C=o-S,k=P}}}else if(C+=p-_,_<j){j-=_;do{P[o++]=f[C++]}while(--_);C=o-S,k=P}for(;j>2;)P[o++]=k[C++],P[o++]=k[C++],P[o++]=k[C++],j-=3;j&&(P[o++]=k[C++],j>1&&(P[o++]=k[C++]))}else{C=o-S;do{P[o++]=P[C++],P[o++]=P[C++],P[o++]=P[C++],j-=3}while(j>2);j&&(P[o++]=P[C++],j>1&&(P[o++]=P[C++]))}break}if(64&_){e.msg="invalid distance code",n.mode=s;break e}w=y[(65535&w)+(m&(1<<_)-1)]}}break}}while(r<a&&o<c);r-=j=g>>3,m&=(1<<(g-=j<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r<a?a-r+5:5-(r-a),e.avail_out=o<c?c-o+257:257-(o-c),n.hold=m,n.bits=g}},{}],8:[function(e,t,n){"use strict";var s=e("../utils/common"),i=e("./adler32"),r=e("./crc32"),a=e("./inffast"),o=e("./inftrees"),l=0,c=1,u=2,d=4,h=5,p=6,f=0,m=1,g=2,v=-2,y=-3,x=-4,b=-5,w=8,_=1,j=2,S=3,C=4,k=5,E=6,P=7,I=8,V=9,O=10,T=11,A=12,N=13,F=14,M=15,B=16,D=17,R=18,L=19,z=20,H=21,G=22,W=23,U=24,q=25,Z=26,Y=27,K=28,X=29,Q=30,J=31,$=852,ee=592,te=15;function ne(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function se(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ie(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=_,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new s.Buf32($),t.distcode=t.distdyn=new s.Buf32(ee),t.sane=1,t.back=-1,f):v}function re(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,ie(e)):v}function ae(e,t){var n,s;return e&&e.state?(s=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?v:(null!==s.window&&s.wbits!==t&&(s.window=null),s.wrap=n,s.wbits=t,re(e))):v}function oe(e,t){var n,s;return e?(s=new se,e.state=s,s.window=null,(n=ae(e,t))!==f&&(e.state=null),n):v}function le(e){return oe(e,te)}var ce,ue,de=!0;function he(e){if(de){var t;for(ce=new s.Buf32(512),ue=new s.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(o(c,e.lens,0,288,ce,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;o(u,e.lens,0,32,ue,0,e.work,{bits:5}),de=!1}e.lencode=ce,e.lenbits=9,e.distcode=ue,e.distbits=5}function pe(e,t,n,i){var r,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new s.Buf8(a.wsize)),i>=a.wsize?(s.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((r=a.wsize-a.wnext)>i&&(r=i),s.arraySet(a.window,t,n-i,r,a.wnext),(i-=r)?(s.arraySet(a.window,t,n-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=r,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=r))),0}function fe(e,t){var n,$,ee,te,se,ie,re,ae,oe,le,ce,ue,de,fe,me,ge,ve,ye,xe,be,we,_e,je,Se,Ce=0,ke=new s.Buf8(4),Ee=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return v;(n=e.state).mode===A&&(n.mode=N),se=e.next_out,ee=e.output,re=e.avail_out,te=e.next_in,$=e.input,ie=e.avail_in,ae=n.hold,oe=n.bits,le=ie,ce=re,_e=f;e:for(;;)switch(n.mode){case _:if(0===n.wrap){n.mode=N;break}for(;oe<16;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(2&n.wrap&&35615===ae){n.check=0,ke[0]=255&ae,ke[1]=ae>>>8&255,n.check=r(n.check,ke,2,0),ae=0,oe=0,n.mode=j;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&ae)<<8)+(ae>>8))%31){e.msg="incorrect header check",n.mode=Q;break}if((15&ae)!==w){e.msg="unknown compression method",n.mode=Q;break}if(oe-=4,we=8+(15&(ae>>>=4)),0===n.wbits)n.wbits=we;else if(we>n.wbits){e.msg="invalid window size",n.mode=Q;break}n.dmax=1<<we,e.adler=n.check=1,n.mode=512&ae?O:A,ae=0,oe=0;break;case j:for(;oe<16;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(n.flags=ae,(255&n.flags)!==w){e.msg="unknown compression method",n.mode=Q;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=Q;break}n.head&&(n.head.text=ae>>8&1),512&n.flags&&(ke[0]=255&ae,ke[1]=ae>>>8&255,n.check=r(n.check,ke,2,0)),ae=0,oe=0,n.mode=S;case S:for(;oe<32;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}n.head&&(n.head.time=ae),512&n.flags&&(ke[0]=255&ae,ke[1]=ae>>>8&255,ke[2]=ae>>>16&255,ke[3]=ae>>>24&255,n.check=r(n.check,ke,4,0)),ae=0,oe=0,n.mode=C;case C:for(;oe<16;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}n.head&&(n.head.xflags=255&ae,n.head.os=ae>>8),512&n.flags&&(ke[0]=255&ae,ke[1]=ae>>>8&255,n.check=r(n.check,ke,2,0)),ae=0,oe=0,n.mode=k;case k:if(1024&n.flags){for(;oe<16;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}n.length=ae,n.head&&(n.head.extra_len=ae),512&n.flags&&(ke[0]=255&ae,ke[1]=ae>>>8&255,n.check=r(n.check,ke,2,0)),ae=0,oe=0}else n.head&&(n.head.extra=null);n.mode=E;case E:if(1024&n.flags&&((ue=n.length)>ie&&(ue=ie),ue&&(n.head&&(we=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),s.arraySet(n.head.extra,$,te,ue,we)),512&n.flags&&(n.check=r(n.check,$,ue,te)),ie-=ue,te+=ue,n.length-=ue),n.length))break e;n.length=0,n.mode=P;case P:if(2048&n.flags){if(0===ie)break e;ue=0;do{we=$[te+ue++],n.head&&we&&n.length<65536&&(n.head.name+=String.fromCharCode(we))}while(we&&ue<ie);if(512&n.flags&&(n.check=r(n.check,$,ue,te)),ie-=ue,te+=ue,we)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=I;case I:if(4096&n.flags){if(0===ie)break e;ue=0;do{we=$[te+ue++],n.head&&we&&n.length<65536&&(n.head.comment+=String.fromCharCode(we))}while(we&&ue<ie);if(512&n.flags&&(n.check=r(n.check,$,ue,te)),ie-=ue,te+=ue,we)break e}else n.head&&(n.head.comment=null);n.mode=V;case V:if(512&n.flags){for(;oe<16;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(ae!==(65535&n.check)){e.msg="header crc mismatch",n.mode=Q;break}ae=0,oe=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=A;break;case O:for(;oe<32;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}e.adler=n.check=ne(ae),ae=0,oe=0,n.mode=T;case T:if(0===n.havedict)return e.next_out=se,e.avail_out=re,e.next_in=te,e.avail_in=ie,n.hold=ae,n.bits=oe,g;e.adler=n.check=1,n.mode=A;case A:if(t===h||t===p)break e;case N:if(n.last){ae>>>=7&oe,oe-=7&oe,n.mode=Y;break}for(;oe<3;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}switch(n.last=1&ae,oe-=1,3&(ae>>>=1)){case 0:n.mode=F;break;case 1:if(he(n),n.mode=z,t===p){ae>>>=2,oe-=2;break e}break;case 2:n.mode=D;break;case 3:e.msg="invalid block type",n.mode=Q}ae>>>=2,oe-=2;break;case F:for(ae>>>=7&oe,oe-=7&oe;oe<32;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if((65535&ae)!=(ae>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Q;break}if(n.length=65535&ae,ae=0,oe=0,n.mode=M,t===p)break e;case M:n.mode=B;case B:if(ue=n.length){if(ue>ie&&(ue=ie),ue>re&&(ue=re),0===ue)break e;s.arraySet(ee,$,te,ue,se),ie-=ue,te+=ue,re-=ue,se+=ue,n.length-=ue;break}n.mode=A;break;case D:for(;oe<14;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(n.nlen=257+(31&ae),ae>>>=5,oe-=5,n.ndist=1+(31&ae),ae>>>=5,oe-=5,n.ncode=4+(15&ae),ae>>>=4,oe-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Q;break}n.have=0,n.mode=R;case R:for(;n.have<n.ncode;){for(;oe<3;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}n.lens[Ee[n.have++]]=7&ae,ae>>>=3,oe-=3}for(;n.have<19;)n.lens[Ee[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,je={bits:n.lenbits},_e=o(l,n.lens,0,19,n.lencode,0,n.work,je),n.lenbits=je.bits,_e){e.msg="invalid code lengths set",n.mode=Q;break}n.have=0,n.mode=L;case L:for(;n.have<n.nlen+n.ndist;){for(;ge=(Ce=n.lencode[ae&(1<<n.lenbits)-1])>>>16&255,ve=65535&Ce,!((me=Ce>>>24)<=oe);){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(ve<16)ae>>>=me,oe-=me,n.lens[n.have++]=ve;else{if(16===ve){for(Se=me+2;oe<Se;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(ae>>>=me,oe-=me,0===n.have){e.msg="invalid bit length repeat",n.mode=Q;break}we=n.lens[n.have-1],ue=3+(3&ae),ae>>>=2,oe-=2}else if(17===ve){for(Se=me+3;oe<Se;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}oe-=me,we=0,ue=3+(7&(ae>>>=me)),ae>>>=3,oe-=3}else{for(Se=me+7;oe<Se;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}oe-=me,we=0,ue=11+(127&(ae>>>=me)),ae>>>=7,oe-=7}if(n.have+ue>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Q;break}for(;ue--;)n.lens[n.have++]=we}}if(n.mode===Q)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=Q;break}if(n.lenbits=9,je={bits:n.lenbits},_e=o(c,n.lens,0,n.nlen,n.lencode,0,n.work,je),n.lenbits=je.bits,_e){e.msg="invalid literal/lengths set",n.mode=Q;break}if(n.distbits=6,n.distcode=n.distdyn,je={bits:n.distbits},_e=o(u,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,je),n.distbits=je.bits,_e){e.msg="invalid distances set",n.mode=Q;break}if(n.mode=z,t===p)break e;case z:n.mode=H;case H:if(ie>=6&&re>=258){e.next_out=se,e.avail_out=re,e.next_in=te,e.avail_in=ie,n.hold=ae,n.bits=oe,a(e,ce),se=e.next_out,ee=e.output,re=e.avail_out,te=e.next_in,$=e.input,ie=e.avail_in,ae=n.hold,oe=n.bits,n.mode===A&&(n.back=-1);break}for(n.back=0;ge=(Ce=n.lencode[ae&(1<<n.lenbits)-1])>>>16&255,ve=65535&Ce,!((me=Ce>>>24)<=oe);){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(ge&&!(240&ge)){for(ye=me,xe=ge,be=ve;ge=(Ce=n.lencode[be+((ae&(1<<ye+xe)-1)>>ye)])>>>16&255,ve=65535&Ce,!(ye+(me=Ce>>>24)<=oe);){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}ae>>>=ye,oe-=ye,n.back+=ye}if(ae>>>=me,oe-=me,n.back+=me,n.length=ve,0===ge){n.mode=Z;break}if(32&ge){n.back=-1,n.mode=A;break}if(64&ge){e.msg="invalid literal/length code",n.mode=Q;break}n.extra=15&ge,n.mode=G;case G:if(n.extra){for(Se=n.extra;oe<Se;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}n.length+=ae&(1<<n.extra)-1,ae>>>=n.extra,oe-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=W;case W:for(;ge=(Ce=n.distcode[ae&(1<<n.distbits)-1])>>>16&255,ve=65535&Ce,!((me=Ce>>>24)<=oe);){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(!(240&ge)){for(ye=me,xe=ge,be=ve;ge=(Ce=n.distcode[be+((ae&(1<<ye+xe)-1)>>ye)])>>>16&255,ve=65535&Ce,!(ye+(me=Ce>>>24)<=oe);){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}ae>>>=ye,oe-=ye,n.back+=ye}if(ae>>>=me,oe-=me,n.back+=me,64&ge){e.msg="invalid distance code",n.mode=Q;break}n.offset=ve,n.extra=15&ge,n.mode=U;case U:if(n.extra){for(Se=n.extra;oe<Se;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}n.offset+=ae&(1<<n.extra)-1,ae>>>=n.extra,oe-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Q;break}n.mode=q;case q:if(0===re)break e;if(ue=ce-re,n.offset>ue){if((ue=n.offset-ue)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Q;break}ue>n.wnext?(ue-=n.wnext,de=n.wsize-ue):de=n.wnext-ue,ue>n.length&&(ue=n.length),fe=n.window}else fe=ee,de=se-n.offset,ue=n.length;ue>re&&(ue=re),re-=ue,n.length-=ue;do{ee[se++]=fe[de++]}while(--ue);0===n.length&&(n.mode=H);break;case Z:if(0===re)break e;ee[se++]=n.length,re--,n.mode=H;break;case Y:if(n.wrap){for(;oe<32;){if(0===ie)break e;ie--,ae|=$[te++]<<oe,oe+=8}if(ce-=re,e.total_out+=ce,n.total+=ce,ce&&(e.adler=n.check=n.flags?r(n.check,ee,ce,se-ce):i(n.check,ee,ce,se-ce)),ce=re,(n.flags?ae:ne(ae))!==n.check){e.msg="incorrect data check",n.mode=Q;break}ae=0,oe=0}n.mode=K;case K:if(n.wrap&&n.flags){for(;oe<32;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(ae!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=Q;break}ae=0,oe=0}n.mode=X;case X:_e=m;break e;case Q:_e=y;break e;case J:return x;default:return v}return e.next_out=se,e.avail_out=re,e.next_in=te,e.avail_in=ie,n.hold=ae,n.bits=oe,(n.wsize||ce!==e.avail_out&&n.mode<Q&&(n.mode<Y||t!==d))&&pe(e,e.output,e.next_out,ce-e.avail_out)?(n.mode=J,x):(le-=e.avail_in,ce-=e.avail_out,e.total_in+=le,e.total_out+=ce,n.total+=ce,n.wrap&&ce&&(e.adler=n.check=n.flags?r(n.check,ee,ce,e.next_out-ce):i(n.check,ee,ce,e.next_out-ce)),e.data_type=n.bits+(n.last?64:0)+(n.mode===A?128:0)+(n.mode===z||n.mode===M?256:0),(0===le&&0===ce||t===d)&&_e===f&&(_e=b),_e)}function me(e){if(!e||!e.state)return v;var t=e.state;return t.window&&(t.window=null),e.state=null,f}function ge(e,t){var n;return e&&e.state&&2&(n=e.state).wrap?(n.head=t,t.done=!1,f):v}function ve(e,t){var n,s=t.length;return e&&e.state?0!==(n=e.state).wrap&&n.mode!==T?v:n.mode===T&&i(1,t,s,0)!==n.check?y:pe(e,t,s,s)?(n.mode=J,x):(n.havedict=1,f):v}n.inflateReset=re,n.inflateReset2=ae,n.inflateResetKeep=ie,n.inflateInit=le,n.inflateInit2=oe,n.inflate=fe,n.inflateEnd=me,n.inflateGetHeader=ge,n.inflateSetDictionary=ve,n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(e,t,n){"use strict";var s=e("../utils/common"),i=15,r=852,a=592,o=0,l=1,c=2,u=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],d=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],h=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],p=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,f,m,g,v,y){var x,b,w,_,j,S,C,k,E,P=y.bits,I=0,V=0,O=0,T=0,A=0,N=0,F=0,M=0,B=0,D=0,R=null,L=0,z=new s.Buf16(i+1),H=new s.Buf16(i+1),G=null,W=0;for(I=0;I<=i;I++)z[I]=0;for(V=0;V<f;V++)z[t[n+V]]++;for(A=P,T=i;T>=1&&0===z[T];T--);if(A>T&&(A=T),0===T)return m[g++]=20971520,m[g++]=20971520,y.bits=1,0;for(O=1;O<T&&0===z[O];O++);for(A<O&&(A=O),M=1,I=1;I<=i;I++)if(M<<=1,(M-=z[I])<0)return-1;if(M>0&&(e===o||1!==T))return-1;for(H[1]=0,I=1;I<i;I++)H[I+1]=H[I]+z[I];for(V=0;V<f;V++)0!==t[n+V]&&(v[H[t[n+V]]++]=V);if(e===o?(R=G=v,S=19):e===l?(R=u,L-=257,G=d,W-=257,S=256):(R=h,G=p,S=-1),D=0,V=0,I=O,j=g,N=A,F=0,w=-1,_=(B=1<<A)-1,e===l&&B>r||e===c&&B>a)return 1;for(;;){C=I-F,v[V]<S?(k=0,E=v[V]):v[V]>S?(k=G[W+v[V]],E=R[L+v[V]]):(k=96,E=0),x=1<<I-F,O=b=1<<N;do{m[j+(D>>F)+(b-=x)]=C<<24|k<<16|E}while(0!==b);for(x=1<<I-1;D&x;)x>>=1;if(0!==x?(D&=x-1,D+=x):D=0,V++,0==--z[I]){if(I===T)break;I=t[n+v[V]]}if(I>A&&(D&_)!==w){for(0===F&&(F=A),j+=O,M=1<<(N=I-F);N+F<T&&!((M-=z[N+F])<=0);)N++,M<<=1;if(B+=1<<N,e===l&&B>r||e===c&&B>a)return 1;m[w=D&_]=A<<24|N<<16|j-g}}return 0!==D&&(m[j+D]=I-F<<24|64<<16),y.bits=A,0}},{"../utils/common":1}],10:[function(e,t,n){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,n){"use strict";function s(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}t.exports=s},{}],"/lib/inflate.js":[function(e,t,n){"use strict";var s=e("./zlib/inflate"),i=e("./utils/common"),r=e("./utils/strings"),a=e("./zlib/constants"),o=e("./zlib/messages"),l=e("./zlib/zstream"),c=e("./zlib/gzheader"),u=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=s.inflateInit2(this.strm,t.windowBits);if(n!==a.Z_OK)throw new Error(o[n]);if(this.header=new c,s.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=r.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=s.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(o[n])}function h(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||o[n.err];return n.result}function p(e,t){return(t=t||{}).raw=!0,h(e,t)}d.prototype.push=function(e,t){var n,o,l,c,d,h=this.strm,p=this.options.chunkSize,f=this.options.dictionary,m=!1;if(this.ended)return!1;o=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?h.input=r.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new i.Buf8(p),h.next_out=0,h.avail_out=p),(n=s.inflate(h,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&f&&(n=s.inflateSetDictionary(this.strm,f)),n===a.Z_BUF_ERROR&&!0===m&&(n=a.Z_OK,m=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&n!==a.Z_STREAM_END&&(0!==h.avail_in||o!==a.Z_FINISH&&o!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=r.utf8border(h.output,h.next_out),c=h.next_out-l,d=r.buf2string(h.output,l),h.next_out=c,h.avail_out=p-c,c&&i.arraySet(h.output,h.output,l,c,0),this.onData(d)):this.onData(i.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(m=!0)}while((h.avail_in>0||0===h.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(o=a.Z_FINISH),o===a.Z_FINISH?(n=s.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):o!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),h.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=d,n.inflate=h,n.inflateRaw=p,n.ungzip=h},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")},6087:e=>{"use strict";e.exports=window.wp.element},7143:e=>{"use strict";e.exports=window.wp.data},7734:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var s,i,r;if(Array.isArray(t)){if((s=t.length)!=n.length)return!1;for(i=s;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(i of t.entries())if(!n.has(i[0]))return!1;for(i of t.entries())if(!e(i[1],n.get(i[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(i of t.entries())if(!n.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((s=t.length)!=n.length)return!1;for(i=s;0!=i--;)if(t[i]!==n[i])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((s=(r=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=s;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,r[i]))return!1;for(i=s;0!=i--;){var a=r[i];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n}},7951:(e,t,n)=>{"use strict";n.d(t,{loadView:()=>d,useView:()=>u});var s=Object.prototype.hasOwnProperty;function i(e,t,n){for(n of e.keys())if(r(n,t))return n}function r(e,t){var n,a,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((a=e.length)===t.length)for(;a--&&r(e[a],t[a]););return-1===a}if(n===Set){if(e.size!==t.size)return!1;for(a of e){if((o=a)&&"object"==typeof o&&!(o=i(t,o)))return!1;if(!t.has(o))return!1}return!0}if(n===Map){if(e.size!==t.size)return!1;for(a of e){if((o=a[0])&&"object"==typeof o&&!(o=i(t,o)))return!1;if(!r(a[1],t.get(o)))return!1}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((a=e.byteLength)===t.byteLength)for(;a--&&e.getInt8(a)===t.getInt8(a););return-1===a}if(ArrayBuffer.isView(e)){if((a=e.byteLength)===t.byteLength)for(;a--&&e[a]===t[a];);return-1===a}if(!n||"object"==typeof e){for(n in a=0,e){if(s.call(e,n)&&++a&&!s.call(t,n))return!1;if(!(n in t)||!r(e[n],t[n]))return!1}return Object.keys(t).length===a}}return e!=e&&t!=t}function a(e,t,n){return`dataviews-${e}-${t}-${n}`}var o=n(6087),l=n(7143),c=n(1233);function u(e){const{kind:t,name:n,slug:s,defaultView:i,queryParams:u,onChangeQueryParams:d}=e,h=a(t,n,s),p=(0,l.useSelect)((e=>e(c.store).get("core/views",h)),[h]),{set:f}=(0,l.useDispatch)(c.store),m=p??i,g=Number(u?.page??m.page??1),v=u?.search??m.search??"";return{view:(0,o.useMemo)((()=>({...m,page:g,search:v})),[m,g,v]),isModified:!!p,updateView:(0,o.useCallback)((e=>{const t={page:e?.page,search:e?.search},n=function(e,t){const n={...e};for(const e of t)delete n[e];return n}(e,["page","search"]);d&&!r(t,{page:g,search:v})&&d(t),r(m,n)||(r(n,i)?f("core/views",h,void 0):f("core/views",h,n))}),[d,g,v,m,i,f,h]),resetToDefault:(0,o.useCallback)((()=>{f("core/views",h,void 0)}),[h,f])}}async function d(e){const{kind:t,name:n,slug:s,defaultView:i,queryParams:r}=e,o=a(t,n,s);return{...(0,l.select)(c.store).get("core/views",o)??i,page:r?.page??1,search:r?.search??""}}},8572:e=>{e.exports=function(){function e(t,n,s){function i(a,o){if(!n[a]){if(!t[a]){if(r)return r(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,n,s)}return n[a].exports}for(var r=void 0,a=0;a<s.length;a++)i(s[a]);return i}return e}()({1:[function(e,t,n){var s=4096,i=2*s+32,r=2*s-1,a=new Uint32Array([0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215]);function o(e){this.buf_=new Uint8Array(i),this.input_=e,this.reset()}o.READ_SIZE=s,o.IBUF_MASK=r,o.prototype.reset=function(){this.buf_ptr_=0,this.val_=0,this.pos_=0,this.bit_pos_=0,this.bit_end_pos_=0,this.eos_=0,this.readMoreInput();for(var e=0;e<4;e++)this.val_|=this.buf_[this.pos_]<<8*e,++this.pos_;return this.bit_end_pos_>0},o.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256))if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw new Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var e=this.buf_ptr_,t=this.input_.read(this.buf_,e,s);if(t<0)throw new Error("Unexpected end of input");if(t<s){this.eos_=1;for(var n=0;n<32;n++)this.buf_[e+t+n]=0}if(0===e){for(n=0;n<32;n++)this.buf_[(s<<1)+n]=this.buf_[n];this.buf_ptr_=s}else this.buf_ptr_=0;this.bit_end_pos_+=t<<3}},o.prototype.fillBitWindow=function(){for(;this.bit_pos_>=8;)this.val_>>>=8,this.val_|=this.buf_[this.pos_&r]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},o.prototype.readBits=function(e){32-this.bit_pos_<e&&this.fillBitWindow();var t=this.val_>>>this.bit_pos_&a[e];return this.bit_pos_+=e,t},t.exports=o},{}],2:[function(e,t,n){n.lookup=new Uint8Array([0,0,0,0,0,0,0,0,0,4,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12,16,12,12,20,12,16,24,28,12,12,32,12,36,12,44,44,44,44,44,44,44,44,44,44,32,32,24,40,28,12,12,48,52,52,52,48,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,24,12,28,12,12,12,56,60,60,60,56,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,24,12,28,12,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,2,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24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),n.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},{}],3:[function(e,t,n){var s=e("./streams").BrotliInput,i=e("./streams").BrotliOutput,r=e("./bit_reader"),a=e("./dictionary"),o=e("./huffman").HuffmanCode,l=e("./huffman").BrotliBuildHuffmanTable,c=e("./context"),u=e("./prefix"),d=e("./transform"),h=8,p=16,f=256,m=704,g=26,v=6,y=2,x=8,b=255,w=1080,_=18,j=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),S=16,C=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),k=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),E=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]);function P(e){var t;return 0===e.readBits(1)?16:(t=e.readBits(3))>0?17+t:(t=e.readBits(3))>0?8+t:17}function I(e){if(e.readBits(1)){var t=e.readBits(3);return 0===t?1:e.readBits(t)+(1<<t)}return 0}function V(){this.meta_block_length=0,this.input_end=0,this.is_uncompressed=0,this.is_metadata=!1}function O(e){var t,n,s,i=new V;if(i.input_end=e.readBits(1),i.input_end&&e.readBits(1))return i;if(7===(t=e.readBits(2)+4)){if(i.is_metadata=!0,0!==e.readBits(1))throw new Error("Invalid reserved bit");if(0===(n=e.readBits(2)))return i;for(s=0;s<n;s++){var r=e.readBits(8);if(s+1===n&&n>1&&0===r)throw new Error("Invalid size byte");i.meta_block_length|=r<<8*s}}else for(s=0;s<t;++s){var a=e.readBits(4);if(s+1===t&&t>4&&0===a)throw new Error("Invalid size nibble");i.meta_block_length|=a<<4*s}return++i.meta_block_length,i.input_end||i.is_metadata||(i.is_uncompressed=e.readBits(1)),i}function T(e,t,n){var s;return n.fillBitWindow(),(s=e[t+=n.val_>>>n.bit_pos_&b].bits-x)>0&&(n.bit_pos_+=x,t+=e[t].value,t+=n.val_>>>n.bit_pos_&(1<<s)-1),n.bit_pos_+=e[t].bits,e[t].value}function A(e,t,n,s){for(var i=0,r=h,a=0,c=0,u=32768,d=[],f=0;f<32;f++)d.push(new o(0,0));for(l(d,0,5,e,_);i<t&&u>0;){var m,g=0;if(s.readMoreInput(),s.fillBitWindow(),g+=s.val_>>>s.bit_pos_&31,s.bit_pos_+=d[g].bits,(m=255&d[g].value)<p)a=0,n[i++]=m,0!==m&&(r=m,u-=32768>>m);else{var v,y,x=m-14,b=0;if(m===p&&(b=r),c!==b&&(a=0,c=b),v=a,a>0&&(a-=2,a<<=x),i+(y=(a+=s.readBits(x)+3)-v)>t)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var w=0;w<y;w++)n[i+w]=c;i+=y,0!==c&&(u-=y<<15-c)}}if(0!==u)throw new Error("[ReadHuffmanCodeLengths] space = "+u);for(;i<t;i++)n[i]=0}function N(e,t,n,s){var i,r=0,a=new Uint8Array(e);if(s.readMoreInput(),1===(i=s.readBits(2))){for(var c=e-1,u=0,d=new Int32Array(4),h=s.readBits(2)+1;c;)c>>=1,++u;for(p=0;p<h;++p)d[p]=s.readBits(u)%e,a[d[p]]=2;switch(a[d[0]]=1,h){case 1:break;case 3:if(d[0]===d[1]||d[0]===d[2]||d[1]===d[2])throw new Error("[ReadHuffmanCode] invalid symbols");break;case 2:if(d[0]===d[1])throw new Error("[ReadHuffmanCode] invalid symbols");a[d[1]]=1;break;case 4:if(d[0]===d[1]||d[0]===d[2]||d[0]===d[3]||d[1]===d[2]||d[1]===d[3]||d[2]===d[3])throw new Error("[ReadHuffmanCode] invalid symbols");s.readBits(1)?(a[d[2]]=3,a[d[3]]=3):a[d[0]]=2}}else{var p,f=new Uint8Array(_),m=32,g=0,v=[new o(2,0),new o(2,4),new o(2,3),new o(3,2),new o(2,0),new o(2,4),new o(2,3),new o(4,1),new o(2,0),new o(2,4),new o(2,3),new o(3,2),new o(2,0),new o(2,4),new o(2,3),new o(4,5)];for(p=i;p<_&&m>0;++p){var y,b=j[p],w=0;s.fillBitWindow(),w+=s.val_>>>s.bit_pos_&15,s.bit_pos_+=v[w].bits,y=v[w].value,f[b]=y,0!==y&&(m-=32>>y,++g)}if(1!==g&&0!==m)throw new Error("[ReadHuffmanCode] invalid num_codes or space");A(f,e,a,s)}if(0===(r=l(t,n,x,a,e)))throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return r}function F(e,t,n){var s,i;return s=T(e,t,n),i=u.kBlockLengthPrefixCode[s].nbits,u.kBlockLengthPrefixCode[s].offset+n.readBits(i)}function M(e,t,n){var s;return e<S?(n+=C[e],s=t[n&=3]+k[e]):s=e-S+1,s}function B(e,t){for(var n=e[t],s=t;s;--s)e[s]=e[s-1];e[0]=n}function D(e,t){var n,s=new Uint8Array(256);for(n=0;n<256;++n)s[n]=n;for(n=0;n<t;++n){var i=e[n];e[n]=s[i],i&&B(s,i)}}function R(e,t){this.alphabet_size=e,this.num_htrees=t,this.codes=new Array(t+t*E[e+31>>>5]),this.htrees=new Uint32Array(t)}function L(e,t){var n,s,i={num_htrees:null,context_map:null},r=0;t.readMoreInput();var a=i.num_htrees=I(t)+1,l=i.context_map=new Uint8Array(e);if(a<=1)return i;for(t.readBits(1)&&(r=t.readBits(4)+1),n=[],s=0;s<w;s++)n[s]=new o(0,0);for(N(a+r,n,0,t),s=0;s<e;){var c;if(t.readMoreInput(),0===(c=T(n,0,t)))l[s]=0,++s;else if(c<=r)for(var u=1+(1<<c)+t.readBits(c);--u;){if(s>=e)throw new Error("[DecodeContextMap] i >= context_map_size");l[s]=0,++s}else l[s]=c-r,++s}return t.readBits(1)&&D(l,e),i}function z(e,t,n,s,i,r,a){var o,l=2*n,c=n,u=T(t,n*w,a);(o=0===u?i[l+(1&r[c])]:1===u?i[l+(r[c]-1&1)]+1:u-2)>=e&&(o-=e),s[n]=o,i[l+(1&r[c])]=o,++r[c]}function H(e,t,n,s,i,a){var o,l=i+1,c=n&i,u=a.pos_&r.IBUF_MASK;if(t<8||a.bit_pos_+(t<<3)<a.bit_end_pos_)for(;t-- >0;)a.readMoreInput(),s[c++]=a.readBits(8),c===l&&(e.write(s,l),c=0);else{if(a.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;a.bit_pos_<32;)s[c]=a.val_>>>a.bit_pos_,a.bit_pos_+=8,++c,--t;if(u+(o=a.bit_end_pos_-a.bit_pos_>>3)>r.IBUF_MASK){for(var d=r.IBUF_MASK+1-u,h=0;h<d;h++)s[c+h]=a.buf_[u+h];o-=d,c+=d,t-=d,u=0}for(h=0;h<o;h++)s[c+h]=a.buf_[u+h];if(t-=o,(c+=o)>=l)for(e.write(s,l),c-=l,h=0;h<c;h++)s[h]=s[l+h];for(;c+t>=l;){if(o=l-c,a.input_.read(s,c,o)<o)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");e.write(s,l),t-=o,c=0}if(a.input_.read(s,c,t)<t)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");a.reset()}}function G(e){var t=e.bit_pos_+7&-8;return 0==e.readBits(t-e.bit_pos_)}function W(e){var t=new s(e),n=new r(t);return P(n),O(n).meta_block_length}function U(e,t){var n=new s(e);null==t&&(t=W(e));var r=new Uint8Array(t),a=new i(r);return q(n,a),a.pos<a.buffer.length&&(a.buffer=a.buffer.subarray(0,a.pos)),a.buffer}function q(e,t){var n,s,i,l,h,p,x,b,_,j=0,C=0,k=0,E=0,V=[16,15,11,4],A=0,B=0,D=0,W=[new R(0,0),new R(0,0),new R(0,0)],U=128+r.READ_SIZE;s=(1<<(k=P(_=new r(e))))-16,l=(i=1<<k)-1,h=new Uint8Array(i+U+a.maxDictionaryWordLength),p=i,x=[],b=[];for(var q=0;q<3*w;q++)x[q]=new o(0,0),b[q]=new o(0,0);for(;!C;){var Z,Y,K,X,Q,J,$,ee,te,ne=0,se=[1<<28,1<<28,1<<28],ie=[0],re=[1,1,1],ae=[0,1,0,1,0,1],oe=[0],le=null,ce=null,ue=null,de=null,he=0,pe=null,fe=0,me=0,ge=0;for(n=0;n<3;++n)W[n].codes=null,W[n].htrees=null;_.readMoreInput();var ve=O(_);if(j+(ne=ve.meta_block_length)>t.buffer.length){var ye=new Uint8Array(j+ne);ye.set(t.buffer),t.buffer=ye}if(C=ve.input_end,Z=ve.is_uncompressed,ve.is_metadata)for(G(_);ne>0;--ne)_.readMoreInput(),_.readBits(8);else if(0!==ne)if(Z)_.bit_pos_=_.bit_pos_+7&-8,H(t,ne,j,h,l,_),j+=ne;else{for(n=0;n<3;++n)re[n]=I(_)+1,re[n]>=2&&(N(re[n]+2,x,n*w,_),N(g,b,n*w,_),se[n]=F(b,n*w,_),oe[n]=1);for(_.readMoreInput(),X=(1<<(Y=_.readBits(2)))-1,Q=(K=S+(_.readBits(4)<<Y))+(48<<Y),ce=new Uint8Array(re[0]),n=0;n<re[0];++n)_.readMoreInput(),ce[n]=_.readBits(2)<<1;var xe=L(re[0]<<v,_);J=xe.num_htrees,le=xe.context_map;var be=L(re[2]<<y,_);for($=be.num_htrees,ue=be.context_map,W[0]=new R(f,J),W[1]=new R(m,re[1]),W[2]=new R(Q,$),n=0;n<3;++n)W[n].decode(_);for(de=0,pe=0,ee=ce[ie[0]],me=c.lookupOffsets[ee],ge=c.lookupOffsets[ee+1],te=W[1].htrees[0];ne>0;){var we,_e,je,Se,Ce,ke,Ee,Pe,Ie,Ve,Oe,Te;for(_.readMoreInput(),0===se[1]&&(z(re[1],x,1,ie,ae,oe,_),se[1]=F(b,w,_),te=W[1].htrees[ie[1]]),--se[1],(_e=(we=T(W[1].codes,te,_))>>6)>=2?(_e-=2,Ee=-1):Ee=0,je=u.kInsertRangeLut[_e]+(we>>3&7),Se=u.kCopyRangeLut[_e]+(7&we),Ce=u.kInsertLengthPrefixCode[je].offset+_.readBits(u.kInsertLengthPrefixCode[je].nbits),ke=u.kCopyLengthPrefixCode[Se].offset+_.readBits(u.kCopyLengthPrefixCode[Se].nbits),B=h[j-1&l],D=h[j-2&l],Ie=0;Ie<Ce;++Ie)_.readMoreInput(),0===se[0]&&(z(re[0],x,0,ie,ae,oe,_),se[0]=F(b,0,_),de=ie[0]<<v,ee=ce[ie[0]],me=c.lookupOffsets[ee],ge=c.lookupOffsets[ee+1]),he=le[de+(c.lookup[me+B]|c.lookup[ge+D])],--se[0],D=B,B=T(W[0].codes,W[0].htrees[he],_),h[j&l]=B,(j&l)===l&&t.write(h,i),++j;if((ne-=Ce)<=0)break;if(Ee<0&&(_.readMoreInput(),0===se[2]&&(z(re[2],x,2,ie,ae,oe,_),se[2]=F(b,2*w,_),pe=ie[2]<<y),--se[2],fe=ue[pe+(255&(ke>4?3:ke-2))],(Ee=T(W[2].codes,W[2].htrees[fe],_))>=K&&(Te=(Ee-=K)&X,Ee=K+((Ae=(2+(1&(Ee>>=Y))<<(Oe=1+(Ee>>1)))-4)+_.readBits(Oe)<<Y)+Te)),(Pe=M(Ee,V,A))<0)throw new Error("[BrotliDecompress] invalid distance");if(Ve=j&l,Pe>(E=j<s&&E!==s?j:s)){if(!(ke>=a.minDictionaryWordLength&&ke<=a.maxDictionaryWordLength))throw new Error("Invalid backward reference. pos: "+j+" distance: "+Pe+" len: "+ke+" bytes left: "+ne);var Ae=a.offsetsByLength[ke],Ne=Pe-E-1,Fe=a.sizeBitsByLength[ke],Me=Ne>>Fe;if(Ae+=(Ne&(1<<Fe)-1)*ke,!(Me<d.kNumTransforms))throw new Error("Invalid backward reference. pos: "+j+" distance: "+Pe+" len: "+ke+" bytes left: "+ne);var Be=d.transformDictionaryWord(h,Ve,Ae,ke,Me);if(j+=Be,ne-=Be,(Ve+=Be)>=p){t.write(h,i);for(var De=0;De<Ve-p;De++)h[De]=h[p+De]}}else{if(Ee>0&&(V[3&A]=Pe,++A),ke>ne)throw new Error("Invalid backward reference. pos: "+j+" distance: "+Pe+" len: "+ke+" bytes left: "+ne);for(Ie=0;Ie<ke;++Ie)h[j&l]=h[j-Pe&l],(j&l)===l&&t.write(h,i),++j,--ne}B=h[j-1&l],D=h[j-2&l]}j&=1073741823}}t.write(h,j&l)}R.prototype.decode=function(e){var t,n=0;for(t=0;t<this.num_htrees;++t)this.htrees[t]=n,n+=N(this.alphabet_size,this.codes,n,e)},n.BrotliDecompressedSize=W,n.BrotliDecompressBuffer=U,n.BrotliDecompress=q,a.init()},{"./bit_reader":1,"./context":2,"./dictionary":6,"./huffman":7,"./prefix":9,"./streams":10,"./transform":11}],4:[function(e,t,n){var s=e("base64-js");n.init=function(){return(0,e("./decode").BrotliDecompressBuffer)(s.toByteArray(e("./dictionary.bin.js")))}},{"./decode":3,"./dictionary.bin.js":5,"base64-js":8}],5:[function(e,t,n){t.exports="W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62zQsFEZWSTCnMhcsQKlS2qOhuVYYMGCkV0fXWEoMFbESXrKEZ9wdUEsyw9g4bJlEt1Y6oVMxMRTEVbCIwZzJzboK5j8m4YH02qgXYhv1V+PM435sLVxyHJihaJREEhZGqL03txGFQLm76caGO/ovxKvzCby/3vMTtX/459f0igi7WutnKiMQ6wODSoRh/8Lx1V3Q99MvKtwB6bHdERYRY0hStJoMjNeTsNX7bn+Y7e4EQ3bf8xBc7L0BsyfFPK43dGSXpL6clYC/I328h54/VYrQ5i0648FgbGtl837svJ35L3Mot/+nPlNpWgKx1gGXQYqX6n+bbZ7wuyCHKcUok12Xjqub7NXZGzqBx0SD+uziNf87t7ve42jxSKQoW3nyxVrWIGlFShhCKxjpZZ5MeGna0+lBkk+kaN8F9qFBAFgEogyMBdcX/T1W/WnMOi/7ycWUQloEBKGeC48MkiwqJkJO+12eQiOFHMmck6q/IjWW3RZlany23TBm+cNr/84/oi5GGmGBZWrZ6j+zykVozz5fT/QH/Da6WTbZYYPynVNO7kxzuNN2kxKKWche5WveitPKAecB8YcAHz/+zXLjcLzkdDSktNIDwZE9J9X+tto43oJy65wApM3mDzYtCwX9lM+N5VR3kXYo0Z3t0TtXfgBFg7gU8oN0Dgl7fZlUbhNll+0uuohRVKjrEd8egrSndy5/Tgd2gqjA4CAVuC7ESUmL3DZoGnfhQV8uwnpi8EGvAVVsowNRxPudck7+oqAUDkwZopWqFnW1riss0t1z6iCISVKreYGNvQcXv+1L9+jbP8cd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PAP9aiVcIB9k6tY7WdJ1wNV+bHeydNtmC6G5ICtFC1ZwmJU/j8hf0I8TRVKSiz5oYIa93EpUI78X8GYIAZabx47/n8LDAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg="},{}],6:[function(e,t,n){var s=e("./dictionary-browser");n.init=function(){n.dictionary=s.init()},n.offsetsByLength=new Uint32Array([0,0,0,0,0,4096,9216,21504,35840,44032,53248,63488,74752,87040,93696,100864,104704,106752,108928,113536,115968,118528,119872,121280,122016]),n.sizeBitsByLength=new Uint8Array([0,0,0,0,10,10,11,11,10,10,10,10,10,9,9,8,7,7,8,7,7,6,6,5,5]),n.minDictionaryWordLength=4,n.maxDictionaryWordLength=24},{"./dictionary-browser":4}],7:[function(e,t,n){function s(e,t){this.bits=e,this.value=t}n.HuffmanCode=s;var i=15;function r(e,t){for(var n=1<<t-1;e&n;)n>>=1;return(e&n-1)+n}function a(e,t,n,i,r){do{e[t+(i-=n)]=new s(r.bits,r.value)}while(i>0)}function o(e,t,n){for(var s=1<<t-n;t<i&&!((s-=e[t])<=0);)++t,s<<=1;return t-n}n.BrotliBuildHuffmanTable=function(e,t,n,l,c){var u,d,h,p,f,m,g,v,y,x,b=t,w=new Int32Array(i+1),_=new Int32Array(i+1);for(x=new Int32Array(c),d=0;d<c;d++)w[l[d]]++;for(_[1]=0,u=1;u<i;u++)_[u+1]=_[u]+w[u];for(d=0;d<c;d++)0!==l[d]&&(x[_[l[d]]++]=d);if(y=v=1<<(g=n),1===_[i]){for(h=0;h<y;++h)e[t+h]=new s(0,65535&x[0]);return y}for(h=0,d=0,u=1,p=2;u<=n;++u,p<<=1)for(;w[u]>0;--w[u])a(e,t+h,p,v,new s(255&u,65535&x[d++])),h=r(h,u);for(m=y-1,f=-1,u=n+1,p=2;u<=i;++u,p<<=1)for(;w[u]>0;--w[u])(h&m)!==f&&(t+=v,y+=v=1<<(g=o(w,u,n)),e[b+(f=h&m)]=new s(g+n&255,t-b-f&65535)),a(e,t+(h>>n),p,v,new s(u-n&255,65535&x[d++])),h=r(h,u);return y}},{}],8:[function(e,t,n){"use strict";n.byteLength=u,n.toByteArray=h,n.fromByteArray=m;for(var s=[],i=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,l=a.length;o<l;++o)s[o]=a[o],i[a.charCodeAt(o)]=o;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e){var t=c(e),n=t[0],s=t[1];return 3*(n+s)/4-s}function d(e,t,n){return 3*(t+n)/4-n}function h(e){for(var t,n=c(e),s=n[0],a=n[1],o=new r(d(e,s,a)),l=0,u=a>0?s-4:s,h=0;h<u;h+=4)t=i[e.charCodeAt(h)]<<18|i[e.charCodeAt(h+1)]<<12|i[e.charCodeAt(h+2)]<<6|i[e.charCodeAt(h+3)],o[l++]=t>>16&255,o[l++]=t>>8&255,o[l++]=255&t;return 2===a&&(t=i[e.charCodeAt(h)]<<2|i[e.charCodeAt(h+1)]>>4,o[l++]=255&t),1===a&&(t=i[e.charCodeAt(h)]<<10|i[e.charCodeAt(h+1)]<<4|i[e.charCodeAt(h+2)]>>2,o[l++]=t>>8&255,o[l++]=255&t),o}function p(e){return s[e>>18&63]+s[e>>12&63]+s[e>>6&63]+s[63&e]}function f(e,t,n){for(var s,i=[],r=t;r<n;r+=3)s=(e[r]<<16&16711680)+(e[r+1]<<8&65280)+(255&e[r+2]),i.push(p(s));return i.join("")}function m(e){for(var t,n=e.length,i=n%3,r=[],a=16383,o=0,l=n-i;o<l;o+=a)r.push(f(e,o,o+a>l?l:o+a));return 1===i?(t=e[n-1],r.push(s[t>>2]+s[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],r.push(s[t>>10]+s[t>>4&63]+s[t<<2&63]+"=")),r.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],9:[function(e,t,n){function s(e,t){this.offset=e,this.nbits=t}n.kBlockLengthPrefixCode=[new s(1,2),new s(5,2),new s(9,2),new s(13,2),new s(17,3),new s(25,3),new s(33,3),new s(41,3),new s(49,4),new s(65,4),new s(81,4),new s(97,4),new s(113,5),new s(145,5),new s(177,5),new s(209,5),new s(241,6),new s(305,6),new s(369,7),new s(497,8),new s(753,9),new s(1265,10),new s(2289,11),new s(4337,12),new s(8433,13),new s(16625,24)],n.kInsertLengthPrefixCode=[new s(0,0),new s(1,0),new s(2,0),new s(3,0),new s(4,0),new s(5,0),new s(6,1),new s(8,1),new s(10,2),new s(14,2),new s(18,3),new s(26,3),new s(34,4),new s(50,4),new s(66,5),new s(98,5),new s(130,6),new s(194,7),new s(322,8),new s(578,9),new s(1090,10),new s(2114,12),new s(6210,14),new s(22594,24)],n.kCopyLengthPrefixCode=[new s(2,0),new s(3,0),new s(4,0),new s(5,0),new s(6,0),new s(7,0),new s(8,0),new s(9,0),new s(10,1),new s(12,1),new s(14,2),new s(18,2),new s(22,3),new s(30,3),new s(38,4),new s(54,4),new s(70,5),new s(102,5),new s(134,6),new s(198,7),new s(326,8),new s(582,9),new s(1094,10),new s(2118,24)],n.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],n.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},{}],10:[function(e,t,n){function s(e){this.buffer=e,this.pos=0}function i(e){this.buffer=e,this.pos=0}s.prototype.read=function(e,t,n){this.pos+n>this.buffer.length&&(n=this.buffer.length-this.pos);for(var s=0;s<n;s++)e[t+s]=this.buffer[this.pos+s];return this.pos+=n,n},n.BrotliInput=s,i.prototype.write=function(e,t){if(this.pos+t>this.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(e.subarray(0,t),this.pos),this.pos+=t,t},n.BrotliOutput=i},{}],11:[function(e,t,n){var s=e("./dictionary"),i=0,r=1,a=2,o=3,l=4,c=5,u=6,d=7,h=8,p=9,f=10,m=11,g=12,v=13,y=14,x=15,b=16,w=17,_=18,j=20;function S(e,t,n){this.prefix=new Uint8Array(e.length),this.transform=t,this.suffix=new Uint8Array(n.length);for(var s=0;s<e.length;s++)this.prefix[s]=e.charCodeAt(s);for(s=0;s<n.length;s++)this.suffix[s]=n.charCodeAt(s)}var C=[new S("",i,""),new S("",i," "),new S(" ",i," "),new S("",g,""),new S("",f," "),new S("",i," the "),new S(" ",i,""),new S("s ",i," "),new S("",i," of "),new S("",f,""),new S("",i," and "),new S("",v,""),new S("",r,""),new S(", ",i," "),new S("",i,", "),new S(" ",f," "),new S("",i," in "),new S("",i," to "),new S("e ",i," "),new S("",i,'"'),new S("",i,"."),new S("",i,'">'),new S("",i,"\n"),new S("",o,""),new S("",i,"]"),new S("",i," for "),new S("",y,""),new S("",a,""),new S("",i," a "),new S("",i," that "),new S(" ",f,""),new S("",i,". "),new S(".",i,""),new S(" ",i,", "),new S("",x,""),new S("",i," with "),new S("",i,"'"),new S("",i," from "),new S("",i," by "),new S("",b,""),new S("",w,""),new S(" the ",i,""),new S("",l,""),new S("",i,". The "),new S("",m,""),new S("",i," on "),new S("",i," as "),new S("",i," is "),new S("",d,""),new S("",r,"ing "),new S("",i,"\n\t"),new S("",i,":"),new S(" ",i,". "),new S("",i,"ed "),new S("",j,""),new S("",_,""),new S("",u,""),new S("",i,"("),new S("",f,", "),new S("",h,""),new S("",i," at "),new S("",i,"ly "),new S(" the ",i," of "),new S("",c,""),new S("",p,""),new S(" ",f,", "),new S("",f,'"'),new S(".",i,"("),new S("",m," "),new S("",f,'">'),new S("",i,'="'),new S(" ",i,"."),new S(".com/",i,""),new S(" the ",i," of the "),new S("",f,"'"),new S("",i,". This "),new S("",i,","),new S(".",i," "),new S("",f,"("),new S("",f,"."),new S("",i," not "),new S(" ",i,'="'),new S("",i,"er "),new S(" ",m," "),new S("",i,"al "),new S(" ",m,""),new S("",i,"='"),new S("",m,'"'),new S("",f,". "),new S(" ",i,"("),new S("",i,"ful "),new S(" ",f,". "),new S("",i,"ive "),new S("",i,"less "),new S("",m,"'"),new S("",i,"est "),new S(" ",f,"."),new S("",m,'">'),new S(" ",i,"='"),new S("",f,","),new S("",i,"ize "),new S("",m,"."),new S(" ",i,""),new S(" ",i,","),new S("",f,'="'),new S("",m,'="'),new S("",i,"ous "),new S("",m,", "),new S("",f,"='"),new S(" ",f,","),new S(" ",m,'="'),new S(" ",m,", "),new S("",m,","),new S("",m,"("),new S("",m,". "),new S(" ",m,"."),new S("",m,"='"),new S(" ",m,". "),new S(" ",f,'="'),new S(" ",m,"='"),new S(" ",f,"='")];function k(e,t){return e[t]<192?(e[t]>=97&&e[t]<=122&&(e[t]^=32),1):e[t]<224?(e[t+1]^=32,2):(e[t+2]^=5,3)}n.kTransforms=C,n.kNumTransforms=C.length,n.transformDictionaryWord=function(e,t,n,i,r){var a,o=C[r].prefix,l=C[r].suffix,c=C[r].transform,u=c<g?0:c-(g-1),d=0,h=t;u>i&&(u=i);for(var v=0;v<o.length;)e[t++]=o[v++];for(n+=u,i-=u,c<=p&&(i-=c),d=0;d<i;d++)e[t++]=s.dictionary[n+d];if(a=t-i,c===f)k(e,a);else if(c===m)for(;i>0;){var y=k(e,a);a+=y,i-=y}for(var x=0;x<l.length;)e[t++]=l[x++];return t-h}},{"./dictionary":6}],12:[function(e,t,n){t.exports=e("./dec/decode").BrotliDecompressBuffer},{"./dec/decode":3}]},{},[12])(12)},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",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̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},n=Object.keys(t).join("|"),s=new RegExp(n,"g"),i=new RegExp(n,"");function r(e){return t[e]}var a=function(e){return e.replace(s,r)};e.exports=a,e.exports.has=function(e){return!!e.match(i)},e.exports.remove=a}},s={};function i(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return n[e](r,r.exports,i),r.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(n,s){if(1&s&&(n=this(n)),8&s)return n;if("object"==typeof n&&n){if(4&s&&n.__esModule)return n;if(16&s&&"function"==typeof n.then)return n}var r=Object.create(null);i.r(r);var a={};e=e||[null,t({}),t([]),t(t)];for(var o=2&s&&n;"object"==typeof o&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach((e=>a[e]=()=>n[e]));return a.default=()=>n,i.d(r,a),r},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";i.r(r),i.d(r,{PluginMoreMenuItem:()=>BV,PluginSidebar:()=>DV,PluginSidebarMoreMenuItem:()=>RV,PluginTemplateSettingPanel:()=>To,initializeEditor:()=>ZV,initializePostsDashboard:()=>UV,reinitializeEditor:()=>YV,store:()=>Rt});var e={};i.r(e),i.d(e,{__experimentalSetPreviewDeviceType:()=>ze,addTemplate:()=>Ge,closeGeneralSidebar:()=>at,openGeneralSidebar:()=>rt,openNavigationPanelToMenu:()=>Je,removeTemplate:()=>We,revertTemplate:()=>it,setEditedEntity:()=>Ze,setEditedPostContext:()=>Ke,setHasPageContentFocus:()=>lt,setHomeTemplateId:()=>Ye,setIsInserterOpened:()=>et,setIsListViewOpened:()=>tt,setIsNavigationPanelOpened:()=>$e,setIsSaveViewOpened:()=>st,setNavigationMenu:()=>qe,setNavigationPanelActiveMenu:()=>Qe,setPage:()=>Xe,setTemplate:()=>He,setTemplatePart:()=>Ue,switchEditorMode:()=>ot,toggleDistractionFree:()=>ct,toggleFeature:()=>Le,updateSettings:()=>nt});var t={};i.r(t),i.d(t,{registerRoute:()=>dt,setEditorCanvasContainerView:()=>ut,unregisterRoute:()=>ht});var n={};i.r(n),i.d(n,{__experimentalGetInsertionPoint:()=>Ct,__experimentalGetPreviewDeviceType:()=>mt,getCanUserCreateMedia:()=>gt,getCurrentTemplateNavigationPanelSubMenu:()=>Ot,getCurrentTemplateTemplateParts:()=>It,getEditedPostContext:()=>_t,getEditedPostId:()=>wt,getEditedPostType:()=>bt,getEditorMode:()=>Vt,getHomeTemplateId:()=>xt,getNavigationPanelActiveMenu:()=>Tt,getPage:()=>jt,getReusableBlocks:()=>vt,getSettings:()=>yt,hasPageContentFocus:()=>Ft,isFeatureActive:()=>ft,isInserterOpened:()=>St,isListViewOpened:()=>kt,isNavigationOpened:()=>At,isPage:()=>Nt,isSaveViewOpened:()=>Et});var s={};i.r(s),i.d(s,{getEditorCanvasContainerView:()=>Mt,getRoutes:()=>Bt});const a=window.ReactJSXRuntime,o=window.wp.blocks,l=window.wp.blockLibrary;var c=i(7143);const u=window.wp.deprecated;var d=i.n(u),h=i(6087);const f=window.wp.editor;var m=i(1233);const g=window.wp.widgets,v=window.wp.hooks,y=window.wp.compose,x=window.wp.blockEditor,b=window.wp.components,w=window.wp.i18n,_=window.wp.notices,j=window.wp.coreData;var S={grad:.9,turn:360,rad:360/(2*Math.PI)},C=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},k=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},E=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},P=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},I=function(e){return{r:E(e.r,0,255),g:E(e.g,0,255),b:E(e.b,0,255),a:E(e.a)}},V=function(e){return{r:k(e.r),g:k(e.g),b:k(e.b),a:k(e.a,3)}},O=/^#([0-9a-f]{3,8})$/i,T=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},A=function(e){var t=e.r,n=e.g,s=e.b,i=e.a,r=Math.max(t,n,s),a=r-Math.min(t,n,s),o=a?r===t?(n-s)/a:r===n?2+(s-t)/a:4+(t-n)/a:0;return{h:60*(o<0?o+6:o),s:r?a/r*100:0,v:r/255*100,a:i}},N=function(e){var t=e.h,n=e.s,s=e.v,i=e.a;t=t/360*6,n/=100,s/=100;var r=Math.floor(t),a=s*(1-n),o=s*(1-(t-r)*n),l=s*(1-(1-t+r)*n),c=r%6;return{r:255*[s,o,a,a,l,s][c],g:255*[l,s,s,o,a,a][c],b:255*[a,a,l,s,s,o][c],a:i}},F=function(e){return{h:P(e.h),s:E(e.s,0,100),l:E(e.l,0,100),a:E(e.a)}},M=function(e){return{h:k(e.h),s:k(e.s),l:k(e.l),a:k(e.a,3)}},B=function(e){return N((n=(t=e).s,{h:t.h,s:(n*=((s=t.l)<50?s:100-s)/100)>0?2*n/(s+n)*100:0,v:s+n,a:t.a}));var t,n,s},D=function(e){return{h:(t=A(e)).h,s:(i=(200-(n=t.s))*(s=t.v)/100)>0&&i<200?n*s/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,n,s,i},R=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,L=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,z=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,H=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,G={string:[[function(e){var t=O.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?k(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?k(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=z.exec(e)||H.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:I({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=R.exec(e)||L.exec(e);if(!t)return null;var n,s,i=F({h:(n=t[1],s=t[2],void 0===s&&(s="deg"),Number(n)*(S[s]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return B(i)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,s=e.b,i=e.a,r=void 0===i?1:i;return C(t)&&C(n)&&C(s)?I({r:Number(t),g:Number(n),b:Number(s),a:Number(r)}):null},"rgb"],[function(e){var t=e.h,n=e.s,s=e.l,i=e.a,r=void 0===i?1:i;if(!C(t)||!C(n)||!C(s))return null;var a=F({h:Number(t),s:Number(n),l:Number(s),a:Number(r)});return B(a)},"hsl"],[function(e){var t=e.h,n=e.s,s=e.v,i=e.a,r=void 0===i?1:i;if(!C(t)||!C(n)||!C(s))return null;var a=function(e){return{h:P(e.h),s:E(e.s,0,100),v:E(e.v,0,100),a:E(e.a)}}({h:Number(t),s:Number(n),v:Number(s),a:Number(r)});return N(a)},"hsv"]]},W=function(e,t){for(var n=0;n<t.length;n++){var s=t[n][0](e);if(s)return[s,t[n][1]]}return[null,void 0]},U=function(e){return"string"==typeof e?W(e.trim(),G.string):"object"==typeof e&&null!==e?W(e,G.object):[null,void 0]},q=function(e,t){var n=D(e);return{h:n.h,s:E(n.s+100*t,0,100),l:n.l,a:n.a}},Z=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Y=function(e,t){var n=D(e);return{h:n.h,s:n.s,l:E(n.l+100*t,0,100),a:n.a}},K=function(){function e(e){this.parsed=U(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return k(Z(this.rgba),2)},e.prototype.isDark=function(){return Z(this.rgba)<.5},e.prototype.isLight=function(){return Z(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=V(this.rgba)).r,n=e.g,s=e.b,r=(i=e.a)<1?T(k(255*i)):"","#"+T(t)+T(n)+T(s)+r;var e,t,n,s,i,r},e.prototype.toRgb=function(){return V(this.rgba)},e.prototype.toRgbString=function(){return t=(e=V(this.rgba)).r,n=e.g,s=e.b,(i=e.a)<1?"rgba("+t+", "+n+", "+s+", "+i+")":"rgb("+t+", "+n+", "+s+")";var e,t,n,s,i},e.prototype.toHsl=function(){return M(D(this.rgba))},e.prototype.toHslString=function(){return t=(e=M(D(this.rgba))).h,n=e.s,s=e.l,(i=e.a)<1?"hsla("+t+", "+n+"%, "+s+"%, "+i+")":"hsl("+t+", "+n+"%, "+s+"%)";var e,t,n,s,i},e.prototype.toHsv=function(){return e=A(this.rgba),{h:k(e.h),s:k(e.s),v:k(e.v),a:k(e.a,3)};var e},e.prototype.invert=function(){return X({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),X(q(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),X(q(this.rgba,-e))},e.prototype.grayscale=function(){return X(q(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),X(Y(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),X(Y(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?X({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):k(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=D(this.rgba);return"number"==typeof e?X({h:e,s:t.s,l:t.l,a:t.a}):k(t.h)},e.prototype.isEqual=function(e){return this.toHex()===X(e).toHex()},e}(),X=function(e){return e instanceof K?e:new K(e)},Q=[],J=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},$=function(e){return.2126*J(e.r)+.7152*J(e.g)+.0722*J(e.b)};const ee=window.wp.privateApis,{lock:te,unlock:ne}=(0,ee.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/edit-site"),{useGlobalSetting:se,useGlobalStyle:ie}=ne(x.privateApis);function re(){const[e="black"]=ie("color.text"),[t="white"]=ie("color.background"),[n=e]=ie("elements.h1.color.text"),[s=n]=ie("elements.link.color.text"),[i=s]=ie("elements.button.color.background"),[r]=se("color.palette.core"),[a]=se("color.palette.theme"),[o]=se("color.palette.custom"),l=(a??[]).concat(o??[]).concat(r??[]),c=l.filter((({color:t})=>t===e)),u=l.filter((({color:e})=>e===i));return{paletteColors:l,highlightedColors:c.concat(u).concat(l).filter((({color:e})=>e!==t)).slice(0,2)}}function ae(e,t,n){return e&&"object"==typeof e?(t.reduce(((e,s,i)=>(void 0===e[s]&&(Number.isInteger(t[i+1])?e[s]=[]:e[s]={}),i===t.length-1&&(e[s]=n),e[s])),e),e):e}!function(e){e.forEach((function(e){Q.indexOf(e)<0&&(e(K,G),Q.push(e))}))}([function(e){e.prototype.luminance=function(){return e=$(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,s,i,r,a,o,l,c=t instanceof e?t:new e(t);return r=this.rgba,a=c.toRgb(),n=(o=$(r))>(l=$(a))?(o+.05)/(l+.05):(l+.05)/(o+.05),void 0===(s=2)&&(s=0),void 0===i&&(i=Math.pow(10,s)),Math.floor(i*n)/i+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(a=void 0===(r=(n=t).size)?"normal":r,"AAA"===(i=void 0===(s=n.level)?"AA":s)&&"normal"===a?7:"AA"===i&&"large"===a?3:4.5);var n,s,i,r,a}}]);const{cleanEmptyObject:oe,GlobalStylesContext:le}=ne(x.privateApis),ce={...o.__EXPERIMENTAL_STYLE_PROPERTY,blockGap:{value:["spacing","blockGap"]}},ue={"border.color":"color","color.background":"color","color.text":"color","elements.link.color.text":"color","elements.link.:hover.color.text":"color","elements.link.typography.fontFamily":"font-family","elements.link.typography.fontSize":"font-size","elements.button.color.text":"color","elements.button.color.background":"color","elements.button.typography.fontFamily":"font-family","elements.button.typography.fontSize":"font-size","elements.caption.color.text":"color","elements.heading.color":"color","elements.heading.color.background":"color","elements.heading.typography.fontFamily":"font-family","elements.heading.gradient":"gradient","elements.heading.color.gradient":"gradient","elements.h1.color":"color","elements.h1.color.background":"color","elements.h1.typography.fontFamily":"font-family","elements.h1.color.gradient":"gradient","elements.h2.color":"color","elements.h2.color.background":"color","elements.h2.typography.fontFamily":"font-family","elements.h2.color.gradient":"gradient","elements.h3.color":"color","elements.h3.color.background":"color","elements.h3.typography.fontFamily":"font-family","elements.h3.color.gradient":"gradient","elements.h4.color":"color","elements.h4.color.background":"color","elements.h4.typography.fontFamily":"font-family","elements.h4.color.gradient":"gradient","elements.h5.color":"color","elements.h5.color.background":"color","elements.h5.typography.fontFamily":"font-family","elements.h5.color.gradient":"gradient","elements.h6.color":"color","elements.h6.color.background":"color","elements.h6.typography.fontFamily":"font-family","elements.h6.color.gradient":"gradient","color.gradient":"gradient",blockGap:"spacing","typography.fontSize":"font-size","typography.fontFamily":"font-family"},de={"border.color":"borderColor","color.background":"backgroundColor","color.text":"textColor","color.gradient":"gradient","typography.fontSize":"fontSize","typography.fontFamily":"fontFamily"},he=["border","color","spacing","typography"],pe=(e,t)=>{let n=e;return t.forEach((e=>{n=n?.[e]})),n},fe=["borderColor","borderWidth","borderStyle"],me=["top","right","bottom","left"];function ge(e,t,n){if(!t?.[e]||n?.[e]?.style)return[];const{color:s,style:i,width:r}=t[e];return!(s||r)||i?[]:[{path:["border",e,"style"],value:"solid"}]}function ve(e,t,n){const s=function(e,t){const{supportedPanels:n}=(0,c.useSelect)((n=>({supportedPanels:ne(n(o.store)).getSupportedStyles(e,t)})),[e,t]);return n}(e),i=n?.styles?.blocks?.[e];return(0,h.useMemo)((()=>{const e=s.flatMap((e=>{if(!ce[e])return[];const{value:n}=ce[e],s=n.join("."),i=t[de[s]],r=i?`var:preset|${ue[s]}|${i}`:pe(t.style,n);if("linkColor"===e){const e=r?[{path:n,value:r}]:[],s=["elements","link",":hover","color","text"],i=pe(t.style,s);return i&&e.push({path:s,value:i}),e}if(fe.includes(e)&&r){const e=[{path:n,value:r}];return me.forEach((t=>{const s=[...n];s.splice(-1,0,t),e.push({path:s,value:r})})),e}return r?[{path:n,value:r}]:[]}));return function(e,t,n){if(!e&&!t)return[];const s=[...ge("top",e,n),...ge("right",e,n),...ge("bottom",e,n),...ge("left",e,n)],{color:i,style:r,width:a}=e||{};return(t||i||a)&&!r&&me.forEach((e=>{n?.[e]?.style||s.push({path:["border",e,"style"],value:"solid"})})),s}(t.style?.border,t.borderColor,i?.border).forEach((t=>e.push(t))),e}),[s,t,i])}function ye({name:e,attributes:t,setAttributes:n}){const{user:s,setUserConfig:i}=(0,h.useContext)(le),r=ve(e,t,s),{__unstableMarkNextChangeAsNotPersistent:l}=(0,c.useDispatch)(x.store),{createSuccessNotice:u}=(0,c.useDispatch)(_.store),d=(0,h.useCallback)((()=>{if(0!==r.length&&r.length>0){const{style:a}=t,c=structuredClone(a),d=structuredClone(s);for(const{path:t,value:n}of r)ae(c,t,void 0),ae(d,["styles","blocks",e,...t],n);const h={borderColor:void 0,backgroundColor:void 0,textColor:void 0,gradient:void 0,fontSize:void 0,fontFamily:void 0,style:oe(c)};l(),n(h),i(d,{undoIgnore:!0}),u((0,w.sprintf)((0,w.__)("%s styles applied."),(0,o.getBlockType)(e).title),{type:"snackbar",actions:[{label:(0,w.__)("Undo"),onClick(){l(),n(t),i(s,{undoIgnore:!0})}}]})}}),[l,t,r,u,e,n,i,s]);return(0,a.jsxs)(b.BaseControl,{__nextHasNoMarginBottom:!0,className:"edit-site-push-changes-to-global-styles-control",help:(0,w.sprintf)((0,w.__)("Apply this block’s typography, spacing, dimensions, and color styles to all %s blocks."),(0,o.getBlockType)(e).title),children:[(0,a.jsx)(b.BaseControl.VisualLabel,{children:(0,w.__)("Styles")}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"secondary",accessibleWhenDisabled:!0,disabled:0===r.length,onClick:d,children:(0,w.__)("Apply globally")})]})}function xe(e){const t=(0,x.useBlockEditingMode)(),n=(0,c.useSelect)((e=>e(j.store).getCurrentTheme()?.is_block_theme),[]),s=he.some((t=>(0,o.hasBlockSupport)(e.name,t)));return"default"===t&&s&&n?(0,a.jsx)(x.InspectorAdvancedControls,{children:(0,a.jsx)(ye,{...e})}):null}const be=(0,y.createHigherOrderComponent)((e=>t=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(e,{...t},"edit"),t.isSelected&&(0,a.jsx)(xe,{...t})]})));(0,v.addFilter)("editor.BlockEdit","core/edit-site/push-changes-to-global-styles",be);var we=(0,c.combineReducers)({settings:function(e={},t){return"UPDATE_SETTINGS"===t.type?{...e,...t.settings}:e},editedPost:function(e={},t){switch(t.type){case"SET_EDITED_POST":return{postType:t.postType,id:t.id,context:t.context};case"SET_EDITED_POST_CONTEXT":return{...e,context:t.context}}return e},saveViewPanel:function(e=!1,t){return"SET_IS_SAVE_VIEW_OPENED"===t.type?t.isOpen:e},editorCanvasContainerView:function(e=void 0,t){return"SET_EDITOR_CANVAS_CONTAINER_VIEW"===t.type?t.view:e},routes:function(e=[],t){switch(t.type){case"REGISTER_ROUTE":return[...e,t.route];case"UNREGISTER_ROUTE":return e.filter((e=>e.name!==t.name))}return e}});const _e=window.wp.patterns,je="wp_navigation",Se="wp_template",Ce="wp_template_part",ke="custom",Ee="uncategorized",Pe="all-parts",{PATTERN_TYPES:Ie,PATTERN_DEFAULT_CATEGORY:Ve,PATTERN_USER_CATEGORY:Oe,EXCLUDED_PATTERN_SOURCES:Te,PATTERN_SYNC_TYPES:Ae}=ne(_e.privateApis),Ne=[Ce,je,Ie.user],Fe={[Se]:(0,w.__)("Template"),[Ce]:(0,w.__)("Template part"),[Ie.user]:(0,w.__)("Pattern"),[je]:(0,w.__)("Navigation")},Me="grid",Be="table",De="isAny",{interfaceStore:Re}=ne(f.privateApis);function Le(e){return function({registry:t}){d()("dispatch( 'core/edit-site' ).toggleFeature( featureName )",{since:"6.0",alternative:"dispatch( 'core/preferences').toggle( 'core/edit-site', featureName )"}),t.dispatch(m.store).toggle("core/edit-site",e)}}const ze=e=>({registry:t})=>{d()("dispatch( 'core/edit-site' ).__experimentalSetPreviewDeviceType",{since:"6.5",version:"6.7",hint:"registry.dispatch( editorStore ).setDeviceType"}),t.dispatch(f.store).setDeviceType(e)};function He(){return d()("dispatch( 'core/edit-site' ).setTemplate",{since:"6.5",version:"6.8",hint:"The setTemplate is not needed anymore, the correct entity is resolved from the URL automatically."}),{type:"NOTHING"}}const Ge=e=>async({dispatch:t,registry:n})=>{d()("dispatch( 'core/edit-site' ).addTemplate",{since:"6.5",version:"6.8",hint:"use saveEntityRecord directly"});const s=await n.dispatch(j.store).saveEntityRecord("postType",Se,e);e.content&&n.dispatch(j.store).editEntityRecord("postType",Se,s.id,{blocks:(0,o.parse)(e.content)},{undoIgnore:!0}),t({type:"SET_EDITED_POST",postType:Se,id:s.id})},We=e=>({registry:t})=>ne(t.dispatch(f.store)).removeTemplates([e]);function Ue(e){return d()("dispatch( 'core/edit-site' ).setTemplatePart",{since:"6.8"}),{type:"SET_EDITED_POST",postType:Ce,id:e}}function qe(e){return d()("dispatch( 'core/edit-site' ).setNavigationMenu",{since:"6.8"}),{type:"SET_EDITED_POST",postType:je,id:e}}function Ze(e,t,n){return{type:"SET_EDITED_POST",postType:e,id:t,context:n}}function Ye(){return d()("dispatch( 'core/edit-site' ).setHomeTemplateId",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function Ke(e){return d()("dispatch( 'core/edit-site' ).setEditedPostContext",{since:"6.8"}),{type:"SET_EDITED_POST_CONTEXT",context:e}}function Xe(){return d()("dispatch( 'core/edit-site' ).setPage",{since:"6.5",version:"6.8",hint:"The setPage is not needed anymore, the correct entity is resolved from the URL automatically."}),{type:"NOTHING"}}function Qe(){return d()("dispatch( 'core/edit-site' ).setNavigationPanelActiveMenu",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function Je(){return d()("dispatch( 'core/edit-site' ).openNavigationPanelToMenu",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function $e(){return d()("dispatch( 'core/edit-site' ).setIsNavigationPanelOpened",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}const et=e=>({registry:t})=>{d()("dispatch( 'core/edit-site' ).setIsInserterOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsInserterOpened"}),t.dispatch(f.store).setIsInserterOpened(e)},tt=e=>({registry:t})=>{d()("dispatch( 'core/edit-site' ).setIsListViewOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsListViewOpened"}),t.dispatch(f.store).setIsListViewOpened(e)};function nt(e){return{type:"UPDATE_SETTINGS",settings:e}}function st(e){return{type:"SET_IS_SAVE_VIEW_OPENED",isOpen:e}}const it=(e,t)=>({registry:n})=>ne(n.dispatch(f.store)).revertTemplate(e,t),rt=e=>({registry:t})=>{t.dispatch(Re).enableComplementaryArea("core",e)},at=()=>({registry:e})=>{e.dispatch(Re).disableComplementaryArea("core")},ot=e=>({registry:t})=>{d()("dispatch( 'core/edit-site' ).switchEditorMode",{since:"6.6",alternative:"dispatch( 'core/editor').switchEditorMode"}),t.dispatch(f.store).switchEditorMode(e)},lt=e=>({dispatch:t,registry:n})=>{d()("dispatch( 'core/edit-site' ).setHasPageContentFocus",{since:"6.5"}),e&&n.dispatch(x.store).clearSelectedBlock(),t({type:"SET_HAS_PAGE_CONTENT_FOCUS",hasPageContentFocus:e})},ct=()=>({registry:e})=>{d()("dispatch( 'core/edit-site' ).toggleDistractionFree",{since:"6.6",alternative:"dispatch( 'core/editor').toggleDistractionFree"}),e.dispatch(f.store).toggleDistractionFree()},ut=e=>({dispatch:t})=>{t({type:"SET_EDITOR_CANVAS_CONTAINER_VIEW",view:e})};function dt(e){return{type:"REGISTER_ROUTE",route:e}}function ht(e){return{type:"UNREGISTER_ROUTE",name:e}}const pt=[];const ft=(0,c.createRegistrySelector)((e=>(t,n)=>(d()("select( 'core/edit-site' ).isFeatureActive",{since:"6.0",alternative:"select( 'core/preferences' ).get"}),!!e(m.store).get("core/edit-site",n)))),mt=(0,c.createRegistrySelector)((e=>()=>(d()("select( 'core/edit-site' ).__experimentalGetPreviewDeviceType",{since:"6.5",version:"6.7",alternative:"select( 'core/editor' ).getDeviceType"}),e(f.store).getDeviceType()))),gt=(0,c.createRegistrySelector)((e=>()=>(d()("wp.data.select( 'core/edit-site' ).getCanUserCreateMedia()",{since:"6.7",alternative:"wp.data.select( 'core' ).canUser( 'create', { kind: 'postType', type: 'attachment' } )"}),e(j.store).canUser("create","media")))),vt=(0,c.createRegistrySelector)((e=>()=>{d()("select( 'core/edit-site' ).getReusableBlocks()",{since:"6.5",version:"6.8",alternative:"select( 'core/core' ).getEntityRecords( 'postType', 'wp_block' )"});return"web"===h.Platform.OS?e(j.store).getEntityRecords("postType","wp_block",{per_page:-1}):[]}));function yt(e){return e.settings}function xt(){d()("select( 'core/edit-site' ).getHomeTemplateId",{since:"6.2",version:"6.4"})}function bt(e){return d()("select( 'core/edit-site' ).getEditedPostType",{since:"6.8",alternative:"select( 'core/editor' ).getCurrentPostType"}),e.editedPost.postType}function wt(e){return d()("select( 'core/edit-site' ).getEditedPostId",{since:"6.8",alternative:"select( 'core/editor' ).getCurrentPostId"}),e.editedPost.id}function _t(e){return d()("select( 'core/edit-site' ).getEditedPostContext",{since:"6.8"}),e.editedPost.context}function jt(e){return d()("select( 'core/edit-site' ).getPage",{since:"6.8"}),{context:e.editedPost.context}}const St=(0,c.createRegistrySelector)((e=>()=>(d()("select( 'core/edit-site' ).isInserterOpened",{since:"6.5",alternative:"select( 'core/editor' ).isInserterOpened"}),e(f.store).isInserterOpened()))),Ct=(0,c.createRegistrySelector)((e=>()=>(d()("select( 'core/edit-site' ).__experimentalGetInsertionPoint",{since:"6.5",version:"6.7"}),ne(e(f.store)).getInserter()))),kt=(0,c.createRegistrySelector)((e=>()=>(d()("select( 'core/edit-site' ).isListViewOpened",{since:"6.5",alternative:"select( 'core/editor' ).isListViewOpened"}),e(f.store).isListViewOpened())));function Et(e){return e.saveViewPanel}function Pt(e){const t=e(j.store).getEntityRecords("postType",Ce,{per_page:-1}),{getBlocksByName:n,getBlocksByClientId:s}=e(x.store);return[s(n("core/template-part")),t]}const It=(0,c.createRegistrySelector)((e=>(0,c.createSelector)((()=>(d()("select( 'core/edit-site' ).getCurrentTemplateTemplateParts()",{since:"6.7",version:"6.9",alternative:"select( 'core/block-editor' ).getBlocksByName( 'core/template-part' )"}),function(e=pt,t){const n=t?t.reduce(((e,t)=>({...e,[t.id]:t})),{}):{},s=[],i=[...e];for(;i.length;){const{innerBlocks:e,...t}=i.shift();if(i.unshift(...e),(0,o.isTemplatePart)(t)){const{attributes:{theme:e,slug:i}}=t,r=n[`${e}//${i}`];r&&s.push({templatePart:r,block:t})}}return s}(...Pt(e)))),(()=>Pt(e))))),Vt=(0,c.createRegistrySelector)((e=>()=>e(m.store).get("core","editorMode")));function Ot(){d()("dispatch( 'core/edit-site' ).getCurrentTemplateNavigationPanelSubMenu",{since:"6.2",version:"6.4"})}function Tt(){d()("dispatch( 'core/edit-site' ).getNavigationPanelActiveMenu",{since:"6.2",version:"6.4"})}function At(){d()("dispatch( 'core/edit-site' ).isNavigationOpened",{since:"6.2",version:"6.4"})}function Nt(e){return d()("select( 'core/edit-site' ).isPage",{since:"6.8",alternative:"select( 'core/editor' ).getCurrentPostType"}),!!e.editedPost.context?.postId}function Ft(){return d()("select( 'core/edit-site' ).hasPageContentFocus",{since:"6.5"}),!1}function Mt(e){return e.editorCanvasContainerView}function Bt(e){return e.routes}const Dt={reducer:we,actions:e,selectors:n},Rt=(0,c.createReduxStore)("core/edit-site",Dt);(0,c.register)(Rt),ne(Rt).registerPrivateSelectors(s),ne(Rt).registerPrivateActions(t);const Lt=window.wp.router;function zt(e){var t,n,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=zt(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}const Ht=function(){for(var e,t,n=0,s="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=zt(e))&&(s&&(s+=" "),s+=t);return s},Gt=(0,h.forwardRef)((({children:e,className:t,ariaLabel:n,as:s="div",...i},r)=>(0,a.jsx)(s,{ref:r,className:Ht("admin-ui-navigable-region",t),"aria-label":n,role:"region",tabIndex:"-1",...i,children:e})));Gt.displayName="NavigableRegion";var Wt=Gt;const Ut=window.wp.plugins,qt=window.wp.htmlEntities,Zt=window.wp.primitives;var Yt=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})});const Kt=window.wp.commands,Xt=window.wp.keycodes,Qt=window.wp.url;var Jt=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,a.jsx)(Zt.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})});var $t=function({className:e}){const{isRequestingSite:t,siteIconUrl:n}=(0,c.useSelect)((e=>{const{getEntityRecord:t}=e(j.store),n=t("root","__unstableBase",void 0);return{isRequestingSite:!n,siteIconUrl:n?.site_icon_url}}),[]);if(t&&!n)return(0,a.jsx)("div",{className:"edit-site-site-icon__image"});const s=n?(0,a.jsx)("img",{className:"edit-site-site-icon__image",alt:(0,w.__)("Site Icon"),src:n}):(0,a.jsx)(b.Icon,{className:"edit-site-site-icon__icon",icon:Jt,size:48});return(0,a.jsx)("div",{className:Ht(e,"edit-site-site-icon"),children:s})};const en=window.wp.dom,tn=(0,h.createContext)((()=>{}));function nn(){let e={direction:null,focusSelector:null};return{get:()=>e,navigate(t,n=null){e={direction:t,focusSelector:"forward"===t&&n?n:e.focusSelector}}}}function sn({children:e,shouldAnimate:t}){const n=(0,h.useContext)(tn),s=(0,h.useRef)(),[i,r]=(0,h.useState)(null);(0,h.useLayoutEffect)((()=>{const{direction:e,focusSelector:t}=n.get();!function(e,t,n){let s;if("back"===t&&n&&(s=e.querySelector(n)),null!==t&&!s){const[t]=en.focus.tabbable.find(e);s=t??e}s?.focus()}(s.current,e,t),r(e)}),[n]);const o=Ht("edit-site-sidebar__screen-wrapper",t?{"slide-from-left":"back"===i,"slide-from-right":"forward"===i}:{});return(0,a.jsx)("div",{ref:s,className:o,children:e})}function rn({children:e}){const[t]=(0,h.useState)(nn);return(0,a.jsx)(tn.Provider,{value:t,children:e})}function an({routeKey:e,shouldAnimate:t,children:n}){return(0,a.jsx)("div",{className:"edit-site-sidebar__content",children:(0,a.jsx)(sn,{shouldAnimate:t,children:n},e)})}tn.displayName="SidebarNavigationContext";const{useLocation:on,useHistory:ln}=ne(Lt.privateApis),cn=(0,h.memo)((0,h.forwardRef)((({isTransparent:e},t)=>{const{dashboardLink:n,homeUrl:s,siteTitle:i}=(0,c.useSelect)((e=>{const{getSettings:t}=ne(e(Rt)),{getEntityRecord:n}=e(j.store),s=n("root","site");return{dashboardLink:t().__experimentalDashboardLink,homeUrl:n("root","__unstableBase")?.home,siteTitle:!s?.title&&s?.url?(0,Qt.filterURLForDisplay)(s?.url):s?.title}}),[]),{open:r}=(0,c.useDispatch)(Kt.store);return(0,a.jsx)("div",{className:"edit-site-site-hub",children:(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-start",spacing:"0",children:[(0,a.jsx)("div",{className:Ht("edit-site-site-hub__view-mode-toggle-container",{"has-transparent-background":e}),children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,ref:t,href:n,label:(0,w.__)("Go to the Dashboard"),className:"edit-site-layout__view-mode-toggle",style:{transform:"scale(0.5333) translateX(-4px)",borderRadius:4},children:(0,a.jsx)($t,{className:"edit-site-layout__view-mode-toggle-icon"})})}),(0,a.jsxs)(b.__experimentalHStack,{children:[(0,a.jsx)("div",{className:"edit-site-site-hub__title",children:(0,a.jsxs)(b.Button,{__next40pxDefaultSize:!0,variant:"link",href:s,target:"_blank",children:[(0,qt.decodeEntities)(i),(0,a.jsx)(b.VisuallyHidden,{as:"span",children:(0,w.__)("(opens in a new tab)")})]})}),(0,a.jsx)(b.__experimentalHStack,{spacing:0,expanded:!1,className:"edit-site-site-hub__actions",children:(0,a.jsx)(b.Button,{size:"compact",className:"edit-site-site-hub_toggle-command-center",icon:Yt,onClick:()=>r(),label:(0,w.__)("Open command palette"),shortcut:Xt.displayShortcut.primary("k")})})]})]})})})));var un=cn;const dn=(0,h.memo)((0,h.forwardRef)((({isTransparent:e},t)=>{const{path:n}=on(),s=ln(),{navigate:i}=(0,h.useContext)(tn),{dashboardLink:r,homeUrl:o,siteTitle:l,isBlockTheme:u,isClassicThemeWithStyleBookSupport:d}=(0,c.useSelect)((e=>{const{getSettings:t}=ne(e(Rt)),{getEntityRecord:n,getCurrentTheme:s}=e(j.store),i=n("root","site"),r=s(),a=t(),o=r.theme_supports["editor-styles"],l=a.supportsLayout;return{dashboardLink:a.__experimentalDashboardLink,homeUrl:n("root","__unstableBase")?.home,siteTitle:!i?.title&&i?.url?(0,Qt.filterURLForDisplay)(i?.url):i?.title,isBlockTheme:r?.is_block_theme,isClassicThemeWithStyleBookSupport:!r?.is_block_theme&&(o||l)}}),[]),{open:p}=(0,c.useDispatch)(Kt.store);let f;"/"!==n&&(u||d?f="/":"/pattern"!==n&&(f="/pattern"));const m={href:f?void 0:r,label:f?(0,w.__)("Go to Site Editor"):(0,w.__)("Go to the Dashboard"),onClick:f?()=>{s.navigate(f),i("back")}:void 0};return(0,a.jsx)("div",{className:"edit-site-site-hub",children:(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-start",spacing:"0",children:[(0,a.jsx)("div",{className:Ht("edit-site-site-hub__view-mode-toggle-container",{"has-transparent-background":e}),children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,ref:t,className:"edit-site-layout__view-mode-toggle",style:{transform:"scale(0.5)",borderRadius:4},...m,children:(0,a.jsx)($t,{className:"edit-site-layout__view-mode-toggle-icon"})})}),(0,a.jsxs)(b.__experimentalHStack,{children:[(0,a.jsx)("div",{className:"edit-site-site-hub__title",children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"link",href:o,target:"_blank",label:(0,w.__)("View site (opens in a new tab)"),children:(0,qt.decodeEntities)(l)})}),(0,a.jsx)(b.__experimentalHStack,{spacing:0,expanded:!1,className:"edit-site-site-hub__actions",children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,className:"edit-site-site-hub_toggle-command-center",icon:Yt,onClick:()=>p(),label:(0,w.__)("Open command palette"),shortcut:Xt.displayShortcut.primary("k")})})]})]})})}))),{useLocation:hn,useHistory:pn}=ne(Lt.privateApis),fn={position:void 0,userSelect:void 0,cursor:void 0,width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0},mn=320,gn=9/19.5,vn={width:"100%",height:"100%"};function yn(e,t){const n=1-Math.max(0,Math.min(1,(e-mn)/980)),s=((e,t,n)=>e+(t-e)*n)(t,gn,n);return e/s}var xn=function e({isFullWidth:t,isOversized:n,setIsOversized:s,isReady:i,children:r,defaultSize:o,innerContentStyle:l}){const u=pn(),{path:d,query:p}=hn(),{canvas:f="view"}=p,m=(0,y.useReducedMotion)(),[g,v]=(0,h.useState)(vn),[x,_]=(0,h.useState)(),[S,C]=(0,h.useState)(!1),[k,E]=(0,h.useState)(!1),[P,I]=(0,h.useState)(1),V={type:"tween",duration:S?0:.5},O=(0,h.useRef)(null),T=(0,y.useInstanceId)(e,"edit-site-resizable-frame-handle-help"),A=o.width/o.height,N=(0,c.useSelect)((e=>{const{getCurrentTheme:t}=e(j.store);return t()?.is_block_theme}),[]),F={default:{flexGrow:0,height:g.height},fullWidth:{flexGrow:1,height:g.height}},M={hidden:{opacity:0,...(0,w.isRTL)()?{right:0}:{left:0}},visible:{opacity:1,...(0,w.isRTL)()?{right:-14}:{left:-14}},active:{opacity:1,...(0,w.isRTL)()?{right:-14}:{left:-14},scaleY:1.3}},B=S?"active":k?"visible":"hidden";return(0,a.jsx)(b.ResizableBox,{as:b.__unstableMotion.div,ref:O,initial:!1,variants:F,animate:t?"fullWidth":"default",onAnimationComplete:e=>{"fullWidth"===e&&v({width:"100%",height:"100%"})},whileHover:"view"===f&&N?{scale:1.005,transition:{duration:m?0:.5,ease:"easeOut"}}:{},transition:V,size:g,enable:{top:!1,bottom:!1,...(0,w.isRTL)()?{right:i,left:!1}:{left:i,right:!1},topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},resizeRatio:P,handleClasses:void 0,handleStyles:{left:fn,right:fn},minWidth:mn,maxWidth:t?"100%":"150%",maxHeight:"100%",onFocus:()=>E(!0),onBlur:()=>E(!1),onMouseOver:()=>E(!0),onMouseOut:()=>E(!1),handleComponent:{[(0,w.isRTL)()?"right":"left"]:"view"===f&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Tooltip,{text:(0,w.__)("Drag to resize"),children:(0,a.jsx)(b.__unstableMotion.button,{role:"separator","aria-orientation":"vertical",className:Ht("edit-site-resizable-frame__handle",{"is-resizing":S}),variants:M,animate:B,"aria-label":(0,w.__)("Drag to resize"),"aria-describedby":T,"aria-valuenow":O.current?.resizable?.offsetWidth||void 0,"aria-valuemin":mn,"aria-valuemax":o.width,onKeyDown:e=>{if(!["ArrowLeft","ArrowRight"].includes(e.key))return;e.preventDefault();const t=20*(e.shiftKey?5:1)*("ArrowLeft"===e.key?1:-1)*((0,w.isRTL)()?-1:1),n=Math.min(Math.max(mn,O.current.resizable.offsetWidth+t),o.width);v({width:n,height:yn(n,A)})},initial:"hidden",exit:"hidden",whileFocus:"active",whileHover:"active"},"handle")}),(0,a.jsx)("div",{hidden:!0,id:T,children:(0,w.__)("Use left and right arrow keys to resize the canvas. Hold shift to resize in larger increments.")})]})},onResizeStart:(e,t,n)=>{_(n.offsetWidth),C(!0)},onResize:(e,t,i,r)=>{const a=r.width/P,l=Math.abs(a),c=r.width<0?l:(o.width-x)/2,u=Math.min(l,c),d=0===l?0:u/l;I(1-d+2*d);const h=x+r.width;s(h>o.width),v({height:n?"100%":yn(h,A)})},onResizeStop:(e,t,i)=>{if(C(!1),!n)return;s(!1);i.ownerDocument.documentElement.offsetWidth-i.offsetWidth>200||!N?v(vn):u.navigate((0,Qt.addQueryArgs)(d,{canvas:"edit"}),{transition:"canvas-mode-edit-transition"})},className:Ht("edit-site-resizable-frame__inner",{"is-resizing":S}),showHandle:!1,children:(0,a.jsx)("div",{className:"edit-site-resizable-frame__inner-content",style:l,children:r})})};const bn=window.wp.keyboardShortcuts,wn="core/edit-site/save";function _n(){const{__experimentalGetDirtyEntityRecords:e,isSavingEntityRecord:t}=(0,c.useSelect)(j.store),{hasNonPostEntityChanges:n,isPostSavingLocked:s}=(0,c.useSelect)(f.store),{savePost:i}=(0,c.useDispatch)(f.store),{setIsSaveViewOpened:r}=(0,c.useDispatch)(Rt),{registerShortcut:a,unregisterShortcut:o}=(0,c.useDispatch)(bn.store);return(0,h.useEffect)((()=>(a({name:wn,category:"global",description:(0,w.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),()=>{o(wn)})),[a,o]),(0,bn.useShortcut)("core/edit-site/save",(a=>{a.preventDefault();const o=e(),l=!!o.length,c=o.some((e=>t(e.kind,e.name,e.key)));l&&!c&&(n()?r(!0):s()||i())})),null}const jn=1e4;function Sn(){const[e,t]=(0,h.useState)(!1),n=(0,c.useSelect)((t=>{const n=t(j.store).hasResolvingSelectors();return!e&&!n}),[e]);return(0,h.useEffect)((()=>{let n;return e||(n=setTimeout((()=>{t(!0)}),jn)),()=>{clearTimeout(n)}}),[e]),(0,h.useEffect)((()=>{if(n){const e=setTimeout((()=>{t(!0)}),100);return()=>{clearTimeout(e)}}}),[n]),!e}var Cn=zn(),kn=e=>Bn(e,Cn),En=zn();kn.write=e=>Bn(e,En);var Pn=zn();kn.onStart=e=>Bn(e,Pn);var In=zn();kn.onFrame=e=>Bn(e,In);var Vn=zn();kn.onFinish=e=>Bn(e,Vn);var On=[];kn.setTimeout=(e,t)=>{let n=kn.now()+t,s=()=>{let e=On.findIndex((e=>e.cancel==s));~e&&On.splice(e,1),Fn-=~e?1:0},i={time:n,handler:e,cancel:s};return On.splice(Tn(n),0,i),Fn+=1,Dn(),i};var Tn=e=>~(~On.findIndex((t=>t.time>e))||~On.length);kn.cancel=e=>{Pn.delete(e),In.delete(e),Vn.delete(e),Cn.delete(e),En.delete(e)},kn.sync=e=>{Mn=!0,kn.batchedUpdates(e),Mn=!1},kn.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function s(...e){t=e,kn.onStart(n)}return s.handler=e,s.cancel=()=>{Pn.delete(n),t=null},s};var An=typeof window<"u"?window.requestAnimationFrame:()=>{};kn.use=e=>An=e,kn.now=typeof performance<"u"?()=>performance.now():Date.now,kn.batchedUpdates=e=>e(),kn.catch=console.error,kn.frameLoop="always",kn.advance=()=>{"demand"!==kn.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Ln()};var Nn=-1,Fn=0,Mn=!1;function Bn(e,t){Mn?(t.delete(e),e(0)):(t.add(e),Dn())}function Dn(){Nn<0&&(Nn=0,"demand"!==kn.frameLoop&&An(Rn))}function Rn(){~Nn&&(An(Rn),kn.batchedUpdates(Ln))}function Ln(){let e=Nn;Nn=kn.now();let t=Tn(Nn);t&&(Hn(On.splice(0,t),(e=>e.handler())),Fn-=t),Fn?(Pn.flush(),Cn.flush(e?Math.min(64,Nn-e):16.667),In.flush(),En.flush(),Vn.flush()):Nn=-1}function zn(){let e=new Set,t=e;return{add(n){Fn+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(Fn-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,Fn-=t.size,Hn(t,(t=>t(n)&&e.add(t))),Fn+=e.size,t=e)}}}function Hn(e,t){e.forEach((e=>{try{t(e)}catch(e){kn.catch(e)}}))}var Gn=i(1609),Wn=i.t(Gn,2),Un=Object.defineProperty,qn={};function Zn(){}((e,t)=>{for(var n in t)Un(e,n,{get:t[n],enumerable:!0})})(qn,{assign:()=>os,colors:()=>is,createStringInterpolator:()=>es,skipAnimation:()=>rs,to:()=>ts,willAdvance:()=>as});var Yn={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function Kn(e,t){if(Yn.arr(e)){if(!Yn.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var Xn=(e,t)=>e.forEach(t);function Qn(e,t,n){if(Yn.arr(e))for(let s=0;s<e.length;s++)t.call(n,e[s],`${s}`);else for(let s in e)e.hasOwnProperty(s)&&t.call(n,e[s],s)}var Jn=e=>Yn.und(e)?[]:Yn.arr(e)?e:[e];function $n(e,t){if(e.size){let n=Array.from(e);e.clear(),Xn(n,t)}}var es,ts,ns=(e,...t)=>$n(e,(e=>e(...t))),ss=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),is=null,rs=!1,as=Zn,os=e=>{e.to&&(ts=e.to),e.now&&(kn.now=e.now),void 0!==e.colors&&(is=e.colors),null!=e.skipAnimation&&(rs=e.skipAnimation),e.createStringInterpolator&&(es=e.createStringInterpolator),e.requestAnimationFrame&&kn.use(e.requestAnimationFrame),e.batchedUpdates&&(kn.batchedUpdates=e.batchedUpdates),e.willAdvance&&(as=e.willAdvance),e.frameLoop&&(kn.frameLoop=e.frameLoop)},ls=new Set,cs=[],us=[],ds=0,hs={get idle(){return!ls.size&&!cs.length},start(e){ds>e.priority?(ls.add(e),kn.onStart(ps)):(fs(e),kn(gs))},advance:gs,sort(e){if(ds)kn.onFrame((()=>hs.sort(e)));else{let t=cs.indexOf(e);~t&&(cs.splice(t,1),ms(e))}},clear(){cs=[],ls.clear()}};function ps(){ls.forEach(fs),ls.clear(),kn(gs)}function fs(e){cs.includes(e)||ms(e)}function ms(e){cs.splice(function(e,t){let n=e.findIndex(t);return n<0?e.length:n}(cs,(t=>t.priority>e.priority)),0,e)}function gs(e){let t=us;for(let n=0;n<cs.length;n++){let s=cs[n];ds=s.priority,s.idle||(as(s),s.advance(e),s.idle||t.push(s))}return ds=0,(us=cs).length=0,(cs=t).length>0}var vs="[-+]?\\d*\\.?\\d+",ys=vs+"%";function xs(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var bs=new RegExp("rgb"+xs(vs,vs,vs)),ws=new RegExp("rgba"+xs(vs,vs,vs,vs)),_s=new RegExp("hsl"+xs(vs,ys,ys)),js=new RegExp("hsla"+xs(vs,ys,ys,vs)),Ss=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Cs=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ks=/^#([0-9a-fA-F]{6})$/,Es=/^#([0-9a-fA-F]{8})$/;function Ps(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Is(e,t,n){let s=n<.5?n*(1+t):n+t-n*t,i=2*n-s,r=Ps(i,s,e+1/3),a=Ps(i,s,e),o=Ps(i,s,e-1/3);return Math.round(255*r)<<24|Math.round(255*a)<<16|Math.round(255*o)<<8}function Vs(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function Os(e){return(parseFloat(e)%360+360)%360/360}function Ts(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function As(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function Ns(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=ks.exec(e))?parseInt(t[1]+"ff",16)>>>0:is&&void 0!==is[e]?is[e]:(t=bs.exec(e))?(Vs(t[1])<<24|Vs(t[2])<<16|Vs(t[3])<<8|255)>>>0:(t=ws.exec(e))?(Vs(t[1])<<24|Vs(t[2])<<16|Vs(t[3])<<8|Ts(t[4]))>>>0:(t=Ss.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Es.exec(e))?parseInt(t[1],16)>>>0:(t=Cs.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=_s.exec(e))?(255|Is(Os(t[1]),As(t[2]),As(t[3])))>>>0:(t=js.exec(e))?(Is(Os(t[1]),As(t[2]),As(t[3]))|Ts(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}var Fs=(e,t,n)=>{if(Yn.fun(e))return e;if(Yn.arr(e))return Fs({range:e,output:t,extrapolate:n});if(Yn.str(e.output[0]))return es(e);let s=e,i=s.output,r=s.range||[0,1],a=s.extrapolateLeft||s.extrapolate||"extend",o=s.extrapolateRight||s.extrapolate||"extend",l=s.easing||(e=>e);return e=>{let t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,r);return function(e,t,n,s,i,r,a,o,l){let c=l?l(e):e;if(c<t){if("identity"===a)return c;"clamp"===a&&(c=t)}if(c>n){if("identity"===o)return c;"clamp"===o&&(c=n)}return s===i?s:t===n?e<=t?s:i:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=r(c),s===-1/0?c=-c:i===1/0?c+=s:c=c*(i-s)+s,c)}(e,r[t],r[t+1],i[t],i[t+1],l,a,o,s.map)}};var Ms=1.70158,Bs=1.525*Ms,Ds=Ms+1,Rs=2*Math.PI/3,Ls=2*Math.PI/4.5,zs=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Hs={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>Ds*e*e*e-Ms*e*e,easeOutBack:e=>1+Ds*Math.pow(e-1,3)+Ms*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(2*(Bs+1)*e-Bs)/2:(Math.pow(2*e-2,2)*((Bs+1)*(2*e-2)+Bs)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*Rs),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*Rs)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Ls)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Ls)/2+1,easeInBounce:e=>1-zs(1-e),easeOutBounce:zs,easeInOutBounce:e=>e<.5?(1-zs(1-2*e))/2:(1+zs(2*e-1))/2,steps:(e,t="end")=>n=>{let s=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return((e,t,n)=>Math.min(Math.max(n,e),t))(0,1,("end"===t?Math.floor(s):Math.ceil(s))/e)}},Gs=Symbol.for("FluidValue.get"),Ws=Symbol.for("FluidValue.observers"),Us=e=>Boolean(e&&e[Gs]),qs=e=>e&&e[Gs]?e[Gs]():e,Zs=e=>e[Ws]||null;function Ys(e,t){let n=e[Ws];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var Ks=class{[Gs];[Ws];constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Xs(this,e)}},Xs=(e,t)=>ei(e,Gs,t);function Qs(e,t){if(e[Gs]){let n=e[Ws];n||ei(e,Ws,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Js(e,t){let n=e[Ws];if(n&&n.has(t)){let s=n.size-1;s?n.delete(t):e[Ws]=null,e.observerRemoved&&e.observerRemoved(s,t)}}var $s,ei=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ti=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ni=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,si=new RegExp(`(${ti.source})(%|[a-z]+)`,"i"),ii=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,ri=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,ai=e=>{let[t,n]=oi(e);if(!t||ss())return e;let s=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(s)return s.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||e}return n&&ri.test(n)?ai(n):n||e},oi=e=>{let t=ri.exec(e);if(!t)return[,];let[,n,s]=t;return[n,s]},li=(e,t,n,s,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(s)}, ${i})`,ci=e=>{$s||($s=is?new RegExp(`(${Object.keys(is).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map((e=>qs(e).replace(ri,ai).replace(ni,Ns).replace($s,Ns))),n=t.map((e=>e.match(ti).map(Number))),s=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>Fs({...e,output:t})));return e=>{let n=!si.test(t[0])&&t.find((e=>si.test(e)))?.replace(ti,""),i=0;return t[0].replace(ti,(()=>`${s[i++](e)}${n||""}`)).replace(ii,li)}},ui="react-spring: ",di=e=>{let t=e,n=!1;if("function"!=typeof t)throw new TypeError(`${ui}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},hi=di(console.warn);di(console.warn);function pi(e){return Yn.str(e)&&("#"==e[0]||/\d/.test(e)||!ss()&&ri.test(e)||e in(is||{}))}new WeakMap;new Set,new WeakMap,new WeakMap,new WeakMap;var fi=ss()?Gn.useEffect:Gn.useLayoutEffect;function mi(){let e=(0,Gn.useState)()[1],t=(()=>{let e=(0,Gn.useRef)(!1);return fi((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var gi=[];var vi=Symbol.for("Animated:node"),yi=e=>e&&e[vi],xi=(e,t)=>((e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}))(e,vi,t),bi=e=>e&&e[vi]&&e[vi].getPayload(),wi=class{payload;constructor(){xi(this,this)}getPayload(){return this.payload||[]}},_i=class extends wi{constructor(e){super(),this._value=e,Yn.num(this._value)&&(this.lastPosition=this._value)}done=!0;elapsedTime;lastPosition;lastVelocity;v0;durationProgress=0;static create(e){return new _i(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Yn.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,Yn.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},ji=class extends _i{_string=null;_toString;constructor(e){super(0),this._toString=Fs({output:[e,e]})}static create(e){return new ji(e)}getValue(){return this._string??(this._string=this._toString(this._value))}setValue(e){if(Yn.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=Fs({output:[this.getValue(),e]})),this._value=0,super.reset()}},Si={dependencies:null},Ci=class extends wi{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return Qn(this.source,((n,s)=>{(e=>!!e&&e[vi]===e)(n)?t[s]=n.getValue(e):Us(n)?t[s]=qs(n):e||(t[s]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Xn(this.payload,(e=>e.reset()))}_makePayload(e){if(e){let t=new Set;return Qn(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Si.dependencies&&Us(e)&&Si.dependencies.add(e);let t=bi(e);t&&Xn(t,(e=>this.add(e)))}},ki=class extends Ci{constructor(e){super(e)}static create(e){return new ki(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){let t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(Ei)),!0)}};function Ei(e){return(pi(e)?ji:_i).create(e)}function Pi(e){let t=yi(e);return t?t.constructor:Yn.arr(e)?ki:pi(e)?ji:_i}var Ii=(e,t)=>{let n=!Yn.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Gn.forwardRef)(((s,i)=>{let r=(0,Gn.useRef)(null),a=n&&(0,Gn.useCallback)((e=>{r.current=function(e,t){return e&&(Yn.fun(e)?e(t):e.current=t),t}(i,e)}),[i]),[o,l]=function(e,t){let n=new Set;return Si.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Ci(e),Si.dependencies=null,[e,n]}(s,t),c=mi(),u=()=>{let e=r.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,o.getValue(!0)))&&c()},d=new Vi(u,l),h=(0,Gn.useRef)();fi((()=>(h.current=d,Xn(l,(e=>Qs(e,d))),()=>{h.current&&(Xn(h.current.deps,(e=>Js(e,h.current))),kn.cancel(h.current.update))}))),(0,Gn.useEffect)(u,[]),(e=>{(0,Gn.useEffect)(e,gi)})((()=>()=>{let e=h.current;Xn(e.deps,(t=>Js(t,e)))}));let p=t.getComponentProps(o.getValue());return Gn.createElement(e,{...p,ref:a})}))},Vi=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&kn.write(this.update)}};var Oi=Symbol.for("AnimatedComponent"),Ti=e=>Yn.str(e)?e:e&&Yn.str(e.displayName)?e.displayName:Yn.fun(e)&&e.name||null;function Ai(e,...t){return Yn.fun(e)?e(...t):e}var Ni=(e,t)=>!0===e||!!(t&&e&&(Yn.fun(e)?e(t):Jn(e).includes(t))),Fi=(e,t)=>Yn.obj(e)?t&&e[t]:e,Mi=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,Bi=e=>e,Di=(e,t=Bi)=>{let n=Ri;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));let s={};for(let i of n){let n=t(e[i],i);Yn.und(n)||(s[i]=n)}return s},Ri=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Li={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function zi(e){let t=function(e){let t={},n=0;if(Qn(e,((e,s)=>{Li[s]||(t[s]=e,n++)})),n)return t}(e);if(t){let n={to:t};return Qn(e,((e,s)=>s in t||(n[s]=e))),n}return{...e}}function Hi(e){return e=qs(e),Yn.arr(e)?e.map(Hi):pi(e)?qn.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Gi(e){return Yn.fun(e)||Yn.arr(e)&&Yn.obj(e[0])}var Wi={tension:170,friction:26,mass:1,damping:1,easing:Hs.linear,clamp:!1},Ui=class{tension;friction;frequency;damping;mass;velocity=0;restVelocity;precision;progress;duration;easing;clamp;bounce;decay;round;constructor(){Object.assign(this,Wi)}};function qi(e,t){if(Yn.und(t.decay)){let n=!Yn.und(t.tension)||!Yn.und(t.friction);(n||!Yn.und(t.frequency)||!Yn.und(t.damping)||!Yn.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var Zi=[],Yi=class{changed=!1;values=Zi;toValues=null;fromValues=Zi;to;from;config=new Ui;immediate=!1};function Ki(e,{key:t,props:n,defaultProps:s,state:i,actions:r}){return new Promise(((a,o)=>{let l,c,u=Ni(n.cancel??s?.cancel,t);if(u)p();else{Yn.und(n.pause)||(i.paused=Ni(n.pause,t));let e=s?.pause;!0!==e&&(e=i.paused||Ni(e,t)),l=Ai(n.delay||0,t),e?(i.resumeQueue.add(h),r.pause()):(r.resume(),h())}function d(){i.resumeQueue.add(h),i.timeouts.delete(c),c.cancel(),l=c.time-kn.now()}function h(){l>0&&!qn.skipAnimation?(i.delayed=!0,c=kn.setTimeout(p,l),i.pauseQueue.add(d),i.timeouts.add(c)):p()}function p(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(d),i.timeouts.delete(c),e<=(i.cancelId||0)&&(u=!0);try{r.start({...n,callId:e,cancel:u},a)}catch(e){o(e)}}}))}var Xi=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?$i(e.get()):t.every((e=>e.noop))?Qi(e.get()):Ji(e.get(),t.every((e=>e.finished))),Qi=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Ji=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),$i=e=>({value:e,cancelled:!0,finished:!1});function er(e,t,n,s){let{callId:i,parentId:r,onRest:a}=t,{asyncTo:o,promise:l}=n;return r||e!==o||t.reset?n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;let c,u,d,h=Di(t,((e,t)=>"onRest"===t?void 0:e)),p=new Promise(((e,t)=>(c=e,u=t))),f=e=>{let t=i<=(n.cancelId||0)&&$i(s)||i!==n.asyncId&&Ji(s,!1);if(t)throw e.result=t,u(e),e},m=(e,t)=>{let r=new nr,a=new sr;return(async()=>{if(qn.skipAnimation)throw tr(n),a.result=Ji(s,!1),u(a),a;f(r);let o=Yn.obj(e)?{...e}:{...t,to:e};o.parentId=i,Qn(h,((e,t)=>{Yn.und(o[t])&&(o[t]=e)}));let l=await s.start(o);return f(r),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),l})()};if(qn.skipAnimation)return tr(n),Ji(s,!1);try{let t;t=Yn.arr(e)?(async e=>{for(let t of e)await m(t)})(e):Promise.resolve(e(m,s.stop.bind(s))),await Promise.all([t.then(c),p]),d=Ji(s.get(),!0,!1)}catch(e){if(e instanceof nr)d=e.result;else{if(!(e instanceof sr))throw e;d=e.result}}finally{i==n.asyncId&&(n.asyncId=r,n.asyncTo=r?o:void 0,n.promise=r?l:void 0)}return Yn.fun(a)&&kn.batchedUpdates((()=>{a(d,s,s.item)})),d})():l}function tr(e,t){$n(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var nr=class extends Error{result;constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},sr=class extends Error{result;constructor(){super("SkipAnimationSignal")}},ir=e=>e instanceof ar,rr=1,ar=class extends Ks{id=rr++;_priority=0;get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=yi(this);return e&&e.getValue()}to(...e){return qn.to(this,e)}interpolate(...e){return hi(`${ui}The "interpolate" function is deprecated in v9 (use "to" instead)`),qn.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Ys(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||hs.sort(this),Ys(this,{type:"priority",parent:this,priority:e})}},or=Symbol.for("SpringPhase"),lr=e=>(1&e[or])>0,cr=e=>(2&e[or])>0,ur=e=>(4&e[or])>0,dr=(e,t)=>t?e[or]|=3:e[or]&=-3,hr=(e,t)=>t?e[or]|=4:e[or]&=-5,pr=class extends ar{key;animation=new Yi;queue;defaultProps={};_state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_pendingCalls=new Set;_lastCallId=0;_lastToId=0;_memoizedDuration=0;constructor(e,t){if(super(),!Yn.und(e)||!Yn.und(t)){let n=Yn.obj(e)?{...e}:{...t,from:e};Yn.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(cr(this)||this._state.asyncTo)||ur(this)}get goal(){return qs(this.animation.to)}get velocity(){let e=yi(this);return e instanceof _i?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return lr(this)}get isAnimating(){return cr(this)}get isPaused(){return ur(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,s=this.animation,{config:i,toValues:r}=s,a=bi(s.to);!a&&Us(s.to)&&(r=Jn(qs(s.to))),s.values.forEach(((o,l)=>{if(o.done)return;let c=o.constructor==ji?1:a?a[l].lastPosition:r[l],u=s.immediate,d=c;if(!u){if(d=o.lastPosition,i.tension<=0)return void(o.done=!0);let t,n=o.elapsedTime+=e,r=s.fromValues[l],a=null!=o.v0?o.v0:o.v0=Yn.arr(i.velocity)?i.velocity[l]:i.velocity,h=i.precision||(r==c?.005:Math.min(1,.001*Math.abs(c-r)));if(Yn.und(i.duration))if(i.decay){let e=!0===i.decay?.998:i.decay,s=Math.exp(-(1-e)*n);d=r+a/(1-e)*(1-s),u=Math.abs(o.lastPosition-d)<=h,t=a*s}else{t=null==o.lastVelocity?a:o.lastVelocity;let n,s=i.restVelocity||h/10,l=i.clamp?0:i.bounce,p=!Yn.und(l),f=r==c?o.v0>0:r<c,m=!1,g=1,v=Math.ceil(e/g);for(let e=0;e<v&&(n=Math.abs(t)>s,n||(u=Math.abs(c-d)<=h,!u));++e){p&&(m=d==c||d>c==f,m&&(t=-t*l,d=c)),t+=(1e-6*-i.tension*(d-c)+.001*-i.friction*t)/i.mass*g,d+=t*g}}else{let s=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,o.durationProgress>0&&(o.elapsedTime=i.duration*o.durationProgress,n=o.elapsedTime+=e)),s=(i.progress||0)+n/this._memoizedDuration,s=s>1?1:s<0?0:s,o.durationProgress=s),d=r+i.easing(s)*(c-r),t=(d-o.lastPosition)/e,u=1==s}o.lastVelocity=t,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}a&&!a[l].done&&(u=!1),u?o.done=!0:t=!1,o.setValue(d,i.round)&&(n=!0)}));let o=yi(this),l=o.getValue();if(t){let e=qs(s.to);l===e&&!n||i.decay?n&&i.decay&&this._onChange(l):(o.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(l)}set(e){return kn.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(cr(this)){let{to:e,config:t}=this.animation;kn.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return Yn.und(e)?(n=this.queue||[],this.queue=[]):n=[Yn.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>Xi(this,e)))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),tr(this._state,e&&this._lastCallId),kn.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||"",{to:n,from:s}=e;n=Yn.obj(n)?n[t]:n,(null==n||Gi(n))&&(n=void 0),s=Yn.obj(s)?s[t]:s,null==s&&(s=void 0);let i={to:n,from:s};return lr(this)||(e.reverse&&([n,s]=[s,n]),s=qs(s),Yn.und(s)?yi(this)||this._set(n):this._set(s)),i}_update({...e},t){let{key:n,defaultProps:s}=this;e.default&&Object.assign(s,Di(e,((e,t)=>/^on/.test(t)?Fi(e,n):e))),xr(this,e,"onProps"),br(this,"onProps",e,this);let i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let r=this._state;return Ki(++this._lastCallId,{key:n,props:e,defaultProps:s,state:r,actions:{pause:()=>{ur(this)||(hr(this,!0),ns(r.pauseQueue),br(this,"onPause",Ji(this,fr(this,this.animation.to)),this))},resume:()=>{ur(this)&&(hr(this,!1),cr(this)&&this._resume(),ns(r.resumeQueue),br(this,"onResume",Ji(this,fr(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){let t=mr(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n($i(this));let s=!Yn.und(e.to),i=!Yn.und(e.from);if(s||i){if(!(t.callId>this._lastToId))return n($i(this));this._lastToId=t.callId}let{key:r,defaultProps:a,animation:o}=this,{to:l,from:c}=o,{to:u=l,from:d=c}=e;i&&!s&&(!t.default||Yn.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let h=!Kn(d,c);h&&(o.from=d),d=qs(d);let p=!Kn(u,l);p&&this._focus(u);let f=Gi(t.to),{config:m}=o,{decay:g,velocity:v}=m;(s||i)&&(m.velocity=0),t.config&&!f&&function(e,t,n){n&&(qi(n={...n},t),t={...n,...t}),qi(e,t),Object.assign(e,t);for(let t in Wi)null==e[t]&&(e[t]=Wi[t]);let{mass:s,frequency:i,damping:r}=e;Yn.und(i)||(i<.01&&(i=.01),r<0&&(r=0),e.tension=Math.pow(2*Math.PI/i,2)*s,e.friction=4*Math.PI*r*s/i)}(m,Ai(t.config,r),t.config!==a.config?Ai(a.config,r):void 0);let y=yi(this);if(!y||Yn.und(u))return n(Ji(this,!0));let x=Yn.und(t.reset)?i&&!t.default:!Yn.und(d)&&Ni(t.reset,r),b=x?d:this.get(),w=Hi(u),_=Yn.num(w)||Yn.arr(w)||pi(w),j=!f&&(!_||Ni(a.immediate||t.immediate,r));if(p){let e=Pi(u);if(e!==y.constructor){if(!j)throw Error(`Cannot animate between ${y.constructor.name} and ${e.name}, as the "to" prop suggests`);y=this._set(w)}}let S=y.constructor,C=Us(u),k=!1;if(!C){let e=x||!lr(this)&&h;(p||e)&&(k=Kn(Hi(b),w),C=!k),(!Kn(o.immediate,j)&&!j||!Kn(m.decay,g)||!Kn(m.velocity,v))&&(C=!0)}if(k&&cr(this)&&(o.changed&&!x?C=!0:C||this._stop(l)),!f&&((C||Us(l))&&(o.values=y.getPayload(),o.toValues=Us(u)?null:S==ji?[1]:Jn(w)),o.immediate!=j&&(o.immediate=j,!j&&!x&&this._set(l)),C)){let{onRest:e}=o;Xn(yr,(e=>xr(this,t,e)));let s=Ji(this,fr(this,l));ns(this._pendingCalls,s),this._pendingCalls.add(n),o.changed&&kn.batchedUpdates((()=>{o.changed=!x,e?.(s,this),x?Ai(a.onRest,s):o.onStart?.(s,this)}))}x&&this._set(b),f?n(er(t.to,t,this._state,this)):C?this._start():cr(this)&&!p?this._pendingCalls.add(n):n(Qi(b))}_focus(e){let t=this.animation;e!==t.to&&(Zs(this)&&this._detach(),t.to=e,Zs(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;Us(t)&&(Qs(t,this),ir(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;Us(e)&&Js(e,this)}_set(e,t=!0){let n=qs(e);if(!Yn.und(n)){let e=yi(this);if(!e||!Kn(n,e.getValue())){let s=Pi(n);e&&e.constructor==s?e.setValue(n):xi(this,s.create(n)),e&&kn.batchedUpdates((()=>{this._onChange(n,t)}))}}return yi(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,br(this,"onStart",Ji(this,fr(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Ai(this.animation.onChange,e,this)),Ai(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;yi(this).reset(qs(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),cr(this)||(dr(this,!0),ur(this)||this._resume())}_resume(){qn.skipAnimation?this.finish():hs.start(this)}_stop(e,t){if(cr(this)){dr(this,!1);let n=this.animation;Xn(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Ys(this,{type:"idle",parent:this});let s=t?$i(this.get()):Ji(this.get(),fr(this,e??n.to));ns(this._pendingCalls,s),n.changed&&(n.changed=!1,br(this,"onRest",s,this))}}};function fr(e,t){let n=Hi(t);return Kn(Hi(e.get()),n)}function mr(e,t=e.loop,n=e.to){let s=Ai(t);if(s){let i=!0!==s&&zi(s),r=(i||e).reverse,a=!i||i.reset;return gr({...e,loop:t,default:!1,pause:void 0,to:!r||Gi(n)?n:void 0,from:a?e.from:void 0,reset:a,...i})}}function gr(e){let{to:t,from:n}=e=zi(e),s=new Set;return Yn.obj(t)&&vr(t,s),Yn.obj(n)&&vr(n,s),e.keys=s.size?Array.from(s):null,e}function vr(e,t){Qn(e,((e,n)=>null!=e&&t.add(n)))}var yr=["onStart","onRest","onChange","onPause","onResume"];function xr(e,t,n){e.animation[n]=t[n]!==Mi(t,n)?Fi(t[n],e.key):void 0}function br(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var wr=["onStart","onChange","onRest"],_r=1,jr=class{id=_r++;springs={};queue=[];ref;_flush;_initialProps;_lastAsyncId=0;_active=new Set;_changed=new Set;_started=!1;_item;_state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_events={onStart:new Map,onChange:new Map,onRest:new Map};constructor(e,t){this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(let t in e){let n=e[t];Yn.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(gr(e)),this}start(e){let{queue:t}=this;return e?t=Jn(e).map(gr):this.queue=[],this._flush?this._flush(this,t):(Pr(this,t),Sr(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;Xn(Jn(t),(t=>n[t].stop(!!e)))}else tr(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Yn.und(e))this.start({pause:!0});else{let t=this.springs;Xn(Jn(e),(e=>t[e].pause()))}return this}resume(e){if(Yn.und(e))this.start({pause:!1});else{let t=this.springs;Xn(Jn(e),(e=>t[e].resume()))}return this}each(e){Qn(this.springs,e)}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,s=this._active.size>0,i=this._changed.size>0;(s&&!this._started||i&&!this._started)&&(this._started=!0,$n(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));let r=!s&&this._started,a=i||r&&n.size?this.get():null;i&&t.size&&$n(t,(([e,t])=>{t.value=a,e(t,this,this._item)})),r&&(this._started=!1,$n(n,(([e,t])=>{t.value=a,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}kn.onFrame(this._onFrame)}};function Sr(e,t){return Promise.all(t.map((t=>Cr(e,t)))).then((t=>Xi(e,t)))}async function Cr(e,t,n){let{keys:s,to:i,from:r,loop:a,onRest:o,onResolve:l}=t,c=Yn.obj(t.default)&&t.default;a&&(t.loop=!1),!1===i&&(t.to=null),!1===r&&(t.from=null);let u=Yn.arr(i)||Yn.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Xn(wr,(n=>{let s=t[n];if(Yn.fun(s)){let i=e._events[n];t[n]=({finished:e,cancelled:t})=>{let n=i.get(s);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(s,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));let d=e._state;t.pause===!d.paused?(d.paused=t.pause,ns(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);let h=(s||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),p=!0===t.cancel||!0===Mi(t,"cancel");(u||p&&d.asyncId)&&h.push(Ki(++e._lastAsyncId,{props:t,state:d,actions:{pause:Zn,resume:Zn,start(t,n){p?(tr(d,e._lastAsyncId),n($i(e))):(t.onRest=o,n(er(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));let f=Xi(e,await Promise.all(h));if(a&&f.finished&&(!n||!f.noop)){let n=mr(t,a,i);if(n)return Pr(e,[n]),Cr(e,n,!0)}return l&&kn.batchedUpdates((()=>l(f,e,e.item))),f}function kr(e,t){let n=new pr;return n.key=e,t&&Qs(n,t),n}function Er(e,t,n){t.keys&&Xn(t.keys,(s=>{(e[s]||(e[s]=n(s)))._prepareNode(t)}))}function Pr(e,t){Xn(t,(t=>{Er(e.springs,t,(t=>kr(t,e)))}))}var Ir=({children:e,...t})=>{let n=(0,Gn.useContext)(Vr),s=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=function(e,t){let[n]=(0,Gn.useState)((()=>({inputs:t,result:e()}))),s=(0,Gn.useRef)(),i=s.current,r=i;return r?Boolean(t&&r.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,r.inputs))||(r={inputs:t,result:e()}):r=n,(0,Gn.useEffect)((()=>{s.current=r,i==n&&(n.inputs=n.result=void 0)}),[r]),r.result}((()=>({pause:s,immediate:i})),[s,i]);let{Provider:r}=Vr;return Gn.createElement(r,{value:t},e)},Vr=function(e,t){return Object.assign(e,Gn.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}(Ir,{});Ir.Provider=Vr.Provider,Ir.Consumer=Vr.Consumer;var Or=class extends ar{constructor(e,t){super(),this.source=e,this.calc=Fs(...t);let n=this._get(),s=Pi(n);xi(this,s.create(n))}key;idle=!0;calc;_active=new Set;advance(e){let t=this._get();Kn(t,this.get())||(yi(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Ar(this._active)&&Nr(this)}_get(){let e=Yn.arr(this.source)?this.source.map(qs):Jn(qs(this.source));return this.calc(...e)}_start(){this.idle&&!Ar(this._active)&&(this.idle=!1,Xn(bi(this),(e=>{e.done=!1})),qn.skipAnimation?(kn.batchedUpdates((()=>this.advance())),Nr(this)):hs.start(this))}_attach(){let e=1;Xn(Jn(this.source),(t=>{Us(t)&&Qs(t,this),ir(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Xn(Jn(this.source),(e=>{Us(e)&&Js(e,this)})),this._active.clear(),Nr(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=Jn(this.source).reduce(((e,t)=>Math.max(e,(ir(t)?t.priority:0)+1)),0))}};function Tr(e){return!1!==e.idle}function Ar(e){return!e.size||Array.from(e).every(Tr)}function Nr(e){e.idle||(e.idle=!0,Xn(bi(e),(e=>{e.done=!0})),Ys(e,{type:"idle",parent:e}))}qn.assign({createStringInterpolator:ci,to:(e,t)=>new Or(e,t)});hs.advance;const Fr=window.ReactDOM;var Mr=/^--/;function Br(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Mr.test(e)||Rr.hasOwnProperty(e)&&Rr[e]?(""+t).trim():t+"px"}var Dr={};var Rr={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Lr=["Webkit","Ms","Moz","O"];Rr=Object.keys(Rr).reduce(((e,t)=>(Lr.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Rr);var zr=/^(matrix|translate|scale|rotate|skew)/,Hr=/^(translate)/,Gr=/^(rotate|skew)/,Wr=(e,t)=>Yn.num(e)&&0!==e?e+t:e,Ur=(e,t)=>Yn.arr(e)?e.every((e=>Ur(e,t))):Yn.num(e)?e===t:parseFloat(e)===t,qr=class extends Ci{constructor({x:e,y:t,z:n,...s}){let i=[],r=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),r.push((e=>[`translate3d(${e.map((e=>Wr(e,"px"))).join(",")})`,Ur(e,0)]))),Qn(s,((e,t)=>{if("transform"===t)i.push([e||""]),r.push((e=>[e,""===e]));else if(zr.test(t)){if(delete s[t],Yn.und(e))return;let n=Hr.test(t)?"px":Gr.test(t)?"deg":"";i.push(Jn(e)),r.push("rotate3d"===t?([e,t,s,i])=>[`rotate3d(${e},${t},${s},${Wr(i,n)})`,Ur(i,0)]:e=>[`${t}(${e.map((e=>Wr(e,n))).join(",")})`,Ur(e,t.startsWith("scale")?1:0)])}})),i.length&&(s.transform=new Zr(i,r)),super(s)}},Zr=class extends Ks{constructor(e,t){super(),this.inputs=e,this.transforms=t}_value=null;get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Xn(this.inputs,((n,s)=>{let i=qs(n[0]),[r,a]=this.transforms[s](Yn.arr(i)?i:n.map(qs));e+=" "+r,t=t&&a})),t?"none":e}observerAdded(e){1==e&&Xn(this.inputs,(e=>Xn(e,(e=>Us(e)&&Qs(e,this)))))}observerRemoved(e){0==e&&Xn(this.inputs,(e=>Xn(e,(e=>Us(e)&&Js(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Ys(this,e)}};qn.assign({batchedUpdates:Fr.unstable_batchedUpdates,createStringInterpolator:ci,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});var Yr=((e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new Ci(e),getComponentProps:s=e=>e}={})=>{let i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:s},r=e=>{let t=Ti(e)||"Anonymous";return(e=Yn.str(e)?r[e]||(r[e]=Ii(e,i)):e[Oi]||(e[Oi]=Ii(e,i))).displayName=`Animated(${t})`,e};return Qn(e,((t,n)=>{Yn.arr(e)&&(n=Ti(t)),r[n]=r(t)})),{animated:r}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;let n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:s,children:i,scrollTop:r,scrollLeft:a,viewBox:o,...l}=t,c=Object.values(l),u=Object.keys(l).map((t=>n||e.hasAttribute(t)?t:Dr[t]||(Dr[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==i&&(e.textContent=i);for(let t in s)if(s.hasOwnProperty(t)){let n=Br(t,s[t]);Mr.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==r&&(e.scrollTop=r),void 0!==a&&(e.scrollLeft=a),void 0!==o&&e.setAttribute("viewBox",o)},createAnimatedStyle:e=>new qr(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n});Yr.animated;var Kr=function({triggerAnimationOnChange:e}){const t=(0,h.useRef)(),{previous:n,prevRect:s}=(0,h.useMemo)((()=>{return{previous:t.current&&(e=t.current,{top:e.offsetTop,left:e.offsetLeft}),prevRect:t.current&&t.current.getBoundingClientRect()};var e}),[e]);return(0,h.useLayoutEffect)((()=>{if(!n||!t.current)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;const e=new jr({x:0,y:0,width:s.width,height:s.height,config:{duration:400,easing:Hs.easeInOutQuint},onChange({value:e}){if(!t.current)return;let{x:n,y:s,width:i,height:r}=e;n=Math.round(n),s=Math.round(s),i=Math.round(i),r=Math.round(r);const a=0===n&&0===s;t.current.style.transformOrigin="center center",t.current.style.transform=a?null:`translate3d(${n}px,${s}px,0)`,t.current.style.width=a?null:`${i}px`,t.current.style.height=a?null:`${r}px`}});t.current.style.transform=void 0;const i=t.current.getBoundingClientRect(),r=Math.round(s.left-i.left),a=Math.round(s.top-i.top),o=i.width,l=i.height;return e.start({x:0,y:0,width:o,height:l,from:{x:r,y:a,width:s.width,height:s.height}}),()=>{e.stop(),e.set({x:0,y:0,width:s.width,height:s.height})}}),[n,s]),t},Xr=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});function Qr(){return!!(0,Qt.getQueryArg)(window.location.href,"wp_theme_preview")}function Jr(){return Qr()?(0,Qt.getQueryArg)(window.location.href,"wp_theme_preview"):null}const{useLocation:$r}=ne(Lt.privateApis);function ea({className:e="edit-site-save-button__button",variant:t="primary",showTooltip:n=!0,showReviewMessage:s,icon:i,size:r,__next40pxDefaultSize:o=!1}){const{params:l}=$r(),{setIsSaveViewOpened:u}=(0,c.useDispatch)(Rt),{saveDirtyEntities:d}=ne((0,c.useDispatch)(f.store)),{dirtyEntityRecords:h}=(0,f.useEntitiesSavedStatesIsDirty)(),{isSaving:p,isSaveViewOpen:m,previewingThemeName:g}=(0,c.useSelect)((e=>{const{isSavingEntityRecord:t,isResolving:n}=e(j.store),{isSaveViewOpened:s}=e(Rt),i=n("activateTheme"),r=Jr();return{isSaving:h.some((e=>t(e.kind,e.name,e.key)))||i,isSaveViewOpen:s(),previewingThemeName:r?e(j.store).getTheme(r)?.name?.rendered:void 0}}),[h]),v=!!h.length;let y;1===h.length&&(l.postId?y=`${h[0].key}`===l.postId&&h[0].name===l.postType:l.path?.includes("wp_global_styles")&&(y="globalStyles"===h[0].name));const x=p||!v&&!Qr(),_=Qr()?p?(0,w.sprintf)((0,w.__)("Activating %s"),g):x?(0,w.__)("Saved"):v?(0,w.sprintf)((0,w.__)("Activate %s & Save"),g):(0,w.sprintf)((0,w.__)("Activate %s"),g):p?(0,w.__)("Saving"):x?(0,w.__)("Saved"):!y&&s?(0,w.sprintf)((0,w._n)("Review %d change…","Review %d changes…",h.length),h.length):(0,w.__)("Save"),S=y?()=>d({dirtyEntityRecords:h}):()=>u(!0);return(0,a.jsx)(b.Button,{variant:t,className:e,"aria-disabled":x,"aria-expanded":m,isBusy:p,onClick:x?void 0:S,label:_,shortcut:x?void 0:Xt.displayShortcut.primary("s"),showTooltip:n,icon:i,__next40pxDefaultSize:o,size:r,children:_})}function ta(){const{isDisabled:e,isSaving:t}=(0,c.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,isSavingEntityRecord:n}=e(j.store),s=t(),i=s.some((e=>n(e.kind,e.name,e.key)));return{isSaving:i,isDisabled:i||!s.length&&!Qr()}}),[]);return(0,a.jsx)(b.__experimentalHStack,{className:"edit-site-save-hub",alignment:"right",spacing:4,children:(0,a.jsx)(ea,{className:"edit-site-save-hub__button",variant:e?null:"primary",showTooltip:!1,icon:e&&!t?Xr:null,showReviewMessage:!0,__next40pxDefaultSize:!0})})}const{useHistory:na,useLocation:sa}=ne(Lt.privateApis);const ia=window.wp.apiFetch;var ra=i.n(ia);const{EntitiesSavedStatesExtensible:aa}=ne(f.privateApis),{useLocation:oa}=ne(Lt.privateApis),la=({onClose:e,renderDialog:t,variant:n})=>{const s=(0,f.useEntitiesSavedStatesIsDirty)();let i;i=s.isDirty?(0,w.__)("Activate & Save"):(0,w.__)("Activate");const r=function(){const[e,t]=(0,h.useState)();return(0,h.useEffect)((()=>{const e=(0,Qt.addQueryArgs)("/wp/v2/themes?status=active",{context:"edit",wp_theme_preview:""});ra()({path:e}).then((e=>t(e[0]))).catch((()=>{}))}),[]),e}(),o=(0,c.useSelect)((e=>e(j.store).getCurrentTheme()),[]),l=(0,a.jsx)("p",{children:(0,w.sprintf)((0,w.__)("Saving your changes will change your active theme from %1$s to %2$s."),r?.name?.rendered??"...",o?.name?.rendered??"...")}),u=function(){const e=na(),{path:t}=sa(),{startResolution:n,finishResolution:s}=(0,c.useDispatch)(j.store);return async()=>{if(Qr()){const i="themes.php?action=activate&stylesheet="+Jr()+"&_wpnonce="+window.WP_BLOCK_THEME_ACTIVATE_NONCE;n("activateTheme"),await window.fetch(i),s("activateTheme"),e.navigate((0,Qt.addQueryArgs)(t,{wp_theme_preview:""}))}}}();return(0,a.jsx)(aa,{...{...s,additionalPrompt:l,close:e,onSave:async e=>(await u(),e),saveEnabled:!0,saveLabel:i,renderDialog:t,variant:n}})},ca=({onClose:e,renderDialog:t,variant:n})=>Qr()?(0,a.jsx)(la,{onClose:e,renderDialog:t,variant:n}):(0,a.jsx)(f.EntitiesSavedStates,{close:e,renderDialog:t,variant:n});function ua(){const{query:e}=oa(),{canvas:t="view"}=e,{isSaveViewOpen:n,isDirty:s,isSaving:i}=(0,c.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,isSavingEntityRecord:n,isResolving:s}=e(j.store),i=t(),r=s("activateTheme"),{isSaveViewOpened:a}=ne(e(Rt));return{isSaveViewOpen:a(),isDirty:i.length>0,isSaving:i.some((e=>n(e.kind,e.name,e.key)))||r}}),[]),{setIsSaveViewOpened:r}=(0,c.useDispatch)(Rt),o=()=>r(!1);if((0,h.useEffect)((()=>{r(!1)}),[t,r]),"view"===t)return n?(0,a.jsx)(b.Modal,{className:"edit-site-save-panel__modal",onRequestClose:o,title:(0,w.__)("Review changes"),size:"small",children:(0,a.jsx)(ca,{onClose:o,variant:"inline"})}):null;const l=Qr()||s,u=i||!l;return(0,a.jsxs)(Wt,{className:Ht("edit-site-layout__actions",{"is-entity-save-view-open":n}),ariaLabel:(0,w.__)("Save panel"),children:[(0,a.jsx)("div",{className:Ht("edit-site-editor__toggle-save-panel",{"screen-reader-text":n}),children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"secondary",className:"edit-site-editor__toggle-save-panel-button",onClick:()=>r(!0),"aria-haspopup":"dialog",disabled:u,accessibleWhenDisabled:!0,children:(0,w.__)("Open save panel")})}),n&&(0,a.jsx)(ca,{onClose:o,renderDialog:!0})]})}const{useGlobalStyle:da}=ne(x.privateApis),{GlobalStylesProvider:ha}=ne(f.privateApis),{useLocation:pa}=ne(Lt.privateApis),fa=.3;function ma(){const{query:e,name:t,areas:n,widths:s}=pa(),{canvas:i="view"}=e,r=(0,y.useViewportMatch)("medium","<"),o=(0,h.useRef)(),l=(0,b.__unstableUseNavigateRegions)(),u=(0,y.useReducedMotion)(),[d,p]=(0,y.useResizeObserver)(),g=Sn(),[v,x]=(0,h.useState)(!1),_=Kr({triggerAnimationOnChange:t+"-"+i}),{showIconLabels:j}=(0,c.useSelect)((e=>({showIconLabels:e(m.store).get("core","showIconLabels")}))),[S]=da("color.background"),[C]=da("color.gradient"),k=(0,y.usePrevious)(i);return(0,h.useEffect)((()=>{"edit"===k&&o.current?.focus()}),[i]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.UnsavedChangesWarning,{}),"view"===i&&(0,a.jsx)(_n,{}),(0,a.jsx)("div",{...l,ref:l.ref,className:Ht("edit-site-layout",l.className,{"is-full-canvas":"edit"===i,"show-icon-labels":j}),children:(0,a.jsxs)("div",{className:"edit-site-layout__content",children:[(!r||!n.mobile)&&(0,a.jsx)(Wt,{ariaLabel:(0,w.__)("Navigation"),className:"edit-site-layout__sidebar-region",children:(0,a.jsx)(b.__unstableAnimatePresence,{children:"view"===i&&(0,a.jsxs)(b.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{type:"tween",duration:u||r?0:fa,ease:"easeOut"},className:"edit-site-layout__sidebar",children:[(0,a.jsx)(un,{ref:o,isTransparent:v}),(0,a.jsx)(rn,{children:(0,a.jsx)(an,{shouldAnimate:"styles"!==t,routeKey:t,children:(0,a.jsx)(f.ErrorBoundary,{children:n.sidebar})})}),(0,a.jsx)(ta,{}),(0,a.jsx)(ua,{})]})})}),(0,a.jsx)(f.EditorSnackbars,{}),r&&n.mobile&&(0,a.jsx)("div",{className:"edit-site-layout__mobile",children:(0,a.jsx)(rn,{children:"edit"!==i?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(dn,{ref:o,isTransparent:v}),(0,a.jsx)(an,{routeKey:t,children:(0,a.jsx)(f.ErrorBoundary,{children:n.mobile})}),(0,a.jsx)(ta,{}),(0,a.jsx)(ua,{})]}):(0,a.jsx)(f.ErrorBoundary,{children:n.mobile})})}),!r&&n.content&&"edit"!==i&&(0,a.jsx)("div",{className:"edit-site-layout__area",style:{maxWidth:s?.content},children:(0,a.jsx)(f.ErrorBoundary,{children:n.content})}),!r&&n.edit&&"edit"!==i&&(0,a.jsx)("div",{className:"edit-site-layout__area",style:{maxWidth:s?.edit},children:(0,a.jsx)(f.ErrorBoundary,{children:n.edit})}),!r&&n.preview&&(0,a.jsxs)("div",{className:"edit-site-layout__canvas-container",children:[d,!!p.width&&(0,a.jsx)("div",{className:Ht("edit-site-layout__canvas",{"is-right-aligned":v}),ref:_,children:(0,a.jsx)(f.ErrorBoundary,{children:(0,a.jsx)(xn,{isReady:!g,isFullWidth:"edit"===i,defaultSize:{width:p.width-24,height:p.height},isOversized:v,setIsOversized:x,innerContentStyle:{background:C??S},children:n.preview})})})]})]})})]})}function ga(e){const{createErrorNotice:t}=(0,c.useDispatch)(_.store);return(0,a.jsx)(b.SlotFillProvider,{children:(0,a.jsxs)(ha,{children:[(0,a.jsx)(Ut.PluginArea,{onError:function(e){t((0,w.sprintf)((0,w.__)('The "%s" plugin has encountered an error and cannot be rendered.'),e))}}),(0,a.jsx)(ma,{...e})]})})}var va=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M12 4a8 8 0 1 1 .001 16.001A8 8 0 0 1 12 4Zm0 1.5a6.5 6.5 0 1 0-.001 13.001A6.5 6.5 0 0 0 12 5.5Zm.75 11h-1.5V15h1.5v1.5Zm-.445-9.234a3 3 0 0 1 .445 5.89V14h-1.5v-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mlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"})});const{useGlobalStylesReset:wa}=ne(x.privateApis),{useHistory:_a,useLocation:ja}=ne(Lt.privateApis),Sa=()=>function(){const{openGeneralSidebar:e}=ne((0,c.useDispatch)(Rt)),{params:t}=ja(),{canvas:n="view"}=t,{set:s}=(0,c.useDispatch)(m.store),i=_a(),r=(0,c.useSelect)((e=>e(j.store).getCurrentTheme().is_block_theme),[]);return{isLoading:!1,commands:(0,h.useMemo)((()=>r?[{name:"core/edit-site/toggle-styles-welcome-guide",label:(0,w.__)("Learn about styles"),callback:({close:t})=>{t(),"edit"!==n&&i.navigate("/styles?canvas=edit",{transition:"canvas-mode-edit-transition"}),e("edit-site/global-styles"),s("core/edit-site","welcomeGuideStyles",!0),setTimeout((()=>{s("core/edit-site","welcomeGuideStyles",!0)}),500)},icon:va}]:[]),[i,e,n,r,s])}},Ca=()=>function(){const[e,t]=wa();return{isLoading:!1,commands:(0,h.useMemo)((()=>e?[{name:"core/edit-site/reset-global-styles",label:(0,w.__)("Reset styles"),icon:(0,w.isRTL)()?ya:xa,callback:({close:e})=>{e(),t()}}]:[]),[e,t])}},ka=()=>function(){const{openGeneralSidebar:e,setEditorCanvasContainerView:t}=ne((0,c.useDispatch)(Rt)),{params:n}=ja(),{canvas:s="view"}=n,i=_a(),r=(0,c.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(j.store),s=n(),i=s?t("root","globalStyles",s):void 0;return!!i?._links?.["version-history"]?.[0]?.count}),[]);return{isLoading:!1,commands:(0,h.useMemo)((()=>r?[{name:"core/edit-site/open-styles-revisions",label:(0,w.__)("Open style revisions"),icon:ba,callback:({close:n})=>{n(),"edit"!==s&&i.navigate("/styles?canvas=edit",{transition:"canvas-mode-edit-transition"}),e("edit-site/global-styles"),t("global-styles-revisions")}}]:[]),[i,e,t,r,s])}};var Ea=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})});const{EditorContentSlotFill:Pa,ResizableEditor:Ia}=ne(f.privateApis);function Va(e){switch(e){case"style-book":return(0,w.__)("Style Book");case"global-styles-revisions":case"global-styles-revisions:style-book":return(0,w.__)("Style Revisions");default:return""}}function Oa(){const e=(0,b.__experimentalUseSlotFills)(Pa.name);return!!e?.length}var Ta=function({children:e,closeButtonLabel:t,onClose:n,enableResizing:s=!1}){const{editorCanvasContainerView:i,showListViewByDefault:r}=(0,c.useSelect)((e=>({editorCanvasContainerView:ne(e(Rt)).getEditorCanvasContainerView(),showListViewByDefault:e(m.store).get("core","showListViewByDefault")})),[]),[o,l]=(0,h.useState)(!1),{setEditorCanvasContainerView:u}=ne((0,c.useDispatch)(Rt)),{setIsListViewOpened:d}=(0,c.useDispatch)(f.store),p=(0,y.useFocusOnMount)("firstElement"),g=(0,y.useFocusReturn)();function v(){d(r),u(void 0),l(!0),"function"==typeof n&&n()}const x=Array.isArray(e)?h.Children.map(e,((e,t)=>0===t?(0,h.cloneElement)(e,{ref:g}):e)):(0,h.cloneElement)(e,{ref:g});if(o)return null;const _=Va(i),j=n||t;return(0,a.jsx)(Pa.Fill,{children:(0,a.jsx)("div",{className:"edit-site-editor-canvas-container",children:(0,a.jsx)(Ia,{enableResizing:s,children:(0,a.jsxs)("section",{className:"edit-site-editor-canvas-container__section",ref:j?p:null,onKeyDown:function(e){e.keyCode!==Xt.ESCAPE||e.defaultPrevented||(e.preventDefault(),v())},"aria-label":_,children:[j&&(0,a.jsx)(b.Button,{size:"compact",className:"edit-site-editor-canvas-container__close-button",icon:Ea,label:t||(0,w.__)("Close"),onClick:v}),x]})})})})};const{useCommandContext:Aa}=ne(Kt.privateApis),{useLocation:Na}=ne(Lt.privateApis);var Fa=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z"})}),Ma=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})}),Ba=(0,a.jsxs)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,a.jsx)(Zt.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,a.jsx)(Zt.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]}),Da=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),Ra=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})}),La=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),za=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});function Ha(e){return(0,a.jsx)(b.Button,{size:"compact",...e,className:Ht("edit-site-sidebar-button",e.className)})}const{useHistory:Ga,useLocation:Wa}=ne(Lt.privateApis);function Ua({isRoot:e,title:t,actions:n,content:s,footer:i,description:r,backPath:o}){const{dashboardLink:l,dashboardLinkText:u,previewingThemeName:d}=(0,c.useSelect)((e=>{const{getSettings:t}=ne(e(Rt)),n=Jr();return{dashboardLink:t().__experimentalDashboardLink,dashboardLinkText:t().__experimentalDashboardLinkText,previewingThemeName:n?e(j.store).getTheme(n)?.name?.rendered:void 0}}),[]),p=Wa(),f=Ga(),{navigate:m}=(0,h.useContext)(tn),g=o??p.state?.backPath,v=(0,w.isRTL)()?La:za;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.__experimentalVStack,{className:Ht("edit-site-sidebar-navigation-screen__main",{"has-footer":!!i}),spacing:0,justify:"flex-start",children:[(0,a.jsxs)(b.__experimentalHStack,{spacing:3,alignment:"flex-start",className:"edit-site-sidebar-navigation-screen__title-icon",children:[!e&&(0,a.jsx)(Ha,{onClick:()=>{f.navigate(g),m("back")},icon:v,label:(0,w.__)("Back"),showTooltip:!1}),e&&(0,a.jsx)(Ha,{icon:v,label:u||(0,w.__)("Go to the Dashboard"),href:l}),(0,a.jsx)(b.__experimentalHeading,{className:"edit-site-sidebar-navigation-screen__title",color:"#e0e0e0",level:1,size:20,children:Qr()?(0,w.sprintf)((0,w.__)("Previewing %1$s: %2$s"),d,t):t}),n&&(0,a.jsx)("div",{className:"edit-site-sidebar-navigation-screen__actions",children:n})]}),(0,a.jsxs)("div",{className:"edit-site-sidebar-navigation-screen__content",children:[r&&(0,a.jsx)("div",{className:"edit-site-sidebar-navigation-screen__description",children:r}),s]})]}),i&&(0,a.jsx)("footer",{className:"edit-site-sidebar-navigation-screen__footer",children:i})]})}var qa=(0,h.forwardRef)((({icon:e,size:t=24,...n},s)=>(0,h.cloneElement)(e,{width:t,height:t,...n,ref:s}))),Za=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})}),Ya=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})});const{useHistory:Ka,useLink:Xa}=ne(Lt.privateApis);function Qa({className:e,icon:t,withChevron:n=!1,suffix:s,uid:i,to:r,onClick:o,children:l,...c}){const u=Ka(),{navigate:d}=(0,h.useContext)(tn);const p=Xa(r);return(0,a.jsx)(b.__experimentalItem,{className:Ht("edit-site-sidebar-navigation-item",{"with-suffix":!n&&s},e),id:i,onClick:function(e){o?(o(e),d("forward")):r&&(e.preventDefault(),u.navigate(r),d("forward",`[id="${i}"]`))},href:r?p.href:void 0,...c,children:(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-start",children:[t&&(0,a.jsx)(qa,{style:{fill:"currentcolor"},icon:t,size:24}),(0,a.jsx)(b.FlexBlock,{children:l}),n&&(0,a.jsx)(qa,{icon:(0,w.isRTL)()?Za:Ya,className:"edit-site-sidebar-navigation-item__drilldown-indicator",size:24}),!n&&s]})})}const Ja={per_page:-1,_fields:"id,name,avatar_urls",context:"view",capabilities:["edit_theme_options"]},$a={per_page:100,page:1},eo=[],{GlobalStylesContext:to}=ne(x.privateApis);function no({query:e}={}){const{user:t}=(0,h.useContext)(to),n={...$a,...e},{authors:s,currentUser:i,isDirty:r,revisions:a,isLoadingGlobalStylesRevisions:o,revisionsCount:l}=(0,c.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,getCurrentUser:s,getUsers:i,getRevisions:r,__experimentalGetCurrentGlobalStylesId:a,getEntityRecord:o,isResolving:l}=e(j.store),c=t(),u=s(),d=c.length>0,h=a(),p=h?o("root","globalStyles",h):void 0,f=p?._links?.["version-history"]?.[0]?.count??0,m=r("root","globalStyles",h,n)||eo;return{authors:i(Ja)||eo,currentUser:u,isDirty:d,revisions:m,isLoadingGlobalStylesRevisions:l("getRevisions",["root","globalStyles",h,n]),revisionsCount:f}}),[e]);return(0,h.useMemo)((()=>{if(!s.length||o)return{revisions:eo,hasUnsavedChanges:r,isLoading:!0,revisionsCount:l};const e=a.map((e=>({...e,author:s.find((t=>t.id===e.author))})));if(a.length){if("unsaved"!==e[0].id&&1===n.page&&(e[0].isLatest=!0),r&&t&&Object.keys(t).length>0&&i&&1===n.page){const n={id:"unsaved",styles:t?.styles,settings:t?.settings,_links:t?._links,author:{name:i?.name,avatar_urls:i?.avatar_urls},modified:new Date};e.unshift(n)}n.page===Math.ceil(l/n.per_page)&&e.push({id:"parent",styles:{},settings:{}})}return{revisions:e,hasUnsavedChanges:r,isLoading:!1,revisionsCount:l}}),[r,a,i,s,t,o])}function so({record:e,revisionsCount:t,...n}){const s={},i=e?._links?.["predecessor-version"]?.[0]?.id??null;return t=t||e?._links?.["version-history"]?.[0]?.count||0,i&&t>1&&(s.href=(0,Qt.addQueryArgs)("revision.php",{revision:e?._links["predecessor-version"][0].id}),s.as="a"),(0,a.jsx)(b.__experimentalItemGroup,{size:"large",className:"edit-site-sidebar-navigation-screen-details-footer",children:(0,a.jsx)(Qa,{icon:ba,...s,...n,children:(0,w.sprintf)((0,w._n)("%d Revision","%d Revisions",t),t)})})}const{useLocation:io,useHistory:ro}=ne(Lt.privateApis);function ao(e){const{name:t}=io();return(0,a.jsx)(Qa,{...e,"aria-current":"styles"===t})}function oo(){const e=ro(),{path:t}=io(),{revisions:n,isLoading:s,revisionsCount:i}=no(),{openGeneralSidebar:r}=(0,c.useDispatch)(Rt),{setEditorCanvasContainerView:o}=ne((0,c.useDispatch)(Rt)),{set:l}=(0,c.useDispatch)(m.store),u=(0,h.useCallback)((async()=>(e.navigate((0,Qt.addQueryArgs)(t,{canvas:"edit"}),{transition:"canvas-mode-edit-transition"}),Promise.all([l("core","distractionFree",!1),r("edit-site/global-styles")]))),[t,e,r,l]),d=(0,h.useCallback)((async()=>{await u(),o("global-styles-revisions")}),[u,o]),p=!!i&&!s;return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(Ua,{title:(0,w.__)("Design"),isRoot:!0,description:(0,w.__)("Customize the appearance of your website using the block editor."),content:(0,a.jsx)(lo,{activeItem:"styles-navigation-item"}),footer:p&&(0,a.jsx)(so,{record:n?.[0],revisionsCount:i,onClick:d})})})}function lo({isBlockBasedTheme:e=!0}){return(0,a.jsxs)(b.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-main",children:[e&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ao,{to:"/styles",uid:"global-styles-navigation-item",icon:Fa,children:(0,w.__)("Styles")}),(0,a.jsx)(Qa,{uid:"navigation-navigation-item",to:"/navigation",withChevron:!0,icon:Ma,children:(0,w.__)("Navigation")}),(0,a.jsx)(Qa,{uid:"page-navigation-item",to:"/page",withChevron:!0,icon:Ba,children:(0,w.__)("Pages")}),(0,a.jsx)(Qa,{uid:"template-navigation-item",to:"/template",withChevron:!0,icon:Da,children:(0,w.__)("Templates")})]}),!e&&(0,a.jsx)(Qa,{uid:"stylebook-navigation-item",to:"/stylebook",withChevron:!0,icon:Fa,children:(0,w.__)("Styles")}),(0,a.jsx)(Qa,{uid:"patterns-navigation-item",to:"/pattern",withChevron:!0,icon:Ra,children:(0,w.__)("Patterns")})]})}function co({customDescription:e}){const t=(0,c.useSelect)((e=>e(j.store).getCurrentTheme()?.is_block_theme),[]),{setEditorCanvasContainerView:n}=ne((0,c.useDispatch)(Rt));let s;return(0,h.useEffect)((()=>{n(void 0)}),[n]),s=e||(t?(0,w.__)("Customize the appearance of your website using the block editor."):(0,w.__)("Explore block styles and patterns to refine your site.")),(0,a.jsx)(Ua,{isRoot:!0,title:(0,w.__)("Design"),description:s,content:(0,a.jsx)(lo,{isBlockBasedTheme:t})})}function uo(){return(0,a.jsx)(b.__experimentalSpacer,{padding:3,children:(0,a.jsx)(b.Notice,{status:"warning",isDismissible:!1,children:(0,w.__)("The theme you are currently using does not support this screen.")})})}var ho=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M14 6H6v8h1.5V8.5L17 18l1-1-9.5-9.5H14V6Z"})});function po({nonAnimatedSrc:e,animatedSrc:t}){return(0,a.jsxs)("picture",{className:"edit-site-welcome-guide__image",children:[(0,a.jsx)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,a.jsx)("img",{src:t,width:"312",height:"240",alt:""})]})}function fo(){const{toggle:e}=(0,c.useDispatch)(m.store),{isActive:t,isBlockBasedTheme:n}=(0,c.useSelect)((e=>({isActive:!!e(m.store).get("core/edit-site","welcomeGuide"),isBlockBasedTheme:e(j.store).getCurrentTheme()?.is_block_theme})),[]);return t&&n?(0,a.jsx)(b.Guide,{className:"edit-site-welcome-guide guide-editor",contentLabel:(0,w.__)("Welcome to the site editor"),finishButtonText:(0,w.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuide"),pages:[{image:(0,a.jsx)(po,{nonAnimatedSrc:"https://s.w.org/images/block-editor/edit-your-site.svg?1",animatedSrc:"https://s.w.org/images/block-editor/edit-your-site.gif?1"}),content:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:(0,w.__)("Edit your site")}),(0,a.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,w.__)("Design everything on your site — from the header right down to the footer — using blocks.")}),(0,a.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,h.createInterpolateElement)((0,w.__)("Click <StylesIconImage /> to start designing your blocks, and choose your typography, layout, and colors."),{StylesIconImage:(0,a.jsx)("img",{alt:(0,w.__)("styles"),src:"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z' fill='%231E1E1E'/%3E%3C/svg%3E%0A"})})})]})}]}):null}const{interfaceStore:mo}=ne(f.privateApis);function go(){const{toggle:e}=(0,c.useDispatch)(m.store),{isActive:t,isStylesOpen:n}=(0,c.useSelect)((e=>{const t=e(mo).getActiveComplementaryArea("core");return{isActive:!!e(m.store).get("core/edit-site","welcomeGuideStyles"),isStylesOpen:"edit-site/global-styles"===t}}),[]);if(!t||!n)return null;const s=(0,w.__)("Welcome to Styles");return(0,a.jsx)(b.Guide,{className:"edit-site-welcome-guide guide-styles",contentLabel:s,finishButtonText:(0,w.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuideStyles"),pages:[{image:(0,a.jsx)(po,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.svg?1",animatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.gif?1"}),content:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:s}),(0,a.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,w.__)("Tweak your site, or give it a whole new look! Get creative — how about a new color palette for your buttons, or choosing a new font? Take a look at what you can do here.")})]})},{image:(0,a.jsx)(po,{nonAnimatedSrc:"https://s.w.org/images/block-editor/set-the-design.svg?1",animatedSrc:"https://s.w.org/images/block-editor/set-the-design.gif?1"}),content:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:(0,w.__)("Set the design")}),(0,a.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,w.__)("You can customize your site as much as you like with different colors, typography, and layouts. Or if you prefer, just leave it up to your theme to handle!")})]})},{image:(0,a.jsx)(po,{nonAnimatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.svg?1",animatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.gif?1"}),content:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:(0,w.__)("Personalize blocks")}),(0,a.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,w.__)("You can adjust your blocks to ensure a cohesive experience across your site — add your unique colors to a branded Button block, or adjust the Heading block to your preferred size.")})]})},{image:(0,a.jsx)(po,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:(0,w.__)("Learn more")}),(0,a.jsxs)("p",{className:"edit-site-welcome-guide__text",children:[(0,w.__)("New to block themes and styling your site?")," ",(0,a.jsx)(b.ExternalLink,{href:(0,w.__)("https://wordpress.org/documentation/article/styles-overview/"),children:(0,w.__)("Here’s a detailed guide to learn how to make the most of it.")})]})]})}]})}function vo(){const{toggle:e}=(0,c.useDispatch)(m.store);if(!(0,c.useSelect)((e=>{const t=!!e(m.store).get("core/edit-site","welcomeGuidePage"),n=!!e(m.store).get("core/edit-site","welcomeGuide");return t&&!n}),[]))return null;const t=(0,w.__)("Editing a page");return(0,a.jsx)(b.Guide,{className:"edit-site-welcome-guide guide-page",contentLabel:t,finishButtonText:(0,w.__)("Continue"),onFinish:()=>e("core/edit-site","welcomeGuidePage"),pages:[{image:(0,a.jsx)("video",{className:"edit-site-welcome-guide__video",autoPlay:!0,loop:!0,muted:!0,width:"312",height:"240",children:(0,a.jsx)("source",{src:"https://s.w.org/images/block-editor/editing-your-page.mp4",type:"video/mp4"})}),content:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:t}),(0,a.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,w.__)("It’s now possible to edit page content in the site editor. To customise other parts of the page like the header and footer switch to editing the template using the settings sidebar.")})]})}]})}function yo(){const{toggle:e}=(0,c.useDispatch)(m.store),{isActive:t,hasPreviousEntity:n}=(0,c.useSelect)((e=>{const{getEditorSettings:t}=e(f.store),{get:n}=e(m.store);return{isActive:n("core/edit-site","welcomeGuideTemplate"),hasPreviousEntity:!!t().onNavigateToPreviousEntityRecord}}),[]);if(!(t&&n))return null;const s=(0,w.__)("Editing a template");return(0,a.jsx)(b.Guide,{className:"edit-site-welcome-guide guide-template",contentLabel:s,finishButtonText:(0,w.__)("Continue"),onFinish:()=>e("core/edit-site","welcomeGuideTemplate"),pages:[{image:(0,a.jsx)("video",{className:"edit-site-welcome-guide__video",autoPlay:!0,loop:!0,muted:!0,width:"312",height:"240",children:(0,a.jsx)("source",{src:"https://s.w.org/images/block-editor/editing-your-template.mp4",type:"video/mp4"})}),content:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:s}),(0,a.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,w.__)("Note that the same template can be used by multiple pages, so any changes made here may affect other pages on the site. To switch back to editing the page content click the ‘Back’ button in the toolbar.")})]})}]})}function xo({postType:e}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(fo,{}),(0,a.jsx)(go,{}),"page"===e&&(0,a.jsx)(vo,{}),"wp_template"===e&&(0,a.jsx)(yo,{})]})}const{useGlobalStylesOutput:bo}=ne(x.privateApis);function wo({disableRootPadding:e}){return function(e){const[t,n]=bo(e),{getSettings:s}=(0,c.useSelect)(Rt),{updateSettings:i}=(0,c.useDispatch)(Rt);(0,h.useEffect)((()=>{if(!t||!n)return;const e=s(),r=Object.values(e.styles??[]).filter((e=>!e.isGlobalStyles));i({...e,styles:[...r,...t],__experimentalFeatures:n})}),[t,n,i,s])}(e),null}const{Theme:_o}=ne(b.privateApis),{useGlobalStyle:jo}=ne(x.privateApis);function So({id:e}){const[t]=jo("color.text"),[n]=jo("color.background"),{highlightedColors:s}=re(),i=s[0]?.color??t,{elapsed:r,total:o}=(0,c.useSelect)((e=>{const t=e(j.store).countSelectorsByStatus(),n=t.resolving??0,s=t.finished??0;return{elapsed:s,total:s+n}}),[]);return(0,a.jsx)("div",{className:"edit-site-canvas-loader",children:(0,a.jsx)(_o,{accent:i,background:n,children:(0,a.jsx)(b.ProgressBar,{id:e,max:o,value:r})})})}const{useHistory:Co}=ne(Lt.privateApis);const{useLocation:ko,useHistory:Eo}=ne(Lt.privateApis);function Po(){const{query:e}=ko(),{canvas:t="view"}=e,n=function(){const e=Co();return(0,h.useCallback)((t=>{e.navigate(`/${t.postType}/${t.postId}?canvas=edit&focusMode=true`)}),[e])}(),{settings:s}=(0,c.useSelect)((e=>{const{getSettings:t}=e(Rt);return{settings:t()}}),[]),i=function(){const e=ko(),t=(0,y.usePrevious)(e),n=Eo();return(0,h.useMemo)((()=>{const s=e.query.focusMode||e?.params?.postId&&Ne.includes(e?.params?.postType),i="edit"===t?.query.canvas;return s&&i?()=>n.back():void 0}),[e,n])}();return(0,h.useMemo)((()=>({...s,richEditingEnabled:!0,supportsTemplateMode:!0,focusMode:"view"!==t,onNavigateToEntityRecord:n,onNavigateToPreviousEntityRecord:i,isPreviewMode:"view"===t})),[s,t,n,i])}const{Fill:Io,Slot:Vo}=(0,b.createSlotFill)("PluginTemplateSettingPanel"),Oo=({children:e})=>{d()("wp.editSite.PluginTemplateSettingPanel",{since:"6.6",version:"6.8",alternative:"wp.editor.PluginDocumentSettingPanel"});return(0,c.useSelect)((e=>"wp_template"===e(f.store).getCurrentPostType()),[])?(0,a.jsx)(Io,{children:e}):null};Oo.Slot=Vo;var To=Oo,Ao=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"})}),No=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});function Fo({className:e,...t}){return(0,a.jsx)(b.Icon,{className:Ht(e,"edit-site-global-styles-icon-with-current-color"),...t})}function Mo({icon:e,children:t,...n}){return(0,a.jsxs)(b.__experimentalItem,{...n,children:[e&&(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-start",children:[(0,a.jsx)(Fo,{icon:e,size:24}),(0,a.jsx)(b.FlexItem,{children:t})]}),!e&&t]})}function Bo(e){return(0,a.jsx)(b.Navigator.Button,{as:Mo,...e})}var Do=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"m8.6 7 3.9 10.8h-1.7l-1-2.8H5.7l-1 2.8H3L6.9 7h1.7Zm-2.4 6.6h3L7.7 9.3l-1.5 4.3ZM17.691 8.879c.473 0 .88.055 1.221.165.352.1.643.264.875.495.274.253.456.572.544.957.088.374.132.83.132 1.37v4.554c0 .274.033.472.099.593.077.11.198.166.363.166.11 0 .215-.028.313-.083.11-.055.237-.137.38-.247l.165.28a3.304 3.304 0 0 1-.71.446c-.23.11-.527.165-.89.165-.352 0-.639-.055-.858-.165-.22-.11-.386-.27-.495-.479-.1-.209-.149-.468-.149-.775-.286.462-.627.814-1.023 1.056-.396.242-.858.363-1.386.363-.462 0-.858-.088-1.188-.264a1.752 1.752 0 0 1-.742-.726 2.201 2.201 0 0 1-.248-1.056c0-.484.11-.875.33-1.172.22-.308.5-.556.841-.742.352-.187.721-.341 1.106-.462.396-.132.765-.253 1.106-.363.351-.121.637-.259.857-.413.232-.154.347-.357.347-.61V10.81c0-.396-.066-.71-.198-.941a1.05 1.05 0 0 0-.511-.511 1.763 1.763 0 0 0-.76-.149c-.253 0-.522.039-.808.116a1.165 1.165 0 0 0-.677.412 1.1 1.1 0 0 1 .595.396c.165.187.247.424.247.71 0 .307-.104.55-.313.726-.198.176-.451.263-.76.263-.34 0-.594-.104-.758-.313a1.231 1.231 0 0 1-.248-.759c0-.297.072-.539.214-.726.154-.187.352-.363.595-.528.264-.176.6-.324 1.006-.445.418-.121.88-.182 1.386-.182Zm.99 3.729a1.57 1.57 0 0 1-.528.462c-.231.121-.479.248-.742.38a5.377 5.377 0 0 0-.76.462c-.23.165-.423.38-.577.643-.154.264-.231.6-.231 1.007 0 .429.11.77.33 1.023.22.242.517.363.891.363.308 0 .594-.088.858-.264.275-.176.528-.44.759-.792v-3.284Z"})}),Ro=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z"})}),Lo=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.53 4.47a.75.75 0 1 0-1.06 1.06l8 8a.75.75 0 1 0 1.06-1.06l-8-8Zm5 1a.75.75 0 1 0-1.06 1.06l2 2a.75.75 0 1 0 1.06-1.06l-2-2Zm-11.06 10a.75.75 0 0 1 1.06 0l2 2a.75.75 0 1 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06Zm.06-5a.75.75 0 0 0-1.06 1.06l8 8a.75.75 0 1 0 1.06-1.06l-8-8Zm-.06-3a.75.75 0 0 1 1.06 0l10 10a.75.75 0 1 1-1.06 1.06l-10-10a.75.75 0 0 1 0-1.06Zm3.06-2a.75.75 0 0 0-1.06 1.06l10 10a.75.75 0 1 0 1.06-1.06l-10-10Z"})}),zo=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6.5c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12.8 3h-1.5v3h1.5V3zm-1.6 18h1.5v-3h-1.5v3zm6.8-9.8v1.5h3v-1.5h-3zm-12 0H3v1.5h3v-1.5zm9.7 5.6 2.1 2.1 1.1-1.1-2.1-2.1-1.1 1.1zM8.3 7.2 6.2 5.1 5.1 6.2l2.1 2.1 1.1-1.1zM5.1 17.8l1.1 1.1 2.1-2.1-1.1-1.1-2.1 2.1zM18.9 6.2l-1.1-1.1-2.1 2.1 1.1 1.1 2.1-2.1z"})});const{useHasDimensionsPanel:Ho,useHasTypographyPanel:Go,useHasColorPanel:Wo,useGlobalSetting:Uo,useSettingsForBlockElement:qo,useHasBackgroundPanel:Zo}=ne(x.privateApis);var Yo=function(){const[e]=Uo(""),t=qo(e),n=Zo(e),s=Go(t),i=Wo(t),r=Ho(t);return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(b.__experimentalItemGroup,{children:[s&&(0,a.jsx)(Bo,{icon:Do,path:"/typography",children:(0,w.__)("Typography")}),i&&(0,a.jsx)(Bo,{icon:Ro,path:"/colors",children:(0,w.__)("Colors")}),n&&(0,a.jsx)(Bo,{icon:Lo,path:"/background","aria-label":(0,w.__)("Background styles"),children:(0,w.__)("Background")}),(0,a.jsx)(Bo,{icon:zo,path:"/shadows",children:(0,w.__)("Shadows")}),r&&(0,a.jsx)(Bo,{icon:Da,path:"/layout",children:(0,w.__)("Layout")})]})})};function Ko(e){const t=/^(?!generic\([ a-zA-Z\-]+\)$)(?!^[a-zA-Z\-]+$).+/,n=e.trim(),s=e=>(e=e.trim()).match(t)?`"${e=e.replace(/^["']|["']$/g,"")}"`:e;return n.includes(",")?n.split(",").map(s).filter((e=>""!==e)).join(", "):s(n)}function Xo(e){if(!e)return"";let t=e.trim();return t.includes(",")&&(t=t.split(",").find((e=>""!==e.trim())).trim()),t=t.replace(/^["']|["']$/g,""),window.navigator.userAgent.toLowerCase().includes("firefox")&&(t=`"${t}"`),t}function Qo(e){const t={fontFamily:Ko(e.fontFamily)};if(!Array.isArray(e.fontFace))return t.fontWeight="400",t.fontStyle="normal",t;if(e.fontFace){const i=e.fontFace.filter((e=>e?.fontStyle&&"normal"===e.fontStyle.toLowerCase()));if(i.length>0){t.fontStyle="normal";const e=function(e){const t=[];return e.forEach((e=>{const n=String(e.fontWeight).split(" ");if(2===n.length){const e=parseInt(n[0]),s=parseInt(n[1]);for(let n=e;n<=s;n+=100)t.push(n)}else 1===n.length&&t.push(parseInt(n[0]))})),t}(i),r=(n=400,0===(s=e).length?null:(s.sort(((e,t)=>Math.abs(n-e)-Math.abs(n-t))),s[0]));t.fontWeight=String(r)||"400"}else t.fontStyle=e.fontFace.length&&e.fontFace[0].fontStyle||"normal",t.fontWeight=e.fontFace.length&&String(e.fontFace[0].fontWeight)||"400"}var n,s;return t}function Jo(e){return e?`is-style-${e}`:""}function $o(e,t){const n=new RegExp(`^${t}([\\d]+)$`);return e.reduce(((e,t)=>{if("string"==typeof t?.slug){const s=t?.slug.match(n);if(s){const t=parseInt(s[1],10);if(t>e)return t}}return e}),0)+1}function el(e,t){if(!Array.isArray(e)||!t)return null;const n=t.replace("var(","").replace(")",""),s=n?.split("--").slice(-1)[0];return e.find((e=>e.slug===s))}const{useGlobalStyle:tl,GlobalStylesContext:nl}=ne(x.privateApis),{mergeBaseAndUserConfigs:sl}=ne(f.privateApis);function il({fontSize:e,variation:t}){const{base:n}=(0,h.useContext)(nl);let s=n;t&&(s=sl(n,t));const[i]=tl("color.text"),[r,o]=function(e){const t=e?.settings?.typography?.fontFamilies?.theme,n=e?.settings?.typography?.fontFamilies?.custom;let s=[];t&&n?s=[...t,...n]:t?s=t:n&&(s=n);const i=e?.styles?.typography?.fontFamily,r=el(s,i),a=e?.styles?.elements?.heading?.typography?.fontFamily;let o;return o=a?el(s,e?.styles?.elements?.heading?.typography?.fontFamily):r,[r,o]}(s),l=r?Qo(r):{},c=o?Qo(o):{};return i&&(l.color=i,c.color=i),e&&(l.fontSize=e,c.fontSize=e),(0,a.jsxs)(b.__unstableMotion.div,{animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"},style:{textAlign:"center",lineHeight:1},children:[(0,a.jsx)("span",{style:c,children:(0,w._x)("A","Uppercase letter A")}),(0,a.jsx)("span",{style:l,children:(0,w._x)("a","Lowercase letter A")})]})}function rl({normalizedColorSwatchSize:e,ratio:t}){const{highlightedColors:n}=re(),s=e*t;return n.map((({slug:e,color:t},n)=>(0,a.jsx)(b.__unstableMotion.div,{style:{height:s,width:s,background:t,borderRadius:s/2},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:1===n?.2:.1}},`${e}-${n}`)))}const{useGlobalStyle:al}=ne(x.privateApis),ol={leading:!0,trailing:!0};function ll({children:e,label:t,isFocused:n,withHoverView:s}){const[i="white"]=al("color.background"),[r]=al("color.gradient"),o=(0,y.useReducedMotion)(),[l,c]=(0,h.useState)(!1),[u,{width:d}]=(0,y.useResizeObserver)(),[p,f]=(0,h.useState)(d),[m,g]=(0,h.useState)(),v=(0,y.useThrottle)(f,250,ol);(0,h.useLayoutEffect)((()=>{d&&v(d)}),[d,v]),(0,h.useLayoutEffect)((()=>{const e=p?p/248:1,t=e-(m||0);!(Math.abs(t)>.1)&&m||g(e)}),[p,m]);const x=m||(d?d/248:1),w=!!d;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{style:{position:"relative"},children:u}),w&&(0,a.jsx)("div",{className:"edit-site-global-styles-preview__wrapper",style:{height:152*x},onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),tabIndex:-1,children:(0,a.jsx)(b.__unstableMotion.div,{style:{height:152*x,width:"100%",background:r??i,cursor:s?"pointer":void 0},initial:"start",animate:(l||n)&&!o&&t?"hover":"start",children:[].concat(e).map(((e,t)=>e({ratio:x,key:t})))})})]})}const{useGlobalStyle:cl}=ne(x.privateApis),ul={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},dl={hover:{opacity:1},start:{opacity:.5}},hl={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}};var pl=({label:e,isFocused:t,withHoverView:n,variation:s})=>{const[i]=cl("typography.fontWeight"),[r="serif"]=cl("typography.fontFamily"),[o=r]=cl("elements.h1.typography.fontFamily"),[l=i]=cl("elements.h1.typography.fontWeight"),[c="black"]=cl("color.text"),[u=c]=cl("elements.h1.color.text"),{paletteColors:d}=re();return(0,a.jsxs)(ll,{label:e,isFocused:t,withHoverView:n,children:[({ratio:e,key:t})=>(0,a.jsx)(b.__unstableMotion.div,{variants:ul,style:{height:"100%",overflow:"hidden"},children:(0,a.jsxs)(b.__experimentalHStack,{spacing:10*e,justify:"center",style:{height:"100%",overflow:"hidden"},children:[(0,a.jsx)(il,{fontSize:65*e,variation:s}),(0,a.jsx)(b.__experimentalVStack,{spacing:4*e,children:(0,a.jsx)(rl,{normalizedColorSwatchSize:32,ratio:e})})]})},t),({key:e})=>(0,a.jsx)(b.__unstableMotion.div,{variants:n&&dl,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1},children:(0,a.jsx)(b.__experimentalHStack,{spacing:0,justify:"flex-start",style:{height:"100%",overflow:"hidden"},children:d.slice(0,4).map((({color:e},t)=>(0,a.jsx)("div",{style:{height:"100%",background:e,flexGrow:1}},t)))})},e),({ratio:t,key:n})=>(0,a.jsx)(b.__unstableMotion.div,{variants:hl,style:{height:"100%",width:"100%",overflow:"hidden",position:"absolute",top:0},children:(0,a.jsx)(b.__experimentalVStack,{spacing:3*t,justify:"center",style:{height:"100%",overflow:"hidden",padding:10*t,boxSizing:"border-box"},children:e&&(0,a.jsx)("div",{style:{fontSize:40*t,fontFamily:o,color:u,fontWeight:l,lineHeight:"1em",textAlign:"center"},children:e})})},n)]})};var fl=function(){const e=(0,c.useSelect)((e=>{const{__experimentalGetCurrentThemeGlobalStylesVariations:t}=e(j.store);return!!t()?.length}),[]);return(0,a.jsxs)(b.Card,{size:"small",isBorderless:!0,className:"edit-site-global-styles-screen-root",isRounded:!1,children:[(0,a.jsx)(b.CardBody,{children:(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsx)(b.Card,{className:"edit-site-global-styles-screen-root__active-style-tile",children:(0,a.jsx)(b.CardMedia,{className:"edit-site-global-styles-screen-root__active-style-tile-preview",children:(0,a.jsx)(pl,{})})}),e&&(0,a.jsx)(b.__experimentalItemGroup,{children:(0,a.jsx)(Bo,{path:"/variations",children:(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsx)(b.FlexItem,{children:(0,w.__)("Browse styles")}),(0,a.jsx)(Fo,{icon:(0,w.isRTL)()?za:La})]})})}),(0,a.jsx)(Yo,{})]})}),(0,a.jsx)(b.CardDivider,{}),(0,a.jsxs)(b.CardBody,{children:[(0,a.jsx)(b.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:2,children:(0,w.__)("Customize the appearance of specific blocks for the whole site.")}),(0,a.jsx)(b.__experimentalItemGroup,{children:(0,a.jsx)(Bo,{path:"/blocks",children:(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsx)(b.FlexItem,{children:(0,w.__)("Blocks")}),(0,a.jsx)(Fo,{icon:(0,w.isRTL)()?za:La})]})})})]})]})};const ml=window.wp.a11y,{useGlobalStyle:gl}=ne(x.privateApis);function vl(e){const t=(0,c.useSelect)((t=>{const{getBlockStyles:n}=t(o.store);return n(e)}),[e]),[n]=gl("variations",e);return function(e,t){return e?.filter((e=>"block"===e.source||t.includes(e.name)))}(t,Object.keys(n??{}))}function yl({name:e}){const t=vl(e);return(0,a.jsx)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map(((t,n)=>t?.isDefault?null:(0,a.jsx)(Bo,{path:"/blocks/"+encodeURIComponent(e)+"/variations/"+encodeURIComponent(t.name),children:t.label},n)))})}var xl=function({title:e,description:t,onBack:n}){return(0,a.jsxs)(b.__experimentalVStack,{spacing:0,children:[(0,a.jsx)(b.__experimentalView,{children:(0,a.jsx)(b.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,a.jsxs)(b.__experimentalHStack,{spacing:2,children:[(0,a.jsx)(b.Navigator.BackButton,{icon:(0,w.isRTL)()?La:za,size:"small",label:(0,w.__)("Back"),onClick:n}),(0,a.jsx)(b.__experimentalSpacer,{children:(0,a.jsx)(b.__experimentalHeading,{className:"edit-site-global-styles-header",level:2,size:13,children:e})})]})})}),t&&(0,a.jsx)("p",{className:"edit-site-global-styles-header__description",children:t})]})};const{useHasDimensionsPanel:bl,useHasTypographyPanel:wl,useHasBorderPanel:_l,useGlobalSetting:jl,useSettingsForBlockElement:Sl,useHasColorPanel:Cl}=ne(x.privateApis);function kl(e){const[t]=jl("",e),n=Sl(t,e),s=wl(n),i=Cl(n),r=_l(n),a=bl(n),o=r||a,l=!!vl(e)?.length;return s||i||o||l}function El({block:e}){return kl(e.name)?(0,a.jsx)(Bo,{path:"/blocks/"+encodeURIComponent(e.name),children:(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-start",children:[(0,a.jsx)(x.BlockIcon,{icon:e.icon}),(0,a.jsx)(b.FlexItem,{children:e.title})]})}):null}const Pl=(0,h.memo)((function({filterValue:e}){const t=function(){const e=(0,c.useSelect)((e=>e(o.store).getBlockTypes()),[]),{core:t,noncore:n}=e.reduce(((e,t)=>{const{core:n,noncore:s}=e;return(t.name.startsWith("core/")?n:s).push(t),e}),{core:[],noncore:[]});return[...t,...n]}(),n=(0,y.useDebounce)(ml.speak,500),{isMatchingSearchTerm:s}=(0,c.useSelect)(o.store),i=e?t.filter((t=>s(t,e))):t,r=(0,h.useRef)();return(0,h.useEffect)((()=>{if(!e)return;const t=r.current.childElementCount,s=(0,w.sprintf)((0,w._n)("%d result found.","%d results found.",t),t);n(s,t)}),[e,n]),(0,a.jsx)("div",{ref:r,className:"edit-site-block-types-item-list",role:"list",children:0===i.length?(0,a.jsx)(b.__experimentalText,{align:"center",as:"p",children:(0,w.__)("No blocks found.")}):i.map((e=>(0,a.jsx)(El,{block:e},"menu-itemblock-"+e.name)))})}));var Il=function(){const[e,t]=(0,h.useState)(""),n=(0,h.useDeferredValue)(e);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Blocks"),description:(0,w.__)("Customize the appearance of specific blocks and for the whole site.")}),(0,a.jsx)(b.SearchControl,{__nextHasNoMarginBottom:!0,className:"edit-site-block-types-search",onChange:t,value:e,label:(0,w.__)("Search"),placeholder:(0,w.__)("Search")}),(0,a.jsx)(Pl,{filterValue:n})]})};var Vl=({name:e,variation:t=""})=>{const n=(0,o.getBlockType)(e)?.example,s=(0,h.useMemo)((()=>{if(!n)return null;const s={...n,attributes:{...n.attributes,style:void 0,className:t?Jo(t):n.attributes?.className}};return(0,o.getBlockFromExample)(e,s)}),[e,n,t]),i=n?.viewportWidth??500,r=144,l=235/i,c=0!==l&&l<1?r/l:r;return n?(0,a.jsx)(b.__experimentalSpacer,{marginX:4,marginBottom:4,children:(0,a.jsx)("div",{className:"edit-site-global-styles__block-preview-panel",style:{maxHeight:r,boxSizing:"initial"},children:(0,a.jsx)(x.BlockPreview,{blocks:s,viewportWidth:i,minHeight:r,additionalStyles:[{css:`\n\t\t\t\t\t\t\t\tbody{\n\t\t\t\t\t\t\t\t\tpadding: 24px;\n\t\t\t\t\t\t\t\t\tmin-height:${Math.round(c)}px;\n\t\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\t\talign-items:center;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.is-root-container { width: 100%; }\n\t\t\t\t\t\t\t`}]})})}):null};var Ol=function({children:e,level:t}){return(0,a.jsx)(b.__experimentalHeading,{className:"edit-site-global-styles-subtitle",level:t??2,children:e})};const Tl={backgroundSize:"cover",backgroundPosition:"50% 50%"};function Al(e){if(!e)return e;const t=e.color||e.width;return!e.style&&t?{...e,style:"solid"}:!e.style||t?e:void 0}const{useHasDimensionsPanel:Nl,useHasTypographyPanel:Fl,useHasBorderPanel:Ml,useGlobalSetting:Bl,useSettingsForBlockElement:Dl,useHasColorPanel:Rl,useHasFiltersPanel:Ll,useHasImageSettingsPanel:zl,useGlobalStyle:Hl,useHasBackgroundPanel:Gl,BackgroundPanel:Wl,BorderPanel:Ul,ColorPanel:ql,TypographyPanel:Zl,DimensionsPanel:Yl,FiltersPanel:Kl,ImageSettingsPanel:Xl,AdvancedPanel:Ql}=ne(x.privateApis);var Jl=function({name:e,variation:t}){let n=[];t&&(n=["variations",t].concat(n));const s=n.join("."),[i]=Hl(s,e,"user",{shouldDecodeEncode:!1}),[r,l]=Hl(s,e,"all",{shouldDecodeEncode:!1}),[u]=Bl("",e,"user"),[d,p]=Bl("",e),f=Dl(d,e),m=(0,o.getBlockType)(e);let g=!1;f?.spacing?.blockGap&&m?.supports?.spacing?.blockGap&&(!0===m?.supports?.spacing?.__experimentalSkipSerialization||m?.supports?.spacing?.__experimentalSkipSerialization?.some?.((e=>"blockGap"===e)))&&(g=!0);let v=!1;f?.dimensions?.aspectRatio&&"core/group"===e&&(v=!0);const y=(0,h.useMemo)((()=>{const e=structuredClone(f);return g&&(e.spacing.blockGap=!1),v&&(e.dimensions.aspectRatio=!1),e}),[f,g,v]),x=vl(e),_=Gl(y),S=Fl(y),C=Rl(y),k=Ml(y),E=Nl(y),P=Ll(y),I=zl(e,u,y),V=!!x?.length&&!t,{canEditCSS:O}=(0,c.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(j.store),s=n(),i=s?t("root","globalStyles",s):void 0;return{canEditCSS:!!i?._links?.["wp:action-edit-css"]}}),[]),T=t?x.find((e=>e.name===t)):null,A=(0,h.useMemo)((()=>({...r,layout:y.layout})),[r,y.layout]),N=(0,h.useMemo)((()=>({...i,layout:u.layout})),[i,u.layout]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:t?T?.label:m.title}),(0,a.jsx)(Vl,{name:e,variation:t}),V&&(0,a.jsx)("div",{className:"edit-site-global-styles-screen-variations",children:(0,a.jsxs)(b.__experimentalVStack,{spacing:3,children:[(0,a.jsx)(Ol,{children:(0,w.__)("Style Variations")}),(0,a.jsx)(yl,{name:e})]})}),C&&(0,a.jsx)(ql,{inheritedValue:r,value:i,onChange:l,settings:y}),_&&(0,a.jsx)(Wl,{inheritedValue:r,value:i,onChange:l,settings:y,defaultValues:Tl}),S&&(0,a.jsx)(Zl,{inheritedValue:r,value:i,onChange:l,settings:y}),E&&(0,a.jsx)(Yl,{inheritedValue:A,value:N,onChange:e=>{const t={...e};delete t.layout,l(t),e.layout!==u.layout&&p({...u,layout:e.layout})},settings:y,includeLayoutControls:!0}),k&&(0,a.jsx)(Ul,{inheritedValue:r,value:i,onChange:e=>{if(!e?.border)return void l(e);const{radius:t,...n}=e.border,s=function(e){return e?(0,b.__experimentalHasSplitBorders)(e)?{top:Al(e.top),right:Al(e.right),bottom:Al(e.bottom),left:Al(e.left)}:Al(e):e}(n),i=(0,b.__experimentalHasSplitBorders)(s)?{color:null,style:null,width:null,...s}:{top:s,right:s,bottom:s,left:s};l({...e,border:{...i,radius:t}})},settings:y}),P&&(0,a.jsx)(Kl,{inheritedValue:A,value:N,onChange:l,settings:y,includeLayoutControls:!0}),I&&(0,a.jsx)(Xl,{onChange:e=>{p(void 0===e?{...d,lightbox:void 0}:{...d,lightbox:{...d.lightbox,...e}})},value:u,inheritedValue:y}),O&&(0,a.jsxs)(b.PanelBody,{title:(0,w.__)("Advanced"),initialOpen:!1,children:[(0,a.jsx)("p",{children:(0,w.sprintf)((0,w.__)("Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value."),m?.title)}),(0,a.jsx)(Ql,{value:i,onChange:l,inheritedValue:r})]})]})};const{useGlobalStyle:$l}=ne(x.privateApis);function ec({parentMenu:e,element:t,label:n}){const s="text"!==t&&t?`elements.${t}.`:"",i="link"===t?{textDecoration:"underline"}:{},[r]=$l(s+"typography.fontFamily"),[o]=$l(s+"typography.fontStyle"),[l]=$l(s+"typography.fontWeight"),[c]=$l(s+"color.background"),[u]=$l("color.background"),[d]=$l(s+"color.gradient"),[h]=$l(s+"color.text");return(0,a.jsx)(Bo,{path:e+"/typography/"+t,children:(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-start",children:[(0,a.jsx)(b.FlexItem,{className:"edit-site-global-styles-screen-typography__indicator",style:{fontFamily:r??"serif",background:d??c??u,color:h,fontStyle:o,fontWeight:l,...i},"aria-hidden":"true",children:(0,w.__)("Aa")}),(0,a.jsx)(b.FlexItem,{children:n})]})})}var tc=function(){return(0,a.jsxs)(b.__experimentalVStack,{spacing:3,children:[(0,a.jsx)(Ol,{level:3,children:(0,w.__)("Elements")}),(0,a.jsxs)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:[(0,a.jsx)(ec,{parentMenu:"",element:"text",label:(0,w.__)("Text")}),(0,a.jsx)(ec,{parentMenu:"",element:"link",label:(0,w.__)("Links")}),(0,a.jsx)(ec,{parentMenu:"",element:"heading",label:(0,w.__)("Headings")}),(0,a.jsx)(ec,{parentMenu:"",element:"caption",label:(0,w.__)("Captions")}),(0,a.jsx)(ec,{parentMenu:"",element:"button",label:(0,w.__)("Buttons")})]})]})};var nc=({variation:e,isFocused:t,withHoverView:n})=>(0,a.jsx)(ll,{label:e.title,isFocused:t,withHoverView:n,children:({ratio:t,key:n})=>(0,a.jsx)(b.__experimentalHStack,{spacing:10*t,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,a.jsx)(il,{variation:e,fontSize:85*t})},n)});const sc=[],{GlobalStylesContext:ic,areGlobalStyleConfigsEqual:rc}=ne(x.privateApis),{mergeBaseAndUserConfigs:ac}=ne(f.privateApis);function oc(e,t){if(!t?.length)return e;if("object"!=typeof e||!e||!Object.keys(e).length)return e;for(const n in e)t.includes(n)?delete e[n]:"object"==typeof e[n]&&oc(e[n],t);return e}function lc({title:e,settings:t,styles:n}){return e===(0,w.__)("Default")||Object.keys(t).length>0||Object.keys(n).length>0}function cc(e=[]){const{variationsFromTheme:t}=(0,c.useSelect)((e=>({variationsFromTheme:e(j.store).__experimentalGetCurrentThemeGlobalStylesVariations()||sc})),[]),{user:n}=(0,h.useContext)(ic),s=e.toString();return(0,h.useMemo)((()=>{const s=oc(structuredClone(n),e);s.title=(0,w.__)("Default");const i=t.filter((t=>dc(t,e))).map((e=>ac(s,e))),r=[s,...i];return r?.length?r.filter(lc):[]}),[s,n,t])}const uc=(e,t)=>{if(!e||!t?.length)return{};const n={};return Object.keys(e).forEach((s=>{if(t.includes(s))n[s]=e[s];else if("object"==typeof e[s]){const i=uc(e[s],t);Object.keys(i).length&&(n[s]=i)}})),n};function dc(e,t){const n=uc(structuredClone(e),t);return rc(n,e)}const{mergeBaseAndUserConfigs:hc}=ne(f.privateApis),{GlobalStylesContext:pc,areGlobalStyleConfigsEqual:fc}=ne(x.privateApis);function mc({variation:e,children:t,isPill:n,properties:s,showTooltip:i}){const[r,o]=(0,h.useState)(!1),{base:l,user:c,setUserConfig:u}=(0,h.useContext)(pc),d=(0,h.useMemo)((()=>{let t=hc(l,e);return s&&(t=uc(t,s)),{user:e,base:l,merged:t,setUserConfig:()=>{}}}),[e,l,s]),p=()=>u(e),f=(0,h.useMemo)((()=>fc(c,e)),[c,e]);let m=e?.title;e?.description&&(m=(0,w.sprintf)((0,w._x)("%1$s (%2$s)","variation label"),e?.title,e?.description));const g=(0,a.jsx)("div",{className:Ht("edit-site-global-styles-variations_item",{"is-active":f}),role:"button",onClick:p,onKeyDown:e=>{e.keyCode===Xt.ENTER&&(e.preventDefault(),p())},tabIndex:"0","aria-label":m,"aria-current":f,onFocus:()=>o(!0),onBlur:()=>o(!1),children:(0,a.jsx)("div",{className:Ht("edit-site-global-styles-variations_item-preview",{"is-pill":n}),children:t(r)})});return(0,a.jsx)(pc.Provider,{value:d,children:i?(0,a.jsx)(b.Tooltip,{text:e?.title,children:g}):g})}function gc({title:e,gap:t=2}){const n=["typography"],s=cc(n);return s?.length<=1?null:(0,a.jsxs)(b.__experimentalVStack,{spacing:3,children:[e&&(0,a.jsx)(Ol,{level:3,children:e}),(0,a.jsx)(b.__experimentalGrid,{columns:3,gap:t,className:"edit-site-global-styles-style-variations-container",children:s.map(((e,t)=>(0,a.jsx)(mc,{variation:e,properties:n,showTooltip:!0,children:()=>(0,a.jsx)(nc,{variation:e})},t)))})]})}var vc=function(){return(0,a.jsxs)(b.__experimentalVStack,{spacing:2,children:[(0,a.jsx)(b.__experimentalHStack,{justify:"space-between",children:(0,a.jsx)(Ol,{level:3,children:(0,w.__)("Font Sizes")})}),(0,a.jsx)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,a.jsx)(Bo,{path:"/typography/font-sizes",children:(0,a.jsxs)(b.__experimentalHStack,{direction:"row",children:[(0,a.jsx)(b.FlexItem,{children:(0,w.__)("Font size presets")}),(0,a.jsx)(qa,{icon:(0,w.isRTL)()?za:La})]})})})]})},yc=(0,a.jsxs)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,a.jsx)(Zt.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,a.jsx)(Zt.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]});const xc="/wp/v2/font-families",bc="/wp/v2/font-collections";async function wc(e){const t={path:xc,method:"POST",body:e},n=await ra()(t);return{id:n.id,...n.font_family_settings,fontFace:[]}}async function _c(e,t){const n={path:`${xc}/${e}/font-faces`,method:"POST",body:t},s=await ra()(n);return{id:s.id,...s.font_face_settings}}async function jc(e){const t={path:`${xc}?slug=${e}&_embed=true`,method:"GET"},n=await ra()(t);if(!n||0===n.length)return null;const s=n[0];return{id:s.id,...s.font_family_settings,fontFace:s?._embedded?.font_faces.map((e=>e.font_face_settings))||[]}}async function Sc(e){const t={path:`${xc}/${e}?force=true`,method:"DELETE"};return await ra()(t)}const Cc=["otf","ttf","woff","woff2"],kc={100:(0,w._x)("Thin","font weight"),200:(0,w._x)("Extra-light","font weight"),300:(0,w._x)("Light","font weight"),400:(0,w._x)("Normal","font weight"),500:(0,w._x)("Medium","font weight"),600:(0,w._x)("Semi-bold","font weight"),700:(0,w._x)("Bold","font weight"),800:(0,w._x)("Extra-bold","font weight"),900:(0,w._x)("Black","font weight")},Ec={normal:(0,w._x)("Normal","font style"),italic:(0,w._x)("Italic","font style")},{File:Pc}=window,{kebabCase:Ic}=ne(b.privateApis);function Vc(e,t={}){return e.name||!e.fontFamily&&!e.slug||(e.name=e.fontFamily||e.slug),{...e,...t}}function Oc(e){return`${kc[e.fontWeight]||e.fontWeight} ${"normal"===e.fontStyle?"":Ec[e.fontStyle]||e.fontStyle}`}function Tc(e=[],t=[]){const n=new Map;for(const t of e)n.set(`${t.fontWeight}${t.fontStyle}`,t);for(const e of t)n.set(`${e.fontWeight}${e.fontStyle}`,e);return Array.from(n.values())}function Ac(e=[],t=[]){const n=new Map;for(const t of e)n.set(t.slug,{...t});for(const e of t)if(n.has(e.slug)){const{fontFace:t,...s}=e,i=Tc(n.get(e.slug).fontFace,t);n.set(e.slug,{...s,fontFace:i})}else n.set(e.slug,{...e});return Array.from(n.values())}async function Nc(e,t,n="all"){let s;if("string"==typeof t)s=`url(${t})`;else{if(!(t instanceof Pc))return;s=await t.arrayBuffer()}const i=new window.FontFace(Xo(e.fontFamily),s,{style:e.fontStyle,weight:e.fontWeight}),r=await i.load();if("document"!==n&&"all"!==n||document.fonts.add(r),"iframe"===n||"all"===n){document.querySelector('iframe[name="editor-canvas"]').contentDocument.fonts.add(r)}}function Fc(e,t="all"){const n=t=>{t.forEach((n=>{n.family===Xo(e?.fontFamily)&&n.weight===e?.fontWeight&&n.style===e?.fontStyle&&t.delete(n)}))};if("document"!==t&&"all"!==t||n(document.fonts),"iframe"===t||"all"===t){n(document.querySelector('iframe[name="editor-canvas"]').contentDocument.fonts)}}function Mc(e){if(!e)return;let t;var n;return t=Array.isArray(e)?e[0]:e,t.startsWith("file:.")?void 0:(("string"!=typeof(n=t)||n===decodeURIComponent(n))&&(t=encodeURI(t)),t)}function Bc(e){const t=new FormData,{fontFace:n,category:s,...i}=e,r={...i,slug:Ic(e.slug)};return t.append("font_family_settings",JSON.stringify(r)),t}function Dc(e){if(e?.fontFace){return e.fontFace.map(((e,t)=>{const n={...e},s=new FormData;if(n.file){const e=Array.isArray(n.file)?n.file:[n.file],i=[];e.forEach(((e,n)=>{const r=`file-${t}-${n}`;s.append(r,e,e.name),i.push(r)})),n.src=1===i.length?i[0]:i,delete n.file,s.append("font_face_settings",JSON.stringify(n))}else s.append("font_face_settings",JSON.stringify(n));return s}))}}async function Rc(e,t){const n=[];for(const s of t)try{const t=await _c(e,s);n.push({status:"fulfilled",value:t})}catch(e){n.push({status:"rejected",reason:e})}const s={errors:[],successes:[]};return n.forEach(((e,n)=>{if("fulfilled"===e.status){const i=e.value;i.id?s.successes.push(i):s.errors.push({data:t[n],message:`Error: ${i.message}`})}else s.errors.push({data:t[n],message:e.reason.message})})),s}function Lc(e,t){return-1!==t.findIndex((t=>t.fontWeight===e.fontWeight&&t.fontStyle===e.fontStyle))}function zc(e,t,n){const s=t=>t.slug===e.slug,i=n.find(s);return t?(i=>{const r=e=>e.fontWeight===t.fontWeight&&e.fontStyle===t.fontStyle;if(!i)return[...n,{...e,fontFace:[t]}];let a=i.fontFace||[];return a=a.find(r)?a.filter((e=>!r(e))):[...a,t],0===a.length?n.filter((e=>!s(e))):n.map((e=>s(e)?{...e,fontFace:a}:e))})(i):i?n.filter((e=>!s(e))):[...n,e]}const{useGlobalSetting:Hc}=ne(x.privateApis),Gc=(0,h.createContext)({});Gc.displayName="FontLibraryContext";var Wc=function({children:e}){const{saveEntityRecord:t}=(0,c.useDispatch)(j.store),{globalStylesId:n}=(0,c.useSelect)((e=>{const{__experimentalGetCurrentGlobalStylesId:t}=e(j.store);return{globalStylesId:t()}})),s=(0,j.useEntityRecord)("root","globalStyles",n),[i,r]=(0,h.useState)(!1),[o,l]=(0,h.useState)(0),u=()=>{l(Date.now())},{records:d=[],isResolving:p}=(0,j.useEntityRecords)("postType","wp_font_family",{refreshKey:o,_embed:!0}),f=(d||[]).map((e=>({id:e.id,...e.font_family_settings,fontFace:e?._embedded?.font_faces.map((e=>e.font_face_settings))||[]})))||[],[m,g]=Hc("typography.fontFamilies"),v=async e=>{const n=s.record;ae(n,["settings","typography","fontFamilies"],e),await t("root","globalStyles",n)},[y,x]=(0,h.useState)(!1),[b,_]=(0,h.useState)(null),S=m?.theme?m.theme.map((e=>Vc(e,{source:"theme"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],C=m?.custom?m.custom.map((e=>Vc(e,{source:"custom"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],k=f?f.map((e=>Vc(e,{source:"custom"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[];(0,h.useEffect)((()=>{y||_(null)}),[y]);const[E]=(0,h.useState)(new Set),P=e=>e.reduce(((e,t)=>{const n=t?.fontFace&&t.fontFace?.length>0?t?.fontFace.map((e=>`${e.fontStyle+e.fontWeight}`)):["normal400"];return e[t.slug]=n,e}),{}),I=e=>P("theme"===e?S:C),V=(e,t,n,s)=>t||n?!!I(s)[e]?.includes(t+n):!!I(s)[e],O=e=>{const t=(m?.[e.source]??[]).filter((t=>t.slug!==e.slug)),n={...m,[e.source]:t};return g(n),e.fontFace&&e.fontFace.forEach((e=>{Fc(e,"all")})),n},T=e=>{const t=A(e),n={...m,custom:Ac(m?.custom,t)};return g(n),N(t),n},A=e=>e.map((({id:e,fontFace:t,...n})=>({...n,...t&&t.length>0?{fontFace:t.map((({id:e,...t})=>t))}:{}}))),N=e=>{e.forEach((e=>{e.fontFace&&e.fontFace.forEach((e=>{Nc(e,Mc(e.src),"all")}))}))},[F,M]=(0,h.useState)([]),B=async()=>{const e=await async function(){const e={path:`${bc}?_fields=slug,name,description`,method:"GET"};return await ra()(e)}();M(e)};return(0,h.useEffect)((()=>{B()}),[]),(0,a.jsx)(Gc.Provider,{value:{libraryFontSelected:b,handleSetLibraryFontSelected:e=>{if(!e)return void _(null);const t=("theme"===e.source?S:k).find((t=>t.slug===e.slug));_({...t||e,source:e.source})},fontFamilies:m,baseCustomFonts:k,isFontActivated:V,getFontFacesActivated:(e,t)=>I(t)[e]||[],loadFontFaceAsset:async e=>{if(!e.src)return;const t=Mc(e.src);t&&!E.has(t)&&(Nc(e,t,"document"),E.add(t))},installFonts:async function(e){r(!0);try{const t=[];let n=[];for(const s of e){let e=!1,i=await jc(s.slug);i||(e=!0,i=await wc(Bc(s)));const r=i.fontFace&&s.fontFace?i.fontFace.filter((e=>Lc(e,s.fontFace))):[];i.fontFace&&s.fontFace&&(s.fontFace=s.fontFace.filter((e=>!Lc(e,i.fontFace))));let a=[],o=[];if(s?.fontFace?.length>0){const e=await Rc(i.id,Dc(s));a=e?.successes,o=e?.errors}(a?.length>0||r?.length>0)&&(i.fontFace=[...a],t.push(i)),i&&!s?.fontFace?.length&&t.push(i),e&&s?.fontFace?.length>0&&0===a?.length&&await Sc(i.id),n=n.concat(o)}if(n=n.reduce(((e,t)=>e.includes(t.message)?e:[...e,t.message]),[]),t.length>0){const e=T(t);await v(e),u()}if(n.length>0){const e=new Error((0,w.__)("There was an error installing fonts."));throw e.installationErrors=n,e}}finally{r(!1)}},uninstallFontFamily:async function(e){try{const t=await Sc(e.id);if(t.deleted){const t=O(e);await v(t)}return u(),t}catch(e){throw console.error("There was an error uninstalling the font family:",e),e}},toggleActivateFont:(e,t)=>{const n=zc(e,t,m?.[e.source]??[]);g({...m,[e.source]:n});V(e.slug,t?.fontStyle,t?.fontWeight,e.source)?Fc(t,"all"):Nc(t,Mc(t?.src),"all")},getAvailableFontsOutline:P,modalTabOpen:y,setModalTabOpen:x,refreshLibrary:u,saveFontFamilies:v,isResolvingLibrary:p,isInstalling:i,collections:F,getFontCollection:async e=>{try{if(!!F.find((t=>t.slug===e))?.font_families)return;const t=await async function(e){const t={path:`${bc}/${e}`,method:"GET"};return await ra()(t)}(e),n=F.map((n=>n.slug===e?{...n,...t}:n));M(n)}catch(e){throw console.error(e),e}}},children:e})};var Uc=function({font:e,text:t}){const n=(0,h.useRef)(null),s=function(e){return e.fontStyle||e.fontWeight?e:e.fontFace&&e.fontFace.length?e.fontFace.find((e=>"normal"===e.fontStyle&&"400"===e.fontWeight))||e.fontFace[0]:{fontStyle:"normal",fontWeight:"400",fontFamily:e.fontFamily,fake:!0}}(e),i=Qo(e);t=t||e.name;const r=e.preview,[o,l]=(0,h.useState)(!1),[c,u]=(0,h.useState)(!1),{loadFontFaceAsset:d}=(0,h.useContext)(Gc),p=r??function(e){return e.preview?e.preview:e.src?Array.isArray(e.src)?e.src[0]:e.src:void 0}(s),f=p&&p.match(/\.(png|jpg|jpeg|gif|svg)$/i);var m;const g={fontSize:"18px",lineHeight:1,opacity:c?"1":"0",...i,...{fontFamily:Ko((m=s).fontFamily),fontStyle:m.fontStyle||"normal",fontWeight:m.fontWeight||"400"}};return(0,h.useEffect)((()=>{const e=new window.IntersectionObserver((([e])=>{l(e.isIntersecting)}),{});return e.observe(n.current),()=>e.disconnect()}),[n]),(0,h.useEffect)((()=>{(async()=>{o&&(!f&&s.src&&await d(s),u(!0))})()}),[s,o,d,f]),(0,a.jsx)("div",{ref:n,children:f?(0,a.jsx)("img",{src:p,loading:"lazy",alt:t,className:"font-library-modal__font-variant_demo-image"}):(0,a.jsx)(b.__experimentalText,{style:g,className:"font-library-modal__font-variant_demo-text",children:t})})};var qc=function({font:e,onClick:t,variantsText:n,navigatorPath:s}){const i=e.fontFace?.length||1,r={cursor:t?"pointer":"default"},o=(0,b.useNavigator)();return(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,onClick:()=>{t(),s&&o.goTo(s)},style:r,className:"font-library-modal__font-card",children:(0,a.jsxs)(b.Flex,{justify:"space-between",wrap:!1,children:[(0,a.jsx)(Uc,{font:e}),(0,a.jsxs)(b.Flex,{justify:"flex-end",children:[(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.__experimentalText,{className:"font-library-modal__font-card__count",children:n||(0,w.sprintf)((0,w._n)("%d variant","%d variants",i),i)})}),(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.Icon,{icon:(0,w.isRTL)()?za:La})})]})]})})};var Zc=function({face:e,font:t}){const{isFontActivated:n,toggleActivateFont:s}=(0,h.useContext)(Gc),i=t?.fontFace?.length>0?n(t.slug,e.fontStyle,e.fontWeight,t.source):n(t.slug,null,null,t.source),r=()=>{t?.fontFace?.length>0?s(t,e):s(t)},o=t.name+" "+Oc(e),l=(0,h.useId)();return(0,a.jsx)("div",{className:"font-library-modal__font-card",children:(0,a.jsxs)(b.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,a.jsx)(b.CheckboxControl,{checked:i,onChange:r,__nextHasNoMarginBottom:!0,id:l}),(0,a.jsx)("label",{htmlFor:l,children:(0,a.jsx)(Uc,{font:e,text:o,onClick:r})})]})})};function Yc(e){switch(e){case"normal":return 400;case"bold":return 700;case"bolder":return 500;case"lighter":return 300;default:return parseInt(e,10)}}function Kc(e){return e.sort(((e,t)=>"normal"===e.fontStyle&&"normal"!==t.fontStyle?-1:"normal"===t.fontStyle&&"normal"!==e.fontStyle?1:e.fontStyle===t.fontStyle?Yc(e.fontWeight)-Yc(t.fontWeight):e.fontStyle.localeCompare(t.fontStyle)))}const{useGlobalSetting:Xc}=ne(x.privateApis);function Qc({font:e,isOpen:t,setIsOpen:n,setNotice:s,uninstallFontFamily:i,handleSetLibraryFontSelected:r}){const o=(0,b.useNavigator)();return(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,w.__)("Cancel"),confirmButtonText:(0,w.__)("Delete"),onCancel:()=>{n(!1)},onConfirm:async()=>{s(null),n(!1);try{await i(e),o.goBack(),r(null),s({type:"success",message:(0,w.__)("Font family uninstalled successfully.")})}catch(e){s({type:"error",message:(0,w.__)("There was an error uninstalling the font family.")+e.message})}},size:"medium",children:e&&(0,w.sprintf)((0,w.__)('Are you sure you want to delete "%s" font and all its variants and assets?'),e.name)})}var Jc=function(){const{baseCustomFonts:e,libraryFontSelected:t,handleSetLibraryFontSelected:n,refreshLibrary:s,uninstallFontFamily:i,isResolvingLibrary:r,isInstalling:o,saveFontFamilies:l,getFontFacesActivated:u}=(0,h.useContext)(Gc),[d,p]=Xc("typography.fontFamilies"),[f,m]=(0,h.useState)(!1),[g,v]=(0,h.useState)(!1),[y]=Xc("typography.fontFamilies",void 0,"base"),x=(0,c.useSelect)((e=>{const{__experimentalGetCurrentGlobalStylesId:t}=e(j.store);return t()})),_=(0,j.useEntityRecord)("root","globalStyles",x),S=!!_?.edits?.settings?.typography?.fontFamilies,C=d?.theme?d.theme.map((e=>Vc(e,{source:"theme"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],k=new Set(C.map((e=>e.slug))),E=y?.theme?C.concat(y.theme.filter((e=>!k.has(e.slug))).map((e=>Vc(e,{source:"theme"}))).sort(((e,t)=>e.name.localeCompare(t.name)))):[],P="custom"===t?.source&&t?.id,I=(0,c.useSelect)((e=>{const{canUser:t}=e(j.store);return P&&t("delete",{kind:"postType",name:"wp_font_family",id:P})}),[P]),V=!!t&&"theme"!==t?.source&&I,O=e=>{const t=e?.fontFace?.length>0?e.fontFace.length:1,n=u(e.slug,e.source).length;return(0,w.sprintf)((0,w.__)("%1$s/%2$s variants active"),n,t)};(0,h.useEffect)((()=>{n(t),s()}),[]);const T=t?u(t.slug,t.source).length:0,A=t?.fontFace?.length??(t?.fontFamily?1:0),N=T>0&&T!==A,F=T===A,M=E.length>0||e.length>0;return(0,a.jsxs)("div",{className:"font-library-modal__tabpanel-layout",children:[r&&(0,a.jsx)("div",{className:"font-library-modal__loading",children:(0,a.jsx)(b.ProgressBar,{})}),!r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.Navigator,{initialPath:t?"/fontFamily":"/",children:[(0,a.jsx)(b.Navigator.Screen,{path:"/",children:(0,a.jsxs)(b.__experimentalVStack,{spacing:"8",children:[g&&(0,a.jsx)(b.Notice,{status:g.type,onRemove:()=>v(null),children:g.message}),!M&&(0,a.jsx)(b.__experimentalText,{as:"p",children:(0,w.__)("No fonts installed.")}),E.length>0&&(0,a.jsxs)(b.__experimentalVStack,{children:[(0,a.jsx)("h2",{className:"font-library-modal__fonts-title",children:(0,w._x)("Theme","font source")}),(0,a.jsx)("ul",{role:"list",className:"font-library-modal__fonts-list",children:E.map((e=>(0,a.jsx)("li",{className:"font-library-modal__fonts-list-item",children:(0,a.jsx)(qc,{font:e,navigatorPath:"/fontFamily",variantsText:O(e),onClick:()=>{v(null),n(e)}})},e.slug)))})]}),e.length>0&&(0,a.jsxs)(b.__experimentalVStack,{children:[(0,a.jsx)("h2",{className:"font-library-modal__fonts-title",children:(0,w._x)("Custom","font source")}),(0,a.jsx)("ul",{role:"list",className:"font-library-modal__fonts-list",children:e.map((e=>(0,a.jsx)("li",{className:"font-library-modal__fonts-list-item",children:(0,a.jsx)(qc,{font:e,navigatorPath:"/fontFamily",variantsText:O(e),onClick:()=>{v(null),n(e)}})},e.slug)))})]})]})}),(0,a.jsxs)(b.Navigator.Screen,{path:"/fontFamily",children:[(0,a.jsx)(Qc,{font:t,isOpen:f,setIsOpen:m,setNotice:v,uninstallFontFamily:i,handleSetLibraryFontSelected:n}),(0,a.jsxs)(b.Flex,{justify:"flex-start",children:[(0,a.jsx)(b.Navigator.BackButton,{icon:(0,w.isRTL)()?La:za,size:"small",onClick:()=>{n(null),v(null)},label:(0,w.__)("Back")}),(0,a.jsx)(b.__experimentalHeading,{level:2,size:13,className:"edit-site-global-styles-header",children:t?.name})]}),g&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.__experimentalSpacer,{margin:1}),(0,a.jsx)(b.Notice,{status:g.type,onRemove:()=>v(null),children:g.message}),(0,a.jsx)(b.__experimentalSpacer,{margin:1})]}),(0,a.jsx)(b.__experimentalSpacer,{margin:4}),(0,a.jsx)(b.__experimentalText,{children:(0,w.__)("Choose font variants. Keep in mind that too many variants could make your site slower.")}),(0,a.jsx)(b.__experimentalSpacer,{margin:4}),(0,a.jsxs)(b.__experimentalVStack,{spacing:0,children:[(0,a.jsx)(b.CheckboxControl,{className:"font-library-modal__select-all",label:(0,w.__)("Select all"),checked:F,onChange:()=>{const e=d?.[t.source]?.filter((e=>e.slug!==t.slug))??[],n=F?e:[...e,t];p({...d,[t.source]:n}),t.fontFace&&t.fontFace.forEach((e=>{F?Fc(e,"all"):Nc(e,Mc(e?.src),"all")}))},indeterminate:N,__nextHasNoMarginBottom:!0}),(0,a.jsx)(b.__experimentalSpacer,{margin:8}),(0,a.jsx)("ul",{role:"list",className:"font-library-modal__fonts-list",children:(e=>e?e.fontFace&&e.fontFace.length?Kc(e.fontFace):[{fontFamily:e.fontFamily,fontStyle:"normal",fontWeight:"400"}]:[])(t).map(((e,n)=>(0,a.jsx)("li",{className:"font-library-modal__fonts-list-item",children:(0,a.jsx)(Zc,{font:t,face:e},`face${n}`)},`face${n}`)))})]})]})]}),(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-end",className:"font-library-modal__footer",children:[o&&(0,a.jsx)(b.ProgressBar,{}),V&&(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,isDestructive:!0,variant:"tertiary",onClick:()=>{m(!0)},children:(0,w.__)("Delete")}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{v(null);try{await l(d),v({type:"success",message:(0,w.__)("Font family updated successfully.")})}catch(e){v({type:"error",message:(0,w.sprintf)((0,w.__)("There was an error updating the font family. %s"),e.message)})}},disabled:!S,accessibleWhenDisabled:!0,children:(0,w.__)("Update")})]})]})]})},$c=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})}),eu=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})});function tu(e,t,n){return t?!!n[e]?.[`${t.fontStyle}-${t.fontWeight}`]:!!n[e]}var nu=function(){return(0,a.jsx)("div",{className:"font-library__google-fonts-confirm",children:(0,a.jsx)(b.Card,{children:(0,a.jsxs)(b.CardBody,{children:[(0,a.jsx)(b.__experimentalHeading,{level:2,children:(0,w.__)("Connect to Google Fonts")}),(0,a.jsx)(b.__experimentalSpacer,{margin:6}),(0,a.jsx)(b.__experimentalText,{as:"p",children:(0,w.__)("To install fonts from Google you must give permission to connect directly to Google servers. The fonts you install will be downloaded from Google and stored on your site. Your site will then use these locally-hosted fonts.")}),(0,a.jsx)(b.__experimentalSpacer,{margin:3}),(0,a.jsx)(b.__experimentalText,{as:"p",children:(0,w.__)("You can alternatively upload files directly on the Upload tab.")}),(0,a.jsx)(b.__experimentalSpacer,{margin:6}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:()=>{window.localStorage.setItem("wp-font-library-google-fonts-permission","true"),window.dispatchEvent(new Event("storage"))},children:(0,w.__)("Allow access to Google Fonts")})]})})})};var su=function({face:e,font:t,handleToggleVariant:n,selected:s}){const i=()=>{t?.fontFace?n(t,e):n(t)},r=t.name+" "+Oc(e),o=(0,h.useId)();return(0,a.jsx)("div",{className:"font-library-modal__font-card",children:(0,a.jsxs)(b.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,a.jsx)(b.CheckboxControl,{checked:s,onChange:i,__nextHasNoMarginBottom:!0,id:o}),(0,a.jsx)("label",{htmlFor:o,children:(0,a.jsx)(Uc,{font:e,text:r,onClick:i})})]})})};const iu={slug:"all",name:(0,w._x)("All","font categories")},ru="wp-font-library-google-fonts-permission";var au=function({slug:e}){const t="google-fonts"===e,n=()=>"true"===window.localStorage.getItem(ru),[s,i]=(0,h.useState)(null),[r,o]=(0,h.useState)(!1),[l,c]=(0,h.useState)([]),[u,d]=(0,h.useState)(1),[p,f]=(0,h.useState)({}),[m,g]=(0,h.useState)(t&&!n()),{collections:v,getFontCollection:x,installFonts:_,isInstalling:j}=(0,h.useContext)(Gc),S=v.find((t=>t.slug===e));(0,h.useEffect)((()=>{const e=()=>{g(t&&!n())};return e(),window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[e,t]);const C=()=>{window.localStorage.setItem(ru,"false"),window.dispatchEvent(new Event("storage"))};(0,h.useEffect)((()=>{(async()=>{try{await x(e),B()}catch(e){r||o({type:"error",message:e?.message})}})()}),[e,x,o,r]),(0,h.useEffect)((()=>{i(null)}),[e]),(0,h.useEffect)((()=>{c([])}),[s]);const k=(0,h.useMemo)((()=>S?.font_families??[]),[S]),E=[iu,...S?.categories??[]],P=(0,h.useMemo)((()=>function(e,t){const{category:n,search:s}=t;let i=e||[];return n&&"all"!==n&&(i=i.filter((e=>-1!==e.categories.indexOf(n)))),s&&(i=i.filter((e=>e.font_family_settings.name.toLowerCase().includes(s.toLowerCase())))),i}(k,p)),[k,p]),I=!S?.font_families&&!r,V=Math.max(window.innerHeight,500),O=Math.floor((V-417)/61),T=Math.ceil(P.length/O),A=(u-1)*O,N=u*O,F=P.slice(A,N),M=(0,y.debounce)((e=>{f({...p,search:e}),d(1)}),300),B=()=>{f({}),d(1)},D=(e,t)=>{const n=zc(e,t,l);c(n)},R=function(e){return e.reduce(((e,t)=>({...e,[t.slug]:(t?.fontFace||[]).reduce(((e,t)=>({...e,[`${t.fontStyle}-${t.fontWeight}`]:!0})),{})})),{})}(l),L=l.length>0?l[0]?.fontFace?.length:0,z=L>0&&L!==s?.fontFace?.length,H=L===s?.fontFace?.length;if(m)return(0,a.jsx)(nu,{});const G=()=>"google-fonts"!==e||m||s?null:(0,a.jsx)(b.DropdownMenu,{icon:No,label:(0,w.__)("Actions"),popoverProps:{position:"bottom left"},controls:[{title:(0,w.__)("Revoke access to Google Fonts"),onClick:C}]});return(0,a.jsxs)("div",{className:"font-library-modal__tabpanel-layout",children:[I&&(0,a.jsx)("div",{className:"font-library-modal__loading",children:(0,a.jsx)(b.ProgressBar,{})}),!I&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.Navigator,{initialPath:"/",className:"font-library-modal__tabpanel-layout",children:[(0,a.jsxs)(b.Navigator.Screen,{path:"/",children:[(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsxs)(b.__experimentalVStack,{children:[(0,a.jsx)(b.__experimentalHeading,{level:2,size:13,children:S.name}),(0,a.jsx)(b.__experimentalText,{children:S.description})]}),(0,a.jsx)(G,{})]}),(0,a.jsx)(b.__experimentalSpacer,{margin:4}),(0,a.jsxs)(b.Flex,{children:[(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.SearchControl,{className:"font-library-modal__search",value:p.search,placeholder:(0,w.__)("Font name…"),label:(0,w.__)("Search"),onChange:M,__nextHasNoMarginBottom:!0,hideLabelFromVision:!1})}),(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,w.__)("Category"),value:p.category,onChange:e=>{f({...p,category:e}),d(1)},children:E&&E.map((e=>(0,a.jsx)("option",{value:e.slug,children:e.name},e.slug)))})})]}),(0,a.jsx)(b.__experimentalSpacer,{margin:4}),!!S?.font_families?.length&&!P.length&&(0,a.jsx)(b.__experimentalText,{children:(0,w.__)("No fonts found. Try with a different search term.")}),(0,a.jsx)("div",{className:"font-library-modal__fonts-grid__main",children:(0,a.jsx)("ul",{role:"list",className:"font-library-modal__fonts-list",children:F.map((e=>(0,a.jsx)("li",{className:"font-library-modal__fonts-list-item",children:(0,a.jsx)(qc,{font:e.font_family_settings,navigatorPath:"/fontFamily",onClick:()=>{i(e.font_family_settings)}})},e.font_family_settings.slug)))})})]}),(0,a.jsxs)(b.Navigator.Screen,{path:"/fontFamily",children:[(0,a.jsxs)(b.Flex,{justify:"flex-start",children:[(0,a.jsx)(b.Navigator.BackButton,{icon:(0,w.isRTL)()?La:za,size:"small",onClick:()=>{i(null),o(null)},label:(0,w.__)("Back")}),(0,a.jsx)(b.__experimentalHeading,{level:2,size:13,className:"edit-site-global-styles-header",children:s?.name})]}),r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.__experimentalSpacer,{margin:1}),(0,a.jsx)(b.Notice,{status:r.type,onRemove:()=>o(null),children:r.message}),(0,a.jsx)(b.__experimentalSpacer,{margin:1})]}),(0,a.jsx)(b.__experimentalSpacer,{margin:4}),(0,a.jsx)(b.__experimentalText,{children:(0,w.__)("Select font variants to install.")}),(0,a.jsx)(b.__experimentalSpacer,{margin:4}),(0,a.jsx)(b.CheckboxControl,{className:"font-library-modal__select-all",label:(0,w.__)("Select all"),checked:H,onChange:()=>{c(H?[]:[s])},indeterminate:z,__nextHasNoMarginBottom:!0}),(0,a.jsx)(b.__experimentalVStack,{spacing:0,children:(0,a.jsx)("ul",{role:"list",className:"font-library-modal__fonts-list",children:(W=s,W?W.fontFace&&W.fontFace.length?Kc(W.fontFace):[{fontFamily:W.fontFamily,fontStyle:"normal",fontWeight:"400"}]:[]).map(((e,t)=>(0,a.jsx)("li",{className:"font-library-modal__fonts-list-item",children:(0,a.jsx)(su,{font:s,face:e,handleToggleVariant:D,selected:tu(s.slug,s.fontFace?e:null,R)})},`face${t}`)))})}),(0,a.jsx)(b.__experimentalSpacer,{margin:16})]})]}),s&&(0,a.jsx)(b.Flex,{justify:"flex-end",className:"font-library-modal__footer",children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{o(null);const e=l[0];try{e?.fontFace&&await Promise.all(e.fontFace.map((async e=>{e.src&&(e.file=await async function(e){e=Array.isArray(e)?e:[e];const t=await Promise.all(e.map((async e=>fetch(new Request(e)).then((t=>{if(!t.ok)throw new Error(`Error downloading font face asset from ${e}. Server responded with status: ${t.status}`);return t.blob()})).then((t=>{const n=e.split("/").pop();return new Pc([t],n,{type:t.type})})))));return 1===t.length?t[0]:t}(e.src))})))}catch(e){return void o({type:"error",message:(0,w.__)("Error installing the fonts, could not be downloaded.")})}try{await _([e]),o({type:"success",message:(0,w.__)("Fonts were installed successfully.")})}catch(e){o({type:"error",message:e.message})}c([])},isBusy:j,disabled:0===l.length||j,accessibleWhenDisabled:!0,children:(0,w.__)("Install")})}),!s&&(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,className:"font-library-modal__footer",justify:"end",spacing:6,children:[(0,a.jsx)(b.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:1,className:"font-library-modal__page-selection",children:(0,h.createInterpolateElement)((0,w.sprintf)((0,w._x)("<div>Page</div>%1$s<div>of %2$s</div>","paging"),"<CurrentPage />",T),{div:(0,a.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,a.jsx)(b.SelectControl,{"aria-label":(0,w.__)("Current page"),value:u,options:[...Array(T)].map(((e,t)=>({label:t+1,value:t+1}))),onChange:e=>d(parseInt(e)),size:"small",__nextHasNoMarginBottom:!0,variant:"minimal"})})}),(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,a.jsx)(b.Button,{onClick:()=>d(u-1),disabled:1===u,accessibleWhenDisabled:!0,label:(0,w.__)("Previous page"),icon:(0,w.isRTL)()?$c:eu,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,a.jsx)(b.Button,{onClick:()=>d(u+1),disabled:u===T,accessibleWhenDisabled:!0,label:(0,w.__)("Next page"),icon:(0,w.isRTL)()?eu:$c,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})]})]});var W},ou=i(8572),lu=i.n(ou),cu=i(4660),uu=i.n(cu);globalThis.fetch;class du{constructor(e,t={},n){this.type=e,this.detail=t,this.msg=n,Object.defineProperty(this,"__mayPropagate",{enumerable:!1,writable:!0}),this.__mayPropagate=!0}preventDefault(){}stopPropagation(){this.__mayPropagate=!1}valueOf(){return this}toString(){return this.msg?`[${this.type} event]: ${this.msg}`:`[${this.type} event]`}}class hu{constructor(){this.listeners={}}addEventListener(e,t,n){let s=this.listeners[e]||[];n?s.unshift(t):s.push(t),this.listeners[e]=s}removeEventListener(e,t){let n=this.listeners[e]||[],s=n.findIndex((e=>e===t));s>-1&&(n.splice(s,1),this.listeners[e]=n)}dispatch(e){let t=this.listeners[e.type];if(t)for(let n=0,s=t.length;n<s&&e.__mayPropagate;n++)t[n](e)}}const pu=new Date("1904-01-01T00:00:00+0000").getTime();class fu{constructor(e,t,n){this.name=(n||e.tag||"").trim(),this.length=e.length,this.start=e.offset,this.offset=0,this.data=t,["getInt8","getUint8","getInt16","getUint16","getInt32","getUint32","getBigInt64","getBigUint64"].forEach((e=>{let t=e.replace(/get(Big)?/,"").toLowerCase(),n=parseInt(e.replace(/[^\d]/g,""))/8;Object.defineProperty(this,t,{get:()=>this.getValue(e,n)})}))}get currentPosition(){return this.start+this.offset}set currentPosition(e){this.start=e,this.offset=0}skip(e=0,t=8){this.offset+=e*t/8}getValue(e,t){let n=this.start+this.offset;this.offset+=t;try{return this.data[e](n)}catch(n){throw console.error("parser",e,t,this),console.error("parser",this.start,this.offset),n}}flags(e){if(8===e||16===e||32===e||64===e)return this[`uint${e}`].toString(2).padStart(e,0).split("").map((e=>"1"===e));console.error("Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long"),console.trace()}get tag(){const e=this.uint32;return t=[e>>24&255,e>>16&255,e>>8&255,255&e],Array.from(t).map((e=>String.fromCharCode(e))).join("");var t}get fixed(){return this.int16+Math.round(1e3*this.uint16/65356)/1e3}get legacyFixed(){let e=this.uint16,t=this.uint16.toString(16).padStart(4,0);return parseFloat(`${e}.${t}`)}get uint24(){return(this.uint8<<16)+(this.uint8<<8)+this.uint8}get uint128(){let e=0;for(let t=0;t<5;t++){let t=this.uint8;if(e=128*e+(127&t),t<128)break}return e}get longdatetime(){return new Date(pu+1e3*parseInt(this.int64.toString()))}get fword(){return this.int16}get ufword(){return this.uint16}get Offset16(){return this.uint16}get Offset32(){return this.uint32}get F2DOT14(){const e=p.uint16;return[0,1,-2,-1][e>>14]+(16383&e)/16384}verifyLength(){this.offset!=this.length&&console.error(`unexpected parsed table size (${this.offset}) for "${this.name}" (expected ${this.length})`)}readBytes(e=0,t=0,n=8,s=!1){if(0===(e=e||this.length))return[];t&&(this.currentPosition=t);const i=`${s?"":"u"}int${n}`,r=[];for(;e--;)r.push(this[i]);return r}}class mu{constructor(e){const t={enumerable:!1,get:()=>e};Object.defineProperty(this,"parser",t);const n=e.currentPosition,s={enumerable:!1,get:()=>n};Object.defineProperty(this,"start",s)}load(e){Object.keys(e).forEach((t=>{let n=Object.getOwnPropertyDescriptor(e,t);n.get?this[t]=n.get.bind(this):void 0!==n.value&&(this[t]=n.value)})),this.parser.length&&this.parser.verifyLength()}}class gu extends mu{constructor(e,t,n){const{parser:s,start:i}=super(new fu(e,t,n)),r={enumerable:!1,get:()=>s};Object.defineProperty(this,"p",r);const a={enumerable:!1,get:()=>i};Object.defineProperty(this,"tableStart",a)}}function vu(e,t,n){let s;Object.defineProperty(e,t,{get:()=>s||(s=n(),s),enumerable:!0})}class yu extends gu{constructor(e,t,n){const{p:s}=super({offset:0,length:12},t,"sfnt");this.version=s.uint32,this.numTables=s.uint16,this.searchRange=s.uint16,this.entrySelector=s.uint16,this.rangeShift=s.uint16,s.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new xu(s))),this.tables={},this.directory.forEach((e=>{vu(this.tables,e.tag.trim(),(()=>n(this.tables,{tag:e.tag,offset:e.offset,length:e.length},t)))}))}}class xu{constructor(e){this.tag=e.tag,this.checksum=e.uint32,this.offset=e.uint32,this.length=e.uint32}}const bu=uu().inflate||void 0;let wu;class _u extends gu{constructor(e,t,n){const{p:s}=super({offset:0,length:44},t,"woff");this.signature=s.tag,this.flavor=s.uint32,this.length=s.uint32,this.numTables=s.uint16,s.uint16,this.totalSfntSize=s.uint32,this.majorVersion=s.uint16,this.minorVersion=s.uint16,this.metaOffset=s.uint32,this.metaLength=s.uint32,this.metaOrigLength=s.uint32,this.privOffset=s.uint32,this.privLength=s.uint32,s.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new ju(s))),Su(this,t,n)}}class ju{constructor(e){this.tag=e.tag,this.offset=e.uint32,this.compLength=e.uint32,this.origLength=e.uint32,this.origChecksum=e.uint32}}function Su(e,t,n){e.tables={},e.directory.forEach((s=>{vu(e.tables,s.tag.trim(),(()=>{let i=0,r=t;if(s.compLength!==s.origLength){const e=t.buffer.slice(s.offset,s.offset+s.compLength);let n;if(bu)n=bu(new Uint8Array(e));else{if(!wu){const e="no brotli decoder available to decode WOFF2 font";throw font.onerror&&font.onerror(e),new Error(e)}n=wu(new Uint8Array(e))}r=new DataView(n.buffer)}else i=s.offset;return n(e.tables,{tag:s.tag,offset:i,length:s.origLength},r)}))}))}const Cu=lu();let ku;class Eu extends gu{constructor(e,t,n){const{p:s}=super({offset:0,length:48},t,"woff2");this.signature=s.tag,this.flavor=s.uint32,this.length=s.uint32,this.numTables=s.uint16,s.uint16,this.totalSfntSize=s.uint32,this.totalCompressedSize=s.uint32,this.majorVersion=s.uint16,this.minorVersion=s.uint16,this.metaOffset=s.uint32,this.metaLength=s.uint32,this.metaOrigLength=s.uint32,this.privOffset=s.uint32,this.privLength=s.uint32,s.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new Pu(s)));let i,r=s.currentPosition;this.directory[0].offset=0,this.directory.forEach(((e,t)=>{let n=this.directory[t+1];n&&(n.offset=e.offset+(void 0!==e.transformLength?e.transformLength:e.origLength))}));let a=t.buffer.slice(r);if(Cu)i=Cu(new Uint8Array(a));else{if(!ku){const t="no brotli decoder available to decode WOFF2 font";throw e.onerror&&e.onerror(t),new Error(t)}i=new Uint8Array(ku(a))}!function(e,t,n){e.tables={},e.directory.forEach((s=>{vu(e.tables,s.tag.trim(),(()=>{const i=s.offset,r=i+(s.transformLength?s.transformLength:s.origLength),a=new DataView(t.slice(i,r).buffer);try{return n(e.tables,{tag:s.tag,offset:0,length:s.origLength},a)}catch(e){console.error(e)}}))}))}(this,i,n)}}class Pu{constructor(e){this.flags=e.uint8;const t=this.tagNumber=63&this.flags;this.tag=63===t?e.tag:["cmap","head","hhea","hmtx","maxp","name","OS/2","post","cvt ","fpgm","glyf","loca","prep","CFF ","VORG","EBDT","EBLC","gasp","hdmx","kern","LTSH","PCLT","VDMX","vhea","vmtx","BASE","GDEF","GPOS","GSUB","EBSC","JSTF","MATH","CBDT","CBLC","COLR","CPAL","SVG ","sbix","acnt","avar","bdat","bloc","bsln","cvar","fdsc","feat","fmtx","fvar","gvar","hsty","just","lcar","mort","morx","opbd","prop","trak","Zapf","Silf","Glat","Gloc","Feat","Sill"][63&t];let n=0!==(this.transformVersion=(192&this.flags)>>6);"glyf"!==this.tag&&"loca"!==this.tag||(n=3!==this.transformVersion),this.origLength=e.uint128,n&&(this.transformLength=e.uint128)}}const Iu={};let Vu=!1;function Ou(e,t,n){let s=t.tag.replace(/[^\w\d]/g,""),i=Iu[s];return i?new i(t,n,e):(console.warn(`lib-font has no definition for ${s}. The table was skipped.`),{})}function Tu(){let e=0;function t(n,s){if(!Vu)return e>10?s(new Error("loading took too long")):(e++,setTimeout((()=>t(n)),250));n(Ou)}return new Promise(((e,n)=>t(e)))}async function Au(e,t,n={}){if(!globalThis.document)return;let s=function(e,t){let n=e.lastIndexOf("."),s=(e.substring(n+1)||"").toLowerCase(),i={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"}[s];if(i)return i;let r={eot:"The .eot format is not supported: it died in January 12, 2016, when Microsoft retired all versions of IE that didn't already support WOFF.",svg:"The .svg format is not supported: SVG fonts (not to be confused with OpenType with embedded SVG) were so bad we took the entire fonts chapter out of the SVG specification again.",fon:"The .fon format is not supported: this is an ancient Windows bitmap font format.",ttc:"Based on the current CSS specification, font collections are not (yet?) supported."}[s];if(r||(r=`${e} is not a known webfont format.`),t)throw new Error(r);console.warn(`Could not load font: ${r}`)}(t,n.errorOnStyle);if(!s)return;let i=document.createElement("style");i.className="injected-by-Font-js";let r=[];return n.styleRules&&(r=Object.entries(n.styleRules).map((([e,t])=>`${e}: ${t};`))),i.textContent=`\n@font-face {\n font-family: "${e}";\n ${r.join("\n\t")}\n src: url("${t}") format("${s}");\n}`,globalThis.document.head.appendChild(i),i}Promise.all([Promise.resolve().then((function(){return nd})),Promise.resolve().then((function(){return sd})),Promise.resolve().then((function(){return id})),Promise.resolve().then((function(){return ad})),Promise.resolve().then((function(){return od})),Promise.resolve().then((function(){return ud})),Promise.resolve().then((function(){return dd})),Promise.resolve().then((function(){return pd})),Promise.resolve().then((function(){return Sd})),Promise.resolve().then((function(){return Md})),Promise.resolve().then((function(){return Ah})),Promise.resolve().then((function(){return Nh})),Promise.resolve().then((function(){return Bh})),Promise.resolve().then((function(){return Lh})),Promise.resolve().then((function(){return zh})),Promise.resolve().then((function(){return Hh})),Promise.resolve().then((function(){return Wh})),Promise.resolve().then((function(){return Uh})),Promise.resolve().then((function(){return qh})),Promise.resolve().then((function(){return Zh})),Promise.resolve().then((function(){return Yh})),Promise.resolve().then((function(){return Kh})),Promise.resolve().then((function(){return Qh})),Promise.resolve().then((function(){return np})),Promise.resolve().then((function(){return ip})),Promise.resolve().then((function(){return rp})),Promise.resolve().then((function(){return ap})),Promise.resolve().then((function(){return op})),Promise.resolve().then((function(){return lp})),Promise.resolve().then((function(){return dp})),Promise.resolve().then((function(){return gp})),Promise.resolve().then((function(){return xp})),Promise.resolve().then((function(){return wp})),Promise.resolve().then((function(){return Sp})),Promise.resolve().then((function(){return Cp})),Promise.resolve().then((function(){return kp})),Promise.resolve().then((function(){return Pp})),Promise.resolve().then((function(){return Ip})),Promise.resolve().then((function(){return Ap})),Promise.resolve().then((function(){return Np})),Promise.resolve().then((function(){return Mp}))]).then((e=>{e.forEach((e=>{let t=Object.keys(e)[0];Iu[t]=e[t]})),Vu=!0}));const Nu=[0,1,0,0],Fu=[79,84,84,79],Mu=[119,79,70,70],Bu=[119,79,70,50];function Du(e,t){if(e.length===t.length){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}class Ru extends hu{constructor(e,t={}){super(),this.name=e,this.options=t,this.metrics=!1}get src(){return this.__src}set src(e){this.__src=e,(async()=>{globalThis.document&&!this.options.skipStyleSheet&&await Au(this.name,e,this.options),this.loadFont(e)})()}async loadFont(e,t){fetch(e).then((e=>function(e){if(!e.ok)throw new Error(`HTTP ${e.status} - ${e.statusText}`);return e}(e)&&e.arrayBuffer())).then((n=>this.fromDataBuffer(n,t||e))).catch((n=>{const s=new du("error",n,`Failed to load font at ${t||e}`);this.dispatch(s),this.onerror&&this.onerror(s)}))}async fromDataBuffer(e,t){this.fontData=new DataView(e);let n=function(e){const t=[e.getUint8(0),e.getUint8(1),e.getUint8(2),e.getUint8(3)];return Du(t,Nu)||Du(t,Fu)?"SFNT":Du(t,Mu)?"WOFF":Du(t,Bu)?"WOFF2":void 0}(this.fontData);if(!n)throw new Error(`${t} is either an unsupported font format, or not a font at all.`);await this.parseBasicData(n);const s=new du("load",{font:this});this.dispatch(s),this.onload&&this.onload(s)}async parseBasicData(e){return Tu().then((t=>("SFNT"===e&&(this.opentype=new yu(this,this.fontData,t)),"WOFF"===e&&(this.opentype=new _u(this,this.fontData,t)),"WOFF2"===e&&(this.opentype=new Eu(this,this.fontData,t)),this.opentype)))}getGlyphId(e){return this.opentype.tables.cmap.getGlyphId(e)}reverse(e){return this.opentype.tables.cmap.reverse(e)}supports(e){return 0!==this.getGlyphId(e)}supportsVariation(e){return!1!==this.opentype.tables.cmap.supportsVariation(e)}measureText(e,t=16){if(this.__unloaded)throw new Error("Cannot measure text: font was unloaded. Please reload before calling measureText()");let n=document.createElement("div");n.textContent=e,n.style.fontFamily=this.name,n.style.fontSize=`${t}px`,n.style.color="transparent",n.style.background="transparent",n.style.top="0",n.style.left="0",n.style.position="absolute",document.body.appendChild(n);let s=n.getBoundingClientRect();document.body.removeChild(n);const i=this.opentype.tables["OS/2"];return s.fontSize=t,s.ascender=i.sTypoAscender,s.descender=i.sTypoDescender,s}unload(){if(this.styleElement.parentNode){this.styleElement.parentNode.removeElement(this.styleElement);const e=new du("unload",{font:this});this.dispatch(e),this.onunload&&this.onunload(e)}this._unloaded=!0}load(){if(this.__unloaded){delete this.__unloaded,document.head.appendChild(this.styleElement);const e=new du("load",{font:this});this.dispatch(e),this.onload&&this.onload(e)}}}globalThis.Font=Ru;class Lu extends mu{constructor(e,t,n){super(e),this.plaformID=t,this.encodingID=n}}class zu extends Lu{constructor(e,t,n){super(e,t,n),this.format=0,this.length=e.uint16,this.language=e.uint16,this.glyphIdArray=[...new Array(256)].map((t=>e.uint8))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.")),0<=e&&e<=255}reverse(e){return console.warn("reverse not implemented for cmap subtable format 0"),{}}getSupportedCharCodes(){return[{start:1,end:256}]}}class Hu extends Lu{constructor(e,t,n){super(e,t,n),this.format=2,this.length=e.uint16,this.language=e.uint16,this.subHeaderKeys=[...new Array(256)].map((t=>e.uint16));const s=Math.max(...this.subHeaderKeys),i=e.currentPosition;vu(this,"subHeaders",(()=>(e.currentPosition=i,[...new Array(s)].map((t=>new Gu(e))))));const r=i+8*s;vu(this,"glyphIndexArray",(()=>(e.currentPosition=r,[...new Array(s)].map((t=>e.uint16)))))}supports(e){e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented."));const t=e&&255,n=e&&65280,s=this.subHeaders[n],i=this.subHeaders[s],r=i.firstCode,a=r+i.entryCount;return r<=t&&t<=a}reverse(e){return console.warn("reverse not implemented for cmap subtable format 2"),{}}getSupportedCharCodes(e=!1){return e?this.subHeaders.map((e=>({firstCode:e.firstCode,lastCode:e.lastCode}))):this.subHeaders.map((e=>({start:e.firstCode,end:e.lastCode})))}}class Gu{constructor(e){this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.first+this.entryCount,this.idDelta=e.int16,this.idRangeOffset=e.uint16}}class Wu extends Lu{constructor(e,t,n){super(e,t,n),this.format=4,this.length=e.uint16,this.language=e.uint16,this.segCountX2=e.uint16,this.segCount=this.segCountX2/2,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16;const s=e.currentPosition;vu(this,"endCode",(()=>e.readBytes(this.segCount,s,16)));const i=s+2+this.segCountX2;vu(this,"startCode",(()=>e.readBytes(this.segCount,i,16)));const r=i+this.segCountX2;vu(this,"idDelta",(()=>e.readBytes(this.segCount,r,16,!0)));const a=r+this.segCountX2;vu(this,"idRangeOffset",(()=>e.readBytes(this.segCount,a,16)));const o=a+this.segCountX2,l=this.length-(o-this.tableStart);vu(this,"glyphIdArray",(()=>e.readBytes(l,o,16))),vu(this,"segments",(()=>this.buildSegments(a,o,e)))}buildSegments(e,t,n){return[...new Array(this.segCount)].map(((t,s)=>{let i=this.startCode[s],r=this.endCode[s],a=this.idDelta[s],o=this.idRangeOffset[s],l=e+2*s,c=[];if(0===o)for(let e=i+a,t=r+a;e<=t;e++)c.push(e);else for(let e=0,t=r-i;e<=t;e++)n.currentPosition=l+o+2*e,c.push(n.uint16);return{startCode:i,endCode:r,idDelta:a,idRangeOffset:o,glyphIDs:c}}))}reverse(e){let t=this.segments.find((t=>t.glyphIDs.includes(e)));if(!t)return{};const n=t.startCode+t.glyphIDs.indexOf(e);return{code:n,unicode:String.fromCodePoint(n)}}getGlyphId(e){if(e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343)return 0;if(!(65534&~e&&65535&~e))return 0;let t=this.segments.find((t=>t.startCode<=e&&e<=t.endCode));return t?t.glyphIDs[e-t.startCode]:0}supports(e){return 0!==this.getGlyphId(e)}getSupportedCharCodes(e=!1){return e?this.segments:this.segments.map((e=>({start:e.startCode,end:e.endCode})))}}class Uu extends Lu{constructor(e,t,n){super(e,t,n),this.format=6,this.length=e.uint16,this.language=e.uint16,this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.firstCode+this.entryCount-1;vu(this,"glyphIdArray",(()=>[...new Array(this.entryCount)].map((t=>e.uint16))))}supports(e){if(e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.")),e<this.firstCode)return{};if(e>this.firstCode+this.entryCount)return{};const t=e-this.firstCode;return{code:t,unicode:String.fromCodePoint(t)}}reverse(e){let t=this.glyphIdArray.indexOf(e);if(t>-1)return this.firstCode+t}getSupportedCharCodes(e=!1){return e?[{firstCode:this.firstCode,lastCode:this.lastCode}]:[{start:this.firstCode,end:this.lastCode}]}}class qu extends Lu{constructor(e,t,n){super(e,t,n),this.format=8,e.uint16,this.length=e.uint32,this.language=e.uint32,this.is32=[...new Array(8192)].map((t=>e.uint8)),this.numGroups=e.uint32;vu(this,"groups",(()=>[...new Array(this.numGroups)].map((t=>new Zu(e)))))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.")),-1!==this.groups.findIndex((t=>t.startcharCode<=e&&e<=t.endcharCode))}reverse(e){return console.warn("reverse not implemented for cmap subtable format 8"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map((e=>({start:e.startcharCode,end:e.endcharCode})))}}class Zu{constructor(e){this.startcharCode=e.uint32,this.endcharCode=e.uint32,this.startGlyphID=e.uint32}}class Yu extends Lu{constructor(e,t,n){super(e,t,n),this.format=10,e.uint16,this.length=e.uint32,this.language=e.uint32,this.startCharCode=e.uint32,this.numChars=e.uint32,this.endCharCode=this.startCharCode+this.numChars;vu(this,"glyphs",(()=>[...new Array(this.numChars)].map((t=>e.uint16))))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.")),!(e<this.startCharCode)&&(!(e>this.startCharCode+this.numChars)&&e-this.startCharCode)}reverse(e){return console.warn("reverse not implemented for cmap subtable format 10"),{}}getSupportedCharCodes(e=!1){return e?[{startCharCode:this.startCharCode,endCharCode:this.endCharCode}]:[{start:this.startCharCode,end:this.endCharCode}]}}class Ku extends Lu{constructor(e,t,n){super(e,t,n),this.format=12,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32;vu(this,"groups",(()=>[...new Array(this.numGroups)].map((t=>new Xu(e)))))}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343?0:65534&~e&&65535&~e?-1!==this.groups.findIndex((t=>t.startCharCode<=e&&e<=t.endCharCode)):0}reverse(e){for(let t of this.groups){let n=t.startGlyphID;if(n>e)continue;if(n===e)return t.startCharCode;if(n+(t.endCharCode-t.startCharCode)<e)continue;const s=t.startCharCode+(e-n);return{code:s,unicode:String.fromCodePoint(s)}}return{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map((e=>({start:e.startCharCode,end:e.endCharCode})))}}class Xu{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.startGlyphID=e.uint32}}class Qu extends Lu{constructor(e,t,n){super(e,t,n),this.format=13,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32;vu(this,"groups",[...new Array(this.numGroups)].map((t=>new Ju(e))))}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),-1!==this.groups.findIndex((t=>t.startCharCode<=e&&e<=t.endCharCode))}reverse(e){return console.warn("reverse not implemented for cmap subtable format 13"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map((e=>({start:e.startCharCode,end:e.endCharCode})))}}class Ju{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.glyphID=e.uint32}}class $u extends Lu{constructor(e,t,n){super(e,t,n),this.subTableStart=e.currentPosition,this.format=14,this.length=e.uint32,this.numVarSelectorRecords=e.uint32,vu(this,"varSelectors",(()=>[...new Array(this.numVarSelectorRecords)].map((t=>new ed(e)))))}supports(){return console.warn("supports not implemented for cmap subtable format 14"),0}getSupportedCharCodes(){return console.warn("getSupportedCharCodes not implemented for cmap subtable format 14"),[]}reverse(e){return console.warn("reverse not implemented for cmap subtable format 14"),{}}supportsVariation(e){let t=this.varSelector.find((t=>t.varSelector===e));return t||!1}getSupportedVariations(){return this.varSelectors.map((e=>e.varSelector))}}class ed{constructor(e){this.varSelector=e.uint24,this.defaultUVSOffset=e.Offset32,this.nonDefaultUVSOffset=e.Offset32}}class td{constructor(e,t){const n=this.platformID=e.uint16,s=this.encodingID=e.uint16,i=this.offset=e.Offset32;vu(this,"table",(()=>(e.currentPosition=t+i,function(e,t,n){const s=e.uint16;return 0===s?new zu(e,t,n):2===s?new Hu(e,t,n):4===s?new Wu(e,t,n):6===s?new Uu(e,t,n):8===s?new qu(e,t,n):10===s?new Yu(e,t,n):12===s?new Ku(e,t,n):13===s?new Qu(e,t,n):14===s?new $u(e,t,n):{}}(e,n,s))))}}var nd=Object.freeze({__proto__:null,cmap:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numTables=n.uint16,this.encodingRecords=[...new Array(this.numTables)].map((e=>new td(n,this.tableStart)))}getSubTable(e){return this.encodingRecords[e].table}getSupportedEncodings(){return this.encodingRecords.map((e=>({platformID:e.platformID,encodingId:e.encodingID})))}getSupportedCharCodes(e,t){const n=this.encodingRecords.findIndex((n=>n.platformID===e&&n.encodingID===t));if(-1===n)return!1;return this.getSubTable(n).getSupportedCharCodes()}reverse(e){for(let t=0;t<this.numTables;t++){let n=this.getSubTable(t).reverse(e);if(n)return n}}getGlyphId(e){let t=0;return this.encodingRecords.some(((n,s)=>{let i=this.getSubTable(s);return!!i.getGlyphId&&(t=i.getGlyphId(e),0!==t)})),t}supports(e){return this.encodingRecords.some(((t,n)=>{const s=this.getSubTable(n);return s.supports&&!1!==s.supports(e)}))}supportsVariation(e){return this.encodingRecords.some(((t,n)=>{const s=this.getSubTable(n);return s.supportsVariation&&!1!==s.supportsVariation(e)}))}}});var sd=Object.freeze({__proto__:null,head:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.load({majorVersion:n.uint16,minorVersion:n.uint16,fontRevision:n.fixed,checkSumAdjustment:n.uint32,magicNumber:n.uint32,flags:n.flags(16),unitsPerEm:n.uint16,created:n.longdatetime,modified:n.longdatetime,xMin:n.int16,yMin:n.int16,xMax:n.int16,yMax:n.int16,macStyle:n.flags(16),lowestRecPPEM:n.uint16,fontDirectionHint:n.uint16,indexToLocFormat:n.uint16,glyphDataFormat:n.uint16})}}});var id=Object.freeze({__proto__:null,hhea:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.ascender=n.fword,this.descender=n.fword,this.lineGap=n.fword,this.advanceWidthMax=n.ufword,this.minLeftSideBearing=n.fword,this.minRightSideBearing=n.fword,this.xMaxExtent=n.fword,this.caretSlopeRise=n.int16,this.caretSlopeRun=n.int16,this.caretOffset=n.int16,n.int16,n.int16,n.int16,n.int16,this.metricDataFormat=n.int16,this.numberOfHMetrics=n.uint16,n.verifyLength()}}});class rd{constructor(e,t){this.advanceWidth=e,this.lsb=t}}var ad=Object.freeze({__proto__:null,hmtx:class extends gu{constructor(e,t,n){const{p:s}=super(e,t),i=n.hhea.numberOfHMetrics,r=n.maxp.numGlyphs,a=s.currentPosition;if(vu(this,"hMetrics",(()=>(s.currentPosition=a,[...new Array(i)].map((e=>new rd(s.uint16,s.int16)))))),i<r){const e=a+4*i;vu(this,"leftSideBearings",(()=>(s.currentPosition=e,[...new Array(r-i)].map((e=>s.int16)))))}}}});var od=Object.freeze({__proto__:null,maxp:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.legacyFixed,this.numGlyphs=n.uint16,1===this.version&&(this.maxPoints=n.uint16,this.maxContours=n.uint16,this.maxCompositePoints=n.uint16,this.maxCompositeContours=n.uint16,this.maxZones=n.uint16,this.maxTwilightPoints=n.uint16,this.maxStorage=n.uint16,this.maxFunctionDefs=n.uint16,this.maxInstructionDefs=n.uint16,this.maxStackElements=n.uint16,this.maxSizeOfInstructions=n.uint16,this.maxComponentElements=n.uint16,this.maxComponentDepth=n.uint16),n.verifyLength()}}});class ld{constructor(e,t){this.length=e,this.offset=t}}class cd{constructor(e,t){this.platformID=e.uint16,this.encodingID=e.uint16,this.languageID=e.uint16,this.nameID=e.uint16,this.length=e.uint16,this.offset=e.Offset16,vu(this,"string",(()=>(e.currentPosition=t.stringStart+this.offset,function(e,t){const{platformID:n,length:s}=t;if(0===s)return"";if(0===n||3===n){const t=[];for(let n=0,i=s/2;n<i;n++)t[n]=String.fromCharCode(e.uint16);return t.join("")}const i=e.readBytes(s),r=[];return i.forEach((function(e,t){r[t]=String.fromCharCode(e)})),r.join("")}(e,this))))}}var ud=Object.freeze({__proto__:null,name:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.format=n.uint16,this.count=n.uint16,this.stringOffset=n.Offset16,this.nameRecords=[...new Array(this.count)].map((e=>new cd(n,this))),1===this.format&&(this.langTagCount=n.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map((e=>new ld(n.uint16,n.Offset16)))),this.stringStart=this.tableStart+this.stringOffset}get(e){let t=this.nameRecords.find((t=>t.nameID===e));if(t)return t.string}}});var dd=Object.freeze({__proto__:null,OS2:class extends gu{constructor(e,t){const{p:n}=super(e,t);return this.version=n.uint16,this.xAvgCharWidth=n.int16,this.usWeightClass=n.uint16,this.usWidthClass=n.uint16,this.fsType=n.uint16,this.ySubscriptXSize=n.int16,this.ySubscriptYSize=n.int16,this.ySubscriptXOffset=n.int16,this.ySubscriptYOffset=n.int16,this.ySuperscriptXSize=n.int16,this.ySuperscriptYSize=n.int16,this.ySuperscriptXOffset=n.int16,this.ySuperscriptYOffset=n.int16,this.yStrikeoutSize=n.int16,this.yStrikeoutPosition=n.int16,this.sFamilyClass=n.int16,this.panose=[...new Array(10)].map((e=>n.uint8)),this.ulUnicodeRange1=n.flags(32),this.ulUnicodeRange2=n.flags(32),this.ulUnicodeRange3=n.flags(32),this.ulUnicodeRange4=n.flags(32),this.achVendID=n.tag,this.fsSelection=n.uint16,this.usFirstCharIndex=n.uint16,this.usLastCharIndex=n.uint16,this.sTypoAscender=n.int16,this.sTypoDescender=n.int16,this.sTypoLineGap=n.int16,this.usWinAscent=n.uint16,this.usWinDescent=n.uint16,0===this.version?n.verifyLength():(this.ulCodePageRange1=n.flags(32),this.ulCodePageRange2=n.flags(32),1===this.version?n.verifyLength():(this.sxHeight=n.int16,this.sCapHeight=n.int16,this.usDefaultChar=n.uint16,this.usBreakChar=n.uint16,this.usMaxContext=n.uint16,this.version<=4?n.verifyLength():(this.usLowerOpticalPointSize=n.uint16,this.usUpperOpticalPointSize=n.uint16,5===this.version?n.verifyLength():void 0)))}}});const hd=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];var pd=Object.freeze({__proto__:null,post:class extends gu{constructor(e,t){const{p:n}=super(e,t);if(this.version=n.legacyFixed,this.italicAngle=n.fixed,this.underlinePosition=n.fword,this.underlineThickness=n.fword,this.isFixedPitch=n.uint32,this.minMemType42=n.uint32,this.maxMemType42=n.uint32,this.minMemType1=n.uint32,this.maxMemType1=n.uint32,1===this.version||3===this.version)return n.verifyLength();if(this.numGlyphs=n.uint16,2===this.version){this.glyphNameIndex=[...new Array(this.numGlyphs)].map((e=>n.uint16)),this.namesOffset=n.currentPosition,this.glyphNameOffsets=[1];for(let e=0;e<this.numGlyphs;e++){if(this.glyphNameIndex[e]<hd.length){this.glyphNameOffsets.push(this.glyphNameOffsets[e]);continue}let t=n.int8;n.skip(t),this.glyphNameOffsets.push(this.glyphNameOffsets[e]+t+1)}}2.5===this.version&&(this.offset=[...new Array(this.numGlyphs)].map((e=>n.int8)))}getGlyphName(e){if(2!==this.version)return console.warn(`post table version ${this.version} does not support glyph name lookups`),"";let t=this.glyphNameIndex[e];if(t<258)return hd[t];let n=this.glyphNameOffsets[e],s=this.glyphNameOffsets[e+1]-n-1;if(0===s)return".notdef.";this.parser.currentPosition=this.namesOffset+n;return this.parser.readBytes(s,this.namesOffset+n,8,!0).map((e=>String.fromCharCode(e))).join("")}}});class fd extends gu{constructor(e,t){const{p:n}=super(e,t,"AxisTable");this.baseTagListOffset=n.Offset16,this.baseScriptListOffset=n.Offset16,vu(this,"baseTagList",(()=>new md({offset:e.offset+this.baseTagListOffset},t))),vu(this,"baseScriptList",(()=>new gd({offset:e.offset+this.baseScriptListOffset},t)))}}class md extends gu{constructor(e,t){const{p:n}=super(e,t,"BaseTagListTable");this.baseTagCount=n.uint16,this.baselineTags=[...new Array(this.baseTagCount)].map((e=>n.tag))}}class gd extends gu{constructor(e,t){const{p:n}=super(e,t,"BaseScriptListTable");this.baseScriptCount=n.uint16;const s=n.currentPosition;vu(this,"baseScriptRecords",(()=>(n.currentPosition=s,[...new Array(this.baseScriptCount)].map((e=>new vd(this.start,n))))))}}class vd{constructor(e,t){this.baseScriptTag=t.tag,this.baseScriptOffset=t.Offset16,vu(this,"baseScriptTable",(()=>(t.currentPosition=e+this.baseScriptOffset,new yd(t))))}}class yd{constructor(e){this.start=e.currentPosition,this.baseValuesOffset=e.Offset16,this.defaultMinMaxOffset=e.Offset16,this.baseLangSysCount=e.uint16,this.baseLangSysRecords=[...new Array(this.baseLangSysCount)].map((t=>new xd(this.start,e))),vu(this,"baseValues",(()=>(e.currentPosition=this.start+this.baseValuesOffset,new bd(e)))),vu(this,"defaultMinMax",(()=>(e.currentPosition=this.start+this.defaultMinMaxOffset,new wd(e))))}}class xd{constructor(e,t){this.baseLangSysTag=t.tag,this.minMaxOffset=t.Offset16,vu(this,"minMax",(()=>(t.currentPosition=e+this.minMaxOffset,new wd(t))))}}class bd{constructor(e){this.parser=e,this.start=e.currentPosition,this.defaultBaselineIndex=e.uint16,this.baseCoordCount=e.uint16,this.baseCoords=[...new Array(this.baseCoordCount)].map((t=>e.Offset16))}getTable(e){return this.parser.currentPosition=this.start+this.baseCoords[e],new jd(this.parser)}}class wd{constructor(e){this.minCoord=e.Offset16,this.maxCoord=e.Offset16,this.featMinMaxCount=e.uint16;const t=e.currentPosition;vu(this,"featMinMaxRecords",(()=>(e.currentPosition=t,[...new Array(this.featMinMaxCount)].map((t=>new _d(e))))))}}class _d{constructor(e){this.featureTableTag=e.tag,this.minCoord=e.Offset16,this.maxCoord=e.Offset16}}class jd{constructor(e){this.baseCoordFormat=e.uint16,this.coordinate=e.int16,2===this.baseCoordFormat&&(this.referenceGlyph=e.uint16,this.baseCoordPoint=e.uint16),3===this.baseCoordFormat&&(this.deviceTable=e.Offset16)}}var Sd=Object.freeze({__proto__:null,BASE:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.horizAxisOffset=n.Offset16,this.vertAxisOffset=n.Offset16,vu(this,"horizAxis",(()=>new fd({offset:e.offset+this.horizAxisOffset},t))),vu(this,"vertAxis",(()=>new fd({offset:e.offset+this.vertAxisOffset},t))),1===this.majorVersion&&1===this.minorVersion&&(this.itemVarStoreOffset=n.Offset32,vu(this,"itemVarStore",(()=>new fd({offset:e.offset+this.itemVarStoreOffset},t))))}}});class Cd{constructor(e){this.classFormat=e.uint16,1===this.classFormat&&(this.startGlyphID=e.uint16,this.glyphCount=e.uint16,this.classValueArray=[...new Array(this.glyphCount)].map((t=>e.uint16))),2===this.classFormat&&(this.classRangeCount=e.uint16,this.classRangeRecords=[...new Array(this.classRangeCount)].map((t=>new kd(e))))}}class kd{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.class=e.uint16}}class Ed extends mu{constructor(e){super(e),this.coverageFormat=e.uint16,1===this.coverageFormat&&(this.glyphCount=e.uint16,this.glyphArray=[...new Array(this.glyphCount)].map((t=>e.uint16))),2===this.coverageFormat&&(this.rangeCount=e.uint16,this.rangeRecords=[...new Array(this.rangeCount)].map((t=>new Pd(e))))}}class Pd{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.startCoverageIndex=e.uint16}}class Id{constructor(e,t){this.table=e,this.parser=t,this.start=t.currentPosition,this.format=t.uint16,this.variationRegionListOffset=t.Offset32,this.itemVariationDataCount=t.uint16,this.itemVariationDataOffsets=[...new Array(this.itemVariationDataCount)].map((e=>t.Offset32))}}class Vd extends mu{constructor(e){super(e),this.coverageOffset=e.Offset16,this.glyphCount=e.uint16,this.attachPointOffsets=[...new Array(this.glyphCount)].map((t=>e.Offset16))}getPoint(e){return this.parser.currentPosition=this.start+this.attachPointOffsets[e],new Od(this.parser)}}class Od{constructor(e){this.pointCount=e.uint16,this.pointIndices=[...new Array(this.pointCount)].map((t=>e.uint16))}}class Td extends mu{constructor(e){super(e),this.coverageOffset=e.Offset16,vu(this,"coverage",(()=>(e.currentPosition=this.start+this.coverageOffset,new Ed(e)))),this.ligGlyphCount=e.uint16,this.ligGlyphOffsets=[...new Array(this.ligGlyphCount)].map((t=>e.Offset16))}getLigGlyph(e){return this.parser.currentPosition=this.start+this.ligGlyphOffsets[e],new Ad(this.parser)}}class Ad extends mu{constructor(e){super(e),this.caretCount=e.uint16,this.caretValueOffsets=[...new Array(this.caretCount)].map((t=>e.Offset16))}getCaretValue(e){return this.parser.currentPosition=this.start+this.caretValueOffsets[e],new Nd(this.parser)}}class Nd{constructor(e){this.caretValueFormat=e.uint16,1===this.caretValueFormat&&(this.coordinate=e.int16),2===this.caretValueFormat&&(this.caretValuePointIndex=e.uint16),3===this.caretValueFormat&&(this.coordinate=e.int16,this.deviceOffset=e.Offset16)}}class Fd extends mu{constructor(e){super(e),this.markGlyphSetTableFormat=e.uint16,this.markGlyphSetCount=e.uint16,this.coverageOffsets=[...new Array(this.markGlyphSetCount)].map((t=>e.Offset32))}getMarkGlyphSet(e){return this.parser.currentPosition=this.start+this.coverageOffsets[e],new Ed(this.parser)}}var Md=Object.freeze({__proto__:null,GDEF:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.glyphClassDefOffset=n.Offset16,vu(this,"glyphClassDefs",(()=>{if(0!==this.glyphClassDefOffset)return n.currentPosition=this.tableStart+this.glyphClassDefOffset,new Cd(n)})),this.attachListOffset=n.Offset16,vu(this,"attachList",(()=>{if(0!==this.attachListOffset)return n.currentPosition=this.tableStart+this.attachListOffset,new Vd(n)})),this.ligCaretListOffset=n.Offset16,vu(this,"ligCaretList",(()=>{if(0!==this.ligCaretListOffset)return n.currentPosition=this.tableStart+this.ligCaretListOffset,new Td(n)})),this.markAttachClassDefOffset=n.Offset16,vu(this,"markAttachClassDef",(()=>{if(0!==this.markAttachClassDefOffset)return n.currentPosition=this.tableStart+this.markAttachClassDefOffset,new Cd(n)})),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=n.Offset16,vu(this,"markGlyphSetsDef",(()=>{if(0!==this.markGlyphSetsDefOffset)return n.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new Fd(n)}))),3===this.minorVersion&&(this.itemVarStoreOffset=n.Offset32,vu(this,"itemVarStore",(()=>{if(0!==this.itemVarStoreOffset)return n.currentPosition=this.tableStart+this.itemVarStoreOffset,new Id(n)})))}}});class Bd extends mu{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(e){super(e),this.scriptCount=e.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map((t=>new Dd(e)))}}class Dd{constructor(e){this.scriptTag=e.tag,this.scriptOffset=e.Offset16}}class Rd extends mu{constructor(e){super(e),this.defaultLangSys=e.Offset16,this.langSysCount=e.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map((t=>new Ld(e)))}}class Ld{constructor(e){this.langSysTag=e.tag,this.langSysOffset=e.Offset16}}class zd{constructor(e){this.lookupOrder=e.Offset16,this.requiredFeatureIndex=e.uint16,this.featureIndexCount=e.uint16,this.featureIndices=[...new Array(this.featureIndexCount)].map((t=>e.uint16))}}class Hd extends mu{static EMPTY={featureCount:0,featureRecords:[]};constructor(e){super(e),this.featureCount=e.uint16,this.featureRecords=[...new Array(this.featureCount)].map((t=>new Gd(e)))}}class Gd{constructor(e){this.featureTag=e.tag,this.featureOffset=e.Offset16}}class Wd extends mu{constructor(e){super(e),this.featureParams=e.Offset16,this.lookupIndexCount=e.uint16,this.lookupListIndices=[...new Array(this.lookupIndexCount)].map((t=>e.uint16))}getFeatureParams(){if(this.featureParams>0){const e=this.parser;e.currentPosition=this.start+this.featureParams;const t=this.featureTag;if("size"===t)return new qd(e);if(t.startsWith("cc"))return new Ud(e);if(t.startsWith("ss"))return new Zd(e)}}}class Ud{constructor(e){this.format=e.uint16,this.featUiLabelNameId=e.uint16,this.featUiTooltipTextNameId=e.uint16,this.sampleTextNameId=e.uint16,this.numNamedParameters=e.uint16,this.firstParamUiLabelNameId=e.uint16,this.charCount=e.uint16,this.character=[...new Array(this.charCount)].map((t=>e.uint24))}}class qd{constructor(e){this.designSize=e.uint16,this.subfamilyIdentifier=e.uint16,this.subfamilyNameID=e.uint16,this.smallEnd=e.uint16,this.largeEnd=e.uint16}}class Zd{constructor(e){this.version=e.uint16,this.UINameID=e.uint16}}function Yd(e){e.parser.currentPosition-=2,delete e.coverageOffset,delete e.getCoverageTable}class Kd extends mu{constructor(e){super(e),this.substFormat=e.uint16,this.coverageOffset=e.Offset16}getCoverageTable(){let e=this.parser;return e.currentPosition=this.start+this.coverageOffset,new Ed(e)}}class Xd{constructor(e){this.glyphSequenceIndex=e.uint16,this.lookupListIndex=e.uint16}}class Qd extends Kd{constructor(e){super(e),this.deltaGlyphID=e.int16}}class Jd extends Kd{constructor(e){super(e),this.sequenceCount=e.uint16,this.sequenceOffsets=[...new Array(this.sequenceCount)].map((t=>e.Offset16))}getSequence(e){let t=this.parser;return t.currentPosition=this.start+this.sequenceOffsets[e],new $d(t)}}class $d{constructor(e){this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}class eh extends Kd{constructor(e){super(e),this.alternateSetCount=e.uint16,this.alternateSetOffsets=[...new Array(this.alternateSetCount)].map((t=>e.Offset16))}getAlternateSet(e){let t=this.parser;return t.currentPosition=this.start+this.alternateSetOffsets[e],new th(t)}}class th{constructor(e){this.glyphCount=e.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}class nh extends Kd{constructor(e){super(e),this.ligatureSetCount=e.uint16,this.ligatureSetOffsets=[...new Array(this.ligatureSetCount)].map((t=>e.Offset16))}getLigatureSet(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureSetOffsets[e],new sh(t)}}class sh extends mu{constructor(e){super(e),this.ligatureCount=e.uint16,this.ligatureOffsets=[...new Array(this.ligatureCount)].map((t=>e.Offset16))}getLigature(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureOffsets[e],new ih(t)}}class ih{constructor(e){this.ligatureGlyph=e.uint16,this.componentCount=e.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map((t=>e.uint16))}}class rh extends Kd{constructor(e){super(e),1===this.substFormat&&(this.subRuleSetCount=e.uint16,this.subRuleSetOffsets=[...new Array(this.subRuleSetCount)].map((t=>e.Offset16))),2===this.substFormat&&(this.classDefOffset=e.Offset16,this.subClassSetCount=e.uint16,this.subClassSetOffsets=[...new Array(this.subClassSetCount)].map((t=>e.Offset16))),3===this.substFormat&&(Yd(this),this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.coverageOffsets=[...new Array(this.glyphCount)].map((t=>e.Offset16)),this.substLookupRecords=[...new Array(this.substitutionCount)].map((t=>new Xd(e))))}getSubRuleSet(e){if(1!==this.substFormat)throw new Error(`lookup type 5.${this.substFormat} has no subrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.subRuleSetOffsets[e],new ah(t)}getSubClassSet(e){if(2!==this.substFormat)throw new Error(`lookup type 5.${this.substFormat} has no subclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.subClassSetOffsets[e],new lh(t)}getCoverageTable(e){if(3!==this.substFormat&&!e)return super.getCoverageTable();if(!e)throw new Error(`lookup type 5.${this.substFormat} requires an coverage table index.`);let t=this.parser;return t.currentPosition=this.start+this.coverageOffsets[e],new Ed(t)}}class ah extends mu{constructor(e){super(e),this.subRuleCount=e.uint16,this.subRuleOffsets=[...new Array(this.subRuleCount)].map((t=>e.Offset16))}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.subRuleOffsets[e],new oh(t)}}class oh{constructor(e){this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.inputSequence=[...new Array(this.glyphCount-1)].map((t=>e.uint16)),this.substLookupRecords=[...new Array(this.substitutionCount)].map((t=>new Xd(e)))}}class lh extends mu{constructor(e){super(e),this.subClassRuleCount=e.uint16,this.subClassRuleOffsets=[...new Array(this.subClassRuleCount)].map((t=>e.Offset16))}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.subClassRuleOffsets[e],new ch(t)}}class ch extends oh{constructor(e){super(e)}}class uh extends Kd{constructor(e){super(e),1===this.substFormat&&(this.chainSubRuleSetCount=e.uint16,this.chainSubRuleSetOffsets=[...new Array(this.chainSubRuleSetCount)].map((t=>e.Offset16))),2===this.substFormat&&(this.backtrackClassDefOffset=e.Offset16,this.inputClassDefOffset=e.Offset16,this.lookaheadClassDefOffset=e.Offset16,this.chainSubClassSetCount=e.uint16,this.chainSubClassSetOffsets=[...new Array(this.chainSubClassSetCount)].map((t=>e.Offset16))),3===this.substFormat&&(Yd(this),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map((t=>e.Offset16)),this.inputGlyphCount=e.uint16,this.inputCoverageOffsets=[...new Array(this.inputGlyphCount)].map((t=>e.Offset16)),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[...new Array(this.lookaheadGlyphCount)].map((t=>e.Offset16)),this.seqLookupCount=e.uint16,this.seqLookupRecords=[...new Array(this.substitutionCount)].map((t=>new mh(e))))}getChainSubRuleSet(e){if(1!==this.substFormat)throw new Error(`lookup type 6.${this.substFormat} has no chainsubrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleSetOffsets[e],new dh(t)}getChainSubClassSet(e){if(2!==this.substFormat)throw new Error(`lookup type 6.${this.substFormat} has no chainsubclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubClassSetOffsets[e],new ph(t)}getCoverageFromOffset(e){if(3!==this.substFormat)throw new Error(`lookup type 6.${this.substFormat} does not use contextual coverage offsets.`);let t=this.parser;return t.currentPosition=this.start+e,new Ed(t)}}class dh extends mu{constructor(e){super(e),this.chainSubRuleCount=e.uint16,this.chainSubRuleOffsets=[...new Array(this.chainSubRuleCount)].map((t=>e.Offset16))}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new hh(t)}}class hh{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map((t=>e.uint16)),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map((t=>e.uint16)),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map((t=>e.uint16)),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.SubstCount)].map((t=>new Xd(e)))}}class ph extends mu{constructor(e){super(e),this.chainSubClassRuleCount=e.uint16,this.chainSubClassRuleOffsets=[...new Array(this.chainSubClassRuleCount)].map((t=>e.Offset16))}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new fh(t)}}class fh{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map((t=>e.uint16)),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map((t=>e.uint16)),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map((t=>e.uint16)),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.substitutionCount)].map((t=>new mh(e)))}}class mh extends mu{constructor(e){super(e),this.sequenceIndex=e.uint16,this.lookupListIndex=e.uint16}}class gh extends mu{constructor(e){super(e),this.substFormat=e.uint16,this.extensionLookupType=e.uint16,this.extensionOffset=e.Offset32}}class vh extends Kd{constructor(e){super(e),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map((t=>e.Offset16)),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[new Array(this.lookaheadGlyphCount)].map((t=>e.Offset16)),this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}var yh={buildSubtable:function(e,t){const n=new[void 0,Qd,Jd,eh,nh,rh,uh,gh,vh][e](t);return n.type=e,n}};class xh extends mu{constructor(e){super(e)}}class bh extends xh{constructor(e){super(e),console.log("lookup type 1")}}class wh extends xh{constructor(e){super(e),console.log("lookup type 2")}}class _h extends xh{constructor(e){super(e),console.log("lookup type 3")}}class jh extends xh{constructor(e){super(e),console.log("lookup type 4")}}class Sh extends xh{constructor(e){super(e),console.log("lookup type 5")}}class Ch extends xh{constructor(e){super(e),console.log("lookup type 6")}}class kh extends xh{constructor(e){super(e),console.log("lookup type 7")}}class Eh extends xh{constructor(e){super(e),console.log("lookup type 8")}}class Ph extends xh{constructor(e){super(e),console.log("lookup type 9")}}var Ih={buildSubtable:function(e,t){const n=new[void 0,bh,wh,_h,jh,Sh,Ch,kh,Eh,Ph][e](t);return n.type=e,n}};class Vh extends mu{static EMPTY={lookupCount:0,lookups:[]};constructor(e){super(e),this.lookupCount=e.uint16,this.lookups=[...new Array(this.lookupCount)].map((t=>e.Offset16))}}class Oh extends mu{constructor(e,t){super(e),this.ctType=t,this.lookupType=e.uint16,this.lookupFlag=e.uint16,this.subTableCount=e.uint16,this.subtableOffsets=[...new Array(this.subTableCount)].map((t=>e.Offset16)),this.markFilteringSet=e.uint16}get rightToLeft(){return!0&this.lookupFlag}get ignoreBaseGlyphs(){return!0&this.lookupFlag}get ignoreLigatures(){return!0&this.lookupFlag}get ignoreMarks(){return!0&this.lookupFlag}get useMarkFilteringSet(){return!0&this.lookupFlag}get markAttachmentType(){return!0&this.lookupFlag}getSubTable(e){const t="GSUB"===this.ctType?yh:Ih;return this.parser.currentPosition=this.start+this.subtableOffsets[e],t.buildSubtable(this.lookupType,this.parser)}}class Th extends gu{constructor(e,t,n){const{p:s,tableStart:i}=super(e,t,n);this.majorVersion=s.uint16,this.minorVersion=s.uint16,this.scriptListOffset=s.Offset16,this.featureListOffset=s.Offset16,this.lookupListOffset=s.Offset16,1===this.majorVersion&&1===this.minorVersion&&(this.featureVariationsOffset=s.Offset32);const r=!(this.scriptListOffset||this.featureListOffset||this.lookupListOffset);vu(this,"scriptList",(()=>r?Bd.EMPTY:(s.currentPosition=i+this.scriptListOffset,new Bd(s)))),vu(this,"featureList",(()=>r?Hd.EMPTY:(s.currentPosition=i+this.featureListOffset,new Hd(s)))),vu(this,"lookupList",(()=>r?Vh.EMPTY:(s.currentPosition=i+this.lookupListOffset,new Vh(s)))),this.featureVariationsOffset&&vu(this,"featureVariations",(()=>r?FeatureVariations.EMPTY:(s.currentPosition=i+this.featureVariationsOffset,new FeatureVariations(s))))}getSupportedScripts(){return this.scriptList.scriptRecords.map((e=>e.scriptTag))}getScriptTable(e){let t=this.scriptList.scriptRecords.find((t=>t.scriptTag===e));this.parser.currentPosition=this.scriptList.start+t.scriptOffset;let n=new Rd(this.parser);return n.scriptTag=e,n}ensureScriptTable(e){return"string"==typeof e?this.getScriptTable(e):e}getSupportedLangSys(e){const t=0!==(e=this.ensureScriptTable(e)).defaultLangSys,n=e.langSysRecords.map((e=>e.langSysTag));return t&&n.unshift("dflt"),n}getDefaultLangSysTable(e){let t=(e=this.ensureScriptTable(e)).defaultLangSys;if(0!==t){this.parser.currentPosition=e.start+t;let n=new zd(this.parser);return n.langSysTag="",n.defaultForScript=e.scriptTag,n}}getLangSysTable(e,t="dflt"){if("dflt"===t)return this.getDefaultLangSysTable(e);let n=(e=this.ensureScriptTable(e)).langSysRecords.find((e=>e.langSysTag===t));this.parser.currentPosition=e.start+n.langSysOffset;let s=new zd(this.parser);return s.langSysTag=t,s}getFeatures(e){return e.featureIndices.map((e=>this.getFeature(e)))}getFeature(e){let t;if(t=parseInt(e)==e?this.featureList.featureRecords[e]:this.featureList.featureRecords.find((t=>t.featureTag===e)),!t)return;this.parser.currentPosition=this.featureList.start+t.featureOffset;let n=new Wd(this.parser);return n.featureTag=t.featureTag,n}getLookups(e){return e.lookupListIndices.map((e=>this.getLookup(e)))}getLookup(e,t){let n=this.lookupList.lookups[e];return this.parser.currentPosition=this.lookupList.start+n,new Oh(this.parser,t)}}var Ah=Object.freeze({__proto__:null,GSUB:class extends Th{constructor(e,t){super(e,t,"GSUB")}getLookup(e){return super.getLookup(e,"GSUB")}}});var Nh=Object.freeze({__proto__:null,GPOS:class extends Th{constructor(e,t){super(e,t,"GPOS")}getLookup(e){return super.getLookup(e,"GPOS")}}});class Fh extends mu{constructor(e){super(e),this.numEntries=e.uint16,this.documentRecords=[...new Array(this.numEntries)].map((t=>new Mh(e)))}getDocument(e){let t=this.documentRecords[e];if(!t)return"";let n=this.start+t.svgDocOffset;return this.parser.currentPosition=n,this.parser.readBytes(t.svgDocLength)}getDocumentForGlyph(e){let t=this.documentRecords.findIndex((t=>t.startGlyphID<=e&&e<=t.endGlyphID));return-1===t?"":this.getDocument(t)}}class Mh{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.svgDocOffset=e.Offset32,this.svgDocLength=e.uint32}}var Bh=Object.freeze({__proto__:null,SVG:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.offsetToSVGDocumentList=n.Offset32,n.currentPosition=this.tableStart+this.offsetToSVGDocumentList,this.documentList=new Fh(n)}}});class Dh{constructor(e){this.tag=e.tag,this.minValue=e.fixed,this.defaultValue=e.fixed,this.maxValue=e.fixed,this.flags=e.flags(16),this.axisNameID=e.uint16}}class Rh{constructor(e,t,n){let s=e.currentPosition;this.subfamilyNameID=e.uint16,e.uint16,this.coordinates=[...new Array(t)].map((t=>e.fixed)),e.currentPosition-s<n&&(this.postScriptNameID=e.uint16)}}var Lh=Object.freeze({__proto__:null,fvar:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.axesArrayOffset=n.Offset16,n.uint16,this.axisCount=n.uint16,this.axisSize=n.uint16,this.instanceCount=n.uint16,this.instanceSize=n.uint16;const s=this.tableStart+this.axesArrayOffset;vu(this,"axes",(()=>(n.currentPosition=s,[...new Array(this.axisCount)].map((e=>new Dh(n))))));const i=s+this.axisCount*this.axisSize;vu(this,"instances",(()=>{let e=[];for(let t=0;t<this.instanceCount;t++)n.currentPosition=i+t*this.instanceSize,e.push(new Rh(n,this.axisCount,this.instanceSize));return e}))}getSupportedAxes(){return this.axes.map((e=>e.tag))}getAxis(e){return this.axes.find((t=>t.tag===e))}}});var zh=Object.freeze({__proto__:null,cvt:class extends gu{constructor(e,t){const{p:n}=super(e,t),s=e.length/2;vu(this,"items",(()=>[...new Array(s)].map((e=>n.fword))))}}});var Hh=Object.freeze({__proto__:null,fpgm:class extends gu{constructor(e,t){const{p:n}=super(e,t);vu(this,"instructions",(()=>[...new Array(e.length)].map((e=>n.uint8))))}}});class Gh{constructor(e){this.rangeMaxPPEM=e.uint16,this.rangeGaspBehavior=e.uint16}}var Wh=Object.freeze({__proto__:null,gasp:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numRanges=n.uint16;vu(this,"gaspRanges",(()=>[...new Array(this.numRanges)].map((e=>new Gh(n)))))}}});var Uh=Object.freeze({__proto__:null,glyf:class extends gu{constructor(e,t){super(e,t)}getGlyphData(e,t){return this.parser.currentPosition=this.tableStart+e,this.parser.readBytes(t)}}});var qh=Object.freeze({__proto__:null,loca:class extends gu{constructor(e,t,n){const{p:s}=super(e,t),i=n.maxp.numGlyphs+1;0===n.head.indexToLocFormat?(this.x2=!0,vu(this,"offsets",(()=>[...new Array(i)].map((e=>s.Offset16))))):vu(this,"offsets",(()=>[...new Array(i)].map((e=>s.Offset32))))}getGlyphDataOffsetAndLength(e){let t=this.offsets[e]*this.x2?2:1;return{offset:t,length:(this.offsets[e+1]*this.x2?2:1)-t}}}});var Zh=Object.freeze({__proto__:null,prep:class extends gu{constructor(e,t){const{p:n}=super(e,t);vu(this,"instructions",(()=>[...new Array(e.length)].map((e=>n.uint8))))}}});var Yh=Object.freeze({__proto__:null,CFF:class extends gu{constructor(e,t){const{p:n}=super(e,t);vu(this,"data",(()=>n.readBytes()))}}});var Kh=Object.freeze({__proto__:null,CFF2:class extends gu{constructor(e,t){const{p:n}=super(e,t);vu(this,"data",(()=>n.readBytes()))}}});class Xh{constructor(e){this.glyphIndex=e.uint16,this.vertOriginY=e.int16}}var Qh=Object.freeze({__proto__:null,VORG:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.defaultVertOriginY=n.int16,this.numVertOriginYMetrics=n.uint16,vu(this,"vertORiginYMetrics",(()=>[...new Array(this.numVertOriginYMetrics)].map((e=>new Xh(n)))))}}});class Jh{constructor(e){this.indexSubTableArrayOffset=e.Offset32,this.indexTablesSize=e.uint32,this.numberofIndexSubTables=e.uint32,this.colorRef=e.uint32,this.hori=new ep(e),this.vert=new ep(e),this.startGlyphIndex=e.uint16,this.endGlyphIndex=e.uint16,this.ppemX=e.uint8,this.ppemY=e.uint8,this.bitDepth=e.uint8,this.flags=e.int8}}class $h{constructor(e){this.hori=new ep(e),this.vert=new ep(e),this.ppemX=e.uint8,this.ppemY=e.uint8,this.substitutePpemX=e.uint8,this.substitutePpemY=e.uint8}}class ep{constructor(e){this.ascender=e.int8,this.descender=e.int8,this.widthMax=e.uint8,this.caretSlopeNumerator=e.int8,this.caretSlopeDenominator=e.int8,this.caretOffset=e.int8,this.minOriginSB=e.int8,this.minAdvanceSB=e.int8,this.maxBeforeBL=e.int8,this.minAfterBL=e.int8,this.pad1=e.int8,this.pad2=e.int8}}class tp extends gu{constructor(e,t,n){const{p:s}=super(e,t,n);this.majorVersion=s.uint16,this.minorVersion=s.uint16,this.numSizes=s.uint32,vu(this,"bitMapSizes",(()=>[...new Array(this.numSizes)].map((e=>new Jh(s)))))}}var np=Object.freeze({__proto__:null,EBLC:tp});class sp extends gu{constructor(e,t,n){const{p:s}=super(e,t,n);this.majorVersion=s.uint16,this.minorVersion=s.uint16}}var ip=Object.freeze({__proto__:null,EBDT:sp});var rp=Object.freeze({__proto__:null,EBSC:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.numSizes=n.uint32,vu(this,"bitmapScales",(()=>[...new Array(this.numSizes)].map((e=>new $h(n)))))}}});var ap=Object.freeze({__proto__:null,CBLC:class extends tp{constructor(e,t){super(e,t,"CBLC")}}});var op=Object.freeze({__proto__:null,CBDT:class extends sp{constructor(e,t){super(e,t,"CBDT")}}});var lp=Object.freeze({__proto__:null,sbix:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.flags=n.flags(16),this.numStrikes=n.uint32,vu(this,"strikeOffsets",(()=>[...new Array(this.numStrikes)].map((e=>n.Offset32))))}}});class cp{constructor(e){this.gID=e.uint16,this.firstLayerIndex=e.uint16,this.numLayers=e.uint16}}class up{constructor(e){this.gID=e.uint16,this.paletteIndex=e.uint16}}var dp=Object.freeze({__proto__:null,COLR:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numBaseGlyphRecords=n.uint16,this.baseGlyphRecordsOffset=n.Offset32,this.layerRecordsOffset=n.Offset32,this.numLayerRecords=n.uint16}getBaseGlyphRecord(e){let t=this.tableStart+this.baseGlyphRecordsOffset;this.parser.currentPosition=t;let n=new cp(this.parser),s=n.gID,i=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=i;let r=new cp(this.parser),a=r.gID;if(s===e)return n;if(a===e)return r;for(;t!==i;){let n=t+(i-t)/12;this.parser.currentPosition=n;let s=new cp(this.parser),r=s.gID;if(r===e)return s;r>e?i=n:r<e&&(t=n)}return!1}getLayers(e){let t=this.getBaseGlyphRecord(e);return this.parser.currentPosition=this.tableStart+this.layerRecordsOffset+4*t.firstLayerIndex,[...new Array(t.numLayers)].map((e=>new up(p)))}}});class hp{constructor(e){this.blue=e.uint8,this.green=e.uint8,this.red=e.uint8,this.alpha=e.uint8}}class pp{constructor(e,t){this.paletteTypes=[...new Array(t)].map((t=>e.uint32))}}class fp{constructor(e,t){this.paletteLabels=[...new Array(t)].map((t=>e.uint16))}}class mp{constructor(e,t){this.paletteEntryLabels=[...new Array(t)].map((t=>e.uint16))}}var gp=Object.freeze({__proto__:null,CPAL:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numPaletteEntries=n.uint16;const s=this.numPalettes=n.uint16;this.numColorRecords=n.uint16,this.offsetFirstColorRecord=n.Offset32,this.colorRecordIndices=[...new Array(this.numPalettes)].map((e=>n.uint16)),vu(this,"colorRecords",(()=>(n.currentPosition=this.tableStart+this.offsetFirstColorRecord,[...new Array(this.numColorRecords)].map((e=>new hp(n)))))),1===this.version&&(this.offsetPaletteTypeArray=n.Offset32,this.offsetPaletteLabelArray=n.Offset32,this.offsetPaletteEntryLabelArray=n.Offset32,vu(this,"paletteTypeArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteTypeArray,new pp(n,s)))),vu(this,"paletteLabelArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new fp(n,s)))),vu(this,"paletteEntryLabelArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new mp(n,s)))))}}});class vp{constructor(e){this.format=e.uint32,this.length=e.uint32,this.offset=e.Offset32}}class yp{constructor(e){e.uint16,e.uint16,this.signatureLength=e.uint32,this.signature=e.readBytes(this.signatureLength)}}var xp=Object.freeze({__proto__:null,DSIG:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint32,this.numSignatures=n.uint16,this.flags=n.uint16,this.signatureRecords=[...new Array(this.numSignatures)].map((e=>new vp(n)))}getData(e){const t=this.signatureRecords[e];return this.parser.currentPosition=this.tableStart+t.offset,new yp(this.parser)}}});class bp{constructor(e,t){this.pixelSize=e.uint8,this.maxWidth=e.uint8,this.widths=e.readBytes(t)}}var wp=Object.freeze({__proto__:null,hdmx:class extends gu{constructor(e,t,n){const{p:s}=super(e,t),i=n.hmtx.numGlyphs;this.version=s.uint16,this.numRecords=s.int16,this.sizeDeviceRecord=s.int32,this.records=[...new Array(numRecords)].map((e=>new bp(s,i)))}}});class _p{constructor(e){this.version=e.uint16,this.length=e.uint16,this.coverage=e.flags(8),this.format=e.uint8,0===this.format&&(this.nPairs=e.uint16,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16,vu(this,"pairs",(()=>[...new Array(this.nPairs)].map((t=>new jp(e)))))),2===this.format&&console.warn("Kern subtable format 2 is not supported: this parser currently only parses universal table data.")}get horizontal(){return this.coverage[0]}get minimum(){return this.coverage[1]}get crossstream(){return this.coverage[2]}get override(){return this.coverage[3]}}class jp{constructor(e){this.left=e.uint16,this.right=e.uint16,this.value=e.fword}}var Sp=Object.freeze({__proto__:null,kern:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.nTables=n.uint16,vu(this,"tables",(()=>{let e=this.tableStart+4;const t=[];for(let s=0;s<this.nTables;s++){n.currentPosition=e;let s=new _p(n);t.push(s),e+=s}return t}))}}});var Cp=Object.freeze({__proto__:null,LTSH:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numGlyphs=n.uint16,this.yPels=n.readBytes(this.numGlyphs)}}});var kp=Object.freeze({__proto__:null,MERG:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.mergeClassCount=n.uint16,this.mergeDataOffset=n.Offset16,this.classDefCount=n.uint16,this.offsetToClassDefOffsets=n.Offset16,vu(this,"mergeEntryMatrix",(()=>[...new Array(this.mergeClassCount)].map((e=>n.readBytes(this.mergeClassCount))))),console.warn("Full MERG parsing is currently not supported."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}}});class Ep{constructor(e,t){this.tableStart=e,this.parser=t,this.tag=t.tag,this.dataOffset=t.Offset32,this.dataLength=t.uint32}getData(){return this.parser.currentField=this.tableStart+this.dataOffset,this.parser.readBytes(this.dataLength)}}var Pp=Object.freeze({__proto__:null,meta:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint32,this.flags=n.uint32,n.uint32,this.dataMapsCount=n.uint32,this.dataMaps=[...new Array(this.dataMapsCount)].map((e=>new Ep(this.tableStart,n)))}}});var Ip=Object.freeze({__proto__:null,PCLT:class extends gu{constructor(e,t){super(e,t),console.warn("This font uses a PCLT table, which is currently not supported by this parser."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}}});class Vp{constructor(e){this.bCharSet=e.uint8,this.xRatio=e.uint8,this.yStartRatio=e.uint8,this.yEndRatio=e.uint8}}class Op{constructor(e){this.recs=e.uint16,this.startsz=e.uint8,this.endsz=e.uint8,this.records=[...new Array(this.recs)].map((t=>new Tp(e)))}}class Tp{constructor(e){this.yPelHeight=e.uint16,this.yMax=e.int16,this.yMin=e.int16}}var Ap=Object.freeze({__proto__:null,VDMX:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numRecs=n.uint16,this.numRatios=n.uint16,this.ratRanges=[...new Array(this.numRatios)].map((e=>new Vp(n))),this.offsets=[...new Array(this.numRatios)].map((e=>n.Offset16)),this.VDMXGroups=[...new Array(this.numRecs)].map((e=>new Op(n)))}}});var Np=Object.freeze({__proto__:null,vhea:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.fixed,this.ascent=this.vertTypoAscender=n.int16,this.descent=this.vertTypoDescender=n.int16,this.lineGap=this.vertTypoLineGap=n.int16,this.advanceHeightMax=n.int16,this.minTopSideBearing=n.int16,this.minBottomSideBearing=n.int16,this.yMaxExtent=n.int16,this.caretSlopeRise=n.int16,this.caretSlopeRun=n.int16,this.caretOffset=n.int16,this.reserved=n.int16,this.reserved=n.int16,this.reserved=n.int16,this.reserved=n.int16,this.metricDataFormat=n.int16,this.numOfLongVerMetrics=n.uint16,n.verifyLength()}}});class Fp{constructor(e,t){this.advanceHeight=e,this.topSideBearing=t}}var Mp=Object.freeze({__proto__:null,vmtx:class extends gu{constructor(e,t,n){super(e,t);const s=n.vhea.numOfLongVerMetrics,i=n.maxp.numGlyphs,r=p.currentPosition;if(lazy(this,"vMetrics",(()=>(p.currentPosition=r,[...new Array(s)].map((e=>new Fp(p.uint16,p.int16)))))),s<i){const e=r+4*s;lazy(this,"topSideBearings",(()=>(p.currentPosition=e,[...new Array(i-s)].map((e=>p.int16)))))}}}});const{kebabCase:Bp}=ne(b.privateApis);var Dp=function(){const{installFonts:e}=(0,h.useContext)(Gc),[t,n]=(0,h.useState)(!1),[s,i]=(0,h.useState)(!1),r=async e=>{i(null),n(!0);const t=new Set,s=[...e];let r=!1;const a=s.map((async e=>{const n=await async function(e){const t=new Ru("Uploaded Font");try{const n=await l(e);return await t.fromDataBuffer(n,"font"),!0}catch(e){return!1}}(e);if(!n)return r=!0,null;if(t.has(e.name))return null;const s=e.name.split(".").pop().toLowerCase();return Cc.includes(s)?(t.add(e.name),e):null})),c=(await Promise.all(a)).filter((e=>null!==e));if(c.length>0)o(c);else{const e=r?(0,w.__)("Sorry, you are not allowed to upload this file type."):(0,w.__)("No fonts found to install.");i({type:"error",message:e}),n(!1)}},o=async e=>{const t=await Promise.all(e.map((async e=>{const t=await c(e);return await Nc(t,t.file,"all"),t})));u(t)};async function l(e){return new Promise(((t,n)=>{const s=new window.FileReader;s.readAsArrayBuffer(e),s.onload=()=>t(s.result),s.onerror=n}))}const c=async e=>{const t=await l(e),n=new Ru("Uploaded Font");n.fromDataBuffer(t,e.name);const s=(await new Promise((e=>n.onload=e))).detail.font,{name:i}=s.opentype.tables,r=i.get(16)||i.get(1),a=i.get(2).toLowerCase().includes("italic"),o=s.opentype.tables["OS/2"].usWeightClass||"normal",c=!!s.opentype.tables.fvar&&s.opentype.tables.fvar.axes.find((({tag:e})=>"wght"===e));return{file:e,fontFamily:r,fontStyle:a?"italic":"normal",fontWeight:(c?`${c.minValue} ${c.maxValue}`:null)||o}},u=async t=>{const s=function(e){const t=e.reduce(((e,t)=>(e[t.fontFamily]||(e[t.fontFamily]={name:t.fontFamily,fontFamily:t.fontFamily,slug:Bp(t.fontFamily.toLowerCase()),fontFace:[]}),e[t.fontFamily].fontFace.push(t),e)),{});return Object.values(t)}(t);try{await e(s),i({type:"success",message:(0,w.__)("Fonts were installed successfully.")})}catch(e){i({type:"error",message:e.message,errors:e?.installationErrors})}n(!1)};return(0,a.jsxs)("div",{className:"font-library-modal__tabpanel-layout",children:[(0,a.jsx)(b.DropZone,{onFilesDrop:e=>{r(e)}}),(0,a.jsxs)(b.__experimentalVStack,{className:"font-library-modal__local-fonts",children:[s&&(0,a.jsxs)(b.Notice,{status:s.type,__unstableHTML:!0,onRemove:()=>i(null),children:[s.message,s.errors&&(0,a.jsx)("ul",{children:s.errors.map(((e,t)=>(0,a.jsx)("li",{children:e},t)))})]}),t&&(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)("div",{className:"font-library-modal__upload-area",children:(0,a.jsx)(b.ProgressBar,{})})}),!t&&(0,a.jsx)(b.FormFileUpload,{accept:Cc.map((e=>`.${e}`)).join(","),multiple:!0,onChange:e=>{r(e.target.files)},render:({openFileDialog:e})=>(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,className:"font-library-modal__upload-area",onClick:e,children:(0,w.__)("Upload font")})}),(0,a.jsx)(b.__experimentalSpacer,{margin:2}),(0,a.jsx)(b.__experimentalText,{className:"font-library-modal__upload-area__text",children:(0,w.__)("Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2.")})]})]})};const{Tabs:Rp}=ne(b.privateApis),Lp={id:"installed-fonts",title:(0,w._x)("Library","Font library")},zp={id:"upload-fonts",title:(0,w._x)("Upload","noun")};var Hp=function({onRequestClose:e,defaultTabId:t="installed-fonts"}){const{collections:n}=(0,h.useContext)(Gc),s=(0,c.useSelect)((e=>e(j.store).canUser("create",{kind:"postType",name:"wp_font_family"})),[]),i=[Lp];return s&&(i.push(zp),i.push(...(e=>e.map((({slug:t,name:n})=>({id:t,title:1===e.length&&"google-fonts"===t?(0,w.__)("Install Fonts"):n}))))(n||[]))),(0,a.jsx)(b.Modal,{title:(0,w.__)("Fonts"),onRequestClose:e,isFullScreen:!0,className:"font-library-modal",children:(0,a.jsxs)(Rp,{defaultTabId:t,children:[(0,a.jsx)("div",{className:"font-library-modal__tablist-container",children:(0,a.jsx)(Rp.TabList,{children:i.map((({id:e,title:t})=>(0,a.jsx)(Rp.Tab,{tabId:e,children:t},e)))})}),i.map((({id:e})=>{let t;switch(e){case"upload-fonts":t=(0,a.jsx)(Dp,{});break;case"installed-fonts":t=(0,a.jsx)(Jc,{});break;default:t=(0,a.jsx)(au,{slug:e})}return(0,a.jsx)(Rp.TabPanel,{tabId:e,focusable:!1,children:t},e)}))]})})};var Gp=function({font:e}){const{handleSetLibraryFontSelected:t,setModalTabOpen:n}=(0,h.useContext)(Gc),s=e?.fontFace?.length||1,i=Qo(e);return(0,a.jsx)(b.__experimentalItem,{onClick:()=>{t(e),n("installed-fonts")},children:(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsx)(b.FlexItem,{style:i,children:e.name}),(0,a.jsx)(b.FlexItem,{className:"edit-site-global-styles-screen-typography__font-variants-count",children:(0,w.sprintf)((0,w._n)("%d variant","%d variants",s),s)})]})})};const{useGlobalSetting:Wp}=ne(x.privateApis);function Up(e,t){return e?e.map((e=>Vc(e,{source:t}))):[]}function qp(){const{baseCustomFonts:e,modalTabOpen:t,setModalTabOpen:n}=(0,h.useContext)(Gc),[s]=Wp("typography.fontFamilies"),[i]=Wp("typography.fontFamilies",void 0,"base"),r=[...Up(s?.theme,"theme"),...Up(s?.custom,"custom")].sort(((e,t)=>e.name.localeCompare(t.name))),o=0<r.length,l=o||i?.theme?.length>0||e?.length>0;return(0,a.jsxs)(a.Fragment,{children:[!!t&&(0,a.jsx)(Hp,{onRequestClose:()=>n(null),defaultTabId:t}),(0,a.jsxs)(b.__experimentalVStack,{spacing:2,children:[(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsx)(Ol,{level:3,children:(0,w.__)("Fonts")}),(0,a.jsx)(b.Button,{onClick:()=>n("installed-fonts"),label:(0,w.__)("Manage fonts"),icon:yc,size:"small"})]}),r.length>0&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(b.__experimentalItemGroup,{size:"large",isBordered:!0,isSeparated:!0,children:r.map((e=>(0,a.jsx)(Gp,{font:e},e.slug)))})}),!o&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.__experimentalText,{as:"p",children:l?(0,w.__)("No fonts activated."):(0,w.__)("No fonts installed.")}),(0,a.jsx)(b.Button,{className:"edit-site-global-styles-font-families__manage-fonts",variant:"secondary",__next40pxDefaultSize:!0,onClick:()=>{n(l?"installed-fonts":"upload-fonts")},children:l?(0,w.__)("Manage fonts"):(0,w.__)("Add fonts")})]})]})]})}var Zp=({...e})=>(0,a.jsx)(Wc,{children:(0,a.jsx)(qp,{...e})});var Yp=function(){const e=(0,c.useSelect)((e=>e(f.store).getEditorSettings().fontLibraryEnabled),[]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Typography"),description:(0,w.__)("Available fonts, typographic styles, and the application of those styles.")}),(0,a.jsx)("div",{className:"edit-site-global-styles-screen",children:(0,a.jsxs)(b.__experimentalVStack,{spacing:7,children:[(0,a.jsx)(gc,{title:(0,w.__)("Typesets")}),e&&(0,a.jsx)(Zp,{}),(0,a.jsx)(tc,{}),(0,a.jsx)(vc,{})]})})]})};const{useGlobalStyle:Kp,useGlobalSetting:Xp,useSettingsForBlockElement:Qp,TypographyPanel:Jp}=ne(x.privateApis);function $p({element:e,headingLevel:t}){let n=[];"heading"===e?n=n.concat(["elements",t]):e&&"text"!==e&&(n=n.concat(["elements",e]));const s=n.join("."),[i]=Kp(s,void 0,"user",{shouldDecodeEncode:!1}),[r,o]=Kp(s,void 0,"all",{shouldDecodeEncode:!1}),[l]=Xp(""),c=Qp(l,void 0,"heading"===e?t:e);return(0,a.jsx)(Jp,{inheritedValue:r,value:i,onChange:o,settings:c})}const{useGlobalStyle:ef}=ne(x.privateApis);function tf({name:e,element:t,headingLevel:n}){let s="";"heading"===t?s=`elements.${n}.`:t&&"text"!==t&&(s=`elements.${t}.`);const[i]=ef(s+"typography.fontFamily",e),[r]=ef(s+"color.gradient",e),[o]=ef(s+"color.background",e),[l]=ef("color.background"),[c]=ef(s+"color.text",e),[u]=ef(s+"typography.fontSize",e),[d]=ef(s+"typography.fontStyle",e),[h]=ef(s+"typography.fontWeight",e),[p]=ef(s+"typography.letterSpacing",e),f="link"===t?{textDecoration:"underline"}:{};return(0,a.jsx)("div",{className:"edit-site-typography-preview",style:{fontFamily:i??"serif",background:r??o??l,color:c,fontSize:u,fontStyle:d,fontWeight:h,letterSpacing:p,...f},children:"Aa"})}const nf={text:{description:(0,w.__)("Manage the fonts used on the site."),title:(0,w.__)("Text")},link:{description:(0,w.__)("Manage the fonts and typography used on the links."),title:(0,w.__)("Links")},heading:{description:(0,w.__)("Manage the fonts and typography used on headings."),title:(0,w.__)("Headings")},caption:{description:(0,w.__)("Manage the fonts and typography used on captions."),title:(0,w.__)("Captions")},button:{description:(0,w.__)("Manage the fonts and typography used on buttons."),title:(0,w.__)("Buttons")}};var sf=function({element:e}){const[t,n]=(0,h.useState)("heading");return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:nf[e].title,description:nf[e].description}),(0,a.jsx)(b.__experimentalSpacer,{marginX:4,children:(0,a.jsx)(tf,{element:e,headingLevel:t})}),"heading"===e&&(0,a.jsx)(b.__experimentalSpacer,{marginX:4,marginBottom:"1em",children:(0,a.jsxs)(b.__experimentalToggleGroupControl,{label:(0,w.__)("Select heading level"),hideLabelFromVision:!0,value:t,onChange:n,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0,children:[(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"heading",showTooltip:!0,"aria-label":(0,w.__)("All headings"),label:(0,w._x)("All","heading levels")}),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"h1",showTooltip:!0,"aria-label":(0,w.__)("Heading 1"),label:(0,w.__)("H1")}),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"h2",showTooltip:!0,"aria-label":(0,w.__)("Heading 2"),label:(0,w.__)("H2")}),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"h3",showTooltip:!0,"aria-label":(0,w.__)("Heading 3"),label:(0,w.__)("H3")}),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"h4",showTooltip:!0,"aria-label":(0,w.__)("Heading 4"),label:(0,w.__)("H4")}),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"h5",showTooltip:!0,"aria-label":(0,w.__)("Heading 5"),label:(0,w.__)("H5")}),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"h6",showTooltip:!0,"aria-label":(0,w.__)("Heading 6"),label:(0,w.__)("H6")})]})}),(0,a.jsx)($p,{element:e,headingLevel:t})]})};const{useGlobalStyle:rf}=ne(x.privateApis);var af=function({fontSize:e}){const[t]=rf("typography"),n=e?.fluid?.min&&e?.fluid?.max?{minimumFontSize:e.fluid.min,maximumFontSize:e.fluid.max}:{fontSize:e.size},s=(0,x.getComputedFluidTypographyValue)(n);return(0,a.jsx)("div",{className:"edit-site-typography-preview",style:{fontSize:s,fontFamily:t?.fontFamily??"serif"},children:(0,w.__)("Aa")})};var of=function({fontSize:e,isOpen:t,toggleOpen:n,handleRemoveFontSize:s}){return(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,w.__)("Cancel"),confirmButtonText:(0,w.__)("Delete"),onCancel:()=>{n()},onConfirm:async()=>{n(),s(e)},size:"medium",children:e&&(0,w.sprintf)((0,w.__)('Are you sure you want to delete "%s" font size preset?'),e.name)})};var lf=function({fontSize:e,toggleOpen:t,handleRename:n}){const[s,i]=(0,h.useState)(e.name);return(0,a.jsx)(b.Modal,{onRequestClose:t,focusOnMount:"firstContentElement",title:(0,w.__)("Rename"),size:"small",children:(0,a.jsx)("form",{onSubmit:e=>{e.preventDefault(),s.trim()&&n(s),t(),t()},children:(0,a.jsxs)(b.__experimentalVStack,{spacing:"3",children:[(0,a.jsx)(b.__experimentalInputControl,{__next40pxDefaultSize:!0,autoComplete:"off",value:s,onChange:i,label:(0,w.__)("Name"),placeholder:(0,w.__)("Font size preset name")}),(0,a.jsxs)(b.__experimentalHStack,{justify:"right",children:[(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,w.__)("Cancel")}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,w.__)("Save")})]})]})})})};const cf=["px","em","rem","vw","vh"];var uf=function({__nextHasNoMarginBottom:e,...t}){const{baseControlProps:n}=(0,b.useBaseControlProps)(t),{value:s,onChange:i,fallbackValue:r,disabled:o,label:l}=t,c=(0,b.__experimentalUseCustomUnits)({availableUnits:cf}),[u,d="px"]=(0,b.__experimentalParseQuantityAndUnitFromRawValue)(s,c),h=!!d&&["em","rem","vw","vh"].includes(d);return(0,a.jsx)(b.BaseControl,{...n,__nextHasNoMarginBottom:!0,children:(0,a.jsxs)(b.Flex,{children:[(0,a.jsx)(b.FlexItem,{isBlock:!0,children:(0,a.jsx)(b.__experimentalUnitControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:l,hideLabelFromVision:!0,value:s,onChange:e=>{i(e)},units:c,min:0,disabled:o})}),(0,a.jsx)(b.FlexItem,{isBlock:!0,children:(0,a.jsx)(b.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,a.jsx)(b.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:l,hideLabelFromVision:!0,value:u,initialPosition:r,withInputField:!1,onChange:e=>{i?.(e+d)},min:0,max:h?10:100,step:h?.1:1,disabled:o})})})]})})};const{Menu:df}=ne(b.privateApis),{useGlobalSetting:hf}=ne(x.privateApis);var pf=function(){const[e,t]=(0,h.useState)(!1),[n,s]=(0,h.useState)(!1),{params:{origin:i,slug:r},goBack:o}=(0,b.useNavigator)(),[l,c]=hf("typography.fontSizes"),[u]=hf("typography.fluid"),d=l[i]??[],p=d.find((e=>e.slug===r));if((0,h.useEffect)((()=>{r&&!p&&o()}),[r,p,o]),!i||!r||!p)return null;const f=void 0!==p?.fluid?!!p.fluid:!!u,m="object"==typeof p?.fluid,g=(e,t)=>{const n=d.map((n=>n.slug===r?{...n,[e]:t}:n));c({...l,[i]:n})},v=()=>{t(!e)},y=()=>{s(!n)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(of,{fontSize:p,isOpen:e,toggleOpen:v,handleRemoveFontSize:()=>{const e=d.filter((e=>e.slug!==r));c({...l,[i]:e})}}),n&&(0,a.jsx)(lf,{fontSize:p,toggleOpen:y,handleRename:e=>{g("name",e)}}),(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",align:"flex-start",children:[(0,a.jsx)(xl,{title:p.name,description:(0,w.sprintf)((0,w.__)("Manage the font size %s."),p.name)}),"custom"===i&&(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.__experimentalSpacer,{marginTop:3,marginBottom:0,paddingX:4,children:(0,a.jsxs)(df,{children:[(0,a.jsx)(df.TriggerButton,{render:(0,a.jsx)(b.Button,{size:"small",icon:No,label:(0,w.__)("Font size options")})}),(0,a.jsxs)(df.Popover,{children:[(0,a.jsx)(df.Item,{onClick:y,children:(0,a.jsx)(df.ItemLabel,{children:(0,w.__)("Rename")})}),(0,a.jsx)(df.Item,{onClick:v,children:(0,a.jsx)(df.ItemLabel,{children:(0,w.__)("Delete")})})]})]})})})]}),(0,a.jsx)(b.__experimentalView,{children:(0,a.jsx)(b.__experimentalSpacer,{paddingX:4,marginBottom:0,paddingBottom:6,children:(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(af,{fontSize:p})}),(0,a.jsx)(uf,{label:(0,w.__)("Size"),value:m?"":p.size,onChange:e=>{g("size",e)},disabled:m}),(0,a.jsx)(b.ToggleControl,{label:(0,w.__)("Fluid typography"),help:(0,w.__)("Scale the font size dynamically to fit the screen or viewport."),checked:f,onChange:e=>{g("fluid",e)},__nextHasNoMarginBottom:!0}),f&&(0,a.jsx)(b.ToggleControl,{label:(0,w.__)("Custom fluid values"),help:(0,w.__)("Set custom min and max values for the fluid font size."),checked:m,onChange:e=>{g("fluid",!e||{min:p.size,max:p.size})},__nextHasNoMarginBottom:!0}),m&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(uf,{label:(0,w.__)("Minimum"),value:p.fluid?.min,onChange:e=>{g("fluid",{...p.fluid,min:e})}}),(0,a.jsx)(uf,{label:(0,w.__)("Maximum"),value:p.fluid?.max,onChange:e=>{g("fluid",{...p.fluid,max:e})}})]})]})})})]})]})},ff=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var mf=function({text:e,confirmButtonText:t,isOpen:n,toggleOpen:s,onConfirm:i}){return(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:n,cancelButtonText:(0,w.__)("Cancel"),confirmButtonText:t,onCancel:()=>{s()},onConfirm:async()=>{s(),i()},size:"medium",children:e})};const{Menu:gf}=ne(b.privateApis),{useGlobalSetting:vf}=ne(x.privateApis);function yf({label:e,origin:t,sizes:n,handleAddFontSize:s,handleResetFontSizes:i}){const[r,o]=(0,h.useState)(!1),l=()=>o(!r),c="custom"===t?(0,w.__)("Are you sure you want to remove all custom font size presets?"):(0,w.__)("Are you sure you want to reset all font size presets to their default values?");return(0,a.jsxs)(a.Fragment,{children:[r&&(0,a.jsx)(mf,{text:c,confirmButtonText:"custom"===t?(0,w.__)("Remove"):(0,w.__)("Reset"),isOpen:r,toggleOpen:l,onConfirm:i}),(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsxs)(b.__experimentalHStack,{children:[(0,a.jsx)(Ol,{level:3,children:e}),(0,a.jsxs)(b.FlexItem,{className:"edit-site-global-styles__typography-panel__options-container",children:["custom"===t&&(0,a.jsx)(b.Button,{label:(0,w.__)("Add font size"),icon:ff,size:"small",onClick:s}),!!i&&(0,a.jsxs)(gf,{children:[(0,a.jsx)(gf.TriggerButton,{render:(0,a.jsx)(b.Button,{size:"small",icon:No,label:(0,w.__)("Font size presets options")})}),(0,a.jsx)(gf.Popover,{children:(0,a.jsx)(gf.Item,{onClick:l,children:(0,a.jsx)(gf.ItemLabel,{children:"custom"===t?(0,w.__)("Remove font size presets"):(0,w.__)("Reset font size presets")})})})]})]})]}),!!n.length&&(0,a.jsx)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:n.map((e=>(0,a.jsx)(Bo,{path:`/typography/font-sizes/${t}/${e.slug}`,children:(0,a.jsxs)(b.__experimentalHStack,{children:[(0,a.jsx)(b.FlexItem,{className:"edit-site-font-size__item",children:e.name}),(0,a.jsx)(b.FlexItem,{display:"flex",children:(0,a.jsx)(qa,{icon:(0,w.isRTL)()?za:La})})]})},e.slug)))})]})]})}var xf=function(){const[e,t]=vf("typography.fontSizes.theme"),[n]=vf("typography.fontSizes.theme",null,"base"),[s,i]=vf("typography.fontSizes.default"),[r]=vf("typography.fontSizes.default",null,"base"),[o=[],l]=vf("typography.fontSizes.custom"),[c]=vf("typography.defaultFontSizes"),u=()=>{const e=$o(o,"custom-"),t={name:(0,w.sprintf)((0,w.__)("New Font Size %d"),e),size:"16px",slug:`custom-${e}`};l([...o,t])},d=(e,t)=>e.map((e=>e.size)).join("")===t.map((e=>e.size)).join("");return(0,a.jsxs)(b.__experimentalVStack,{spacing:2,children:[(0,a.jsx)(xl,{title:(0,w.__)("Font size presets"),description:(0,w.__)("Create and edit the presets used for font sizes across the site.")}),(0,a.jsx)(b.__experimentalView,{children:(0,a.jsx)(b.__experimentalSpacer,{paddingX:4,children:(0,a.jsxs)(b.__experimentalVStack,{spacing:8,children:[!!e?.length&&(0,a.jsx)(yf,{label:(0,w.__)("Theme"),origin:"theme",sizes:e,baseSizes:n,handleAddFontSize:u,handleResetFontSizes:d(e,n)?null:()=>t(n)}),c&&!!s?.length&&(0,a.jsx)(yf,{label:(0,w.__)("Default"),origin:"default",sizes:s,baseSizes:r,handleAddFontSize:u,handleResetFontSizes:d(s,r)?null:()=>i(r)}),(0,a.jsx)(yf,{label:(0,w.__)("Custom"),origin:"custom",sizes:o,handleAddFontSize:u,handleResetFontSizes:o.length>0?()=>l([]):null})]})})})]})};var bf=function({className:e,...t}){return(0,a.jsx)(b.Flex,{className:Ht("edit-site-global-styles__color-indicator-wrapper",e),...t})};const{useGlobalSetting:wf}=ne(x.privateApis),_f=[];var jf=function({name:e}){const[t]=wf("color.palette.custom"),[n]=wf("color.palette.theme"),[s]=wf("color.palette.default"),[i]=wf("color.defaultPalette",e),r=(0,h.useMemo)((()=>[...t||_f,...n||_f,...s&&i?s:_f]),[t,n,s,i]),o=e?"/blocks/"+encodeURIComponent(e)+"/colors/palette":"/colors/palette";return(0,a.jsxs)(b.__experimentalVStack,{spacing:3,children:[(0,a.jsx)(Ol,{level:3,children:(0,w.__)("Palette")}),(0,a.jsx)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,a.jsx)(Bo,{path:o,children:(0,a.jsxs)(b.__experimentalHStack,{direction:"row",children:[r.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.__experimentalZStack,{isLayered:!1,offset:-8,children:r.slice(0,5).map((({color:e},t)=>(0,a.jsx)(bf,{children:(0,a.jsx)(b.ColorIndicator,{colorValue:e})},`${e}-${t}`)))}),(0,a.jsx)(b.FlexItem,{isBlock:!0,children:(0,w.__)("Edit palette")})]}):(0,a.jsx)(b.FlexItem,{children:(0,w.__)("Add colors")}),(0,a.jsx)(qa,{icon:(0,w.isRTL)()?za:La})]})})})]})};const{useGlobalStyle:Sf,useGlobalSetting:Cf,useSettingsForBlockElement:kf,ColorPanel:Ef}=ne(x.privateApis);var Pf=function(){const[e]=Sf("",void 0,"user",{shouldDecodeEncode:!1}),[t,n]=Sf("",void 0,"all",{shouldDecodeEncode:!1}),[s]=Cf(""),i=kf(s);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Colors"),description:(0,w.__)("Palette colors and the application of those colors on site elements.")}),(0,a.jsx)("div",{className:"edit-site-global-styles-screen",children:(0,a.jsxs)(b.__experimentalVStack,{spacing:7,children:[(0,a.jsx)(jf,{}),(0,a.jsx)(Ef,{inheritedValue:t,value:e,onChange:n,settings:i})]})})]})},If=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/SVG",children:(0,a.jsx)(Zt.Path,{d:"M17.192 6.75L15.47 5.03l1.06-1.06 3.537 3.53-3.537 3.53-1.06-1.06 1.723-1.72h-3.19c-.602 0-.993.202-1.28.498-.309.319-.538.792-.695 1.383-.13.488-.222 1.023-.296 1.508-.034.664-.116 1.413-.303 2.117-.193.721-.513 1.467-1.068 2.04-.575.594-1.359.954-2.357.954H4v-1.5h4.003c.601 0 .993-.202 1.28-.498.308-.319.538-.792.695-1.383.149-.557.216-1.093.288-1.662l.039-.31a9.653 9.653 0 0 1 .272-1.653c.193-.722.513-1.467 1.067-2.04.576-.594 1.36-.954 2.358-.954h3.19zM8.004 6.75c.8 0 1.46.23 1.988.628a6.24 6.24 0 0 0-.684 1.396 1.725 1.725 0 0 0-.024-.026c-.287-.296-.679-.498-1.28-.498H4v-1.5h4.003zM12.699 14.726c-.161.459-.38.94-.684 1.396.527.397 1.188.628 1.988.628h3.19l-1.722 1.72 1.06 1.06L20.067 16l-3.537-3.53-1.06 1.06 1.723 1.72h-3.19c-.602 0-.993-.202-1.28-.498a1.96 1.96 0 0 1-.024-.026z"})});function Vf(){const{paletteColors:e}=re();return e.slice(0,4).map((({slug:e,color:t},n)=>(0,a.jsx)("div",{style:{flexGrow:1,height:"100%",background:t}},`${e}-${n}`)))}const Of={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}};var Tf=({label:e,isFocused:t,withHoverView:n})=>(0,a.jsx)(ll,{label:e,isFocused:t,withHoverView:n,children:({key:e})=>(0,a.jsx)(b.__unstableMotion.div,{variants:Of,style:{height:"100%",overflow:"hidden"},children:(0,a.jsx)(b.__experimentalHStack,{spacing:0,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,a.jsx)(Vf,{})})},e)});function Af({title:e,gap:t=2}){const n=["color"],s=cc(n);return s?.length<=1?null:(0,a.jsxs)(b.__experimentalVStack,{spacing:3,children:[e&&(0,a.jsx)(Ol,{level:3,children:e}),(0,a.jsx)(b.__experimentalGrid,{spacing:t,children:s.map(((e,t)=>(0,a.jsx)(mc,{variation:e,isPill:!0,properties:n,showTooltip:!0,children:()=>(0,a.jsx)(Tf,{})},t)))})]})}const{useGlobalSetting:Nf}=ne(x.privateApis),Ff={placement:"bottom-start",offset:8};function Mf({name:e}){const[t,n]=Nf("color.palette.theme",e),[s]=Nf("color.palette.theme",e,"base"),[i,r]=Nf("color.palette.default",e),[o]=Nf("color.palette.default",e,"base"),[l,c]=Nf("color.palette.custom",e),[u]=Nf("color.defaultPalette",e),d=(0,y.useViewportMatch)("small","<")?Ff:void 0,[h]=function(e){const[t,n]=se("color.palette.theme",e);return window.__experimentalEnableColorRandomizer?[function(){const e=Math.floor(225*Math.random()),s=t.map((t=>{const{color:n}=t,s=X(n).rotate(e).toHex();return{...t,color:s}}));n(s)}]:[]}();return(0,a.jsxs)(b.__experimentalVStack,{className:"edit-site-global-styles-color-palette-panel",spacing:8,children:[(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[!!t&&!!t.length&&(0,a.jsx)(b.__experimentalPaletteEdit,{canReset:t!==s,canOnlyChangeValues:!0,colors:t,onChange:n,paletteLabel:(0,w.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:d}),window.__experimentalEnableColorRandomizer&&t?.length>0&&(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"secondary",icon:If,onClick:h,children:(0,w.__)("Randomize colors")})]}),!!i&&!!i.length&&!!u&&(0,a.jsx)(b.__experimentalPaletteEdit,{canReset:i!==o,canOnlyChangeValues:!0,colors:i,onChange:r,paletteLabel:(0,w.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:d}),(0,a.jsx)(b.__experimentalPaletteEdit,{colors:l,onChange:c,paletteLabel:(0,w.__)("Custom"),paletteLabelHeadingLevel:3,slugPrefix:"custom-",popoverProps:d}),(0,a.jsx)(Af,{title:(0,w.__)("Palettes")})]})}const{useGlobalSetting:Bf}=ne(x.privateApis),Df={placement:"bottom-start",offset:8},Rf=()=>{};function Lf({name:e}){const[t,n]=Bf("color.gradients.theme",e),[s]=Bf("color.gradients.theme",e,"base"),[i,r]=Bf("color.gradients.default",e),[o]=Bf("color.gradients.default",e,"base"),[l,c]=Bf("color.gradients.custom",e),[u]=Bf("color.defaultGradients",e),[d]=Bf("color.duotone.custom")||[],[h]=Bf("color.duotone.default")||[],[p]=Bf("color.duotone.theme")||[],[f]=Bf("color.defaultDuotone"),m=[...d||[],...p||[],...h&&f?h:[]],g=(0,y.useViewportMatch)("small","<")?Df:void 0;return(0,a.jsxs)(b.__experimentalVStack,{className:"edit-site-global-styles-gradient-palette-panel",spacing:8,children:[!!t&&!!t.length&&(0,a.jsx)(b.__experimentalPaletteEdit,{canReset:t!==s,canOnlyChangeValues:!0,gradients:t,onChange:n,paletteLabel:(0,w.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:g}),!!i&&!!i.length&&!!u&&(0,a.jsx)(b.__experimentalPaletteEdit,{canReset:i!==o,canOnlyChangeValues:!0,gradients:i,onChange:r,paletteLabel:(0,w.__)("Default"),paletteLabelLevel:3,popoverProps:g}),(0,a.jsx)(b.__experimentalPaletteEdit,{gradients:l,onChange:c,paletteLabel:(0,w.__)("Custom"),paletteLabelLevel:3,slugPrefix:"custom-",popoverProps:g}),!!m&&!!m.length&&(0,a.jsxs)("div",{children:[(0,a.jsx)(Ol,{level:3,children:(0,w.__)("Duotone")}),(0,a.jsx)(b.__experimentalSpacer,{margin:3}),(0,a.jsx)(b.DuotonePicker,{duotonePalette:m,disableCustomDuotone:!0,disableCustomColors:!0,clearable:!1,onChange:Rf})]})]})}const{Tabs:zf}=ne(b.privateApis);var Hf=function({name:e}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Edit palette"),description:(0,w.__)("The combination of colors used across the site and in color pickers.")}),(0,a.jsxs)(zf,{children:[(0,a.jsxs)(zf.TabList,{children:[(0,a.jsx)(zf.Tab,{tabId:"color",children:(0,w.__)("Color")}),(0,a.jsx)(zf.Tab,{tabId:"gradient",children:(0,w.__)("Gradient")})]}),(0,a.jsx)(zf.TabPanel,{tabId:"color",focusable:!1,children:(0,a.jsx)(Mf,{name:e})}),(0,a.jsx)(zf.TabPanel,{tabId:"gradient",focusable:!1,children:(0,a.jsx)(Lf,{name:e})})]})]})};const Gf={backgroundSize:"auto"},{useGlobalStyle:Wf,useGlobalSetting:Uf,BackgroundPanel:qf}=ne(x.privateApis);function Zf(){const[e]=Wf("",void 0,"user",{shouldDecodeEncode:!1}),[t,n]=Wf("",void 0,"all",{shouldDecodeEncode:!1}),[s]=Uf("");return(0,a.jsx)(qf,{inheritedValue:t,value:e,onChange:n,settings:s,defaultValues:Gf})}const{useHasBackgroundPanel:Yf,useGlobalSetting:Kf}=ne(x.privateApis);var Xf=function(){const[e]=Kf(""),t=Yf(e);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Background"),description:(0,a.jsx)(b.__experimentalText,{children:(0,w.__)("Set styles for the site’s background.")})}),t&&(0,a.jsx)(Zf,{})]})};var Qf=function({text:e,confirmButtonText:t,isOpen:n,toggleOpen:s,onConfirm:i}){return(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:n,cancelButtonText:(0,w.__)("Cancel"),confirmButtonText:t,onCancel:()=>{s()},onConfirm:async()=>{s(),i()},size:"medium",children:e})};const{useGlobalSetting:Jf}=ne(x.privateApis),{Menu:$f}=ne(b.privateApis),em="6px 6px 9px rgba(0, 0, 0, 0.2)";function tm(){const[e]=Jf("shadow.presets.default"),[t]=Jf("shadow.defaultPresets"),[n]=Jf("shadow.presets.theme"),[s,i]=Jf("shadow.presets.custom"),[r,o]=(0,h.useState)(!1),l=()=>o(!r);return(0,a.jsxs)(a.Fragment,{children:[r&&(0,a.jsx)(Qf,{text:(0,w.__)("Are you sure you want to remove all custom shadows?"),confirmButtonText:(0,w.__)("Remove"),isOpen:r,toggleOpen:l,onConfirm:()=>{i([])}}),(0,a.jsx)(xl,{title:(0,w.__)("Shadows"),description:(0,w.__)("Manage and create shadow styles for use across the site.")}),(0,a.jsx)("div",{className:"edit-site-global-styles-screen",children:(0,a.jsxs)(b.__experimentalVStack,{className:"edit-site-global-styles__shadows-panel",spacing:7,children:[t&&(0,a.jsx)(nm,{label:(0,w.__)("Default"),shadows:e||[],category:"default"}),n&&n.length>0&&(0,a.jsx)(nm,{label:(0,w.__)("Theme"),shadows:n||[],category:"theme"}),(0,a.jsx)(nm,{label:(0,w.__)("Custom"),shadows:s||[],category:"custom",canCreate:!0,onCreate:e=>{i([...s||[],e])},onReset:l})]})})]})}function nm({label:e,shadows:t,category:n,canCreate:s,onCreate:i,onReset:r}){return(0,a.jsxs)(b.__experimentalVStack,{spacing:2,children:[(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsx)(Ol,{level:3,children:e}),(0,a.jsxs)(b.FlexItem,{className:"edit-site-global-styles__shadows-panel__options-container",children:[s&&(0,a.jsx)(b.Button,{size:"small",icon:ff,label:(0,w.__)("Add shadow"),onClick:()=>{(()=>{const e=$o(t,"shadow-");i({name:(0,w.sprintf)((0,w.__)("Shadow %s"),e),shadow:em,slug:`shadow-${e}`})})()}}),!!t?.length&&"custom"===n&&(0,a.jsxs)($f,{children:[(0,a.jsx)($f.TriggerButton,{render:(0,a.jsx)(b.Button,{size:"small",icon:No,label:(0,w.__)("Shadow options")})}),(0,a.jsx)($f.Popover,{children:(0,a.jsx)($f.Item,{onClick:r,children:(0,a.jsx)($f.ItemLabel,{children:(0,w.__)("Remove all custom shadows")})})})]})]})]}),t.length>0&&(0,a.jsx)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map((e=>(0,a.jsx)(sm,{shadow:e,category:n},e.slug)))})]})}function sm({shadow:e,category:t}){return(0,a.jsx)(Bo,{path:`/shadows/edit/${t}/${e.slug}`,children:(0,a.jsxs)(b.__experimentalHStack,{children:[(0,a.jsx)(b.FlexItem,{children:e.name}),(0,a.jsx)(qa,{icon:(0,w.isRTL)()?za:La})]})})}var im=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M7 11.5h10V13H7z"})});const{useGlobalSetting:rm}=ne(x.privateApis),{Menu:am}=ne(b.privateApis),om=[{label:(0,w.__)("Rename"),action:"rename"},{label:(0,w.__)("Delete"),action:"delete"}],lm=[{label:(0,w.__)("Reset"),action:"reset"}];function cm(){const{goBack:e,params:{category:t,slug:n}}=(0,b.useNavigator)(),[s,i]=rm(`shadow.presets.${t}`);(0,h.useEffect)((()=>{const t=s?.some((e=>e.slug===n));n&&!t&&e()}),[s,n,e]);const[r]=rm(`shadow.presets.${t}`,void 0,"base"),[o,l]=(0,h.useState)((()=>(s||[]).find((e=>e.slug===n)))),c=(0,h.useMemo)((()=>(r||[]).find((e=>e.slug===n))),[r,n]),[u,d]=(0,h.useState)(!1),[p,f]=(0,h.useState)(!1),[m,g]=(0,h.useState)(o.name);if(!t||!n)return null;return o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsx)(xl,{title:o.name}),(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.__experimentalSpacer,{marginTop:2,marginBottom:0,paddingX:4,children:(0,a.jsxs)(am,{children:[(0,a.jsx)(am.TriggerButton,{render:(0,a.jsx)(b.Button,{size:"small",icon:No,label:(0,w.__)("Menu")})}),(0,a.jsx)(am.Popover,{children:("custom"===t?om:lm).map((e=>(0,a.jsx)(am.Item,{onClick:()=>(e=>{if("reset"===e){const e=s.map((e=>e.slug===n?c:e));l(c),i(e)}else"delete"===e?d(!0):"rename"===e&&f(!0)})(e.action),disabled:"reset"===e.action&&o.shadow===c.shadow,children:(0,a.jsx)(am.ItemLabel,{children:e.label})},e.action)))})]})})})]}),(0,a.jsxs)("div",{className:"edit-site-global-styles-screen",children:[(0,a.jsx)(um,{shadow:o.shadow}),(0,a.jsx)(dm,{shadow:o.shadow,onChange:e=>{l({...o,shadow:e});const t=s.map((t=>t.slug===n?{...o,shadow:e}:t));i(t)}})]}),u&&(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{i(s.filter((e=>e.slug!==n))),d(!1)},onCancel:()=>{d(!1)},confirmButtonText:(0,w.__)("Delete"),size:"medium",children:(0,w.sprintf)((0,w.__)('Are you sure you want to delete "%s" shadow preset?'),o.name)}),p&&(0,a.jsx)(b.Modal,{title:(0,w.__)("Rename"),onRequestClose:()=>f(!1),size:"small",children:(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),(e=>{if(!e)return;const t=s.map((t=>t.slug===n?{...o,name:e}:t));l({...o,name:e}),i(t)})(m),f(!1)},children:[(0,a.jsx)(b.__experimentalInputControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,w.__)("Name"),placeholder:(0,w.__)("Shadow name"),value:m,onChange:e=>g(e)}),(0,a.jsx)(b.__experimentalSpacer,{marginBottom:6}),(0,a.jsxs)(b.Flex,{className:"block-editor-shadow-edit-modal__actions",justify:"flex-end",expanded:!1,children:[(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>f(!1),children:(0,w.__)("Cancel")})}),(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,w.__)("Save")})})]})]})})]}):(0,a.jsx)(xl,{title:""})}function um({shadow:e}){const t={boxShadow:e};return(0,a.jsx)(b.__experimentalSpacer,{marginBottom:4,marginTop:-2,children:(0,a.jsx)(b.__experimentalHStack,{align:"center",justify:"center",className:"edit-site-global-styles__shadow-preview-panel",children:(0,a.jsx)("div",{className:"edit-site-global-styles__shadow-preview-block",style:t})})})}function dm({shadow:e,onChange:t}){const n=(0,h.useRef)(),s=(0,h.useMemo)((()=>function(e){return(e.match(/(?:[^,(]|\([^)]*\))+/g)||[]).map((e=>e.trim()))}(e)),[e]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.__experimentalVStack,{spacing:2,children:(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsx)(Ol,{level:3,children:(0,w.__)("Shadows")}),(0,a.jsx)(b.FlexItem,{className:"edit-site-global-styles__shadows-panel__options-container",children:(0,a.jsx)(b.Button,{size:"small",icon:ff,label:(0,w.__)("Add shadow"),onClick:()=>{t([...s,em].join(", "))},ref:n})})]})}),(0,a.jsx)(b.__experimentalSpacer,{}),(0,a.jsx)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:s.map(((e,i)=>(0,a.jsx)(hm,{shadow:e,onChange:e=>((e,n)=>{const i=[...s];i[e]=n,t(i.join(", "))})(i,e),canRemove:s.length>1,onRemove:()=>(e=>{t(s.filter(((t,n)=>n!==e)).join(", ")),n.current.focus()})(i)},i)))})]})}function hm({shadow:e,onChange:t,canRemove:n,onRemove:s}){const i=(0,h.useMemo)((()=>function(e){const t={x:"0",y:"0",blur:"0",spread:"0",color:"#000",inset:!1};if(!e)return t;if(e.includes("none"))return t;const n=/((?:^|\s+)(-?\d*\.?\d+(?:px|%|in|cm|mm|em|rem|ex|pt|pc|vh|vw|vmin|vmax|ch|lh)?)(?=\s|$)(?![^(]*\))){1,4}/g,s=e.match(n)||[];if(1!==s.length)return t;const i=s[0].split(" ").map((e=>e.trim())).filter((e=>e));if(i.length<2)return t;const r=e.match(/inset/gi)||[];if(r.length>1)return t;const a=1===r.length;let o=e.replace(n,"").trim();a&&(o=o.replace("inset","").replace("INSET","").trim());let l=(o.match(/^#([0-9a-f]{3}){1,2}$|^#([0-9a-f]{4}){1,2}$|^(?:rgb|hsl)a?\(?[\d*\.?\d+%?,?\/?\s]*\)$/gi)||[]).map((e=>e?.trim())).filter((e=>e));if(l.length>1)return t;if(0===l.length&&(l=o.trim().split(" ").filter((e=>e)),l.length>1))return t;const[c,u,d,h]=i;return{x:c,y:u,blur:d||t.blur,spread:h||t.spread,inset:a,color:o||t.color}}(e)),[e]),r=e=>{t(function(e){const t=`${e.x||"0px"} ${e.y||"0px"} ${e.blur||"0px"} ${e.spread||"0px"}`;return`${e.inset?"inset":""} ${t} ${e.color||""}`.trim()}(e))};return(0,a.jsx)(b.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"edit-site-global-styles__shadow-editor__dropdown",renderToggle:({onToggle:e,isOpen:t})=>{const r={onClick:e,className:Ht("edit-site-global-styles__shadow-editor__dropdown-toggle",{"is-open":t}),"aria-expanded":t},o={onClick:()=>{t&&e(),s()},className:Ht("edit-site-global-styles__shadow-editor__remove-button",{"is-open":t}),label:(0,w.__)("Remove shadow")};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,icon:zo,...r,children:i.inset?(0,w.__)("Inner shadow"):(0,w.__)("Drop shadow")}),n&&(0,a.jsx)(b.Button,{size:"small",icon:im,...o})]})},renderContent:()=>(0,a.jsx)(b.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"edit-site-global-styles__shadow-editor__dropdown-content",children:(0,a.jsx)(pm,{shadowObj:i,onChange:r})})})}function pm({shadowObj:e,onChange:t}){const n=(n,s)=>{const i={...e,[n]:s};t(i)};return(0,a.jsxs)(b.__experimentalVStack,{spacing:4,className:"edit-site-global-styles__shadow-editor-panel",children:[(0,a.jsx)(b.ColorPalette,{clearable:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,value:e.color,onChange:e=>n("color",e)}),(0,a.jsxs)(b.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,value:e.inset?"inset":"outset",isBlock:!0,onChange:e=>n("inset","inset"===e),hideLabelFromVision:!0,__next40pxDefaultSize:!0,children:[(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"outset",label:(0,w.__)("Outset")}),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"inset",label:(0,w.__)("Inset")})]}),(0,a.jsxs)(b.__experimentalGrid,{columns:2,gap:4,children:[(0,a.jsx)(fm,{label:(0,w.__)("X Position"),value:e.x,onChange:e=>n("x",e)}),(0,a.jsx)(fm,{label:(0,w.__)("Y Position"),value:e.y,onChange:e=>n("y",e)}),(0,a.jsx)(fm,{label:(0,w.__)("Blur"),value:e.blur,onChange:e=>n("blur",e)}),(0,a.jsx)(fm,{label:(0,w.__)("Spread"),value:e.spread,onChange:e=>n("spread",e)})]})]})}function fm({label:e,value:t,onChange:n}){return(0,a.jsx)(b.__experimentalUnitControl,{label:e,__next40pxDefaultSize:!0,value:t,onChange:e=>{const t=void 0!==e&&!isNaN(parseFloat(e));n(t?e:"0px")}})}function mm(){return(0,a.jsx)(tm,{})}function gm(){return(0,a.jsx)(cm,{})}const{useGlobalStyle:vm,useGlobalSetting:ym,useSettingsForBlockElement:xm,DimensionsPanel:bm}=ne(x.privateApis),wm={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,minHeight:!0,childLayout:!1};function _m(){const[e]=vm("",void 0,"user",{shouldDecodeEncode:!1}),[t,n]=vm("",void 0,"all",{shouldDecodeEncode:!1}),[s]=ym("",void 0,"user"),[i,r]=ym(""),o=xm(i),l=(0,h.useMemo)((()=>({...t,layout:o.layout})),[t,o.layout]),c=(0,h.useMemo)((()=>({...e,layout:s.layout})),[e,s.layout]);return(0,a.jsx)(bm,{inheritedValue:l,value:c,onChange:e=>{const t={...e};if(delete t.layout,n(t),e.layout!==s.layout){const t={...s,layout:e.layout};t.layout?.definitions&&delete t.layout.definitions,r(t)}},settings:o,includeLayoutControls:!0,defaultControls:wm})}const{useHasDimensionsPanel:jm,useGlobalSetting:Sm,useSettingsForBlockElement:Cm}=ne(x.privateApis);var km=function(){const[e]=Sm(""),t=Cm(e),n=jm(t);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Layout")}),n&&(0,a.jsx)(_m,{})]})};const{GlobalStylesContext:Em}=ne(x.privateApis);function Pm({gap:e=2}){const{user:t}=(0,h.useContext)(Em),n=t?.styles,s=(0,c.useSelect)((e=>e(j.store).__experimentalGetCurrentThemeGlobalStylesVariations()),[]),i=s?.filter((e=>!dc(e,["color"])&&!dc(e,["typography","spacing"]))),r=(0,h.useMemo)((()=>[...[{title:(0,w.__)("Default"),settings:{},styles:{}},...i??[]].map((e=>{const t={...e?.styles?.blocks};n?.blocks&&Object.keys(n.blocks).forEach((e=>{if(n.blocks[e].css){const s=t[e]||{},i={css:`${t[e]?.css||""} ${n.blocks[e].css.trim()||""}`};t[e]={...s,...i}}}));const s=n?.css||e.styles?.css?{css:`${e.styles?.css||""} ${n?.css||""}`}:{},i=Object.keys(t).length>0?{blocks:t}:{},r={...e.styles,...s,...i};return{...e,settings:e.settings??{},styles:r}}))]),[i,n?.blocks,n?.css]);return!i||i?.length<1?null:(0,a.jsx)(b.__experimentalGrid,{columns:2,className:"edit-site-global-styles-style-variations-container",gap:e,children:r.map(((e,t)=>(0,a.jsx)(mc,{variation:e,children:t=>(0,a.jsx)(pl,{label:e?.title,withHoverView:!0,isFocused:t,variation:e})},t)))})}function Im(){return(0,a.jsxs)(b.__experimentalVStack,{spacing:10,className:"edit-site-global-styles-variation-container",children:[(0,a.jsx)(Pm,{gap:3}),(0,a.jsx)(Af,{title:(0,w.__)("Palettes"),gap:3}),(0,a.jsx)(gc,{title:(0,w.__)("Typography"),gap:3})]})}const{useZoomOut:Vm}=ne(x.privateApis);var Om=function(){const e=(0,c.useSelect)((e=>e(x.store).getSettings().isPreviewMode),[]);return Vm(!e),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Browse styles"),description:(0,w.__)("Choose a variation to change the look of the site.")}),(0,a.jsx)(b.Card,{size:"small",isBorderless:!0,className:"edit-site-global-styles-screen-style-variations",children:(0,a.jsx)(b.CardBody,{children:(0,a.jsx)(Im,{})})})]})};const Tm=window.wp.mediaUtils,Am=[{slug:"theme-colors",title:(0,w.__)("Theme Colors"),origin:"theme",type:"colors"},{slug:"theme-gradients",title:(0,w.__)("Theme Gradients"),origin:"theme",type:"gradients"},{slug:"custom-colors",title:(0,w.__)("Custom Colors"),origin:"custom",type:"colors"},{slug:"custom-gradients",title:(0,w.__)("Custom Gradients"),origin:"custom",type:"gradients"},{slug:"duotones",title:(0,w.__)("Duotones"),origin:"theme",type:"duotones"},{slug:"default-colors",title:(0,w.__)("Default Colors"),origin:"default",type:"colors"},{slug:"default-gradients",title:(0,w.__)("Default Gradients"),origin:"default",type:"gradients"}],Nm=[{slug:"site-identity",title:(0,w.__)("Site Identity"),blocks:["core/site-logo","core/site-title","core/site-tagline"]},{slug:"design",title:(0,w.__)("Design"),blocks:["core/navigation","core/avatar","core/post-time-to-read"],exclude:["core/home-link","core/navigation-link"]},{slug:"posts",title:(0,w.__)("Posts"),blocks:["core/post-title","core/post-excerpt","core/post-author","core/post-author-name","core/post-author-biography","core/post-date","core/post-terms","core/term-description","core/query-title","core/query-no-results","core/query-pagination","core/query-numbers"]},{slug:"comments",title:(0,w.__)("Comments"),blocks:["core/comments-title","core/comments-pagination","core/comments-pagination-numbers","core/comments","core/comments-author-name","core/comment-content","core/comment-date","core/comment-edit-link","core/comment-reply-link","core/comment-template","core/post-comments-count","core/post-comments-link"]}],Fm=[{slug:"overview",title:(0,w.__)("Overview"),blocks:[]},{slug:"text",title:(0,w.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,w.__)("Colors"),blocks:[]},{slug:"theme",title:(0,w.__)("Theme"),subcategories:Nm},{slug:"media",title:(0,w.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,w.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,w.__)("Embeds"),include:[]}],Mm=[...Nm,{slug:"media",title:(0,w.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,w.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,w.__)("Embeds"),include:[]}],Bm=[{slug:"overview",title:(0,w.__)("Overview"),blocks:[]},{slug:"text",title:(0,w.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,w.__)("Colors"),blocks:[]},{slug:"blocks",title:(0,w.__)("All Blocks"),blocks:[],subcategories:Mm}];function Dm(e,t){if(!e?.slug||!t?.length)return;const n=e?.subcategories??[];if(n.length)return n.reduce(((e,n)=>{const s=Dm(n,t);return s&&(e.subcategories||(e.subcategories=[]),e.subcategories=[...e.subcategories,s]),e}),{title:e.title,slug:e.slug});const s=e?.blocks||[],i=e?.exclude||[],r=t.filter((t=>!i.includes(t.name)&&(t.category===e.slug||s.includes(t.name))));return r.length?{title:e.title,slug:e.slug,examples:r}:void 0}function Rm(){const e=[...Nm,...Fm].map((({slug:e})=>e)),t=(0,o.getCategories)().filter((({slug:t})=>!e.includes(t)));return[...Fm,...t]}var Lm=({colors:e,type:t,templateColumns:n="1fr 1fr",itemHeight:s="52px"})=>e?(0,a.jsx)(b.__experimentalGrid,{templateColumns:n,rowGap:8,columnGap:16,children:e.map((e=>{const n="gradients"===t?(0,x.__experimentalGetGradientClass)(e.slug):(0,x.getColorClassName)("background-color",e.slug),i=Ht("edit-site-style-book__color-example",n);return(0,a.jsx)(Zt.View,{className:i,style:{height:s}},e.slug)}))}):null;var zm=({duotones:e})=>e?(0,a.jsx)(b.__experimentalGrid,{columns:2,rowGap:16,columnGap:16,children:e.map((e=>(0,a.jsxs)(b.__experimentalGrid,{className:"edit-site-style-book__duotone-example",columns:2,rowGap:8,columnGap:8,children:[(0,a.jsx)(Zt.View,{children:(0,a.jsx)("img",{alt:`Duotone example: ${e.slug}`,src:"https://s.w.org/images/core/5.3/MtBlanc1.jpg",style:{filter:`url(#wp-duotone-${e.slug})`}})}),e.colors.map((e=>(0,a.jsx)(Zt.View,{className:"edit-site-style-book__color-example",style:{backgroundColor:e}},e)))]},e.slug)))}):null;function Hm(e){const t=(0,o.getBlockTypes)().filter((e=>{const{name:t,example:n,supports:s}=e;return"core/heading"!==t&&!!n&&!1!==s?.inserter})).map((e=>({name:e.name,title:e.title,category:e.category,blocks:(0,o.getBlockFromExample)(e.name,{...e.example,attributes:{...e.example.attributes,style:void 0}})})));if(!!!(0,o.getBlockType)("core/heading"))return t;const n={name:"core/heading",title:(0,w.__)("Headings"),category:"text",blocks:[1,2,3,4,5,6].map((e=>(0,o.createBlock)("core/heading",{content:(0,w.sprintf)((0,w.__)("Heading %d"),e),level:e})))},s=function(e){if(!e)return[];const t=[];return Am.forEach((n=>{const s=e[n.type],i=Array.isArray(s)?s.find((e=>e.slug===n.origin)):void 0;if(i?.[n.type]){const e={name:n.slug,title:n.title,category:"colors"};"duotones"===n.type?(e.content=(0,a.jsx)(zm,{duotones:i[n.type]}),t.push(e)):(e.content=(0,a.jsx)(Lm,{colors:i[n.type],type:n.type}),t.push(e))}})),t}(e),i=function(e){const t=[],n=Array.isArray(e?.colors)?e.colors.find((e=>"theme"===e.slug)):void 0;if(n){const e={name:"theme-colors",title:(0,w.__)("Colors"),category:"overview",content:(0,a.jsx)(Lm,{colors:n.colors,type:"colors",templateColumns:"repeat(auto-fill, minmax( 200px, 1fr ))",itemHeight:"32px"})};t.push(e)}const s=[];if((0,o.getBlockType)("core/heading")){const e=(0,o.createBlock)("core/heading",{content:(0,w.__)("AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789X{(…)},.-<>?!*&:/A@HELFO™©"),level:1});s.push(e)}if((0,o.getBlockType)("core/paragraph")){const e=(0,o.createBlock)("core/paragraph",{content:(0,w.__)("A paragraph in a website refers to a distinct block of text that is used to present and organize information. It is a fundamental unit of content in web design and is typically composed of a group of related sentences or thoughts focused on a particular topic or idea. Paragraphs play a crucial role in improving the readability and user experience of a website. They break down the text into smaller, manageable chunks, allowing readers to scan the content more easily.")}),t=(0,o.createBlock)("core/paragraph",{content:(0,w.__)("Additionally, paragraphs help structure the flow of information and provide logical breaks between different concepts or pieces of information. In terms of formatting, paragraphs in websites are commonly denoted by a vertical gap or indentation between each block of text. This visual separation helps visually distinguish one paragraph from another, creating a clear and organized layout that guides the reader through the content smoothly.")});if((0,o.getBlockType)("core/group")){const n=(0,o.createBlock)("core/group",{layout:{type:"grid",columnCount:2,minimumColumnWidth:"12rem"},style:{spacing:{blockGap:"1.5rem"}}},[e,t]);s.push(n)}else s.push(e)}return s.length&&t.push({name:"typography",title:(0,w.__)("Typography"),category:"overview",blocks:s}),["core/image","core/separator","core/buttons","core/pullquote","core/search"].forEach((e=>{const n=(0,o.getBlockType)(e);if(n&&n.example){const s={name:e,title:n.title,category:"overview",blocks:(0,o.getBlockFromExample)(e,{...n.example,attributes:{...n.example.attributes,style:void 0}})};t.push(s)}})),t}(e);return[n,...s,...t,...i]}function Gm({breadcrumbs:e,badges:t,title:n,subTitle:s,actions:i}){return(0,a.jsxs)(b.__experimentalVStack,{className:"admin-ui-page__header",as:"header",children:[(0,a.jsxs)(b.__experimentalHStack,{className:"admin-ui-page__header-title",justify:"space-between",spacing:2,children:[(0,a.jsxs)(b.__experimentalHStack,{spacing:2,children:[n&&(0,a.jsx)(b.__experimentalHeading,{as:"h2",level:3,weight:500,truncate:!0,children:n}),e,t]}),(0,a.jsx)(b.__experimentalHStack,{style:{width:"auto",flexShrink:0},spacing:2,className:"admin-ui-page__header-actions",children:i})]}),s&&(0,a.jsx)("p",{className:"admin-ui-page__header-subtitle",children:s})]})}var Wm=function({breadcrumbs:e,badges:t,title:n,subTitle:s,children:i,className:r,actions:o,hasPadding:l=!1}){const c=Ht("admin-ui-page",r);return(0,a.jsxs)(Wt,{className:c,ariaLabel:n,children:[(n||e||t)&&(0,a.jsx)(Gm,{breadcrumbs:e,badges:t,title:n,subTitle:s,actions:o}),l?(0,a.jsx)("div",{className:"admin-ui-page__content has-padding",children:i}):i]})};const{useLocation:Um,useHistory:qm}=ne(Lt.privateApis),Zm=({isStyleBookOpened:e,setIsStyleBookOpened:t,path:n})=>{const s=qm(),i=(0,c.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(j.store),s=n(),i=s?t("root","globalStyles",s):void 0;return!!i?._links?.["wp:action-edit-css"]}),[]);return(0,a.jsxs)(b.__experimentalHStack,{children:[(0,a.jsx)(b.Button,{isPressed:e,icon:Ao,label:(0,w.__)("Style Book"),onClick:()=>{t(!e);const i=e?(0,Qt.removeQueryArgs)(n,"preview"):(0,Qt.addQueryArgs)(n,{preview:"stylebook"});s.navigate(i)},size:"compact"}),i&&(0,a.jsx)(b.DropdownMenu,{icon:No,label:(0,w.__)("More"),toggleProps:{size:"compact"},children:({onClose:e})=>(0,a.jsx)(b.MenuGroup,{children:i&&(0,a.jsx)(b.MenuItem,{onClick:()=>{e(),s.navigate((0,Qt.addQueryArgs)(n,{section:"/css"}))},children:(0,w.__)("Additional CSS")})})})]})},Ym=()=>{const{path:e,query:t}=Um(),n=qm();return(0,h.useMemo)((()=>[t.section??"/",t=>{n.navigate((0,Qt.addQueryArgs)(e,{section:t}))}]),[e,t.section,n])};function Km(){const{path:e}=Um(),[t,n]=(0,h.useState)(e.includes("preview=stylebook")),s=(0,y.useViewportMatch)("medium","<"),[i,r]=Ym();return(0,a.jsx)(Wm,{actions:s?null:(0,a.jsx)(Zm,{isStyleBookOpened:t,setIsStyleBookOpened:n,path:e}),className:"edit-site-styles",title:(0,w.__)("Styles"),children:(0,a.jsx)(Wg,{path:i,onPathChange:r})})}const{ExperimentalBlockEditorProvider:Xm,useGlobalStyle:Qm,GlobalStylesContext:Jm,useGlobalStylesOutputWithConfig:$m}=ne(x.privateApis),{mergeBaseAndUserConfigs:eg}=ne(f.privateApis),{Tabs:tg}=ne(b.privateApis);function ng(e){return!e||0===Object.keys(e).length}const sg=(e,t)=>{if(!e||!t||!t?.contentDocument)return;const n="top"===e?t.contentDocument.body:t.contentDocument.getElementById(e);n&&n.scrollIntoView({behavior:"smooth"})},ig=e=>e&&"string"==typeof e&&("/"===e||e.startsWith("/typography")||e.startsWith("/colors")||e.startsWith("/blocks"))?{top:!0}:null;function rg(){const{colors:e,gradients:t}=(0,x.__experimentalUseMultipleOriginColorsAndGradients)(),[n,s,i,r]=(0,x.useSettings)("color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default");return(0,h.useMemo)((()=>{const a={colors:e,gradients:t,duotones:[]};return i&&i.length&&a.duotones.push({name:(0,w._x)("Theme","Indicates these duotone filters come from the theme."),slug:"theme",duotones:i}),n&&r&&r.length&&a.duotones.push({name:(0,w._x)("Default","Indicates these duotone filters come from WordPress."),slug:"default",duotones:r}),s&&s.length&&a.duotones.push({name:(0,w._x)("Custom","Indicates these doutone filters are created by the user."),slug:"custom",duotones:s}),a}),[e,t,s,i,r,n])}function ag(e){const t=[],n=Dm({slug:"overview"},e);t.push(...n.examples);const s=e.filter((e=>"overview"!==e.category&&!n.examples.find((t=>t.name===e.name))));return t.push(...s),t}function og(e,t){return t?e.map((e=>({...e,variation:t,blocks:Array.isArray(e.blocks)?e.blocks.map((e=>({...e,attributes:{...e.attributes,style:void 0,className:Jo(t)}}))):{...e.blocks,attributes:{...e.blocks.attributes,style:void 0,className:Jo(t)}}}))):e}const lg=({userConfig:e={},isStatic:t=!1})=>{const n=(0,c.useSelect)((e=>e(Rt).getSettings()),[]),s=(0,c.useSelect)((e=>e(j.store).canUser("create",{kind:"postType",name:"attachment"})),[]);(0,h.useEffect)((()=>{(0,c.dispatch)(x.store).updateSettings({...n,mediaUpload:s?Tm.uploadMedia:void 0})}),[n,s]);const[i,r]=Ym(),o=Hm(rg()),l=ag(o);let u=null,d=null;if(i.includes("/colors"))u="colors";else if(i.includes("/typography"))u="text";else if(i.includes("/blocks")){u="blocks";let e=decodeURIComponent(i).split("/blocks/")[1];e?.includes("/variations")&&([e,d]=e.split("/variations/")),e&&o.find((t=>t.name===e))&&(u=e)}else t||(u="overview");const p=Bm.find((e=>e.slug===u)),f=(0,h.useMemo)((()=>p?Dm(p,o):{examples:[o.find((e=>e.name===u))]}),[p,o,u]),m=(0,h.useMemo)((()=>u?d?{examples:og(f.examples,d)}:f:{examples:l}),[u,l,d,f]),{base:g}=(0,h.useContext)(Jm),v=ig(i),y=(0,h.useMemo)((()=>ng(e)||ng(g)?{}:eg(g,e)),[g,e]),[b]=$m(y),w=(0,h.useMemo)((()=>({...n,styles:ng(b)||ng(e)?n.styles:b,isPreviewMode:!0})),[b,n,e]);return(0,a.jsx)("div",{className:"edit-site-style-book",children:(0,a.jsxs)(x.BlockEditorProvider,{settings:w,children:[(0,a.jsx)(wo,{disableRootPadding:!0}),(0,a.jsx)(cg,{examples:m,settings:w,goTo:v,isSelected:t?null:e=>i===`/blocks/${encodeURIComponent(e)}`||i.startsWith(`/blocks/${encodeURIComponent(e)}/`),onSelect:t?null:(e,t=!1)=>{Am.find((t=>t.slug===e))?r("/colors/palette"):"typography"!==e?t||r(`/blocks/${encodeURIComponent(e)}`):r("/typography")}})]})})},cg=({examples:e,isSelected:t,onClick:n,onSelect:s,settings:i,title:r,goTo:o})=>{const[l,c]=(0,h.useState)(!1),[u,d]=(0,h.useState)(!1),p=(0,h.useRef)(null),f={role:"button",onFocus:()=>c(!0),onBlur:()=>c(!1),onKeyDown:e=>{if(e.defaultPrevented)return;const{keyCode:t}=e;!n||t!==Xt.ENTER&&t!==Xt.SPACE||(e.preventDefault(),n(e))},onClick:e=>{e.defaultPrevented||n&&(e.preventDefault(),n(e))},readonly:!0};return(0,h.useLayoutEffect)((()=>{u&&p?.current&&o?.top&&sg("top",p?.current)}),[p?.current,o,sg,u]),(0,a.jsxs)(x.__unstableIframe,{onLoad:()=>d(!0),ref:p,className:Ht("edit-site-style-book__iframe",{"is-focused":l&&!!n,"is-button":!!n}),name:"style-book-canvas",tabIndex:0,...n?f:{},children:[(0,a.jsx)(x.__unstableEditorStyles,{styles:i.styles}),(0,a.jsxs)("style",{children:['\n\tbody {\n\t\tposition: relative;\n\t\tpadding: 32px !important;\n\t}\n\n\t\n\t.is-root-container {\n\t\tdisplay: flow-root;\n\t}\n\n\n\t.edit-site-style-book__examples {\n\t\tmax-width: 1200px;\n\t\tmargin: 0 auto;\n\t}\n\n\t.edit-site-style-book__example {\n\t max-width: 900px;\n\t\tborder-radius: 2px;\n\t\tcursor: pointer;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 40px;\n\t\tpadding: 16px;\n\t\twidth: 100%;\n\t\tbox-sizing: border-box;\n\t\tscroll-margin-top: 32px;\n\t\tscroll-margin-bottom: 32px;\n\t\tmargin: 0 auto 40px auto;\n\t}\n\n\t.edit-site-style-book__example.is-selected {\n\t\tbox-shadow: 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t}\n\n\t.edit-site-style-book__example.is-disabled-example {\n\t\tpointer-events: none;\n\t}\n\n\t.edit-site-style-book__example:focus:not(:disabled) {\n\t\tbox-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t\toutline: 3px solid transparent;\n\t}\n\n\t.edit-site-style-book__duotone-example > div:first-child {\n\t\tdisplay: flex;\n\t\taspect-ratio: 16 / 9;\n\t\tgrid-row: span 1;\n\t\tgrid-column: span 2;\n\t}\n\t.edit-site-style-book__duotone-example img {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-fit: cover;\n\t}\n\t.edit-site-style-book__duotone-example > div:not(:first-child) {\n\t\theight: 20px;\n\t\tborder: 1px solid color-mix( in srgb, currentColor 10%, transparent );\n\t}\n\n\t.edit-site-style-book__color-example {\n\t\tborder: 1px solid color-mix( in srgb, currentColor 10%, transparent );\n\t}\n\n\t.edit-site-style-book__subcategory-title,\n\t.edit-site-style-book__example-title {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;\n\t\tfont-size: 13px;\n\t\tfont-weight: normal;\n\t\tline-height: normal;\n\t\tmargin: 0;\n\t\ttext-align: left;\n\t\tpadding-top: 8px;\n\t\tborder-top: 1px solid color-mix( in srgb, currentColor 10%, transparent );\n\t\tcolor: color-mix( in srgb, currentColor 60%, transparent );\n\t}\n\n\t.edit-site-style-book__subcategory-title {\n\t\tfont-size: 16px;\n\t\tmargin-bottom: 40px;\n \tpadding-bottom: 8px;\n\t}\n\n\t.edit-site-style-book__example-preview {\n\t\twidth: 100%;\n\t}\n\n\t.edit-site-style-book__example-preview .block-editor-block-list__insertion-point,\n\t.edit-site-style-book__example-preview .block-list-appender {\n\t\tdisplay: none;\n\t}\n\t:where(.is-root-container > .wp-block:first-child) {\n\t\tmargin-top: 0;\n\t}\n\t:where(.is-root-container > .wp-block:last-child) {\n\t\tmargin-bottom: 0;\n\t}\n',!!n&&"body { cursor: pointer; } body * { pointer-events: none; }"]}),(0,a.jsx)(ug,{className:"edit-site-style-book__examples",filteredExamples:e,label:r?(0,w.sprintf)((0,w.__)("Examples of blocks in the %s category"),r):(0,w.__)("Examples of blocks"),isSelected:t,onSelect:s},r)]})},ug=(0,h.memo)((({className:e,filteredExamples:t,label:n,isSelected:s,onSelect:i})=>(0,a.jsxs)(b.Composite,{orientation:"vertical",className:e,"aria-label":n,role:"grid",children:[!!t?.examples?.length&&t.examples.map((e=>(0,a.jsx)(pg,{id:`example-${e.name}`,title:e.title,content:e.content,blocks:e.blocks,isSelected:s?.(e.name),onClick:i?()=>i(e.name,!!e.variation):null},e.name))),!!t?.subcategories?.length&&t.subcategories.map((e=>(0,a.jsxs)(b.Composite.Group,{className:"edit-site-style-book__subcategory",children:[(0,a.jsx)(b.Composite.GroupLabel,{children:(0,a.jsx)("h2",{className:"edit-site-style-book__subcategory-title",children:e.title})}),(0,a.jsx)(dg,{examples:e.examples,isSelected:s,onSelect:i})]},`subcategory-${e.slug}`)))]}))),dg=({examples:e,isSelected:t,onSelect:n})=>!!e?.length&&e.map((e=>(0,a.jsx)(pg,{id:`example-${e.name}`,title:e.title,content:e.content,blocks:e.blocks,isSelected:t?.(e.name),onClick:n?()=>n(e.name):null},e.name))),hg=["example-duotones"],pg=({id:e,title:t,blocks:n,isSelected:s,onClick:i,content:r})=>{const o=(0,c.useSelect)((e=>e(x.store).getSettings()),[]),l=(0,h.useMemo)((()=>({...o,focusMode:!1,isPreviewMode:!0})),[o]),u=(0,h.useMemo)((()=>Array.isArray(n)?n:[n]),[n]),d=hg.includes(e)||!i?{disabled:!0,accessibleWhenDisabled:!!i}:{};return(0,a.jsx)("div",{role:"row",children:(0,a.jsx)("div",{role:"gridcell",children:(0,a.jsxs)(b.Composite.Item,{className:Ht("edit-site-style-book__example",{"is-selected":s,"is-disabled-example":!!d?.disabled}),id:e,"aria-label":i?(0,w.sprintf)((0,w.__)("Open %s styles in Styles panel"),t):void 0,render:(0,a.jsx)("div",{}),role:i?"button":null,onClick:i,...d,children:[(0,a.jsx)("span",{className:"edit-site-style-book__example-title",children:t}),(0,a.jsx)("div",{className:"edit-site-style-book__example-preview","aria-hidden":!0,children:(0,a.jsx)(b.Disabled,{className:"edit-site-style-book__example-preview__content",children:r||(0,a.jsxs)(Xm,{value:u,settings:l,children:[(0,a.jsx)(x.__unstableEditorStyles,{}),(0,a.jsx)(x.BlockList,{renderAppender:!1})]})})})]})})})};var fg=function({enableResizing:e=!0,isSelected:t,onClick:n,onSelect:s,showCloseButton:i=!0,onClose:r,showTabs:o=!0,userConfig:l={},path:u=""}){const[d]=Qm("color.text"),[p]=Qm("color.background"),f=rg(),m=(0,h.useMemo)((()=>Hm(f)),[f]),g=(0,h.useMemo)((()=>Rm().filter((e=>m.some((t=>t.category===e.slug))))),[m]),v=ag(m),{base:y}=(0,h.useContext)(Jm),b=ig(u),_=(0,h.useMemo)((()=>ng(l)||ng(y)?{}:eg(y,l)),[y,l]),j=(0,c.useSelect)((e=>e(x.store).getSettings()),[]),[S]=$m(_),C=(0,h.useMemo)((()=>({...j,styles:ng(S)||ng(l)?j.styles:S,isPreviewMode:!0})),[S,j,l]);return(0,a.jsx)(Ta,{onClose:r,enableResizing:e,closeButtonLabel:i?(0,w.__)("Close"):null,children:(0,a.jsx)("div",{className:Ht("edit-site-style-book",{"is-button":!!n}),style:{color:d,background:p},children:o?(0,a.jsxs)(tg,{children:[(0,a.jsx)("div",{className:"edit-site-style-book__tablist-container",children:(0,a.jsx)(tg.TabList,{children:g.map((e=>(0,a.jsx)(tg.Tab,{tabId:e.slug,children:e.title},e.slug)))})}),g.map((e=>{const n=e.slug?Rm().find((t=>t.slug===e.slug)):null,i=n?Dm(n,m):{examples:m};return(0,a.jsx)(tg.TabPanel,{tabId:e.slug,focusable:!1,className:"edit-site-style-book__tabpanel",children:(0,a.jsx)(cg,{category:e.slug,examples:i,isSelected:t,onSelect:s,settings:C,title:e.title,goTo:b})},e.slug)}))]}):(0,a.jsx)(cg,{examples:{examples:v},isSelected:t,onClick:n,onSelect:s,settings:C,goTo:b})})})};const{useGlobalStyle:mg,AdvancedPanel:gg}=ne(x.privateApis);var vg=function(){const[e]=mg("",void 0,"user",{shouldDecodeEncode:!1}),[t,n]=mg("",void 0,"all",{shouldDecodeEncode:!1}),{setEditorCanvasContainerView:s}=ne((0,c.useDispatch)(Rt));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Additional CSS"),description:(0,a.jsxs)(a.Fragment,{children:[(0,w.__)("You can add custom CSS to further customize the appearance and layout of your site."),(0,a.jsx)("br",{}),(0,a.jsx)(b.ExternalLink,{href:(0,w.__)("https://developer.wordpress.org/advanced-administration/wordpress/css/"),className:"edit-site-global-styles-screen-css-help-link",children:(0,w.__)("Learn more about CSS")})]}),onBack:()=>{s(void 0)}}),(0,a.jsx)("div",{className:"edit-site-global-styles-screen-css",children:(0,a.jsx)(gg,{value:e,onChange:n,inheritedValue:t})})]})};const{ExperimentalBlockEditorProvider:yg,GlobalStylesContext:xg,useGlobalStylesOutputWithConfig:bg,__unstableBlockStyleVariationOverridesWithConfig:wg}=ne(x.privateApis),{mergeBaseAndUserConfigs:_g}=ne(f.privateApis);function jg(e){return!e||0===Object.keys(e).length}var Sg=function({userConfig:e,blocks:t}){const{base:n}=(0,h.useContext)(xg),s=(0,h.useMemo)((()=>jg(e)||jg(n)?{}:_g(n,e)),[n,e]),i=(0,h.useMemo)((()=>Array.isArray(t)?t:[t]),[t]),r=(0,c.useSelect)((e=>e(x.store).getSettings()),[]),o=(0,h.useMemo)((()=>({...r,isPreviewMode:!0})),[r]),[l]=bg(s),u=jg(l)||jg(e)?o.styles:l;return(0,a.jsx)(Ta,{title:(0,w.__)("Revisions"),closeButtonLabel:(0,w.__)("Close revisions"),enableResizing:!0,children:(0,a.jsxs)(x.__unstableIframe,{className:"edit-site-revisions__iframe",name:"revisions",tabIndex:0,children:[(0,a.jsx)("style",{children:".is-root-container { display: flow-root; }"}),(0,a.jsx)(b.Disabled,{className:"edit-site-revisions__example-preview__content",children:(0,a.jsxs)(yg,{value:i,settings:o,children:[(0,a.jsx)(x.BlockList,{renderAppender:!1}),(0,a.jsx)(x.__unstableEditorStyles,{styles:u}),(0,a.jsx)(wg,{config:s})]})})]})})};const Cg=window.wp.date,{getGlobalStylesChanges:kg}=ne(x.privateApis);function Eg({revision:e,previousRevision:t}){const n=kg(e,t,{maxResults:7});return n.length?(0,a.jsx)("ul",{"data-testid":"global-styles-revision-changes",className:"edit-site-global-styles-screen-revisions__changes",children:n.map((e=>(0,a.jsx)("li",{children:e},e)))}):null}var Pg=function({userRevisions:e,selectedRevisionId:t,onChange:n,canApplyRevision:s,onApplyRevision:i}){const{currentThemeName:r,currentUser:o}=(0,c.useSelect)((e=>{const{getCurrentTheme:t,getCurrentUser:n}=e(j.store),s=t();return{currentThemeName:s?.name?.rendered||s?.stylesheet,currentUser:n()}}),[]),l=(0,Cg.getDate)().getTime(),{datetimeAbbreviated:u}=(0,Cg.getSettings)().formats;return(0,a.jsx)(b.Composite,{orientation:"vertical",className:"edit-site-global-styles-screen-revisions__revisions-list","aria-label":(0,w.__)("Global styles revisions list"),role:"listbox",children:e.map(((c,d)=>{const{id:h,author:p,modified:f}=c,m="unsaved"===h,g=m?o:p,v=g?.name||(0,w.__)("User"),y=g?.avatar_urls?.[48],x=t?t===h:0===d,_=!s&&x,j="parent"===h,S=(0,Cg.getDate)(f),C=f&&l-S.getTime()>864e5?(0,Cg.dateI18n)(u,S):(0,Cg.humanTimeDiff)(f),k=function(e,t,n,s){return"parent"===e?(0,w.__)("Reset the styles to the theme defaults"):"unsaved"===e?(0,w.sprintf)((0,w.__)("Unsaved changes by %s"),t):s?(0,w.sprintf)((0,w.__)("Changes saved by %1$s on %2$s. This revision matches current editor styles."),t,n):(0,w.sprintf)((0,w.__)("Changes saved by %1$s on %2$s"),t,n)}(h,v,(0,Cg.dateI18n)(u,S),_);return(0,a.jsxs)(b.Composite.Item,{className:"edit-site-global-styles-screen-revisions__revision-item","aria-current":x,role:"option",onKeyDown:e=>{const{keyCode:t}=e;t!==Xt.ENTER&&t!==Xt.SPACE||n(c)},onClick:e=>{e.preventDefault(),n(c)},"aria-selected":x,"aria-label":k,render:(0,a.jsx)("div",{}),children:[(0,a.jsx)("span",{className:"edit-site-global-styles-screen-revisions__revision-item-wrapper",children:j?(0,a.jsxs)("span",{className:"edit-site-global-styles-screen-revisions__description",children:[(0,w.__)("Default styles"),(0,a.jsx)("span",{className:"edit-site-global-styles-screen-revisions__meta",children:r})]}):(0,a.jsxs)("span",{className:"edit-site-global-styles-screen-revisions__description",children:[m?(0,a.jsx)("span",{className:"edit-site-global-styles-screen-revisions__date",children:(0,w.__)("(Unsaved)")}):(0,a.jsx)("time",{className:"edit-site-global-styles-screen-revisions__date",dateTime:f,children:C}),(0,a.jsxs)("span",{className:"edit-site-global-styles-screen-revisions__meta",children:[(0,a.jsx)("img",{alt:v,src:y}),v]}),x&&(0,a.jsx)(Eg,{revision:c,previousRevision:d<e.length?e[d+1]:{}})]})}),x&&(_?(0,a.jsx)("p",{className:"edit-site-global-styles-screen-revisions__applied-text",children:(0,w.__)("These styles are already applied to your site.")}):(0,a.jsx)(b.Button,{size:"compact",variant:"primary",className:"edit-site-global-styles-screen-revisions__apply-button",onClick:i,"aria-label":(0,w.__)("Apply the selected revision to your site."),children:j?(0,w.__)("Reset to defaults"):(0,w.__)("Apply")}))]},h)}))})};function Ig({currentPage:e,numPages:t,changePage:n,totalItems:s,className:i,disabled:r=!1,buttonVariant:o="tertiary",label:l=(0,w.__)("Pagination")}){return(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,as:"nav","aria-label":l,spacing:3,justify:"flex-start",className:Ht("edit-site-pagination",i),children:[(0,a.jsx)(b.__experimentalText,{variant:"muted",className:"edit-site-pagination__total",children:(0,w.sprintf)((0,w._n)("%s item","%s items",s),s)}),(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,a.jsx)(b.Button,{variant:o,onClick:()=>n(1),accessibleWhenDisabled:!0,disabled:r||1===e,label:(0,w.__)("First page"),icon:(0,w.isRTL)()?$c:eu,size:"compact"}),(0,a.jsx)(b.Button,{variant:o,onClick:()=>n(e-1),accessibleWhenDisabled:!0,disabled:r||1===e,label:(0,w.__)("Previous page"),icon:(0,w.isRTL)()?La:za,size:"compact"})]}),(0,a.jsx)(b.__experimentalText,{variant:"muted",children:(0,w.sprintf)((0,w._x)("%1$s of %2$s","paging"),e,t)}),(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,a.jsx)(b.Button,{variant:o,onClick:()=>n(e+1),accessibleWhenDisabled:!0,disabled:r||e===t,label:(0,w.__)("Next page"),icon:(0,w.isRTL)()?za:La,size:"compact"}),(0,a.jsx)(b.Button,{variant:o,onClick:()=>n(t),accessibleWhenDisabled:!0,disabled:r||e===t,label:(0,w.__)("Last page"),icon:(0,w.isRTL)()?eu:$c,size:"compact"})]})]})}const{GlobalStylesContext:Vg,areGlobalStyleConfigsEqual:Og}=ne(x.privateApis);var Tg=function(){const{user:e,setUserConfig:t}=(0,h.useContext)(Vg),{blocks:n,editorCanvasContainerView:s}=(0,c.useSelect)((e=>({editorCanvasContainerView:ne(e(Rt)).getEditorCanvasContainerView(),blocks:e(x.store).getBlocks()})),[]),[i,r]=(0,h.useState)(1),[o,l]=(0,h.useState)([]),{revisions:u,isLoading:d,hasUnsavedChanges:p,revisionsCount:f}=no({query:{per_page:10,page:i}}),m=Math.ceil(f/10),[g,v]=(0,h.useState)(e),[y,_]=(0,h.useState)(!1),{setEditorCanvasContainerView:j}=ne((0,c.useDispatch)(Rt)),S=Og(g,e),C=()=>{j("global-styles-revisions:style-book"===s?"style-book":void 0)},k=e=>{t((()=>e)),_(!1),C()};(0,h.useEffect)((()=>{!d&&u.length&&l(u)}),[u,d]);const E=u[0],P=g?.id,I=!!E?.id&&!S&&!P;(0,h.useEffect)((()=>{I&&v(E)}),[I,E]);const V=!!P&&"unsaved"!==P&&!S,O=!!o.length;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:f&&(0,w.sprintf)((0,w.__)("Revisions (%s)"),f),description:(0,w.__)('Click on previously saved styles to preview them. To restore a selected version to the editor, hit "Apply." When you\'re ready, use the Save button to save your changes.'),onBack:C}),!O&&(0,a.jsx)(b.Spinner,{className:"edit-site-global-styles-screen-revisions__loading"}),O&&("global-styles-revisions:style-book"===s?(0,a.jsx)(fg,{userConfig:g,isSelected:()=>{},onClose:()=>{j("global-styles-revisions")}}):(0,a.jsx)(Sg,{blocks:n,userConfig:g,closeButtonLabel:(0,w.__)("Close revisions")})),(0,a.jsx)(Pg,{onChange:v,selectedRevisionId:P,userRevisions:o,canApplyRevision:V,onApplyRevision:()=>p?_(!0):k(g)}),m>1&&(0,a.jsx)("div",{className:"edit-site-global-styles-screen-revisions__footer",children:(0,a.jsx)(Ig,{className:"edit-site-global-styles-screen-revisions__pagination",currentPage:i,numPages:m,changePage:r,totalItems:f,disabled:d,label:(0,w.__)("Global Styles pagination")})}),y&&(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:y,confirmButtonText:(0,w.__)("Apply"),onConfirm:()=>k(g),onCancel:()=>_(!1),size:"medium",children:(0,w.__)("Are you sure you want to apply this revision? Any unsaved changes will be lost.")})]})};const{useGlobalStylesReset:Ag}=ne(x.privateApis),{Slot:Ng,Fill:Fg}=(0,b.createSlotFill)("GlobalStylesMenu");function Mg(){const[e,t]=Ag(),{toggle:n}=(0,c.useDispatch)(m.store),{canEditCSS:s}=(0,c.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(j.store),s=n(),i=s?t("root","globalStyles",s):void 0;return{canEditCSS:!!i?._links?.["wp:action-edit-css"]}}),[]),{setEditorCanvasContainerView:i}=ne((0,c.useDispatch)(Rt)),r=()=>{i("global-styles-css")};return(0,a.jsx)(Fg,{children:(0,a.jsx)(b.DropdownMenu,{icon:No,label:(0,w.__)("More"),toggleProps:{size:"compact"},children:({onClose:i})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.MenuGroup,{children:[s&&(0,a.jsx)(b.MenuItem,{onClick:r,children:(0,w.__)("Additional CSS")}),(0,a.jsx)(b.MenuItem,{onClick:()=>{n("core/edit-site","welcomeGuideStyles"),i()},children:(0,w.__)("Welcome Guide")})]}),(0,a.jsx)(b.MenuGroup,{children:(0,a.jsx)(b.MenuItem,{onClick:()=>{t(),i()},disabled:!e,children:(0,w.__)("Reset styles")})})]})})})}function Bg({className:e,...t}){return(0,a.jsx)(b.Navigator.Screen,{className:["edit-site-global-styles-sidebar__navigator-screen",e].filter(Boolean).join(" "),...t})}function Dg({parentMenu:e,blockStyles:t,blockName:n}){return t.map(((t,s)=>(0,a.jsx)(Bg,{path:e+"/variations/"+t.name,children:(0,a.jsx)(Jl,{name:n,variation:t.name})},s)))}function Rg({name:e,parentMenu:t=""}){const n=(0,c.useSelect)((t=>{const{getBlockStyles:n}=t(o.store);return n(e)}),[e]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Bg,{path:t+"/colors/palette",children:(0,a.jsx)(Hf,{name:e})}),!!n?.length&&(0,a.jsx)(Dg,{parentMenu:t,blockStyles:n,blockName:e})]})}function Lg(){const e=(0,b.useNavigator)(),{path:t}=e.location;return(0,a.jsx)(fg,{isSelected:e=>t===`/blocks/${encodeURIComponent(e)}`||t.startsWith(`/blocks/${encodeURIComponent(e)}/`),onSelect:t=>{Am.find((e=>e.slug===t))?e.goTo("/colors/palette"):"typography"!==t?e.goTo("/blocks/"+encodeURIComponent(t)):e.goTo("/typography")}})}function zg(){const e=(0,b.useNavigator)(),{selectedBlockName:t,selectedBlockClientId:n}=(0,c.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n}=e(x.store),s=t();return{selectedBlockName:n(s),selectedBlockClientId:s}}),[]),s=kl(t);(0,h.useEffect)((()=>{if(!n||!s)return;const i=e.location.path;if("/blocks"!==i&&!i.startsWith("/blocks/"))return;const r="/blocks/"+encodeURIComponent(t);r!==i&&e.goTo(r,{skipFocus:!0})}),[n,t,s])}function Hg(){const{goTo:e,location:t}=(0,b.useNavigator)(),n=(0,c.useSelect)((e=>ne(e(Rt)).getEditorCanvasContainerView()),[]),s=t?.path,i="/revisions"===s;(0,h.useEffect)((()=>{switch(n){case"global-styles-revisions":case"global-styles-revisions:style-book":i||e("/revisions");break;case"global-styles-css":e("/css");break;default:i&&e("/",{isBack:!0})}}),[n,i,e])}function Gg({path:e,onPathChange:t,children:n}){return function(e,t){const n=(0,b.useNavigator)(),{path:s}=n.location,i=(0,y.usePrevious)(e),r=(0,y.usePrevious)(s);(0,h.useEffect)((()=>{e!==s&&(e!==i?n.goTo(e):s!==r&&t(s))}),[t,e,r,i,s,n])}(e,t),n}var Wg=function({path:e,onPathChange:t}){const n=(0,o.getBlockTypes)(),s=(0,c.useSelect)((e=>ne(e(Rt)).getEditorCanvasContainerView()),[]);return(0,a.jsxs)(b.Navigator,{className:"edit-site-global-styles-sidebar__navigator-provider",initialPath:"/",children:[e&&t&&(0,a.jsx)(Gg,{path:e,onPathChange:t}),(0,a.jsx)(Bg,{path:"/",children:(0,a.jsx)(fl,{})}),(0,a.jsx)(Bg,{path:"/variations",children:(0,a.jsx)(Om,{})}),(0,a.jsx)(Bg,{path:"/blocks",children:(0,a.jsx)(Il,{})}),(0,a.jsx)(Bg,{path:"/typography",children:(0,a.jsx)(Yp,{})}),(0,a.jsx)(Bg,{path:"/typography/font-sizes",children:(0,a.jsx)(xf,{})}),(0,a.jsx)(Bg,{path:"/typography/font-sizes/:origin/:slug",children:(0,a.jsx)(pf,{})}),(0,a.jsx)(Bg,{path:"/typography/text",children:(0,a.jsx)(sf,{element:"text"})}),(0,a.jsx)(Bg,{path:"/typography/link",children:(0,a.jsx)(sf,{element:"link"})}),(0,a.jsx)(Bg,{path:"/typography/heading",children:(0,a.jsx)(sf,{element:"heading"})}),(0,a.jsx)(Bg,{path:"/typography/caption",children:(0,a.jsx)(sf,{element:"caption"})}),(0,a.jsx)(Bg,{path:"/typography/button",children:(0,a.jsx)(sf,{element:"button"})}),(0,a.jsx)(Bg,{path:"/colors",children:(0,a.jsx)(Pf,{})}),(0,a.jsx)(Bg,{path:"/shadows",children:(0,a.jsx)(mm,{})}),(0,a.jsx)(Bg,{path:"/shadows/edit/:category/:slug",children:(0,a.jsx)(gm,{})}),(0,a.jsx)(Bg,{path:"/layout",children:(0,a.jsx)(km,{})}),(0,a.jsx)(Bg,{path:"/css",children:(0,a.jsx)(vg,{})}),(0,a.jsx)(Bg,{path:"/revisions",children:(0,a.jsx)(Tg,{})}),(0,a.jsx)(Bg,{path:"/background",children:(0,a.jsx)(Xf,{})}),n.map((e=>(0,a.jsx)(Bg,{path:"/blocks/"+encodeURIComponent(e.name),children:(0,a.jsx)(Jl,{name:e.name})},"menu-block-"+e.name))),(0,a.jsx)(Rg,{}),n.map((e=>(0,a.jsx)(Rg,{name:e.name,parentMenu:"/blocks/"+encodeURIComponent(e.name)},"screens-block-"+e.name))),"style-book"===s&&(0,a.jsx)(Lg,{}),(0,a.jsx)(Mg,{}),(0,a.jsx)(zg,{}),(0,a.jsx)(Hg,{})]})};const{ComplementaryArea:Ug,ComplementaryAreaMoreMenuItem:qg}=ne(f.privateApis);function Zg({className:e,identifier:t,title:n,icon:s,children:i,closeLabel:r,header:o,headerClassName:l,panelClassName:c,isActiveByDefault:u}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Ug,{className:e,scope:"core",identifier:t,title:n,icon:s,closeLabel:r,header:o,headerClassName:l,panelClassName:c,isActiveByDefault:u,children:i}),(0,a.jsx)(qg,{scope:"core",identifier:t,icon:s,children:n})]})}const{interfaceStore:Yg}=ne(f.privateApis),{useLocation:Kg}=ne(Lt.privateApis);function Xg(){const{query:e}=Kg(),{canvas:t="view",name:n}=e,{shouldClearCanvasContainerView:s,isStyleBookOpened:i,showListViewByDefault:r,hasRevisions:o,isRevisionsOpened:l,isRevisionsStyleBookOpened:u}=(0,c.useSelect)((e=>{const{getActiveComplementaryArea:n}=e(Yg),{getEditorCanvasContainerView:s}=ne(e(Rt)),i=s(),r="visual"===e(f.store).getEditorMode(),a="edit"===t,o=e(m.store).get("core","showListViewByDefault"),{getEntityRecord:l,__experimentalGetCurrentGlobalStylesId:c}=e(j.store),u=c(),d=u?l("root","globalStyles",u):void 0;return{isStyleBookOpened:"style-book"===i,shouldClearCanvasContainerView:"edit-site/global-styles"!==n("core")||!r||!a,showListViewByDefault:o,hasRevisions:!!d?._links?.["version-history"]?.[0]?.count,isRevisionsStyleBookOpened:"global-styles-revisions:style-book"===i,isRevisionsOpened:"global-styles-revisions"===i}}),[t]),{setEditorCanvasContainerView:d}=ne((0,c.useDispatch)(Rt)),p=(0,y.useViewportMatch)("medium","<");(0,h.useEffect)((()=>{s&&d(void 0)}),[s,d]);const{setIsListViewOpened:g}=(0,c.useDispatch)(f.store),{getActiveComplementaryArea:v}=(0,c.useSelect)(Yg),{enableComplementaryArea:x}=(0,c.useDispatch)(Yg),_=(0,h.useRef)(null);return(0,h.useEffect)((()=>{"styles"===n&&"edit"===t?(_.current=v("core"),x("core","edit-site/global-styles")):_.current&&x("core",_.current)}),[n,x,t,v]),(0,a.jsx)(Zg,{className:"edit-site-global-styles-sidebar",identifier:"edit-site/global-styles",title:(0,w.__)("Styles"),icon:Fa,closeLabel:(0,w.__)("Close Styles"),panelClassName:"edit-site-global-styles-sidebar__panel",header:(0,a.jsxs)(b.Flex,{className:"edit-site-global-styles-sidebar__header",gap:1,children:[(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)("h2",{className:"edit-site-global-styles-sidebar__header-title",children:(0,w.__)("Styles")})}),(0,a.jsxs)(b.Flex,{justify:"flex-end",gap:1,className:"edit-site-global-styles-sidebar__header-actions",children:[!p&&(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.Button,{icon:Ao,label:(0,w.__)("Style Book"),isPressed:i||u,accessibleWhenDisabled:!0,disabled:s,onClick:()=>{l?d("global-styles-revisions:style-book"):u?d("global-styles-revisions"):(g(i&&r),d(i?void 0:"style-book"))},size:"compact"})}),(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.Button,{label:(0,w.__)("Revisions"),icon:ba,onClick:()=>{g(!1),d(u?"style-book":l?void 0:i?"global-styles-revisions:style-book":"global-styles-revisions")},accessibleWhenDisabled:!0,disabled:!o,isPressed:l||u,size:"compact"})}),(0,a.jsx)(Ng,{})]})]}),children:(0,a.jsx)(Wg,{})})}var Qg=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"})});const Jg=window.wp.blob;function $g(){const e=(0,c.useSelect)((e=>{const t=e(j.store).getCurrentTheme()?._links?.["wp:export-theme"]?.[0]?.targetHints??{};return!!t.allow?.includes("GET")}),[]),{createErrorNotice:t}=(0,c.useDispatch)(_.store);if(!e)return null;return(0,a.jsx)(b.MenuItem,{role:"menuitem",icon:Qg,onClick:async function(){try{const e=await ra()({path:"/wp-block-editor/v1/export",parse:!1,headers:{Accept:"application/zip"}}),t=await e.blob(),n=e.headers.get("content-disposition").match(/=(.+)\.zip/),s=n[1]?n[1]:"edit-site-export";(0,Jg.downloadBlob)(s+".zip",t,"application/zip")}catch(e){let n={};try{n=await e.json()}catch(e){}const s=n.message&&"unknown_error"!==n.code?n.message:(0,w.__)("An error occurred while creating the site export.");t(s,{type:"snackbar"})}},info:(0,w.__)("Download your theme with updated templates and styles."),children:(0,w._x)("Export","site exporter menu item")})}function ev(){const{toggle:e}=(0,c.useDispatch)(m.store);return(0,a.jsx)(b.MenuItem,{onClick:()=>e("core/edit-site","welcomeGuide"),children:(0,w.__)("Welcome Guide")})}const{ToolsMoreMenuGroup:tv,PreferencesModal:nv}=ne(f.privateApis);function sv(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(tv,{children:[(0,a.jsx)($g,{}),(0,a.jsx)(ev,{})]}),(0,a.jsx)(nv,{})]})}const{useLocation:iv,useHistory:rv}=ne(Lt.privateApis);const{useLocation:av}=ne(Lt.privateApis);const{getTemplateInfo:ov}=ne(f.privateApis);var lv=function(e,t){const{title:n,isLoaded:s}=(0,c.useSelect)((n=>{const{getEditedEntityRecord:s,getCurrentTheme:i,hasFinishedResolution:r}=n(j.store);if(!t)return{isLoaded:!1};const a=s("postType",e,t),{default_template_types:o=[]}=i()??{},l=ov({template:a,templateTypes:o}),c=r("getEditedEntityRecord",["postType",e,t]);return{title:l.title,isLoaded:c}}),[e,t]);let i;s&&(i=(0,w.sprintf)((0,w._x)("%1$s ‹ %2$s","breadcrumb trail"),(0,qt.decodeEntities)(n),Fe[e]??Fe[Se])),function(e){const t=av(),n=(0,c.useSelect)((e=>e(j.store).getEntityRecord("root","site")?.title),[]),s=(0,h.useRef)(!0);(0,h.useEffect)((()=>{s.current=!1}),[t]),(0,h.useEffect)((()=>{if(!s.current&&e&&n){const t=(0,w.sprintf)((0,w.__)("%1$s ‹ %2$s ‹ Editor — WordPress"),(0,qt.decodeEntities)(e),(0,qt.decodeEntities)(n));document.title=t,(0,ml.speak)(e,"assertive")}}),[e,n,t])}(s&&i)};const{useLocation:cv}=ne(Lt.privateApis),uv=[Se,Ce,je,Ie.user],dv=["page","post"];function hv(){const e=(0,c.useSelect)((e=>{const{getEntityRecord:t}=e(j.store),n=t("root","__unstableBase");return n?.home}),[]);return(0,a.jsx)("iframe",{src:(0,Qt.addQueryArgs)(e,{wp_site_preview:1}),title:(0,w.__)("Site Preview"),style:{display:"block",width:"100%",height:"100%",backgroundColor:"#fff"},onLoad:e=>{const t=e.target.contentDocument;en.focus.focusable.find(t).forEach((e=>{e.style.pointerEvents="none",e.tabIndex=-1,e.setAttribute("aria-hidden","true")}))}})}const{Editor:pv,BackButton:fv}=ne(f.privateApis),{useHistory:mv,useLocation:gv}=ne(Lt.privateApis),{BlockKeyboardShortcuts:vv}=ne(l.privateApis),yv={edit:{opacity:0,scale:.2},hover:{opacity:1,scale:1,clipPath:"inset( 22% round 2px )"}},xv={edit:{clipPath:"inset(0% round 0px)"},hover:{clipPath:"inset( 22% round 2px )"},tap:{clipPath:"inset(0% round 0px)"}};function bv(e){switch(e){case"navigation":return"/navigation";case"wp_block":return"/pattern?postType=wp_block";case"wp_template_part":return"/pattern?postType=wp_template_part";case"wp_template":return"/template";case"page":return"/page";case"post":return"/"}throw"Unknown post type"}function wv({isHomeRoute:e=!1,isPostsList:t=!1}){const n=(0,y.useReducedMotion)(),s=gv(),{canvas:i="view"}=s.query,r=Sn();!function(e){const{clearSelectedBlock:t}=(0,c.useDispatch)(x.store),{setDeviceType:n,closePublishSidebar:s,setIsListViewOpened:i,setIsInserterOpened:r}=(0,c.useDispatch)(f.store),{get:a}=(0,c.useSelect)(m.store),o=(0,c.useRegistry)();(0,h.useLayoutEffect)((()=>{const l=window.matchMedia("(min-width: 782px)").matches;o.batch((()=>{t(),n("Desktop"),s(),r(!1),l&&"edit"===e&&a("core","showListViewByDefault")&&!a("core","distractionFree")?i(!0):i(!1)}))}),[e,o,t,n,s,r,i,a])}(i);const o=function(){const{name:e,params:t={},query:n}=cv(),{postId:s=n?.postId}=t;let i;"navigation-item"===e?i=je:"pattern-item"===e?i=Ie.user:"template-part-item"===e?i=Ce:"template-item"===e||"templates"===e?i=Se:"page-item"===e||"pages"===e?i="page":"post-item"!==e&&"posts"!==e||(i="post");const r=(0,c.useSelect)((e=>{const{getHomePage:t}=ne(e(j.store));return t()}),[]),a=(0,c.useSelect)((e=>{if(uv.includes(i)&&s)return;if(s&&s.includes(","))return;const{getTemplateId:t}=ne(e(j.store));return i&&s&&dv.includes(i)?t(i,s):"page"===r?.postType?t("page",r?.postId):"wp_template"===r?.postType?r?.postId:void 0}),[r,s,i]),o=(0,h.useMemo)((()=>uv.includes(i)&&s?{}:i&&s&&dv.includes(i)?{postType:i,postId:s}:"page"===r?.postType?{postType:"page",postId:r?.postId}:{}),[r,i,s]);return uv.includes(i)&&s?{isReady:!0,postType:i,postId:s,context:o}:r?{isReady:void 0!==a,postType:Se,postId:a,context:o}:{isReady:!1}}();!function({postType:e,postId:t,context:n,isReady:s}){const{setEditedEntity:i}=(0,c.useDispatch)(Rt);(0,h.useEffect)((()=>{s&&i(e,t,n)}),[s,e,t,n,i])}(o);const{postType:l,postId:u,context:d}=o,{isBlockBasedTheme:p,editorCanvasView:g,currentPostIsTrashed:v,hasSiteIcon:S}=(0,c.useSelect)((e=>{const{getEditorCanvasContainerView:t}=ne(e(Rt)),{getCurrentTheme:n,getEntityRecord:s}=e(j.store),i=s("root","__unstableBase",void 0);return{isBlockBasedTheme:n()?.is_block_theme,editorCanvasView:t(),currentPostIsTrashed:"trash"===e(f.store).getCurrentPostAttribute("status"),hasSiteIcon:!!i?.site_icon_url}}),[]),C=!!d?.postId;lv(C?d.postType:l,C?d.postId:u);const k=Qr(),E=!Oa(),P=function(){const{query:e,path:t}=iv(),n=rv(),{canvas:s="view"}=e,i=(0,c.useSelect)((e=>"trash"===e(f.store).getCurrentPostAttribute("status")),[]),[r,a]=(0,h.useState)(!1);(0,h.useEffect)((()=>{"edit"===s&&a(!1)}),[s]);const o={"aria-label":(0,w.__)("Edit"),"aria-disabled":i,title:null,role:"button",tabIndex:0,onFocus:()=>a(!0),onBlur:()=>a(!1),onKeyDown:e=>{const{keyCode:s}=e;s!==Xt.ENTER&&s!==Xt.SPACE||i||(e.preventDefault(),n.navigate((0,Qt.addQueryArgs)(t,{canvas:"edit"}),{transition:"canvas-mode-edit-transition"}))},onClick:()=>n.navigate((0,Qt.addQueryArgs)(t,{canvas:"edit"}),{transition:"canvas-mode-edit-transition"}),onClickCapture:e=>{i&&(e.preventDefault(),e.stopPropagation())},readonly:!0};return{className:Ht("edit-site-visual-editor__editor-canvas",{"is-focused":r&&"view"===s}),..."view"===s?o:{}}}(),I="edit"===i,V=(0,y.useInstanceId)(So,"edit-site-editor__loading-progress"),O=Po(),T=(0,h.useMemo)((()=>[...O.styles,{css:"view"===i?`body{min-height: 100vh; ${v?"":"cursor: pointer;"}}`:void 0}]),[O.styles,i,v]),{resetZoomLevel:A}=ne((0,c.useDispatch)(x.store)),{createSuccessNotice:N}=(0,c.useDispatch)(_.store),F=mv(),M=(0,h.useCallback)(((e,t)=>{switch(e){case"move-to-trash":case"delete-post":F.navigate(bv(C?d.postType:l));break;case"duplicate-post":{const e=t[0],n="string"==typeof e.title?e.title:e.title?.rendered;N((0,w.sprintf)((0,w.__)('"%s" successfully created.'),(0,qt.decodeEntities)(n)||(0,w.__)("(no title)")),{type:"snackbar",id:"duplicate-post-action",actions:[{label:(0,w.__)("Edit"),onClick:()=>{F.navigate(`/${e.type}/${e.id}?canvas=edit`)}}]})}}}),[l,d?.postType,C,F,N]),B=Va(g),D=!r,R={duration:n?0:.2};return!p&&e?(0,a.jsx)(hv,{}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(wo,{disableRootPadding:l!==Se}),(0,a.jsx)(f.EditorKeyboardShortcutsRegister,{}),I&&(0,a.jsx)(vv,{}),D?null:(0,a.jsx)(So,{id:V}),I&&(0,a.jsx)(xo,{postType:C?d.postType:l}),D&&(0,a.jsxs)(pv,{postType:C?d.postType:l,postId:C?d.postId:u,templateId:C?u:void 0,settings:O,className:"edit-site-editor__editor-interface",styles:T,customSaveButton:k&&(0,a.jsx)(ea,{size:"compact"}),customSavePanel:k&&(0,a.jsx)(ua,{}),forceDisableBlockTools:!E,title:B,iframeProps:P,onActionPerformed:M,extraSidebarPanels:!C&&(0,a.jsx)(To.Slot,{}),children:[I&&(0,a.jsx)(fv,{children:({length:e})=>e<=1&&(0,a.jsxs)(b.__unstableMotion.div,{className:"edit-site-editor__view-mode-toggle",transition:R,animate:"edit",initial:"edit",whileHover:"hover",whileTap:"tap",children:[(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,label:(0,w.__)("Open Navigation"),showTooltip:!0,tooltipPosition:"middle right",onClick:()=>{A(),t&&s.query?.focusMode?F.navigate("/",{transition:"canvas-mode-view-transition"}):F.navigate(function(e,t){const{path:n,name:s}=e;return["pattern-item","template-part-item","page-item","template-item","post-item"].includes(s)?bv(t):(0,Qt.addQueryArgs)(n,{canvas:void 0})}(s,C?d.postType:l),{transition:"canvas-mode-view-transition"})},children:(0,a.jsx)(b.__unstableMotion.div,{variants:xv,children:(0,a.jsx)($t,{className:"edit-site-editor__view-mode-toggle-icon"})})}),(0,a.jsx)(b.__unstableMotion.div,{className:Ht("edit-site-editor__back-icon",{"has-site-icon":S}),variants:yv,children:(0,a.jsx)(qa,{icon:ho})})]})}),(0,a.jsx)(sv,{}),p&&(0,a.jsx)(Xg,{})]})]})}function _v(e){const t=e.currentTheme?.is_block_theme,n=e.currentTheme?.theme_supports["editor-styles"],s=e.editorSettings?.supportsLayout;return!t&&(n||s)}const jv={name:"home",path:"/",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme;return t||_v(e)?(0,a.jsx)(co,{}):(0,a.jsx)(uo,{})},preview({siteData:e}){const t=e.currentTheme?.is_block_theme;return t||_v(e)?(0,a.jsx)(wv,{isHomeRoute:!0}):void 0},mobile({siteData:e}){const t=e.currentTheme?.is_block_theme;return t||_v(e)?(0,a.jsx)(co,{}):(0,a.jsx)(uo,{})}}},{useLocation:Sv}=ne(Lt.privateApis);function Cv(){const{query:e={}}=Sv(),{canvas:t}=e;return"edit"===t?(0,a.jsx)(wv,{}):(0,a.jsx)(Km,{})}const kv={name:"styles",path:"/styles",areas:{content:(0,a.jsx)(Km,{}),sidebar:(0,a.jsx)(oo,{backPath:"/"}),preview:({query:e})=>"stylebook"===e.preview?(0,a.jsx)(lg,{}):(0,a.jsx)(wv,{}),mobile:(0,a.jsx)(Cv,{})},widths:{content:380}},Ev={per_page:100,status:["publish","draft"],order:"desc",orderby:"date"};function Pv({menuTitle:e,onClose:t,onSave:n}){const[s,i]=(0,h.useState)(e),r=s!==e&&(o=s,o?.trim()?.length>0);var o;return(0,a.jsx)(b.Modal,{title:(0,w.__)("Rename"),onRequestClose:t,focusOnMount:"firstContentElement",size:"small",children:(0,a.jsx)("form",{className:"sidebar-navigation__rename-modal-form",children:(0,a.jsxs)(b.__experimentalVStack,{spacing:"3",children:[(0,a.jsx)(b.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:s,placeholder:(0,w.__)("Navigation title"),onChange:i,label:(0,w.__)("Name")}),(0,a.jsxs)(b.__experimentalHStack,{justify:"right",children:[(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,w.__)("Cancel")}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,disabled:!r,variant:"primary",type:"submit",onClick:e=>{e.preventDefault(),r&&(n({title:s}),t())},children:(0,w.__)("Save")})]})]})})})}function Iv({onClose:e,onConfirm:t}){return(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{t(),e()},onCancel:e,confirmButtonText:(0,w.__)("Delete"),size:"medium",children:(0,w.__)("Are you sure you want to delete this Navigation Menu?")})}const{useHistory:Vv}=ne(Lt.privateApis),Ov={position:"bottom right"};function Tv(e){const{onDelete:t,onSave:n,onDuplicate:s,menuTitle:i,menuId:r}=e,[o,l]=(0,h.useState)(!1),[c,u]=(0,h.useState)(!1),d=Vv(),p=()=>{l(!1),u(!1)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.DropdownMenu,{className:"sidebar-navigation__more-menu",label:(0,w.__)("Actions"),icon:No,popoverProps:Ov,children:({onClose:e})=>(0,a.jsxs)(b.MenuGroup,{children:[(0,a.jsx)(b.MenuItem,{onClick:()=>{l(!0),e()},children:(0,w.__)("Rename")}),(0,a.jsx)(b.MenuItem,{onClick:()=>{d.navigate(`/wp_navigation/${r}?canvas=edit`)},children:(0,w.__)("Edit")}),(0,a.jsx)(b.MenuItem,{onClick:()=>{s(),e()},children:(0,w.__)("Duplicate")}),(0,a.jsx)(b.MenuItem,{isDestructive:!0,onClick:()=>{u(!0),e()},children:(0,w.__)("Delete")})]})}),c&&(0,a.jsx)(Iv,{onClose:p,onConfirm:t}),o&&(0,a.jsx)(Pv,{onClose:p,menuTitle:i,onSave:n})]})}var Av=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),Nv=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});const Fv={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"},{useHistory:Mv,useLocation:Bv}=ne(Lt.privateApis);function Dv(e){const t=Mv(),{path:n}=Bv(),{block:s}=e,{clientId:i}=s,{moveBlocksDown:r,moveBlocksUp:o,removeBlocks:l}=(0,c.useDispatch)(x.store),u=(0,w.sprintf)((0,w.__)("Remove %s"),(0,x.BlockTitle)({clientId:i,maximumLength:25})),d=(0,w.sprintf)((0,w.__)("Go to %s"),(0,x.BlockTitle)({clientId:i,maximumLength:25})),p=(0,c.useSelect)((e=>{const{getBlockRootClientId:t}=e(x.store);return t(i)}),[i]),f=(0,h.useCallback)((e=>{const{attributes:s,name:i}=e;"post-type"===s.kind&&s.id&&s.type&&t&&t.navigate(`/${s.type}/${s.id}?canvas=edit`,{state:{backPath:n}}),"core/page-list-item"===i&&s.id&&t&&t.navigate(`/page/${s.id}?canvas=edit`,{state:{backPath:n}})}),[n,t]);return(0,a.jsx)(b.DropdownMenu,{icon:No,label:(0,w.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:Fv,noIcons:!0,...e,children:({onClose:e})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.MenuGroup,{children:[(0,a.jsx)(b.MenuItem,{icon:Av,onClick:()=>{o([i],p),e()},children:(0,w.__)("Move up")}),(0,a.jsx)(b.MenuItem,{icon:Nv,onClick:()=>{r([i],p),e()},children:(0,w.__)("Move down")}),"page"===s.attributes?.type&&s.attributes?.id&&(0,a.jsx)(b.MenuItem,{onClick:()=>{f(s),e()},children:d})]}),(0,a.jsx)(b.MenuGroup,{children:(0,a.jsx)(b.MenuItem,{onClick:()=>{l([i],!1),e()},children:u})})]})})}const{PrivateListView:Rv}=ne(x.privateApis),Lv=["postType","page",{per_page:100,_fields:["id","link","menu_order","parent","title","type"],orderby:"menu_order",order:"asc"}];function zv({rootClientId:e}){const{listViewRootClientId:t,isLoading:n}=(0,c.useSelect)((t=>{const{areInnerBlocksControlled:n,getBlockName:s,getBlockCount:i,getBlockOrder:r}=t(x.store),{isResolving:a}=t(j.store),o=r(e),l=1===o.length&&"core/page-list"===s(o[0])&&i(o[0])>0,c=a("getEntityRecords",Lv);return{listViewRootClientId:l?o[0]:e,isLoading:!n(e)||c}}),[e]),{replaceBlock:s,__unstableMarkNextChangeAsNotPersistent:i}=(0,c.useDispatch)(x.store),r=(0,h.useCallback)((e=>{"core/navigation-link"!==e.name||e.attributes.url||(i(),s(e.clientId,(0,o.createBlock)("core/navigation-link",e.attributes)))}),[i,s]);return(0,a.jsxs)(a.Fragment,{children:[!n&&(0,a.jsx)(Rv,{rootClientId:t,onSelect:r,blockSettingsMenu:Dv,showAppender:!1,isExpanded:!0}),(0,a.jsx)("div",{className:"edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor",children:(0,a.jsx)(x.BlockList,{})})]})}const Hv=()=>{};function Gv({navigationMenuId:e}){const{storedSettings:t}=(0,c.useSelect)((e=>{const{getSettings:t}=ne(e(Rt));return{storedSettings:t()}}),[]),n=(0,h.useMemo)((()=>e?[(0,o.createBlock)("core/navigation",{ref:e})]:[]),[e]);return e&&n?.length?(0,a.jsx)(x.BlockEditorProvider,{settings:t,value:n,onChange:Hv,onInput:Hv,children:(0,a.jsx)("div",{className:"edit-site-sidebar-navigation-screen-navigation-menus__content",children:(0,a.jsx)(zv,{rootClientId:n[0].clientId})})}):null}function Wv(e,t,n){return e?.rendered?"publish"===n?(0,qt.decodeEntities)(e?.rendered):(0,w.sprintf)((0,w._x)("%1$s (%2$s)","menu label"),(0,qt.decodeEntities)(e?.rendered),n):(0,w.sprintf)((0,w.__)("(no title %s)"),t)}function Uv({navigationMenu:e,backPath:t,handleDelete:n,handleDuplicate:s,handleSave:i}){const r=e?.title?.rendered;return(0,a.jsx)(ny,{actions:(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(Tv,{menuId:e?.id,menuTitle:(0,qt.decodeEntities)(r),onDelete:n,onSave:i,onDuplicate:s})}),backPath:t,title:Wv(e?.title,e?.id,e?.status),description:(0,w.__)("Navigation Menus are a curated collection of blocks that allow visitors to get around your site."),children:(0,a.jsx)(Gv,{navigationMenuId:e?.id})})}const{useLocation:qv}=ne(Lt.privateApis),Zv="wp_navigation";function Yv({backPath:e}){const{params:{postId:t}}=qv(),{record:n,isResolving:s}=(0,j.useEntityRecord)("postType",Zv,t),{isSaving:i,isDeleting:r}=(0,c.useSelect)((e=>{const{isSavingEntityRecord:n,isDeletingEntityRecord:s}=e(j.store);return{isSaving:n("postType",Zv,t),isDeleting:s("postType",Zv,t)}}),[t]),o=s||i||r,l=n?.title?.rendered||n?.slug,{handleSave:u,handleDelete:d,handleDuplicate:h}=$v(),p=()=>d(n),f=e=>u(n,e),m=()=>h(n);return o?(0,a.jsx)(ny,{description:(0,w.__)("Navigation Menus are a curated collection of blocks that allow visitors to get around your site."),backPath:e,children:(0,a.jsx)(b.Spinner,{className:"edit-site-sidebar-navigation-screen-navigation-menus__loading"})}):o||n?n?.content?.raw?(0,a.jsx)(Uv,{navigationMenu:n,backPath:e,handleDelete:p,handleSave:f,handleDuplicate:m}):(0,a.jsx)(ny,{actions:(0,a.jsx)(Tv,{menuId:n?.id,menuTitle:(0,qt.decodeEntities)(l),onDelete:p,onSave:f,onDuplicate:m}),backPath:e,title:Wv(n?.title,n?.id,n?.status),description:(0,w.__)("This Navigation Menu is empty.")}):(0,a.jsx)(ny,{description:(0,w.__)("Navigation Menu missing."),backPath:e})}const{useHistory:Kv}=ne(Lt.privateApis);function Xv(){const{deleteEntityRecord:e}=(0,c.useDispatch)(j.store),{createSuccessNotice:t,createErrorNotice:n}=(0,c.useDispatch)(_.store),s=Kv();return async i=>{const r=i?.id;try{await e("postType",Zv,r,{force:!0},{throwOnError:!0}),t((0,w.__)("Navigation Menu successfully deleted."),{type:"snackbar"}),s.navigate("/navigation")}catch(e){n((0,w.sprintf)((0,w.__)("Unable to delete Navigation Menu (%s)."),e?.message),{type:"snackbar"})}}}function Qv(){const{getEditedEntityRecord:e}=(0,c.useSelect)((e=>{const{getEditedEntityRecord:t}=e(j.store);return{getEditedEntityRecord:t}}),[]),{editEntityRecord:t,__experimentalSaveSpecifiedEntityEdits:n}=(0,c.useDispatch)(j.store),{createSuccessNotice:s,createErrorNotice:i}=(0,c.useDispatch)(_.store);return async(r,a)=>{if(!a)return;const o=r?.id,l=e("postType",je,o);t("postType",Zv,o,a);const c=Object.keys(a);try{await n("postType",Zv,o,c,{throwOnError:!0}),s((0,w.__)("Renamed Navigation Menu"),{type:"snackbar"})}catch(e){t("postType",Zv,o,l),i((0,w.sprintf)((0,w.__)("Unable to rename Navigation Menu (%s)."),e?.message),{type:"snackbar"})}}}function Jv(){const e=Kv(),{saveEntityRecord:t}=(0,c.useDispatch)(j.store),{createSuccessNotice:n,createErrorNotice:s}=(0,c.useDispatch)(_.store);return async i=>{const r=i?.title?.rendered||i?.slug;try{const s=await t("postType",Zv,{title:(0,w.sprintf)((0,w._x)("%s (Copy)","navigation menu"),r),content:i?.content?.raw,status:"publish"},{throwOnError:!0});s&&(n((0,w.__)("Duplicated Navigation Menu"),{type:"snackbar"}),e.navigate(`/wp_navigation/${s.id}`))}catch(e){s((0,w.sprintf)((0,w.__)("Unable to duplicate Navigation Menu (%s)."),e?.message),{type:"snackbar"})}}}function $v(){return{handleDelete:Xv(),handleSave:Qv(),handleDuplicate:Jv()}}function ey(e,t,n){return e?"publish"===n?(0,qt.decodeEntities)(e):(0,w.sprintf)((0,w._x)("%1$s (%2$s)","menu label"),(0,qt.decodeEntities)(e),n):(0,w.sprintf)((0,w.__)("(no title %s)"),t)}function ty({backPath:e}){const{records:t,isResolving:n,hasResolved:s}=(0,j.useEntityRecords)("postType",je,Ev),i=n&&!s,{getNavigationFallbackId:r}=ne((0,c.useSelect)(j.store)),o=(0,c.useSelect)((e=>e(j.store).isResolving("getNavigationFallbackId")),[]),l=t?.[0];l||n||!s||o||r();const{handleSave:u,handleDelete:d,handleDuplicate:h}=$v(),p=!!t?.length;return i?(0,a.jsx)(ny,{backPath:e,children:(0,a.jsx)(b.Spinner,{className:"edit-site-sidebar-navigation-screen-navigation-menus__loading"})}):i||p?1===t?.length?(0,a.jsx)(Uv,{navigationMenu:l,backPath:e,handleDelete:()=>d(l),handleDuplicate:()=>h(l),handleSave:e=>u(l,e)}):(0,a.jsx)(ny,{backPath:e,children:(0,a.jsx)(b.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-navigation-menus",children:t?.map((({id:e,title:t,status:n},s)=>(0,a.jsx)(sy,{postId:e,withChevron:!0,icon:Ma,children:ey(t?.rendered,s+1,n)},e)))})}):(0,a.jsx)(ny,{description:(0,w.__)("No Navigation Menus found."),backPath:e})}function ny({children:e,actions:t,title:n,description:s,backPath:i}){return(0,a.jsx)(Ua,{title:n||(0,w.__)("Navigation"),actions:t,description:s||(0,w.__)("Manage your Navigation Menus."),backPath:i,content:e})}const sy=({postId:e,...t})=>(0,a.jsx)(Qa,{to:`/wp_navigation/${e}`,...t}),{useLocation:iy}=ne(Lt.privateApis);function ry(){const{query:e={}}=iy(),{canvas:t="view"}=e;return"edit"===t?(0,a.jsx)(wv,{}):(0,a.jsx)(ty,{backPath:"/"})}const ay={name:"navigation",path:"/navigation",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(ty,{backPath:"/"}):(0,a.jsx)(uo,{})},preview({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(wv,{}):void 0},mobile({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(ry,{}):(0,a.jsx)(uo,{})}}},{useLocation:oy}=ne(Lt.privateApis);function ly(){const{query:e={}}=oy(),{canvas:t="view"}=e;return"edit"===t?(0,a.jsx)(wv,{}):(0,a.jsx)(Yv,{backPath:"/navigation"})}const cy={name:"navigation-item",path:"/wp_navigation/:postId",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(Yv,{backPath:"/navigation"}):(0,a.jsx)(uo,{})},preview({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(wv,{}):(0,a.jsx)(uo,{})},mobile({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(ly,{}):(0,a.jsx)(uo,{})}}};var uy=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})});function dy({count:e,icon:t,id:n,isActive:s,label:i,type:r}){if(!e)return;const o=[`postType=${r}`];return n&&o.push(`categoryId=${n}`),(0,a.jsx)(Qa,{icon:t,suffix:(0,a.jsx)("span",{children:e}),"aria-current":s?"true":void 0,to:`/pattern?${o.join("&")}`,children:i})}const hy=(e,t,n)=>t===n.findIndex((t=>e.name===t.name));const{extractWords:py,getNormalizedSearchTerms:fy,normalizeString:my}=ne(x.privateApis),gy=e=>e.type===Ie.user?e.slug:e.type===Ce?"":e.name||"",vy=e=>"string"==typeof e.title?e.title:e.title&&e.title.rendered?e.title.rendered:e.title&&e.title.raw?e.title.raw:"",yy=e=>e.type===Ie.user?e.excerpt.raw:e.description||"",xy=e=>e.keywords||[],by=()=>!1,wy=(e=[],t="",n={})=>{const s=fy(t),i=n.categoryId!==Ve&&!s.length,r={...n,onlyFilterByCategory:i},a=i?0:1,o=e.map((e=>[e,_y(e,t,r)])).filter((([,e])=>e>a));return 0===s.length||o.sort((([,e],[,t])=>t-e)),o.map((([e])=>e))};function _y(e,t,n){const{categoryId:s,getName:i=gy,getTitle:r=vy,getDescription:a=yy,getKeywords:o=xy,hasCategory:l=by,onlyFilterByCategory:c}=n;let u=s===Ve||s===Pe||s===Oe&&e.type===Ie.user||l(e,s)?1:0;if(!u||c)return u;const d=i(e),h=r(e),p=a(e),f=o(e),m=my(t),g=my(h);if(m===g)u+=30;else if(g.startsWith(m))u+=20;else{const e=[d,h,p,...f].join(" ");0===((e,t)=>e.filter((e=>!fy(t).some((t=>t.includes(e))))))(py(m),e).length&&(u+=10)}return u}const jy=[],Sy=(0,c.createSelector)(((e,t,n="")=>{const{getEntityRecords:s,getCurrentTheme:i,isResolving:r}=e(j.store),a={per_page:-1},o=s("postType",Ce,a)??jy,l=(i()?.default_template_part_areas||[]).map((e=>e.area)),c=r("getEntityRecords",["postType",Ce,a]);return{patterns:wy(o,n,{categoryId:t,hasCategory:(e,t)=>t!==Ee?e.area===t:e.area===t||!l.includes(e.area)}),isResolving:c}}),(e=>[e(j.store).getEntityRecords("postType",Ce,{per_page:-1}),e(j.store).isResolving("getEntityRecords",["postType",Ce,{per_page:-1}]),e(j.store).getCurrentTheme()?.default_template_part_areas])),Cy=(0,c.createSelector)((e=>{const{getSettings:t}=ne(e(Rt)),{isResolving:n}=e(j.store),s=t();return{patterns:[...(s.__experimentalAdditionalBlockPatterns??s.__experimentalBlockPatterns)||[],...e(j.store).getBlockPatterns()||[]].filter((e=>!Te.includes(e.source))).filter(hy).filter((e=>!1!==e.inserter)).map((e=>({...e,keywords:e.keywords||[],type:Ie.theme,blocks:(0,o.parse)(e.content,{__unstableSkipMigrationLogs:!0})}))),isResolving:n("getBlockPatterns")}}),(e=>[e(j.store).getBlockPatterns(),e(j.store).isResolving("getBlockPatterns"),ne(e(Rt)).getSettings()])),ky=(0,c.createSelector)(((e,t,n,s="")=>{const{patterns:i,isResolving:r}=Cy(e),{patterns:a,isResolving:o,categories:l}=Ey(e);let c=[...i||[],...a||[]];return n&&(c=c.filter((e=>e.type===Ie.user?(e.wp_pattern_sync_status||Ae.full)===n:n===Ae.unsynced))),c=wy(c,s,t?{categoryId:t,hasCategory:(e,t)=>e.type===Ie.user?e.wp_pattern_category?.some((e=>l.find((t=>t.id===e))?.slug===t)):e.categories?.includes(t)}:{hasCategory:e=>e.type===Ie.user?l?.length&&(!e.wp_pattern_category?.length||!e.wp_pattern_category?.some((e=>l.find((t=>t.id===e))))):!e.hasOwnProperty("categories")}),{patterns:c,isResolving:r||o}}),(e=>[Cy(e),Ey(e)])),Ey=(0,c.createSelector)(((e,t,n="")=>{const{getEntityRecords:s,isResolving:i,getUserPatternCategories:r}=e(j.store),a={per_page:-1},o=s("postType",Ie.user,a),l=r(),c=new Map;l.forEach((e=>c.set(e.id,e)));let u=o??jy;const d=i("getEntityRecords",["postType",Ie.user,a]);return t&&(u=u.filter((e=>e.wp_pattern_sync_status||Ae.full===t))),u=wy(u,n,{hasCategory:()=>!0}),{patterns:u,isResolving:d,categories:l}}),(e=>[e(j.store).getEntityRecords("postType",Ie.user,{per_page:-1}),e(j.store).isResolving("getEntityRecords",["postType",Ie.user,{per_page:-1}]),e(j.store).getUserPatternCategories()]));var Py=(e,t,{search:n="",syncStatus:s}={})=>(0,c.useSelect)((i=>{if(e===Ce)return Sy(i,t,n);if(e===Ie.user&&t){return ky(i,"uncategorized"===t?"":t,s,n)}return e===Ie.user?Ey(i,s,n):{patterns:jy,isResolving:!1}}),[t,e,n,s]);function Iy(){const e=function(){const e=(0,c.useSelect)((e=>{const{getSettings:t}=ne(e(Rt)),n=t();return n.__experimentalAdditionalBlockPatternCategories??n.__experimentalBlockPatternCategories}));return[...e||[],...(0,c.useSelect)((e=>e(j.store).getBlockPatternCategories()))||[]]}();e.push({name:Ee,label:(0,w.__)("Uncategorized")});const t=function(){const e=(0,c.useSelect)((e=>{const{getSettings:t}=ne(e(Rt));return t().__experimentalAdditionalBlockPatterns??t().__experimentalBlockPatterns})),t=(0,c.useSelect)((e=>e(j.store).getBlockPatterns()));return(0,h.useMemo)((()=>[...e||[],...t||[]].filter((e=>!Te.includes(e.source))).filter(hy).filter((e=>!1!==e.inserter))),[e,t])}(),{patterns:n,categories:s}=Py(Ie.user),i=(0,h.useMemo)((()=>{const i={},r=[];e.forEach((e=>{i[e.name]||(i[e.name]={...e,count:0})})),s.forEach((e=>{i[e.name]||(i[e.name]={...e,count:0})})),t.forEach((e=>{e.categories?.forEach((e=>{i[e]&&(i[e].count+=1)})),e.categories?.length||(i.uncategorized.count+=1)})),n.forEach((e=>{e.wp_pattern_category?.forEach((e=>{const t=s.find((t=>t.id===e))?.name;i[t]&&(i[t].count+=1)})),e.wp_pattern_category?.length&&e.wp_pattern_category?.some((e=>s.find((t=>t.id===e))))||(i.uncategorized.count+=1)})),[...e,...s].forEach((e=>{i[e.name].count&&!r.find((t=>t.name===e.name))&&r.push(i[e.name])}));const a=r.sort(((e,t)=>e.label.localeCompare(t.label)));return a.unshift({name:Oe,label:(0,w.__)("My patterns"),count:n.length}),a.unshift({name:Ve,label:(0,w.__)("All patterns"),description:(0,w.__)("A list of all patterns from all sources."),count:t.length+n.length}),a}),[e,t,s,n]);return{patternCategories:i,hasPatterns:!!i.length}}const Vy=e=>{const t=e||[],n=(0,c.useSelect)((e=>e(j.store).getCurrentTheme()?.default_template_part_areas||[]),[]),s={header:{},footer:{},sidebar:{},uncategorized:{}};n.forEach((e=>s[e.area]={...e,templateParts:[]}));return t.reduce(((e,t)=>{const n=e[t.area]?t.area:Ee;return e[n]?.templateParts?.push(t),e}),s)};const{useLocation:Oy}=ne(Lt.privateApis);function Ty({templatePartAreas:e,patternCategories:t,currentCategory:n,currentType:s}){const[i,...r]=t;return(0,a.jsxs)(b.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group",children:[(0,a.jsx)(dy,{count:Object.values(e).map((({templateParts:e})=>e?.length||0)).reduce(((e,t)=>e+t),0),icon:(0,f.getTemplatePartIcon)(),label:(0,w.__)("All template parts"),id:Pe,type:Ce,isActive:n===Pe&&s===Ce},"all"),Object.entries(e).map((([e,{label:t,templateParts:i}])=>(0,a.jsx)(dy,{count:i?.length,icon:(0,f.getTemplatePartIcon)(e),label:t,id:e,type:Ce,isActive:n===e&&s===Ce},e))),(0,a.jsx)("div",{className:"edit-site-sidebar-navigation-screen-patterns__divider"}),i&&(0,a.jsx)(dy,{count:i.count,label:i.label,icon:uy,id:i.name,type:Ie.user,isActive:n===`${i.name}`&&s===Ie.user},i.name),r.map((e=>(0,a.jsx)(dy,{count:e.count,label:e.label,icon:uy,id:e.name,type:Ie.user,isActive:n===`${e.name}`&&s===Ie.user},e.name)))]})}function Ay({backPath:e}){const{query:{postType:t="wp_block",categoryId:n}}=Oy(),s=n||(t===Ie.user?Ve:Pe),{templatePartAreas:i,hasTemplateParts:r,isLoading:o}=function(){const{records:e,isResolving:t}=(0,j.useEntityRecords)("postType",Ce,{per_page:-1});return{hasTemplateParts:!!e&&!!e.length,isLoading:t,templatePartAreas:Vy(e)}}(),{patternCategories:l,hasPatterns:c}=Iy();return(0,a.jsx)(Ua,{title:(0,w.__)("Patterns"),description:(0,w.__)("Manage what patterns are available when editing the site."),isRoot:!e,backPath:e,content:(0,a.jsxs)(a.Fragment,{children:[o&&(0,w.__)("Loading items…"),!o&&(0,a.jsxs)(a.Fragment,{children:[!r&&!c&&(0,a.jsx)(b.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group",children:(0,a.jsx)(b.__experimentalItem,{children:(0,w.__)("No items found")})}),(0,a.jsx)(Ty,{templatePartAreas:i,patternCategories:l,currentCategory:s,currentType:t})]})]})})}var Ny=i(9681),Fy=i.n(Ny);Math.pow(10,8);const My=6048e5,By=Symbol.for("constructDateFrom");function Dy(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&By in e?e[By](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ry(e,t){return Dy(t||e,e)}function Ly(e,t,n){const s=Ry(e,n?.in);return isNaN(t)?Dy(n?.in||e,NaN):t?(s.setDate(s.getDate()+t),s):s}function zy(e,t,n){return Ly(e,-t,n)}function Hy(e,t,n){return Ly(e,7*t,n)}function Gy(e,t,n){return Hy(e,-t,n)}function Wy(e,t,n){const s=Ry(e,n?.in);if(isNaN(t))return Dy(n?.in||e,NaN);if(!t)return s;const i=s.getDate(),r=Dy(n?.in||e,s.getTime());r.setMonth(s.getMonth()+t+1,0);return i>=r.getDate()?r:(s.setFullYear(r.getFullYear(),r.getMonth(),i),s)}function Uy(e,t,n){return Wy(e,-t,n)}function qy(e,t,n){return Wy(e,12*t,n)}function Zy(e,t,n){return qy(e,-t,n)}var Yy=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})}),Ky=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})});const Xy="is",Qy="isNot",Jy="isAny",$y="isNone",ex="isAll",tx="isNotAll",nx="lessThan",sx="greaterThan",ix="lessThanOrEqual",rx="greaterThanOrEqual",ax="before",ox="after",lx="beforeInc",cx="afterInc",ux="contains",dx="notContains",hx="startsWith",px="between",fx="on",mx="notOn",gx="inThePast",vx="over",yx=[Xy,Qy,Jy,$y,ex,tx,nx,sx,ix,rx,ax,ox,lx,cx,ux,dx,hx,px,fx,mx,gx,vx],xx=[Xy,Qy,nx,sx,ix,rx,ax,ox,lx,cx,ux,dx,hx,fx,mx],bx={[Xy]:{key:"is-filter",label:(0,w.__)("Is")},[Qy]:{key:"is-not-filter",label:(0,w.__)("Is not")},[Jy]:{key:"is-any-filter",label:(0,w.__)("Is any")},[$y]:{key:"is-none-filter",label:(0,w.__)("Is none")},[ex]:{key:"is-all-filter",label:(0,w.__)("Is all")},[tx]:{key:"is-not-all-filter",label:(0,w.__)("Is not all")},[nx]:{key:"less-than-filter",label:(0,w.__)("Less than")},[sx]:{key:"greater-than-filter",label:(0,w.__)("Greater than")},[ix]:{key:"less-than-or-equal-filter",label:(0,w.__)("Less than or equal")},[rx]:{key:"greater-than-or-equal-filter",label:(0,w.__)("Greater than or equal")},[ax]:{key:"before-filter",label:(0,w.__)("Before")},[ox]:{key:"after-filter",label:(0,w.__)("After")},[lx]:{key:"before-inc-filter",label:(0,w.__)("Before (inc)")},[cx]:{key:"after-inc-filter",label:(0,w.__)("After (inc)")},[ux]:{key:"contains-filter",label:(0,w.__)("Contains")},[dx]:{key:"not-contains-filter",label:(0,w.__)("Doesn't contain")},[hx]:{key:"starts-with-filter",label:(0,w.__)("Starts with")},[px]:{key:"between-filter",label:(0,w.__)("Between (inc)")},[fx]:{key:"on-filter",label:(0,w.__)("On")},[mx]:{key:"not-on-filter",label:(0,w.__)("Not on")},[gx]:{key:"in-the-past-filter",label:(0,w.__)("In the past")},[vx]:{key:"over-filter",label:(0,w.__)("Over")}},wx=["asc","desc"],_x={asc:"↑",desc:"↓"},jx={asc:"ascending",desc:"descending"},Sx={asc:(0,w.__)("Sort ascending"),desc:(0,w.__)("Sort descending")},Cx={asc:Yy,desc:Ky},kx="table",Ex="grid",Px=[];function Ix({elements:e,getElements:t}){const n=Array.isArray(e)&&e.length>0?e:Px,[s,i]=(0,h.useState)(n),[r,a]=(0,h.useState)(!1);return(0,h.useEffect)((()=>{if(!t)return void i(n);let e=!1;return a(!0),t().then((t=>{if(!e){const e=Array.isArray(t)&&t.length>0?t:n;i(e)}})).catch((()=>{e||i(n)})).finally((()=>{e||a(!1)})),()=>{e=!0}}),[t,n]),{elements:s,isLoading:r}}function Vx({item:e,field:t}){const{elements:n,isLoading:s}=Ix({elements:t.elements,getElements:t.getElements}),i=t.getValue({item:e});return s||0===n.length?i:n?.find((e=>e.value===i))?.label||t.getValue({item:e})}const Ox=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;var Tx={sort:function(e,t,n){return"asc"===n?e.localeCompare(t):t.localeCompare(e)},isValid:{elements:!0,custom:(e,t)=>{const n=t.getValue({item:e});return[void 0,"",null].includes(n)||Ox.test(n)?null:(0,w.__)("Value must be a valid email address.")}},Edit:"email",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Vx,{item:e,field:t}):t.getValue({item:e}),enableSorting:!0,filterBy:{defaultOperators:[Jy,$y],validOperators:[Xy,Qy,ux,dx,hx,Jy,$y,ex,tx]}};var Ax={sort:function(e,t,n){return"asc"===n?e-t:t-e},isValid:{elements:!0,custom:(e,t)=>{const n=t.getValue({item:e});return[void 0,"",null].includes(n)||Number.isInteger(n)?null:(0,w.__)("Value must be an integer.")}},Edit:"integer",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Vx,{item:e,field:t}):t.getValue({item:e}),enableSorting:!0,filterBy:{defaultOperators:[Xy,Qy,nx,sx,ix,rx,px],validOperators:[Xy,Qy,nx,sx,ix,rx,px,Jy,$y,ex,tx]}};var Nx={sort:function(e,t,n){return"asc"===n?e-t:t-e},isValid:{elements:!0,custom:(e,t)=>{const n=t.getValue({item:e});return function(e){return""===e||null==e}(n)||Number.isFinite(n)?null:(0,w.__)("Value must be a number.")}},Edit:"number",render:({item:e,field:t})=>{t.hasElements;const n=t.getValue({item:e});return[null,void 0].includes(n)?null:Number(n).toFixed(2)},enableSorting:!0,filterBy:{defaultOperators:[Xy,Qy,nx,sx,ix,rx,px],validOperators:[Xy,Qy,nx,sx,ix,rx,px,Jy,$y,ex,tx]}};var Fx={sort:function(e,t,n){return"asc"===n?e.localeCompare(t):t.localeCompare(e)},isValid:{elements:!0,custom:()=>null},Edit:"text",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Vx,{item:e,field:t}):t.getValue({item:e}),enableSorting:!0,filterBy:{defaultOperators:[Jy,$y],validOperators:[Xy,Qy,ux,dx,hx,Jy,$y,ex,tx]}};var Mx={sort:function(e,t,n){const s=new Date(e).getTime(),i=new Date(t).getTime();return"asc"===n?s-i:i-s},isValid:{elements:!0,custom:()=>null},Edit:"datetime",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Vx,{item:e,field:t}):t.getValue({item:e}),enableSorting:!0,filterBy:{defaultOperators:[fx,mx,ax,ox,lx,cx,gx,vx],validOperators:[fx,mx,ax,ox,lx,cx,gx,vx]}};var Bx={sort:function(e,t,n){const s=new Date(e).getTime(),i=new Date(t).getTime();return"asc"===n?s-i:i-s},Edit:"date",isValid:{elements:!0,custom:()=>null},render:({item:e,field:t})=>{if(t.hasElements)return(0,a.jsx)(Vx,{item:e,field:t});const n=t.getValue({item:e});return n?(s=n,(0,Cg.dateI18n)((0,Cg.getSettings)().formats.date,(0,Cg.getDate)(s))):"";var s},enableSorting:!0,filterBy:{defaultOperators:[fx,mx,ax,ox,lx,cx,gx,vx,px],validOperators:[fx,mx,ax,ox,lx,cx,gx,vx,px]}};var Dx={sort:function(e,t,n){const s=Boolean(e);return s===Boolean(t)?0:"asc"===n?s?1:-1:s?-1:1},isValid:{elements:!0,custom:(e,t)=>{const n=t.getValue({item:e});return[void 0,"",null].includes(n)||[!0,!1].includes(n)?null:(0,w.__)("Value must be true, false, or undefined")}},Edit:"checkbox",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Vx,{item:e,field:t}):!0===t.getValue({item:e})?(0,w.__)("True"):!1===t.getValue({item:e})?(0,w.__)("False"):null,enableSorting:!0,filterBy:{defaultOperators:[Xy,Qy],validOperators:[Xy,Qy]}};var Rx={sort:function(){return 0},isValid:{elements:!0,custom:()=>null},Edit:null,render:()=>null,enableSorting:!1,filterBy:!1};const Lx={sort:function(e,t,n){const s=Array.isArray(e)?e:[],i=Array.isArray(t)?t:[];if(s.length!==i.length)return"asc"===n?s.length-i.length:i.length-s.length;const r=s.join(","),a=i.join(",");return"asc"===n?r.localeCompare(a):a.localeCompare(r)},isValid:{elements:!0,custom:(e,t)=>{const n=t.getValue({item:e});return[void 0,"",null].includes(n)||Array.isArray(n)?n.every((e=>"string"==typeof e))?null:(0,w.__)("Every value must be a string."):(0,w.__)("Value must be an array.")}},Edit:"array",render:function({item:e,field:t}){return(t.getValue({item:e})||[]).join(", ")},enableSorting:!0,filterBy:{defaultOperators:[Jy,$y],validOperators:[Jy,$y,ex,tx]}};var zx=Lx;var Hx={sort:function(e,t,n){return 0},isValid:{elements:!0,custom:()=>null},Edit:"password",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Vx,{item:e,field:t}):"••••••••",enableSorting:!1,filterBy:!1};var Gx={sort:function(e,t,n){return"asc"===n?e.localeCompare(t):t.localeCompare(e)},isValid:{elements:!0,custom:()=>null},Edit:"telephone",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Vx,{item:e,field:t}):t.getValue({item:e}),enableSorting:!0,filterBy:{defaultOperators:[Jy,$y],validOperators:[Xy,Qy,ux,dx,hx,Jy,$y,ex,tx]}};var Wx={sort:function(e,t,n){const s=X(e),i=X(t);if(!s.isValid()&&!i.isValid())return 0;if(!s.isValid())return"asc"===n?1:-1;if(!i.isValid())return"asc"===n?-1:1;const r=s.toHsl(),a=i.toHsl();return r.h!==a.h?"asc"===n?r.h-a.h:a.h-r.h:r.s!==a.s?"asc"===n?r.s-a.s:a.s-r.s:"asc"===n?r.l-a.l:a.l-r.l},isValid:{elements:!0,custom:(e,t)=>{const n=t.getValue({item:e});return[void 0,"",null].includes(n)||X(n).isValid()?null:(0,w.__)("Value must be a valid color.")}},Edit:"color",render:({item:e,field:t})=>{if(t.hasElements)return(0,a.jsx)(Vx,{item:e,field:t});const n=t.getValue({item:e});return n&&X(n).isValid()?(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,a.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:n,border:"1px solid #ddd",flexShrink:0}}),(0,a.jsx)("span",{children:n})]}):n},enableSorting:!0,filterBy:{defaultOperators:[Jy,$y],validOperators:[Xy,Qy]}};var Ux={sort:function(e,t,n){return"asc"===n?e.localeCompare(t):t.localeCompare(e)},isValid:{elements:!0,custom:()=>null},Edit:"url",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Vx,{item:e,field:t}):t.getValue({item:e}),enableSorting:!0,filterBy:{defaultOperators:[Jy,$y],validOperators:[Xy,Qy,ux,dx,hx,Jy,$y,ex,tx]}};const{lock:qx,unlock:Zx}=(0,ee.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/dataviews");function Yx(e,t){let n;return e?.required&&t?.required?n=t?.required?.message?t.required:void 0:e?.elements&&t?.elements?n=t.elements:t?.custom&&(n=t.custom),n}const{ValidatedCheckboxControl:Kx}=Zx(b.privateApis);function Xx(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function Qx(e){return!(!Xx(e)&&"number"!=typeof e||isNaN(+Ry(e)))}const Jx={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function $x(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const eb={date:$x({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:$x({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:$x({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},tb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function nb(e){return(t,n)=>{let s;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,i=n?.width?String(n.width):t;s=e.formattingValues[i]||e.formattingValues[t]}else{const t=e.defaultWidth,i=n?.width?String(n.width):e.defaultWidth;s=e.values[i]||e.values[t]}return s[e.argumentCallback?e.argumentCallback(t):t]}}function sb(e){return(t,n={})=>{const s=n.width,i=s&&e.matchPatterns[s]||e.matchPatterns[e.defaultMatchWidth],r=t.match(i);if(!r)return null;const a=r[0],o=s&&e.parsePatterns[s]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(o,(e=>e.test(a))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(o,(e=>e.test(a)));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;return{value:c,rest:t.slice(a.length)}}}var ib;const rb={code:"en-US",formatDistance:(e,t,n)=>{let s;const i=Jx[e];return s="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+s:s+" ago":s},formatLong:eb,formatRelative:(e,t,n,s)=>tb[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e),s=n%100;if(s>20||s<10)switch(s%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:nb({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:nb({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:nb({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:nb({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:nb({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(ib={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(ib.matchPattern);if(!n)return null;const s=n[0],i=e.match(ib.parsePattern);if(!i)return null;let r=ib.valueCallback?ib.valueCallback(i[0]):i[0];return r=t.valueCallback?t.valueCallback(r):r,{value:r,rest:e.slice(s.length)}}),era:sb({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:sb({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:sb({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:sb({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:sb({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};let ab={};function ob(){return ab}function lb(e){const t=Ry(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function cb(e,t){const n=Ry(e,t?.in);return n.setHours(0,0,0,0),n}function ub(e,t,n){const[s,i]=function(e,...t){const n=Dy.bind(null,e||t.find((e=>"object"==typeof e)));return t.map(n)}(n?.in,e,t),r=cb(s),a=cb(i),o=+r-lb(r),l=+a-lb(a);return Math.round((o-l)/864e5)}function db(e,t){const n=Ry(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function hb(e,t){const n=Ry(e,t?.in);return ub(n,db(n))+1}function pb(e,t){const n=ob(),s=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Ry(e,t?.in),r=i.getDay(),a=(r<s?7:0)+r-s;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function fb(e,t){return pb(e,{...t,weekStartsOn:1})}function mb(e,t){const n=Ry(e,t?.in),s=n.getFullYear(),i=Dy(n,0);i.setFullYear(s+1,0,4),i.setHours(0,0,0,0);const r=fb(i),a=Dy(n,0);a.setFullYear(s,0,4),a.setHours(0,0,0,0);const o=fb(a);return n.getTime()>=r.getTime()?s+1:n.getTime()>=o.getTime()?s:s-1}function gb(e,t){const n=mb(e,t),s=Dy(t?.in||e,0);return s.setFullYear(n,0,4),s.setHours(0,0,0,0),fb(s)}function vb(e,t){const n=Ry(e,t?.in),s=+fb(n)-+gb(n);return Math.round(s/My)+1}function yb(e,t){const n=Ry(e,t?.in),s=n.getFullYear(),i=ob(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=Dy(t?.in||e,0);a.setFullYear(s+1,0,r),a.setHours(0,0,0,0);const o=pb(a,t),l=Dy(t?.in||e,0);l.setFullYear(s,0,r),l.setHours(0,0,0,0);const c=pb(l,t);return+n>=+o?s+1:+n>=+c?s:s-1}function xb(e,t){const n=ob(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=yb(e,t),r=Dy(t?.in||e,0);r.setFullYear(i,0,s),r.setHours(0,0,0,0);return pb(r,t)}function bb(e,t){const n=Ry(e,t?.in),s=+pb(n,t)-+xb(n,t);return Math.round(s/My)+1}function wb(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const _b={y(e,t){const n=e.getFullYear(),s=n>0?n:1-n;return wb("yy"===t?s%100:s,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):wb(n+1,2)},d:(e,t)=>wb(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>wb(e.getHours()%12||12,t.length),H:(e,t)=>wb(e.getHours(),t.length),m:(e,t)=>wb(e.getMinutes(),t.length),s:(e,t)=>wb(e.getSeconds(),t.length),S(e,t){const n=t.length,s=e.getMilliseconds();return wb(Math.trunc(s*Math.pow(10,n-3)),t.length)}},jb="midnight",Sb="noon",Cb="morning",kb="afternoon",Eb="evening",Pb="night",Ib={G:function(e,t,n){const s=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(s,{width:"abbreviated"});case"GGGGG":return n.era(s,{width:"narrow"});default:return n.era(s,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),s=t>0?t:1-t;return n.ordinalNumber(s,{unit:"year"})}return _b.y(e,t)},Y:function(e,t,n,s){const i=yb(e,s),r=i>0?i:1-i;if("YY"===t){return wb(r%100,2)}return"Yo"===t?n.ordinalNumber(r,{unit:"year"}):wb(r,t.length)},R:function(e,t){return wb(mb(e),t.length)},u:function(e,t){return wb(e.getFullYear(),t.length)},Q:function(e,t,n){const s=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(s);case"QQ":return wb(s,2);case"Qo":return n.ordinalNumber(s,{unit:"quarter"});case"QQQ":return n.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(s,{width:"narrow",context:"formatting"});default:return n.quarter(s,{width:"wide",context:"formatting"})}},q:function(e,t,n){const s=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(s);case"qq":return wb(s,2);case"qo":return n.ordinalNumber(s,{unit:"quarter"});case"qqq":return n.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(s,{width:"narrow",context:"standalone"});default:return n.quarter(s,{width:"wide",context:"standalone"})}},M:function(e,t,n){const s=e.getMonth();switch(t){case"M":case"MM":return _b.M(e,t);case"Mo":return n.ordinalNumber(s+1,{unit:"month"});case"MMM":return n.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(s,{width:"narrow",context:"formatting"});default:return n.month(s,{width:"wide",context:"formatting"})}},L:function(e,t,n){const s=e.getMonth();switch(t){case"L":return String(s+1);case"LL":return wb(s+1,2);case"Lo":return n.ordinalNumber(s+1,{unit:"month"});case"LLL":return n.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(s,{width:"narrow",context:"standalone"});default:return n.month(s,{width:"wide",context:"standalone"})}},w:function(e,t,n,s){const i=bb(e,s);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):wb(i,t.length)},I:function(e,t,n){const s=vb(e);return"Io"===t?n.ordinalNumber(s,{unit:"week"}):wb(s,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):_b.d(e,t)},D:function(e,t,n){const s=hb(e);return"Do"===t?n.ordinalNumber(s,{unit:"dayOfYear"}):wb(s,t.length)},E:function(e,t,n){const s=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(s,{width:"short",context:"formatting"});default:return n.day(s,{width:"wide",context:"formatting"})}},e:function(e,t,n,s){const i=e.getDay(),r=(i-s.weekStartsOn+8)%7||7;switch(t){case"e":return String(r);case"ee":return wb(r,2);case"eo":return n.ordinalNumber(r,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,s){const i=e.getDay(),r=(i-s.weekStartsOn+8)%7||7;switch(t){case"c":return String(r);case"cc":return wb(r,t.length);case"co":return n.ordinalNumber(r,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const s=e.getDay(),i=0===s?7:s;switch(t){case"i":return String(i);case"ii":return wb(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(s,{width:"short",context:"formatting"});default:return n.day(s,{width:"wide",context:"formatting"})}},a:function(e,t,n){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){const s=e.getHours();let i;switch(i=12===s?Sb:0===s?jb:s/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const s=e.getHours();let i;switch(i=s>=17?Eb:s>=12?kb:s>=4?Cb:Pb,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return _b.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):_b.H(e,t)},K:function(e,t,n){const s=e.getHours()%12;return"Ko"===t?n.ordinalNumber(s,{unit:"hour"}):wb(s,t.length)},k:function(e,t,n){let s=e.getHours();return 0===s&&(s=24),"ko"===t?n.ordinalNumber(s,{unit:"hour"}):wb(s,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):_b.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):_b.s(e,t)},S:function(e,t){return _b.S(e,t)},X:function(e,t,n){const s=e.getTimezoneOffset();if(0===s)return"Z";switch(t){case"X":return Ob(s);case"XXXX":case"XX":return Tb(s);default:return Tb(s,":")}},x:function(e,t,n){const s=e.getTimezoneOffset();switch(t){case"x":return Ob(s);case"xxxx":case"xx":return Tb(s);default:return Tb(s,":")}},O:function(e,t,n){const s=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Vb(s,":");default:return"GMT"+Tb(s,":")}},z:function(e,t,n){const s=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Vb(s,":");default:return"GMT"+Tb(s,":")}},t:function(e,t,n){return wb(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return wb(+e,t.length)}};function Vb(e,t=""){const n=e>0?"-":"+",s=Math.abs(e),i=Math.trunc(s/60),r=s%60;return 0===r?n+String(i):n+String(i)+t+wb(r,2)}function Ob(e,t){if(e%60==0){return(e>0?"-":"+")+wb(Math.abs(e)/60,2)}return Tb(e,t)}function Tb(e,t=""){const n=e>0?"-":"+",s=Math.abs(e);return n+wb(Math.trunc(s/60),2)+t+wb(s%60,2)}const Ab=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Nb=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Fb={p:Nb,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],s=n[1],i=n[2];if(!i)return Ab(e,t);let r;switch(s){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",Ab(s,t)).replace("{{time}}",Nb(i,t))}},Mb=/^D+$/,Bb=/^Y+$/,Db=["D","DD","YY","YYYY"];const Rb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Lb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,zb=/^'([^]*?)'?$/,Hb=/''/g,Gb=/[a-zA-Z]/;function Wb(e,t,n){const s=ob(),i=n?.locale??s.locale??rb,r=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,o=Ry(e,n?.in);if(!Qx(o))throw new RangeError("Invalid time value");let l=t.match(Lb).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,Fb[t])(e,i.formatLong)}return e})).join("").match(Rb).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Ub(e)};if(Ib[t])return{isToken:!0,value:e};if(t.match(Gb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));i.localize.preprocessor&&(l=i.localize.preprocessor(o,l));const c={firstWeekContainsDate:r,weekStartsOn:a,locale:i};return l.map((s=>{if(!s.isToken)return s.value;const r=s.value;(!n?.useAdditionalWeekYearTokens&&function(e){return Bb.test(e)}(r)||!n?.useAdditionalDayOfYearTokens&&function(e){return Mb.test(e)}(r))&&function(e,t,n){const s=function(e,t,n){const s="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${s} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(s),Db.includes(e))throw new RangeError(s)}(r,t,String(e));return(0,Ib[r[0]])(o,r,i.localize,c)})).join("")}function Ub(e){const t=e.match(zb);return t?t[1].replace(Hb,"'"):e}const qb={[gx]:[{value:"days",label:(0,w.__)("Days")},{value:"weeks",label:(0,w.__)("Weeks")},{value:"months",label:(0,w.__)("Months")},{value:"years",label:(0,w.__)("Years")}],[vx]:[{value:"days",label:(0,w.__)("Days ago")},{value:"weeks",label:(0,w.__)("Weeks ago")},{value:"months",label:(0,w.__)("Months ago")},{value:"years",label:(0,w.__)("Years ago")}]};function Zb({className:e,data:t,field:n,onChange:s,hideLabelFromVision:i,operator:r}){const o=qb[r===gx?"inThePast":"over"],{id:l,label:c,getValue:u,setValue:d}=n,p=u({item:t}),{value:f="",unit:m=o[0].value}=p&&"object"==typeof p?p:{},g=(0,h.useCallback)((e=>s(d({item:t,value:{value:Number(e),unit:m}}))),[s,d,t,m]),v=(0,h.useCallback)((e=>s(d({item:t,value:{value:f,unit:e}}))),[s,d,t,f]);return(0,a.jsx)(b.BaseControl,{id:l,__nextHasNoMarginBottom:!0,className:Ht(e,"dataviews-controls__relative-date"),label:c,hideLabelFromVision:i,children:(0,a.jsxs)(b.__experimentalHStack,{spacing:2.5,children:[(0,a.jsx)(b.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:f,onChange:g}),(0,a.jsx)(b.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,w.__)("Unit"),value:m,options:o,onChange:v,hideLabelFromVision:!0})]})})}const{DateCalendar:Yb,ValidatedInputControl:Kb}=Zx(b.privateApis),Xb=e=>{if(!e)return null;const t=(0,Cg.getDate)(e);return t&&Qx(t)?t:null};function Qb({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{id:r,label:o,description:l,setValue:c,getValue:u,isValid:d}=t,p=u({item:e}),f="string"==typeof p?p:void 0,[m,g]=(0,h.useState)((()=>Xb(f)||new Date)),v=(0,h.useRef)(null),y=(0,h.useRef)(),x=(0,h.useRef)(null),_=(0,h.useCallback)((t=>n(c({item:e,value:t}))),[e,n,c]);(0,h.useEffect)((()=>()=>{y.current&&clearTimeout(y.current)}),[]);const j=(0,h.useCallback)((e=>{let t;if(e){let n=e;if(f){const t=Xb(f);t&&(n=new Date(e),n.setHours(t.getHours()),n.setMinutes(t.getMinutes()))}t=n.toISOString(),_(t),y.current&&clearTimeout(y.current)}else _(void 0);x.current=v.current&&v.current.ownerDocument.activeElement,y.current=setTimeout((()=>{v.current&&(v.current.focus(),v.current.blur(),_(t),x.current&&x.current instanceof HTMLElement&&x.current.focus())}),0)}),[_,f]),S=(0,h.useCallback)((e=>{if(e){const t=new Date(e);_(t.toISOString());const n=Xb(t.toISOString());n&&g(n)}else _(void 0)}),[_]),{timezone:{string:C},l10n:{startOfWeek:k}}=(0,Cg.getSettings)(),E=d?.required&&!s?`${o} (${(0,w.__)("Required")})`:o;return(0,a.jsx)(b.BaseControl,{__nextHasNoMarginBottom:!0,id:r,label:E,help:l,hideLabelFromVision:s,children:(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsx)(Yb,{style:{width:"100%"},selected:f&&Xb(f)||void 0,onSelect:j,month:m,onMonthChange:g,timeZone:C||void 0,weekStartsOn:k}),(0,a.jsx)(Kb,{ref:v,__next40pxDefaultSize:!0,required:!!d?.required,customValidity:Yx(d,i),type:"datetime-local",label:(0,w.__)("Date time"),hideLabelFromVision:!0,value:f?(P=Xb(f)||void 0,P?"string"==typeof P?P:Wb(P,"yyyy-MM-dd'T'HH:mm"):""):"",onChange:S})]})});var P}function Jb(e,t){const n=Ry(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}var $b=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z"})});const{DateCalendar:ew,DateRangeCalendar:tw}=Zx(b.privateApis),nw=[{id:"today",label:(0,w.__)("Today"),getValue:()=>(0,Cg.getDate)(null)},{id:"yesterday",label:(0,w.__)("Yesterday"),getValue:()=>zy((0,Cg.getDate)(null),1)},{id:"past-week",label:(0,w.__)("Past week"),getValue:()=>zy((0,Cg.getDate)(null),7)},{id:"past-month",label:(0,w.__)("Past month"),getValue:()=>Uy((0,Cg.getDate)(null),1)}],sw=[{id:"last-7-days",label:(0,w.__)("Last 7 days"),getValue:()=>{const e=(0,Cg.getDate)(null);return[zy(e,7),e]}},{id:"last-30-days",label:(0,w.__)("Last 30 days"),getValue:()=>{const e=(0,Cg.getDate)(null);return[zy(e,30),e]}},{id:"month-to-date",label:(0,w.__)("Month to date"),getValue:()=>{const e=(0,Cg.getDate)(null);return[Jb(e),e]}},{id:"last-year",label:(0,w.__)("Last year"),getValue:()=>{const e=(0,Cg.getDate)(null);return[Zy(e,1),e]}},{id:"year-to-date",label:(0,w.__)("Year to date"),getValue:()=>{const e=(0,Cg.getDate)(null);return[db(e),e]}}],iw=e=>{if(!e)return null;const t=(0,Cg.getDate)(e);return t&&Qx(t)?t:null},rw=e=>e?"string"==typeof e?e:Wb(e,"yyyy-MM-dd"):"";function aw({field:e,validity:t,inputRefs:n,isTouched:s,setIsTouched:i,children:r}){const{isValid:o}=e,[l,c]=(0,h.useState)(void 0),u=(0,h.useCallback)((()=>{const e=Array.isArray(n)?n:[n];for(const t of e){const e=t.current;if(e&&!e.validity.valid)return void c({type:"invalid",message:e.validationMessage})}c(void 0)}),[n]);(0,h.useEffect)((()=>{if(s){const e=setTimeout((()=>{t?c(Yx(o,t)):u()}),0);return()=>clearTimeout(e)}}),[s,o,t,u]);return(0,a.jsxs)("div",{onBlur:e=>{s||e.relatedTarget&&e.currentTarget.contains(e.relatedTarget)||i(!0)},children:[r,(0,a.jsx)("div",{"aria-live":"polite",children:l&&(0,a.jsxs)("p",{className:Ht("components-validated-control__indicator","invalid"===l.type?"is-invalid":void 0,"valid"===l.type?"is-valid":void 0),children:[(0,a.jsx)(b.Icon,{className:"components-validated-control__indicator-icon",icon:$b,size:16,fill:"currentColor"}),l.message]})})]})}function ow({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{id:r,label:o,setValue:l,getValue:c,isValid:u}=t,[d,p]=(0,h.useState)(null),f=c({item:e}),m="string"==typeof f?f:void 0,[g,v]=(0,h.useState)((()=>iw(m)||new Date)),[y,x]=(0,h.useState)(!1),_=(0,h.useRef)(null),j=(0,h.useCallback)((t=>n(l({item:e,value:t}))),[e,n,l]),S=(0,h.useCallback)((e=>{const t=e?Wb(e,"yyyy-MM-dd"):void 0;j(t),p(null),x(!0)}),[j]),C=(0,h.useCallback)((e=>{const t=e.getValue(),n=rw(t);v(t),j(n),p(e.id),x(!0)}),[j]),k=(0,h.useCallback)((e=>{if(j(e),e){const t=iw(e);t&&v(t)}p(null),x(!0)}),[j]),{timezone:{string:E},l10n:{startOfWeek:P}}=(0,Cg.getSettings)(),I=u?.required?`${o} (${(0,w.__)("Required")})`:o;return(0,a.jsx)(aw,{field:t,validity:i,inputRefs:_,isTouched:y,setIsTouched:x,children:(0,a.jsx)(b.BaseControl,{__nextHasNoMarginBottom:!0,id:r,className:"dataviews-controls__date",label:I,hideLabelFromVision:s,children:(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsxs)(b.__experimentalHStack,{spacing:2,wrap:!0,justify:"flex-start",children:[nw.map((e=>{const t=d===e.id;return(0,a.jsx)(b.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:t,size:"small",onClick:()=>C(e),children:e.label},e.id)})),(0,a.jsx)(b.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!d,size:"small",disabled:!!d,accessibleWhenDisabled:!1,children:(0,w.__)("Custom")})]}),(0,a.jsx)(b.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:_,type:"date",label:(0,w.__)("Date"),hideLabelFromVision:!0,value:m,onChange:k,required:!!t.isValid?.required}),(0,a.jsx)(ew,{style:{width:"100%"},selected:m&&iw(m)||void 0,onSelect:S,month:g,onMonthChange:v,timeZone:E||void 0,weekStartsOn:P})]})})})}function lw({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{id:r,label:o,getValue:l,setValue:c}=t;let u;const d=l({item:e});Array.isArray(d)&&2===d.length&&d.every((e=>"string"==typeof e))&&(u=d);const p=(0,h.useCallback)((t=>{n(c({item:e,value:t}))}),[e,n,c]),[f,m]=(0,h.useState)(null),g=(0,h.useMemo)((()=>{if(!u)return{from:void 0,to:void 0};const[e,t]=u;return{from:iw(e)||void 0,to:iw(t)||void 0}}),[u]),[v,y]=(0,h.useState)((()=>g.from||new Date)),[x,_]=(0,h.useState)(!1),j=(0,h.useRef)(null),S=(0,h.useRef)(null),C=(0,h.useCallback)(((e,t)=>{e&&t?p([rw(e),rw(t)]):e||t||p(void 0)}),[p]),k=(0,h.useCallback)((e=>{C(e?.from,e?.to),m(null),_(!0)}),[C]),E=(0,h.useCallback)((e=>{const[t,n]=e.getValue();y(t),C(t,n),m(e.id),_(!0)}),[C]),P=(0,h.useCallback)(((e,t)=>{const[n,s]=u||[void 0,void 0];if(C("from"===e?t:n,"to"===e?t:s),t){const e=iw(t);e&&y(e)}m(null),_(!0)}),[u,C]),{timezone:I,l10n:V}=(0,Cg.getSettings)(),O=t.isValid?.required?`${o} (${(0,w.__)("Required")})`:o;return(0,a.jsx)(aw,{field:t,validity:i,inputRefs:[j,S],isTouched:x,setIsTouched:_,children:(0,a.jsx)(b.BaseControl,{__nextHasNoMarginBottom:!0,id:r,className:"dataviews-controls__date",label:O,hideLabelFromVision:s,children:(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsxs)(b.__experimentalHStack,{spacing:2,wrap:!0,justify:"flex-start",children:[sw.map((e=>{const t=f===e.id;return(0,a.jsx)(b.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:t,size:"small",onClick:()=>E(e),children:e.label},e.id)})),(0,a.jsx)(b.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!f,size:"small",accessibleWhenDisabled:!1,disabled:!!f,children:(0,w.__)("Custom")})]}),(0,a.jsxs)(b.__experimentalHStack,{spacing:2,children:[(0,a.jsx)(b.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:j,type:"date",label:(0,w.__)("From"),hideLabelFromVision:!0,value:u?.[0],onChange:e=>P("from",e),required:!!t.isValid?.required}),(0,a.jsx)(b.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:S,type:"date",label:(0,w.__)("To"),hideLabelFromVision:!0,value:u?.[1],onChange:e=>P("to",e),required:!!t.isValid?.required})]}),(0,a.jsx)(tw,{style:{width:"100%"},selected:g,onSelect:k,month:v,onMonthChange:y,timeZone:I.string||void 0,weekStartsOn:V.startOfWeek})]})})})}var cw=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M12.5939 21C14.1472 21 16.1269 20.5701 17.0711 20.1975L16.6447 18.879C16.0964 19.051 14.3299 19.6242 12.6548 19.6242C7.4467 19.6242 4.67513 16.8726 4.67513 12C4.67513 7.21338 7.50762 4.34713 12.2893 4.34713C17.132 4.34713 19.4162 7.55732 19.4162 10.7675C19.4162 14.035 19.0508 15.4968 17.4975 15.4968C16.5838 15.4968 16.0964 14.7803 16.0964 13.9777V7.5H14.4822V8.30255H14.3909C14.1777 7.67198 12.9898 7.12739 11.467 7.2707C9.18274 7.5 7.4467 9.27707 7.4467 11.8567C7.4467 14.5796 8.81726 16.672 11.467 16.758C13.203 16.8153 14.1168 16.0127 14.4822 15.1815H14.5736C14.7563 16.414 16.401 16.8439 17.467 16.8439C20.6954 16.8439 21 13.5764 21 10.7962C21 6.86943 18.0761 3 12.3807 3C6.50254 3 3 6.3535 3 11.9427C3 17.7325 6.38071 21 12.5939 21ZM11.7107 15.2962C9.73096 15.2962 9.03046 13.6051 9.03046 11.7707C9.03046 10.1083 10.0355 8.67516 11.7716 8.67516C13.599 8.67516 14.5736 9.36306 14.5736 11.7707C14.5736 14.1497 13.7513 15.2962 11.7107 15.2962Z"})});const{ValidatedInputControl:uw}=Zx(b.privateApis);function dw({data:e,field:t,onChange:n,hideLabelFromVision:s,type:i,prefix:r,suffix:o,validity:l}){const{label:c,placeholder:u,description:d,getValue:p,setValue:f,isValid:m}=t,g=p({item:e}),v=(0,h.useCallback)((t=>n(f({item:e,value:t}))),[e,f,n]);return(0,a.jsx)(uw,{required:!!m?.required,customValidity:Yx(m,l),label:c,placeholder:u,value:g??"",help:d,onChange:v,hideLabelFromVision:s,type:i,prefix:r,suffix:o,__next40pxDefaultSize:!0})}var hw=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"})});var pw=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});const{ValidatedNumberControl:fw}=Zx(b.privateApis);function mw(e){if(""===e||void 0===e)return"";const t=Number(e);return Number.isFinite(t)?t:""}function gw({value:e,onChange:t,hideLabelFromVision:n,step:s}){const[i="",r=""]=e,o=(0,h.useCallback)((e=>t([mw(e),r])),[t,r]),l=(0,h.useCallback)((e=>t([i,mw(e)])),[t,i]);return(0,a.jsx)(b.BaseControl,{__nextHasNoMarginBottom:!0,help:(0,w.__)("The max. value must be greater than the min. value."),children:(0,a.jsxs)(b.Flex,{direction:"row",gap:4,children:[(0,a.jsx)(b.__experimentalNumberControl,{label:(0,w.__)("Min."),value:i,max:r?Number(r)-s:void 0,onChange:o,__next40pxDefaultSize:!0,hideLabelFromVision:n,step:s}),(0,a.jsx)(b.__experimentalNumberControl,{label:(0,w.__)("Max."),value:r,min:i?Number(i)+s:void 0,onChange:l,__next40pxDefaultSize:!0,hideLabelFromVision:n,step:s})]})})}function vw({data:e,field:t,onChange:n,hideLabelFromVision:s,operator:i,decimals:r,validity:o}){const l=Math.pow(10,-1*Math.abs(r)),{label:c,description:u,getValue:d,setValue:p,isValid:f}=t,m=d({item:e})??"",g=(0,h.useCallback)((t=>{n(p({item:e,value:["",void 0].includes(t)?void 0:Number(t)}))}),[e,n,p]),v=(0,h.useCallback)((t=>{n(p({item:e,value:t}))}),[e,n,p]);if(i===px){let e=["",""];return Array.isArray(m)&&2===m.length&&m.every((e=>"number"==typeof e||""===e))&&(e=m),(0,a.jsx)(gw,{value:e,onChange:v,hideLabelFromVision:s,step:l})}return(0,a.jsx)(fw,{required:!!f?.required,customValidity:Yx(f,o),label:c,help:u,value:m,onChange:g,__next40pxDefaultSize:!0,hideLabelFromVision:s,step:l})}const{ValidatedRadioControl:yw}=Zx(b.privateApis);const{ValidatedSelectControl:xw}=Zx(b.privateApis);const{ValidatedToggleControl:bw}=Zx(b.privateApis);const{ValidatedTextareaControl:ww}=Zx(b.privateApis);const{ValidatedToggleGroupControl:_w}=Zx(b.privateApis);const{ValidatedFormTokenField:jw}=Zx(b.privateApis);const{ValidatedInputControl:Sw,Picker:Cw}=Zx(b.privateApis),kw=({color:e,onColorChange:t})=>{const n=e&&X(e).isValid()?e:"#ffffff";return(0,a.jsx)(b.Dropdown,{renderToggle:({onToggle:e,isOpen:t})=>(0,a.jsx)(b.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,a.jsx)("button",{type:"button",onClick:e,style:{width:"24px",height:"24px",borderRadius:"50%",backgroundColor:n,border:"1px solid #ddd",cursor:"pointer",outline:t?"2px solid #007cba":"none",outlineOffset:"2px",display:"flex",alignItems:"center",justifyContent:"center",padding:0,margin:0},"aria-label":"Open color picker"})}),renderContent:()=>(0,a.jsx)("div",{style:{padding:"16px"},children:(0,a.jsx)(Cw,{color:X(n),onChange:t,enableAlpha:!0})})})};var Ew=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"})});function Pw(e){return Array.isArray(e.elements)&&e.elements.length>0||"function"==typeof e.getElements}const Iw={array:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{label:r,placeholder:o,getValue:l,setValue:c,isValid:u}=t,d=l({item:e}),{elements:p,isLoading:f}=Ix({elements:t.elements,getElements:t.getElements}),m=(0,h.useMemo)((()=>Array.isArray(d)?d.map((e=>{const t=p?.find((t=>t.value===e));return t||{value:e,label:e}})):[]),[d,p]),g=(0,h.useCallback)((t=>{const s=t.map((e=>"object"==typeof e&&"value"in e?e.value:e));n(c({item:e,value:s}))}),[n,c,e]);return f?(0,a.jsx)(b.Spinner,{}):(0,a.jsx)(jw,{required:!!u?.required,customValidity:Yx(u,i),label:s?void 0:r,value:m,onChange:g,placeholder:o,suggestions:p?.map((e=>e.value)),__experimentalValidateInput:e=>!t.isValid?.elements||!p||p.some((t=>t.value===e||t.label===e)),__experimentalExpandOnFocus:p&&p.length>0,__experimentalShowHowTo:!t.isValid?.elements,displayTransform:e=>{if("object"==typeof e&&"label"in e)return e.label;if("string"==typeof e&&p){const t=p.find((t=>t.value===e));return t?.label||e}return e},__experimentalRenderItem:({item:e})=>{if("string"==typeof e&&p){const t=p.find((t=>t.value===e));return(0,a.jsx)("span",{children:t?.label||e})}return(0,a.jsx)("span",{children:e})}})},checkbox:function({field:e,onChange:t,data:n,hideLabelFromVision:s,validity:i}){const{getValue:r,setValue:o,label:l,description:c,isValid:u}=e,d=(0,h.useCallback)((()=>{t(o({item:n,value:!r({item:n})}))}),[n,r,t,o]);return(0,a.jsx)(Kx,{required:!!e.isValid?.required,customValidity:Yx(u,i),hidden:s,label:l,help:c,checked:r({item:n}),onChange:d})},color:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{label:r,placeholder:o,description:l,setValue:c,isValid:u}=t,d=t.getValue({item:e})||"",p=(0,h.useCallback)((t=>{n(c({item:e,value:t.toHex()}))}),[e,n,c]),f=(0,h.useCallback)((t=>{n(c({item:e,value:t||""}))}),[e,n,c]);return(0,a.jsx)(Sw,{required:!!t.isValid?.required,customValidity:Yx(u,i),label:r,placeholder:o,value:d,help:l,onChange:f,hideLabelFromVision:s,type:"text",prefix:(0,a.jsx)(kw,{color:d,onColorChange:p})})},datetime:function({data:e,field:t,onChange:n,hideLabelFromVision:s,operator:i,validity:r}){return i===gx||i===vx?(0,a.jsx)(Zb,{className:"dataviews-controls__datetime",data:e,field:t,onChange:n,hideLabelFromVision:s,operator:i}):(0,a.jsx)(Qb,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:r})},date:function({data:e,field:t,onChange:n,hideLabelFromVision:s,operator:i,validity:r}){return i===gx||i===vx?(0,a.jsx)(Zb,{className:"dataviews-controls__date",data:e,field:t,onChange:n,hideLabelFromVision:s,operator:i}):i===px?(0,a.jsx)(lw,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:r}):(0,a.jsx)(ow,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:r})},email:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){return(0,a.jsx)(dw,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i,type:"email",prefix:(0,a.jsx)(b.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,a.jsx)(b.Icon,{icon:cw})})})},telephone:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){return(0,a.jsx)(dw,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i,type:"tel",prefix:(0,a.jsx)(b.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,a.jsx)(b.Icon,{icon:hw})})})},url:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){return(0,a.jsx)(dw,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i,type:"url",prefix:(0,a.jsx)(b.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,a.jsx)(b.Icon,{icon:pw})})})},integer:function(e){return(0,a.jsx)(vw,{...e,decimals:0})},number:function(e){return(0,a.jsx)(vw,{...e,decimals:2})},password:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const[r,o]=(0,h.useState)(!1),l=(0,h.useCallback)((()=>{o((e=>!e))}),[]);return(0,a.jsx)(dw,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i,type:r?"text":"password",suffix:(0,a.jsx)(b.Button,{icon:r?Ew:Ao,onClick:l,size:"small",variant:"tertiary","aria-label":r?(0,w.__)("Hide password"):(0,w.__)("Show password")})})},radio:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{label:r,description:o,getValue:l,setValue:c,isValid:u}=t,{elements:d,isLoading:p}=Ix({elements:t.elements,getElements:t.getElements}),f=l({item:e}),m=(0,h.useCallback)((t=>n(c({item:e,value:t}))),[e,n,c]);return p?(0,a.jsx)(b.Spinner,{}):(0,a.jsx)(yw,{required:!!t.isValid?.required,customValidity:Yx(u,i),label:r,help:o,onChange:m,options:d,selected:f,hideLabelFromVision:s})},select:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{type:r,label:o,description:l,getValue:c,setValue:u,isValid:d}=t,p="array"===r,f=c({item:e})??(p?[]:""),m=(0,h.useCallback)((t=>n(u({item:e,value:t}))),[e,n,u]),{elements:g,isLoading:v}=Ix({elements:t.elements,getElements:t.getElements});return v?(0,a.jsx)(b.Spinner,{}):(0,a.jsx)(xw,{required:!!t.isValid?.required,customValidity:Yx(d,i),label:o,value:f,help:l,options:g,onChange:m,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:s,multiple:p})},text:function({data:e,field:t,onChange:n,hideLabelFromVision:s,config:i,validity:r}){const{prefix:o,suffix:l}=i||{};return(0,a.jsx)(dw,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:r,prefix:o?(0,h.createElement)(o):void 0,suffix:l?(0,h.createElement)(l):void 0})},toggle:function({field:e,onChange:t,data:n,hideLabelFromVision:s,validity:i}){const{label:r,description:o,getValue:l,setValue:c,isValid:u}=e,d=(0,h.useCallback)((()=>{t(c({item:n,value:!l({item:n})}))}),[t,c,n,l]);return(0,a.jsx)(bw,{required:!!u.required,customValidity:Yx(u,i),hidden:s,__nextHasNoMarginBottom:!0,label:r,help:o,checked:l({item:n}),onChange:d})},textarea:function({data:e,field:t,onChange:n,hideLabelFromVision:s,config:i,validity:r}){const{rows:o=4}=i||{},{label:l,placeholder:c,description:u,setValue:d,isValid:p}=t,f=t.getValue({item:e}),m=(0,h.useCallback)((t=>n(d({item:e,value:t}))),[e,n,d]);return(0,a.jsx)(ww,{required:!!p?.required,customValidity:Yx(p,r),label:l,placeholder:c,value:f??"",help:u,onChange:m,rows:o,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:s})},toggleGroup:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{getValue:r,setValue:o,isValid:l}=t,c=r({item:e}),u=(0,h.useCallback)((t=>n(o({item:e,value:t}))),[e,n,o]),{elements:d,isLoading:p}=Ix({elements:t.elements,getElements:t.getElements});if(p)return(0,a.jsx)(b.Spinner,{});if(0===d.length)return null;const f=d.find((e=>e.value===c));return(0,a.jsx)(_w,{required:!!t.isValid?.required,customValidity:Yx(l,i),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,label:t.label,help:f?.description||t.description,onChange:u,value:c,hideLabelFromVision:s,children:d.map((e=>(0,a.jsx)(b.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})}};function Vw(e){return e&&"object"==typeof e&&"string"==typeof e.control}function Ow(e){const{control:t,...n}=e,s=Tw(t);return function(e){return(0,a.jsx)(s,{...e,config:n})}}function Tw(e){if(Object.keys(Iw).includes(e))return Iw[e];throw"Control "+e+" not found"}function Aw(e){return e.map((e=>{const t="email"===(n=e.type)?Tx:"integer"===n?Ax:"number"===n?Nx:"text"===n?Fx:"datetime"===n?Mx:"date"===n?Bx:"boolean"===n?Dx:"media"===n?Rx:"array"===n?zx:"password"===n?Hx:"telephone"===n?Gx:"color"===n?Wx:"url"===n?Ux:{sort:(e,t,n)=>"number"==typeof e&&"number"==typeof t?"asc"===n?e-t:t-e:"asc"===n?e.localeCompare(t):t.localeCompare(e),isValid:{elements:!0,custom:()=>null},Edit:null,render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Vx,{item:e,field:t}):t.getValue({item:e}),enableSorting:!0,filterBy:{defaultOperators:[Xy,Qy],validOperators:yx}};var n;const s=e.getValue||(i=e.id,({item:e})=>{const t=i.split(".");let n=e;for(const e of t)n=n.hasOwnProperty(e)?n[e]:void 0;return n});var i;const r=e.setValue||(e=>({value:t})=>{const n=e.split("."),s={};let i=s;for(const e of n.slice(0,-1))i[e]={},i=i[e];return i[n.at(-1)]=t,s})(e.id),o=e.sort??function(e,n,i){return t.sort(s({item:e}),s({item:n}),i)},l={...t.isValid,...e.isValid},c=function(e,t){return"function"==typeof e.Edit?e.Edit:"string"==typeof e.Edit?Tw(e.Edit):Vw(e.Edit)?Ow(e.Edit):Pw(e)&&"array"!==e.type?Tw("select"):"string"==typeof t.Edit?Tw(t.Edit):Vw(t.Edit)?Ow(t.Edit):t.Edit}(e,t),u=e.render??function({item:e,field:n}){return t.render({item:e,field:n})},d=function(e,t){if(!1===e.filterBy)return!1;if("object"==typeof e.filterBy){let n=e.filterBy.operators;n&&Array.isArray(n)||(n=t.filterBy?t.filterBy.defaultOperators:[]);let s=yx;return"object"==typeof t.filterBy&&(s=t.filterBy.validOperators),n=n.filter((e=>s.includes(e))),Pw(e)&&n.includes(px)&&(n=n.filter((e=>e!==px))),n.some((e=>xx.includes(e)))&&(n=n.filter((e=>[...xx,px].includes(e)))),0!==n.length&&{isPrimary:!!e.filterBy.isPrimary,operators:n}}if(!1===t.filterBy)return!1;let n=t.filterBy.defaultOperators;return Pw(e)&&n.includes(px)&&(n=n.filter((e=>e!==px))),{operators:n}}(e,t);return{...e,label:e.label||e.id,header:e.header||e.label||e.id,getValue:s,setValue:r,render:u,sort:o,isValid:l,Edit:c,hasElements:Pw(e),enableHiding:e.enableHiding??!0,enableSorting:e.enableSorting??t.enableSorting??!0,filterBy:d,readOnly:e.readOnly??t.readOnly??!1}}))}function Nw(e=""){return Fy()(e.trim().toLowerCase())}const Fw=[];function Mw(e,t){switch(t){case"days":return zy(new Date,e);case"weeks":return Gy(new Date,e);case"months":return Uy(new Date,e);case"years":return Zy(new Date,e);default:return new Date}}function Bw(e,t,n){if(!e)return{data:Fw,paginationInfo:{totalItems:0,totalPages:0}};const s=Aw(n);let i=[...e];if(t.search){const e=Nw(t.search);i=i.filter((t=>s.filter((e=>e.enableGlobalSearch)).some((n=>{const s=n.getValue({item:t});return(Array.isArray(s)?s:[s]).some((t=>Nw(String(t)).includes(e)))}))))}t.filters&&t.filters?.length>0&&t.filters.forEach((e=>{const t=s.find((t=>t.id===e.field));if(t)if(e.operator===Jy&&e?.value?.length>0)i=i.filter((n=>{const s=t.getValue({item:n});return Array.isArray(s)?e.value.some((e=>s.includes(e))):"string"==typeof s&&e.value.includes(s)}));else if(e.operator===$y&&e?.value?.length>0)i=i.filter((n=>{const s=t.getValue({item:n});return Array.isArray(s)?!e.value.some((e=>s.includes(e))):"string"==typeof s&&!e.value.includes(s)}));else if(e.operator===ex&&e?.value?.length>0)i=i.filter((n=>e.value.every((e=>t.getValue({item:n})?.includes(e)))));else if(e.operator===tx&&e?.value?.length>0)i=i.filter((n=>e.value.every((e=>!t.getValue({item:n})?.includes(e)))));else if(e.operator===Xy)i=i.filter((n=>e.value===t.getValue({item:n})||void 0===e.value));else if(e.operator===Qy)i=i.filter((n=>e.value!==t.getValue({item:n})));else if(e.operator===fx&&void 0!==e.value){const n=(0,Cg.getDate)(e.value);i=i.filter((e=>{const s=(0,Cg.getDate)(t.getValue({item:e}));return n.getTime()===s.getTime()}))}else if(e.operator===mx&&void 0!==e.value){const n=(0,Cg.getDate)(e.value);i=i.filter((e=>{const s=(0,Cg.getDate)(t.getValue({item:e}));return n.getTime()!==s.getTime()}))}else if(e.operator===nx&&void 0!==e.value)i=i.filter((n=>t.getValue({item:n})<e.value));else if(e.operator===sx&&void 0!==e.value)i=i.filter((n=>t.getValue({item:n})>e.value));else if(e.operator===ix&&void 0!==e.value)i=i.filter((n=>t.getValue({item:n})<=e.value));else if(e.operator===rx&&void 0!==e.value)i=i.filter((n=>t.getValue({item:n})>=e.value));else if(e.operator===ux&&void 0!==e?.value)i=i.filter((n=>{const s=t.getValue({item:n});return"string"==typeof s&&e.value&&s.toLowerCase().includes(String(e.value).toLowerCase())}));else if(e.operator===dx&&void 0!==e?.value)i=i.filter((n=>{const s=t.getValue({item:n});return"string"==typeof s&&e.value&&!s.toLowerCase().includes(String(e.value).toLowerCase())}));else if(e.operator===hx&&void 0!==e?.value)i=i.filter((n=>{const s=t.getValue({item:n});return"string"==typeof s&&e.value&&s.toLowerCase().startsWith(String(e.value).toLowerCase())}));else if(e.operator===ax&&void 0!==e.value){const n=(0,Cg.getDate)(e.value);i=i.filter((e=>(0,Cg.getDate)(t.getValue({item:e}))<n))}else if(e.operator===ox&&void 0!==e.value){const n=(0,Cg.getDate)(e.value);i=i.filter((e=>(0,Cg.getDate)(t.getValue({item:e}))>n))}else if(e.operator===lx&&void 0!==e.value){const n=(0,Cg.getDate)(e.value);i=i.filter((e=>(0,Cg.getDate)(t.getValue({item:e}))<=n))}else if(e.operator===cx&&void 0!==e.value){const n=(0,Cg.getDate)(e.value);i=i.filter((e=>(0,Cg.getDate)(t.getValue({item:e}))>=n))}else if(e.operator===px&&Array.isArray(e.value)&&2===e.value.length&&void 0!==e.value[0]&&void 0!==e.value[1])i=i.filter((n=>{const s=t.getValue({item:n});return("number"==typeof s||s instanceof Date||"string"==typeof s)&&(s>=e.value[0]&&s<=e.value[1])}));else if(e.operator===gx&&void 0!==e.value?.value&&void 0!==e.value?.unit){const n=Mw(e.value.value,e.value.unit);i=i.filter((e=>{const s=(0,Cg.getDate)(t.getValue({item:e}));return s>=n&&s<=new Date}))}else if(e.operator===vx&&void 0!==e.value?.value&&void 0!==e.value?.unit){const n=Mw(e.value.value,e.value.unit);i=i.filter((e=>(0,Cg.getDate)(t.getValue({item:e}))<n))}}));const r=t.sort?.field?s.find((e=>e.id===t.sort?.field)):null,a=t.groupByField?s.find((e=>e.id===t.groupByField)):null;(r||a)&&i.sort(((e,n)=>{if(a){const t=a.sort(e,n,"asc");if(0!==t)return t}return r?r.sort(e,n,t.sort?.direction??"desc"):0}));let o=i.length,l=1;if(void 0!==t.page&&void 0!==t.perPage){const e=(t.page-1)*t.perPage;o=i?.length||0,l=Math.ceil(o/t.perPage),i=i?.slice(e,e+t.perPage)}return{data:i,paginationInfo:{totalItems:o,totalPages:l}}}const Dw=(0,h.createContext)({view:{type:kx},onChangeView:()=>{},fields:[],data:[],paginationInfo:{totalItems:0,totalPages:0},selection:[],onChangeSelection:()=>{},setOpenedFilter:()=>{},openedFilter:null,getItemId:e=>e.id,isItemClickable:()=>!0,renderItemLink:void 0,containerWidth:0,containerRef:(0,h.createRef)(),resizeObserverRef:()=>{},defaultLayouts:{list:{},grid:{},table:{}},filters:[],isShowingFilter:!1,setIsShowingFilter:()=>{},hasInfiniteScrollHandler:!1,config:{perPageSizes:[]}});Dw.displayName="DataViewsContext";var Rw=Dw,Lw=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"})}),zw=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",fillRule:"evenodd",clipRule:"evenodd"})}),Hw=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})}),Gw=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})});function Ww({selection:e,onChangeSelection:t,item:n,getItemId:s,titleField:i,disabled:r,...o}){const l=s(n),c=!r&&e.includes(l),u=i?.getValue?.({item:n})||(0,w.__)("(no title)");return(0,a.jsx)(b.CheckboxControl,{className:"dataviews-selection-checkbox",__nextHasNoMarginBottom:!0,"aria-label":u,"aria-disabled":r,checked:c,onChange:()=>{r||t(e.includes(l)?e.filter((e=>l!==e)):[...e,l])},...o})}const{Menu:Uw,kebabCase:qw}=Zx(b.privateApis);function Zw({action:e,onClick:t,items:n}){const s="string"==typeof e.label?e.label:e.label(n);return(0,a.jsx)(b.Button,{disabled:!!e.disabled,accessibleWhenDisabled:!0,size:"compact",onClick:t,children:s})}function Yw({action:e,onClick:t,items:n}){const s="string"==typeof e.label?e.label:e.label(n);return(0,a.jsx)(Uw.Item,{disabled:e.disabled,onClick:t,children:(0,a.jsx)(Uw.ItemLabel,{children:s})})}function Kw({action:e,items:t,closeModal:n}){const s="string"==typeof e.label?e.label:e.label(t),i="function"==typeof e.modalHeader?e.modalHeader(t):e.modalHeader;return(0,a.jsx)(b.Modal,{title:i||s,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:n,focusOnMount:e.modalFocusOnMount??!0,size:e.modalSize||"medium",overlayClassName:`dataviews-action-modal dataviews-action-modal__${qw(e.id)}`,children:(0,a.jsx)(e.RenderModal,{items:t,closeModal:n})})}function Xw({actions:e,item:t,registry:n,setActiveModalAction:s}){return(0,a.jsx)(Uw.Group,{children:e.map((e=>(0,a.jsx)(Yw,{action:e,onClick:()=>{"RenderModal"in e?s(e):e.callback([t],{registry:n})},items:[t]},e.id)))})}function Qw({item:e,actions:t,isCompact:n}){const s=(0,c.useRegistry)(),{primaryActions:i,eligibleActions:r}=(0,h.useMemo)((()=>{const n=t.filter((t=>!t.isEligible||t.isEligible(e)));return{primaryActions:n.filter((e=>e.isPrimary)),eligibleActions:n}}),[t,e]);return n?(0,a.jsx)(Jw,{item:e,actions:r,isSmall:!0,registry:s}):(0,a.jsxs)(b.__experimentalHStack,{spacing:0,justify:"flex-end",className:"dataviews-item-actions",style:{flexShrink:0,width:"auto"},children:[(0,a.jsx)($w,{item:e,actions:i,registry:s}),i.length<r.length&&(0,a.jsx)(Jw,{item:e,actions:r,registry:s})]})}function Jw({item:e,actions:t,isSmall:n,registry:s}){const[i,r]=(0,h.useState)(null);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(Uw,{placement:"bottom-end",children:[(0,a.jsx)(Uw.TriggerButton,{render:(0,a.jsx)(b.Button,{size:n?"small":"compact",icon:No,label:(0,w.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,className:"dataviews-all-actions-button"})}),(0,a.jsx)(Uw.Popover,{children:(0,a.jsx)(Xw,{actions:t,item:e,registry:s,setActiveModalAction:r})})]}),!!i&&(0,a.jsx)(Kw,{action:i,items:[e],closeModal:()=>r(null)})]})}function $w({item:e,actions:t,registry:n}){const[s,i]=(0,h.useState)(null);return(0,y.useViewportMatch)("medium","<")?null:Array.isArray(t)&&0!==t.length?(0,a.jsxs)(a.Fragment,{children:[t.map((t=>(0,a.jsx)(Zw,{action:t,onClick:()=>{"RenderModal"in t?i(t):t.callback([e],{registry:n})},items:[e]},t.id))),!!s&&(0,a.jsx)(Kw,{action:s,items:[e],closeModal:()=>i(null)})]}):null}function e_({action:e,items:t,ActionTriggerComponent:n}){const[s,i]=(0,h.useState)(!1),r={action:e,onClick:()=>{i(!0)},items:t};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n,{...r}),s&&(0,a.jsx)(Kw,{action:e,items:t,closeModal:()=>i(!1)})]})}function t_(e,t){return(0,h.useMemo)((()=>e.some((e=>e.supportsBulk&&(!e.isEligible||e.isEligible(t))))),[e,t])}function n_(e,t){return(0,h.useMemo)((()=>t.some((t=>e.some((e=>e.supportsBulk&&(!e.isEligible||e.isEligible(t))))))),[e,t])}function s_({selection:e,onChangeSelection:t,data:n,actions:s,getItemId:i}){const r=(0,h.useMemo)((()=>n.filter((e=>s.some((t=>t.supportsBulk&&(!t.isEligible||t.isEligible(e))))))),[n,s]),o=n.filter((t=>e.includes(i(t))&&r.includes(t))),l=o.length===r.length;return(0,a.jsx)(b.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",__nextHasNoMarginBottom:!0,checked:l,indeterminate:!l&&!!o.length,onChange:()=>{t(l?[]:r.map((e=>i(e))))},"aria-label":l?(0,w.__)("Deselect all"):(0,w.__)("Select all")})}function i_({action:e,onClick:t,isBusy:n,items:s}){const i="string"==typeof e.label?e.label:e.label(s);return(0,y.useViewportMatch)("medium","<")?(0,a.jsx)(b.Button,{disabled:n,accessibleWhenDisabled:!0,label:i,icon:e.icon,size:"compact",onClick:t,isBusy:n}):(0,a.jsx)(b.Button,{disabled:n,accessibleWhenDisabled:!0,size:"compact",onClick:t,isBusy:n,children:i})}const r_=[];function a_({action:e,selectedItems:t,actionInProgress:n,setActionInProgress:s}){const i=(0,c.useRegistry)(),r=(0,h.useMemo)((()=>t.filter((t=>!e.isEligible||e.isEligible(t)))),[e,t]);return"RenderModal"in e?(0,a.jsx)(e_,{action:e,items:r,ActionTriggerComponent:i_},e.id):(0,a.jsx)(i_,{action:e,onClick:async()=>{s(e.id),await e.callback(t,{registry:i}),s(null)},items:r,isBusy:n===e.id},e.id)}function o_(e,t,n,s,i,r,o,l,c){const u=r.length>0?(0,w.sprintf)((0,w._n)("%d Item selected","%d Items selected",r.length),r.length):(0,w.sprintf)((0,w._n)("%d Item","%d Items",e.length),e.length);return(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,className:"dataviews-bulk-actions-footer__container",spacing:3,children:[(0,a.jsx)(s_,{selection:s,onChangeSelection:c,data:e,actions:t,getItemId:n}),(0,a.jsx)("span",{className:"dataviews-bulk-actions-footer__item-count",children:u}),(0,a.jsxs)(b.__experimentalHStack,{className:"dataviews-bulk-actions-footer__action-buttons",expanded:!1,spacing:1,children:[i.map((e=>(0,a.jsx)(a_,{action:e,selectedItems:r,actionInProgress:o,setActionInProgress:l},e.id))),r.length>0&&(0,a.jsx)(b.Button,{icon:Ea,showTooltip:!0,tooltipPosition:"top",size:"compact",label:(0,w.__)("Cancel"),disabled:!!o,accessibleWhenDisabled:!1,onClick:()=>{c(r_)}})]})]})}function l_({selection:e,actions:t,onChangeSelection:n,data:s,getItemId:i}){const[r,a]=(0,h.useState)(null),o=(0,h.useRef)(null),l=(0,y.useViewportMatch)("medium","<"),c=(0,h.useMemo)((()=>t.filter((e=>e.supportsBulk))),[t]),u=(0,h.useMemo)((()=>s.filter((e=>c.some((t=>!t.isEligible||t.isEligible(e)))))),[s,c]),d=(0,h.useMemo)((()=>s.filter((t=>e.includes(i(t))&&u.includes(t)))),[e,s,i,u]),p=(0,h.useMemo)((()=>t.filter((e=>e.supportsBulk&&(!l||e.icon)&&d.some((t=>!e.isEligible||e.isEligible(t)))))),[t,d,l]);return r?(o.current||(o.current=o_(s,t,i,e,p,d,r,a,n)),o.current):(o.current&&(o.current=null),o_(s,t,i,e,p,d,r,a,n))}function c_(){const{data:e,selection:t,actions:n=r_,onChangeSelection:s,getItemId:i}=(0,h.useContext)(Rw);return(0,a.jsx)(l_,{selection:t,onChangeSelection:s,data:e,actions:n,getItemId:i})}var u_=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z"})}),d_=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})}),h_=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})});const{Menu:p_}=Zx(b.privateApis);function f_({children:e}){return h.Children.toArray(e).filter(Boolean).map(((e,t)=>(0,a.jsxs)(h.Fragment,{children:[t>0&&(0,a.jsx)(p_.Separator,{}),e]},t)))}const m_=(0,h.forwardRef)((function({fieldId:e,view:t,fields:n,onChangeView:s,onHide:i,setOpenedFilter:r,canMove:o=!0},l){const c=t.fields??[],u=c?.indexOf(e),d=t.sort?.field===e;let h=!1,p=!1,f=!1,m=[];const g=n.find((t=>t.id===e));if(!g)return null;h=!1!==g.enableHiding,p=!1!==g.enableSorting;const v=g.header;return m=!!g.filterBy&&g.filterBy?.operators||[],f=!(t.filters?.some((t=>e===t.field))||!g.hasElements&&!g.Edit||!1===g.filterBy||g.filterBy?.isPrimary),p||o||h||f?(0,a.jsxs)(p_,{children:[(0,a.jsxs)(p_.TriggerButton,{render:(0,a.jsx)(b.Button,{size:"compact",className:"dataviews-view-table-header-button",ref:l,variant:"tertiary"}),children:[v,t.sort&&d&&(0,a.jsx)("span",{"aria-hidden":"true",children:_x[t.sort.direction]})]}),(0,a.jsx)(p_.Popover,{style:{minWidth:"240px"},children:(0,a.jsxs)(f_,{children:[p&&(0,a.jsx)(p_.Group,{children:wx.map((n=>{const i=t.sort&&d&&t.sort.direction===n,r=`${e}-${n}`;return(0,a.jsx)(p_.RadioItem,{name:"view-table-sorting",value:r,checked:i,onChange:()=>{s({...t,sort:{field:e,direction:n},showLevels:!1})},children:(0,a.jsx)(p_.ItemLabel,{children:Sx[n]})},r)}))}),f&&(0,a.jsx)(p_.Group,{children:(0,a.jsx)(p_.Item,{prefix:(0,a.jsx)(b.Icon,{icon:u_}),onClick:()=>{r(e),s({...t,page:1,filters:[...t.filters||[],{field:e,value:void 0,operator:m[0]}]})},children:(0,a.jsx)(p_.ItemLabel,{children:(0,w.__)("Add filter")})})}),(o||h)&&g&&(0,a.jsxs)(p_.Group,{children:[o&&(0,a.jsx)(p_.Item,{prefix:(0,a.jsx)(b.Icon,{icon:d_}),disabled:u<1,onClick:()=>{s({...t,fields:[...c.slice(0,u-1)??[],e,c[u-1],...c.slice(u+1)]})},children:(0,a.jsx)(p_.ItemLabel,{children:(0,w.__)("Move left")})}),o&&(0,a.jsx)(p_.Item,{prefix:(0,a.jsx)(b.Icon,{icon:h_}),disabled:u>=c.length-1,onClick:()=>{s({...t,fields:[...c.slice(0,u)??[],c[u+1],e,...c.slice(u+2)]})},children:(0,a.jsx)(p_.ItemLabel,{children:(0,w.__)("Move right")})}),h&&g&&(0,a.jsx)(p_.Item,{prefix:(0,a.jsx)(b.Icon,{icon:Ew}),onClick:()=>{i(g),s({...t,fields:c.filter((t=>t!==e))})},children:(0,a.jsx)(p_.ItemLabel,{children:(0,w.__)("Hide column")})})]})]})})]}):v}));var g_=m_;function v_({item:e,isItemClickable:t,onClickItem:n,renderItemLink:s,className:i,children:r,...o}){if(!t(e))return(0,a.jsx)("div",{className:i,...o,children:r});if(s){const t=s({item:e,className:`${i} ${i}--clickable`,...o,children:r});return(0,h.cloneElement)(t,{onClick:e=>{e.stopPropagation(),t.props.onClick&&t.props.onClick(e)},onKeyDown:e=>{"Enter"!==e.key&&""!==e.key&&" "!==e.key||(e.stopPropagation(),t.props.onKeyDown&&t.props.onKeyDown(e))}})}const l=function({item:e,isItemClickable:t,onClickItem:n,className:s}){return t(e)&&n?{className:s?`${s} ${s}--clickable`:void 0,role:"button",tabIndex:0,onClick:t=>{t.stopPropagation(),n(e)},onKeyDown:t=>{"Enter"!==t.key&&""!==t.key&&" "!==t.key||(t.stopPropagation(),n(e))}}:{className:s}}({item:e,isItemClickable:t,onClickItem:n,className:i});return(0,a.jsx)("div",{...l,...o,children:r})}var y_=function({item:e,level:t,titleField:n,mediaField:s,descriptionField:i,onClickItem:r,renderItemLink:o,isItemClickable:l}){return(0,a.jsxs)(b.__experimentalHStack,{spacing:3,justify:"flex-start",children:[s&&(0,a.jsx)(v_,{item:e,isItemClickable:l,onClickItem:r,renderItemLink:o,className:"dataviews-view-table__cell-content-wrapper dataviews-column-primary__media","aria-label":n?(0,w.sprintf)((0,w.__)("Click item: %s"),n.getValue?.({item:e})):void 0,children:(0,a.jsx)(s.render,{item:e,field:s,config:{sizes:"32px"}})}),(0,a.jsxs)(b.__experimentalVStack,{spacing:0,alignment:"flex-start",className:"dataviews-view-table__primary-column-content",children:[n&&(0,a.jsxs)(v_,{item:e,isItemClickable:l,onClickItem:r,renderItemLink:o,className:"dataviews-view-table__cell-content-wrapper dataviews-title-field",children:[void 0!==t&&t>0&&(0,a.jsxs)("span",{className:"dataviews-view-table__level",children:["—".repeat(t)," "]}),(0,a.jsx)(n.render,{item:e,field:n})]}),i&&(0,a.jsx)(i.render,{item:e,field:i})]})]})};function x_({scrollContainerRef:e,enabled:t=!1}){const[n,s]=(0,h.useState)(!1),i=(0,y.useDebounce)((0,h.useCallback)((()=>{const t=e.current;t&&s((e=>{if((0,w.isRTL)())return Math.abs(e.scrollLeft)<=1;return e.scrollLeft+e.clientWidth>=e.scrollWidth-1})(t))}),[e,s]),200);return(0,h.useEffect)((()=>"undefined"!=typeof window&&t&&e.current?(i(),e.current.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{e.current?.removeEventListener("scroll",i),window.removeEventListener("resize",i)}):()=>{}),[e,t]),n}function b_(e,t){return e.reduce(((e,n)=>{const s=t.getValue({item:n});return e.has(s)||e.set(s,[]),e.get(s)?.push(n),e}),new Map)}function w_({item:e,fields:t,column:n,align:s}){const i=t.find((e=>e.id===n));if(!i)return null;const r=Ht("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__cell-align-end":"end"===s,"dataviews-view-table__cell-align-center":"center"===s});return(0,a.jsx)("div",{className:r,children:(0,a.jsx)(i.render,{item:e,field:i})})}function __({hasBulkActions:e,item:t,level:n,actions:s,fields:i,id:r,view:o,titleField:l,mediaField:c,descriptionField:u,selection:d,getItemId:p,isItemClickable:f,onClickItem:m,renderItemLink:g,onChangeSelection:v,isActionsColumnSticky:y,posinset:x}){const{paginationInfo:b}=(0,h.useContext)(Rw),w=t_(s,t),_=w&&d.includes(r),[j,S]=(0,h.useState)(!1),{showTitle:C=!0,showMedia:k=!0,showDescription:E=!0,infiniteScrollEnabled:P}=o,I=(0,h.useRef)(!1),V=o.fields??[],O=l&&C||c&&k||u&&E;return(0,a.jsxs)("tr",{className:Ht("dataviews-view-table__row",{"is-selected":w&&_,"is-hovered":j,"has-bulk-actions":w}),onMouseEnter:()=>{S(!0)},onMouseLeave:()=>{S(!1)},onTouchStart:()=>{I.current=!0},"aria-setsize":P?b.totalItems:void 0,"aria-posinset":x,role:P?"article":void 0,onClick:e=>{w&&(I.current||"Range"===document.getSelection()?.type||(((0,Xt.isAppleOS)()?e.metaKey:e.ctrlKey)?v(d.includes(r)?d.filter((e=>r!==e)):[...d,r]):v(d.includes(r)?d.filter((e=>r!==e)):[r])))},children:[e&&(0,a.jsx)("td",{className:"dataviews-view-table__checkbox-column",children:(0,a.jsx)("div",{className:"dataviews-view-table__cell-content-wrapper",children:(0,a.jsx)(Ww,{item:t,selection:d,onChangeSelection:v,getItemId:p,titleField:l,disabled:!w})})}),O&&(0,a.jsx)("td",{children:(0,a.jsx)(y_,{item:t,level:n,titleField:C?l:void 0,mediaField:k?c:void 0,descriptionField:E?u:void 0,isItemClickable:f,onClickItem:m,renderItemLink:g})}),V.map((e=>{const{width:n,maxWidth:s,minWidth:r,align:l}=o.layout?.styles?.[e]??{};return(0,a.jsx)("td",{style:{width:n,maxWidth:s,minWidth:r},children:(0,a.jsx)(w_,{fields:i,item:t,column:e,align:l})},e)})),!!s?.length&&(0,a.jsx)("td",{className:Ht("dataviews-view-table__actions-column",{"dataviews-view-table__actions-column--sticky":!0,"dataviews-view-table__actions-column--stuck":y}),onClick:e=>e.stopPropagation(),children:(0,a.jsx)(Qw,{item:t,actions:s})})]})}var j_=function({actions:e,data:t,fields:n,getItemId:s,getItemLevel:i,isLoading:r=!1,onChangeView:o,onChangeSelection:l,selection:c,setOpenedFilter:u,onClickItem:d,isItemClickable:p,renderItemLink:f,view:m,className:g,empty:v}){const{containerRef:y}=(0,h.useContext)(Rw),x=(0,h.useRef)(new Map),_=(0,h.useRef)(),[j,S]=(0,h.useState)(),C=n_(e,t);(0,h.useEffect)((()=>{_.current&&(_.current.focus(),_.current=void 0)}));const k=(0,h.useId)(),E=x_({scrollContainerRef:y,enabled:!!e?.length});if(j)return _.current=j,void S(void 0);const P=e=>{const t=x.current.get(e.id),n=t?x.current.get(t.fallback):void 0;S(n?.node)},I=!!t?.length,V=n.find((e=>e.id===m.titleField)),O=n.find((e=>e.id===m.mediaField)),T=n.find((e=>e.id===m.descriptionField)),A=m.groupByField?n.find((e=>e.id===m.groupByField)):null,N=A?b_(t,A):null,{showTitle:F=!0,showMedia:M=!0,showDescription:B=!0}=m,D=V&&F||O&&M||T&&B,R=m.fields??[],L=(e,t)=>n=>{n?x.current.set(e,{node:n,fallback:R[t>0?t-1:1]}):x.current.delete(e)},z=m.infiniteScrollEnabled&&!N;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("table",{className:Ht("dataviews-view-table",g,{[`has-${m.layout?.density}-density`]:m.layout?.density&&["compact","comfortable"].includes(m.layout.density)}),"aria-busy":r,"aria-describedby":k,role:z?"feed":void 0,children:[(0,a.jsxs)("colgroup",{children:[C&&(0,a.jsx)("col",{className:"dataviews-view-table__col-checkbox"}),D&&(0,a.jsx)("col",{className:"dataviews-view-table__col-primary"}),R.map((e=>(0,a.jsx)("col",{className:`dataviews-view-table__col-${e}`},`col-${e}`))),!!e?.length&&(0,a.jsx)("col",{className:"dataviews-view-table__col-actions"})]}),(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"dataviews-view-table__row",children:[C&&(0,a.jsx)("th",{className:"dataviews-view-table__checkbox-column",scope:"col",children:(0,a.jsx)(s_,{selection:c,onChangeSelection:l,data:t,actions:e,getItemId:s})}),D&&(0,a.jsx)("th",{scope:"col",children:V&&(0,a.jsx)(g_,{ref:L(V.id,0),fieldId:V.id,view:m,fields:n,onChangeView:o,onHide:P,setOpenedFilter:u,canMove:!1})}),R.map(((e,t)=>{const{width:s,maxWidth:i,minWidth:r,align:l}=m.layout?.styles?.[e]??{};return(0,a.jsx)("th",{style:{width:s,maxWidth:i,minWidth:r,textAlign:l},"aria-sort":m.sort?.direction&&m.sort?.field===e?jx[m.sort.direction]:void 0,scope:"col",children:(0,a.jsx)(g_,{ref:L(e,t),fieldId:e,view:m,fields:n,onChangeView:o,onHide:P,setOpenedFilter:u,canMove:m.layout?.enableMoving??!0})},e)})),!!e?.length&&(0,a.jsx)("th",{className:Ht("dataviews-view-table__actions-column",{"dataviews-view-table__actions-column--sticky":!0,"dataviews-view-table__actions-column--stuck":!E}),children:(0,a.jsx)("span",{className:"dataviews-view-table-header",children:(0,w.__)("Actions")})})]})}),I&&A&&N?Array.from(N.entries()).map((([t,r])=>(0,a.jsxs)("tbody",{children:[(0,a.jsx)("tr",{className:"dataviews-view-table__group-header-row",children:(0,a.jsx)("td",{colSpan:R.length+(D?1:0)+(C?1:0)+(e?.length?1:0),className:"dataviews-view-table__group-header-cell",children:(0,w.sprintf)((0,w.__)("%1$s: %2$s"),A.label,t)})}),r.map(((t,r)=>(0,a.jsx)(__,{item:t,level:m.showLevels&&"function"==typeof i?i(t):void 0,hasBulkActions:C,actions:e,fields:n,id:s(t)||r.toString(),view:m,titleField:V,mediaField:O,descriptionField:T,selection:c,getItemId:s,onChangeSelection:l,onClickItem:d,renderItemLink:f,isItemClickable:p,isActionsColumnSticky:!E},s(t))))]},`group-${t}`))):(0,a.jsx)("tbody",{children:I&&t.map(((t,r)=>(0,a.jsx)(__,{item:t,level:m.showLevels&&"function"==typeof i?i(t):void 0,hasBulkActions:C,actions:e,fields:n,id:s(t)||r.toString(),view:m,titleField:V,mediaField:O,descriptionField:T,selection:c,getItemId:s,onChangeSelection:l,onClickItem:d,renderItemLink:f,isItemClickable:p,isActionsColumnSticky:!E,posinset:z?r+1:void 0},s(t))))})]}),(0,a.jsxs)("div",{className:Ht({"dataviews-loading":r,"dataviews-no-results":!I&&!r}),id:k,children:[!I&&(r?(0,a.jsx)("p",{children:(0,a.jsx)(b.Spinner,{})}):v),I&&r&&(0,a.jsx)("p",{className:"dataviews-loading-more",children:(0,a.jsx)(b.Spinner,{})})]})]})};const S_=(0,h.forwardRef)((({className:e,previewSize:t,...n},s)=>(0,a.jsx)("div",{ref:s,className:Ht("dataviews-view-grid-items",e),style:{gridTemplateColumns:t&&`repeat(auto-fill, minmax(${t}px, 1fr))`},...n}))),{Badge:C_}=Zx(b.privateApis);function k_({view:e,selection:t,onChangeSelection:n,onClickItem:s,isItemClickable:i,renderItemLink:r,getItemId:o,item:l,actions:c,mediaField:u,titleField:d,descriptionField:p,regularFields:f,badgeFields:m,hasBulkActions:g,config:v,posinset:x}){const{showTitle:_=!0,showMedia:j=!0,showDescription:S=!0,infiniteScrollEnabled:C}=e,k=t_(c,l),E=o(l),P=(0,y.useInstanceId)(k_),I=t.includes(E),V=u?.render?(0,a.jsx)(u.render,{item:l,field:u,config:v}):null,O=_&&d?.render?(0,a.jsx)(d.render,{item:l,field:d}):null,T=j&&V;let A,N;i(l)&&s&&(O?(A={"aria-labelledby":`dataviews-view-grid__title-field-${P}`},N={id:`dataviews-view-grid__title-field-${P}`}):A={"aria-label":(0,w.__)("Navigate to item")});const{paginationInfo:F}=(0,h.useContext)(Rw);return(0,a.jsxs)(b.__experimentalVStack,{spacing:0,className:Ht("dataviews-view-grid__card",{"is-selected":k&&I}),onClickCapture:e=>{if((0,Xt.isAppleOS)()?e.metaKey:e.ctrlKey){if(e.stopPropagation(),e.preventDefault(),!k)return;n(t.includes(E)?t.filter((e=>E!==e)):[...t,E])}},role:C?"article":void 0,"aria-setsize":C?F.totalItems:void 0,"aria-posinset":x,children:[T&&(0,a.jsx)(v_,{item:l,isItemClickable:i,onClickItem:s,renderItemLink:r,className:"dataviews-view-grid__media",...A,children:V}),g&&T&&(0,a.jsx)(Ww,{item:l,selection:t,onChangeSelection:n,getItemId:o,titleField:d,disabled:!k}),!_&&T&&!!c?.length&&(0,a.jsx)("div",{className:"dataviews-view-grid__media-actions",children:(0,a.jsx)(Qw,{item:l,actions:c,isCompact:!0})}),_&&(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",className:"dataviews-view-grid__title-actions",children:[(0,a.jsx)(v_,{item:l,isItemClickable:i,onClickItem:s,renderItemLink:r,className:"dataviews-view-grid__title-field dataviews-title-field",...N,children:O}),!!c?.length&&(0,a.jsx)(Qw,{item:l,actions:c,isCompact:!0})]}),(0,a.jsxs)(b.__experimentalVStack,{spacing:1,children:[S&&p?.render&&(0,a.jsx)(p.render,{item:l,field:p}),!!m?.length&&(0,a.jsx)(b.__experimentalHStack,{className:"dataviews-view-grid__badge-fields",spacing:2,wrap:!0,alignment:"top",justify:"flex-start",children:m.map((e=>(0,a.jsx)(C_,{className:"dataviews-view-grid__field-value",children:(0,a.jsx)(e.render,{item:l,field:e})},e.id)))}),!!f?.length&&(0,a.jsx)(b.__experimentalVStack,{className:"dataviews-view-grid__fields",spacing:1,children:f.map((e=>(0,a.jsx)(b.Flex,{className:"dataviews-view-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Tooltip,{text:e.label,children:(0,a.jsx)(b.FlexItem,{className:"dataviews-view-grid__field-name",children:e.header})}),(0,a.jsx)(b.FlexItem,{className:"dataviews-view-grid__field-value",style:{maxHeight:"none"},children:(0,a.jsx)(e.render,{item:l,field:e})})]})},e.id)))})]})]},E)}var E_=function({actions:e,data:t,fields:n,getItemId:s,isLoading:i,onChangeSelection:r,onClickItem:o,isItemClickable:l,renderItemLink:c,selection:u,view:d,className:p,empty:f}){const{resizeObserverRef:m}=(0,h.useContext)(Rw),g=n.find((e=>e.id===d?.titleField)),v=n.find((e=>e.id===d?.mediaField)),y=n.find((e=>e.id===d?.descriptionField)),x=d.fields??[],{regularFields:_,badgeFields:j}=x.reduce(((e,t)=>{const s=n.find((e=>e.id===t));if(!s)return e;return e[d.layout?.badgeFields?.includes(t)?"badgeFields":"regularFields"].push(s),e}),{regularFields:[],badgeFields:[]}),S=!!t?.length,C=n_(e,t),k=d.layout?.previewSize,E="900px",P=d.groupByField?n.find((e=>e.id===d.groupByField)):null,I=P?b_(t,P):null,V=d.infiniteScrollEnabled&&!I;return(0,a.jsxs)(a.Fragment,{children:[S&&P&&I&&(0,a.jsx)(b.__experimentalVStack,{spacing:4,children:Array.from(I.entries()).map((([t,n])=>(0,a.jsxs)(b.__experimentalVStack,{spacing:2,children:[(0,a.jsx)("h3",{className:"dataviews-view-grid__group-header",children:(0,w.sprintf)((0,w.__)("%1$s: %2$s"),P.label,t)}),(0,a.jsx)(S_,{className:Ht("dataviews-view-grid",p),previewSize:k,"aria-busy":i,ref:m,children:n.map((t=>(0,a.jsx)(k_,{view:d,selection:u,onChangeSelection:r,onClickItem:o,isItemClickable:l,renderItemLink:c,getItemId:s,item:t,actions:e,mediaField:v,titleField:g,descriptionField:y,regularFields:_,badgeFields:j,hasBulkActions:C,config:{sizes:E}},s(t))))})]},t)))}),S&&!I&&(0,a.jsx)(S_,{className:Ht("dataviews-view-grid",p),previewSize:k,"aria-busy":i,ref:m,role:V?"feed":void 0,children:t.map(((t,n)=>(0,a.jsx)(k_,{view:d,selection:u,onChangeSelection:r,onClickItem:o,isItemClickable:l,renderItemLink:c,getItemId:s,item:t,actions:e,mediaField:v,titleField:g,descriptionField:y,regularFields:_,badgeFields:j,hasBulkActions:C,config:{sizes:E},posinset:V?n+1:void 0},s(t))))}),!S&&(0,a.jsx)("div",{className:Ht({"dataviews-loading":i,"dataviews-no-results":!i}),children:i?(0,a.jsx)("p",{children:(0,a.jsx)(b.Spinner,{})}):f}),S&&i&&(0,a.jsx)("p",{className:"dataviews-loading-more",children:(0,a.jsx)(b.Spinner,{})})]})};const{Menu:P_}=Zx(b.privateApis);function I_(e){return`${e}-item-wrapper`}function V_(e){return`${e}-dropdown`}function O_({idPrefix:e,primaryAction:t,item:n}){const s=(0,c.useRegistry)(),[i,r]=(0,h.useState)(!1),o=function(e,t){return`${e}-primary-action-${t}`}(e,t.id),l="string"==typeof t.label?t.label:t.label([n]);return"RenderModal"in t?(0,a.jsx)("div",{role:"gridcell",children:(0,a.jsx)(b.Composite.Item,{id:o,render:(0,a.jsx)(b.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,text:l,size:"small",onClick:()=>r(!0)}),children:i&&(0,a.jsx)(Kw,{action:t,items:[n],closeModal:()=>r(!1)})})},t.id):(0,a.jsx)("div",{role:"gridcell",children:(0,a.jsx)(b.Composite.Item,{id:o,render:(0,a.jsx)(b.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,size:"small",onClick:()=>{t.callback([n],{registry:s})},children:l})})},t.id)}function T_({view:e,actions:t,idPrefix:n,isSelected:s,item:i,titleField:r,mediaField:o,descriptionField:l,onSelect:u,otherFields:d,onDropdownTriggerKeyDown:p,posinset:f}){const{showTitle:m=!0,showMedia:g=!0,showDescription:v=!0,infiniteScrollEnabled:y}=e,x=(0,h.useRef)(null),_=`${n}-label`,j=`${n}-description`,S=(0,c.useRegistry)(),[C,k]=(0,h.useState)(!1),[E,P]=(0,h.useState)(null),I=({type:e})=>{k("mouseenter"===e)},{paginationInfo:V}=(0,h.useContext)(Rw);(0,h.useEffect)((()=>{s&&x.current?.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}),[s]);const{primaryAction:O,eligibleActions:T}=(0,h.useMemo)((()=>{const e=t.filter((e=>!e.isEligible||e.isEligible(i)));return{primaryAction:e.filter((e=>e.isPrimary))[0],eligibleActions:e}}),[t,i]),A=O&&1===t.length,N=g&&o?.render?(0,a.jsx)("div",{className:"dataviews-view-list__media-wrapper",children:(0,a.jsx)(o.render,{item:i,field:o,config:{sizes:"52px"}})}):null,F=m&&r?.render?(0,a.jsx)(r.render,{item:i,field:r}):null,M=T?.length>0&&(0,a.jsxs)(b.__experimentalHStack,{spacing:3,className:"dataviews-view-list__item-actions",children:[O&&(0,a.jsx)(O_,{idPrefix:n,primaryAction:O,item:i}),!A&&(0,a.jsxs)("div",{role:"gridcell",children:[(0,a.jsxs)(P_,{placement:"bottom-end",children:[(0,a.jsx)(P_.TriggerButton,{render:(0,a.jsx)(b.Composite.Item,{id:V_(n),render:(0,a.jsx)(b.Button,{size:"small",icon:No,label:(0,w.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,onKeyDown:p})})}),(0,a.jsx)(P_.Popover,{children:(0,a.jsx)(Xw,{actions:T,item:i,registry:S,setActiveModalAction:P})})]}),!!E&&(0,a.jsx)(Kw,{action:E,items:[i],closeModal:()=>P(null)})]})]});return(0,a.jsx)(b.Composite.Row,{ref:x,render:(0,a.jsx)("div",{"aria-posinset":f,"aria-setsize":y?V.totalItems:void 0}),role:y?"article":"row",className:Ht({"is-selected":s,"is-hovered":C}),onMouseEnter:I,onMouseLeave:I,children:(0,a.jsxs)(b.__experimentalHStack,{className:"dataviews-view-list__item-wrapper",spacing:0,children:[(0,a.jsx)("div",{role:"gridcell",children:(0,a.jsx)(b.Composite.Item,{id:I_(n),"aria-pressed":s,"aria-labelledby":_,"aria-describedby":j,className:"dataviews-view-list__item",onClick:()=>u(i)})}),(0,a.jsxs)(b.__experimentalHStack,{spacing:3,justify:"start",alignment:"flex-start",children:[N,(0,a.jsxs)(b.__experimentalVStack,{spacing:1,className:"dataviews-view-list__field-wrapper",children:[(0,a.jsxs)(b.__experimentalHStack,{spacing:0,children:[(0,a.jsx)("div",{className:"dataviews-title-field",id:_,children:F}),M]}),v&&l?.render&&(0,a.jsx)("div",{className:"dataviews-view-list__field",children:(0,a.jsx)(l.render,{item:i,field:l})}),(0,a.jsx)("div",{className:"dataviews-view-list__fields",id:j,children:d.map((e=>(0,a.jsxs)("div",{className:"dataviews-view-list__field",children:[(0,a.jsx)(b.VisuallyHidden,{as:"span",className:"dataviews-view-list__field-label",children:e.label}),(0,a.jsx)("span",{className:"dataviews-view-list__field-value",children:(0,a.jsx)(e.render,{item:i,field:e})})]},e.id)))})]})]})]})})}function A_(e){return!!e}function N_(e){return(0,h.useMemo)((()=>e?.every((e=>e.supportsBulk))),[e])}const{Badge:F_}=Zx(b.privateApis);function M_({view:e,multiselect:t,selection:n,onChangeSelection:s,getItemId:i,item:r,mediaField:o,titleField:l,descriptionField:c,regularFields:u,badgeFields:d,config:h,posinset:p,setsize:f}){const{showTitle:m=!0,showMedia:g=!0,showDescription:v=!0}=e,y=i(r),x=n.includes(y),_=o?.render?(0,a.jsx)(o.render,{item:r,field:o,config:h}):null,j=m&&l?.render?(0,a.jsx)(l.render,{item:r,field:l}):null;return(0,a.jsxs)(b.Composite.Item,{"aria-label":l?l.getValue({item:r})||(0,w.__)("(no title)"):void 0,render:({children:e,...t})=>(0,a.jsx)(b.__experimentalVStack,{spacing:0,children:e,...t}),role:"option","aria-posinset":p,"aria-setsize":f,className:Ht("dataviews-view-picker-grid__card",{"is-selected":x}),"aria-selected":x,onClick:()=>{if(x)s(n.filter((e=>y!==e)));else{const e=t?[...n,y]:[y];s(e)}},children:[g&&_&&(0,a.jsx)("div",{className:"dataviews-view-picker-grid__media",children:_}),g&&_&&(0,a.jsx)(Ww,{item:r,selection:n,onChangeSelection:s,getItemId:i,titleField:l,disabled:!1,"aria-hidden":!0,tabIndex:-1}),m&&(0,a.jsx)(b.__experimentalHStack,{justify:"space-between",className:"dataviews-view-picker-grid__title-actions",children:(0,a.jsx)("div",{className:"dataviews-view-picker-grid__title-field dataviews-title-field",children:j})}),(0,a.jsxs)(b.__experimentalVStack,{spacing:1,children:[v&&c?.render&&(0,a.jsx)(c.render,{item:r,field:c}),!!d?.length&&(0,a.jsx)(b.__experimentalHStack,{className:"dataviews-view-picker-grid__badge-fields",spacing:2,wrap:!0,alignment:"top",justify:"flex-start",children:d.map((e=>(0,a.jsx)(F_,{className:"dataviews-view-picker-grid__field-value",children:(0,a.jsx)(e.render,{item:r,field:e})},e.id)))}),!!u?.length&&(0,a.jsx)(b.__experimentalVStack,{className:"dataviews-view-picker-grid__fields",spacing:1,children:u.map((e=>(0,a.jsx)(b.Flex,{className:"dataviews-view-picker-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.FlexItem,{className:"dataviews-view-picker-grid__field-name",children:e.header}),(0,a.jsx)(b.FlexItem,{className:"dataviews-view-picker-grid__field-value",style:{maxHeight:"none"},children:(0,a.jsx)(e.render,{item:r,field:e})})]})},e.id)))})]})]},y)}function B_({groupName:e,groupField:t,children:n}){const s=(0,y.useInstanceId)(B_,"dataviews-view-picker-grid-group__header");return(0,a.jsxs)(b.__experimentalVStack,{spacing:2,role:"group","aria-labelledby":s,children:[(0,a.jsx)("h3",{className:"dataviews-view-picker-grid-group__header",id:s,children:(0,w.sprintf)((0,w.__)("%1$s: %2$s"),t.label,e)}),n]},e)}var D_=function({actions:e,data:t,fields:n,getItemId:s,isLoading:i,onChangeSelection:r,selection:o,view:l,className:c,empty:u}){const{resizeObserverRef:d,paginationInfo:p,itemListLabel:f}=(0,h.useContext)(Rw),m=n.find((e=>e.id===l?.titleField)),g=n.find((e=>e.id===l?.mediaField)),v=n.find((e=>e.id===l?.descriptionField)),y=l.fields??[],{regularFields:x,badgeFields:w}=y.reduce(((e,t)=>{const s=n.find((e=>e.id===t));if(!s)return e;return e[l.layout?.badgeFields?.includes(t)?"badgeFields":"regularFields"].push(s),e}),{regularFields:[],badgeFields:[]}),_=!!t?.length,j=l.layout?.previewSize,S=N_(e),C="900px",k=l.groupByField?n.find((e=>e.id===l.groupByField)):null,E=k?b_(t,k):null,P=l.infiniteScrollEnabled&&!E,I=l?.page??1,V=l?.perPage??0,O=P?p?.totalItems:void 0;return(0,a.jsxs)(a.Fragment,{children:[_&&k&&E&&(0,a.jsx)(b.Composite,{virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":S,className:Ht("dataviews-view-picker-grid",c),"aria-label":f,render:({children:e,...t})=>(0,a.jsx)(b.__experimentalVStack,{spacing:4,children:e,...t}),children:Array.from(E.entries()).map((([e,n])=>(0,a.jsx)(B_,{groupName:e,groupField:k,children:(0,a.jsx)(S_,{previewSize:j,style:{gridTemplateColumns:j&&`repeat(auto-fill, minmax(${j}px, 1fr))`},"aria-busy":i,ref:d,children:n.map((e=>{const n=(I-1)*V+t.indexOf(e)+1;return(0,a.jsx)(M_,{view:l,multiselect:S,selection:o,onChangeSelection:r,getItemId:s,item:e,mediaField:g,titleField:m,descriptionField:v,regularFields:x,badgeFields:w,config:{sizes:C},posinset:n,setsize:O},s(e))}))})},e)))}),_&&!E&&(0,a.jsx)(b.Composite,{render:(0,a.jsx)(S_,{className:Ht("dataviews-view-picker-grid",c),previewSize:j,"aria-busy":i,ref:d}),virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":S,"aria-label":f,children:t.map(((e,t)=>{let n=P?t+1:void 0;return P||(n=(I-1)*V+t+1),(0,a.jsx)(M_,{view:l,multiselect:S,selection:o,onChangeSelection:r,getItemId:s,item:e,mediaField:g,titleField:m,descriptionField:v,regularFields:x,badgeFields:w,config:{sizes:C},posinset:n,setsize:O},s(e))}))}),!_&&(0,a.jsx)("div",{className:Ht({"dataviews-loading":i,"dataviews-no-results":!i}),children:i?(0,a.jsx)("p",{children:(0,a.jsx)(b.Spinner,{})}):u}),_&&i&&(0,a.jsx)("p",{className:"dataviews-loading-more",children:(0,a.jsx)(b.Spinner,{})})]})};const R_=[{value:120,breakpoint:1},{value:170,breakpoint:1},{value:230,breakpoint:1},{value:290,breakpoint:1112},{value:350,breakpoint:1636},{value:430,breakpoint:588}];function L_(){const e=(0,h.useContext)(Rw),t=e.view,n=R_.filter((t=>e.containerWidth>=t.breakpoint)),s=t.layout?.previewSize??230,i=n.map(((e,t)=>({...e,index:t}))).filter((e=>e.value<=s)).sort(((e,t)=>t.value-e.value))[0]?.index??0,r=n.map(((e,t)=>({value:t})));return(0,a.jsx)(b.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,showTooltip:!1,label:(0,w.__)("Preview size"),value:i,min:0,max:n.length-1,withInputField:!1,onChange:(s=0)=>{e.onChangeView({...t,layout:{...t.layout,previewSize:n[s].value}})},step:1,marks:r})}const z_=[{type:kx,label:(0,w.__)("Table"),component:j_,icon:Lw,viewConfigOptions:function(){const e=(0,h.useContext)(Rw),t=e.view;return(0,a.jsxs)(b.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:(0,w.__)("Density"),value:t.layout?.density||"balanced",onChange:n=>{e.onChangeView({...t,layout:{...t.layout,density:n}})},isBlock:!0,children:[(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"comfortable",label:(0,w._x)("Comfortable","Density option for DataView layout")},"comfortable"),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"balanced",label:(0,w._x)("Balanced","Density option for DataView layout")},"balanced"),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"compact",label:(0,w._x)("Compact","Density option for DataView layout")},"compact")]})}},{type:Ex,label:(0,w.__)("Grid"),component:E_,icon:zw,viewConfigOptions:L_},{type:"list",label:(0,w.__)("List"),component:function e(t){const{actions:n,data:s,fields:i,getItemId:r,isLoading:o,onChangeSelection:l,selection:c,view:u,className:d,empty:p}=t,f=(0,y.useInstanceId)(e,"view-list"),m=s?.findLast((e=>c.includes(r(e)))),g=i.find((e=>e.id===u.titleField)),v=i.find((e=>e.id===u.mediaField)),x=i.find((e=>e.id===u.descriptionField)),_=(u?.fields??[]).map((e=>i.find((t=>e===t.id)))).filter(A_),j=e=>l([r(e)]),S=(0,h.useCallback)((e=>`${f}-${r(e)}`),[f,r]),C=(0,h.useCallback)(((e,t)=>t.startsWith(S(e))),[S]),[k,E]=(0,h.useState)(void 0);(0,h.useEffect)((()=>{m&&E(I_(S(m)))}),[m,S]);const P=s.findIndex((e=>C(e,k??""))),I=(0,y.usePrevious)(P),V=-1!==P,O=(0,h.useCallback)(((e,t)=>{const n=Math.min(s.length-1,Math.max(0,e));if(!s[n])return;const i=t(S(s[n]));E(i),document.getElementById(i)?.focus()}),[s,S]);(0,h.useEffect)((()=>{!V&&(void 0!==I&&-1!==I)&&O(I,I_)}),[V,O,I]);const T=(0,h.useCallback)((e=>{"ArrowDown"===e.key&&(e.preventDefault(),O(P+1,V_)),"ArrowUp"===e.key&&(e.preventDefault(),O(P-1,V_))}),[O,P]),A=s?.length;if(!A)return(0,a.jsx)("div",{className:Ht({"dataviews-loading":o,"dataviews-no-results":!A&&!o}),children:!A&&(o?(0,a.jsx)("p",{children:(0,a.jsx)(b.Spinner,{})}):p)});const N=u.groupByField?i.find((e=>e.id===u.groupByField)):null,F=N?b_(s,N):null;return A&&N&&F?(0,a.jsx)(b.Composite,{id:`${f}`,render:(0,a.jsx)("div",{}),className:"dataviews-view-list__group",role:"grid",activeId:k,setActiveId:E,children:(0,a.jsx)(b.__experimentalVStack,{spacing:4,className:Ht("dataviews-view-list",d),children:Array.from(F.entries()).map((([e,t])=>(0,a.jsxs)(b.__experimentalVStack,{spacing:2,children:[(0,a.jsx)("h3",{className:"dataviews-view-list__group-header",children:(0,w.sprintf)((0,w.__)("%1$s: %2$s"),N.label,e)}),t.map((e=>{const t=S(e);return(0,a.jsx)(T_,{view:u,idPrefix:t,actions:n,item:e,isSelected:e===m,onSelect:j,mediaField:v,titleField:g,descriptionField:x,otherFields:_,onDropdownTriggerKeyDown:T},t)}))]},e)))})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Composite,{id:f,render:(0,a.jsx)("div",{}),className:Ht("dataviews-view-list",d),role:u.infiniteScrollEnabled?"feed":"grid",activeId:k,setActiveId:E,children:s.map(((e,t)=>{const s=S(e);return(0,a.jsx)(T_,{view:u,idPrefix:s,actions:n,item:e,isSelected:e===m,onSelect:j,mediaField:v,titleField:g,descriptionField:x,otherFields:_,onDropdownTriggerKeyDown:T,posinset:u.infiniteScrollEnabled?t+1:void 0},s)}))}),A&&o&&(0,a.jsx)("p",{className:"dataviews-loading-more",children:(0,a.jsx)(b.Spinner,{})})]})},icon:(0,w.isRTL)()?Hw:Gw},{type:"pickerGrid",label:(0,w.__)("Grid"),component:D_,icon:zw,viewConfigOptions:L_,isPicker:!0}],{Menu:H_}=Zx(b.privateApis);function G_({filters:e,view:t,onChangeView:n,setOpenedFilter:s,triggerProps:i}){const r=e.filter((e=>!e.isVisible));return(0,a.jsxs)(H_,{children:[(0,a.jsx)(H_.TriggerButton,{...i}),(0,a.jsx)(H_.Popover,{children:r.map((e=>(0,a.jsx)(H_.Item,{onClick:()=>{s(e.field),n({...t,page:1,filters:[...t.filters||[],{field:e.field,value:void 0,operator:e.operators[0]}]})},children:(0,a.jsx)(H_.ItemLabel,{children:e.name})},e.field)))})]})}var W_=(0,h.forwardRef)((function({filters:e,view:t,onChangeView:n,setOpenedFilter:s},i){if(!e.length||e.every((({isPrimary:e})=>e)))return null;const r=e.filter((e=>!e.isVisible));return(0,a.jsx)(G_,{triggerProps:{render:(0,a.jsx)(b.Button,{accessibleWhenDisabled:!0,size:"compact",className:"dataviews-filters-button",variant:"tertiary",disabled:!r.length,ref:i}),children:(0,w.__)("Add filter")},filters:e,view:t,onChangeView:n,setOpenedFilter:s})}));function U_({buttonRef:e,filtersCount:t,children:n}){return(0,h.useEffect)((()=>()=>{e.current?.focus()}),[e]),(0,a.jsxs)(a.Fragment,{children:[n,!!t&&(0,a.jsx)("span",{className:"dataviews-filters-toggle__count",children:t})]})}var q_=function(){const{filters:e,view:t,onChangeView:n,setOpenedFilter:s,isShowingFilter:i,setIsShowingFilter:r}=(0,h.useContext)(Rw),o=(0,h.useRef)(null),l=(0,h.useCallback)((e=>{n(e),r(!0)}),[n,r]),c=!!e.filter((e=>e.isVisible)).length;if(0===e.length)return null;const u={label:(0,w.__)("Add filter"),"aria-expanded":!1,isPressed:!1},d={label:(0,w._x)("Filter","verb"),"aria-expanded":i,isPressed:i,onClick:()=>{i||s(null),r(!i)}},p=(0,a.jsx)(b.Button,{ref:o,className:"dataviews-filters__visibility-toggle",size:"compact",icon:u_,...c?d:u});return(0,a.jsx)("div",{className:"dataviews-filters__container-visibility-toggle",children:c?(0,a.jsx)(U_,{buttonRef:o,filtersCount:t.filters?.length,children:p}):(0,a.jsx)(G_,{filters:e,view:t,onChangeView:l,setOpenedFilter:s,triggerProps:{render:p}})})},Z_=Object.defineProperty,Y_=Object.defineProperties,K_=Object.getOwnPropertyDescriptors,X_=Object.getOwnPropertySymbols,Q_=Object.prototype.hasOwnProperty,J_=Object.prototype.propertyIsEnumerable,$_=(e,t,n)=>t in e?Z_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ej=(e,t)=>{for(var n in t||(t={}))Q_.call(t,n)&&$_(e,n,t[n]);if(X_)for(var n of X_(t))J_.call(t,n)&&$_(e,n,t[n]);return e},tj=(e,t)=>Y_(e,K_(t)),nj=(e,t)=>{var n={};for(var s in e)Q_.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&X_)for(var s of X_(e))t.indexOf(s)<0&&J_.call(e,s)&&(n[s]=e[s]);return n},sj=Object.defineProperty,ij=Object.defineProperties,rj=Object.getOwnPropertyDescriptors,aj=Object.getOwnPropertySymbols,oj=Object.prototype.hasOwnProperty,lj=Object.prototype.propertyIsEnumerable,cj=(e,t,n)=>t in e?sj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,uj=(e,t)=>{for(var n in t||(t={}))oj.call(t,n)&&cj(e,n,t[n]);if(aj)for(var n of aj(t))lj.call(t,n)&&cj(e,n,t[n]);return e},dj=(e,t)=>ij(e,rj(t)),hj=(e,t)=>{var n={};for(var s in e)oj.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&aj)for(var s of aj(e))t.indexOf(s)<0&&lj.call(e,s)&&(n[s]=e[s]);return n};function pj(...e){}function fj(e,t){return"function"==typeof Object.hasOwn?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t)}function mj(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}function gj(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function vj(e){return e}function yj(e,t){if(!e){if("string"!=typeof t)throw new Error("Invariant failed");throw new Error(t)}}function xj(e){return e.disabled||!0===e["aria-disabled"]||"true"===e["aria-disabled"]}function bj(e){const t={};for(const n in e)void 0!==e[n]&&(t[n]=e[n]);return t}function wj(...e){for(const t of e)if(void 0!==t)return t}function _j(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function jj(e){if(!function(e){return!!e&&!!(0,Gn.isValidElement)(e)&&("ref"in e.props||"ref"in e)}(e))return null;return ej({},e.props).ref||e.ref}var Sj,Cj="undefined"!=typeof window&&!!(null==(Sj=window.document)?void 0:Sj.createElement);function kj(e){return e?"self"in e?e.document:e.ownerDocument||document:document}function Ej(e,t=!1){const{activeElement:n}=kj(e);if(!(null==n?void 0:n.nodeName))return null;if("IFRAME"===n.tagName&&n.contentDocument)return Ej(n.contentDocument.body,t);if(t){const e=n.getAttribute("aria-activedescendant");if(e){const t=kj(n).getElementById(e);if(t)return t}}return n}function Pj(e,t){return e===t||e.contains(t)}function Ij(e){const t=e.tagName.toLowerCase();return"button"===t||!("input"!==t||!e.type)&&-1!==Vj.indexOf(e.type)}var Vj=["button","color","file","image","reset","submit"];function Oj(e){try{const t=e instanceof HTMLInputElement&&null!==e.selectionStart,n="TEXTAREA"===e.tagName;return t||n||!1}catch(e){return!1}}function Tj(e){return e.isContentEditable||Oj(e)}function Aj(e){let t=0,n=0;if(Oj(e))t=e.selectionStart||0,n=e.selectionEnd||0;else if(e.isContentEditable){const s=kj(e).getSelection();if((null==s?void 0:s.rangeCount)&&s.anchorNode&&Pj(e,s.anchorNode)&&s.focusNode&&Pj(e,s.focusNode)){const i=s.getRangeAt(0),r=i.cloneRange();r.selectNodeContents(e),r.setEnd(i.startContainer,i.startOffset),t=r.toString().length,r.setEnd(i.endContainer,i.endOffset),n=r.toString().length}}return{start:t,end:n}}function Nj(e,t){const n=null==e?void 0:e.getAttribute("role");return n&&-1!==["dialog","menu","listbox","tree","grid"].indexOf(n)?n:t}function Fj(e){if(!e)return null;const t=e=>"auto"===e||"scroll"===e;if(e.clientHeight&&e.scrollHeight>e.clientHeight){const{overflowY:n}=getComputedStyle(e);if(t(n))return e}else if(e.clientWidth&&e.scrollWidth>e.clientWidth){const{overflowX:n}=getComputedStyle(e);if(t(n))return e}return Fj(e.parentElement)||document.scrollingElement||document.body}function Mj(e,...t){/text|search|password|tel|url/i.test(e.type)&&e.setSelectionRange(...t)}function Bj(e,t){const n=e.map(((e,t)=>[t,e]));let s=!1;return n.sort((([e,n],[i,r])=>{const a=t(n),o=t(r);return a===o?0:a&&o?function(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}(a,o)?(e>i&&(s=!0),-1):(e<i&&(s=!0),1):0})),s?n.map((([e,t])=>t)):e}function Dj(){return Cj&&!!navigator.maxTouchPoints}function Rj(){return!!Cj&&/mac|iphone|ipad|ipod/i.test(navigator.platform)}function Lj(){return Cj&&Rj()&&/apple/i.test(navigator.vendor)}function zj(e){return Boolean(e.currentTarget&&!Pj(e.currentTarget,e.target))}function Hj(e){return e.target===e.currentTarget}function Gj(e,t){const n=new FocusEvent("blur",t),s=e.dispatchEvent(n),i=dj(uj({},t),{bubbles:!0});return e.dispatchEvent(new FocusEvent("focusout",i)),s}function Wj(e,t){const n=new MouseEvent("click",t);return e.dispatchEvent(n)}function Uj(e,t){const n=t||e.currentTarget,s=e.relatedTarget;return!s||!Pj(n,s)}function qj(e,t,n,s){const i=(e=>{if(s){const t=setTimeout(e,s);return()=>clearTimeout(t)}const t=requestAnimationFrame(e);return()=>cancelAnimationFrame(t)})((()=>{e.removeEventListener(t,r,!0),n()})),r=()=>{i(),n()};return e.addEventListener(t,r,{once:!0,capture:!0}),i}function Zj(e,t,n,s=window){const i=[];try{s.document.addEventListener(e,t,n);for(const r of Array.from(s.frames))i.push(Zj(e,t,n,r))}catch(e){}return()=>{try{s.document.removeEventListener(e,t,n)}catch(e){}for(const e of i)e()}}var Yj=ej({},Wn),Kj=Yj.useId,Xj=(Yj.useDeferredValue,Yj.useInsertionEffect),Qj=Cj?Gn.useLayoutEffect:Gn.useEffect;function Jj(e){const t=(0,Gn.useRef)((()=>{throw new Error("Cannot call an event handler while rendering.")}));return Xj?Xj((()=>{t.current=e})):t.current=e,(0,Gn.useCallback)(((...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function $j(...e){return(0,Gn.useMemo)((()=>{if(e.some(Boolean))return t=>{for(const n of e)_j(n,t)}}),e)}function eS(e){if(Kj){const t=Kj();return e||t}const[t,n]=(0,Gn.useState)(e);return Qj((()=>{if(e||t)return;const s=Math.random().toString(36).slice(2,8);n(`id-${s}`)}),[e,t]),e||t}function tS(e,t,n){const s=function(e){const[t]=(0,Gn.useState)(e);return t}(n),[i,r]=(0,Gn.useState)(s);return(0,Gn.useEffect)((()=>{const n=e&&"current"in e?e.current:e;if(!n)return;const i=()=>{const e=n.getAttribute(t);r(null==e?s:e)},a=new MutationObserver(i);return a.observe(n,{attributeFilter:[t]}),i(),()=>a.disconnect()}),[e,t,s]),i}function nS(e,t){const n=(0,Gn.useRef)(!1);(0,Gn.useEffect)((()=>{if(n.current)return e();n.current=!0}),t),(0,Gn.useEffect)((()=>()=>{n.current=!1}),[])}function sS(e){return Jj("function"==typeof e?e:()=>e)}function iS(e,t,n=[]){const s=(0,Gn.useCallback)((n=>(e.wrapElement&&(n=e.wrapElement(n)),t(n))),[...n,e.wrapElement]);return tj(ej({},e),{wrapElement:s})}var rS=!1,aS=0,oS=0;function lS(e){(function(e){const t=e.movementX||e.screenX-aS,n=e.movementY||e.screenY-oS;return aS=e.screenX,oS=e.screenY,t||n||!1})(e)&&(rS=!0)}function cS(){rS=!1}function uS(e){const t=Gn.forwardRef(((t,n)=>e(tj(ej({},t),{ref:n}))));return t.displayName=e.displayName||e.name,t}function dS(e,t){return Gn.memo(e,t)}function hS(e,t){const n=t,{wrapElement:s,render:i}=n,r=nj(n,["wrapElement","render"]),o=$j(t.ref,jj(i));let l;if(Gn.isValidElement(i)){const e=tj(ej({},i.props),{ref:o});l=Gn.cloneElement(i,function(e,t){const n=ej({},e);for(const s in t){if(!fj(t,s))continue;if("className"===s){const s="className";n[s]=e[s]?`${e[s]} ${t[s]}`:t[s];continue}if("style"===s){const s="style";n[s]=e[s]?ej(ej({},e[s]),t[s]):t[s];continue}const i=t[s];if("function"==typeof i&&s.startsWith("on")){const t=e[s];if("function"==typeof t){n[s]=(...e)=>{i(...e),t(...e)};continue}}n[s]=i}return n}(r,e))}else l=i?i(r):(0,a.jsx)(e,ej({},r));return s?s(l):l}function pS(e){const t=(t={})=>e(t);return t.displayName=e.name,t}function fS(e=[],t=[]){const n=Gn.createContext(void 0),s=Gn.createContext(void 0),i=()=>Gn.useContext(n),r=t=>e.reduceRight(((e,n)=>(0,a.jsx)(n,tj(ej({},t),{children:e}))),(0,a.jsx)(n.Provider,ej({},t)));return{context:n,scopedContext:s,useContext:i,useScopedContext:(e=!1)=>{const t=Gn.useContext(s),n=i();return e?t:t||n},useProviderContext:()=>{const e=Gn.useContext(s),t=i();if(!e||e!==t)return t},ContextProvider:r,ScopedContextProvider:e=>(0,a.jsx)(r,tj(ej({},e),{children:t.reduceRight(((t,n)=>(0,a.jsx)(n,tj(ej({},e),{children:t}))),(0,a.jsx)(s.Provider,ej({},e)))}))}}var mS=fS(),gS=mS.useContext,vS=(mS.useScopedContext,mS.useProviderContext,fS([mS.ContextProvider],[mS.ScopedContextProvider])),yS=vS.useContext,xS=(vS.useScopedContext,vS.useProviderContext),bS=vS.ContextProvider,wS=vS.ScopedContextProvider,_S=(0,Gn.createContext)(void 0),jS=(0,Gn.createContext)(void 0),SS=((0,Gn.createContext)(null),(0,Gn.createContext)(null),fS([bS],[wS])),CS=SS.useContext;SS.useScopedContext,SS.useProviderContext,SS.ContextProvider,SS.ScopedContextProvider;function kS(e,t){const n=e.__unstableInternals;return yj(n,"Invalid store"),n[t]}function ES(e,...t){let n=e,s=n,i=Symbol(),r=pj;const a=new Set,o=new Set,l=new Set,c=new Set,u=new Set,d=new WeakMap,h=new WeakMap,p=(e,t,n=c)=>(n.add(t),h.set(t,e),()=>{var e;null==(e=d.get(t))||e(),d.delete(t),h.delete(t),n.delete(t)}),f=(e,r,a=!1)=>{var l;if(!fj(n,e))return;const p=function(e,t){if(function(e){return"function"==typeof e}(e))return e(function(e){return"function"==typeof e}(t)?t():t);return e}(r,n[e]);if(p===n[e])return;if(!a)for(const n of t)null==(l=null==n?void 0:n.setState)||l.call(n,e,p);const f=n;n=dj(uj({},n),{[e]:p});const m=Symbol();i=m,o.add(e);const g=(t,s,i)=>{var r;const a=h.get(t);a&&!a.some((t=>i?i.has(t):t===e))||(null==(r=d.get(t))||r(),d.set(t,t(n,s)))};for(const e of c)g(e,f);queueMicrotask((()=>{if(i!==m)return;const e=n;for(const e of u)g(e,s,o);s=e,o.clear()}))},m={getState:()=>n,setState:f,__unstableInternals:{setup:e=>(l.add(e),()=>l.delete(e)),init:()=>{const e=a.size,s=Symbol();a.add(s);const i=()=>{a.delete(s),a.size||r()};if(e)return i;const o=(c=n,Object.keys(c)).map((e=>mj(...t.map((t=>{var n;const s=null==(n=null==t?void 0:t.getState)?void 0:n.call(t);if(s&&fj(s,e))return OS(t,[e],(t=>{f(e,t[e],!0)}))})))));var c;const u=[];for(const e of l)u.push(e());const d=t.map(IS);return r=mj(...o,...u,...d),i},subscribe:(e,t)=>p(e,t),sync:(e,t)=>(d.set(t,t(n,n)),p(e,t)),batch:(e,t)=>(d.set(t,t(n,s)),p(e,t,u)),pick:e=>ES(function(e,t){const n={};for(const s of t)fj(e,s)&&(n[s]=e[s]);return n}(n,e),m),omit:e=>ES(function(e,t){const n=uj({},e);for(const e of t)fj(n,e)&&delete n[e];return n}(n,e),m)}};return m}function PS(e,...t){if(e)return kS(e,"setup")(...t)}function IS(e,...t){if(e)return kS(e,"init")(...t)}function VS(e,...t){if(e)return kS(e,"subscribe")(...t)}function OS(e,...t){if(e)return kS(e,"sync")(...t)}function TS(e,...t){if(e)return kS(e,"batch")(...t)}function AS(e,...t){if(e)return kS(e,"omit")(...t)}function NS(...e){const t=e.reduce(((e,t)=>{var n;const s=null==(n=null==t?void 0:t.getState)?void 0:n.call(t);return s?Object.assign(e,s):e}),{}),n=ES(t,...e);return Object.assign({},...e,n)}var FS=i(422),{useSyncExternalStore:MS}=FS;function BS(e,t=vj){const n=Gn.useCallback((t=>e?VS(e,null,t):()=>{}),[e]),s=()=>{const n="string"==typeof t?t:null,s="function"==typeof t?t:null,i=null==e?void 0:e.getState();return s?s(i):i&&n&&fj(i,n)?i[n]:void 0};return MS(n,s,s)}function DS(e,t){const n=Gn.useRef({}),s=Gn.useCallback((t=>e?VS(e,null,t):()=>{}),[e]),i=()=>{const s=null==e?void 0:e.getState();let i=!1;const r=n.current;for(const e in t){const n=t[e];if("function"==typeof n){const t=n(s);t!==r[e]&&(r[e]=t,i=!0)}if("string"==typeof n){if(!s)continue;if(!fj(s,n))continue;const t=s[n];t!==r[e]&&(r[e]=t,i=!0)}}return i&&(n.current=ej({},r)),n.current};return MS(s,i,i)}function RS(e,t,n,s){const i=fj(t,n)?t[n]:void 0,r=s?t[s]:void 0,a=function(e){const t=(0,Gn.useRef)(e);return Qj((()=>{t.current=e})),t}({value:i,setValue:r});Qj((()=>OS(e,[n],((e,t)=>{const{value:s,setValue:i}=a.current;i&&e[n]!==t[n]&&e[n]!==s&&i(e[n])}))),[e,n]),Qj((()=>{if(void 0!==i)return e.setState(n,i),TS(e,[n],(()=>{void 0!==i&&e.setState(n,i)}))}))}function LS(e,t,n){return nS(t,[n.store]),RS(e,n,"items","setItems"),e}function zS(e){const t=eS(e.id);return ej({id:t},e)}function HS(e,t,n){return RS(e=LS(e,t,n),n,"activeId","setActiveId"),RS(e,n,"includesBaseElement"),RS(e,n,"virtualFocus"),RS(e,n,"orientation"),RS(e,n,"rtl"),RS(e,n,"focusLoop"),RS(e,n,"focusWrap"),RS(e,n,"focusShift"),e}function GS(e,t,n){return nS(t,[n.store,n.disclosure]),RS(e,n,"open","setOpen"),RS(e,n,"mounted","setMounted"),RS(e,n,"animated"),Object.assign(e,{disclosure:n.disclosure})}function WS(e,t,n){return GS(e,t,n)}function US(e,t,n){return nS(t,[n.popover]),RS(e,n,"placement"),WS(e,t,n)}function qS(e={}){var t;e.store;const n=null==(t=e.store)?void 0:t.getState(),s=wj(e.items,null==n?void 0:n.items,e.defaultItems,[]),i=new Map(s.map((e=>[e.id,e]))),r={items:s,renderedItems:wj(null==n?void 0:n.renderedItems,[])},a=function(e){return null==e?void 0:e.__unstablePrivateStore}(e.store),o=ES({items:s,renderedItems:r.renderedItems},a),l=ES(r,e.store),c=e=>{const t=Bj(e,(e=>e.element));o.setState("renderedItems",t),l.setState("renderedItems",t)};PS(l,(()=>IS(o))),PS(o,(()=>TS(o,["items"],(e=>{l.setState("items",e.items)})))),PS(o,(()=>TS(o,["renderedItems"],(e=>{let t=!0,n=requestAnimationFrame((()=>{const{renderedItems:t}=l.getState();e.renderedItems!==t&&c(e.renderedItems)}));if("function"!=typeof IntersectionObserver)return()=>cancelAnimationFrame(n);const s=function(e){var t;const n=e.find((e=>!!e.element)),s=[...e].reverse().find((e=>!!e.element));let i=null==(t=null==n?void 0:n.element)?void 0:t.parentElement;for(;i&&(null==s?void 0:s.element);){if(s&&i.contains(s.element))return i;i=i.parentElement}return kj(i).body}(e.renderedItems),i=new IntersectionObserver((()=>{t?t=!1:(cancelAnimationFrame(n),n=requestAnimationFrame((()=>c(e.renderedItems))))}),{root:s});for(const t of e.renderedItems)t.element&&i.observe(t.element);return()=>{cancelAnimationFrame(n),i.disconnect()}}))));const u=(e,t,n=!1)=>{let s;t((t=>{const n=t.findIndex((({id:t})=>t===e.id)),r=t.slice();if(-1!==n){s=t[n];const a=uj(uj({},s),e);r[n]=a,i.set(e.id,a)}else r.push(e),i.set(e.id,e);return r}));return()=>{t((t=>{if(!s)return n&&i.delete(e.id),t.filter((({id:t})=>t!==e.id));const r=t.findIndex((({id:t})=>t===e.id));if(-1===r)return t;const a=t.slice();return a[r]=s,i.set(e.id,s),a}))}},d=e=>u(e,(e=>o.setState("items",e)),!0);return dj(uj({},l),{registerItem:d,renderItem:e=>mj(d(e),u(e,(e=>o.setState("renderedItems",e)))),item:e=>{if(!e)return null;let t=i.get(e);if(!t){const{items:n}=o.getState();t=n.find((t=>t.id===e)),t&&i.set(e,t)}return t||null},__unstablePrivateStore:o})}function ZS(e){const t=[];for(const n of e)t.push(...n);return t}function YS(e){return e.slice().reverse()}var KS={id:null};function XS(e,t){return e.find((e=>t?!e.disabled&&e.id!==t:!e.disabled))}function QS(e,t){return e.filter((e=>e.rowId===t))}function JS(e){const t=[];for(const n of e){const e=t.find((e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===n.rowId}));e?e.push(n):t.push([n])}return t}function $S(e){let t=0;for(const{length:n}of e)n>t&&(t=n);return t}function eC(e={}){var t;const n=null==(t=e.store)?void 0:t.getState(),s=qS(e),i=wj(e.activeId,null==n?void 0:n.activeId,e.defaultActiveId),r=ES(dj(uj({},s.getState()),{id:wj(e.id,null==n?void 0:n.id,`id-${Math.random().toString(36).slice(2,8)}`),activeId:i,baseElement:wj(null==n?void 0:n.baseElement,null),includesBaseElement:wj(e.includesBaseElement,null==n?void 0:n.includesBaseElement,null===i),moves:wj(null==n?void 0:n.moves,0),orientation:wj(e.orientation,null==n?void 0:n.orientation,"both"),rtl:wj(e.rtl,null==n?void 0:n.rtl,!1),virtualFocus:wj(e.virtualFocus,null==n?void 0:n.virtualFocus,!1),focusLoop:wj(e.focusLoop,null==n?void 0:n.focusLoop,!1),focusWrap:wj(e.focusWrap,null==n?void 0:n.focusWrap,!1),focusShift:wj(e.focusShift,null==n?void 0:n.focusShift,!1)}),s,e.store);PS(r,(()=>OS(r,["renderedItems","activeId"],(e=>{r.setState("activeId",(t=>{var n;return void 0!==t?t:null==(n=XS(e.renderedItems))?void 0:n.id}))}))));const a=(e="next",t={})=>{var n,s;const i=r.getState(),{skip:a=0,activeId:o=i.activeId,focusShift:l=i.focusShift,focusLoop:c=i.focusLoop,focusWrap:u=i.focusWrap,includesBaseElement:d=i.includesBaseElement,renderedItems:h=i.renderedItems,rtl:p=i.rtl}=t,f="up"===e||"down"===e,m="next"===e||"down"===e,g=m?p&&!f:!p||f,v=l&&!a;let y=f?ZS(function(e,t,n){const s=$S(e);for(const i of e)for(let e=0;e<s;e+=1){const s=i[e];if(!s||n&&s.disabled){const s=0===e&&n?XS(i):i[e-1];i[e]=s&&t!==s.id&&n?s:{id:"__EMPTY_ITEM__",disabled:!0,rowId:null==s?void 0:s.rowId}}}return e}(JS(h),o,v)):h;if(y=g?YS(y):y,y=f?function(e){const t=JS(e),n=$S(t),s=[];for(let e=0;e<n;e+=1)for(const n of t){const t=n[e];t&&s.push(dj(uj({},t),{rowId:t.rowId?`${e}`:void 0}))}return s}(y):y,null==o)return null==(n=XS(y))?void 0:n.id;const x=y.find((e=>e.id===o));if(!x)return null==(s=XS(y))?void 0:s.id;const b=y.some((e=>e.rowId)),w=y.indexOf(x),_=y.slice(w+1),j=QS(_,x.rowId);if(a){const e=function(e,t){return e.filter((e=>t?!e.disabled&&e.id!==t:!e.disabled))}(j,o),t=e.slice(a)[0]||e[e.length-1];return null==t?void 0:t.id}const S=c&&(f?"horizontal"!==c:"vertical"!==c),C=b&&u&&(f?"horizontal"!==u:"vertical"!==u),k=m?(!b||f)&&S&&d:!!f&&d;if(S){const e=function(e,t,n=!1){const s=e.findIndex((e=>e.id===t));return[...e.slice(s+1),...n?[KS]:[],...e.slice(0,s)]}(C&&!k?y:QS(y,x.rowId),o,k),t=XS(e,o);return null==t?void 0:t.id}if(C){const e=XS(k?j:_,o);return k?(null==e?void 0:e.id)||null:null==e?void 0:e.id}const E=XS(j,o);return!E&&k?null:null==E?void 0:E.id};return dj(uj(uj({},s),r),{setBaseElement:e=>r.setState("baseElement",e),setActiveId:e=>r.setState("activeId",e),move:e=>{void 0!==e&&(r.setState("activeId",e),r.setState("moves",(e=>e+1)))},first:()=>{var e;return null==(e=XS(r.getState().renderedItems))?void 0:e.id},last:()=>{var e;return null==(e=XS(YS(r.getState().renderedItems)))?void 0:e.id},next:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),a("next",e)),previous:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),a("previous",e)),down:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),a("down",e)),up:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),a("up",e))})}function tC(e={}){return function(e={}){const t=NS(e.store,AS(e.disclosure,["contentElement","disclosureElement"])),n=null==t?void 0:t.getState(),s=wj(e.open,null==n?void 0:n.open,e.defaultOpen,!1),i=wj(e.animated,null==n?void 0:n.animated,!1),r=ES({open:s,animated:i,animating:!!i&&s,mounted:s,contentElement:wj(null==n?void 0:n.contentElement,null),disclosureElement:wj(null==n?void 0:n.disclosureElement,null)},t);return PS(r,(()=>OS(r,["animated","animating"],(e=>{e.animated||r.setState("animating",!1)})))),PS(r,(()=>VS(r,["open"],(()=>{r.getState().animated&&r.setState("animating",!0)})))),PS(r,(()=>OS(r,["open","animating"],(e=>{r.setState("mounted",e.open||e.animating)})))),dj(uj({},r),{disclosure:e.disclosure,setOpen:e=>r.setState("open",e),show:()=>r.setState("open",!0),hide:()=>r.setState("open",!1),toggle:()=>r.setState("open",(e=>!e)),stopAnimation:()=>r.setState("animating",!1),setContentElement:e=>r.setState("contentElement",e),setDisclosureElement:e=>r.setState("disclosureElement",e)})}(e)}var nC=Lj()&&Dj();function sC(e={}){var t=e,{tag:n}=t,s=hj(t,["tag"]);const i=NS(s.store,function(e,...t){if(e)return kS(e,"pick")(...t)}(n,["value","rtl"])),r=null==n?void 0:n.getState(),a=null==i?void 0:i.getState(),o=wj(s.activeId,null==a?void 0:a.activeId,s.defaultActiveId,null),l=eC(dj(uj({},s),{activeId:o,includesBaseElement:wj(s.includesBaseElement,null==a?void 0:a.includesBaseElement,!0),orientation:wj(s.orientation,null==a?void 0:a.orientation,"vertical"),focusLoop:wj(s.focusLoop,null==a?void 0:a.focusLoop,!0),focusWrap:wj(s.focusWrap,null==a?void 0:a.focusWrap,!0),virtualFocus:wj(s.virtualFocus,null==a?void 0:a.virtualFocus,!0)})),c=function(e={}){var t=e,{popover:n}=t,s=hj(t,["popover"]);const i=NS(s.store,AS(n,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"])),r=null==i?void 0:i.getState(),a=tC(dj(uj({},s),{store:i})),o=wj(s.placement,null==r?void 0:r.placement,"bottom"),l=ES(dj(uj({},a.getState()),{placement:o,currentPlacement:o,anchorElement:wj(null==r?void 0:r.anchorElement,null),popoverElement:wj(null==r?void 0:r.popoverElement,null),arrowElement:wj(null==r?void 0:r.arrowElement,null),rendered:Symbol("rendered")}),a,i);return dj(uj(uj({},a),l),{setAnchorElement:e=>l.setState("anchorElement",e),setPopoverElement:e=>l.setState("popoverElement",e),setArrowElement:e=>l.setState("arrowElement",e),render:()=>l.setState("rendered",Symbol("rendered"))})}(dj(uj({},s),{placement:wj(s.placement,null==a?void 0:a.placement,"bottom-start")})),u=wj(s.value,null==a?void 0:a.value,s.defaultValue,""),d=wj(s.selectedValue,null==a?void 0:a.selectedValue,null==r?void 0:r.values,s.defaultSelectedValue,""),h=Array.isArray(d),p=dj(uj(uj({},l.getState()),c.getState()),{value:u,selectedValue:d,resetValueOnSelect:wj(s.resetValueOnSelect,null==a?void 0:a.resetValueOnSelect,h),resetValueOnHide:wj(s.resetValueOnHide,null==a?void 0:a.resetValueOnHide,h&&!n),activeValue:null==a?void 0:a.activeValue}),f=ES(p,l,c,i);return nC&&PS(f,(()=>OS(f,["virtualFocus"],(()=>{f.setState("virtualFocus",!1)})))),PS(f,(()=>{if(n)return mj(OS(f,["selectedValue"],(e=>{Array.isArray(e.selectedValue)&&n.setValues(e.selectedValue)})),OS(n,["values"],(e=>{f.setState("selectedValue",e.values)})))})),PS(f,(()=>OS(f,["resetValueOnHide","mounted"],(e=>{e.resetValueOnHide&&(e.mounted||f.setState("value",u))})))),PS(f,(()=>OS(f,["open"],(e=>{e.open||(f.setState("activeId",o),f.setState("moves",0))})))),PS(f,(()=>OS(f,["moves","activeId"],((e,t)=>{e.moves===t.moves&&f.setState("activeValue",void 0)})))),PS(f,(()=>TS(f,["moves","renderedItems"],((e,t)=>{if(e.moves===t.moves)return;const{activeId:n}=f.getState(),s=l.item(n);f.setState("activeValue",null==s?void 0:s.value)})))),dj(uj(uj(uj({},c),l),f),{tag:n,setValue:e=>f.setState("value",e),resetValue:()=>f.setState("value",p.value),setSelectedValue:e=>f.setState("selectedValue",e)})}function iC(e={}){e=function(e){const t=CS();return zS(e=tj(ej({},e),{tag:void 0!==e.tag?e.tag:t}))}(e);const[t,n]=function(e,t){const[n,s]=Gn.useState((()=>e(t)));Qj((()=>IS(n)),[n]);const i=Gn.useCallback((e=>BS(n,e)),[n]);return[Gn.useMemo((()=>tj(ej({},n),{useState:i})),[n,i]),Jj((()=>{s((n=>e(ej(ej({},t),n.getState()))))}))]}(sC,e);return function(e,t,n){return nS(t,[n.tag]),RS(e,n,"value","setValue"),RS(e,n,"selectedValue","setSelectedValue"),RS(e,n,"resetValueOnHide"),RS(e,n,"resetValueOnSelect"),Object.assign(HS(US(e,t,n),t,n),{tag:n.tag})}(t,n,e)}var rC=fS(),aC=(rC.useContext,rC.useScopedContext,rC.useProviderContext),oC=fS([rC.ContextProvider],[rC.ScopedContextProvider]),lC=(oC.useContext,oC.useScopedContext,oC.useProviderContext,oC.ContextProvider),cC=oC.ScopedContextProvider,uC=((0,Gn.createContext)(void 0),(0,Gn.createContext)(void 0),fS([lC],[cC])),dC=(uC.useContext,uC.useScopedContext,uC.useProviderContext),hC=uC.ContextProvider,pC=uC.ScopedContextProvider,fC=(0,Gn.createContext)(void 0),mC=fS([hC,bS],[pC,wS]),gC=mC.useContext,vC=mC.useScopedContext,yC=mC.useProviderContext,xC=mC.ContextProvider,bC=mC.ScopedContextProvider,wC=(0,Gn.createContext)(void 0),_C=(0,Gn.createContext)(!1);function jC(e={}){const t=iC(e);return(0,a.jsx)(xC,{value:t,children:e.children})}var SC=pS((function(e){var t=e,{store:n}=t,s=nj(t,["store"]);const i=yC();yj(n=n||i,!1);const r=n.useState((e=>{var t;return null==(t=e.baseElement)?void 0:t.id}));return bj(s=ej({htmlFor:r},s))})),CC=dS(uS((function(e){return hS("label",SC(e))}))),kC=pS((function(e){var t=e,{store:n}=t,s=nj(t,["store"]);const i=dC();return n=n||i,s=tj(ej({},s),{ref:$j(null==n?void 0:n.setAnchorElement,s.ref)})}));uS((function(e){return hS("div",kC(e))}));function EC(e,t){return t&&e.item(t)||null}var PC=Symbol("FOCUS_SILENTLY");function IC(e,t,n){if(!t)return!1;if(t===n)return!1;const s=e.item(t.id);return!!s&&(!n||s.element!==n)}var VC=(0,Gn.createContext)(!0),OC="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function TC(e){return!!e.matches(OC)&&(!!function(e){if("function"==typeof e.checkVisibility)return e.checkVisibility();const t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}(e)&&!e.closest("[inert]"))}function AC(e){const t=Ej(e);if(!t)return!1;if(t===e)return!0;const n=t.getAttribute("aria-activedescendant");return!!n&&n===e.id}function NC(e){const t=Ej(e);if(!t)return!1;if(Pj(e,t))return!0;const n=t.getAttribute("aria-activedescendant");return!!n&&("id"in e&&(n===e.id||!!e.querySelector(`#${CSS.escape(n)}`)))}var FC=Lj(),MC=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"],BC=Symbol("safariFocusAncestor");function DC(e,t){e&&(e[BC]=t)}function RC(e){return!("input"!==e.tagName.toLowerCase()||!e.type)&&("radio"===e.type||"checkbox"===e.type)}function LC(e,t,n,s,i){return e?t?n&&!s?-1:void 0:n?i:i||0:i}function zC(e,t){return Jj((n=>{null==e||e(n),n.defaultPrevented||t&&(n.stopPropagation(),n.preventDefault())}))}var HC=!0;function GC(e){const t=e.target;t&&"hasAttribute"in t&&(t.hasAttribute("data-focus-visible")||(HC=!1))}function WC(e){e.metaKey||e.ctrlKey||e.altKey||(HC=!0)}var UC=pS((function(e){var t=e,{focusable:n=!0,accessibleWhenDisabled:s,autoFocus:i,onFocusVisible:r}=t,a=nj(t,["focusable","accessibleWhenDisabled","autoFocus","onFocusVisible"]);const o=(0,Gn.useRef)(null);(0,Gn.useEffect)((()=>{n&&(Zj("mousedown",GC,!0),Zj("keydown",WC,!0))}),[n]),FC&&(0,Gn.useEffect)((()=>{if(!n)return;const e=o.current;if(!e)return;if(!RC(e))return;const t=function(e){return"labels"in e?e.labels:null}(e);if(!t)return;const s=()=>queueMicrotask((()=>e.focus()));for(const e of t)e.addEventListener("mouseup",s);return()=>{for(const e of t)e.removeEventListener("mouseup",s)}}),[n]);const l=n&&xj(a),c=!!l&&!s,[u,d]=(0,Gn.useState)(!1);(0,Gn.useEffect)((()=>{n&&c&&u&&d(!1)}),[n,c,u]),(0,Gn.useEffect)((()=>{if(!n)return;if(!u)return;const e=o.current;if(!e)return;if("undefined"==typeof IntersectionObserver)return;const t=new IntersectionObserver((()=>{TC(e)||d(!1)}));return t.observe(e),()=>t.disconnect()}),[n,u]);const h=zC(a.onKeyPressCapture,l),p=zC(a.onMouseDownCapture,l),f=zC(a.onClickCapture,l),m=a.onMouseDown,g=Jj((e=>{if(null==m||m(e),e.defaultPrevented)return;if(!n)return;const t=e.currentTarget;if(!FC)return;if(zj(e))return;if(!Ij(t)&&!RC(t))return;let s=!1;const i=()=>{s=!0};t.addEventListener("focusin",i,{capture:!0,once:!0});const r=function(e){for(;e&&!TC(e);)e=e.closest(OC);return e||null}(t.parentElement);DC(r,!0),qj(t,"mouseup",(()=>{t.removeEventListener("focusin",i,!0),DC(r,!1),s||function(e){!NC(e)&&TC(e)&&e.focus()}(t)}))})),v=(e,t)=>{if(t&&(e.currentTarget=t),!n)return;const s=e.currentTarget;s&&AC(s)&&(null==r||r(e),e.defaultPrevented||(s.dataset.focusVisible="true",d(!0)))},y=a.onKeyDownCapture,x=Jj((e=>{if(null==y||y(e),e.defaultPrevented)return;if(!n)return;if(u)return;if(e.metaKey)return;if(e.altKey)return;if(e.ctrlKey)return;if(!Hj(e))return;const t=e.currentTarget;qj(t,"focusout",(()=>v(e,t)))})),b=a.onFocusCapture,w=Jj((e=>{if(null==b||b(e),e.defaultPrevented)return;if(!n)return;if(!Hj(e))return void d(!1);const t=e.currentTarget,s=()=>v(e,t);HC||function(e){const{tagName:t,readOnly:n,type:s}=e;return"TEXTAREA"===t&&!n||("SELECT"===t&&!n||("INPUT"!==t||n?!!e.isContentEditable||!("combobox"!==e.getAttribute("role")||!e.dataset.name):MC.includes(s)))}(e.target)?qj(e.target,"focusout",s):d(!1)})),_=a.onBlur,j=Jj((e=>{null==_||_(e),n&&Uj(e)&&d(!1)})),S=(0,Gn.useContext)(VC),C=Jj((e=>{n&&i&&e&&S&&queueMicrotask((()=>{AC(e)||TC(e)&&e.focus()}))})),k=function(e,t){const n=e=>{if("string"==typeof e)return e},[s,i]=(0,Gn.useState)((()=>n(t)));return Qj((()=>{const s=e&&"current"in e?e.current:e;i((null==s?void 0:s.tagName.toLowerCase())||n(t))}),[e,t]),s}(o),E=n&&function(e){return!e||"button"===e||"summary"===e||"input"===e||"select"===e||"textarea"===e||"a"===e}(k),P=n&&function(e){return!e||"button"===e||"input"===e||"select"===e||"textarea"===e}(k),I=a.style,V=(0,Gn.useMemo)((()=>c?ej({pointerEvents:"none"},I):I),[c,I]);return bj(a=tj(ej({"data-focus-visible":n&&u||void 0,"data-autofocus":i||void 0,"aria-disabled":l||void 0},a),{ref:$j(o,C,a.ref),style:V,tabIndex:LC(n,c,E,P,a.tabIndex),disabled:!(!P||!c)||void 0,contentEditable:l?void 0:a.contentEditable,onKeyPressCapture:h,onClickCapture:f,onMouseDownCapture:p,onMouseDown:g,onKeyDownCapture:x,onFocusCapture:w,onBlur:j}))}));uS((function(e){return hS("div",UC(e))}));function qC(e,t,n){return Jj((s=>{var i;if(null==t||t(s),s.defaultPrevented)return;if(s.isPropagationStopped())return;if(!Hj(s))return;if(function(e){return"Shift"===e.key||"Control"===e.key||"Alt"===e.key||"Meta"===e.key}(s))return;if(function(e){const t=e.target;return!(t&&!Oj(t)||1!==e.key.length||e.ctrlKey||e.metaKey)}(s))return;const r=e.getState(),a=null==(i=EC(e,r.activeId))?void 0:i.element;if(!a)return;const o=s,{view:l}=o,c=nj(o,["view"]);a!==(null==n?void 0:n.current)&&a.focus(),function(e,t,n){const s=new KeyboardEvent(t,n);return e.dispatchEvent(s)}(a,s.type,c)||s.preventDefault(),s.currentTarget.contains(a)&&s.stopPropagation()}))}var ZC=pS((function(e){var t=e,{store:n,composite:s=!0,focusOnMove:i=s,moveOnKeyPress:r=!0}=t,o=nj(t,["store","composite","focusOnMove","moveOnKeyPress"]);const l=xS();yj(n=n||l,!1);const c=(0,Gn.useRef)(null),u=(0,Gn.useRef)(null),d=function(e){const[t,n]=(0,Gn.useState)(!1),s=(0,Gn.useCallback)((()=>n(!0)),[]),i=e.useState((t=>EC(e,t.activeId)));return(0,Gn.useEffect)((()=>{const e=null==i?void 0:i.element;t&&e&&(n(!1),e.focus({preventScroll:!0}))}),[i,t]),s}(n),h=n.useState("moves"),[,p]=function(e){const[t,n]=(0,Gn.useState)(null);return Qj((()=>{if(null==t)return;if(!e)return;let n=null;return e((e=>(n=e,t))),()=>{e(n)}}),[t,e]),[t,n]}(s?n.setBaseElement:null);(0,Gn.useEffect)((()=>{var e;if(!n)return;if(!h)return;if(!s)return;if(!i)return;const{activeId:t}=n.getState(),r=null==(e=EC(n,t))?void 0:e.element;var a,o;r&&("scrollIntoView"in(a=r)?(a.focus({preventScroll:!0}),a.scrollIntoView(uj({block:"nearest",inline:"nearest"},o))):a.focus())}),[n,h,s,i]),Qj((()=>{if(!n)return;if(!h)return;if(!s)return;const{baseElement:e,activeId:t}=n.getState();if(!(null===t))return;if(!e)return;const i=u.current;u.current=null,i&&Gj(i,{relatedTarget:e}),AC(e)||e.focus()}),[n,h,s]);const f=n.useState("activeId"),m=n.useState("virtualFocus");Qj((()=>{var e;if(!n)return;if(!s)return;if(!m)return;const t=u.current;if(u.current=null,!t)return;const i=(null==(e=EC(n,f))?void 0:e.element)||Ej(t);i!==t&&Gj(t,{relatedTarget:i})}),[n,f,m,s]);const g=qC(n,o.onKeyDownCapture,u),v=qC(n,o.onKeyUpCapture,u),y=o.onFocusCapture,x=Jj((e=>{if(null==y||y(e),e.defaultPrevented)return;if(!n)return;const{virtualFocus:t}=n.getState();if(!t)return;const s=e.relatedTarget,i=function(e){const t=e[PC];return delete e[PC],t}(e.currentTarget);Hj(e)&&i&&(e.stopPropagation(),u.current=s)})),b=o.onFocus,w=Jj((e=>{if(null==b||b(e),e.defaultPrevented)return;if(!s)return;if(!n)return;const{relatedTarget:t}=e,{virtualFocus:i}=n.getState();i?Hj(e)&&!IC(n,t)&&queueMicrotask(d):Hj(e)&&n.setActiveId(null)})),_=o.onBlurCapture,j=Jj((e=>{var t;if(null==_||_(e),e.defaultPrevented)return;if(!n)return;const{virtualFocus:s,activeId:i}=n.getState();if(!s)return;const r=null==(t=EC(n,i))?void 0:t.element,a=e.relatedTarget,o=IC(n,a),l=u.current;if(u.current=null,Hj(e)&&o)a===r?l&&l!==a&&Gj(l,e):r?Gj(r,e):l&&Gj(l,e),e.stopPropagation();else{!IC(n,e.target)&&r&&Gj(r,e)}})),S=o.onKeyDown,C=sS(r),k=Jj((e=>{var t;if(null==S||S(e),e.defaultPrevented)return;if(!n)return;if(!Hj(e))return;const{orientation:s,renderedItems:i,activeId:r}=n.getState(),a=EC(n,r);if(null==(t=null==a?void 0:a.element)?void 0:t.isConnected)return;const o="horizontal"!==s,l="vertical"!==s,c=i.some((e=>!!e.rowId));if(("ArrowLeft"===e.key||"ArrowRight"===e.key||"Home"===e.key||"End"===e.key)&&Oj(e.currentTarget))return;const u={ArrowUp:(c||o)&&(()=>{if(c){const e=function(e){return function(e,t){return e.find((e=>t?!e.disabled&&e.id!==t:!e.disabled))}(ZS(YS(function(e){const t=[];for(const n of e){const e=t.find((e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===n.rowId}));e?e.push(n):t.push([n])}return t}(e))))}(i);return null==e?void 0:e.id}return null==n?void 0:n.last()}),ArrowRight:(c||l)&&n.first,ArrowDown:(c||o)&&n.first,ArrowLeft:(c||l)&&n.last,Home:n.first,End:n.last,PageUp:n.first,PageDown:n.last},d=u[e.key];if(d){const t=d();if(void 0!==t){if(!C(e))return;e.preventDefault(),n.move(t)}}}));o=iS(o,(e=>(0,a.jsx)(bS,{value:n,children:e})),[n]);const E=n.useState((e=>{var t;if(n&&s&&e.virtualFocus)return null==(t=EC(n,e.activeId))?void 0:t.id}));o=tj(ej({"aria-activedescendant":E},o),{ref:$j(c,p,o.ref),onKeyDownCapture:g,onKeyUpCapture:v,onFocusCapture:x,onFocus:w,onBlurCapture:j,onKeyDown:k});const P=n.useState((e=>s&&(e.virtualFocus||null===e.activeId)));return o=UC(ej({focusable:P},o))}));uS((function(e){return hS("div",ZC(e))}));function YC(e,t,n){if(!n)return!1;const s=e.find((e=>!e.disabled&&e.value));return(null==s?void 0:s.value)===t}function KC(e,t){return!!t&&(null!=e&&(e=gj(e),t.length>e.length&&0===t.toLowerCase().indexOf(e.toLowerCase())))}var XC=pS((function(e){var t=e,{store:n,focusable:s=!0,autoSelect:i=!1,getAutoSelectId:r,setValueOnChange:a,showMinLength:o=0,showOnChange:l,showOnMouseDown:c,showOnClick:u=c,showOnKeyDown:d,showOnKeyPress:h=d,blurActiveItemOnClick:p,setValueOnClick:f=!0,moveOnKeyPress:m=!0,autoComplete:g="list"}=t,v=nj(t,["store","focusable","autoSelect","getAutoSelectId","setValueOnChange","showMinLength","showOnChange","showOnMouseDown","showOnClick","showOnKeyDown","showOnKeyPress","blurActiveItemOnClick","setValueOnClick","moveOnKeyPress","autoComplete"]);const y=yC();yj(n=n||y,!1);const x=(0,Gn.useRef)(null),[b,w]=(0,Gn.useReducer)((()=>[]),[]),_=(0,Gn.useRef)(!1),j=(0,Gn.useRef)(!1),S=n.useState((e=>e.virtualFocus&&i)),C="inline"===g||"both"===g,[k,E]=(0,Gn.useState)(C);!function(e,t){const n=(0,Gn.useRef)(!1);Qj((()=>{if(n.current)return e();n.current=!0}),t),Qj((()=>()=>{n.current=!1}),[])}((()=>{C&&E(!0)}),[C]);const P=n.useState("value"),I=(0,Gn.useRef)();(0,Gn.useEffect)((()=>OS(n,["selectedValue","activeId"],((e,t)=>{I.current=t.selectedValue}))),[]);const V=n.useState((e=>{var t;if(C&&k){if(e.activeValue&&Array.isArray(e.selectedValue)){if(e.selectedValue.includes(e.activeValue))return;if(null==(t=I.current)?void 0:t.includes(e.activeValue))return}return e.activeValue}})),O=n.useState("renderedItems"),T=n.useState("open"),A=n.useState("contentElement"),N=(0,Gn.useMemo)((()=>{if(!C)return P;if(!k)return P;if(YC(O,V,S)){if(KC(P,V)){const e=(null==V?void 0:V.slice(P.length))||"";return P+e}return P}return V||P}),[C,k,O,V,S,P]);(0,Gn.useEffect)((()=>{const e=x.current;if(!e)return;const t=()=>E(!0);return e.addEventListener("combobox-item-move",t),()=>{e.removeEventListener("combobox-item-move",t)}}),[]),(0,Gn.useEffect)((()=>{if(!C)return;if(!k)return;if(!V)return;if(!YC(O,V,S))return;if(!KC(P,V))return;let e=pj;return queueMicrotask((()=>{const t=x.current;if(!t)return;const{start:n,end:s}=Aj(t),i=P.length,r=V.length;Mj(t,i,r),e=()=>{if(!AC(t))return;const{start:e,end:a}=Aj(t);e===i&&a===r&&Mj(t,n,s)}})),()=>e()}),[b,C,k,V,O,S,P]);const F=(0,Gn.useRef)(null),M=Jj(r),B=(0,Gn.useRef)(null);(0,Gn.useEffect)((()=>{if(!T)return;if(!A)return;const e=Fj(A);if(!e)return;F.current=e;const t=()=>{_.current=!1},s=()=>{if(!n)return;if(!_.current)return;const{activeId:e}=n.getState();null!==e&&e!==B.current&&(_.current=!1)},i={passive:!0,capture:!0};return e.addEventListener("wheel",t,i),e.addEventListener("touchmove",t,i),e.addEventListener("scroll",s,i),()=>{e.removeEventListener("wheel",t,!0),e.removeEventListener("touchmove",t,!0),e.removeEventListener("scroll",s,!0)}}),[T,A,n]),Qj((()=>{P&&(j.current||(_.current=!0))}),[P]),Qj((()=>{"always"!==S&&T||(_.current=T)}),[S,T]);const D=n.useState("resetValueOnSelect");nS((()=>{var e,t;const s=_.current;if(!n)return;if(!T)return;if(!s&&!D)return;const{baseElement:i,contentElement:r,activeId:a}=n.getState();if(!i||AC(i)){if(null==r?void 0:r.hasAttribute("data-placing")){const e=new MutationObserver(w);return e.observe(r,{attributeFilter:["data-placing"]}),()=>e.disconnect()}if(S&&s){const t=M(O),s=void 0!==t?t:null!=(e=function(e){const t=e.find((e=>{var t;return!e.disabled&&"tab"!==(null==(t=e.element)?void 0:t.getAttribute("role"))}));return null==t?void 0:t.id}(O))?e:n.first();B.current=s,n.move(null!=s?s:null)}else{const e=null==(t=n.item(a||n.first()))?void 0:t.element;e&&"scrollIntoView"in e&&e.scrollIntoView({block:"nearest",inline:"nearest"})}}}),[n,T,b,P,S,D,M,O]),(0,Gn.useEffect)((()=>{if(!C)return;const e=x.current;if(!e)return;const t=[e,A].filter((e=>!!e)),s=e=>{t.every((t=>Uj(e,t)))&&(null==n||n.setValue(N))};for(const e of t)e.addEventListener("focusout",s);return()=>{for(const e of t)e.removeEventListener("focusout",s)}}),[C,A,n,N]);const R=e=>e.currentTarget.value.length>=o,L=v.onChange,z=sS(null!=l?l:R),H=sS(null!=a?a:!n.tag),G=Jj((e=>{if(null==L||L(e),e.defaultPrevented)return;if(!n)return;const t=e.currentTarget,{value:s,selectionStart:i,selectionEnd:r}=t,a=e.nativeEvent;if(_.current=!0,function(e){return"input"===e.type}(a)&&(a.isComposing&&(_.current=!1,j.current=!0),C)){const e="insertText"===a.inputType||"insertCompositionText"===a.inputType,t=i===s.length;E(e&&t)}if(H(e)){const e=s===n.getState().value;n.setValue(s),queueMicrotask((()=>{Mj(t,i,r)})),C&&S&&e&&w()}z(e)&&n.show(),S&&_.current||n.setActiveId(null)})),W=v.onCompositionEnd,U=Jj((e=>{_.current=!0,j.current=!1,null==W||W(e),e.defaultPrevented||S&&w()})),q=v.onMouseDown,Z=sS(null!=p?p:()=>!!(null==n?void 0:n.getState().includesBaseElement)),Y=sS(f),K=sS(null!=u?u:R),X=Jj((e=>{null==q||q(e),e.defaultPrevented||e.button||e.ctrlKey||n&&(Z(e)&&n.setActiveId(null),Y(e)&&n.setValue(N),K(e)&&qj(e.currentTarget,"mouseup",n.show))})),Q=v.onKeyDown,J=sS(null!=h?h:R),$=Jj((e=>{if(null==Q||Q(e),e.repeat||(_.current=!1),e.defaultPrevented)return;if(e.ctrlKey)return;if(e.altKey)return;if(e.shiftKey)return;if(e.metaKey)return;if(!n)return;const{open:t}=n.getState();t||"ArrowUp"!==e.key&&"ArrowDown"!==e.key||J(e)&&(e.preventDefault(),n.show())})),ee=v.onBlur,te=Jj((e=>{_.current=!1,null==ee||ee(e),e.defaultPrevented})),ne=eS(v.id),se=function(e){return"inline"===e||"list"===e||"both"===e||"none"===e}(g)?g:void 0,ie=n.useState((e=>null===e.activeId));return v=tj(ej({id:ne,role:"combobox","aria-autocomplete":se,"aria-haspopup":Nj(A,"listbox"),"aria-expanded":T,"aria-controls":null==A?void 0:A.id,"data-active-item":ie||void 0,value:N},v),{ref:$j(x,v.ref),onChange:G,onCompositionEnd:U,onMouseDown:X,onKeyDown:$,onBlur:te}),v=ZC(tj(ej({store:n,focusable:s},v),{moveOnKeyPress:e=>!function(e,...t){const n="function"==typeof e?e(...t):e;return null!=n&&!n}(m,e)&&(C&&E(!0),!0)})),v=kC(ej({store:n},v)),ej({autoComplete:"off"},v)})),QC=uS((function(e){return hS("input",XC(e))}));function JC(e,t){const n=setTimeout(t,e);return()=>clearTimeout(n)}function $C(...e){return e.join(", ").split(", ").reduce(((e,t)=>{const n=t.endsWith("ms")?1:1e3,s=Number.parseFloat(t||"0s")*n;return s>e?s:e}),0)}function ek(e,t,n){return!(n||!1===t||e&&!t)}var tk=pS((function(e){var t=e,{store:n,alwaysVisible:s}=t,i=nj(t,["store","alwaysVisible"]);const r=aC();yj(n=n||r,!1);const o=(0,Gn.useRef)(null),l=eS(i.id),[c,u]=(0,Gn.useState)(null),d=n.useState("open"),h=n.useState("mounted"),p=n.useState("animated"),f=n.useState("contentElement"),m=BS(n.disclosure,"contentElement");Qj((()=>{o.current&&(null==n||n.setContentElement(o.current))}),[n]),Qj((()=>{let e;return null==n||n.setState("animated",(t=>(e=t,!0))),()=>{void 0!==e&&(null==n||n.setState("animated",e))}}),[n]),Qj((()=>{if(p){if(null==f?void 0:f.isConnected)return function(e){let t=requestAnimationFrame((()=>{t=requestAnimationFrame(e)}));return()=>cancelAnimationFrame(t)}((()=>{u(d?"enter":h?"leave":null)}));u(null)}}),[p,f,d,h]),Qj((()=>{if(!n)return;if(!p)return;if(!c)return;if(!f)return;const e=()=>null==n?void 0:n.setState("animating",!1),t=()=>(0,Fr.flushSync)(e);if("leave"===c&&d)return;if("enter"===c&&!d)return;if("number"==typeof p){return JC(p,t)}const{transitionDuration:s,animationDuration:i,transitionDelay:r,animationDelay:a}=getComputedStyle(f),{transitionDuration:o="0",animationDuration:l="0",transitionDelay:u="0",animationDelay:h="0"}=m?getComputedStyle(m):{},g=$C(r,a,u,h)+$C(s,i,o,l);if(!g)return"enter"===c&&n.setState("animated",!1),void e();return JC(Math.max(g-1e3/60,0),t)}),[n,p,f,m,d,c]),i=iS(i,(e=>(0,a.jsx)(cC,{value:n,children:e})),[n]);const g=ek(h,i.hidden,s),v=i.style,y=(0,Gn.useMemo)((()=>g?tj(ej({},v),{display:"none"}):v),[g,v]);return bj(i=tj(ej({id:l,"data-open":d||void 0,"data-enter":"enter"===c||void 0,"data-leave":"leave"===c||void 0,hidden:g},i),{ref:$j(l?n.setContentElement:null,o,i.ref),style:y}))})),nk=uS((function(e){return hS("div",tk(e))})),sk=(uS((function(e){var t=e,{unmountOnHide:n}=t,s=nj(t,["unmountOnHide"]);const i=aC();return!1===BS(s.store||i,(e=>!n||(null==e?void 0:e.mounted)))?null:(0,a.jsx)(nk,ej({},s))})),pS((function(e){var t=e,{store:n,alwaysVisible:s}=t,i=nj(t,["store","alwaysVisible"]);const r=vC(!0),o=gC(),l=!!(n=n||o)&&n===r;yj(n,!1);const c=(0,Gn.useRef)(null),u=eS(i.id),d=n.useState("mounted"),h=ek(d,i.hidden,s),p=h?tj(ej({},i.style),{display:"none"}):i.style,f=n.useState((e=>Array.isArray(e.selectedValue))),m=tS(c,"role",i.role),g=("listbox"===m||"tree"===m||"grid"===m)&&f||void 0,[v,y]=(0,Gn.useState)(!1),x=n.useState("contentElement");Qj((()=>{if(!d)return;const e=c.current;if(!e)return;if(x!==e)return;const t=()=>{y(!!e.querySelector("[role='listbox']"))},n=new MutationObserver(t);return n.observe(e,{subtree:!0,childList:!0,attributeFilter:["role"]}),t(),()=>n.disconnect()}),[d,x]),v||(i=ej({role:"listbox","aria-multiselectable":g},i)),i=iS(i,(e=>(0,a.jsx)(bC,{value:n,children:(0,a.jsx)(fC.Provider,{value:m,children:e})})),[n,m]);const b=!u||r&&l?null:n.setContentElement;return bj(i=tj(ej({id:u,hidden:h},i),{ref:$j(b,c,i.ref),style:p}))}))),ik=uS((function(e){return hS("div",sk(e))}));function rk(e){const t=e.relatedTarget;return(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE?t:null}var ak=Symbol("composite-hover");var ok=pS((function(e){var t=e,{store:n,focusOnHover:s=!0,blurOnHoverEnd:i=!!s}=t,r=nj(t,["store","focusOnHover","blurOnHoverEnd"]);const a=yS();yj(n=n||a,!1);const o=((0,Gn.useEffect)((()=>{Zj("mousemove",lS,!0),Zj("mousedown",cS,!0),Zj("mouseup",cS,!0),Zj("keydown",cS,!0),Zj("scroll",cS,!0)}),[]),Jj((()=>rS))),l=r.onMouseMove,c=sS(s),u=Jj((e=>{if(null==l||l(e),!e.defaultPrevented&&o()&&c(e)){if(!NC(e.currentTarget)){const e=null==n?void 0:n.getState().baseElement;e&&!AC(e)&&e.focus()}null==n||n.setActiveId(e.currentTarget.id)}})),d=r.onMouseLeave,h=sS(i),p=Jj((e=>{var t;null==d||d(e),e.defaultPrevented||o()&&(function(e){const t=rk(e);return!!t&&Pj(e.currentTarget,t)}(e)||function(e){let t=rk(e);if(!t)return!1;do{if(fj(t,ak)&&t[ak])return!0;t=t.parentElement}while(t);return!1}(e)||c(e)&&h(e)&&(null==n||n.setActiveId(null),null==(t=null==n?void 0:n.getState().baseElement)||t.focus()))})),f=(0,Gn.useCallback)((e=>{e&&(e[ak]=!0)}),[]);return bj(r=tj(ej({},r),{ref:$j(f,r.ref),onMouseMove:u,onMouseLeave:p}))})),lk=(dS(uS((function(e){return hS("div",ok(e))}))),pS((function(e){var t=e,{store:n,shouldRegisterItem:s=!0,getItem:i=vj,element:r}=t,a=nj(t,["store","shouldRegisterItem","getItem","element"]);const o=gS();n=n||o;const l=eS(a.id),c=(0,Gn.useRef)(r);return(0,Gn.useEffect)((()=>{const e=c.current;if(!l)return;if(!e)return;if(!s)return;const t=i({id:l,element:e});return null==n?void 0:n.renderItem(t)}),[l,s,i,n]),bj(a=tj(ej({},a),{ref:$j(c,a.ref)}))})));uS((function(e){return hS("div",lk(e))}));function ck(e){if(!e.isTrusted)return!1;const t=e.currentTarget;return"Enter"===e.key?Ij(t)||"SUMMARY"===t.tagName||"A"===t.tagName:" "===e.key&&(Ij(t)||"SUMMARY"===t.tagName||"INPUT"===t.tagName||"SELECT"===t.tagName)}var uk=Symbol("command"),dk=pS((function(e){var t=e,{clickOnEnter:n=!0,clickOnSpace:s=!0}=t,i=nj(t,["clickOnEnter","clickOnSpace"]);const r=(0,Gn.useRef)(null),[a,o]=(0,Gn.useState)(!1);(0,Gn.useEffect)((()=>{r.current&&o(Ij(r.current))}),[]);const[l,c]=(0,Gn.useState)(!1),u=(0,Gn.useRef)(!1),d=xj(i),[h,p]=function(e,t,n){const s=e.onLoadedMetadataCapture,i=(0,Gn.useMemo)((()=>Object.assign((()=>{}),tj(ej({},s),{[t]:n}))),[s,t,n]);return[null==s?void 0:s[t],{onLoadedMetadataCapture:i}]}(i,uk,!0),f=i.onKeyDown,m=Jj((e=>{null==f||f(e);const t=e.currentTarget;if(e.defaultPrevented)return;if(h)return;if(d)return;if(!Hj(e))return;if(Oj(t))return;if(t.isContentEditable)return;const i=n&&"Enter"===e.key,r=s&&" "===e.key,a="Enter"===e.key&&!n,o=" "===e.key&&!s;if(a||o)e.preventDefault();else if(i||r){const n=ck(e);if(i){if(!n){e.preventDefault();const n=e,{view:s}=n,i=nj(n,["view"]),r=()=>Wj(t,i);Cj&&/firefox\//i.test(navigator.userAgent)?qj(t,"keyup",r):queueMicrotask(r)}}else r&&(u.current=!0,n||(e.preventDefault(),c(!0)))}})),g=i.onKeyUp,v=Jj((e=>{if(null==g||g(e),e.defaultPrevented)return;if(h)return;if(d)return;if(e.metaKey)return;const t=s&&" "===e.key;if(u.current&&t&&(u.current=!1,!ck(e))){e.preventDefault(),c(!1);const t=e.currentTarget,n=e,{view:s}=n,i=nj(n,["view"]);queueMicrotask((()=>Wj(t,i)))}}));return i=tj(ej(ej({"data-active":l||void 0,type:a?"button":void 0},p),i),{ref:$j(r,i.ref),onKeyDown:m,onKeyUp:v}),i=UC(i)}));uS((function(e){return hS("button",dk(e))}));function hk(e,t=!1){const{top:n}=e.getBoundingClientRect();return t?n+e.clientHeight:n}function pk(e,t,n,s=!1){var i;if(!t)return;if(!n)return;const{renderedItems:r}=t.getState(),a=Fj(e);if(!a)return;const o=function(e,t=!1){const n=e.clientHeight,{top:s}=e.getBoundingClientRect(),i=1.5*Math.max(.875*n,n-40),r=t?n-i+s:i+s;return"HTML"===e.tagName?r+e.scrollTop:r}(a,s);let l,c;for(let e=0;e<r.length;e+=1){const r=l;if(l=n(e),!l)break;if(l===r)continue;const a=null==(i=EC(t,l))?void 0:i.element;if(!a)continue;const u=hk(a,s)-o,d=Math.abs(u);if(s&&u<=0||!s&&u>=0){void 0!==c&&c<d&&(l=r);break}c=d}return l}var fk=pS((function(e){var t=e,{store:n,rowId:s,preventScrollOnKeyDown:i=!1,moveOnKeyPress:r=!0,tabbable:o=!1,getItem:l,"aria-setsize":c,"aria-posinset":u}=t,d=nj(t,["store","rowId","preventScrollOnKeyDown","moveOnKeyPress","tabbable","getItem","aria-setsize","aria-posinset"]);const h=yS();n=n||h;const p=eS(d.id),f=(0,Gn.useRef)(null),m=(0,Gn.useContext)(jS),g=xj(d)&&!d.accessibleWhenDisabled,{rowId:v,baseElement:y,isActiveItem:x,ariaSetSize:b,ariaPosInSet:w,isTabbable:_}=DS(n,{rowId:e=>s||(e&&(null==m?void 0:m.baseElement)&&m.baseElement===e.baseElement?m.id:void 0),baseElement:e=>(null==e?void 0:e.baseElement)||void 0,isActiveItem:e=>!!e&&e.activeId===p,ariaSetSize:e=>null!=c?c:e&&(null==m?void 0:m.ariaSetSize)&&m.baseElement===e.baseElement?m.ariaSetSize:void 0,ariaPosInSet(e){if(null!=u)return u;if(!e)return;if(!(null==m?void 0:m.ariaPosInSet))return;if(m.baseElement!==e.baseElement)return;const t=e.renderedItems.filter((e=>e.rowId===v));return m.ariaPosInSet+t.findIndex((e=>e.id===p))},isTabbable(e){if(!(null==e?void 0:e.renderedItems.length))return!0;if(e.virtualFocus)return!1;if(o)return!0;if(null===e.activeId)return!1;const t=null==n?void 0:n.item(e.activeId);return!!(null==t?void 0:t.disabled)||(!(null==t?void 0:t.element)||e.activeId===p)}}),j=(0,Gn.useCallback)((e=>{var t;const n=tj(ej({},e),{id:p||e.id,rowId:v,disabled:!!g,children:null==(t=e.element)?void 0:t.textContent});return l?l(n):n}),[p,v,g,l]),S=d.onFocus,C=(0,Gn.useRef)(!1),k=Jj((e=>{if(null==S||S(e),e.defaultPrevented)return;if(zj(e))return;if(!p)return;if(!n)return;if(function(e,t){return!Hj(e)&&IC(t,e.target)}(e,n))return;const{virtualFocus:t,baseElement:s}=n.getState();if(n.setActiveId(p),Tj(e.currentTarget)&&function(e,t=!1){if(Oj(e))e.setSelectionRange(t?e.value.length:0,e.value.length);else if(e.isContentEditable){const n=kj(e).getSelection();null==n||n.selectAllChildren(e),t&&(null==n||n.collapseToEnd())}}(e.currentTarget),!t)return;if(!Hj(e))return;if(Tj(i=e.currentTarget)||"INPUT"===i.tagName&&!Ij(i))return;var i;if(!(null==s?void 0:s.isConnected))return;Lj()&&e.currentTarget.hasAttribute("data-autofocus")&&e.currentTarget.scrollIntoView({block:"nearest",inline:"nearest"}),C.current=!0;e.relatedTarget===s||IC(n,e.relatedTarget)?function(e){e[PC]=!0,e.focus({preventScroll:!0})}(s):s.focus()})),E=d.onBlurCapture,P=Jj((e=>{if(null==E||E(e),e.defaultPrevented)return;const t=null==n?void 0:n.getState();(null==t?void 0:t.virtualFocus)&&C.current&&(C.current=!1,e.preventDefault(),e.stopPropagation())})),I=d.onKeyDown,V=sS(i),O=sS(r),T=Jj((e=>{if(null==I||I(e),e.defaultPrevented)return;if(!Hj(e))return;if(!n)return;const{currentTarget:t}=e,s=n.getState(),i=n.item(p),r=!!(null==i?void 0:i.rowId),a="horizontal"!==s.orientation,o="vertical"!==s.orientation,l=()=>!!r||(!!o||(!s.baseElement||!Oj(s.baseElement))),c={ArrowUp:(r||a)&&n.up,ArrowRight:(r||o)&&n.next,ArrowDown:(r||a)&&n.down,ArrowLeft:(r||o)&&n.previous,Home:()=>{if(l())return!r||e.ctrlKey?null==n?void 0:n.first():null==n?void 0:n.previous(-1)},End:()=>{if(l())return!r||e.ctrlKey?null==n?void 0:n.last():null==n?void 0:n.next(-1)},PageUp:()=>pk(t,n,null==n?void 0:n.up,!0),PageDown:()=>pk(t,n,null==n?void 0:n.down)}[e.key];if(c){if(Tj(t)){const n=Aj(t),s=o&&"ArrowLeft"===e.key,i=o&&"ArrowRight"===e.key,r=a&&"ArrowUp"===e.key,l=a&&"ArrowDown"===e.key;if(i||l){const{length:e}=function(e){if(Oj(e))return e.value;if(e.isContentEditable){const t=kj(e).createRange();return t.selectNodeContents(e),t.toString()}return""}(t);if(n.end!==e)return}else if((s||r)&&0!==n.start)return}const s=c();if(V(e)||void 0!==s){if(!O(e))return;e.preventDefault(),n.move(s)}}})),A=(0,Gn.useMemo)((()=>({id:p,baseElement:y})),[p,y]);return d=iS(d,(e=>(0,a.jsx)(_S.Provider,{value:A,children:e})),[A]),d=tj(ej({id:p,"data-active-item":x||void 0},d),{ref:$j(f,d.ref),tabIndex:_?d.tabIndex:-1,onFocus:k,onBlurCapture:P,onKeyDown:T}),d=dk(d),d=lk(tj(ej({store:n},d),{getItem:j,shouldRegisterItem:!!p&&d.shouldRegisterItem})),bj(tj(ej({},d),{"aria-setsize":b,"aria-posinset":w}))}));dS(uS((function(e){return hS("button",fk(e))})));function mk(e){var t;return null!=(t={menu:"menuitem",listbox:"option",tree:"treeitem"}[e])?t:"option"}var gk=pS((function(e){var t,n=e,{store:s,value:i,hideOnClick:r,setValueOnClick:o,selectValueOnClick:l=!0,resetValueOnSelect:c,focusOnHover:u=!1,moveOnKeyPress:d=!0,getItem:h}=n,p=nj(n,["store","value","hideOnClick","setValueOnClick","selectValueOnClick","resetValueOnSelect","focusOnHover","moveOnKeyPress","getItem"]);const f=vC();yj(s=s||f,!1);const{resetValueOnSelectState:m,multiSelectable:g,selected:v}=DS(s,{resetValueOnSelectState:"resetValueOnSelect",multiSelectable:e=>Array.isArray(e.selectedValue),selected:e=>function(e,t){if(null!=t)return null!=e&&(Array.isArray(e)?e.includes(t):e===t)}(e.selectedValue,i)}),y=(0,Gn.useCallback)((e=>{const t=tj(ej({},e),{value:i});return h?h(t):t}),[i,h]);o=null!=o?o:!g,r=null!=r?r:null!=i&&!g;const x=p.onClick,b=sS(o),w=sS(l),_=sS(null!=(t=null!=c?c:m)?t:g),j=sS(r),S=Jj((e=>{null==x||x(e),e.defaultPrevented||function(e){const t=e.currentTarget;if(!t)return!1;const n=t.tagName.toLowerCase();return!!e.altKey&&("a"===n||"button"===n&&"submit"===t.type||"input"===n&&"submit"===t.type)}(e)||function(e){const t=e.currentTarget;if(!t)return!1;const n=Rj();if(n&&!e.metaKey)return!1;if(!n&&!e.ctrlKey)return!1;const s=t.tagName.toLowerCase();return"a"===s||"button"===s&&"submit"===t.type||"input"===s&&"submit"===t.type}(e)||(null!=i&&(w(e)&&(_(e)&&(null==s||s.resetValue()),null==s||s.setSelectedValue((e=>Array.isArray(e)?e.includes(i)?e.filter((e=>e!==i)):[...e,i]:i))),b(e)&&(null==s||s.setValue(i))),j(e)&&(null==s||s.hide()))})),C=p.onKeyDown,k=Jj((e=>{if(null==C||C(e),e.defaultPrevented)return;const t=null==s?void 0:s.getState().baseElement;if(!t)return;if(AC(t))return;(1===e.key.length||"Backspace"===e.key||"Delete"===e.key)&&(queueMicrotask((()=>t.focus())),Oj(t)&&(null==s||s.setValue(t.value)))}));g&&null!=v&&(p=ej({"aria-selected":v},p)),p=iS(p,(e=>(0,a.jsx)(wC.Provider,{value:i,children:(0,a.jsx)(_C.Provider,{value:null!=v&&v,children:e})})),[i,v]);const E=(0,Gn.useContext)(fC);p=tj(ej({role:mk(E),children:i},p),{onClick:S,onKeyDown:k});const P=sS(d);return p=fk(tj(ej({store:s},p),{getItem:y,moveOnKeyPress:e=>{if(!P(e))return!1;const t=new Event("combobox-item-move"),n=null==s?void 0:s.getState().baseElement;return null==n||n.dispatchEvent(t),!0}})),p=ok(ej({store:s,focusOnHover:u},p))})),vk=dS(uS((function(e){return hS("div",gk(e))})));function yk(e){return gj(e).toLowerCase()}function xk(e,t){if(!e)return e;if(!t)return e;const n=(s=t,Array.isArray(s)?s:void 0!==s?[s]:[]).filter(Boolean).map(yk);var s;const i=[],r=(e,t=!1)=>(0,a.jsx)("span",{"data-autocomplete-value":t?"":void 0,"data-user-value":t?void 0:"",children:e},i.length),o=function(e){return e.sort((([e],[t])=>e-t))}(function(e){return e.filter((([e,t],n,s)=>!s.some((([s,i],r)=>r!==n&&s<=e&&s+i>=e+t))))}(function(e,t){const n=[];for(const s of t){let t=0;const i=s.length;for(;-1!==e.indexOf(s,t);){const r=e.indexOf(s,t);-1!==r&&n.push([r,i]),t=r+1}}return n}(yk(e),new Set(n))));if(!o.length)return i.push(r(e,!0)),i;const[l]=o[0],c=[e.slice(0,l),...o.flatMap((([t,n],s)=>{var i;const r=e.slice(t,t+n),a=null==(i=o[s+1])?void 0:i[0];return[r,e.slice(t+n,a)]}))];return c.forEach(((e,t)=>{e&&i.push(r(e,t%2==0))})),i}var bk=pS((function(e){var t=e,{store:n,value:s,userValue:i}=t,r=nj(t,["store","value","userValue"]);const a=vC();n=n||a;const o=(0,Gn.useContext)(wC),l=null!=s?s:o,c=BS(n,(e=>null!=i?i:null==e?void 0:e.value)),u=(0,Gn.useMemo)((()=>{if(l)return c?xk(l,c):l}),[l,c]);return bj(r=ej({children:u},r))})),wk=uS((function(e){return hS("span",bk(e))}));const _k=[],jk=(e,t)=>e.singleSelection?t?.value:Array.isArray(t?.value)?t.value:!Array.isArray(t?.value)&&t?.value?[t.value]:_k;function Sk(e=""){return Fy()(e.trim().toLowerCase())}const Ck=(e,t,n)=>e.singleSelection?n:Array.isArray(t?.value)?t.value.includes(n)?t.value.filter((e=>e!==n)):[...t.value,n]:[n];function kk(e,t){return`${e}-${t}`}const Ek=({selected:e})=>(0,a.jsx)("span",{className:Ht("dataviews-filters__search-widget-listitem-multi-selection",{"is-selected":e}),children:e&&(0,a.jsx)(b.Icon,{icon:Xr})}),Pk=({selected:e})=>(0,a.jsx)("span",{className:Ht("dataviews-filters__search-widget-listitem-single-selection",{"is-selected":e})});function Ik({view:e,filter:t,onChangeView:n}){const s=(0,y.useInstanceId)(Ik,"dataviews-filter-list-box"),[i,r]=(0,h.useState)(1===t.operators?.length?void 0:null),o=e.filters?.find((e=>e.field===t.field)),l=jk(t,o);return(0,a.jsx)(b.Composite,{virtualFocus:!0,focusLoop:!0,activeId:i,setActiveId:r,role:"listbox",className:"dataviews-filters__search-widget-listbox","aria-label":(0,w.sprintf)((0,w.__)("List of: %1$s"),t.name),onFocusVisible:()=>{!i&&t.elements.length&&r(kk(s,t.elements[0].value))},render:(0,a.jsx)(b.Composite.Typeahead,{}),children:t.elements.map((i=>(0,a.jsxs)(b.Composite.Hover,{render:(0,a.jsx)(b.Composite.Item,{id:kk(s,i.value),render:(0,a.jsx)("div",{"aria-label":i.label,role:"option",className:"dataviews-filters__search-widget-listitem"}),onClick:()=>{const s=o?[...(e.filters??[]).map((e=>e.field===t.field?{...e,operator:o.operator||t.operators[0],value:Ck(t,o,i.value)}:e))]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:Ck(t,o,i.value)}];n({...e,page:1,filters:s})}}),children:[t.singleSelection&&(0,a.jsx)(Pk,{selected:l===i.value}),!t.singleSelection&&(0,a.jsx)(Ek,{selected:l.includes(i.value)}),(0,a.jsx)("span",{children:i.label})]},i.value)))})}function Vk({view:e,filter:t,onChangeView:n}){const[s,i]=(0,h.useState)(""),r=(0,h.useDeferredValue)(s),o=e.filters?.find((e=>e.field===t.field)),l=jk(t,o),c=(0,h.useMemo)((()=>{const e=Sk(r);return t.elements.filter((t=>Sk(t.label).includes(e)))}),[t.elements,r]);return(0,a.jsxs)(jC,{selectedValue:l,setSelectedValue:s=>{const i=o?[...(e.filters??[]).map((e=>e.field===t.field?{...e,operator:o.operator||t.operators[0],value:s}:e))]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:s}];n({...e,page:1,filters:i})},setValue:i,children:[(0,a.jsxs)("div",{className:"dataviews-filters__search-widget-filter-combobox__wrapper",children:[(0,a.jsx)(CC,{render:(0,a.jsx)(b.VisuallyHidden,{children:(0,w.__)("Search items")}),children:(0,w.__)("Search items")}),(0,a.jsx)(QC,{autoSelect:"always",placeholder:(0,w.__)("Search"),className:"dataviews-filters__search-widget-filter-combobox__input"}),(0,a.jsx)("div",{className:"dataviews-filters__search-widget-filter-combobox__icon",children:(0,a.jsx)(b.Icon,{icon:Yt})})]}),(0,a.jsxs)(ik,{className:"dataviews-filters__search-widget-filter-combobox-list",alwaysVisible:!0,children:[c.map((e=>(0,a.jsxs)(vk,{resetValueOnSelect:!1,value:e.value,className:"dataviews-filters__search-widget-listitem",hideOnClick:!1,setValueOnClick:!1,focusOnHover:!0,children:[t.singleSelection&&(0,a.jsx)(Pk,{selected:l===e.value}),!t.singleSelection&&(0,a.jsx)(Ek,{selected:l.includes(e.value)}),(0,a.jsxs)("span",{children:[(0,a.jsx)(wk,{className:"dataviews-filters__search-widget-filter-combobox-item-value",value:e.label}),!!e.description&&(0,a.jsx)("span",{className:"dataviews-filters__search-widget-listitem-description",children:e.description})]})]},e.value))),!c.length&&(0,a.jsx)("p",{children:(0,w.__)("No results found")})]})]})}function Ok(e){const{elements:t,isLoading:n}=Ix({elements:e.filter.elements,getElements:e.filter.getElements});if(n)return(0,a.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,a.jsx)(b.Spinner,{})});if(0===t.length)return(0,a.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,w.__)("No elements found")});const s=t.length>10?Vk:Ik;return(0,a.jsx)(s,{...e,filter:{...e.filter,elements:t}})}var Tk=i(7734),Ak=i.n(Tk);function Nk({filter:e,view:t,onChangeView:n,fields:s}){const i=t.filters?.find((t=>t.field===e.field)),r=jk(e,i),o=(0,h.useMemo)((()=>{const t=s.find((t=>t.id===e.field));return t?{...t,isValid:{required:!1,custom:()=>null},getValue:({item:e})=>e[t.id],setValue:({value:e})=>({[t.id]:e})}:t}),[s,e.field]),l=(0,h.useMemo)((()=>(t.filters??[]).reduce(((e,t)=>(e[t.field]=t.value,e)),{})),[t.filters]),c=(0,y.useEvent)((s=>{if(!o||!i)return;const a=o.getValue({item:s});Ak()(a,r)||n({...t,filters:(t.filters??[]).map((t=>t.field===e.field?{...t,operator:i.operator||e.operators[0],value:""===a?void 0:a}:t))})}));return o&&o.Edit&&i?(0,a.jsx)(b.Flex,{className:"dataviews-filters__user-input-widget",gap:2.5,direction:"column",children:(0,a.jsx)(o.Edit,{hideLabelFromVision:!0,data:l,field:o,operator:i.operator,onChange:c})}):null}const Fk="Enter",Mk=" ",Bk=({activeElements:e,filterInView:t,filter:n})=>{if(void 0===e||0===e.length)return n.name;const s={Name:(0,a.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,a.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};if(t?.operator===Jy)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is any: </Name><Value>%2$s</Value>"),n.name,e.map((e=>e.label)).join(", ")),s);if(t?.operator===$y)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is none: </Name><Value>%2$s</Value>"),n.name,e.map((e=>e.label)).join(", ")),s);if(t?.operator===ex)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is all: </Name><Value>%2$s</Value>"),n.name,e.map((e=>e.label)).join(", ")),s);if(t?.operator===tx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is not all: </Name><Value>%2$s</Value>"),n.name,e.map((e=>e.label)).join(", ")),s);if(t?.operator===Xy)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===Qy)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===nx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===sx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===ix)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===rx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===ux)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===dx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===hx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===ax)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===ox)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===lx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===cx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===px){const{label:t}=e[0];return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),n.name,t[0],t[1]),s)}return t?.operator===fx?(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),n.name,e[0].label),s):t?.operator===mx?(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),n.name,e[0].label),s):t?.operator===gx?(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),n.name,`${e[0].value.value} ${e[0].value.unit}`),s):t?.operator===vx?(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is over: </Name><Value>%2$s</Value> ago"),n.name,`${e[0].value.value} ${e[0].value.unit}`),s):(0,w.sprintf)((0,w.__)("Unknown status for %1$s"),n.name)};function Dk({filter:e,view:t,onChangeView:n}){const s=e.operators?.map((e=>({value:e,label:bx[e]?.label}))),i=t.filters?.find((t=>t.field===e.field)),r=i?.operator||e.operators[0];return s.length>1&&(0,a.jsxs)(b.__experimentalHStack,{spacing:2,justify:"flex-start",className:"dataviews-filters__summary-operators-container",children:[(0,a.jsx)(b.FlexItem,{className:"dataviews-filters__summary-operators-filter-name",children:e.name}),(0,a.jsx)(b.SelectControl,{className:"dataviews-filters__summary-operators-filter-select",label:(0,w.__)("Conditions"),value:r,options:s,onChange:s=>{const r=s,a=i?.operator,o=i?[...(t.filters??[]).map((t=>{if(t.field===e.field){const e=[px,gx,vx],n=a&&(e.includes(a)||e.includes(r));return{...t,value:n?void 0:t.value,operator:r}}return t}))]:[...t.filters??[],{field:e.field,operator:r,value:void 0}];n({...t,page:1,filters:o})},size:"small",variant:"minimal",__nextHasNoMarginBottom:!0,hideLabelFromVision:!0})]})}function Rk({addFilterRef:e,openedFilter:t,fields:n,...s}){const i=(0,h.useRef)(null),{filter:r,view:o,onChangeView:l}=s,c=o.filters?.find((e=>e.field===r.field));let u=[];const{elements:d}=Ix({elements:r.elements,getElements:r.getElements});d.length>0?u=d.filter((e=>r.singleSelection?e.value===c?.value:c?.value?.includes(e.value))):void 0!==c?.value&&(u=[{value:c.value,label:c.value}]);const p=r.isPrimary,f=c?.isLocked,m=!f&&void 0!==c?.value,g=!f&&(!p||m);return(0,a.jsx)(b.Dropdown,{defaultOpen:t===r.field,contentClassName:"dataviews-filters__summary-popover",popoverProps:{placement:"bottom-start",role:"dialog"},onClose:()=>{i.current?.focus()},renderToggle:({isOpen:t,onToggle:n})=>(0,a.jsxs)("div",{className:"dataviews-filters__summary-chip-container",children:[(0,a.jsx)(b.Tooltip,{text:(0,w.sprintf)((0,w.__)("Filter by: %1$s"),r.name.toLowerCase()),placement:"top",children:(0,a.jsx)("div",{className:Ht("dataviews-filters__summary-chip",{"has-reset":g,"has-values":m,"is-not-clickable":f}),role:"button",tabIndex:f?-1:0,onClick:()=>{f||n()},onKeyDown:e=>{!f&&[Fk,Mk].includes(e.key)&&(n(),e.preventDefault())},"aria-disabled":f,"aria-pressed":t,"aria-expanded":t,ref:i,children:(0,a.jsx)(Bk,{activeElements:u,filterInView:c,filter:r})})}),g&&(0,a.jsx)(b.Tooltip,{text:p?(0,w.__)("Reset"):(0,w.__)("Remove"),placement:"top",children:(0,a.jsx)("button",{className:Ht("dataviews-filters__summary-chip-remove",{"has-values":m}),onClick:()=>{l({...o,page:1,filters:o.filters?.filter((e=>e.field!==r.field))}),p?i.current?.focus():e.current?.focus()},children:(0,a.jsx)(b.Icon,{icon:Ea})})})]}),renderContent:()=>(0,a.jsxs)(b.__experimentalVStack,{spacing:0,justify:"flex-start",children:[(0,a.jsx)(Dk,{...s}),s.filter.hasElements?(0,a.jsx)(Ok,{...s,filter:{...s.filter,elements:d}}):(0,a.jsx)(Nk,{...s,fields:n})]})})}function Lk({filters:e,view:t,onChangeView:n}){const s=!t.search&&!t.filters?.some((t=>{return!(t.isLocked||void 0===t.value&&(n=t.field,e.some((e=>e.field===n&&e.isPrimary))));var n}));return(0,a.jsx)(b.Button,{disabled:s,accessibleWhenDisabled:!0,size:"compact",variant:"tertiary",className:"dataviews-filters__reset-button",onClick:()=>{n({...t,page:1,search:"",filters:t.filters?.filter((e=>!!e.isLocked))||[]})},children:(0,w.__)("Reset")})}var zk=function(e,t){return(0,h.useMemo)((()=>{const n=[];return e.forEach((e=>{if(!1===e.filterBy||!e.hasElements&&!e.Edit)return;const s=e.filterBy.operators,i=!!e.filterBy?.isPrimary,r=t.filters?.some((t=>t.field===e.id&&!!t.isLocked))??!1;n.push({field:e.id,name:e.label,elements:e.elements,getElements:e.getElements,hasElements:e.hasElements,singleSelection:s.some((e=>xx.includes(e))),operators:s,isVisible:r||i||!!t.filters?.some((t=>t.field===e.id&&yx.includes(t.operator))),isPrimary:i,isLocked:r})})),n.sort(((e,t)=>e.isLocked&&!t.isLocked?-1:!e.isLocked&&t.isLocked?1:e.isPrimary&&!t.isPrimary?-1:!e.isPrimary&&t.isPrimary?1:e.name.localeCompare(t.name))),n}),[e,t])};var Hk=(0,h.memo)((function({className:e}){const{fields:t,view:n,onChangeView:s,openedFilter:i,setOpenedFilter:r}=(0,h.useContext)(Rw),o=(0,h.useRef)(null),l=zk(t,n),c=(0,a.jsx)(W_,{filters:l,view:n,onChangeView:s,ref:o,setOpenedFilter:r},"add-filter"),u=l.filter((e=>e.isVisible));if(0===u.length)return null;const d=[...u.map((e=>(0,a.jsx)(Rk,{filter:e,view:n,fields:t,onChangeView:s,addFilterRef:o,openedFilter:i},e.field))),c];return d.push((0,a.jsx)(Lk,{filters:l,view:n,onChangeView:s},"reset-filters")),(0,a.jsx)(b.__experimentalHStack,{justify:"flex-start",style:{width:"fit-content"},wrap:!0,className:e,children:d})}));var Gk=function(e){const{isShowingFilter:t}=(0,h.useContext)(Rw);return t?(0,a.jsx)(Hk,{...e}):null};function Wk({className:e}){const{actions:t=[],data:n,fields:s,getItemId:i,getItemLevel:r,isLoading:o,view:l,onChangeView:c,selection:u,onChangeSelection:d,setOpenedFilter:p,onClickItem:f,isItemClickable:m,renderItemLink:g,defaultLayouts:v,empty:y=(0,a.jsx)("p",{children:(0,w.__)("No results")})}=(0,h.useContext)(Rw),x=z_.find((e=>e.type===l.type&&v[e.type]))?.component;return(0,a.jsx)(x,{className:e,actions:t,data:n,fields:s,getItemId:i,getItemLevel:r,isLoading:o,onChangeView:c,onChangeSelection:d,selection:u,setOpenedFilter:p,onClickItem:f,renderItemLink:g,isItemClickable:m,view:l,empty:y})}function Uk(){const{view:e,onChangeView:t,paginationInfo:{totalItems:n=0,totalPages:s}}=(0,h.useContext)(Rw);if(!n||!s||e.infiniteScrollEnabled)return null;const i=e.page??1,r=Array.from(Array(s)).map(((e,t)=>{const n=t+1;return{value:n.toString(),label:n.toString(),"aria-label":i===n?(0,w.sprintf)((0,w.__)("Page %1$d of %2$d"),i,s):n.toString()}}));return!!n&&1!==s&&(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,className:"dataviews-pagination",justify:"end",spacing:6,children:[(0,a.jsx)(b.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:1,className:"dataviews-pagination__page-select",children:(0,h.createInterpolateElement)((0,w.sprintf)((0,w._x)("<div>Page</div>%1$s<div>of %2$d</div>","paging"),"<CurrentPage />",s),{div:(0,a.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,a.jsx)(b.SelectControl,{"aria-label":(0,w.__)("Current page"),value:i.toString(),options:r,onChange:n=>{t({...e,page:+n})},size:"small",__nextHasNoMarginBottom:!0,variant:"minimal"})})}),(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,a.jsx)(b.Button,{onClick:()=>t({...e,page:i-1}),disabled:1===i,accessibleWhenDisabled:!0,label:(0,w.__)("Previous page"),icon:(0,w.isRTL)()?$c:eu,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,a.jsx)(b.Button,{onClick:()=>t({...e,page:i+1}),disabled:i>=s,accessibleWhenDisabled:!0,label:(0,w.__)("Next page"),icon:(0,w.isRTL)()?eu:$c,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})}var qk=(0,h.memo)(Uk);const Zk=[];function Yk(){const{view:e,paginationInfo:{totalItems:t=0,totalPages:n},data:s,actions:i=Zk}=(0,h.useContext)(Rw),r=n_(i,s)&&[kx,Ex].includes(e.type);return!t||!n||n<=1&&!r?null:!!t&&(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,justify:"end",className:"dataviews-footer",children:[r&&(0,a.jsx)(c_,{}),(0,a.jsx)(qk,{})]})}var Kk=(0,h.memo)((function({label:e}){const{view:t,onChangeView:n}=(0,h.useContext)(Rw),[s,i,r]=(0,y.useDebouncedInput)(t.search);(0,h.useEffect)((()=>{i(t.search??"")}),[t.search,i]);const o=(0,h.useRef)(n),l=(0,h.useRef)(t);(0,h.useEffect)((()=>{o.current=n,l.current=t}),[n,t]),(0,h.useEffect)((()=>{r!==l.current?.search&&o.current({...l.current,page:1,search:r})}),[r]);const c=e||(0,w.__)("Search");return(0,a.jsx)(b.SearchControl,{className:"dataviews-search",__nextHasNoMarginBottom:!0,onChange:i,value:s,label:c,placeholder:c,size:"compact"})})),Xk=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"})}),Qk=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"})});const Jk=window.wp.warning;var $k=i.n(Jk);function eE(){const e=(0,h.useContext)(Rw),{view:t,onChangeView:n}=e,s=t.infiniteScrollEnabled??!1;return e.hasInfiniteScrollHandler?(0,a.jsx)(b.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,w.__)("Enable infinite scroll"),help:(0,w.__)("Automatically load more content as you scroll, instead of showing pagination links."),checked:s,onChange:e=>{n({...t,infiniteScrollEnabled:e})}}):null}const{Menu:tE}=Zx(b.privateApis),nE={className:"dataviews-config__popover",placement:"bottom-end",offset:9};function sE(){const{view:e,onChangeView:t,defaultLayouts:n}=(0,h.useContext)(Rw),s=Object.keys(n);if(s.length<=1)return null;const i=z_.find((t=>e.type===t.type));return(0,a.jsxs)(tE,{children:[(0,a.jsx)(tE.TriggerButton,{render:(0,a.jsx)(b.Button,{size:"compact",icon:i?.icon,label:(0,w.__)("Layout")})}),(0,a.jsx)(tE.Popover,{children:s.map((s=>{const i=z_.find((e=>e.type===s));return i?(0,a.jsx)(tE.RadioItem,{value:s,name:"view-actions-available-view",checked:s===e.type,hideOnClick:!0,onChange:s=>{switch(s.target.value){case"list":case"grid":case"table":case"pickerGrid":const i={...e};return"layout"in i&&delete i.layout,t({...i,type:s.target.value,...n[s.target.value]})}$k()("Invalid dataview")},children:(0,a.jsx)(tE.ItemLabel,{children:i.label})},s):null}))})]})}function iE(){const{view:e,fields:t,onChangeView:n}=(0,h.useContext)(Rw),s=(0,h.useMemo)((()=>t.filter((e=>!1!==e.enableSorting)).map((e=>({label:e.label,value:e.id})))),[t]);return(0,a.jsx)(b.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,w.__)("Sort by"),value:e.sort?.field,options:s,onChange:t=>{n({...e,sort:{direction:e?.sort?.direction||"desc",field:t},showLevels:!1})}})}function rE(){const{view:e,fields:t,onChangeView:n}=(0,h.useContext)(Rw);if(0===t.filter((e=>!1!==e.enableSorting)).length)return null;let s=e.sort?.direction;return!s&&e.sort?.field&&(s="desc"),(0,a.jsx)(b.__experimentalToggleGroupControl,{className:"dataviews-view-config__sort-direction",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,label:(0,w.__)("Order"),value:s,onChange:s=>{"asc"!==s&&"desc"!==s?$k()("Invalid direction"):n({...e,sort:{direction:s,field:e.sort?.field||t.find((e=>!1!==e.enableSorting))?.id||""},showLevels:!1})},children:wx.map((e=>(0,a.jsx)(b.__experimentalToggleGroupControlOptionIcon,{value:e,icon:Cx[e],label:Sx[e]},e)))})}function aE(){const{view:e,config:t,onChangeView:n}=(0,h.useContext)(Rw),{infiniteScrollEnabled:s}=e;return!t||!t.perPageSizes||t.perPageSizes.length<2||t.perPageSizes.length>6||s?null:(0,a.jsx)(b.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,label:(0,w.__)("Items per page"),value:e.perPage||10,disabled:!e?.sort?.field,onChange:t=>{const s="number"==typeof t||void 0===t?t:parseInt(t,10);n({...e,perPage:s,page:1})},children:t.perPageSizes.map((e=>(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:e,label:e.toString()},e)))})}function oE({previewOptions:e,onChangePreviewOption:t,onMenuOpenChange:n,activeOption:s}){return(0,a.jsxs)(tE,{onOpenChange:n,children:[(0,a.jsx)(tE.TriggerButton,{render:(0,a.jsx)(b.Button,{className:"dataviews-field-control__field-preview-options-button",size:"compact",icon:No,label:(0,w.__)("Preview")})}),(0,a.jsx)(tE.Popover,{children:e?.map((({id:e,label:n})=>(0,a.jsx)(tE.RadioItem,{value:e,checked:e===s,onChange:()=>{t?.(e),(e=>{setTimeout((()=>{const t=document.querySelector(`.dataviews-field-control__field-${e} .dataviews-field-control__field-preview-options-button`);t instanceof HTMLElement&&t.focus()}),50)})(e)},children:(0,a.jsx)(tE.ItemLabel,{children:n})},e)))})]})}function lE({field:e,label:t,description:n,isVisible:s,isFirst:i,isLast:r,canMove:o=!0,onToggleVisibility:l,onMoveUp:c,onMoveDown:u,previewOptions:d,onChangePreviewOption:p}){const[f,m]=(0,h.useState)(!1);return(0,a.jsx)(b.__experimentalItem,{children:(0,a.jsxs)(b.__experimentalHStack,{expanded:!0,className:Ht("dataviews-field-control__field",`dataviews-field-control__field-${e.id}`,{"is-interacting":f}),justify:"flex-start",children:[(0,a.jsx)("span",{className:"dataviews-field-control__icon",children:!o&&!e.enableHiding&&(0,a.jsx)(b.Icon,{icon:Xk})}),(0,a.jsxs)("span",{className:"dataviews-field-control__label-sub-label-container",children:[(0,a.jsx)("span",{className:"dataviews-field-control__label",children:t||e.label}),n&&(0,a.jsx)("span",{className:"dataviews-field-control__sub-label",children:n})]}),(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-end",expanded:!1,className:"dataviews-field-control__actions",children:[s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Button,{disabled:i||!o,accessibleWhenDisabled:!0,size:"compact",onClick:c,icon:Av,label:i||!o?(0,w.__)("This field can't be moved up"):(0,w.sprintf)((0,w.__)("Move %s up"),e.label)}),(0,a.jsx)(b.Button,{disabled:r||!o,accessibleWhenDisabled:!0,size:"compact",onClick:u,icon:Nv,label:r||!o?(0,w.__)("This field can't be moved down"):(0,w.sprintf)((0,w.__)("Move %s down"),e.label)})]}),l&&(0,a.jsx)(b.Button,{className:"dataviews-field-control__field-visibility-button",disabled:!e.enableHiding,accessibleWhenDisabled:!0,size:"compact",onClick:()=>{l(),setTimeout((()=>{const t=document.querySelector(`.dataviews-field-control__field-${e.id} .dataviews-field-control__field-visibility-button`);t instanceof HTMLElement&&t.focus()}),50)},icon:s?Ew:Ao,label:s?(0,w.sprintf)((0,w._x)("Hide %s","field"),e.label):(0,w.sprintf)((0,w._x)("Show %s","field"),e.label)}),d&&(0,a.jsx)(oE,{previewOptions:d,onChangePreviewOption:p,onMenuOpenChange:m,activeOption:e.id})]})]})})}function cE({index:e,field:t,view:n,onChangeView:s}){const i=n.fields??[],r=void 0!==e&&i.includes(t.id);return(0,a.jsx)(lE,{field:t,isVisible:r,isFirst:void 0!==e&&e<1,isLast:void 0!==e&&e===i.length-1,onToggleVisibility:()=>{s({...n,fields:r?i.filter((e=>e!==t.id)):[...i,t.id]})},onMoveUp:void 0!==e?()=>{s({...n,fields:[...i.slice(0,e-1)??[],t.id,i[e-1],...i.slice(e+1)]})}:void 0,onMoveDown:void 0!==e?()=>{s({...n,fields:[...i.slice(0,e)??[],i[e+1],t.id,...i.slice(e+2)]})}:void 0})}function uE(e){return!!e}function dE(){const{view:e,fields:t,onChangeView:n}=(0,h.useContext)(Rw),s=[e?.titleField,e?.mediaField,e?.descriptionField].filter(Boolean),i=e.fields??[],r=t.filter((e=>!i.includes(e.id)&&!s.includes(e.id)&&"media"!==e.type&&!1!==e.enableHiding));let o=i.map((e=>t.find((t=>t.id===e)))).filter(uE);if(!o?.length&&!r?.length)return null;const l=t.find((t=>t.id===e.titleField)),c=t.find((t=>t.id===e.mediaField)),u=t.find((t=>t.id===e.descriptionField)),d=t.filter((e=>"media"===e.type));let p;if(d.length>1){const t=uE(c)&&(e.showMedia??!0);p=uE(c)&&(0,a.jsx)(lE,{field:c,label:(0,w.__)("Preview"),description:c.label,isVisible:t,onToggleVisibility:()=>{n({...e,showMedia:!t})},canMove:!1,previewOptions:d.map((e=>({label:e.label,id:e.id}))),onChangePreviewOption:t=>n({...e,mediaField:t})},c.id)}const f=[{field:l,isVisibleFlag:"showTitle"},{field:c,isVisibleFlag:"showMedia",ui:p},{field:u,isVisibleFlag:"showDescription"}].filter((({field:e})=>uE(e)));let m=f.filter((({field:t,isVisibleFlag:n})=>uE(t)&&(e[n]??!0)));1===m.length&&(m=m.map((e=>({...e,field:{...e.field,enableHiding:!1}})))),0===m.length&&1===o.length&&(o=[{...o[0],enableHiding:!1}]);const g=f.filter((({field:t,isVisibleFlag:n})=>uE(t)&&!(e[n]??1)));return(0,a.jsxs)(b.__experimentalVStack,{className:"dataviews-field-control",spacing:6,children:[(0,a.jsx)(b.__experimentalVStack,{className:"dataviews-view-config__properties",spacing:0,children:(m.length>0||!!o?.length)&&(0,a.jsxs)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:[m.map((({field:t,isVisibleFlag:s,ui:i})=>i??(0,a.jsx)(lE,{field:t,isVisible:!0,onToggleVisibility:()=>{n({...e,[s]:!1})},canMove:!1},t.id))),o.map(((t,s)=>(0,a.jsx)(cE,{field:t,view:e,onChangeView:n,index:s},t.id)))]})}),(!!r?.length||!!g.length)&&(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsx)(b.BaseControl.VisualLabel,{style:{margin:0},children:(0,w.__)("Hidden")}),(0,a.jsx)(b.__experimentalVStack,{className:"dataviews-view-config__properties",spacing:0,children:(0,a.jsxs)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:[g.length>0&&g.map((({field:t,isVisibleFlag:s,ui:i})=>i??(0,a.jsx)(lE,{field:t,isVisible:!1,onToggleVisibility:()=>{n({...e,[s]:!0})},canMove:!1},t.id))),r.map((t=>(0,a.jsx)(cE,{field:t,view:e,onChangeView:n},t.id)))]})})]})]})}function hE({title:e,description:t,children:n}){return(0,a.jsxs)(b.__experimentalGrid,{columns:12,className:"dataviews-settings-section",gap:4,children:[(0,a.jsxs)("div",{className:"dataviews-settings-section__sidebar",children:[(0,a.jsx)(b.__experimentalHeading,{level:2,className:"dataviews-settings-section__title",children:e}),t&&(0,a.jsx)(b.__experimentalText,{variant:"muted",className:"dataviews-settings-section__description",children:t})]}),(0,a.jsx)(b.__experimentalGrid,{columns:8,gap:4,className:"dataviews-settings-section__content",children:n})]})}function pE(){const{view:e}=(0,h.useContext)(Rw),t=(0,y.useInstanceId)(fE,"dataviews-view-config-dropdown"),n=z_.find((t=>t.type===e.type));return(0,a.jsx)(b.Dropdown,{expandOnMobile:!0,popoverProps:{...nE,id:t},renderToggle:({onToggle:e,isOpen:n})=>(0,a.jsx)(b.Button,{size:"compact",icon:Qk,label:(0,w._x)("View options","View is used as a noun"),onClick:e,"aria-expanded":n?"true":"false","aria-controls":t}),renderContent:()=>(0,a.jsx)(b.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"dataviews-config__popover-content-wrapper",children:(0,a.jsxs)(b.__experimentalVStack,{className:"dataviews-view-config",spacing:6,children:[(0,a.jsxs)(hE,{title:(0,w.__)("Appearance"),children:[(0,a.jsxs)(b.__experimentalHStack,{expanded:!0,className:"is-divided-in-two",children:[(0,a.jsx)(iE,{}),(0,a.jsx)(rE,{})]}),!!n?.viewConfigOptions&&(0,a.jsx)(n.viewConfigOptions,{}),(0,a.jsx)(eE,{}),(0,a.jsx)(aE,{})]}),(0,a.jsx)(hE,{title:(0,w.__)("Properties"),children:(0,a.jsx)(dE,{})})]})})})}function fE(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(sE,{}),(0,a.jsx)(pE,{})]})}var mE=(0,h.memo)(fE);const gE=e=>e.id,vE=()=>!0,yE=[],xE=z_.filter((e=>!e.isPicker));function bE({header:e,search:t=!0,searchLabel:n}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.__experimentalHStack,{alignment:"top",justify:"space-between",className:"dataviews__view-actions",spacing:1,children:[(0,a.jsxs)(b.__experimentalHStack,{justify:"start",expanded:!1,className:"dataviews__search",children:[t&&(0,a.jsx)(Kk,{label:n}),(0,a.jsx)(q_,{})]}),(0,a.jsxs)(b.__experimentalHStack,{spacing:1,expanded:!1,style:{flexShrink:0},children:[(0,a.jsx)(mE,{}),e]})]}),(0,a.jsx)(Gk,{className:"dataviews-filters__container"}),(0,a.jsx)(Wk,{}),(0,a.jsx)(Yk,{})]})}const wE=function({view:e,onChangeView:t,fields:n,search:s=!0,searchLabel:i,actions:r=yE,data:o,getItemId:l=gE,getItemLevel:c,isLoading:u=!1,paginationInfo:d,defaultLayouts:p,selection:f,onChangeSelection:m,onClickItem:g,renderItemLink:v,isItemClickable:x=vE,header:b,children:w,config:_={perPageSizes:[10,20,50,100]},empty:j}){const{infiniteScrollHandler:S}=d,C=(0,h.useRef)(null),[k,E]=(0,h.useState)(0),P=(0,y.useResizeObserver)((e=>{E(e[0].borderBoxSize[0].inlineSize)}),{box:"border-box"}),[I,V]=(0,h.useState)([]),O=void 0===f||void 0===m,T=O?I:f,[A,N]=(0,h.useState)(null),F=(0,h.useMemo)((()=>Aw(n)),[n]),M=(0,h.useMemo)((()=>T.filter((e=>o.some((t=>l(t)===e))))),[T,o,l]),B=zk(F,e),D=(0,h.useMemo)((()=>(B||[]).some((e=>e.isPrimary||e.isLocked))),[B]),[R,L]=(0,h.useState)(D);(0,h.useEffect)((()=>{D&&!R&&L(!0)}),[D,R]),(0,h.useEffect)((()=>{if(!e.infiniteScrollEnabled||!C.current)return;const t=(0,y.throttle)((e=>{const t=e.target,n=t.scrollTop,s=t.scrollHeight;n+t.clientHeight>=s-100&&S?.()}),100),n=C.current;return n.addEventListener("scroll",t),()=>{n.removeEventListener("scroll",t),t.cancel()}}),[S,e.infiniteScrollEnabled]);const z=(0,h.useMemo)((()=>Object.fromEntries(Object.entries(p).filter((([e])=>xE.some((t=>t.type===e)))))),[p]);return z[e.type]?(0,a.jsx)(Rw.Provider,{value:{view:e,onChangeView:t,fields:F,actions:r,data:o,isLoading:u,paginationInfo:d,selection:M,onChangeSelection:function(e){const t="function"==typeof e?e(T):e;O&&V(t),m&&m(t)},openedFilter:A,setOpenedFilter:N,getItemId:l,getItemLevel:c,isItemClickable:x,onClickItem:g,renderItemLink:v,containerWidth:k,containerRef:C,resizeObserverRef:P,defaultLayouts:z,filters:B,isShowingFilter:R,setIsShowingFilter:L,config:_,empty:j,hasInfiniteScrollHandler:!!S},children:(0,a.jsx)("div",{className:"dataviews-wrapper",ref:C,children:w??(0,a.jsx)(bE,{header:b,search:s,searchLabel:i})})}):null};wE.BulkActionToolbar=c_,wE.Filters=Hk,wE.FiltersToggled=Gk,wE.FiltersToggle=q_,wE.Layout=Wk,wE.LayoutSwitcher=sE,wE.Pagination=Uk,wE.Search=Kk,wE.ViewConfig=pE,wE.Footer=Yk;var _E=wE,jE=i(7951);function SE(){const e=(0,c.useSelect)((e=>{const{getSettings:t}=ne(e(Rt));return t()}),[]),t=e.__experimentalAdditionalBlockPatterns??e.__experimentalBlockPatterns,n=(0,c.useSelect)((e=>e(j.store).getBlockPatterns()),[]),s=(0,h.useMemo)((()=>[...t||[],...n||[]].filter(hy)),[t,n]);return(0,h.useMemo)((()=>{const{__experimentalAdditionalBlockPatterns:t,...n}=e;return{...n,__experimentalBlockPatterns:s,isPreviewMode:!0}}),[e,s])}var CE=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})}),kE=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})});const{useHistory:EE,useLocation:PE}=ne(Lt.privateApis),{CreatePatternModal:IE,useAddPatternCategory:VE}=ne(_e.privateApis),{CreateTemplatePartModal:OE}=ne(f.privateApis);function TE(){const e=EE(),t=PE(),[n,s]=(0,h.useState)(!1),[i,r]=(0,h.useState)(!1),{createPatternFromFile:o}=ne((0,c.useDispatch)(_e.store)),{createSuccessNotice:l,createErrorNotice:u}=(0,c.useDispatch)(_.store),d=(0,h.useRef)(),{isBlockBasedTheme:p,addNewPatternLabel:f,addNewTemplatePartLabel:m,canCreatePattern:g,canCreateTemplatePart:v}=(0,c.useSelect)((e=>{const{getCurrentTheme:t,getPostType:n,canUser:s}=e(j.store);return{isBlockBasedTheme:t()?.is_block_theme,addNewPatternLabel:n(Ie.user)?.labels?.add_new_item,addNewTemplatePartLabel:n(Ce)?.labels?.add_new_item,canCreatePattern:s("create",{kind:"postType",name:Ie.user}),canCreateTemplatePart:s("create",{kind:"postType",name:Ce})}}),[]);function y(){s(!1),r(!1)}const x=[];g&&x.push({icon:Ra,onClick:()=>s(!0),title:f}),p&&v&&x.push({icon:CE,onClick:()=>r(!0),title:m}),g&&x.push({icon:kE,onClick:()=>{d.current.click()},title:(0,w.__)("Import pattern from JSON")});const{categoryMap:S,findOrCreateTerm:C}=VE();return 0===x.length?null:(0,a.jsxs)(a.Fragment,{children:[f&&(0,a.jsx)(b.DropdownMenu,{controls:x,icon:null,toggleProps:{variant:"primary",showTooltip:!1,__next40pxDefaultSize:!0},text:f,label:f}),n&&(0,a.jsx)(IE,{onClose:()=>s(!1),onSuccess:function({pattern:t}){s(!1),e.navigate(`/${Ie.user}/${t.id}?canvas=edit`)},onError:y}),i&&(0,a.jsx)(OE,{closeModal:()=>r(!1),blocks:[],onCreate:function(t){r(!1),e.navigate(`/${Ce}/${t.id}?canvas=edit`)},onError:y}),(0,a.jsx)("input",{type:"file",accept:".json",hidden:!0,ref:d,onChange:async n=>{const s=n.target.files?.[0];if(s)try{let n;if(t.query.postType!==Ce){const e=Array.from(S.values()).find((e=>e.name===t.query.categoryId));e&&(n=e.id||await C(e.label))}const i=await o(s,n?[n]:void 0);n||"my-patterns"===t.query.categoryId||e.navigate(`/pattern?categoryId=${Ve}`),l((0,w.sprintf)((0,w.__)('Imported "%s" from JSON.'),i.title.raw),{type:"snackbar",id:"import-pattern-success"})}catch(e){u(e.message,{type:"snackbar",id:"import-pattern-error"})}finally{n.target.value=""}}})]})}const{RenamePatternCategoryModal:AE}=ne(_e.privateApis);function NE({category:e,onClose:t}){const[n,s]=(0,h.useState)(!1);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.MenuItem,{onClick:()=>s(!0),children:(0,w.__)("Rename")}),n&&(0,a.jsx)(FE,{category:e,onClose:()=>{s(!1),t()}})]})}function FE({category:e,onClose:t}){const n={id:e.id,slug:e.slug,name:e.label},s=Iy();return(0,a.jsx)(AE,{category:n,existingCategories:s,onClose:t,overlayClassName:"edit-site-list__rename-modal",focusOnMount:"firstContentElement",size:"small"})}const{useHistory:ME}=ne(Lt.privateApis);function BE({category:e,onClose:t}){const[n,s]=(0,h.useState)(!1),i=ME(),{createSuccessNotice:r,createErrorNotice:o}=(0,c.useDispatch)(_.store),{deleteEntityRecord:l,invalidateResolution:u}=(0,c.useDispatch)(j.store);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.MenuItem,{isDestructive:!0,onClick:()=>s(!0),children:(0,w.__)("Delete")}),(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:n,onConfirm:async()=>{try{await l("taxonomy","wp_pattern_category",e.id,{force:!0},{throwOnError:!0}),u("getUserPatternCategories"),u("getEntityRecords",["postType",Ie.user,{per_page:-1}]),r((0,w.sprintf)((0,w._x)('"%s" deleted.',"pattern category"),e.label),{type:"snackbar",id:"pattern-category-delete"}),t?.(),i.navigate(`/pattern?categoryId=${Ve}`)}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,w.__)("An error occurred while deleting the pattern category.");o(t,{type:"snackbar",id:"pattern-category-delete"})}},onCancel:()=>s(!1),confirmButtonText:(0,w.__)("Delete"),className:"edit-site-patterns__delete-modal",title:(0,w.sprintf)((0,w._x)('Delete "%s"?',"pattern category"),(0,qt.decodeEntities)(e.label)),size:"medium",__experimentalHideHeader:!1,children:(0,w.sprintf)((0,w.__)('Are you sure you want to delete the category "%s"? The patterns will not be deleted.'),(0,qt.decodeEntities)(e.label))})]})}function DE({categoryId:e,type:t}){const{patternCategories:n}=Iy();let s;return t===Ie.user&&e&&(s=n.find((t=>t.name===e))),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(TE,{}),!!s?.id&&(0,a.jsx)(b.DropdownMenu,{icon:No,label:(0,w.__)("Actions"),toggleProps:{className:"edit-site-patterns__button",size:"compact"},children:({onClose:e})=>(0,a.jsxs)(b.MenuGroup,{children:[(0,a.jsx)(NE,{category:s,onClose:e}),(0,a.jsx)(BE,{category:s,onClose:e})]})})]})}var RE=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});const{useHistory:LE}=ne(Lt.privateApis),zE=()=>{const e=LE();return(0,h.useMemo)((()=>({id:"edit-post",label:(0,w.__)("Edit"),isPrimary:!0,icon:RE,isEligible:e=>"trash"!==e.status&&e.type!==Ie.theme,callback(t){const n=t[0];e.navigate(`/${n.type}/${n.id}?canvas=edit`)}})),[e])};var HE=(0,a.jsx)(Zt.SVG,{xmlns:"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{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",d:"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",clipRule:"evenodd"})});function UE(e,t){return(0,c.useSelect)((n=>{const{getEntityRecord:s,getUser:i,getEditedEntityRecord:r}=n(j.store),a=r("postType",e,t),o=a?.original_source,l=a?.author_text;switch(o){case"theme":return{type:o,icon:Da,text:l,isCustomized:a.source===ke};case"plugin":return{type:o,icon:HE,text:l,isCustomized:a.source===ke};case"site":{const e=s("root","__unstableBase");return{type:o,icon:GE,imageUrl:e?.site_logo?s("postType","attachment",e.site_logo)?.source_url:void 0,text:l,isCustomized:!1}}default:{const e=i(a.author);return{type:"user",icon:WE,imageUrl:e?.avatar_urls?.[48],text:l,isCustomized:!1}}}}),[e,t])}const{useGlobalStyle:qE}=ne(x.privateApis);const ZE={label:(0,w.__)("Preview"),id:"preview",render:function({item:e}){const t=(0,h.useId)(),n=e.description||e?.excerpt?.raw,s=e.type===Ce,[i]=qE("color.background"),r=(0,h.useMemo)((()=>e.blocks??(0,o.parse)(e.content.raw,{__unstableSkipMigrationLogs:!0})),[e?.content?.raw,e.blocks]),l=!r?.length;return(0,a.jsxs)("div",{className:"page-patterns-preview-field",style:{backgroundColor:i},"aria-describedby":n?t:void 0,children:[l&&s&&(0,w.__)("Empty template part"),l&&!s&&(0,w.__)("Empty pattern"),!l&&(0,a.jsx)(x.BlockPreview.Async,{children:(0,a.jsx)(x.BlockPreview,{blocks:r,viewportWidth:e.viewportWidth})}),!!n&&(0,a.jsx)("div",{hidden:!0,id:t,children:n})]})},enableSorting:!1},YE=[{value:Ae.full,label:(0,w._x)("Synced","pattern (singular)"),description:(0,w.__)("Patterns that are kept in sync across the site.")},{value:Ae.unsynced,label:(0,w._x)("Not synced","pattern (singular)"),description:(0,w.__)("Patterns that can be changed freely without affecting the site.")}],KE={label:(0,w.__)("Sync status"),id:"sync-status",render:({item:e})=>{const t="wp_pattern_sync_status"in e?e.wp_pattern_sync_status||Ae.full:Ae.unsynced;return(0,a.jsx)("span",{className:`edit-site-patterns__field-sync-status-${t}`,children:YE.find((({value:e})=>e===t)).label})},elements:YE,filterBy:{operators:["is"],isPrimary:!0},enableSorting:!1};const XE={label:(0,w.__)("Author"),id:"author",getValue:({item:e})=>e.author_text,render:function({item:e}){const[t,n]=(0,h.useState)(!1),{text:s,icon:i,imageUrl:r}=UE(e.type,e.id);return(0,a.jsxs)(b.__experimentalHStack,{alignment:"left",spacing:0,children:[r&&(0,a.jsx)("div",{className:Ht("page-templates-author-field__avatar",{"is-loaded":t}),children:(0,a.jsx)("img",{onLoad:()=>n(!0),alt:"",src:r})}),!r&&(0,a.jsx)("div",{className:"page-templates-author-field__icon",children:(0,a.jsx)(qa,{icon:i})}),(0,a.jsx)("span",{className:"page-templates-author-field__name",children:s})]})},filterBy:{isPrimary:!0}},{ExperimentalBlockEditorProvider:QE}=ne(x.privateApis),{usePostActions:JE,patternTitleField:$E}=ne(f.privateApis),{useLocation:eP,useHistory:tP}=ne(Lt.privateApis),nP=[],sP={[Be]:{layout:{styles:{author:{width:"1%"}}}},[Me]:{layout:{badgeFields:["sync-status"]}}},iP={type:Me,perPage:20,titleField:"title",mediaField:"preview",fields:["sync-status"],filters:[],...sP[Me]};function rP(){const{path:e,query:t}=eP(),{postType:n="wp_block",categoryId:s}=t,i=tP(),r=s||Ve,{view:o,updateView:l,isModified:u,resetToDefault:d}=(0,jE.useView)({kind:"postType",name:n,slug:r,defaultView:iP,queryParams:{page:t.pageNumber,search:t.search},onChangeQueryParams:n=>{i.navigate((0,Qt.addQueryArgs)(e,{...t,pageNumber:n.page,search:n.search}))}}),p=o.filters?.find((({field:e})=>"sync-status"===e))?.value,{patterns:f,isResolving:m}=Py(n,r,{search:o.search,syncStatus:p}),{records:g}=(0,j.useEntityRecords)("postType",Ce,{per_page:-1}),v=(0,h.useMemo)((()=>{if(!g)return nP;const e=new Set;return g.forEach((t=>{e.add(t.author_text)})),Array.from(e).map((e=>({value:e,label:e})))}),[g]),y=(0,h.useMemo)((()=>{const e=[ZE,$E];return n===Ie.user?e.push(KE):n===Ce&&e.push({...XE,elements:v}),e}),[n,v]),{data:x,paginationInfo:_}=(0,h.useMemo)((()=>{const e={...o};return delete e.search,n!==Ce&&(e.filters=[]),Bw(f,e,y)}),[f,o,y,n]),S=function(e){const t=(0,h.useMemo)((()=>e?.filter((e=>e.type!==Ie.theme)).map((e=>[e.type,e.id]))??[]),[e]),n=(0,c.useSelect)((e=>{const{getEntityRecordPermissions:n}=ne(e(j.store));return t.reduce(((e,[t,s])=>(e[s]=n("postType",t,s),e)),{})}),[t]);return(0,h.useMemo)((()=>e?.map((e=>({...e,permissions:n?.[e.id]??{}})))??[]),[e,n])}(x),C=JE({postType:Ce,context:"list"}),k=JE({postType:Ie.user,context:"list"}),E=zE(),P=(0,h.useMemo)((()=>n===Ce?[E,...C].filter(Boolean):[E,...k].filter(Boolean)),[E,n,C,k]),I=SE(),{title:V,description:O}=function(e,t){const{patternCategories:n}=Iy(),s=(0,c.useSelect)((e=>e(j.store).getCurrentTheme()?.default_template_part_areas||[]),[]);let i,r,a;if(e===Ce){const e=s.find((e=>e.area===t));i=e?.label||(0,w.__)("All Template Parts"),r=e?.description||(0,w.__)("Includes every template part defined for any area.")}else e===Ie.user&&t&&(a=n.find((e=>e.name===t)),i=a?.label,r=a?.description);return{title:i,description:r}}(n,r);return(0,a.jsx)(QE,{settings:I,children:(0,a.jsx)(Wm,{className:"edit-site-page-patterns-dataviews",title:V,subTitle:O,actions:(0,a.jsxs)(a.Fragment,{children:[u&&(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,onClick:d,children:(0,w.__)("Reset view")}),(0,a.jsx)(DE,{})]}),children:(0,a.jsx)(_E,{paginationInfo:_,fields:y,actions:P,data:S||nP,getItemId:e=>e.name??e.id,isLoading:m,isItemClickable:e=>e.type!==Ie.theme,onClickItem:e=>{i.navigate(`/${e.type}/${[Ie.user,Ce].includes(e.type)?e.id:e.name}?canvas=edit`)},view:o,onChangeView:l,defaultLayouts:sP},r+n)})})}const aP={name:"patterns",path:"/pattern",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme,n=t||_v(e)?"/":void 0;return(0,a.jsx)(Ay,{backPath:n})},content:(0,a.jsx)(rP,{}),mobile({siteData:e,query:t}){const{categoryId:n}=t,s=e.currentTheme?.is_block_theme,i=s||_v(e)?"/":void 0;return n?(0,a.jsx)(rP,{}):(0,a.jsx)(Ay,{backPath:i})}}},oP={name:"pattern-item",path:"/wp_block/:postId",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme,n=t||_v(e)?"/":void 0;return(0,a.jsx)(Ay,{backPath:n})},mobile:(0,a.jsx)(wv,{}),preview:(0,a.jsx)(wv,{})}},lP={name:"template-part-item",path:"/wp_template_part/*postId",areas:{sidebar:(0,a.jsx)(Ay,{backPath:"/"}),mobile:(0,a.jsx)(wv,{}),preview:(0,a.jsx)(wv,{})}},{useLocation:cP}=ne(Lt.privateApis),uP=[];function dP({template:e,isActive:t}){const{text:n,icon:s}=UE(e.type,e.id);return(0,a.jsx)(Qa,{to:(0,Qt.addQueryArgs)("/template",{activeView:n}),icon:s,"aria-current":t,children:n})}function hP(){const{query:{activeView:e="all"}}=cP(),{records:t}=(0,j.useEntityRecords)("postType",Se,{per_page:-1}),n=(0,h.useMemo)((()=>{const e=t?.reduce(((e,t)=>{const n=t.author_text;return n&&!e[n]&&(e[n]=t),e}),{});return(e&&Object.values(e))??uP}),[t]);return(0,a.jsxs)(b.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-templates-browse",children:[(0,a.jsx)(Qa,{to:"/template",icon:Da,"aria-current":"all"===e,children:(0,w.__)("All templates")}),n.map((t=>(0,a.jsx)(dP,{template:t,isActive:e===t.author_text},t.author_text)))]})}function pP({backPath:e}){return(0,a.jsx)(Ua,{title:(0,w.__)("Templates"),description:(0,w.__)("Create new templates, or reset any customizations made to the templates supplied by your theme."),backPath:e,content:(0,a.jsx)(hP,{})})}var fP=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})}),mP=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})}),gP=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z"})}),vP=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z"})}),yP=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm.5 12c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v10zm-11-7.6h-.7l-3.1 4.3h2.8V15h1v-1.3h.7v-.8h-.7V9.4zm-.9 3.5H6.3l1.2-1.7v1.7zm5.6-3.2c-.4-.2-.8-.4-1.2-.4-.5 0-.9.1-1.2.4-.4.2-.6.6-.8 1-.2.4-.3.9-.3 1.5s.1 1.1.3 1.6c.2.4.5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://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z"})}),_P=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})}),jP=(0,a.jsxs)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,a.jsx)(Zt.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})]}),SP=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})});const CP={},kP=(e,t)=>{let n=e;return t.split(".").forEach((e=>{n=n?.[e]})),n};function EP(e,t){return`${e}-${(0,Qt.safeDecodeURI)(t)}`}const PP=()=>(0,c.useSelect)((e=>e(j.store).getEntityRecords("postType",Se,{per_page:-1})),[]),IP=()=>(0,c.useSelect)((e=>e(j.store).getCurrentTheme()?.default_template_types||[]),[]),VP=()=>{const e=(0,c.useSelect)((e=>e(j.store).getPostTypes({per_page:-1})),[]);return(0,h.useMemo)((()=>{const t=["attachment"];return e?.filter((({viewable:e,slug:n})=>e&&!t.includes(n))).sort(((e,t)=>"post"===e.slug||"post"===t.slug?0:e.name.localeCompare(t.name)))}),[e])};function OP(){const e=VP(),t=(0,h.useMemo)((()=>e?.filter((e=>e.has_archive))),[e]),n=PP(),s=(0,h.useMemo)((()=>e?.reduce(((e,{labels:t})=>{const n=t.singular_name.toLowerCase();return e[n]=(e[n]||0)+1,e}),{})),[e]),i=(0,h.useCallback)((({labels:e,slug:t})=>{const n=e.singular_name.toLowerCase();return s[n]>1&&n!==t}),[s]);return(0,h.useMemo)((()=>t?.filter((e=>!(n||[]).some((t=>t.slug==="archive-"+e.slug)))).map((e=>{let t;return t=i(e)?(0,w.sprintf)((0,w.__)("Archive: %1$s (%2$s)"),e.labels.singular_name,e.slug):(0,w.sprintf)((0,w.__)("Archive: %s"),e.labels.singular_name),{slug:"archive-"+e.slug,description:(0,w.sprintf)((0,w.__)("Displays an archive with the latest posts of type: %s."),e.labels.singular_name),title:t,icon:"string"==typeof e.icon&&e.icon.startsWith("dashicons-")?e.icon.slice(10):vP,templatePrefix:"archive"}}))||[]),[t,n,i])}const TP=e=>{const t=(()=>{const e=(0,c.useSelect)((e=>e(j.store).getTaxonomies({per_page:-1})),[]);return(0,h.useMemo)((()=>e?.filter((({visibility:e})=>e?.publicly_queryable))),[e])})(),n=PP(),s=IP(),i=(0,h.useMemo)((()=>t?.reduce(((e,{slug:t})=>{let n=t;return["category","post_tag"].includes(t)||(n=`taxonomy-${n}`),"post_tag"===t&&(n="tag"),e[t]=n,e}),{})),[t]),r=t?.reduce(((e,{labels:t})=>{const n=(t.template_name||t.singular_name).toLowerCase();return e[n]=(e[n]||0)+1,e}),{}),a=MP("taxonomy",i),o=(n||[]).map((({slug:e})=>e)),l=(t||[]).reduce(((t,n)=>{const{slug:l,labels:c}=n,u=i[l],d=s?.find((({slug:e})=>e===u)),h=o?.includes(u),p=((e,t)=>{if(["category","post_tag"].includes(t))return!1;const n=(e.template_name||e.singular_name).toLowerCase();return r[n]>1&&n!==t})(c,l);let f=c.template_name||c.singular_name;p&&(f=c.template_name?(0,w.sprintf)((0,w._x)("%1$s (%2$s)","taxonomy template menu label"),c.template_name,l):(0,w.sprintf)((0,w._x)("%1$s (%2$s)","taxonomy menu label"),c.singular_name,l));const m=d?{...d,templatePrefix:i[l]}:{slug:u,title:f,description:(0,w.sprintf)((0,w.__)("Displays taxonomy: %s."),c.singular_name),icon:bP,templatePrefix:i[l]},g=a?.[l]?.hasEntities;return g&&(m.onClick=t=>{e({type:"taxonomy",slug:l,config:{queryArgs:({search:e})=>({_fields:"id,name,slug,link",orderBy:e?"name":"count",exclude:a[l].existingEntitiesIds}),getSpecificTemplate:e=>{const t=EP(i[l],e.slug);return{title:t,slug:t,templatePrefix:i[l]}}},labels:c,hasGeneralTemplate:h,template:t})}),h&&!g||t.push(m),t}),[]);return(0,h.useMemo)((()=>l.reduce(((e,t)=>{const{slug:n}=t;let s="taxonomiesMenuItems";return["category","tag"].includes(n)&&(s="defaultTaxonomiesMenuItems"),e[s].push(t),e}),{defaultTaxonomiesMenuItems:[],taxonomiesMenuItems:[]})),[l])},AP={user:"author"},NP={user:{who:"authors"}};const FP=(e,t,n={})=>{const s=(e=>{const t=PP();return(0,h.useMemo)((()=>Object.entries(e||{}).reduce(((e,[n,s])=>{const i=(t||[]).reduce(((e,t)=>{const n=`${s}-`;return t.slug.startsWith(n)&&e.push(t.slug.substring(n.length)),e}),[]);return i.length&&(e[n]=i),e}),{})),[e,t])})(t);return(0,c.useSelect)((t=>Object.entries(s||{}).reduce(((s,[i,r])=>{const a=t(j.store).getEntityRecords(e,i,{_fields:"id",context:"view",slug:r,...n[i]});return a?.length&&(s[i]=a),s}),{})),[s])},MP=(e,t,n=CP)=>{const s=FP(e,t,n),i=(0,c.useSelect)((i=>Object.keys(t||{}).reduce(((t,r)=>{const a=s?.[r]?.map((({id:e})=>e))||[];return t[r]=!!i(j.store).getEntityRecords(e,r,{per_page:1,_fields:"id",context:"view",exclude:a,...n[r]})?.length,t}),{})),[t,s,e,n]);return(0,h.useMemo)((()=>Object.keys(t||{}).reduce(((e,t)=>{const n=s?.[t]?.map((({id:e})=>e))||[];return e[t]={hasEntities:i[t],existingEntitiesIds:n},e}),{})),[t,s,i])},BP=[];function DP({suggestion:e,search:t,onSelect:n,entityForSuggestions:s}){const i="edit-site-custom-template-modal__suggestions_list__list-item";return(0,a.jsxs)(b.Composite.Item,{render:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,role:"option",className:i,onClick:()=>n(s.config.getSpecificTemplate(e))}),children:[(0,a.jsx)(b.__experimentalText,{size:"body",lineHeight:1.53846153846,weight:500,className:`${i}__title`,children:(0,a.jsx)(b.TextHighlight,{text:(0,qt.decodeEntities)(e.name),highlight:t})}),e.link&&(0,a.jsx)(b.__experimentalText,{size:"body",lineHeight:1.53846153846,className:`${i}__info`,children:(0,Qt.safeDecodeURI)(e.link)})]})}function RP(e,t){const{config:n}=e,s=(0,h.useMemo)((()=>({order:"asc",context:"view",search:t,per_page:t?20:10,...n.queryArgs(t)})),[t,n]),{records:i,hasResolved:r}=(0,j.useEntityRecords)(e.type,e.slug,s),[a,o]=(0,h.useState)(BP);return(0,h.useEffect)((()=>{if(!r)return;let e=BP;var t,s;i?.length&&(e=i,n.recordNamePath&&(t=e,s=n.recordNamePath,e=(t||[]).map((e=>({...e,name:(0,qt.decodeEntities)(kP(e,s))}))))),o(e)}),[i,r]),a}function LP({entityForSuggestions:e,onSelect:t}){const[n,s,i]=(0,y.useDebouncedInput)(),r=RP(e,i),{labels:o}=e,[l,c]=(0,h.useState)(!1);return!l&&r?.length>9&&c(!0),(0,a.jsxs)(a.Fragment,{children:[l&&(0,a.jsx)(b.SearchControl,{__nextHasNoMarginBottom:!0,onChange:s,value:n,label:o.search_items,placeholder:o.search_items}),!!r?.length&&(0,a.jsx)(b.Composite,{orientation:"vertical",role:"listbox",className:"edit-site-custom-template-modal__suggestions_list","aria-label":(0,w.__)("Suggestions list"),children:r.map((n=>(0,a.jsx)(DP,{suggestion:n,search:i,onSelect:t,entityForSuggestions:e},n.slug)))}),i&&!r?.length&&(0,a.jsx)(b.__experimentalText,{as:"p",className:"edit-site-custom-template-modal__no-results",children:o.not_found})]})}var zP=function({onSelect:e,entityForSuggestions:t,onBack:n,containerRef:s}){const[i,r]=(0,h.useState)(t.hasGeneralTemplate);return(0,h.useEffect)((()=>{if(s.current){const[e]=en.focus.focusable.find(s.current);e?.focus()}}),[i]),(0,a.jsxs)(b.__experimentalVStack,{spacing:4,className:"edit-site-custom-template-modal__contents-wrapper",alignment:"left",children:[!i&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.__experimentalText,{as:"p",children:(0,w.__)("Select whether to create a single template for all items or a specific one.")}),(0,a.jsxs)(b.Flex,{className:"edit-site-custom-template-modal__contents",gap:"4",align:"initial",children:[(0,a.jsxs)(b.FlexItem,{isBlock:!0,as:b.Button,onClick:()=>{const{slug:n,title:s,description:i,templatePrefix:r}=t.template;e({slug:n,title:s,description:i,templatePrefix:r})},children:[(0,a.jsx)(b.__experimentalText,{as:"span",weight:500,lineHeight:1.53846153846,children:t.labels.all_items}),(0,a.jsx)(b.__experimentalText,{as:"span",lineHeight:1.53846153846,children:(0,w.__)("For all items")})]}),(0,a.jsxs)(b.FlexItem,{isBlock:!0,as:b.Button,onClick:()=>{r(!0)},children:[(0,a.jsx)(b.__experimentalText,{as:"span",weight:500,lineHeight:1.53846153846,children:t.labels.singular_name}),(0,a.jsx)(b.__experimentalText,{as:"span",lineHeight:1.53846153846,children:(0,w.__)("For a specific item")})]})]}),(0,a.jsx)(b.Flex,{justify:"right",children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:n,children:(0,w.__)("Back")})})]}),i&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.__experimentalText,{as:"p",children:(0,w.__)("This template will be used only for the specific item chosen.")}),(0,a.jsx)(LP,{entityForSuggestions:t,onSelect:e}),(0,a.jsx)(b.Flex,{justify:"right",children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t.hasGeneralTemplate?n():r(!1)},children:(0,w.__)("Back")})})]})]})};var HP=function(){return HP=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},HP.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function GP(e){return e.toLowerCase()}var WP=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],UP=/[^A-Z0-9]+/gi;function qP(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function ZP(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,s=void 0===n?WP:n,i=t.stripRegexp,r=void 0===i?UP:i,a=t.transform,o=void 0===a?GP:a,l=t.delimiter,c=void 0===l?" ":l,u=qP(qP(e,s,"$1\0$2"),r,"\0"),d=0,h=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(h-1);)h--;return u.slice(d,h).split("\0").map(o).join(c)}(e,HP({delimiter:"."},t))}var YP=function({createTemplate:e,onBack:t}){const[n,s]=(0,h.useState)(""),i=(0,w.__)("Custom Template"),[r,o]=(0,h.useState)(!1),l=(0,h.useRef)();return(0,h.useEffect)((()=>{l.current&&l.current.focus()}),[]),(0,a.jsx)("form",{onSubmit:async function(t){if(t.preventDefault(),!r){o(!0);try{await e({slug:(s=n||i,void 0===a&&(a={}),ZP(s,HP({delimiter:"-"},a))||"wp-custom-template"),title:n||i},!1)}finally{o(!1)}var s,a}},children:(0,a.jsxs)(b.__experimentalVStack,{spacing:6,children:[(0,a.jsx)(b.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,w.__)("Name"),value:n,onChange:s,placeholder:i,disabled:r,ref:l,help:(0,w.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,a.jsxs)(b.__experimentalHStack,{className:"edit-site-custom-generic-template__modal-actions",justify:"right",children:[(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,w.__)("Back")}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:r,"aria-disabled":r,children:(0,w.__)("Create")})]})]})})};const{useHistory:KP}=ne(Lt.privateApis),XP=["front-page","home","single","page","index","archive","author","category","date","tag","search","404"],QP={"front-page":fP,home:mP,single:gP,page:Ba,archive:vP,search:Yt,404:yP,index:xP,category:zw,author:WE,taxonomy:bP,date:wP,tag:_P,attachment:jP};function JP({title:e,direction:t,className:n,description:s,icon:i,onClick:r,children:o}){return(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,className:n,onClick:r,label:s,showTooltip:!!s,children:(0,a.jsxs)(b.Flex,{as:"span",spacing:2,align:"center",justify:"center",style:{width:"100%"},direction:t,children:[(0,a.jsx)("div",{className:"edit-site-add-new-template__template-icon",children:(0,a.jsx)(b.Icon,{icon:i})}),(0,a.jsxs)(b.__experimentalVStack,{className:"edit-site-add-new-template__template-name",alignment:"center",spacing:0,children:[(0,a.jsx)(b.__experimentalText,{align:"center",weight:500,lineHeight:1.53846153846,children:e}),o]})]})})}const $P=1,eI=2,tI=3;function nI({onClose:e}){const[t,n]=(0,h.useState)($P),[s,i]=(0,h.useState)({}),[r,o]=(0,h.useState)(!1),l=function(e,t){const n=PP(),s=IP(),i=(n||[]).map((({slug:e})=>e)),r=(s||[]).filter((e=>XP.includes(e.slug)&&!i.includes(e.slug))),a=n=>{t?.(),e(n)},o=[...r],{defaultTaxonomiesMenuItems:l,taxonomiesMenuItems:c}=TP(a),{defaultPostTypesMenuItems:u,postTypesMenuItems:d}=(e=>{const t=VP(),n=PP(),s=IP(),i=(0,h.useMemo)((()=>t?.reduce(((e,{labels:t})=>{const n=(t.template_name||t.singular_name).toLowerCase();return e[n]=(e[n]||0)+1,e}),{})),[t]),r=(0,h.useCallback)((({labels:e,slug:t})=>{const n=(e.template_name||e.singular_name).toLowerCase();return i[n]>1&&n!==t}),[i]),a=(0,h.useMemo)((()=>t?.reduce(((e,{slug:t})=>{let n=t;return"page"!==t&&(n=`single-${n}`),e[t]=n,e}),{})),[t]),o=MP("postType",a),l=(n||[]).map((({slug:e})=>e)),c=(t||[]).reduce(((t,n)=>{const{slug:i,labels:c,icon:u}=n,d=a[i],h=s?.find((({slug:e})=>e===d)),p=l?.includes(d),f=r(n);let m=c.template_name||(0,w.sprintf)((0,w.__)("Single item: %s"),c.singular_name);f&&(m=c.template_name?(0,w.sprintf)((0,w._x)("%1$s (%2$s)","post type menu label"),c.template_name,i):(0,w.sprintf)((0,w._x)("Single item: %1$s (%2$s)","post type menu label"),c.singular_name,i));const g=h?{...h,templatePrefix:a[i]}:{slug:d,title:m,description:(0,w.sprintf)((0,w.__)("Displays a single item: %s."),c.singular_name),icon:"string"==typeof u&&u.startsWith("dashicons-")?u.slice(10):SP,templatePrefix:a[i]},v=o?.[i]?.hasEntities;return v&&(g.onClick=t=>{e({type:"postType",slug:i,config:{recordNamePath:"title.rendered",queryArgs:({search:e})=>({_fields:"id,title,slug,link",orderBy:e?"relevance":"modified",exclude:o[i].existingEntitiesIds}),getSpecificTemplate:e=>{const t=EP(a[i],e.slug);return{title:t,slug:t,templatePrefix:a[i]}}},labels:c,hasGeneralTemplate:p,template:t})}),p&&!v||t.push(g),t}),[]),u=(0,h.useMemo)((()=>c.reduce(((e,t)=>{const{slug:n}=t;let s="postTypesMenuItems";return"page"===n&&(s="defaultPostTypesMenuItems"),e[s].push(t),e}),{defaultPostTypesMenuItems:[],postTypesMenuItems:[]})),[c]);return u})(a),p=function(e){const t=PP(),n=IP(),s=MP("root",AP,NP);let i=n?.find((({slug:e})=>"author"===e));i||(i={description:(0,w.__)("Displays latest posts written by a single author."),slug:"author",title:"Author"});const r=!!t?.find((({slug:e})=>"author"===e));if(s.user?.hasEntities&&(i={...i,templatePrefix:"author"},i.onClick=t=>{e({type:"root",slug:"user",config:{queryArgs:({search:e})=>({_fields:"id,name,slug,link",orderBy:e?"name":"registered_date",exclude:s.user.existingEntitiesIds,who:"authors"}),getSpecificTemplate:e=>{const t=EP("author",e.slug);return{title:t,slug:t,templatePrefix:"author"}}},labels:{singular_name:(0,w.__)("Author"),search_items:(0,w.__)("Search Authors"),not_found:(0,w.__)("No authors found."),all_items:(0,w.__)("All Authors")},hasGeneralTemplate:r,template:t})}),!r||s.user?.hasEntities)return i}(a);[...l,...u,p].forEach((e=>{if(!e)return;const t=o.findIndex((t=>t.slug===e.slug));t>-1?o[t]=e:o.push(e)})),o?.sort(((e,t)=>XP.indexOf(e.slug)-XP.indexOf(t.slug)));const f=[...o,...OP(),...d,...c];return f}(i,(()=>n(eI))),u=KP(),{saveEntityRecord:d}=(0,c.useDispatch)(j.store),{createErrorNotice:p,createSuccessNotice:f}=(0,c.useDispatch)(_.store),m=(0,h.useRef)(null),g=(0,y.useViewportMatch)("medium","<"),v=(0,c.useSelect)((e=>e(j.store).getEntityRecord("root","__unstableBase")?.home),[]),x={"front-page":v,date:(0,w.sprintf)((0,w.__)("E.g. %s"),v+"/"+(new Date).getFullYear())};async function S(e,t=!0){if(!r){o(!0);try{const{title:n,description:s,slug:i}=e,r=await d("postType",Se,{description:s,slug:i.toString(),status:"publish",title:n,is_wp_suggestion:t},{throwOnError:!0});u.navigate(`/${Se}/${r.id}?canvas=edit`),f((0,w.sprintf)((0,w.__)('"%s" successfully created.'),(0,qt.decodeEntities)(r.title?.rendered||n)||(0,w.__)("(no title)")),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,w.__)("An error occurred while creating the template.");p(t,{type:"snackbar"})}finally{o(!1)}}}(0,h.useEffect)((()=>{if(m.current&&t===$P){const[e]=en.focus.focusable.find(m.current);e?.focus()}}),[t]);let C=(0,w.__)("Add template");return t===eI?C=(0,w.sprintf)((0,w.__)("Add template: %s"),s.labels.singular_name):t===tI&&(C=(0,w.__)("Create custom template")),(0,a.jsxs)(b.Modal,{title:C,className:Ht("edit-site-add-new-template__modal",{"edit-site-add-new-template__modal_template_list":t===$P,"edit-site-custom-template-modal":t===eI}),onRequestClose:()=>{e(),n($P)},overlayClassName:t===tI?"edit-site-custom-generic-template__modal":void 0,ref:m,children:[t===$P&&(0,a.jsxs)(b.__experimentalGrid,{columns:g?2:3,gap:4,align:"flex-start",justify:"center",className:"edit-site-add-new-template__template-list__contents",children:[(0,a.jsx)(b.Flex,{className:"edit-site-add-new-template__template-list__prompt",children:(0,w.__)("Select what the new template should apply to:")}),l.map((e=>{const{title:t,slug:n,onClick:s}=e;return(0,a.jsx)(JP,{title:t,direction:"column",className:"edit-site-add-new-template__template-button",description:x[n],icon:QP[n]||Da,onClick:()=>s?s(e):S(e)},n)})),(0,a.jsx)(JP,{title:(0,w.__)("Custom template"),direction:"row",className:"edit-site-add-new-template__custom-template-button",icon:RE,onClick:()=>n(tI),children:(0,a.jsx)(b.__experimentalText,{lineHeight:1.53846153846,children:(0,w.__)("A custom template can be manually applied to any post or page.")})})]}),t===eI&&(0,a.jsx)(zP,{onSelect:S,entityForSuggestions:s,onBack:()=>n($P),containerRef:m}),t===tI&&(0,a.jsx)(YP,{createTemplate:S,onBack:()=>n($P)})]})}var sI=(0,h.memo)((function(){const[e,t]=(0,h.useState)(!1),{postType:n}=(0,c.useSelect)((e=>{const{getPostType:t}=e(j.store);return{postType:t(Se)}}),[]);return n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Button,{variant:"primary",onClick:()=>t(!0),label:n.labels.add_new_item,__next40pxDefaultSize:!0,children:n.labels.add_new_item}),e&&(0,a.jsx)(nI,{onClose:()=>t(!1)})]}):null}));const{useGlobalStyle:iI}=ne(x.privateApis);const rI={label:(0,w.__)("Preview"),id:"preview",render:function({item:e}){const t=SE(),[n="white"]=iI("color.background"),s=(0,h.useMemo)((()=>(0,o.parse)(e.content.raw)),[e.content.raw]),i=!s?.length;return(0,a.jsx)(f.EditorProvider,{post:e,settings:t,children:(0,a.jsxs)("div",{className:"page-templates-preview-field",style:{backgroundColor:n},children:[i&&(0,w.__)("Empty template"),!i&&(0,a.jsx)(x.BlockPreview.Async,{children:(0,a.jsx)(x.BlockPreview,{blocks:s})})]})})},enableSorting:!1},aI={label:(0,w.__)("Description"),id:"description",render:({item:e})=>e.description&&(0,qt.decodeEntities)(e.description),enableSorting:!1,enableGlobalSearch:!0};const oI={label:(0,w.__)("Author"),id:"author",getValue:({item:e})=>e.author_text,render:function({item:e}){const[t,n]=(0,h.useState)(!1),{text:s,icon:i,imageUrl:r}=UE(e.type,e.id);return(0,a.jsxs)(b.__experimentalHStack,{alignment:"left",spacing:0,children:[r&&(0,a.jsx)("div",{className:Ht("page-templates-author-field__avatar",{"is-loaded":t}),children:(0,a.jsx)("img",{onLoad:()=>n(!0),alt:"",src:r})}),!r&&(0,a.jsx)("div",{className:"page-templates-author-field__icon",children:(0,a.jsx)(b.Icon,{icon:i})}),(0,a.jsx)("span",{className:"page-templates-author-field__name",children:s})]})}},lI={table:{showMedia:!1},grid:{showMedia:!0},list:{showMedia:!1}},cI={type:"grid",perPage:20,sort:{field:"title",direction:"asc"},titleField:"title",descriptionField:"description",mediaField:"preview",fields:["author","active","slug"],filters:[],...lI.grid};function uI(e){return{...cI,filters:["active","user"].includes(e)?[]:[{field:"author",operator:"isAny",value:[e]}]}}const{usePostActions:dI,templateTitleField:hI}=ne(f.privateApis),{useHistory:pI,useLocation:fI}=ne(Lt.privateApis),{useEntityRecordsWithPermissions:mI}=ne(j.privateApis);function gI(){const{path:e,query:t}=fI(),{activeView:n="active",postId:s}=t,[i,r]=(0,h.useState)([s]),o=(0,h.useMemo)((()=>uI(n)),[n]),{view:l,updateView:c,isModified:u,resetToDefault:d}=(0,jE.useView)({kind:"postType",name:Se,slug:n,defaultView:o,queryParams:{page:t.pageNumber,search:t.search},onChangeQueryParams:n=>{m.navigate((0,Qt.addQueryArgs)(e,{...t,pageNumber:n.page,search:n.search||void 0}))}}),{records:p,isResolving:f}=mI("postType",Se,{per_page:-1}),m=pI(),g=(0,h.useCallback)((t=>{r(t),"list"===l?.type&&m.navigate((0,Qt.addQueryArgs)(e,{postId:1===t.length?t[0]:void 0}))}),[m,e,l?.type]),v=(0,h.useMemo)((()=>{if(!p)return[];const e=new Set;return p.forEach((t=>{e.add(t.author_text)})),Array.from(e).map((e=>({value:e,label:e})))}),[p]),x=(0,h.useMemo)((()=>[rI,hI,aI,{...oI,elements:v}]),[v]),{data:_,paginationInfo:j}=(0,h.useMemo)((()=>Bw(p,l,x)),[p,l,x]),S=dI({postType:Se,context:"list"}),C=zE(),k=(0,h.useMemo)((()=>[C,...S]),[S,C]),E=(0,y.useEvent)((e=>{e.type!==l.type&&m.invalidate(),c(e)}));return(0,a.jsx)(Wm,{className:"edit-site-page-templates",title:(0,w.__)("Templates"),actions:(0,a.jsxs)(a.Fragment,{children:[u&&(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,onClick:()=>{d(),m.invalidate()},children:(0,w.__)("Reset view")}),(0,a.jsx)(sI,{})]}),children:(0,a.jsx)(_E,{paginationInfo:j,fields:x,actions:k,data:_,isLoading:f,view:l,onChangeView:E,onChangeSelection:g,isItemClickable:()=>!0,onClickItem:({id:e})=>{m.navigate(`/wp_template/${e}?canvas=edit`)},selection:i,defaultLayouts:lI},n)})}async function vI(e){const{activeView:t="active"}=e;return"list"===(await(0,jE.loadView)({kind:"postType",name:"wp_template",slug:t,defaultView:uI(t)})).type}const yI={name:"templates",path:"/template",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(pP,{backPath:"/"}):(0,a.jsx)(uo,{})},content({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(gI,{}):void 0},async preview({query:e,siteData:t}){const n=t.currentTheme?.is_block_theme;if(!n)return;return await vI(e)?(0,a.jsx)(wv,{}):void 0},mobile({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(gI,{}):(0,a.jsx)(uo,{})}},widths:{content:async({query:e})=>await vI(e)?380:void 0}},xI={name:"template-item",path:"/wp_template/*postId",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(pP,{backPath:"/"}):(0,a.jsx)(uo,{})},mobile({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(wv,{}):(0,a.jsx)(uo,{})},preview({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(wv,{}):(0,a.jsx)(uo,{})}}},{useLocation:bI}=ne(Lt.privateApis);function wI({title:e,slug:t,type:n,icon:s,isActive:i,suffix:r}){const{path:o}=bI(),l=s||z_.find((e=>e.type===n)).icon;return"all"===t&&(t=void 0),(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-start",className:Ht("edit-site-sidebar-dataviews-dataview-item",{"is-selected":i}),children:[(0,a.jsx)(Qa,{icon:l,to:(0,Qt.addQueryArgs)(o,{activeView:t}),"aria-current":i?"true":void 0,children:e}),r]})}var _I=(0,a.jsxs)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,a.jsx)(Zt.Path,{d:"M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z"}),(0,a.jsx)(Zt.Path,{d:"M16 2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2ZM6 3.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5Z"}),(0,a.jsx)(Zt.Path,{d:"M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z"})]}),jI=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z"})}),SI=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm9 1V8h-1.5v3.5h-2V13H13Z"})}),CI=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 0 4-4H8a4 4 0 0 0 4 4Z"})}),kI=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 1-4-4h4V8a4 4 0 0 1 0 8Z"})}),EI=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5A6.5 6.5 0 0 1 6.93 7.931l9.139 9.138A6.473 6.473 0 0 1 12 18.5Zm5.123-2.498a6.5 6.5 0 0 0-9.124-9.124l9.124 9.124ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z"})}),PI=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})});const II={table:{},grid:{},list:{}},VI={type:"list",filters:[],perPage:20,sort:{field:"title",direction:"asc"},showLevels:!0,titleField:"title",mediaField:"featured_media",fields:["author","status"],...II.list};function OI(e){return[{title:e?.labels?.all_items||(0,w.__)("All items"),slug:"all",icon:_I,view:VI},{title:(0,w.__)("Published"),slug:"published",icon:jI,view:{...VI,filters:[{field:"status",operator:De,value:"publish",isLocked:!0}]}},{title:(0,w.__)("Scheduled"),slug:"future",icon:SI,view:{...VI,filters:[{field:"status",operator:De,value:"future",isLocked:!0}]}},{title:(0,w.__)("Drafts"),slug:"drafts",icon:CI,view:{...VI,filters:[{field:"status",operator:De,value:"draft",isLocked:!0}]}},{title:(0,w.__)("Pending"),slug:"pending",icon:kI,view:{...VI,filters:[{field:"status",operator:De,value:"pending",isLocked:!0}]}},{title:(0,w.__)("Private"),slug:"private",icon:EI,view:{...VI,filters:[{field:"status",operator:De,value:"private",isLocked:!0}]}},{title:(0,w.__)("Trash"),slug:"trash",icon:PI,view:{...VI,type:"table",layout:II.table.layout,filters:[{field:"status",operator:De,value:"trash",isLocked:!0}]}}]}const TI=(e,t)=>OI(e).find((({slug:e})=>e===t))?.view,{useLocation:AI}=ne(Lt.privateApis);function NI({postType:e}){const{query:{activeView:t="all"}}=AI(),n=(0,c.useSelect)((t=>{const{getPostType:n}=t(j.store);return n(e)}),[e]),s=(0,h.useMemo)((()=>OI(n)),[n]);return e?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(b.__experimentalItemGroup,{className:"edit-site-sidebar-dataviews",children:s.map((e=>(0,a.jsx)(wI,{slug:e.slug,title:e.title,icon:e.icon,type:e.view.type,isActive:e.slug===t},e.slug)))})}):null}var FI=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"})});function MI({postType:e,onSave:t,onClose:n}){const s=(0,c.useSelect)((t=>t(j.store).getPostType(e)?.labels),[e]),[i,r]=(0,h.useState)(!1),[l,u]=(0,h.useState)(""),{saveEntityRecord:d}=(0,c.useDispatch)(j.store),{createErrorNotice:p,createSuccessNotice:f}=(0,c.useDispatch)(_.store),{resolveSelect:m}=(0,c.useRegistry)();return(0,a.jsx)(b.Modal,{title:(0,w.sprintf)((0,w.__)("Draft new: %s"),s?.singular_name),onRequestClose:n,focusOnMount:"firstContentElement",size:"small",children:(0,a.jsx)("form",{onSubmit:async function(n){if(n.preventDefault(),!i){r(!0);try{const n=await m(j.store).getPostType(e),s=await d("postType",e,{status:"draft",title:l,slug:l??void 0,content:n.template&&n.template.length?(0,o.serialize)((0,o.synchronizeBlocksWithTemplate)([],n.template)):void 0},{throwOnError:!0});t(s),f((0,w.sprintf)((0,w.__)('"%s" successfully created.'),(0,qt.decodeEntities)(s.title?.rendered||l)||(0,w.__)("(no title)")),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,w.__)("An error occurred while creating the item.");p(t,{type:"snackbar"})}finally{r(!1)}}},children:(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsx)(b.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,w.__)("Title"),onChange:u,placeholder:(0,w.__)("No title"),value:l}),(0,a.jsxs)(b.__experimentalHStack,{spacing:2,justify:"end",children:[(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:n,children:(0,w.__)("Cancel")}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:i,"aria-disabled":i,children:(0,w.__)("Create draft")})]})]})})})}const{usePostActions:BI,usePostFields:DI}=ne(f.privateApis),{useLocation:RI,useHistory:LI}=ne(Lt.privateApis),{useEntityRecordsWithPermissions:zI}=ne(j.privateApis),HI=[];function GI(e){return e.id.toString()}function WI(e){return e.level}function UI({postType:e}){const{path:t,query:n}=RI(),{activeView:s="all",postId:i,quickEdit:r=!1}=n,o=LI(),l=(0,c.useSelect)((t=>{const{getPostType:n}=t(j.store);return n(e)}),[e]),{view:u,updateView:d,isModified:p,resetToDefault:f}=(0,jE.useView)({kind:"postType",name:e,slug:s,queryParams:{page:n.pageNumber,search:n.search},onChangeQueryParams:e=>{o.navigate((0,Qt.addQueryArgs)(t,{...n,pageNumber:e.page,search:e.search||void 0}))},defaultView:TI(l,s)}),m=(0,y.useEvent)((e=>{e.type!==u.type&&o.invalidate(),d(e)})),[g,v]=(0,h.useState)(i?.split(",")??[]),x=(0,h.useCallback)((e=>{v(e),o.navigate((0,Qt.addQueryArgs)(t,{postId:e.join(",")}))}),[t,o]),_=DI({postType:e}),S=(0,h.useMemo)((()=>{const e={};return u.filters?.forEach((t=>{"status"===t.field&&t.operator===De&&(e.status=t.value),"author"===t.field&&t.operator===De?e.author=t.value:"author"===t.field&&"isNone"===t.operator&&(e.author_exclude=t.value)})),e.status&&""!==e.status||(e.status="draft,future,pending,private,publish"),{per_page:u.perPage,page:u.page,_embed:"author,wp:featuredmedia",order:u.sort?.direction,orderby:u.sort?.field,orderby_hierarchy:!!u.showLevels,search:u.search,...e}}),[u]),{records:C,isResolving:k,totalItems:E,totalPages:P}=zI("postType",e,S),I=(0,h.useMemo)((()=>"author"===u?.sort?.field?Bw(C,{sort:{...u.sort}},_).data:C),[C,_,u?.sort]),V=I?.map((e=>GI(e)))??[],O=((0,y.usePrevious)(V)??[]).filter((e=>!V.includes(e))).includes(i);(0,h.useEffect)((()=>{O&&o.navigate((0,Qt.addQueryArgs)(t,{postId:void 0}))}),[o,O,t]);const T=(0,h.useMemo)((()=>({totalItems:E,totalPages:P})),[E,P]),{labels:A,canCreateRecord:N}=(0,c.useSelect)((t=>{const{getPostType:n,canUser:s}=t(j.store);return{labels:n(e)?.labels,canCreateRecord:s("create",{kind:"postType",name:e})}}),[e]),F=BI({postType:e,context:"list"}),M=zE(),B=(0,h.useMemo)((()=>[M,...F]),[F,M]),[D,R]=(0,h.useState)(!1),L=()=>R(!1);return(0,a.jsx)(Wm,{title:A?.name,actions:(0,a.jsxs)(a.Fragment,{children:[p&&(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,onClick:()=>{f(),o.invalidate()},children:(0,w.__)("Reset view")}),A?.add_new_item&&N&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Button,{variant:"primary",onClick:()=>R(!0),__next40pxDefaultSize:!0,children:A.add_new_item}),D&&(0,a.jsx)(MI,{postType:e,onSave:({type:e,id:t})=>{o.navigate(`/${e}/${t}?canvas=edit`),L()},onClose:L})]})]}),children:(0,a.jsx)(_E,{paginationInfo:T,fields:_,actions:B,data:I||HI,isLoading:k,view:u,onChangeView:m,selection:g,onChangeSelection:x,isItemClickable:e=>"trash"!==e.status,onClickItem:({id:t})=>{o.navigate(`/${e}/${t}?canvas=edit`)},getItemId:GI,getItemLevel:WI,defaultLayouts:II,header:window.__experimentalQuickEditDataViews&&"list"!==u.type&&"page"===e&&(0,a.jsx)(b.Button,{size:"compact",isPressed:r,icon:FI,label:(0,w.__)("Details"),onClick:()=>{o.navigate((0,Qt.addQueryArgs)(t,{quickEdit:!r||void 0}))}})},s)})}const qI=(0,h.createContext)({fields:[]});function ZI({fields:e,children:t}){return(0,a.jsx)(qI.Provider,{value:{fields:e},children:t})}qI.displayName="DataFormContext";var YI=qI;function KI(e){return void 0!==e.children}const XI={type:"regular",labelPosition:"top"};function QI(e){let t=XI;if("regular"===e?.type)t={type:"regular",labelPosition:e?.labelPosition??"top"};else if("panel"===e?.type){const n=e.summary??[],s=Array.isArray(n)?n:[n];t={type:"panel",labelPosition:e?.labelPosition??"side",openAs:e?.openAs??"dropdown",summary:s}}else if("card"===e?.type)if(!1===e.withHeader)t={type:"card",withHeader:!1,isOpened:!0,summary:[]};else{const s=e.summary??[];t={type:"card",withHeader:!0,isOpened:"boolean"!=typeof e.isOpened||e.isOpened,summary:(n=s,"string"==typeof n?[{id:n,visibility:"when-collapsed"}]:n.map((e=>"string"==typeof e?{id:e,visibility:"when-collapsed"}:{id:e.id,visibility:e.visibility})))}}else"row"===e?.type&&(t={type:"row",alignment:e?.alignment??"center",styles:e?.styles??{}});var n;return t}function JI(e){const t=QI(e?.layout);return(e.fields??[]).map((e=>{if("string"==typeof e)return{id:e,layout:t};const n=e.layout?QI(e.layout):t;return{...e,layout:n}}))}function $I({title:e}){return(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts-regular__header",spacing:4,children:(0,a.jsxs)(b.__experimentalHStack,{alignment:"center",children:[(0,a.jsx)(b.__experimentalHeading,{level:2,size:13,children:e}),(0,a.jsx)(b.__experimentalSpacer,{})]})})}var eV=function({summaryFields:e,data:t,labelPosition:n,fieldLabel:s,disabled:i,onClick:r,"aria-expanded":o}){return(0,a.jsx)(b.Button,{className:"dataforms-layouts-panel__summary-button",size:"compact",variant:["none","top"].includes(n)?"link":"tertiary","aria-expanded":o,"aria-label":(0,w.sprintf)((0,w._x)("Edit %s","field"),s||""),onClick:r,disabled:i,accessibleWhenDisabled:!0,style:e.length>1?{minHeight:"auto",height:"auto",alignItems:"flex-start"}:void 0,children:e.length>1?(0,a.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:e.map((e=>(0,a.jsx)("div",{style:{width:"100%"},children:(0,a.jsx)(e.render,{item:t,field:e})},e.id)))}):e.map((e=>(0,a.jsx)(e.render,{item:t,field:e},e.id)))})};function tV({title:e,onClose:t}){return(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts-panel__dropdown-header",spacing:4,children:(0,a.jsxs)(b.__experimentalHStack,{alignment:"center",children:[e&&(0,a.jsx)(b.__experimentalHeading,{level:2,size:13,children:e}),(0,a.jsx)(b.__experimentalSpacer,{}),t&&(0,a.jsx)(b.Button,{label:(0,w.__)("Close"),icon:Ea,onClick:t,size:"small"})]})})}var nV=function({data:e,field:t,onChange:n,validity:s,labelPosition:i="side",summaryFields:r,fieldDefinition:o,popoverAnchor:l}){const c=KI(t)?t.label:o?.label,u=(0,h.useMemo)((()=>({layout:XI,fields:KI(t)?t.children:[{id:t.id}]})),[t]),d=(0,h.useMemo)((()=>{if(void 0!==s)return KI(t)?s?.children:{[t.id]:s}}),[s,t]),p=(0,h.useMemo)((()=>({anchor:l,placement:"left-start",offset:36,shift:!0})),[l]);return(0,a.jsx)(b.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:p,focusOnMount:!0,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},renderToggle:({isOpen:t,onToggle:n})=>(0,a.jsx)(eV,{summaryFields:r,data:e,labelPosition:i,fieldLabel:c,disabled:!0===o.readOnly,onClick:n,"aria-expanded":t}),renderContent:({onClose:t})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(tV,{title:c,onClose:t}),(0,a.jsx)(xV,{data:e,form:u,onChange:n,validity:d,children:(t,s,i)=>(0,a.jsx)(t,{data:e,field:s,onChange:n,hideLabelFromVision:(u?.fields??[]).length<2,validity:i},s.id)})]})})},sV=i(66),iV=i.n(sV);const rV=e=>[void 0,"",null].includes(e);function aV(e,t){return!!(void 0===e&&rV(t)||"text"===e&&rV(t)||"email"===e&&rV(t)||"url"===e&&rV(t)||"telephone"===e&&rV(t)||"password"===e&&rV(t)||"integer"===e&&rV(t)||"number"===e&&rV(t)||"array"===e&&(e=>!Array.isArray(e)||0===e.length||e.every((e=>rV(e))))(t)||"boolean"===e&&!0!==t)}function oV(e){return!e||Object.values(e).every((e=>Object.entries(e).every((([e,t])=>"children"===e&&t&&"object"==typeof t?oV(t):"valid"===t.type))))}function lV(e,t,n,s){e(t?e=>({...e,[t]:{...e?.[t],children:{...e?.[t]?.children,[n]:{...s}}}}):e=>({...e,[n]:{...s}}))}var cV=function(e,t,n){const[s,i]=(0,h.useState)(),r=(0,h.useRef)({}),a=(0,h.useRef)({}),o=(0,h.useRef)({}),l=(0,h.useCallback)((()=>{const{fields:s,fieldToParent:l}=function(e,t){const n=JI(t);if(0===n.length)return{fields:[],fieldToParent:new Map};const s=new Map,i=[];return n.forEach((e=>{e.children?e.children.forEach((t=>{const n="string"==typeof t?t:t.id;i.push(n),s.set(n,e.id)})):i.push(e.id)})),{fields:Aw(e.filter((e=>i.includes(e.id)))),fieldToParent:s}}(t,n);0!==s.length?s.forEach((t=>{const n=t.getValue({item:e});if(r.current.hasOwnProperty(t.id)&&n===r.current[t.id])return;r.current[t.id]=n;const s=l.get(t.id);if(t.isValid.required&&aV(t.type,n))return void lV(i,s,t.id,{required:{type:"invalid"}});if(t.isValid.elements&&t.hasElements&&!t.getElements&&Array.isArray(t.elements)){const e=t.elements.map((e=>e.value));if("array"!==t.type&&!e.includes(n))return void lV(i,s,t.id,{elements:{type:"invalid",message:"Value must be one of the elements."}});if("array"===t.type&&!Array.isArray(n))return void lV(i,s,t.id,{elements:{type:"invalid",message:"Value must be an array."}});if("array"===t.type&&n.some((t=>!e.includes(t))))return void lV(i,s,t.id,{elements:{type:"invalid",message:"Value must be one of the elements."}})}if(t.isValid.elements&&t.hasElements&&"function"==typeof t.getElements){const e=(o.current[t.id]||0)+1;o.current[t.id]=e,lV(i,s,t.id,{elements:{type:"validating",message:"Validating..."}}),t.getElements().then((r=>{if(o.current[t.id]!==e)return;if(!Array.isArray(r))return void lV(i,s,t.id,{elements:{type:"invalid",message:"Could not validate elements."}});const a=r.map((e=>e.value));"array"===t.type||a.includes(n)?"array"!==t.type||Array.isArray(n)?"array"===t.type&&n.some((e=>!a.includes(e)))&&lV(i,s,t.id,{elements:{type:"invalid",message:"Value must be one of the elements."}}):lV(i,s,t.id,{elements:{type:"invalid",message:"Value must be an array."}}):lV(i,s,t.id,{elements:{type:"invalid",message:"Value must be one of the elements."}})})).catch((n=>{o.current[t.id]===e&&lV(i,s,t.id,{elements:{type:"invalid",message:n.message}})}))}let c;try{c=t.isValid?.custom?.(iV()(e,t.setValue({item:e,value:n})),t)}catch(e){let n;n=e instanceof Error?e.message:String(e)||(0,w.__)("Unknown error when running custom validation."),lV(i,s,t.id,{custom:{type:"invalid",message:n}})}if("string"!=typeof c){if(c instanceof Promise){const e=(a.current[t.id]||0)+1;return a.current[t.id]=e,lV(i,s,t.id,{custom:{type:"validating",message:"Validating..."}}),void c.then((n=>{a.current[t.id]===e&&(null!==n?"string"==typeof n&&lV(i,s,t.id,{custom:{type:"invalid",message:n}}):lV(i,s,t.id,{custom:{type:"valid",message:"Valid"}}))})).catch((n=>{a.current[t.id]===e&&lV(i,s,t.id,{custom:{type:"invalid",message:n.message}})}))}i((e=>{if(!e)return e;if(s){const n=e[s];if(!n?.children)return e;const{[t.id]:i,...r}=n.children;if(0===Object.keys(r).length){const{children:t,...i}=n;if(0===Object.keys(i).length){const{[s]:t,...n}=e;return 0===Object.keys(n).length?void 0:n}return{...e,[s]:i}}return{...e,[s]:{...n,children:r}}}if(!e[t.id])return e;const{[t.id]:n,...i}=e;return 0!==Object.keys(i).length?i:void 0}))}else lV(i,s,t.id,{custom:{type:"invalid",message:c}})})):i(void 0)}),[e,t,n]);return(0,h.useEffect)((()=>{l()}),[l]),{validity:s,isValid:oV(s)}};function uV({data:e,field:t,onChange:n,fieldLabel:s,onClose:i}){const{fields:r}=(0,h.useContext)(YI),[o,l]=(0,h.useState)({}),c=(0,h.useMemo)((()=>iV()(e,o)),[e,o]),u=(0,h.useMemo)((()=>({layout:XI,fields:KI(t)?t.children:[{id:t.id}]})),[t]),{validity:d}=cV(c,r,u),p=e=>{l((t=>iV()(t,e)))};return(0,a.jsxs)(b.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:i,isFullScreen:!1,title:s,size:"medium",children:[(0,a.jsx)(xV,{data:c,form:u,onChange:p,validity:d,children:(e,t,n)=>(0,a.jsx)(e,{data:c,field:t,onChange:p,hideLabelFromVision:(u?.fields??[]).length<2,validity:n},t.id)}),(0,a.jsxs)(b.__experimentalHStack,{className:"dataforms-layouts-panel__modal-footer",spacing:3,children:[(0,a.jsx)(b.__experimentalSpacer,{}),(0,a.jsx)(b.Button,{variant:"tertiary",onClick:i,__next40pxDefaultSize:!0,children:(0,w.__)("Cancel")}),(0,a.jsx)(b.Button,{variant:"primary",onClick:()=>{n(o),i()},__next40pxDefaultSize:!0,children:(0,w.__)("Apply")})]})]})}var dV=function({data:e,field:t,onChange:n,labelPosition:s,summaryFields:i,fieldDefinition:r}){const[o,l]=(0,h.useState)(!1),c=KI(t)?t.label:r?.label;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eV,{summaryFields:i,data:e,labelPosition:s,fieldLabel:c,disabled:!0===r.readOnly,onClick:()=>l(!0),"aria-expanded":o}),o&&(0,a.jsx)(uV,{data:e,field:t,onChange:n,fieldLabel:c??"",onClose:()=>l(!1)})]})};const hV=(e,t)=>{if(Array.isArray(e)&&e.length>0){return(n=e,Array.isArray(n)?n.map((e=>"string"==typeof e?e:e.id)):[]).map((e=>t.find((t=>t.id===e)))).filter((e=>void 0!==e))}var n;return[]},pV=(e,t,n)=>{const s=hV(e.summary,n),i=((e,t)=>{const n=t.find((t=>t.id===e.id));return n||t.find((t=>{if(KI(e)){const n=e.children.filter((e=>"string"==typeof e||!KI(e)));if(0===n.length)return!1;const s="string"==typeof n[0]?n[0]:n[0].id;return t.id===s}return t.id===e.id}))})(t,n);return 0===s.length?{summaryFields:i?[i]:[],fieldDefinition:i}:{summaryFields:s,fieldDefinition:i}};function fV({title:e}){return(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts-row__header",spacing:4,children:(0,a.jsxs)(b.__experimentalHStack,{alignment:"center",children:[(0,a.jsx)(b.__experimentalHeading,{level:2,size:13,children:e}),(0,a.jsx)(b.__experimentalSpacer,{})]})})}const mV=({children:e})=>(0,a.jsx)(a.Fragment,{children:e});const gV=[{type:"regular",component:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{fields:r}=(0,h.useContext)(YI),o=(0,h.useMemo)((()=>({layout:XI,fields:KI(t)?t.children:[]})),[t]);if(KI(t))return(0,a.jsxs)(a.Fragment,{children:[!s&&t.label&&(0,a.jsx)($I,{title:t.label}),(0,a.jsx)(xV,{data:e,form:o,onChange:n,validity:i?.children})]});const l=QI({...t.layout,type:"regular"}).labelPosition,c=r.find((e=>e.id===t.id));return c&&c.Edit?"side"===l?(0,a.jsxs)(b.__experimentalHStack,{className:"dataforms-layouts-regular__field",children:[(0,a.jsx)("div",{className:Ht("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${l}`),children:c.label}),(0,a.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:!0===c.readOnly?(0,a.jsx)(c.render,{item:e,field:c}):(0,a.jsx)(c.Edit,{data:e,field:c,onChange:n,hideLabelFromVision:!0,validity:i},c.id)})]}):(0,a.jsx)("div",{className:"dataforms-layouts-regular__field",children:!0===c.readOnly?(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(a.Fragment,{children:[!s&&"none"!==l&&(0,a.jsx)(b.BaseControl.VisualLabel,{children:c.label}),(0,a.jsx)(c.render,{item:e,field:c})]})}):(0,a.jsx)(c.Edit,{data:e,field:c,onChange:n,hideLabelFromVision:"none"===l||s,validity:i})}):null},wrapper:({children:e})=>(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:4,children:e})},{type:"panel",component:function({data:e,field:t,onChange:n,validity:s}){const{fields:i}=(0,h.useContext)(YI),r=QI({...t.layout,type:"panel"}),[o,l]=(0,h.useState)(null),{fieldDefinition:c,summaryFields:u}=pV(r,t,i);if(!c)return null;const d=r.labelPosition,p=Ht("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${d}`),f=KI(t)?t.label:c?.label,m="modal"===r.openAs?(0,a.jsx)(dV,{data:e,field:t,onChange:n,labelPosition:d,summaryFields:u,fieldDefinition:c}):(0,a.jsx)(nV,{data:e,field:t,onChange:n,validity:s,labelPosition:d,summaryFields:u,fieldDefinition:c,popoverAnchor:o});return"top"===d?(0,a.jsxs)(b.__experimentalVStack,{className:"dataforms-layouts-panel__field",spacing:0,children:[(0,a.jsx)("div",{className:p,style:{paddingBottom:0},children:f}),(0,a.jsx)("div",{className:"dataforms-layouts-panel__field-control",children:m})]}):"none"===d?(0,a.jsx)("div",{className:"dataforms-layouts-panel__field",children:m}):(0,a.jsxs)(b.__experimentalHStack,{ref:l,className:"dataforms-layouts-panel__field",children:[(0,a.jsx)("div",{className:p,children:f}),(0,a.jsx)("div",{className:"dataforms-layouts-panel__field-control",children:m})]})},wrapper:({children:e})=>(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:2,children:e})},{type:"card",component:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{fields:r}=(0,h.useContext)(YI),o=QI({...t.layout,type:"card"}),l=(0,h.useMemo)((()=>({layout:XI,fields:KI(t)?t.children:[]})),[t]),{isOpen:c,CollapsibleCardHeader:u}=function(e=!0){const[t,n]=(0,h.useState)(e),s=(0,h.useCallback)((()=>{n((e=>!e))}),[]),i=(0,h.useCallback)((({children:e,...n})=>(0,a.jsxs)(b.CardHeader,{...n,onClick:s,style:{cursor:"pointer",...n.style},children:[(0,a.jsx)("div",{style:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:e}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:t?Av:Nv,"aria-expanded":t,"aria-label":t?"Collapse":"Expand"})]})),[s,t]);return{isOpen:t,CollapsibleCardHeader:i}}(o.isOpened),d=hV(o.summary,r).filter((e=>function(e,t,n){if(!t||Array.isArray(t)&&0===t.length)return!1;const s=(Array.isArray(t)?t:[t]).find((t=>"string"==typeof t?t===e.id:"object"==typeof t&&"id"in t&&t.id===e.id));return!!s&&("string"==typeof s||"object"!=typeof s||!("visibility"in s)||"always"===s.visibility||"when-collapsed"===s.visibility&&!n)}(e,o.summary,c)));if(KI(t)){const s=!!t.label&&o.withHeader;return(0,a.jsxs)(b.Card,{className:"dataforms-layouts-card__field",children:[s&&(0,a.jsxs)(u,{className:"dataforms-layouts-card__field-header",children:[(0,a.jsx)("span",{className:"dataforms-layouts-card__field-header-label",children:t.label}),d.length>0&&o.withHeader&&(0,a.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:d.map((t=>(0,a.jsx)(t.render,{item:e,field:t},t.id)))})]}),(c||!s)&&(0,a.jsxs)(b.CardBody,{className:"dataforms-layouts-card__field-control",children:[t.description&&(0,a.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,a.jsx)(xV,{data:e,form:l,onChange:n,validity:i?.children})]})]})}const p=r.find((e=>e.id===t.id));if(!p||!p.Edit)return null;const f=vV("regular")?.component;if(!f)return null;const m=!!p.label&&o.withHeader;return(0,a.jsxs)(b.Card,{className:"dataforms-layouts-card__field",children:[m&&(0,a.jsxs)(u,{className:"dataforms-layouts-card__field-header",children:[(0,a.jsx)("span",{className:"dataforms-layouts-card__field-header-label",children:p.label}),d.length>0&&o.withHeader&&(0,a.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:d.map((t=>(0,a.jsx)(t.render,{item:e,field:t},t.id)))})]}),(c||!m)&&(0,a.jsx)(b.CardBody,{className:"dataforms-layouts-card__field-control",children:(0,a.jsx)(f,{data:e,field:t,onChange:n,hideLabelFromVision:s||m,validity:i})})]})},wrapper:({children:e})=>(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:6,children:e})},{type:"row",component:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{fields:r}=(0,h.useContext)(YI),o=QI({...t.layout,type:"row"});if(KI(t)){const r={fields:t.children.map((e=>"string"==typeof e?{id:e}:e))};return(0,a.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!s&&t.label&&(0,a.jsx)(fV,{title:t.label}),(0,a.jsx)(b.__experimentalHStack,{alignment:o.alignment,spacing:4,children:(0,a.jsx)(xV,{data:e,form:r,onChange:n,validity:i?.children,as:mV,children:(t,i,r)=>(0,a.jsx)("div",{className:"dataforms-layouts-row__field-control",style:o.styles[i.id],children:(0,a.jsx)(t,{data:e,field:i,onChange:n,hideLabelFromVision:s,validity:r})},i.id)})})]})}const l=r.find((e=>e.id===t.id));if(!l||!l.Edit)return null;const c=vV("regular")?.component;return c?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,a.jsx)(c,{data:e,field:l,onChange:n,validity:i})})}):null},wrapper:({children:e,layout:t})=>(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:4,children:(0,a.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,a.jsx)(b.__experimentalHStack,{spacing:4,alignment:t.alignment,children:e})})})}];function vV(e){return gV.find((t=>t.type===e))}const yV=({children:e})=>(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:4,children:e});function xV({data:e,form:t,onChange:n,validity:s,children:i,as:r}){const{fields:o}=(0,h.useContext)(YI);const l=(0,h.useMemo)((()=>JI(t)),[t]),c=QI(t.layout),u=r??vV(c.type)?.wrapper??yV;return(0,a.jsx)(u,{layout:c,children:l.map((t=>{const r=vV(t.layout.type)?.component;if(!r)return null;const l=KI(t)?void 0:function(e){const t="string"==typeof e?e:e.id;return o.find((e=>e.id===t))}(t);return l&&l.isVisible&&!l.isVisible(e)?null:i?i(r,t,s?.[t.id]):(0,a.jsx)(r,{data:e,field:t,onChange:n,validity:s?.[t.id]},t.id)}))})}function bV({data:e,form:t,fields:n,onChange:s,validity:i}){const r=(0,h.useMemo)((()=>Aw(n)),[n]);return t.fields?(0,a.jsx)(ZI,{fields:r,children:(0,a.jsx)(xV,{data:e,form:t,onChange:s,validity:i})}):null}const{usePostFields:wV,PostCardPanel:_V}=ne(f.privateApis),jV=["title","status","date","author","discussion"];function SV({postType:e,postId:t}){const n=(0,h.useMemo)((()=>t.split(",")),[t]),{record:s,hasFinishedResolution:i}=(0,c.useSelect)((t=>{const s=["postType",e,n[0]],{getEditedEntityRecord:i,hasFinishedResolution:r}=t(j.store);return{record:1===n.length?i(...s):null,hasFinishedResolution:r("getEditedEntityRecord",s)}}),[e,n]),[r,o]=(0,h.useState)({}),{editEntityRecord:l}=(0,c.useDispatch)(j.store),u=wV({postType:e}),d=(0,h.useMemo)((()=>u?.map((e=>"status"===e.id?{...e,elements:e.elements.filter((e=>"trash"!==e.value))}:e))),[u]),p=(0,h.useMemo)((()=>({layout:{type:"panel"},fields:[{id:"featured_media",layout:{type:"regular"}},{id:"status",label:(0,w.__)("Status & Visibility"),children:["status","password"]},"author","date","slug","parent",{id:"discussion",label:(0,w.__)("Discussion"),children:["comment_status","ping_status"]},{label:(0,w.__)("Template"),id:"template",layout:{type:"regular",labelPosition:"side"}}].filter((e=>1===n.length||jV.includes("string"==typeof e?e:e.id)))})),[n]);(0,h.useEffect)((()=>{o({})}),[n]);const{ExperimentalBlockEditorProvider:f}=ne(x.privateApis),m=SE(),g=(0,h.useMemo)((()=>d.map((e=>"template"===e.id?{...e,Edit:t=>(0,a.jsx)(f,{settings:m,children:(0,a.jsx)(e.Edit,{...t})})}:e))),[d,m]);return(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsx)(_V,{postType:e,postId:n}),i&&(0,a.jsx)(bV,{data:1===n.length?s:r,fields:g,form:p,onChange:t=>{for(const i of n)t.status&&"future"!==t.status&&"future"===s?.status&&new Date(s.date)>new Date&&(t.date=null),t.status&&"private"===t.status&&s.password&&(t.password=""),l("postType",e,i,t),n.length>1&&o((e=>({...e,...t})))}})]})}function CV({postType:e,postId:t}){return(0,a.jsxs)(Wm,{className:Ht("edit-site-post-edit",{"is-empty":!t}),label:(0,w.__)("Post Edit"),children:[t&&(0,a.jsx)(SV,{postType:e,postId:t}),!t&&(0,a.jsx)("p",{children:(0,w.__)("Select a page to edit")})]})}const{useLocation:kV}=ne(Lt.privateApis);async function EV(e){const{activeView:t="all"}=e,n=await(0,c.resolveSelect)(j.store).getPostType("page");return"list"===(await(0,jE.loadView)({kind:"postType",name:"page",slug:t,defaultView:TI(n,t)})).type}function PV(){const{query:e={}}=kV(),{canvas:t="view"}=e;return"edit"===t?(0,a.jsx)(wv,{}):(0,a.jsx)(UI,{postType:"page"})}const IV={name:"pages",path:"/page",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(Ua,{title:(0,w.__)("Pages"),backPath:"/",content:(0,a.jsx)(NI,{postType:"page"})}):(0,a.jsx)(uo,{})},content({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(UI,{postType:"page"}):void 0},async preview({query:e,siteData:t}){const n=t.currentTheme?.is_block_theme;if(!n)return;return await EV(e)?(0,a.jsx)(wv,{}):void 0},mobile({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(PV,{}):(0,a.jsx)(uo,{})},edit:async({query:e})=>!await EV(e)&&!!e.quickEdit?(0,a.jsx)(CV,{postType:"page",postId:e.postId}):void 0},widths:{content:async({query:e})=>await EV(e)?380:void 0,edit:async({query:e})=>!await EV(e)&&!!e.quickEdit?380:void 0}};function VV(){return(0,a.jsx)(b.Notice,{status:"error",isDismissible:!1,children:(0,w.__)("The requested page could not be found. Please check the URL.")})}const OV=[{name:"page-item",path:"/page/:postId",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(Ua,{title:(0,w.__)("Pages"),backPath:"/",content:(0,a.jsx)(NI,{postType:"page"})}):(0,a.jsx)(uo,{})},mobile({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(wv,{}):(0,a.jsx)(uo,{})},preview({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(wv,{}):(0,a.jsx)(uo,{})}}},IV,xI,yI,lP,oP,aP,cy,ay,kv,jv,{name:"stylebook",path:"/stylebook",areas:{sidebar:({siteData:e})=>_v(e)?(0,a.jsx)(Ua,{title:(0,w.__)("Styles"),backPath:"/",description:(0,w.__)("Preview your website's visual identity: colors, typography, and blocks.")}):(0,a.jsx)(uo,{}),preview:({siteData:e})=>_v(e)?(0,a.jsx)(lg,{isStatic:!0}):void 0,mobile:({siteData:e})=>_v(e)?(0,a.jsx)(lg,{isStatic:!0}):void 0}},{name:"notfound",path:"*",areas:{sidebar:(0,a.jsx)(co,{}),mobile:(0,a.jsx)(co,{customDescription:(0,a.jsx)(VV,{})}),content:(0,a.jsx)(b.__experimentalSpacer,{padding:2,children:(0,a.jsx)(VV,{})})}}];const{RouterProvider:TV}=ne(Lt.privateApis);function AV(){return(0,Kt.useCommandLoader)({name:"core/edit-site/toggle-styles-welcome-guide",hook:Sa()}),(0,Kt.useCommandLoader)({name:"core/edit-site/reset-global-styles",hook:Ca()}),(0,Kt.useCommandLoader)({name:"core/edit-site/open-styles-revisions",hook:ka()}),function(){const{query:e={}}=Na(),{canvas:t="view"}=e;let n="site-editor";"edit"===t&&(n="entity-edit"),(0,c.useSelect)((e=>e(x.store).getBlockSelectionStart()),[])&&(n="block-selection-edit"),Oa()&&(n=""),Aa(n)}(),(0,a.jsx)(ga,{})}function NV(){!function(){const e=(0,c.useRegistry)(),{registerRoute:t}=ne((0,c.useDispatch)(Rt));(0,h.useEffect)((()=>{e.batch((()=>{OV.forEach(t)}))}),[e,t])}();const{routes:e,currentTheme:t,editorSettings:n}=(0,c.useSelect)((e=>({routes:ne(e(Rt)).getRoutes(),currentTheme:e(j.store).getCurrentTheme(),editorSettings:e(Rt).getSettings()})),[]),s=(0,h.useCallback)((({path:e,query:t})=>Qr()?{path:e,query:{...t,wp_theme_preview:"wp_theme_preview"in t?t.wp_theme_preview:Jr()}}:{path:e,query:t}),[]),i=(0,h.useMemo)((()=>({siteData:{currentTheme:t,editorSettings:n}})),[t,n]);return(0,a.jsx)(TV,{routes:e,pathArg:"p",beforeNavigate:s,matchResolverArgs:i,children:(0,a.jsx)(AV,{})})}const FV=(0,Qt.getPath)(window.location.href)?.includes("site-editor.php"),MV=e=>{d()(`wp.editPost.${e}`,{since:"6.6",alternative:`wp.editor.${e}`})};function BV(e){return FV?(MV("PluginMoreMenuItem"),(0,a.jsx)(f.PluginMoreMenuItem,{...e})):null}function DV(e){return FV?(MV("PluginSidebar"),(0,a.jsx)(f.PluginSidebar,{...e})):null}function RV(e){return FV?(MV("PluginSidebarMoreMenuItem"),(0,a.jsx)(f.PluginSidebarMoreMenuItem,{...e})):null}const{useLocation:LV}=ne(Lt.privateApis);async function zV(e){const{activeView:t="all"}=e,n=await(0,c.resolveSelect)(j.store).getPostType("post");return"list"===(await(0,jE.loadView)({kind:"postType",name:"post",slug:t,defaultView:TI(n,t)})).type}function HV(){const{query:e={}}=LV(),{canvas:t="view"}=e;return"edit"===t?(0,a.jsx)(wv,{}):(0,a.jsx)(UI,{postType:"post"})}const GV={name:"posts",path:"/",areas:{sidebar:(0,a.jsx)(Ua,{title:(0,w.__)("Posts"),isRoot:!0,content:(0,a.jsx)(NI,{postType:"post"})}),content:(0,a.jsx)(UI,{postType:"post"}),preview:async({query:e})=>await zV(e)?(0,a.jsx)(wv,{isPostsList:!0}):void 0,mobile:(0,a.jsx)(HV,{}),edit:async({query:e})=>!await zV(e)&&!!e.quickEdit?(0,a.jsx)(CV,{postType:"post",postId:e.postId}):void 0},widths:{content:async({query:e})=>await zV(e)?380:void 0,edit:async({query:e})=>!await zV(e)&&!!e.quickEdit?380:void 0}};(0,w.__)("Posts");const{RouterProvider:WV}=ne(Lt.privateApis);function UV(e,t){}const{registerCoreBlockBindingsSources:qV}=ne(f.privateApis);function ZV(e,t){const n=document.getElementById(e),s=(0,h.createRoot)(n);(0,c.dispatch)(o.store).reapplyBlockTypeFilters();const i=(0,l.__experimentalGetCoreBlocks)().filter((({name:e})=>"core/freeform"!==e));return(0,l.registerCoreBlocks)(i),qV(),(0,c.dispatch)(o.store).setFreeformFallbackBlockName("core/html"),(0,g.registerLegacyWidgetBlock)({inserter:!1}),(0,g.registerWidgetGroupBlock)({inserter:!1}),(0,c.dispatch)(m.store).setDefaults("core/edit-site",{welcomeGuide:!0,welcomeGuideStyles:!0,welcomeGuidePage:!0,welcomeGuideTemplate:!0}),(0,c.dispatch)(m.store).setDefaults("core",{allowRightClickOverrides:!0,distractionFree:!1,editorMode:"visual",editorTool:"edit",fixedToolbar:!1,focusMode:!1,inactivePanels:[],keepCaretInsideBlock:!1,openPanels:["post-status"],showBlockBreadcrumbs:!0,showListViewByDefault:!1,enableChoosePatternModal:!0}),window.__experimentalMediaProcessing&&(0,c.dispatch)(m.store).setDefaults("core/media",{requireApproval:!0,optimizeOnUpload:!0}),(0,c.dispatch)(Rt).updateSettings(t),window.addEventListener("dragover",(e=>e.preventDefault()),!1),window.addEventListener("drop",(e=>e.preventDefault()),!1),s.render((0,a.jsx)(h.StrictMode,{children:(0,a.jsx)(NV,{})})),s}function YV(){d()("wp.editSite.reinitializeEditor",{since:"6.2",version:"6.3"})}})(),(window.wp=window.wp||{}).editSite=r})();