WordPress/wp-includes/js/dist/edit-site.min.js
noisysocks 0e5b9a0eb4 Editor: Update packages for 6.7 Beta 1.
Syncs `@wordpress/*` packages to the `wp-6.7` npm tag.

See #61906.

Built from https://develop.svn.wordpress.org/trunk@59148


git-svn-id: http://core.svn.wordpress.org/trunk@58544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-01 01:18:28 +00:00

11 lines
608 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! This file is auto-generated */
(()=>{var e,t,s={4660:e=>{e.exports=function(){function e(t,s,n){function i(o,a){if(!s[o]){if(!t[o]){if(r)return r(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=s[o]={exports:{}};t[o][0].call(c.exports,(function(e){return i(t[o][1][e]||e)}),c,c.exports,e,t,s,n)}return s[o].exports}for(var r=void 0,o=0;o<n.length;o++)i(n[o]);return i}return e}()({1:[function(e,t,s){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}s.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var s=t.shift();if(s){if("object"!=typeof s)throw new TypeError(s+"must be non-object");for(var n in s)i(s,n)&&(e[n]=s[n])}}return e},s.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,s,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(s,s+n),i);else for(var r=0;r<n;r++)e[i+r]=t[s+r]},flattenChunks:function(e){var t,s,n,i,r,o;for(n=0,t=0,s=e.length;t<s;t++)n+=e[t].length;for(o=new Uint8Array(n),i=0,t=0,s=e.length;t<s;t++)r=e[t],o.set(r,i),i+=r.length;return o}},o={arraySet:function(e,t,s,n,i){for(var r=0;r<n;r++)e[i+r]=t[s+r]},flattenChunks:function(e){return[].concat.apply([],e)}};s.setTyped=function(e){e?(s.Buf8=Uint8Array,s.Buf16=Uint16Array,s.Buf32=Int32Array,s.assign(s,r)):(s.Buf8=Array,s.Buf16=Array,s.Buf32=Array,s.assign(s,o))},s.setTyped(n)},{}],2:[function(e,t,s){"use strict";var n=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 o=new n.Buf8(256),a=0;a<256;a++)o[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&r||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var s="",o=0;o<t;o++)s+=String.fromCharCode(e[o]);return s}o[254]=o[254]=1,s.string2buf=function(e){var t,s,i,r,o,a=e.length,l=0;for(r=0;r<a;r++)55296==(64512&(s=e.charCodeAt(r)))&&r+1<a&&56320==(64512&(i=e.charCodeAt(r+1)))&&(s=65536+(s-55296<<10)+(i-56320),r++),l+=s<128?1:s<2048?2:s<65536?3:4;for(t=new n.Buf8(l),o=0,r=0;o<l;r++)55296==(64512&(s=e.charCodeAt(r)))&&r+1<a&&56320==(64512&(i=e.charCodeAt(r+1)))&&(s=65536+(s-55296<<10)+(i-56320),r++),s<128?t[o++]=s:s<2048?(t[o++]=192|s>>>6,t[o++]=128|63&s):s<65536?(t[o++]=224|s>>>12,t[o++]=128|s>>>6&63,t[o++]=128|63&s):(t[o++]=240|s>>>18,t[o++]=128|s>>>12&63,t[o++]=128|s>>>6&63,t[o++]=128|63&s);return t},s.buf2binstring=function(e){return l(e,e.length)},s.binstring2buf=function(e){for(var t=new n.Buf8(e.length),s=0,i=t.length;s<i;s++)t[s]=e.charCodeAt(s);return t},s.buf2string=function(e,t){var s,n,i,r,a=t||e.length,c=new Array(2*a);for(n=0,s=0;s<a;)if((i=e[s++])<128)c[n++]=i;else if((r=o[i])>4)c[n++]=65533,s+=r-1;else{for(i&=2===r?31:3===r?15:7;r>1&&s<a;)i=i<<6|63&e[s++],r--;r>1?c[n++]=65533:i<65536?c[n++]=i:(i-=65536,c[n++]=55296|i>>10&1023,c[n++]=56320|1023&i)}return l(c,n)},s.utf8border=function(e,t){var s;for((t=t||e.length)>e.length&&(t=e.length),s=t-1;s>=0&&128==(192&e[s]);)s--;return s<0||0===s?t:s+o[e[s]]>t?s:t}},{"./common":1}],3:[function(e,t,s){"use strict";function n(e,t,s,n){for(var i=65535&e|0,r=e>>>16&65535|0,o=0;0!==s;){s-=o=s>2e3?2e3:s;do{r=r+(i=i+t[n++]|0)|0}while(--o);i%=65521,r%=65521}return i|r<<16|0}t.exports=n},{}],4:[function(e,t,s){"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,s){"use strict";function n(){for(var e,t=[],s=0;s<256;s++){e=s;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[s]=e}return t}var i=n();function r(e,t,s,n){var r=i,o=n+s;e^=-1;for(var a=n;a<o;a++)e=e>>>8^r[255&(e^t[a])];return-1^e}t.exports=r},{}],6:[function(e,t,s){"use strict";function n(){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=n},{}],7:[function(e,t,s){"use strict";var n=30,i=12;t.exports=function(e,t){var s,r,o,a,l,c,u,d,p,h,f,m,g,v,x,y,b,w,_,S,j,C,k,E,P;s=e.state,r=e.next_in,E=e.input,o=r+(e.avail_in-5),a=e.next_out,P=e.output,l=a-(t-e.avail_out),c=a+(e.avail_out-257),u=s.dmax,d=s.wsize,p=s.whave,h=s.wnext,f=s.window,m=s.hold,g=s.bits,v=s.lencode,x=s.distcode,y=(1<<s.lenbits)-1,b=(1<<s.distbits)-1;e:do{g<15&&(m+=E[r++]<<g,g+=8,m+=E[r++]<<g,g+=8),w=v[m&y];t:for(;;){if(m>>>=_=w>>>24,g-=_,0==(_=w>>>16&255))P[a++]=65535&w;else{if(!(16&_)){if(0==(64&_)){w=v[(65535&w)+(m&(1<<_)-1)];continue t}if(32&_){s.mode=i;break e}e.msg="invalid literal/length code",s.mode=n;break e}S=65535&w,(_&=15)&&(g<_&&(m+=E[r++]<<g,g+=8),S+=m&(1<<_)-1,m>>>=_,g-=_),g<15&&(m+=E[r++]<<g,g+=8,m+=E[r++]<<g,g+=8),w=x[m&b];s:for(;;){if(m>>>=_=w>>>24,g-=_,!(16&(_=w>>>16&255))){if(0==(64&_)){w=x[(65535&w)+(m&(1<<_)-1)];continue s}e.msg="invalid distance code",s.mode=n;break e}if(j=65535&w,g<(_&=15)&&(m+=E[r++]<<g,(g+=8)<_&&(m+=E[r++]<<g,g+=8)),(j+=m&(1<<_)-1)>u){e.msg="invalid distance too far back",s.mode=n;break e}if(m>>>=_,g-=_,j>(_=a-l)){if((_=j-_)>p&&s.sane){e.msg="invalid distance too far back",s.mode=n;break e}if(C=0,k=f,0===h){if(C+=d-_,_<S){S-=_;do{P[a++]=f[C++]}while(--_);C=a-j,k=P}}else if(h<_){if(C+=d+h-_,(_-=h)<S){S-=_;do{P[a++]=f[C++]}while(--_);if(C=0,h<S){S-=_=h;do{P[a++]=f[C++]}while(--_);C=a-j,k=P}}}else if(C+=h-_,_<S){S-=_;do{P[a++]=f[C++]}while(--_);C=a-j,k=P}for(;S>2;)P[a++]=k[C++],P[a++]=k[C++],P[a++]=k[C++],S-=3;S&&(P[a++]=k[C++],S>1&&(P[a++]=k[C++]))}else{C=a-j;do{P[a++]=P[C++],P[a++]=P[C++],P[a++]=P[C++],S-=3}while(S>2);S&&(P[a++]=P[C++],S>1&&(P[a++]=P[C++]))}break}}break}}while(r<o&&a<c);r-=S=g>>3,m&=(1<<(g-=S<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r<o?o-r+5:5-(r-o),e.avail_out=a<c?c-a+257:257-(a-c),s.hold=m,s.bits=g}},{}],8:[function(e,t,s){"use strict";var n=e("../utils/common"),i=e("./adler32"),r=e("./crc32"),o=e("./inffast"),a=e("./inftrees"),l=0,c=1,u=2,d=4,p=5,h=6,f=0,m=1,g=2,v=-2,x=-3,y=-4,b=-5,w=8,_=1,S=2,j=3,C=4,k=5,E=6,P=7,I=8,T=9,O=10,A=11,N=12,M=13,V=14,F=15,R=16,B=17,D=18,z=19,L=20,G=21,H=22,U=23,W=24,q=25,Z=26,K=27,Y=28,X=29,J=30,Q=31,$=852,ee=592,te=15;function se(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function ne(){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 n.Buf16(320),this.work=new n.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 n.Buf32($),t.distcode=t.distdyn=new n.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 oe(e,t){var s,n;return e&&e.state?(n=e.state,t<0?(s=0,t=-t):(s=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?v:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=s,n.wbits=t,re(e))):v}function ae(e,t){var s,n;return e?(n=new ne,e.state=n,n.window=null,(s=oe(e,t))!==f&&(e.state=null),s):v}function le(e){return ae(e,te)}var ce,ue,de=!0;function pe(e){if(de){var t;for(ce=new n.Buf32(512),ue=new n.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(a(c,e.lens,0,288,ce,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(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 he(e,t,s,i){var r,o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new n.Buf8(o.wsize)),i>=o.wsize?(n.arraySet(o.window,t,s-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((r=o.wsize-o.wnext)>i&&(r=i),n.arraySet(o.window,t,s-i,r,o.wnext),(i-=r)?(n.arraySet(o.window,t,s-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=r,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=r))),0}function fe(e,t){var s,$,ee,te,ne,ie,re,oe,ae,le,ce,ue,de,fe,me,ge,ve,xe,ye,be,we,_e,Se,je,Ce=0,ke=new n.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;(s=e.state).mode===N&&(s.mode=M),ne=e.next_out,ee=e.output,re=e.avail_out,te=e.next_in,$=e.input,ie=e.avail_in,oe=s.hold,ae=s.bits,le=ie,ce=re,_e=f;e:for(;;)switch(s.mode){case _:if(0===s.wrap){s.mode=M;break}for(;ae<16;){if(0===ie)break e;ie--,oe+=$[te++]<<ae,ae+=8}if(2&s.wrap&&35615===oe){s.check=0,ke[0]=255&oe,ke[1]=oe>>>8&255,s.check=r(s.check,ke,2,0),oe=0,ae=0,s.mode=S;break}if(s.flags=0,s.head&&(s.head.done=!1),!(1&s.wrap)||(((255&oe)<<8)+(oe>>8))%31){e.msg="incorrect header check",s.mode=J;break}if((15&oe)!==w){e.msg="unknown compression method",s.mode=J;break}if(ae-=4,we=8+(15&(oe>>>=4)),0===s.wbits)s.wbits=we;else if(we>s.wbits){e.msg="invalid window size",s.mode=J;break}s.dmax=1<<we,e.adler=s.check=1,s.mode=512&oe?O:N,oe=0,ae=0;break;case S:for(;ae<16;){if(0===ie)break e;ie--,oe+=$[te++]<<ae,ae+=8}if(s.flags=oe,(255&s.flags)!==w){e.msg="unknown compression method",s.mode=J;break}if(57344&s.flags){e.msg="unknown header flags set",s.mode=J;break}s.head&&(s.head.text=oe>>8&1),512&s.flags&&(ke[0]=255&oe,ke[1]=oe>>>8&255,s.check=r(s.check,ke,2,0)),oe=0,ae=0,s.mode=j;case j:for(;ae<32;){if(0===ie)break e;ie--,oe+=$[te++]<<ae,ae+=8}s.head&&(s.head.time=oe),512&s.flags&&(ke[0]=255&oe,ke[1]=oe>>>8&255,ke[2]=oe>>>16&255,ke[3]=oe>>>24&255,s.check=r(s.check,ke,4,0)),oe=0,ae=0,s.mode=C;case C:for(;ae<16;){if(0===ie)break e;ie--,oe+=$[te++]<<ae,ae+=8}s.head&&(s.head.xflags=255&oe,s.head.os=oe>>8),512&s.flags&&(ke[0]=255&oe,ke[1]=oe>>>8&255,s.check=r(s.check,ke,2,0)),oe=0,ae=0,s.mode=k;case k:if(1024&s.flags){for(;ae<16;){if(0===ie)break e;ie--,oe+=$[te++]<<ae,ae+=8}s.length=oe,s.head&&(s.head.extra_len=oe),512&s.flags&&(ke[0]=255&oe,ke[1]=oe>>>8&255,s.check=r(s.check,ke,2,0)),oe=0,ae=0}else s.head&&(s.head.extra=null);s.mode=E;case E:if(1024&s.flags&&((ue=s.length)>ie&&(ue=ie),ue&&(s.head&&(we=s.head.extra_len-s.length,s.head.extra||(s.head.extra=new Array(s.head.extra_len)),n.arraySet(s.head.extra,$,te,ue,we)),512&s.flags&&(s.check=r(s.check,$,ue,te)),ie-=ue,te+=ue,s.length-=ue),s.length))break e;s.length=0,s.mode=P;case P:if(2048&s.flags){if(0===ie)break e;ue=0;do{we=$[te+ue++],s.head&&we&&s.length<65536&&(s.head.name+=String.fromCharCode(we))}while(we&&ue<ie);if(512&s.flags&&(s.check=r(s.check,$,ue,te)),ie-=ue,te+=ue,we)break e}else s.head&&(s.head.name=null);s.length=0,s.mode=I;case I:if(4096&s.flags){if(0===ie)break e;ue=0;do{we=$[te+ue++],s.head&&we&&s.length<65536&&(s.head.comment+=String.fromCharCode(we))}while(we&&ue<ie);if(512&s.flags&&(s.check=r(s.check,$,ue,te)),ie-=ue,te+=ue,we)break e}else s.head&&(s.head.comment=null);s.mode=T;case T:if(512&s.flags){for(;ae<16;){if(0===ie)break e;ie--,oe+=$[te++]<<ae,ae+=8}if(oe!==(65535&s.check)){e.msg="header crc mismatch",s.mode=J;break}oe=0,ae=0}s.head&&(s.head.hcrc=s.flags>>9&1,s.head.done=!0),e.adler=s.check=0,s.mode=N;break;case O:for(;ae<32;){if(0===ie)break e;ie--,oe+=$[te++]<<ae,ae+=8}e.adler=s.check=se(oe),oe=0,ae=0,s.mode=A;case A:if(0===s.havedict)return e.next_out=ne,e.avail_out=re,e.next_in=te,e.avail_in=ie,s.hold=oe,s.bits=ae,g;e.adler=s.check=1,s.mode=N;case N:if(t===p||t===h)break e;case M:if(s.last){oe>>>=7&ae,ae-=7&ae,s.mode=K;break}for(;ae<3;){if(0===ie)break e;ie--,oe+=$[te++]<<ae,ae+=8}switch(s.last=1&oe,ae-=1,3&(oe>>>=1)){case 0:s.mode=V;break;case 1:if(pe(s),s.mode=L,t===h){oe>>>=2,ae-=2;break e}break;case 2:s.mode=B;break;case 3:e.msg="invalid block type",s.mode=J}oe>>>=2,ae-=2;break;case V:for(oe>>>=7&ae,ae-=7&ae;ae<32;){if(0===ie)break e;ie--,oe+=$[te++]<<ae,ae+=8}if((65535&oe)!=(oe>>>16^65535)){e.msg="invalid stored block lengths",s.mode=J;break}if(s.length=65535&oe,oe=0,ae=0,s.mode=F,t===h)break e;case F:s.mode=R;case R:if(ue=s.length){if(ue>ie&&(ue=ie),ue>re&&(ue=re),0===ue)break e;n.arraySet(ee,$,te,ue,ne),ie-=ue,te+=ue,re-=ue,ne+=ue,s.length-=ue;break}s.mode=N;break;case B:for(;ae<14;){if(0===ie)break e;ie--,oe+=$[te++]<<ae,ae+=8}if(s.nlen=257+(31&oe),oe>>>=5,ae-=5,s.ndist=1+(31&oe),oe>>>=5,ae-=5,s.ncode=4+(15&oe),oe>>>=4,ae-=4,s.nlen>286||s.ndist>30){e.msg="too many length or distance symbols",s.mode=J;break}s.have=0,s.mode=D;case D:for(;s.have<s.ncode;){for(;ae<3;){if(0===ie)break e;ie--,oe+=$[te++]<<ae,ae+=8}s.lens[Ee[s.have++]]=7&oe,oe>>>=3,ae-=3}for(;s.have<19;)s.lens[Ee[s.have++]]=0;if(s.lencode=s.lendyn,s.lenbits=7,Se={bits:s.lenbits},_e=a(l,s.lens,0,19,s.lencode,0,s.work,Se),s.lenbits=Se.bits,_e){e.msg="invalid code lengths set",s.mode=J;break}s.have=0,s.mode=z;case z:for(;s.have<s.nlen+s.ndist;){for(;ge=(Ce=s.lencode[oe&(1<<s.lenbits)-1])>>>16&255,ve=65535&Ce,!((me=Ce>>>24)<=ae);){if(0===ie)break e;ie--,oe+=$[te++]<<ae,ae+=8}if(ve<16)oe>>>=me,ae-=me,s.lens[s.have++]=ve;else{if(16===ve){for(je=me+2;ae<je;){if(0===ie)break e;ie--,oe+=$[te++]<<ae,ae+=8}if(oe>>>=me,ae-=me,0===s.have){e.msg="invalid bit length repeat",s.mode=J;break}we=s.lens[s.have-1],ue=3+(3&oe),oe>>>=2,ae-=2}else if(17===ve){for(je=me+3;ae<je;){if(0===ie)break e;ie--,oe+=$[te++]<<ae,ae+=8}ae-=me,we=0,ue=3+(7&(oe>>>=me)),oe>>>=3,ae-=3}else{for(je=me+7;ae<je;){if(0===ie)break e;ie--,oe+=$[te++]<<ae,ae+=8}ae-=me,we=0,ue=11+(127&(oe>>>=me)),oe>>>=7,ae-=7}if(s.have+ue>s.nlen+s.ndist){e.msg="invalid bit length repeat",s.mode=J;break}for(;ue--;)s.lens[s.have++]=we}}if(s.mode===J)break;if(0===s.lens[256]){e.msg="invalid code -- missing end-of-block",s.mode=J;break}if(s.lenbits=9,Se={bits:s.lenbits},_e=a(c,s.lens,0,s.nlen,s.lencode,0,s.work,Se),s.lenbits=Se.bits,_e){e.msg="invalid literal/lengths set",s.mode=J;break}if(s.distbits=6,s.distcode=s.distdyn,Se={bits:s.distbits},_e=a(u,s.lens,s.nlen,s.ndist,s.distcode,0,s.work,Se),s.distbits=Se.bits,_e){e.msg="invalid distances set",s.mode=J;break}if(s.mode=L,t===h)break e;case L:s.mode=G;case G:if(ie>=6&&re>=258){e.next_out=ne,e.avail_out=re,e.next_in=te,e.avail_in=ie,s.hold=oe,s.bits=ae,o(e,ce),ne=e.next_out,ee=e.output,re=e.avail_out,te=e.next_in,$=e.input,ie=e.avail_in,oe=s.hold,ae=s.bits,s.mode===N&&(s.back=-1);break}for(s.back=0;ge=(Ce=s.lencode[oe&(1<<s.lenbits)-1])>>>16&255,ve=65535&Ce,!((me=Ce>>>24)<=ae);){if(0===ie)break e;ie--,oe+=$[te++]<<ae,ae+=8}if(ge&&0==(240&ge)){for(xe=me,ye=ge,be=ve;ge=(Ce=s.lencode[be+((oe&(1<<xe+ye)-1)>>xe)])>>>16&255,ve=65535&Ce,!(xe+(me=Ce>>>24)<=ae);){if(0===ie)break e;ie--,oe+=$[te++]<<ae,ae+=8}oe>>>=xe,ae-=xe,s.back+=xe}if(oe>>>=me,ae-=me,s.back+=me,s.length=ve,0===ge){s.mode=Z;break}if(32&ge){s.back=-1,s.mode=N;break}if(64&ge){e.msg="invalid literal/length code",s.mode=J;break}s.extra=15&ge,s.mode=H;case H:if(s.extra){for(je=s.extra;ae<je;){if(0===ie)break e;ie--,oe+=$[te++]<<ae,ae+=8}s.length+=oe&(1<<s.extra)-1,oe>>>=s.extra,ae-=s.extra,s.back+=s.extra}s.was=s.length,s.mode=U;case U:for(;ge=(Ce=s.distcode[oe&(1<<s.distbits)-1])>>>16&255,ve=65535&Ce,!((me=Ce>>>24)<=ae);){if(0===ie)break e;ie--,oe+=$[te++]<<ae,ae+=8}if(0==(240&ge)){for(xe=me,ye=ge,be=ve;ge=(Ce=s.distcode[be+((oe&(1<<xe+ye)-1)>>xe)])>>>16&255,ve=65535&Ce,!(xe+(me=Ce>>>24)<=ae);){if(0===ie)break e;ie--,oe+=$[te++]<<ae,ae+=8}oe>>>=xe,ae-=xe,s.back+=xe}if(oe>>>=me,ae-=me,s.back+=me,64&ge){e.msg="invalid distance code",s.mode=J;break}s.offset=ve,s.extra=15&ge,s.mode=W;case W:if(s.extra){for(je=s.extra;ae<je;){if(0===ie)break e;ie--,oe+=$[te++]<<ae,ae+=8}s.offset+=oe&(1<<s.extra)-1,oe>>>=s.extra,ae-=s.extra,s.back+=s.extra}if(s.offset>s.dmax){e.msg="invalid distance too far back",s.mode=J;break}s.mode=q;case q:if(0===re)break e;if(ue=ce-re,s.offset>ue){if((ue=s.offset-ue)>s.whave&&s.sane){e.msg="invalid distance too far back",s.mode=J;break}ue>s.wnext?(ue-=s.wnext,de=s.wsize-ue):de=s.wnext-ue,ue>s.length&&(ue=s.length),fe=s.window}else fe=ee,de=ne-s.offset,ue=s.length;ue>re&&(ue=re),re-=ue,s.length-=ue;do{ee[ne++]=fe[de++]}while(--ue);0===s.length&&(s.mode=G);break;case Z:if(0===re)break e;ee[ne++]=s.length,re--,s.mode=G;break;case K:if(s.wrap){for(;ae<32;){if(0===ie)break e;ie--,oe|=$[te++]<<ae,ae+=8}if(ce-=re,e.total_out+=ce,s.total+=ce,ce&&(e.adler=s.check=s.flags?r(s.check,ee,ce,ne-ce):i(s.check,ee,ce,ne-ce)),ce=re,(s.flags?oe:se(oe))!==s.check){e.msg="incorrect data check",s.mode=J;break}oe=0,ae=0}s.mode=Y;case Y:if(s.wrap&&s.flags){for(;ae<32;){if(0===ie)break e;ie--,oe+=$[te++]<<ae,ae+=8}if(oe!==(4294967295&s.total)){e.msg="incorrect length check",s.mode=J;break}oe=0,ae=0}s.mode=X;case X:_e=m;break e;case J:_e=x;break e;case Q:return y;default:return v}return e.next_out=ne,e.avail_out=re,e.next_in=te,e.avail_in=ie,s.hold=oe,s.bits=ae,(s.wsize||ce!==e.avail_out&&s.mode<J&&(s.mode<K||t!==d))&&he(e,e.output,e.next_out,ce-e.avail_out)?(s.mode=Q,y):(le-=e.avail_in,ce-=e.avail_out,e.total_in+=le,e.total_out+=ce,s.total+=ce,s.wrap&&ce&&(e.adler=s.check=s.flags?r(s.check,ee,ce,e.next_out-ce):i(s.check,ee,ce,e.next_out-ce)),e.data_type=s.bits+(s.last?64:0)+(s.mode===N?128:0)+(s.mode===L||s.mode===F?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 s;return e&&e.state?0==(2&(s=e.state).wrap)?v:(s.head=t,t.done=!1,f):v}function ve(e,t){var s,n=t.length;return e&&e.state?0!==(s=e.state).wrap&&s.mode!==A?v:s.mode===A&&i(1,t,n,0)!==s.check?x:he(e,t,n,n)?(s.mode=Q,y):(s.havedict=1,f):v}s.inflateReset=re,s.inflateReset2=oe,s.inflateResetKeep=ie,s.inflateInit=le,s.inflateInit2=ae,s.inflate=fe,s.inflateEnd=me,s.inflateGetHeader=ge,s.inflateSetDictionary=ve,s.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(e,t,s){"use strict";var n=e("../utils/common"),i=15,r=852,o=592,a=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],p=[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],h=[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,s,f,m,g,v,x){var y,b,w,_,S,j,C,k,E,P=x.bits,I=0,T=0,O=0,A=0,N=0,M=0,V=0,F=0,R=0,B=0,D=null,z=0,L=new n.Buf16(i+1),G=new n.Buf16(i+1),H=null,U=0;for(I=0;I<=i;I++)L[I]=0;for(T=0;T<f;T++)L[t[s+T]]++;for(N=P,A=i;A>=1&&0===L[A];A--);if(N>A&&(N=A),0===A)return m[g++]=20971520,m[g++]=20971520,x.bits=1,0;for(O=1;O<A&&0===L[O];O++);for(N<O&&(N=O),F=1,I=1;I<=i;I++)if(F<<=1,(F-=L[I])<0)return-1;if(F>0&&(e===a||1!==A))return-1;for(G[1]=0,I=1;I<i;I++)G[I+1]=G[I]+L[I];for(T=0;T<f;T++)0!==t[s+T]&&(v[G[t[s+T]]++]=T);if(e===a?(D=H=v,j=19):e===l?(D=u,z-=257,H=d,U-=257,j=256):(D=p,H=h,j=-1),B=0,T=0,I=O,S=g,M=N,V=0,w=-1,_=(R=1<<N)-1,e===l&&R>r||e===c&&R>o)return 1;for(;;){C=I-V,v[T]<j?(k=0,E=v[T]):v[T]>j?(k=H[U+v[T]],E=D[z+v[T]]):(k=96,E=0),y=1<<I-V,O=b=1<<M;do{m[S+(B>>V)+(b-=y)]=C<<24|k<<16|E|0}while(0!==b);for(y=1<<I-1;B&y;)y>>=1;if(0!==y?(B&=y-1,B+=y):B=0,T++,0==--L[I]){if(I===A)break;I=t[s+v[T]]}if(I>N&&(B&_)!==w){for(0===V&&(V=N),S+=O,F=1<<(M=I-V);M+V<A&&!((F-=L[M+V])<=0);)M++,F<<=1;if(R+=1<<M,e===l&&R>r||e===c&&R>o)return 1;m[w=B&_]=N<<24|M<<16|S-g|0}}return 0!==B&&(m[S+B]=I-V<<24|64<<16|0),x.bits=N,0}},{"../utils/common":1}],10:[function(e,t,s){"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,s){"use strict";function n(){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=n},{}],"/lib/inflate.js":[function(e,t,s){"use strict";var n=e("./zlib/inflate"),i=e("./utils/common"),r=e("./utils/strings"),o=e("./zlib/constants"),a=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&&0==(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 s=n.inflateInit2(this.strm,t.windowBits);if(s!==o.Z_OK)throw new Error(a[s]);if(this.header=new c,n.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&&(s=n.inflateSetDictionary(this.strm,t.dictionary))!==o.Z_OK))throw new Error(a[s])}function p(e,t){var s=new d(t);if(s.push(e,!0),s.err)throw s.msg||a[s.err];return s.result}function h(e,t){return(t=t||{}).raw=!0,p(e,t)}d.prototype.push=function(e,t){var s,a,l,c,d,p=this.strm,h=this.options.chunkSize,f=this.options.dictionary,m=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof e?p.input=r.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?p.input=new Uint8Array(e):p.input=e,p.next_in=0,p.avail_in=p.input.length;do{if(0===p.avail_out&&(p.output=new i.Buf8(h),p.next_out=0,p.avail_out=h),(s=n.inflate(p,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&f&&(s=n.inflateSetDictionary(this.strm,f)),s===o.Z_BUF_ERROR&&!0===m&&(s=o.Z_OK,m=!1),s!==o.Z_STREAM_END&&s!==o.Z_OK)return this.onEnd(s),this.ended=!0,!1;p.next_out&&(0!==p.avail_out&&s!==o.Z_STREAM_END&&(0!==p.avail_in||a!==o.Z_FINISH&&a!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(l=r.utf8border(p.output,p.next_out),c=p.next_out-l,d=r.buf2string(p.output,l),p.next_out=c,p.avail_out=h-c,c&&i.arraySet(p.output,p.output,l,c,0),this.onData(d)):this.onData(i.shrinkBuf(p.output,p.next_out)))),0===p.avail_in&&0===p.avail_out&&(m=!0)}while((p.avail_in>0||0===p.avail_out)&&s!==o.Z_STREAM_END);return s===o.Z_STREAM_END&&(a=o.Z_FINISH),a===o.Z_FINISH?(s=n.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,s===o.Z_OK):a!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),p.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===o.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},s.Inflate=d,s.inflate=p,s.inflateRaw=h,s.ungzip=p},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")},8572:e=>{e.exports=function(){function e(t,s,n){function i(o,a){if(!s[o]){if(!t[o]){if(r)return r(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=s[o]={exports:{}};t[o][0].call(c.exports,(function(e){return i(t[o][1][e]||e)}),c,c.exports,e,t,s,n)}return s[o].exports}for(var r=void 0,o=0;o<n.length;o++)i(n[o]);return i}return e}()({1:[function(e,t,s){var n=4096,i=2*n+32,r=2*n-1,o=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 a(e){this.buf_=new Uint8Array(i),this.input_=e,this.reset()}a.READ_SIZE=n,a.IBUF_MASK=r,a.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},a.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,n);if(t<0)throw new Error("Unexpected end of input");if(t<n){this.eos_=1;for(var s=0;s<32;s++)this.buf_[e+t+s]=0}if(0===e){for(s=0;s<32;s++)this.buf_[(n<<1)+s]=this.buf_[s];this.buf_ptr_=n}else this.buf_ptr_=0;this.bit_end_pos_+=t<<3}},a.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},a.prototype.readBits=function(e){32-this.bit_pos_<e&&this.fillBitWindow();var t=this.val_>>>this.bit_pos_&o[e];return this.bit_pos_+=e,t},t.exports=a},{}],2:[function(e,t,s){s.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,2,2,2,2,2,2,2,2,2,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,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]),s.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},{}],3:[function(e,t,s){var n=e("./streams").BrotliInput,i=e("./streams").BrotliOutput,r=e("./bit_reader"),o=e("./dictionary"),a=e("./huffman").HuffmanCode,l=e("./huffman").BrotliBuildHuffmanTable,c=e("./context"),u=e("./prefix"),d=e("./transform"),p=8,h=16,f=256,m=704,g=26,v=6,x=2,y=8,b=255,w=1080,_=18,S=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),j=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 T(){this.meta_block_length=0,this.input_end=0,this.is_uncompressed=0,this.is_metadata=!1}function O(e){var t,s,n,i=new T;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===(s=e.readBits(2)))return i;for(n=0;n<s;n++){var r=e.readBits(8);if(n+1===s&&s>1&&0===r)throw new Error("Invalid size byte");i.meta_block_length|=r<<8*n}}else for(n=0;n<t;++n){var o=e.readBits(4);if(n+1===t&&t>4&&0===o)throw new Error("Invalid size nibble");i.meta_block_length|=o<<4*n}return++i.meta_block_length,i.input_end||i.is_metadata||(i.is_uncompressed=e.readBits(1)),i}function A(e,t,s){var n;return s.fillBitWindow(),(n=e[t+=s.val_>>>s.bit_pos_&b].bits-y)>0&&(s.bit_pos_+=y,t+=e[t].value,t+=s.val_>>>s.bit_pos_&(1<<n)-1),s.bit_pos_+=e[t].bits,e[t].value}function N(e,t,s,n){for(var i=0,r=p,o=0,c=0,u=32768,d=[],f=0;f<32;f++)d.push(new a(0,0));for(l(d,0,5,e,_);i<t&&u>0;){var m,g=0;if(n.readMoreInput(),n.fillBitWindow(),g+=n.val_>>>n.bit_pos_&31,n.bit_pos_+=d[g].bits,(m=255&d[g].value)<h)o=0,s[i++]=m,0!==m&&(r=m,u-=32768>>m);else{var v,x,y=m-14,b=0;if(m===h&&(b=r),c!==b&&(o=0,c=b),v=o,o>0&&(o-=2,o<<=y),i+(x=(o+=n.readBits(y)+3)-v)>t)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var w=0;w<x;w++)s[i+w]=c;i+=x,0!==c&&(u-=x<<15-c)}}if(0!==u)throw new Error("[ReadHuffmanCodeLengths] space = "+u);for(;i<t;i++)s[i]=0}function M(e,t,s,n){var i,r=0,o=new Uint8Array(e);if(n.readMoreInput(),1===(i=n.readBits(2))){for(var c=e-1,u=0,d=new Int32Array(4),p=n.readBits(2)+1;c;)c>>=1,++u;for(h=0;h<p;++h)d[h]=n.readBits(u)%e,o[d[h]]=2;switch(o[d[0]]=1,p){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");o[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");n.readBits(1)?(o[d[2]]=3,o[d[3]]=3):o[d[0]]=2}}else{var h,f=new Uint8Array(_),m=32,g=0,v=[new a(2,0),new a(2,4),new a(2,3),new a(3,2),new a(2,0),new a(2,4),new a(2,3),new a(4,1),new a(2,0),new a(2,4),new a(2,3),new a(3,2),new a(2,0),new a(2,4),new a(2,3),new a(4,5)];for(h=i;h<_&&m>0;++h){var x,b=S[h],w=0;n.fillBitWindow(),w+=n.val_>>>n.bit_pos_&15,n.bit_pos_+=v[w].bits,x=v[w].value,f[b]=x,0!==x&&(m-=32>>x,++g)}if(1!==g&&0!==m)throw new Error("[ReadHuffmanCode] invalid num_codes or space");N(f,e,o,n)}if(0===(r=l(t,s,y,o,e)))throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return r}function V(e,t,s){var n,i;return n=A(e,t,s),i=u.kBlockLengthPrefixCode[n].nbits,u.kBlockLengthPrefixCode[n].offset+s.readBits(i)}function F(e,t,s){var n;return e<j?(s+=C[e],n=t[s&=3]+k[e]):n=e-j+1,n}function R(e,t){for(var s=e[t],n=t;n;--n)e[n]=e[n-1];e[0]=s}function B(e,t){var s,n=new Uint8Array(256);for(s=0;s<256;++s)n[s]=s;for(s=0;s<t;++s){var i=e[s];e[s]=n[i],i&&R(n,i)}}function D(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 z(e,t){var s,n,i={num_htrees:null,context_map:null},r=0;t.readMoreInput();var o=i.num_htrees=I(t)+1,l=i.context_map=new Uint8Array(e);if(o<=1)return i;for(t.readBits(1)&&(r=t.readBits(4)+1),s=[],n=0;n<w;n++)s[n]=new a(0,0);for(M(o+r,s,0,t),n=0;n<e;){var c;if(t.readMoreInput(),0===(c=A(s,0,t)))l[n]=0,++n;else if(c<=r)for(var u=1+(1<<c)+t.readBits(c);--u;){if(n>=e)throw new Error("[DecodeContextMap] i >= context_map_size");l[n]=0,++n}else l[n]=c-r,++n}return t.readBits(1)&&B(l,e),i}function L(e,t,s,n,i,r,o){var a,l=2*s,c=s,u=A(t,s*w,o);(a=0===u?i[l+(1&r[c])]:1===u?i[l+(r[c]-1&1)]+1:u-2)>=e&&(a-=e),n[s]=a,i[l+(1&r[c])]=a,++r[c]}function G(e,t,s,n,i,o){var a,l=i+1,c=s&i,u=o.pos_&r.IBUF_MASK;if(t<8||o.bit_pos_+(t<<3)<o.bit_end_pos_)for(;t-- >0;)o.readMoreInput(),n[c++]=o.readBits(8),c===l&&(e.write(n,l),c=0);else{if(o.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;o.bit_pos_<32;)n[c]=o.val_>>>o.bit_pos_,o.bit_pos_+=8,++c,--t;if(u+(a=o.bit_end_pos_-o.bit_pos_>>3)>r.IBUF_MASK){for(var d=r.IBUF_MASK+1-u,p=0;p<d;p++)n[c+p]=o.buf_[u+p];a-=d,c+=d,t-=d,u=0}for(p=0;p<a;p++)n[c+p]=o.buf_[u+p];if(t-=a,(c+=a)>=l)for(e.write(n,l),c-=l,p=0;p<c;p++)n[p]=n[l+p];for(;c+t>=l;){if(a=l-c,o.input_.read(n,c,a)<a)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");e.write(n,l),t-=a,c=0}if(o.input_.read(n,c,t)<t)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");o.reset()}}function H(e){var t=e.bit_pos_+7&-8;return 0==e.readBits(t-e.bit_pos_)}function U(e){var t=new n(e),s=new r(t);return P(s),O(s).meta_block_length}function W(e,t){var s=new n(e);null==t&&(t=U(e));var r=new Uint8Array(t),o=new i(r);return q(s,o),o.pos<o.buffer.length&&(o.buffer=o.buffer.subarray(0,o.pos)),o.buffer}function q(e,t){var s,n,i,l,p,h,y,b,_,S=0,C=0,k=0,E=0,T=[16,15,11,4],N=0,R=0,B=0,U=[new D(0,0),new D(0,0),new D(0,0)],W=128+r.READ_SIZE;n=(1<<(k=P(_=new r(e))))-16,l=(i=1<<k)-1,p=new Uint8Array(i+W+o.maxDictionaryWordLength),h=i,y=[],b=[];for(var q=0;q<3*w;q++)y[q]=new a(0,0),b[q]=new a(0,0);for(;!C;){var Z,K,Y,X,J,Q,$,ee,te,se=0,ne=[1<<28,1<<28,1<<28],ie=[0],re=[1,1,1],oe=[0,1,0,1,0,1],ae=[0],le=null,ce=null,ue=null,de=null,pe=0,he=null,fe=0,me=0,ge=0;for(s=0;s<3;++s)U[s].codes=null,U[s].htrees=null;_.readMoreInput();var ve=O(_);if(S+(se=ve.meta_block_length)>t.buffer.length){var xe=new Uint8Array(S+se);xe.set(t.buffer),t.buffer=xe}if(C=ve.input_end,Z=ve.is_uncompressed,ve.is_metadata)for(H(_);se>0;--se)_.readMoreInput(),_.readBits(8);else if(0!==se)if(Z)_.bit_pos_=_.bit_pos_+7&-8,G(t,se,S,p,l,_),S+=se;else{for(s=0;s<3;++s)re[s]=I(_)+1,re[s]>=2&&(M(re[s]+2,y,s*w,_),M(g,b,s*w,_),ne[s]=V(b,s*w,_),ae[s]=1);for(_.readMoreInput(),X=(1<<(K=_.readBits(2)))-1,J=(Y=j+(_.readBits(4)<<K))+(48<<K),ce=new Uint8Array(re[0]),s=0;s<re[0];++s)_.readMoreInput(),ce[s]=_.readBits(2)<<1;var ye=z(re[0]<<v,_);Q=ye.num_htrees,le=ye.context_map;var be=z(re[2]<<x,_);for($=be.num_htrees,ue=be.context_map,U[0]=new D(f,Q),U[1]=new D(m,re[1]),U[2]=new D(J,$),s=0;s<3;++s)U[s].decode(_);for(de=0,he=0,ee=ce[ie[0]],me=c.lookupOffsets[ee],ge=c.lookupOffsets[ee+1],te=U[1].htrees[0];se>0;){var we,_e,Se,je,Ce,ke,Ee,Pe,Ie,Te,Oe,Ae;for(_.readMoreInput(),0===ne[1]&&(L(re[1],y,1,ie,oe,ae,_),ne[1]=V(b,w,_),te=U[1].htrees[ie[1]]),--ne[1],(_e=(we=A(U[1].codes,te,_))>>6)>=2?(_e-=2,Ee=-1):Ee=0,Se=u.kInsertRangeLut[_e]+(we>>3&7),je=u.kCopyRangeLut[_e]+(7&we),Ce=u.kInsertLengthPrefixCode[Se].offset+_.readBits(u.kInsertLengthPrefixCode[Se].nbits),ke=u.kCopyLengthPrefixCode[je].offset+_.readBits(u.kCopyLengthPrefixCode[je].nbits),R=p[S-1&l],B=p[S-2&l],Ie=0;Ie<Ce;++Ie)_.readMoreInput(),0===ne[0]&&(L(re[0],y,0,ie,oe,ae,_),ne[0]=V(b,0,_),de=ie[0]<<v,ee=ce[ie[0]],me=c.lookupOffsets[ee],ge=c.lookupOffsets[ee+1]),pe=le[de+(c.lookup[me+R]|c.lookup[ge+B])],--ne[0],B=R,R=A(U[0].codes,U[0].htrees[pe],_),p[S&l]=R,(S&l)===l&&t.write(p,i),++S;if((se-=Ce)<=0)break;if(Ee<0&&(_.readMoreInput(),0===ne[2]&&(L(re[2],y,2,ie,oe,ae,_),ne[2]=V(b,2*w,_),he=ie[2]<<x),--ne[2],fe=ue[he+(255&(ke>4?3:ke-2))],(Ee=A(U[2].codes,U[2].htrees[fe],_))>=Y&&(Ae=(Ee-=Y)&X,Ee=Y+((Ne=(2+(1&(Ee>>=K))<<(Oe=1+(Ee>>1)))-4)+_.readBits(Oe)<<K)+Ae)),(Pe=F(Ee,T,N))<0)throw new Error("[BrotliDecompress] invalid distance");if(Te=S&l,Pe>(E=S<n&&E!==n?S:n)){if(!(ke>=o.minDictionaryWordLength&&ke<=o.maxDictionaryWordLength))throw new Error("Invalid backward reference. pos: "+S+" distance: "+Pe+" len: "+ke+" bytes left: "+se);var Ne=o.offsetsByLength[ke],Me=Pe-E-1,Ve=o.sizeBitsByLength[ke],Fe=Me>>Ve;if(Ne+=(Me&(1<<Ve)-1)*ke,!(Fe<d.kNumTransforms))throw new Error("Invalid backward reference. pos: "+S+" distance: "+Pe+" len: "+ke+" bytes left: "+se);var Re=d.transformDictionaryWord(p,Te,Ne,ke,Fe);if(S+=Re,se-=Re,(Te+=Re)>=h){t.write(p,i);for(var Be=0;Be<Te-h;Be++)p[Be]=p[h+Be]}}else{if(Ee>0&&(T[3&N]=Pe,++N),ke>se)throw new Error("Invalid backward reference. pos: "+S+" distance: "+Pe+" len: "+ke+" bytes left: "+se);for(Ie=0;Ie<ke;++Ie)p[S&l]=p[S-Pe&l],(S&l)===l&&t.write(p,i),++S,--se}R=p[S-1&l],B=p[S-2&l]}S&=1073741823}}t.write(p,S&l)}D.prototype.decode=function(e){var t,s=0;for(t=0;t<this.num_htrees;++t)this.htrees[t]=s,s+=M(this.alphabet_size,this.codes,s,e)},s.BrotliDecompressedSize=U,s.BrotliDecompressBuffer=W,s.BrotliDecompress=q,o.init()},{"./bit_reader":1,"./context":2,"./dictionary":6,"./huffman":7,"./prefix":9,"./streams":10,"./transform":11}],4:[function(e,t,s){var n=e("base64-js");s.init=function(){return(0,e("./decode").BrotliDecompressBuffer)(n.toByteArray(e("./dictionary.bin.js")))}},{"./decode":3,"./dictionary.bin.js":5,"base64-js":8}],5:[function(e,t,s){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/dPUiqBso2q+7ZyFBvENCkkV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V+bHeydNtmC6G5ICtFC1ZwmJU/j8hf0I8TRVKSiz5oYIa93EpUI78X8GYIAZabx47/n8LDAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg="},{}],6:[function(e,t,s){var n=e("./dictionary-browser");s.init=function(){s.dictionary=n.init()},s.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]),s.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]),s.minDictionaryWordLength=4,s.maxDictionaryWordLength=24},{"./dictionary-browser":4}],7:[function(e,t,s){function n(e,t){this.bits=e,this.value=t}s.HuffmanCode=n;var i=15;function r(e,t){for(var s=1<<t-1;e&s;)s>>=1;return(e&s-1)+s}function o(e,t,s,i,r){do{e[t+(i-=s)]=new n(r.bits,r.value)}while(i>0)}function a(e,t,s){for(var n=1<<t-s;t<i&&!((n-=e[t])<=0);)++t,n<<=1;return t-s}s.BrotliBuildHuffmanTable=function(e,t,s,l,c){var u,d,p,h,f,m,g,v,x,y,b=t,w=new Int32Array(i+1),_=new Int32Array(i+1);for(y=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]&&(y[_[l[d]]++]=d);if(x=v=1<<(g=s),1===_[i]){for(p=0;p<x;++p)e[t+p]=new n(0,65535&y[0]);return x}for(p=0,d=0,u=1,h=2;u<=s;++u,h<<=1)for(;w[u]>0;--w[u])o(e,t+p,h,v,new n(255&u,65535&y[d++])),p=r(p,u);for(m=x-1,f=-1,u=s+1,h=2;u<=i;++u,h<<=1)for(;w[u]>0;--w[u])(p&m)!==f&&(t+=v,x+=v=1<<(g=a(w,u,s)),e[b+(f=p&m)]=new n(g+s&255,t-b-f&65535)),o(e,t+(p>>s),h,v,new n(u-s&255,65535&y[d++])),p=r(p,u);return x}},{}],8:[function(e,t,s){"use strict";s.byteLength=u,s.toByteArray=p,s.fromByteArray=m;for(var n=[],i=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=o.length;a<l;++a)n[a]=o[a],i[o.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var s=e.indexOf("=");return-1===s&&(s=t),[s,s===t?0:4-s%4]}function u(e){var t=c(e),s=t[0],n=t[1];return 3*(s+n)/4-n}function d(e,t,s){return 3*(t+s)/4-s}function p(e){for(var t,s=c(e),n=s[0],o=s[1],a=new r(d(e,n,o)),l=0,u=o>0?n-4:n,p=0;p<u;p+=4)t=i[e.charCodeAt(p)]<<18|i[e.charCodeAt(p+1)]<<12|i[e.charCodeAt(p+2)]<<6|i[e.charCodeAt(p+3)],a[l++]=t>>16&255,a[l++]=t>>8&255,a[l++]=255&t;return 2===o&&(t=i[e.charCodeAt(p)]<<2|i[e.charCodeAt(p+1)]>>4,a[l++]=255&t),1===o&&(t=i[e.charCodeAt(p)]<<10|i[e.charCodeAt(p+1)]<<4|i[e.charCodeAt(p+2)]>>2,a[l++]=t>>8&255,a[l++]=255&t),a}function h(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function f(e,t,s){for(var n,i=[],r=t;r<s;r+=3)n=(e[r]<<16&16711680)+(e[r+1]<<8&65280)+(255&e[r+2]),i.push(h(n));return i.join("")}function m(e){for(var t,s=e.length,i=s%3,r=[],o=16383,a=0,l=s-i;a<l;a+=o)r.push(f(e,a,a+o>l?l:a+o));return 1===i?(t=e[s-1],r.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[s-2]<<8)+e[s-1],r.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),r.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],9:[function(e,t,s){function n(e,t){this.offset=e,this.nbits=t}s.kBlockLengthPrefixCode=[new n(1,2),new n(5,2),new n(9,2),new n(13,2),new n(17,3),new n(25,3),new n(33,3),new n(41,3),new n(49,4),new n(65,4),new n(81,4),new n(97,4),new n(113,5),new n(145,5),new n(177,5),new n(209,5),new n(241,6),new n(305,6),new n(369,7),new n(497,8),new n(753,9),new n(1265,10),new n(2289,11),new n(4337,12),new n(8433,13),new n(16625,24)],s.kInsertLengthPrefixCode=[new n(0,0),new n(1,0),new n(2,0),new n(3,0),new n(4,0),new n(5,0),new n(6,1),new n(8,1),new n(10,2),new n(14,2),new n(18,3),new n(26,3),new n(34,4),new n(50,4),new n(66,5),new n(98,5),new n(130,6),new n(194,7),new n(322,8),new n(578,9),new n(1090,10),new n(2114,12),new n(6210,14),new n(22594,24)],s.kCopyLengthPrefixCode=[new n(2,0),new n(3,0),new n(4,0),new n(5,0),new n(6,0),new n(7,0),new n(8,0),new n(9,0),new n(10,1),new n(12,1),new n(14,2),new n(18,2),new n(22,3),new n(30,3),new n(38,4),new n(54,4),new n(70,5),new n(102,5),new n(134,6),new n(198,7),new n(326,8),new n(582,9),new n(1094,10),new n(2118,24)],s.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],s.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},{}],10:[function(e,t,s){function n(e){this.buffer=e,this.pos=0}function i(e){this.buffer=e,this.pos=0}n.prototype.read=function(e,t,s){this.pos+s>this.buffer.length&&(s=this.buffer.length-this.pos);for(var n=0;n<s;n++)e[t+n]=this.buffer[this.pos+n];return this.pos+=s,s},s.BrotliInput=n,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},s.BrotliOutput=i},{}],11:[function(e,t,s){var n=e("./dictionary"),i=0,r=1,o=2,a=3,l=4,c=5,u=6,d=7,p=8,h=9,f=10,m=11,g=12,v=13,x=14,y=15,b=16,w=17,_=18,S=20;function j(e,t,s){this.prefix=new Uint8Array(e.length),this.transform=t,this.suffix=new Uint8Array(s.length);for(var n=0;n<e.length;n++)this.prefix[n]=e.charCodeAt(n);for(n=0;n<s.length;n++)this.suffix[n]=s.charCodeAt(n)}var C=[new j("",i,""),new j("",i," "),new j(" ",i," "),new j("",g,""),new j("",f," "),new j("",i," the "),new j(" ",i,""),new j("s ",i," "),new j("",i," of "),new j("",f,""),new j("",i," and "),new j("",v,""),new j("",r,""),new j(", ",i," "),new j("",i,", "),new j(" ",f," "),new j("",i," in "),new j("",i," to "),new j("e ",i," "),new j("",i,'"'),new j("",i,"."),new j("",i,'">'),new j("",i,"\n"),new j("",a,""),new j("",i,"]"),new j("",i," for "),new j("",x,""),new j("",o,""),new j("",i," a "),new j("",i," that "),new j(" ",f,""),new j("",i,". "),new j(".",i,""),new j(" ",i,", "),new j("",y,""),new j("",i," with "),new j("",i,"'"),new j("",i," from "),new j("",i," by "),new j("",b,""),new j("",w,""),new j(" the ",i,""),new j("",l,""),new j("",i,". The "),new j("",m,""),new j("",i," on "),new j("",i," as "),new j("",i," is "),new j("",d,""),new j("",r,"ing "),new j("",i,"\n\t"),new j("",i,":"),new j(" ",i,". "),new j("",i,"ed "),new j("",S,""),new j("",_,""),new j("",u,""),new j("",i,"("),new j("",f,", "),new j("",p,""),new j("",i," at "),new j("",i,"ly "),new j(" the ",i," of "),new j("",c,""),new j("",h,""),new j(" ",f,", "),new j("",f,'"'),new j(".",i,"("),new j("",m," "),new j("",f,'">'),new j("",i,'="'),new j(" ",i,"."),new j(".com/",i,""),new j(" the ",i," of the "),new j("",f,"'"),new j("",i,". This "),new j("",i,","),new j(".",i," "),new j("",f,"("),new j("",f,"."),new j("",i," not "),new j(" ",i,'="'),new j("",i,"er "),new j(" ",m," "),new j("",i,"al "),new j(" ",m,""),new j("",i,"='"),new j("",m,'"'),new j("",f,". "),new j(" ",i,"("),new j("",i,"ful "),new j(" ",f,". "),new j("",i,"ive "),new j("",i,"less "),new j("",m,"'"),new j("",i,"est "),new j(" ",f,"."),new j("",m,'">'),new j(" ",i,"='"),new j("",f,","),new j("",i,"ize "),new j("",m,"."),new j(" ",i,""),new j(" ",i,","),new j("",f,'="'),new j("",m,'="'),new j("",i,"ous "),new j("",m,", "),new j("",f,"='"),new j(" ",f,","),new j(" ",m,'="'),new j(" ",m,", "),new j("",m,","),new j("",m,"("),new j("",m,". "),new j(" ",m,"."),new j("",m,"='"),new j(" ",m,". "),new j(" ",f,'="'),new j(" ",m,"='"),new j(" ",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)}s.kTransforms=C,s.kNumTransforms=C.length,s.transformDictionaryWord=function(e,t,s,i,r){var o,a=C[r].prefix,l=C[r].suffix,c=C[r].transform,u=c<g?0:c-(g-1),d=0,p=t;u>i&&(u=i);for(var v=0;v<a.length;)e[t++]=a[v++];for(s+=u,i-=u,c<=h&&(i-=c),d=0;d<i;d++)e[t++]=n.dictionary[s+d];if(o=t-i,c===f)k(e,o);else if(c===m)for(;i>0;){var x=k(e,o);o+=x,i-=x}for(var y=0;y<l.length;)e[t++]=l[y++];return t-p}},{"./dictionary":6}],12:[function(e,t,s){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",:"E",:"E",:"E",:"E",:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",:"I",Ȋ:"I",:"I",:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ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ǹ:"N",ǹ:"n",:"O",:"o",:"O",:"o",:"U",:"u",:"W",:"w",:"Y",:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",:"S",:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",:"D",:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",:"H",:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},s=Object.keys(t).join("|"),n=new RegExp(s,"g"),i=new RegExp(s,"");function r(e){return t[e]}var o=function(e){return e.replace(n,r)};e.exports=o,e.exports.has=function(e){return!!e.match(i)},e.exports.remove=o},8477:(e,t,s)=>{"use strict";
/**
* @license React
* use-sync-external-store-shim.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var n=s(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=n.useState,o=n.useEffect,a=n.useLayoutEffect,l=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!i(e,s)}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 s=t(),n=r({inst:{value:s,getSnapshot:t}}),i=n[0].inst,u=n[1];return a((function(){i.value=s,i.getSnapshot=t,c(i)&&u({inst:i})}),[e,s,t]),o((function(){return c(i)&&u({inst:i}),e((function(){c(i)&&u({inst:i})}))}),[e]),l(s),s};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:u},422:(e,t,s)=>{"use strict";e.exports=s(8477)},1609:e=>{"use strict";e.exports=window.React}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}};return s[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(s,n){if(1&n&&(s=this(s)),8&n)return s;if("object"==typeof s&&s){if(4&n&&s.__esModule)return s;if(16&n&&"function"==typeof s.then)return s}var r=Object.create(null);i.r(r);var o={};e=e||[null,t({}),t([]),t(t)];for(var a=2&n&&s;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>o[e]=()=>s[e]));return o.default=()=>s,i.d(r,o),r},i.d=(e,t)=>{for(var s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},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:()=>Dk,PluginSidebar:()=>zk,PluginSidebarMoreMenuItem:()=>Lk,PluginTemplateSettingPanel:()=>fa,initializeEditor:()=>Kk,initializePostsDashboard:()=>Wk,reinitializeEditor:()=>Yk,store:()=>zt});var e={};i.r(e),i.d(e,{__experimentalSetPreviewDeviceType:()=>He,addTemplate:()=>We,closeGeneralSidebar:()=>lt,openGeneralSidebar:()=>at,openNavigationPanelToMenu:()=>et,removeTemplate:()=>qe,revertTemplate:()=>ot,setEditedEntity:()=>Ye,setEditedPostContext:()=>Je,setHasPageContentFocus:()=>ut,setHomeTemplateId:()=>Xe,setIsInserterOpened:()=>st,setIsListViewOpened:()=>nt,setIsNavigationPanelOpened:()=>tt,setIsSaveViewOpened:()=>rt,setNavigationMenu:()=>Ke,setNavigationPanelActiveMenu:()=>$e,setPage:()=>Qe,setTemplate:()=>Ue,setTemplatePart:()=>Ze,switchEditorMode:()=>ct,toggleDistractionFree:()=>dt,toggleFeature:()=>Ge,updateSettings:()=>it});var t={};i.r(t),i.d(t,{setCanvasMode:()=>pt,setEditorCanvasContainerView:()=>ht});var s={};i.r(s),i.d(s,{__experimentalGetInsertionPoint:()=>kt,__experimentalGetPreviewDeviceType:()=>gt,getCanUserCreateMedia:()=>vt,getCurrentTemplateNavigationPanelSubMenu:()=>At,getCurrentTemplateTemplateParts:()=>Tt,getEditedPostContext:()=>St,getEditedPostId:()=>_t,getEditedPostType:()=>wt,getEditorMode:()=>Ot,getHomeTemplateId:()=>bt,getNavigationPanelActiveMenu:()=>Nt,getPage:()=>jt,getReusableBlocks:()=>xt,getSettings:()=>yt,hasPageContentFocus:()=>Ft,isFeatureActive:()=>mt,isInserterOpened:()=>Ct,isListViewOpened:()=>Et,isNavigationOpened:()=>Mt,isPage:()=>Vt,isSaveViewOpened:()=>Pt});var n={};i.r(n),i.d(n,{getCanvasMode:()=>Rt,getEditorCanvasContainerView:()=>Bt});const o=window.wp.blocks,a=window.wp.blockLibrary,l=window.wp.data,c=window.wp.deprecated;var u=i.n(c);const d=window.wp.element,h=window.wp.editor,f=window.wp.preferences,m=window.wp.widgets,g=window.wp.hooks,v=window.wp.compose,x=window.wp.blockEditor,y=window.wp.components,b=window.wp.i18n,w=window.wp.notices,_=window.wp.coreData;var S={grad:.9,turn:360,rad:360/(2*Math.PI)},j=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},C=function(e,t,s){return void 0===t&&(t=0),void 0===s&&(s=Math.pow(10,t)),Math.round(s*e)/s+0},k=function(e,t,s){return void 0===t&&(t=0),void 0===s&&(s=1),e>s?s:e>t?e:t},E=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},P=function(e){return{r:k(e.r,0,255),g:k(e.g,0,255),b:k(e.b,0,255),a:k(e.a)}},I=function(e){return{r:C(e.r),g:C(e.g),b:C(e.b),a:C(e.a,3)}},T=/^#([0-9a-f]{3,8})$/i,O=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},A=function(e){var t=e.r,s=e.g,n=e.b,i=e.a,r=Math.max(t,s,n),o=r-Math.min(t,s,n),a=o?r===t?(s-n)/o:r===s?2+(n-t)/o:4+(t-s)/o:0;return{h:60*(a<0?a+6:a),s:r?o/r*100:0,v:r/255*100,a:i}},N=function(e){var t=e.h,s=e.s,n=e.v,i=e.a;t=t/360*6,s/=100,n/=100;var r=Math.floor(t),o=n*(1-s),a=n*(1-(t-r)*s),l=n*(1-(1-t+r)*s),c=r%6;return{r:255*[n,a,o,o,l,n][c],g:255*[l,n,n,a,o,o][c],b:255*[o,o,l,n,n,a][c],a:i}},M=function(e){return{h:E(e.h),s:k(e.s,0,100),l:k(e.l,0,100),a:k(e.a)}},V=function(e){return{h:C(e.h),s:C(e.s),l:C(e.l),a:C(e.a,3)}},F=function(e){return N((s=(t=e).s,{h:t.h,s:(s*=((n=t.l)<50?n:100-n)/100)>0?2*s/(n+s)*100:0,v:n+s,a:t.a}));var t,s,n},R=function(e){return{h:(t=A(e)).h,s:(i=(200-(s=t.s))*(n=t.v)/100)>0&&i<200?s*n/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,s,n,i},B=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,D=/^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,L=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,G={string:[[function(e){var t=T.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?C(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?C(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=z.exec(e)||L.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:P({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=B.exec(e)||D.exec(e);if(!t)return null;var s,n,i=M({h:(s=t[1],n=t[2],void 0===n&&(n="deg"),Number(s)*(S[n]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return F(i)},"hsl"]],object:[[function(e){var t=e.r,s=e.g,n=e.b,i=e.a,r=void 0===i?1:i;return j(t)&&j(s)&&j(n)?P({r:Number(t),g:Number(s),b:Number(n),a:Number(r)}):null},"rgb"],[function(e){var t=e.h,s=e.s,n=e.l,i=e.a,r=void 0===i?1:i;if(!j(t)||!j(s)||!j(n))return null;var o=M({h:Number(t),s:Number(s),l:Number(n),a:Number(r)});return F(o)},"hsl"],[function(e){var t=e.h,s=e.s,n=e.v,i=e.a,r=void 0===i?1:i;if(!j(t)||!j(s)||!j(n))return null;var o=function(e){return{h:E(e.h),s:k(e.s,0,100),v:k(e.v,0,100),a:k(e.a)}}({h:Number(t),s:Number(s),v:Number(n),a:Number(r)});return N(o)},"hsv"]]},H=function(e,t){for(var s=0;s<t.length;s++){var n=t[s][0](e);if(n)return[n,t[s][1]]}return[null,void 0]},U=function(e){return"string"==typeof e?H(e.trim(),G.string):"object"==typeof e&&null!==e?H(e,G.object):[null,void 0]},W=function(e,t){var s=R(e);return{h:s.h,s:k(s.s+100*t,0,100),l:s.l,a:s.a}},q=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Z=function(e,t){var s=R(e);return{h:s.h,s:s.s,l:k(s.l+100*t,0,100),a:s.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 C(q(this.rgba),2)},e.prototype.isDark=function(){return q(this.rgba)<.5},e.prototype.isLight=function(){return q(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=I(this.rgba)).r,s=e.g,n=e.b,r=(i=e.a)<1?O(C(255*i)):"","#"+O(t)+O(s)+O(n)+r;var e,t,s,n,i,r},e.prototype.toRgb=function(){return I(this.rgba)},e.prototype.toRgbString=function(){return t=(e=I(this.rgba)).r,s=e.g,n=e.b,(i=e.a)<1?"rgba("+t+", "+s+", "+n+", "+i+")":"rgb("+t+", "+s+", "+n+")";var e,t,s,n,i},e.prototype.toHsl=function(){return V(R(this.rgba))},e.prototype.toHslString=function(){return t=(e=V(R(this.rgba))).h,s=e.s,n=e.l,(i=e.a)<1?"hsla("+t+", "+s+"%, "+n+"%, "+i+")":"hsl("+t+", "+s+"%, "+n+"%)";var e,t,s,n,i},e.prototype.toHsv=function(){return e=A(this.rgba),{h:C(e.h),s:C(e.s),v:C(e.v),a:C(e.a,3)};var e},e.prototype.invert=function(){return Y({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),Y(W(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Y(W(this.rgba,-e))},e.prototype.grayscale=function(){return Y(W(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Y(Z(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Y(Z(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?Y({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):C(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=R(this.rgba);return"number"==typeof e?Y({h:e,s:t.s,l:t.l,a:t.a}):C(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Y(e).toHex()},e}(),Y=function(e){return e instanceof K?e:new K(e)},X=[],J=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Q=function(e){return.2126*J(e.r)+.7152*J(e.g)+.0722*J(e.b)};const $=window.wp.privateApis,{lock:ee,unlock:te}=(0,$.__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:ne}=te(x.privateApis);function ie(){const[e="black"]=ne("color.text"),[t="white"]=ne("color.background"),[s=e]=ne("elements.h1.color.text"),[n=s]=ne("elements.link.color.text"),[i=n]=ne("elements.button.color.background"),[r]=se("color.palette.core"),[o]=se("color.palette.theme"),[a]=se("color.palette.custom"),l=(null!=o?o:[]).concat(null!=a?a:[]).concat(null!=r?r:[]),c=l.filter((({color:t})=>t===e)),u=l.filter((({color:e})=>e===i)),d=c.concat(u).concat(l).filter((({color:e})=>e!==t)).slice(0,2);return{paletteColors:l,highlightedColors:d}}function re(e,t,s){return e&&"object"==typeof e?(t.reduce(((e,n,i)=>(void 0===e[n]&&(Number.isInteger(t[i+1])?e[n]=[]:e[n]={}),i===t.length-1&&(e[n]=s),e[n])),e),e):e}!function(e){e.forEach((function(e){X.indexOf(e)<0&&(e(K,G),X.push(e))}))}([function(e){e.prototype.luminance=function(){return e=Q(this.rgba),void 0===(t=2)&&(t=0),void 0===s&&(s=Math.pow(10,t)),Math.round(s*e)/s+0;var e,t,s},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var s,n,i,r,o,a,l,c=t instanceof e?t:new e(t);return r=this.rgba,o=c.toRgb(),s=(a=Q(r))>(l=Q(o))?(a+.05)/(l+.05):(l+.05)/(a+.05),void 0===(n=2)&&(n=0),void 0===i&&(i=Math.pow(10,n)),Math.floor(i*s)/i+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(o=void 0===(r=(s=t).size)?"normal":r,"AAA"===(i=void 0===(n=s.level)?"AA":n)&&"normal"===o?7:"AA"===i&&"large"===o?3:4.5);var s,n,i,r,o}}]);const oe=window.ReactJSXRuntime,{cleanEmptyObject:ae,GlobalStylesContext:le}=te(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"},pe=["border","color","spacing","typography"],he=(e,t)=>{let s=e;return t.forEach((e=>{s=s?.[e]})),s},fe=["borderColor","borderWidth","borderStyle"],me=["top","right","bottom","left"];function ge(e,t,s){if(!t?.[e]||s?.[e]?.style)return[];const{color:n,style:i,width:r}=t[e];return!(n||r)||i?[]:[{path:["border",e,"style"],value:"solid"}]}function ve(e,t,s){const n=function(e,t){const{supportedPanels:s}=(0,l.useSelect)((s=>({supportedPanels:te(s(o.store)).getSupportedStyles(e,t)})),[e,t]);return s}(e),i=s?.styles?.blocks?.[e];return(0,d.useMemo)((()=>{const e=n.flatMap((e=>{if(!ce[e])return[];const{value:s}=ce[e],n=s.join("."),i=t[de[n]],r=i?`var:preset|${ue[n]}|${i}`:he(t.style,s);if("linkColor"===e){const e=r?[{path:s,value:r}]:[],n=["elements","link",":hover","color","text"],i=he(t.style,n);return i&&e.push({path:n,value:i}),e}if(fe.includes(e)&&r){const e=[{path:s,value:r}];return me.forEach((t=>{const n=[...s];n.splice(-1,0,t),e.push({path:n,value:r})})),e}return r?[{path:s,value:r}]:[]}));return function(e,t,s){if(!e&&!t)return[];const n=[...ge("top",e,s),...ge("right",e,s),...ge("bottom",e,s),...ge("left",e,s)],{color:i,style:r,width:o}=e||{};return(t||i||o)&&!r&&me.forEach((e=>{s?.[e]?.style||n.push({path:["border",e,"style"],value:"solid"})})),n}(t.style?.border,t.borderColor,i?.border).forEach((t=>e.push(t))),e}),[n,t,i])}function xe({name:e,attributes:t,setAttributes:s}){const{user:n,setUserConfig:i}=(0,d.useContext)(le),r=ve(e,t,n),{__unstableMarkNextChangeAsNotPersistent:a}=(0,l.useDispatch)(x.store),{createSuccessNotice:c}=(0,l.useDispatch)(w.store),u=(0,d.useCallback)((()=>{if(0!==r.length&&r.length>0){const{style:l}=t,u=structuredClone(l),d=structuredClone(n);for(const{path:t,value:s}of r)re(u,t,void 0),re(d,["styles","blocks",e,...t],s);const p={borderColor:void 0,backgroundColor:void 0,textColor:void 0,gradient:void 0,fontSize:void 0,fontFamily:void 0,style:ae(u)};a(),s(p),i(d,{undoIgnore:!0}),c((0,b.sprintf)((0,b.__)("%s styles applied."),(0,o.getBlockType)(e).title),{type:"snackbar",actions:[{label:(0,b.__)("Undo"),onClick(){a(),s(t),i(n,{undoIgnore:!0})}}]})}}),[a,t,r,c,e,s,i,n]);return(0,oe.jsxs)(y.BaseControl,{__nextHasNoMarginBottom:!0,className:"edit-site-push-changes-to-global-styles-control",help:(0,b.sprintf)((0,b.__)("Apply this blocks typography, spacing, dimensions, and color styles to all %s blocks."),(0,o.getBlockType)(e).title),children:[(0,oe.jsx)(y.BaseControl.VisualLabel,{children:(0,b.__)("Styles")}),(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,variant:"secondary",accessibleWhenDisabled:!0,disabled:0===r.length,onClick:u,children:(0,b.__)("Apply globally")})]})}function ye(e){const t=(0,x.useBlockEditingMode)(),s=(0,l.useSelect)((e=>e(_.store).getCurrentTheme()?.is_block_theme),[]),n=pe.some((t=>(0,o.hasBlockSupport)(e.name,t)));return"default"===t&&n&&s?(0,oe.jsx)(x.InspectorAdvancedControls,{children:(0,oe.jsx)(xe,{...e})}):null}const be=(0,v.createHigherOrderComponent)((e=>t=>(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(e,{...t},"edit"),t.isSelected&&(0,oe.jsx)(ye,{...t})]})));(0,g.addFilter)("editor.BlockEdit","core/edit-site/push-changes-to-global-styles",be);const we=(0,l.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){switch(t.type){case"SET_IS_SAVE_VIEW_OPENED":return t.isOpen;case"SET_CANVAS_MODE":return!1}return e},canvasMode:function(e="init",t){return"SET_CANVAS_MODE"===t.type?t.mode:e},editorCanvasContainerView:function(e=void 0,t){return"SET_EDITOR_CANVAS_CONTAINER_VIEW"===t.type?t.view:e}}),_e=window.wp.patterns,Se="wp_navigation",je="wp_template",Ce="wp_template_part",ke={custom:"custom",theme:"theme",plugin:"plugin"},Ee="uncategorized",Pe="all-parts",{PATTERN_TYPES:Ie,PATTERN_DEFAULT_CATEGORY:Te,PATTERN_USER_CATEGORY:Oe,EXCLUDED_PATTERN_SOURCES:Ae,PATTERN_SYNC_TYPES:Ne}=te(_e.privateApis),Me=[Ce,Se,Ie.user],Ve={[je]:(0,b.__)("Template"),[Ce]:(0,b.__)("Template part"),[Ie.user]:(0,b.__)("Pattern"),[Se]:(0,b.__)("Navigation")},Fe="grid",Re="table",Be="list",De="isAny",ze="isNone",{interfaceStore:Le}=te(h.privateApis);function Ge(e){return function({registry:t}){u()("dispatch( 'core/edit-site' ).toggleFeature( featureName )",{since:"6.0",alternative:"dispatch( 'core/preferences').toggle( 'core/edit-site', featureName )"}),t.dispatch(f.store).toggle("core/edit-site",e)}}const He=e=>({registry:t})=>{u()("dispatch( 'core/edit-site' ).__experimentalSetPreviewDeviceType",{since:"6.5",version:"6.7",hint:"registry.dispatch( editorStore ).setDeviceType"}),t.dispatch(h.store).setDeviceType(e)};function Ue(){return u()("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 We=e=>async({dispatch:t,registry:s})=>{u()("dispatch( 'core/edit-site' ).addTemplate",{since:"6.5",version:"6.8",hint:"use saveEntityRecord directly"});const n=await s.dispatch(_.store).saveEntityRecord("postType",je,e);e.content&&s.dispatch(_.store).editEntityRecord("postType",je,n.id,{blocks:(0,o.parse)(e.content)},{undoIgnore:!0}),t({type:"SET_EDITED_POST",postType:je,id:n.id})},qe=e=>({registry:t})=>te(t.dispatch(h.store)).removeTemplates([e]);function Ze(e){return{type:"SET_EDITED_POST",postType:Ce,id:e}}function Ke(e){return{type:"SET_EDITED_POST",postType:Se,id:e}}function Ye(e,t,s){return{type:"SET_EDITED_POST",postType:e,id:t,context:s}}function Xe(){return u()("dispatch( 'core/edit-site' ).setHomeTemplateId",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function Je(e){return{type:"SET_EDITED_POST_CONTEXT",context:e}}function Qe(){return u()("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 $e(){return u()("dispatch( 'core/edit-site' ).setNavigationPanelActiveMenu",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function et(){return u()("dispatch( 'core/edit-site' ).openNavigationPanelToMenu",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function tt(){return u()("dispatch( 'core/edit-site' ).setIsNavigationPanelOpened",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}const st=e=>({registry:t})=>{u()("dispatch( 'core/edit-site' ).setIsInserterOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsInserterOpened"}),t.dispatch(h.store).setIsInserterOpened(e)},nt=e=>({registry:t})=>{u()("dispatch( 'core/edit-site' ).setIsListViewOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsListViewOpened"}),t.dispatch(h.store).setIsListViewOpened(e)};function it(e){return{type:"UPDATE_SETTINGS",settings:e}}function rt(e){return{type:"SET_IS_SAVE_VIEW_OPENED",isOpen:e}}const ot=(e,t)=>({registry:s})=>te(s.dispatch(h.store)).revertTemplate(e,t),at=e=>({registry:t})=>{t.dispatch(Le).enableComplementaryArea("core",e)},lt=()=>({registry:e})=>{e.dispatch(Le).disableComplementaryArea("core")},ct=e=>({registry:t})=>{u()("dispatch( 'core/edit-site' ).switchEditorMode",{since:"6.6",alternative:"dispatch( 'core/editor').switchEditorMode"}),t.dispatch(h.store).switchEditorMode(e)},ut=e=>({dispatch:t,registry:s})=>{u()("dispatch( 'core/edit-site' ).setHasPageContentFocus",{since:"6.5"}),e&&s.dispatch(x.store).clearSelectedBlock(),t({type:"SET_HAS_PAGE_CONTENT_FOCUS",hasPageContentFocus:e})},dt=()=>({registry:e})=>{u()("dispatch( 'core/edit-site' ).toggleDistractionFree",{since:"6.6",alternative:"dispatch( 'core/editor').toggleDistractionFree"}),e.dispatch(h.store).toggleDistractionFree()},pt=e=>({registry:t,dispatch:s})=>{const n=window.matchMedia("(min-width: 782px)").matches,i=()=>{t.batch((()=>{t.dispatch(x.store).clearSelectedBlock(),t.dispatch(h.store).setDeviceType("Desktop"),t.dispatch(x.store).__unstableSetEditorMode("edit");const i=t.select(h.store).isPublishSidebarOpened();s({type:"SET_CANVAS_MODE",mode:e});const r="edit"===e;i&&!r&&t.dispatch(h.store).closePublishSidebar(),n&&r&&t.select(f.store).get("core","showListViewByDefault")&&!t.select(f.store).get("core","distractionFree")?t.dispatch(h.store).setIsListViewOpened(!0):t.dispatch(h.store).setIsListViewOpened(!1),t.dispatch(h.store).setIsInserterOpened(!1)}))};if(n&&document.startViewTransition){document.documentElement.classList.add(`canvas-mode-${e}-transition`);document.startViewTransition((()=>i())).finished.finally((()=>{document.documentElement.classList.remove(`canvas-mode-${e}-transition`)}))}else i()},ht=e=>({dispatch:t})=>{t({type:"SET_EDITOR_CANVAS_CONTAINER_VIEW",view:e})},ft=[];const mt=(0,l.createRegistrySelector)((e=>(t,s)=>(u()("select( 'core/edit-site' ).isFeatureActive",{since:"6.0",alternative:"select( 'core/preferences' ).get"}),!!e(f.store).get("core/edit-site",s)))),gt=(0,l.createRegistrySelector)((e=>()=>(u()("select( 'core/edit-site' ).__experimentalGetPreviewDeviceType",{since:"6.5",version:"6.7",alternative:"select( 'core/editor' ).getDeviceType"}),e(h.store).getDeviceType()))),vt=(0,l.createRegistrySelector)((e=>()=>(u()("wp.data.select( 'core/edit-site' ).getCanUserCreateMedia()",{since:"6.7",alternative:"wp.data.select( 'core' ).canUser( 'create', { kind: 'root', type: 'media' } )"}),e(_.store).canUser("create","media")))),xt=(0,l.createRegistrySelector)((e=>()=>{u()("select( 'core/edit-site' ).getReusableBlocks()",{since:"6.5",version:"6.8",alternative:"select( 'core/core' ).getEntityRecords( 'postType', 'wp_block' )"});return"web"===d.Platform.OS?e(_.store).getEntityRecords("postType","wp_block",{per_page:-1}):[]}));function yt(e){return e.settings}function bt(){u()("select( 'core/edit-site' ).getHomeTemplateId",{since:"6.2",version:"6.4"})}function wt(e){return e.editedPost.postType}function _t(e){return e.editedPost.id}function St(e){return e.editedPost.context}function jt(e){return{context:e.editedPost.context}}const Ct=(0,l.createRegistrySelector)((e=>()=>(u()("select( 'core/edit-site' ).isInserterOpened",{since:"6.5",alternative:"select( 'core/editor' ).isInserterOpened"}),e(h.store).isInserterOpened()))),kt=(0,l.createRegistrySelector)((e=>()=>(u()("select( 'core/edit-site' ).__experimentalGetInsertionPoint",{since:"6.5",version:"6.7"}),te(e(h.store)).getInsertionPoint()))),Et=(0,l.createRegistrySelector)((e=>()=>(u()("select( 'core/edit-site' ).isListViewOpened",{since:"6.5",alternative:"select( 'core/editor' ).isListViewOpened"}),e(h.store).isListViewOpened())));function Pt(e){return e.saveViewPanel}function It(e){const t=e(_.store).getEntityRecords("postType",Ce,{per_page:-1}),{getBlocksByName:s,getBlocksByClientId:n}=e(x.store);return[n(s("core/template-part")),t]}const Tt=(0,l.createRegistrySelector)((e=>(0,l.createSelector)((()=>(u()("select( 'core/edit-site' ).getCurrentTemplateTemplateParts()",{since:"6.7",version:"6.9",alternative:"select( 'core/block-editor' ).getBlocksByName( 'core/template-part' )"}),function(e=ft,t){const s=t?t.reduce(((e,t)=>({...e,[t.id]:t})),{}):{},n=[],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=s[`${e}//${i}`];r&&n.push({templatePart:r,block:t})}}return n}(...It(e)))),(()=>It(e))))),Ot=(0,l.createRegistrySelector)((e=>()=>e(f.store).get("core","editorMode")));function At(){u()("dispatch( 'core/edit-site' ).getCurrentTemplateNavigationPanelSubMenu",{since:"6.2",version:"6.4"})}function Nt(){u()("dispatch( 'core/edit-site' ).getNavigationPanelActiveMenu",{since:"6.2",version:"6.4"})}function Mt(){u()("dispatch( 'core/edit-site' ).isNavigationOpened",{since:"6.2",version:"6.4"})}function Vt(e){return!!e.editedPost.context?.postId}function Ft(){return u()("select( 'core/edit-site' ).hasPageContentFocus",{since:"6.5"}),!1}function Rt(e){return e.canvasMode}function Bt(e){return e.editorCanvasContainerView}const Dt={reducer:we,actions:e,selectors:s},zt=(0,l.createReduxStore)("core/edit-site",Dt);(0,l.register)(zt),te(zt).registerPrivateSelectors(n),te(zt).registerPrivateActions(t);const Lt=window.wp.plugins,Gt=window.wp.router;function Ht(e){var t,s,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(s=Ht(e[t]))&&(n&&(n+=" "),n+=s)}else for(s in e)e[s]&&(n&&(n+=" "),n+=s);return n}const Ut=function(){for(var e,t,s=0,n="",i=arguments.length;s<i;s++)(e=arguments[s])&&(t=Ht(e))&&(n&&(n+=" "),n+=t);return n},Wt=window.wp.keyboardShortcuts,qt=window.wp.commands,Zt=window.wp.coreCommands;function Kt({text:e,children:t}){const s=(0,v.useCopyToClipboard)(e);return(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,variant:"secondary",ref:s,children:t})}function Yt({message:e,error:t}){const s=[(0,oe.jsx)(Kt,{text:t.stack,children:(0,b.__)("Copy Error")},"copy-error")];return(0,oe.jsx)(x.Warning,{className:"editor-error-boundary",actions:s,children:e})}class Xt extends d.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,g.doAction)("editor.ErrorBoundary.errorLogged",e)}static getDerivedStateFromError(e){return{error:e}}render(){return this.state.error?(0,oe.jsx)(Yt,{message:(0,b.__)("The editor has encountered an unexpected error."),error:this.state.error}):this.props.children}}const Jt=window.wp.htmlEntities,Qt=window.wp.primitives,$t=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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"})}),es=window.wp.keycodes,ts=window.wp.url,ss=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,oe.jsx)(Qt.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"})});const ns=function({className:e}){const{isRequestingSite:t,siteIconUrl:s}=(0,l.useSelect)((e=>{const{getEntityRecord:t}=e(_.store),s=t("root","__unstableBase",void 0);return{isRequestingSite:!s,siteIconUrl:s?.site_icon_url}}),[]);if(t&&!s)return(0,oe.jsx)("div",{className:"edit-site-site-icon__image"});const n=s?(0,oe.jsx)("img",{className:"edit-site-site-icon__image",alt:(0,b.__)("Site Icon"),src:s}):(0,oe.jsx)(y.Icon,{className:"edit-site-site-icon__icon",icon:ss,size:48});return(0,oe.jsx)("div",{className:Ut(e,"edit-site-site-icon"),children:n})},is=window.wp.dom,rs=(0,d.createContext)((()=>{}));function os(){let e={direction:null,focusSelector:null};return{get:()=>e,navigate(t,s=null){e={direction:t,focusSelector:"forward"===t&&s?s:e.focusSelector}}}}function as({children:e}){const t=(0,d.useContext)(rs),s=(0,d.useRef)(),[n,i]=(0,d.useState)(null);(0,d.useLayoutEffect)((()=>{const{direction:e,focusSelector:n}=t.get();!function(e,t,s){let n;if("back"===t&&s&&(n=e.querySelector(s)),null!==t&&!n){const[t]=is.focus.tabbable.find(e);n=null!=t?t:e}n?.focus()}(s.current,e,n),i(e)}),[t]);const r=Ut("edit-site-sidebar__screen-wrapper",{"slide-from-left":"back"===n,"slide-from-right":"forward"===n});return(0,oe.jsx)("div",{ref:s,className:r,children:e})}function ls({routeKey:e,children:t}){const[s]=(0,d.useState)(os);return(0,oe.jsx)(rs.Provider,{value:s,children:(0,oe.jsx)("div",{className:"edit-site-sidebar__content",children:(0,oe.jsx)(as,{children:t},e)})})}const{useHistory:cs}=te(Gt.privateApis),us=(0,d.memo)((0,d.forwardRef)((({isTransparent:e},t)=>{const{dashboardLink:s,homeUrl:n,siteTitle:i}=(0,l.useSelect)((e=>{const{getSettings:t}=te(e(zt)),{getEntityRecord:s}=e(_.store),n=s("root","site");return{dashboardLink:t().__experimentalDashboardLink||"index.php",homeUrl:s("root","__unstableBase")?.home,siteTitle:!n?.title&&n?.url?(0,ts.filterURLForDisplay)(n?.url):n?.title}}),[]),{open:r}=(0,l.useDispatch)(qt.store);return(0,oe.jsx)("div",{className:"edit-site-site-hub",children:(0,oe.jsxs)(y.__experimentalHStack,{justify:"flex-start",spacing:"0",children:[(0,oe.jsx)("div",{className:Ut("edit-site-site-hub__view-mode-toggle-container",{"has-transparent-background":e}),children:(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!1,ref:t,href:s,label:(0,b.__)("Go to the Dashboard"),className:"edit-site-layout__view-mode-toggle",style:{transform:"scale(0.5)",borderRadius:4},children:(0,oe.jsx)(ns,{className:"edit-site-layout__view-mode-toggle-icon"})})}),(0,oe.jsxs)(y.__experimentalHStack,{children:[(0,oe.jsx)("div",{className:"edit-site-site-hub__title",children:(0,oe.jsxs)(y.Button,{__next40pxDefaultSize:!1,variant:"link",href:n,target:"_blank",children:[(0,Jt.decodeEntities)(i),(0,oe.jsx)(y.VisuallyHidden,{as:"span",children:(0,b.__)("(opens in a new tab)")})]})}),(0,oe.jsx)(y.__experimentalHStack,{spacing:0,expanded:!1,className:"edit-site-site-hub__actions",children:(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!1,className:"edit-site-site-hub_toggle-command-center",icon:$t,onClick:()=>r(),label:(0,b.__)("Open command palette"),shortcut:es.displayShortcut.primary("k")})})]})]})})}))),ds=us,ps=(0,d.memo)((0,d.forwardRef)((({isTransparent:e},t)=>{const s=cs(),{navigate:n}=(0,d.useContext)(rs),{homeUrl:i,siteTitle:r}=(0,l.useSelect)((e=>{const{getEntityRecord:t}=e(_.store),s=t("root","site");return{homeUrl:t("root","__unstableBase")?.home,siteTitle:!s?.title&&s?.url?(0,ts.filterURLForDisplay)(s?.url):s?.title}}),[]),{open:o}=(0,l.useDispatch)(qt.store);return(0,oe.jsx)("div",{className:"edit-site-site-hub",children:(0,oe.jsxs)(y.__experimentalHStack,{justify:"flex-start",spacing:"0",children:[(0,oe.jsx)("div",{className:Ut("edit-site-site-hub__view-mode-toggle-container",{"has-transparent-background":e}),children:(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!1,ref:t,label:(0,b.__)("Go to Site Editor"),className:"edit-site-layout__view-mode-toggle",style:{transform:"scale(0.5)",borderRadius:4},onClick:()=>{s.push({}),n("back")},children:(0,oe.jsx)(ns,{className:"edit-site-layout__view-mode-toggle-icon"})})}),(0,oe.jsxs)(y.__experimentalHStack,{children:[(0,oe.jsx)("div",{className:"edit-site-site-hub__title",children:(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!1,variant:"link",href:i,target:"_blank",label:(0,b.__)("View site (opens in a new tab)"),children:(0,Jt.decodeEntities)(r)})}),(0,oe.jsx)(y.__experimentalHStack,{spacing:0,expanded:!1,className:"edit-site-site-hub__actions",children:(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!1,className:"edit-site-site-hub_toggle-command-center",icon:$t,onClick:()=>o(),label:(0,b.__)("Open command palette"),shortcut:es.displayShortcut.primary("k")})})]})]})})}))),hs={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},fs=320,ms=1300,gs=9/19.5,vs={width:"100%",height:"100%"};function xs(e,t){const s=1-Math.max(0,Math.min(1,(e-fs)/(ms-fs))),n=((e,t,s)=>e+(t-e)*s)(t,gs,s);return e/n}const ys=function e({isFullWidth:t,isOversized:s,setIsOversized:n,isReady:i,children:r,defaultSize:o,innerContentStyle:a}){const c=(0,v.useReducedMotion)(),[u,p]=(0,d.useState)(vs),[h,f]=(0,d.useState)(),[m,g]=(0,d.useState)(!1),[x,w]=(0,d.useState)(!1),[_,S]=(0,d.useState)(1),j=(0,l.useSelect)((e=>te(e(zt)).getCanvasMode()),[]),{setCanvasMode:C}=te((0,l.useDispatch)(zt)),k={type:"tween",duration:m?0:.5},E=(0,d.useRef)(null),P=(0,v.useInstanceId)(e,"edit-site-resizable-frame-handle-help"),I=o.width/o.height,T={default:{flexGrow:0,height:u.height},fullWidth:{flexGrow:1,height:u.height}},O=m?"active":x?"visible":"hidden";return(0,oe.jsx)(y.ResizableBox,{as:y.__unstableMotion.div,ref:E,initial:!1,variants:T,animate:t?"fullWidth":"default",onAnimationComplete:e=>{"fullWidth"===e&&p({width:"100%",height:"100%"})},whileHover:"view"===j?{scale:1.005,transition:{duration:c?0:.5,ease:"easeOut"}}:{},transition:k,size:u,enable:{top:!1,right:!1,bottom:!1,left:i,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},resizeRatio:_,handleClasses:void 0,handleStyles:{left:hs,right:hs},minWidth:fs,maxWidth:t?"100%":"150%",maxHeight:"100%",onFocus:()=>w(!0),onBlur:()=>w(!1),onMouseOver:()=>w(!0),onMouseOut:()=>w(!1),handleComponent:{left:"view"===j&&(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(y.Tooltip,{text:(0,b.__)("Drag to resize"),children:(0,oe.jsx)(y.__unstableMotion.button,{role:"separator","aria-orientation":"vertical",className:Ut("edit-site-resizable-frame__handle",{"is-resizing":m}),variants:{hidden:{opacity:0,left:0},visible:{opacity:1,left:-14},active:{opacity:1,left:-14,scaleY:1.3}},animate:O,"aria-label":(0,b.__)("Drag to resize"),"aria-describedby":P,"aria-valuenow":E.current?.resizable?.offsetWidth||void 0,"aria-valuemin":fs,"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),s=Math.min(Math.max(fs,E.current.resizable.offsetWidth+t),o.width);p({width:s,height:xs(s,I)})},initial:"hidden",exit:"hidden",whileFocus:"active",whileHover:"active"},"handle")}),(0,oe.jsx)("div",{hidden:!0,id:P,children:(0,b.__)("Use left and right arrow keys to resize the canvas. Hold shift to resize in larger increments.")})]})},onResizeStart:(e,t,s)=>{f(s.offsetWidth),g(!0)},onResize:(e,t,i,r)=>{const a=r.width/_,l=Math.abs(a),c=r.width<0?l:(o.width-h)/2,u=Math.min(l,c),d=0===l?0:u/l;S(1-d+2*d);const f=h+r.width;n(f>o.width),p({height:s?"100%":xs(f,I)})},onResizeStop:(e,t,i)=>{if(g(!1),!s)return;n(!1);i.ownerDocument.documentElement.offsetWidth-i.offsetWidth>200?p(vs):C("edit")},className:Ut("edit-site-resizable-frame__inner",{"is-resizing":m}),showHandle:!1,children:(0,oe.jsx)("div",{className:"edit-site-resizable-frame__inner-content",style:a,children:r})})};const bs=function(){const{registerShortcut:e}=(0,l.useDispatch)(Wt.store);return(0,d.useEffect)((()=>{e({name:"core/edit-site/save",category:"global",description:(0,b.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}})}),[e]),null};const ws=function(){const{__experimentalGetDirtyEntityRecords:e,isSavingEntityRecord:t}=(0,l.useSelect)(_.store),{hasNonPostEntityChanges:s}=(0,l.useSelect)(h.store),{getCanvasMode:n}=te((0,l.useSelect)(zt)),{setIsSaveViewOpened:i}=(0,l.useDispatch)(zt);return(0,Wt.useShortcut)("core/edit-site/save",(r=>{r.preventDefault();const o=e(),a=!!o.length,l=o.some((e=>t(e.kind,e.name,e.key))),c=s(),u="view"===n();(a&&c&&!l||u)&&i(!0)})),null};function _s(e,t){const{record:s,title:n,description:i,isLoaded:r,icon:o}=(0,l.useSelect)((s=>{const{getEditedPostType:n,getEditedPostId:i}=s(zt),{getEditedEntityRecord:r,hasFinishedResolution:o}=s(_.store),{__experimentalGetTemplateInfo:a}=s(h.store),l=null!=e?e:n(),c=null!=t?t:i(),u=r("postType",l,c),d=c&&o("getEditedEntityRecord",["postType",l,c]),p=a(u);return{record:u,title:p.title,description:p.description,isLoaded:d,icon:p.icon}}),[e,t]);return{isLoaded:r,icon:o,record:s,getTitle:()=>n?(0,Jt.decodeEntities)(n):null,getDescription:()=>i?(0,Jt.decodeEntities)(i):null}}const Ss=1e4;function js(){const{isLoaded:e}=_s(),[t,s]=(0,d.useState)(!1),n=(0,l.useSelect)((e=>{const s=e(_.store).hasResolvingSelectors();return!t&&!s}),[t]);return(0,d.useEffect)((()=>{let e;return t||(e=setTimeout((()=>{s(!0)}),Ss)),()=>{clearTimeout(e)}}),[t]),(0,d.useEffect)((()=>{if(n){const e=setTimeout((()=>{s(!0)}),100);return()=>{clearTimeout(e)}}}),[n]),!t||!e}var Cs=Ls(),ks=e=>Rs(e,Cs),Es=Ls();ks.write=e=>Rs(e,Es);var Ps=Ls();ks.onStart=e=>Rs(e,Ps);var Is=Ls();ks.onFrame=e=>Rs(e,Is);var Ts=Ls();ks.onFinish=e=>Rs(e,Ts);var Os=[];ks.setTimeout=(e,t)=>{let s=ks.now()+t,n=()=>{let e=Os.findIndex((e=>e.cancel==n));~e&&Os.splice(e,1),Vs-=~e?1:0},i={time:s,handler:e,cancel:n};return Os.splice(As(s),0,i),Vs+=1,Bs(),i};var As=e=>~(~Os.findIndex((t=>t.time>e))||~Os.length);ks.cancel=e=>{Ps.delete(e),Is.delete(e),Ts.delete(e),Cs.delete(e),Es.delete(e)},ks.sync=e=>{Fs=!0,ks.batchedUpdates(e),Fs=!1},ks.throttle=e=>{let t;function s(){try{e(...t)}finally{t=null}}function n(...e){t=e,ks.onStart(s)}return n.handler=e,n.cancel=()=>{Ps.delete(s),t=null},n};var Ns=typeof window<"u"?window.requestAnimationFrame:()=>{};ks.use=e=>Ns=e,ks.now=typeof performance<"u"?()=>performance.now():Date.now,ks.batchedUpdates=e=>e(),ks.catch=console.error,ks.frameLoop="always",ks.advance=()=>{"demand"!==ks.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):zs()};var Ms=-1,Vs=0,Fs=!1;function Rs(e,t){Fs?(t.delete(e),e(0)):(t.add(e),Bs())}function Bs(){Ms<0&&(Ms=0,"demand"!==ks.frameLoop&&Ns(Ds))}function Ds(){~Ms&&(Ns(Ds),ks.batchedUpdates(zs))}function zs(){let e=Ms;Ms=ks.now();let t=As(Ms);t&&(Gs(Os.splice(0,t),(e=>e.handler())),Vs-=t),Vs?(Ps.flush(),Cs.flush(e?Math.min(64,Ms-e):16.667),Is.flush(),Es.flush(),Ts.flush()):Ms=-1}function Ls(){let e=new Set,t=e;return{add(s){Vs+=t!=e||e.has(s)?0:1,e.add(s)},delete:s=>(Vs-=t==e&&e.has(s)?1:0,e.delete(s)),flush(s){t.size&&(e=new Set,Vs-=t.size,Gs(t,(t=>t(s)&&e.add(t))),Vs+=e.size,t=e)}}}function Gs(e,t){e.forEach((e=>{try{t(e)}catch(e){ks.catch(e)}}))}var Hs=i(1609),Us=i.t(Hs,2),Ws=Object.defineProperty,qs={};function Zs(){}((e,t)=>{for(var s in t)Ws(e,s,{get:t[s],enumerable:!0})})(qs,{assign:()=>ln,colors:()=>rn,createStringInterpolator:()=>en,skipAnimation:()=>on,to:()=>tn,willAdvance:()=>an});var Ks={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 Ys(e,t){if(Ks.arr(e)){if(!Ks.arr(t)||e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(e[s]!==t[s])return!1;return!0}return e===t}var Xs=(e,t)=>e.forEach(t);function Js(e,t,s){if(Ks.arr(e))for(let n=0;n<e.length;n++)t.call(s,e[n],`${n}`);else for(let n in e)e.hasOwnProperty(n)&&t.call(s,e[n],n)}var Qs=e=>Ks.und(e)?[]:Ks.arr(e)?e:[e];function $s(e,t){if(e.size){let s=Array.from(e);e.clear(),Xs(s,t)}}var en,tn,sn=(e,...t)=>$s(e,(e=>e(...t))),nn=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),rn=null,on=!1,an=Zs,ln=e=>{e.to&&(tn=e.to),e.now&&(ks.now=e.now),void 0!==e.colors&&(rn=e.colors),null!=e.skipAnimation&&(on=e.skipAnimation),e.createStringInterpolator&&(en=e.createStringInterpolator),e.requestAnimationFrame&&ks.use(e.requestAnimationFrame),e.batchedUpdates&&(ks.batchedUpdates=e.batchedUpdates),e.willAdvance&&(an=e.willAdvance),e.frameLoop&&(ks.frameLoop=e.frameLoop)},cn=new Set,un=[],dn=[],pn=0,hn={get idle(){return!cn.size&&!un.length},start(e){pn>e.priority?(cn.add(e),ks.onStart(fn)):(mn(e),ks(vn))},advance:vn,sort(e){if(pn)ks.onFrame((()=>hn.sort(e)));else{let t=un.indexOf(e);~t&&(un.splice(t,1),gn(e))}},clear(){un=[],cn.clear()}};function fn(){cn.forEach(mn),cn.clear(),ks(vn)}function mn(e){un.includes(e)||gn(e)}function gn(e){un.splice(function(e,t){let s=e.findIndex(t);return s<0?e.length:s}(un,(t=>t.priority>e.priority)),0,e)}function vn(e){let t=dn;for(let s=0;s<un.length;s++){let n=un[s];pn=n.priority,n.idle||(an(n),n.advance(e),n.idle||t.push(n))}return pn=0,(dn=un).length=0,(un=t).length>0}var xn="[-+]?\\d*\\.?\\d+",yn=xn+"%";function bn(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var wn=new RegExp("rgb"+bn(xn,xn,xn)),_n=new RegExp("rgba"+bn(xn,xn,xn,xn)),Sn=new RegExp("hsl"+bn(xn,yn,yn)),jn=new RegExp("hsla"+bn(xn,yn,yn,xn)),Cn=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,kn=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,En=/^#([0-9a-fA-F]{6})$/,Pn=/^#([0-9a-fA-F]{8})$/;function In(e,t,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?e+6*(t-e)*s:s<.5?t:s<2/3?e+(t-e)*(2/3-s)*6:e}function Tn(e,t,s){let n=s<.5?s*(1+t):s+t-s*t,i=2*s-n,r=In(i,n,e+1/3),o=In(i,n,e),a=In(i,n,e-1/3);return Math.round(255*r)<<24|Math.round(255*o)<<16|Math.round(255*a)<<8}function On(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function An(e){return(parseFloat(e)%360+360)%360/360}function Nn(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Mn(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function Vn(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=En.exec(e))?parseInt(t[1]+"ff",16)>>>0:rn&&void 0!==rn[e]?rn[e]:(t=wn.exec(e))?(On(t[1])<<24|On(t[2])<<16|On(t[3])<<8|255)>>>0:(t=_n.exec(e))?(On(t[1])<<24|On(t[2])<<16|On(t[3])<<8|Nn(t[4]))>>>0:(t=Cn.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Pn.exec(e))?parseInt(t[1],16)>>>0:(t=kn.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Sn.exec(e))?(255|Tn(An(t[1]),Mn(t[2]),Mn(t[3])))>>>0:(t=jn.exec(e))?(Tn(An(t[1]),Mn(t[2]),Mn(t[3]))|Nn(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 Fn=(e,t,s)=>{if(Ks.fun(e))return e;if(Ks.arr(e))return Fn({range:e,output:t,extrapolate:s});if(Ks.str(e.output[0]))return en(e);let n=e,i=n.output,r=n.range||[0,1],o=n.extrapolateLeft||n.extrapolate||"extend",a=n.extrapolateRight||n.extrapolate||"extend",l=n.easing||(e=>e);return e=>{let t=function(e,t){for(var s=1;s<t.length-1&&!(t[s]>=e);++s);return s-1}(e,r);return function(e,t,s,n,i,r,o,a,l){let c=l?l(e):e;if(c<t){if("identity"===o)return c;"clamp"===o&&(c=t)}if(c>s){if("identity"===a)return c;"clamp"===a&&(c=s)}return n===i?n:t===s?e<=t?n:i:(t===-1/0?c=-c:s===1/0?c-=t:c=(c-t)/(s-t),c=r(c),n===-1/0?c=-c:i===1/0?c+=n:c=c*(i-n)+n,c)}(e,r[t],r[t+1],i[t],i[t+1],l,o,a,n.map)}};var Rn=1.70158,Bn=1.525*Rn,Dn=Rn+1,zn=2*Math.PI/3,Ln=2*Math.PI/4.5,Gn=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,Hn={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=>Dn*e*e*e-Rn*e*e,easeOutBack:e=>1+Dn*Math.pow(e-1,3)+Rn*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(2*(Bn+1)*e-Bn)/2:(Math.pow(2*e-2,2)*((Bn+1)*(2*e-2)+Bn)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*zn),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*zn)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Ln)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Ln)/2+1,easeInBounce:e=>1-Gn(1-e),easeOutBounce:Gn,easeInOutBounce:e=>e<.5?(1-Gn(1-2*e))/2:(1+Gn(2*e-1))/2,steps:(e,t="end")=>s=>{let n=(s="end"===t?Math.min(s,.999):Math.max(s,.001))*e;return((e,t,s)=>Math.min(Math.max(s,e),t))(0,1,("end"===t?Math.floor(n):Math.ceil(n))/e)}},Un=Symbol.for("FluidValue.get"),Wn=Symbol.for("FluidValue.observers"),qn=e=>Boolean(e&&e[Un]),Zn=e=>e&&e[Un]?e[Un]():e,Kn=e=>e[Wn]||null;function Yn(e,t){let s=e[Wn];s&&s.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var Xn=class{[Un];[Wn];constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Jn(this,e)}},Jn=(e,t)=>ti(e,Un,t);function Qn(e,t){if(e[Un]){let s=e[Wn];s||ti(e,Wn,s=new Set),s.has(t)||(s.add(t),e.observerAdded&&e.observerAdded(s.size,t))}return t}function $n(e,t){let s=e[Wn];if(s&&s.has(t)){let n=s.size-1;n?s.delete(t):e[Wn]=null,e.observerRemoved&&e.observerRemoved(n,t)}}var ei,ti=(e,t,s)=>Object.defineProperty(e,t,{value:s,writable:!0,configurable:!0}),si=/[+\-]?(?: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,ii=new RegExp(`(${si.source})(%|[a-z]+)`,"i"),ri=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,oi=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,ai=e=>{let[t,s]=li(e);if(!t||nn())return e;let n=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(n)return n.trim();if(s&&s.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(s)||e}return s&&oi.test(s)?ai(s):s||e},li=e=>{let t=oi.exec(e);if(!t)return[,];let[,s,n]=t;return[s,n]},ci=(e,t,s,n,i)=>`rgba(${Math.round(t)}, ${Math.round(s)}, ${Math.round(n)}, ${i})`,ui=e=>{ei||(ei=rn?new RegExp(`(${Object.keys(rn).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map((e=>Zn(e).replace(oi,ai).replace(ni,Vn).replace(ei,Vn))),s=t.map((e=>e.match(si).map(Number))),n=s[0].map(((e,t)=>s.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>Fn({...e,output:t})));return e=>{let s=!ii.test(t[0])&&t.find((e=>ii.test(e)))?.replace(si,""),i=0;return t[0].replace(si,(()=>`${n[i++](e)}${s||""}`)).replace(ri,ci)}},di="react-spring: ",pi=e=>{let t=e,s=!1;if("function"!=typeof t)throw new TypeError(`${di}once requires a function parameter`);return(...e)=>{s||(t(...e),s=!0)}},hi=pi(console.warn);pi(console.warn);function fi(e){return Ks.str(e)&&("#"==e[0]||/\d/.test(e)||!nn()&&oi.test(e)||e in(rn||{}))}new WeakMap;new Set,new WeakMap,new WeakMap,new WeakMap;var mi=nn()?Hs.useEffect:Hs.useLayoutEffect;function gi(){let e=(0,Hs.useState)()[1],t=(()=>{let e=(0,Hs.useRef)(!1);return mi((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var vi=[];var xi=Symbol.for("Animated:node"),yi=e=>e&&e[xi],bi=(e,t)=>((e,t,s)=>Object.defineProperty(e,t,{value:s,writable:!0,configurable:!0}))(e,xi,t),wi=e=>e&&e[xi]&&e[xi].getPayload(),_i=class{payload;constructor(){bi(this,this)}getPayload(){return this.payload||[]}},Si=class extends _i{constructor(e){super(),this._value=e,Ks.num(this._value)&&(this.lastPosition=this._value)}done=!0;elapsedTime;lastPosition;lastVelocity;v0;durationProgress=0;static create(e){return new Si(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Ks.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,Ks.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},ji=class extends Si{_string=null;_toString;constructor(e){super(0),this._toString=Fn({output:[e,e]})}static create(e){return new ji(e)}getValue(){return this._string??(this._string=this._toString(this._value))}setValue(e){if(Ks.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=Fn({output:[this.getValue(),e]})),this._value=0,super.reset()}},Ci={dependencies:null},ki=class extends _i{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return Js(this.source,((s,n)=>{(e=>!!e&&e[xi]===e)(s)?t[n]=s.getValue(e):qn(s)?t[n]=Zn(s):e||(t[n]=s)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Xs(this.payload,(e=>e.reset()))}_makePayload(e){if(e){let t=new Set;return Js(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Ci.dependencies&&qn(e)&&Ci.dependencies.add(e);let t=wi(e);t&&Xs(t,(e=>this.add(e)))}},Ei=class extends ki{constructor(e){super(e)}static create(e){return new Ei(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){let t=this.getPayload();return e.length==t.length?t.map(((t,s)=>t.setValue(e[s]))).some(Boolean):(super.setValue(e.map(Pi)),!0)}};function Pi(e){return(fi(e)?ji:Si).create(e)}function Ii(e){let t=yi(e);return t?t.constructor:Ks.arr(e)?Ei:fi(e)?ji:Si}var Ti=(e,t)=>{let s=!Ks.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Hs.forwardRef)(((n,i)=>{let r=(0,Hs.useRef)(null),o=s&&(0,Hs.useCallback)((e=>{r.current=function(e,t){return e&&(Ks.fun(e)?e(t):e.current=t),t}(i,e)}),[i]),[a,l]=function(e,t){let s=new Set;return Ci.dependencies=s,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new ki(e),Ci.dependencies=null,[e,s]}(n,t),c=gi(),u=()=>{let e=r.current;s&&!e||!1===(!!e&&t.applyAnimatedValues(e,a.getValue(!0)))&&c()},d=new Oi(u,l),p=(0,Hs.useRef)();mi((()=>(p.current=d,Xs(l,(e=>Qn(e,d))),()=>{p.current&&(Xs(p.current.deps,(e=>$n(e,p.current))),ks.cancel(p.current.update))}))),(0,Hs.useEffect)(u,[]),(e=>{(0,Hs.useEffect)(e,vi)})((()=>()=>{let e=p.current;Xs(e.deps,(t=>$n(t,e)))}));let h=t.getComponentProps(a.getValue());return Hs.createElement(e,{...h,ref:o})}))},Oi=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&ks.write(this.update)}};var Ai=Symbol.for("AnimatedComponent"),Ni=e=>Ks.str(e)?e:e&&Ks.str(e.displayName)?e.displayName:Ks.fun(e)&&e.name||null;function Mi(e,...t){return Ks.fun(e)?e(...t):e}var Vi=(e,t)=>!0===e||!!(t&&e&&(Ks.fun(e)?e(t):Qs(e).includes(t))),Fi=(e,t)=>Ks.obj(e)?t&&e[t]:e,Ri=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,Bi=e=>e,Di=(e,t=Bi)=>{let s=zi;e.default&&!0!==e.default&&(e=e.default,s=Object.keys(e));let n={};for(let i of s){let s=t(e[i],i);Ks.und(s)||(n[i]=s)}return n},zi=["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 Gi(e){let t=function(e){let t={},s=0;if(Js(e,((e,n)=>{Li[n]||(t[n]=e,s++)})),s)return t}(e);if(t){let s={to:t};return Js(e,((e,n)=>n in t||(s[n]=e))),s}return{...e}}function Hi(e){return e=Zn(e),Ks.arr(e)?e.map(Hi):fi(e)?qs.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Ui(e){return Ks.fun(e)||Ks.arr(e)&&Ks.obj(e[0])}var Wi={tension:170,friction:26,mass:1,damping:1,easing:Hn.linear,clamp:!1},qi=class{tension;friction;frequency;damping;mass;velocity=0;restVelocity;precision;progress;duration;easing;clamp;bounce;decay;round;constructor(){Object.assign(this,Wi)}};function Zi(e,t){if(Ks.und(t.decay)){let s=!Ks.und(t.tension)||!Ks.und(t.friction);(s||!Ks.und(t.frequency)||!Ks.und(t.damping)||!Ks.und(t.mass))&&(e.duration=void 0,e.decay=void 0),s&&(e.frequency=void 0)}else e.duration=void 0}var Ki=[],Yi=class{changed=!1;values=Ki;toValues=null;fromValues=Ki;to;from;config=new qi;immediate=!1};function Xi(e,{key:t,props:s,defaultProps:n,state:i,actions:r}){return new Promise(((o,a)=>{let l,c,u=Vi(s.cancel??n?.cancel,t);if(u)h();else{Ks.und(s.pause)||(i.paused=Vi(s.pause,t));let e=n?.pause;!0!==e&&(e=i.paused||Vi(e,t)),l=Mi(s.delay||0,t),e?(i.resumeQueue.add(p),r.pause()):(r.resume(),p())}function d(){i.resumeQueue.add(p),i.timeouts.delete(c),c.cancel(),l=c.time-ks.now()}function p(){l>0&&!qs.skipAnimation?(i.delayed=!0,c=ks.setTimeout(h,l),i.pauseQueue.add(d),i.timeouts.add(c)):h()}function h(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(d),i.timeouts.delete(c),e<=(i.cancelId||0)&&(u=!0);try{r.start({...s,callId:e,cancel:u},o)}catch(e){a(e)}}}))}var Ji=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?er(e.get()):t.every((e=>e.noop))?Qi(e.get()):$i(e.get(),t.every((e=>e.finished))),Qi=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),$i=(e,t,s=!1)=>({value:e,finished:t,cancelled:s}),er=e=>({value:e,cancelled:!0,finished:!1});function tr(e,t,s,n){let{callId:i,parentId:r,onRest:o}=t,{asyncTo:a,promise:l}=s;return r||e!==a||t.reset?s.promise=(async()=>{s.asyncId=i,s.asyncTo=e;let c,u,d,p=Di(t,((e,t)=>"onRest"===t?void 0:e)),h=new Promise(((e,t)=>(c=e,u=t))),f=e=>{let t=i<=(s.cancelId||0)&&er(n)||i!==s.asyncId&&$i(n,!1);if(t)throw e.result=t,u(e),e},m=(e,t)=>{let r=new nr,o=new ir;return(async()=>{if(qs.skipAnimation)throw sr(s),o.result=$i(n,!1),u(o),o;f(r);let a=Ks.obj(e)?{...e}:{...t,to:e};a.parentId=i,Js(p,((e,t)=>{Ks.und(a[t])&&(a[t]=e)}));let l=await n.start(a);return f(r),s.paused&&await new Promise((e=>{s.resumeQueue.add(e)})),l})()};if(qs.skipAnimation)return sr(s),$i(n,!1);try{let t;t=Ks.arr(e)?(async e=>{for(let t of e)await m(t)})(e):Promise.resolve(e(m,n.stop.bind(n))),await Promise.all([t.then(c),h]),d=$i(n.get(),!0,!1)}catch(e){if(e instanceof nr)d=e.result;else{if(!(e instanceof ir))throw e;d=e.result}}finally{i==s.asyncId&&(s.asyncId=r,s.asyncTo=r?a:void 0,s.promise=r?l:void 0)}return Ks.fun(o)&&ks.batchedUpdates((()=>{o(d,n,n.item)})),d})():l}function sr(e,t){$s(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.")}},ir=class extends Error{result;constructor(){super("SkipAnimationSignal")}},rr=e=>e instanceof ar,or=1,ar=class extends Xn{id=or++;_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 qs.to(this,e)}interpolate(...e){return hi(`${di}The "interpolate" function is deprecated in v9 (use "to" instead)`),qs.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){Yn(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||hn.sort(this),Yn(this,{type:"priority",parent:this,priority:e})}},lr=Symbol.for("SpringPhase"),cr=e=>(1&e[lr])>0,ur=e=>(2&e[lr])>0,dr=e=>(4&e[lr])>0,pr=(e,t)=>t?e[lr]|=3:e[lr]&=-3,hr=(e,t)=>t?e[lr]|=4:e[lr]&=-5,fr=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(),!Ks.und(e)||!Ks.und(t)){let s=Ks.obj(e)?{...e}:{...t,from:e};Ks.und(s.default)&&(s.default=!0),this.start(s)}}get idle(){return!(ur(this)||this._state.asyncTo)||dr(this)}get goal(){return Zn(this.animation.to)}get velocity(){let e=yi(this);return e instanceof Si?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return cr(this)}get isAnimating(){return ur(this)}get isPaused(){return dr(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,s=!1,n=this.animation,{config:i,toValues:r}=n,o=wi(n.to);!o&&qn(n.to)&&(r=Qs(Zn(n.to))),n.values.forEach(((a,l)=>{if(a.done)return;let c=a.constructor==ji?1:o?o[l].lastPosition:r[l],u=n.immediate,d=c;if(!u){if(d=a.lastPosition,i.tension<=0)return void(a.done=!0);let t,s=a.elapsedTime+=e,r=n.fromValues[l],o=null!=a.v0?a.v0:a.v0=Ks.arr(i.velocity)?i.velocity[l]:i.velocity,p=i.precision||(r==c?.005:Math.min(1,.001*Math.abs(c-r)));if(Ks.und(i.duration))if(i.decay){let e=!0===i.decay?.998:i.decay,n=Math.exp(-(1-e)*s);d=r+o/(1-e)*(1-n),u=Math.abs(a.lastPosition-d)<=p,t=o*n}else{t=null==a.lastVelocity?o:a.lastVelocity;let s,n=i.restVelocity||p/10,l=i.clamp?0:i.bounce,h=!Ks.und(l),f=r==c?a.v0>0:r<c,m=!1,g=1,v=Math.ceil(e/g);for(let e=0;e<v&&(s=Math.abs(t)>n,s||(u=Math.abs(c-d)<=p,!u));++e){h&&(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 n=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,a.durationProgress>0&&(a.elapsedTime=i.duration*a.durationProgress,s=a.elapsedTime+=e)),n=(i.progress||0)+s/this._memoizedDuration,n=n>1?1:n<0?0:n,a.durationProgress=n),d=r+i.easing(n)*(c-r),t=(d-a.lastPosition)/e,u=1==n}a.lastVelocity=t,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}o&&!o[l].done&&(u=!1),u?a.done=!0:t=!1,a.setValue(d,i.round)&&(s=!0)}));let a=yi(this),l=a.getValue();if(t){let e=Zn(n.to);l===e&&!s||i.decay?s&&i.decay&&this._onChange(l):(a.setValue(e),this._onChange(e)),this._stop()}else s&&this._onChange(l)}set(e){return ks.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(ur(this)){let{to:e,config:t}=this.animation;ks.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 s;return Ks.und(e)?(s=this.queue||[],this.queue=[]):s=[Ks.obj(e)?e:{...t,to:e}],Promise.all(s.map((e=>this._update(e)))).then((e=>Ji(this,e)))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),sr(this._state,e&&this._lastCallId),ks.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:s,from:n}=e;s=Ks.obj(s)?s[t]:s,(null==s||Ui(s))&&(s=void 0),n=Ks.obj(n)?n[t]:n,null==n&&(n=void 0);let i={to:s,from:n};return cr(this)||(e.reverse&&([s,n]=[n,s]),n=Zn(n),Ks.und(n)?yi(this)||this._set(s):this._set(n)),i}_update({...e},t){let{key:s,defaultProps:n}=this;e.default&&Object.assign(n,Di(e,((e,t)=>/^on/.test(t)?Fi(e,s):e))),br(this,e,"onProps"),wr(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 Xi(++this._lastCallId,{key:s,props:e,defaultProps:n,state:r,actions:{pause:()=>{dr(this)||(hr(this,!0),sn(r.pauseQueue),wr(this,"onPause",$i(this,mr(this,this.animation.to)),this))},resume:()=>{dr(this)&&(hr(this,!1),ur(this)&&this._resume(),sn(r.resumeQueue),wr(this,"onResume",$i(this,mr(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then((s=>{if(e.loop&&s.finished&&(!t||!s.noop)){let t=gr(e);if(t)return this._update(t,!0)}return s}))}_merge(e,t,s){if(t.cancel)return this.stop(!0),s(er(this));let n=!Ks.und(e.to),i=!Ks.und(e.from);if(n||i){if(!(t.callId>this._lastToId))return s(er(this));this._lastToId=t.callId}let{key:r,defaultProps:o,animation:a}=this,{to:l,from:c}=a,{to:u=l,from:d=c}=e;i&&!n&&(!t.default||Ks.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let p=!Ys(d,c);p&&(a.from=d),d=Zn(d);let h=!Ys(u,l);h&&this._focus(u);let f=Ui(t.to),{config:m}=a,{decay:g,velocity:v}=m;(n||i)&&(m.velocity=0),t.config&&!f&&function(e,t,s){s&&(Zi(s={...s},t),t={...s,...t}),Zi(e,t),Object.assign(e,t);for(let t in Wi)null==e[t]&&(e[t]=Wi[t]);let{mass:n,frequency:i,damping:r}=e;Ks.und(i)||(i<.01&&(i=.01),r<0&&(r=0),e.tension=Math.pow(2*Math.PI/i,2)*n,e.friction=4*Math.PI*r*n/i)}(m,Mi(t.config,r),t.config!==o.config?Mi(o.config,r):void 0);let x=yi(this);if(!x||Ks.und(u))return s($i(this,!0));let y=Ks.und(t.reset)?i&&!t.default:!Ks.und(d)&&Vi(t.reset,r),b=y?d:this.get(),w=Hi(u),_=Ks.num(w)||Ks.arr(w)||fi(w),S=!f&&(!_||Vi(o.immediate||t.immediate,r));if(h){let e=Ii(u);if(e!==x.constructor){if(!S)throw Error(`Cannot animate between ${x.constructor.name} and ${e.name}, as the "to" prop suggests`);x=this._set(w)}}let j=x.constructor,C=qn(u),k=!1;if(!C){let e=y||!cr(this)&&p;(h||e)&&(k=Ys(Hi(b),w),C=!k),(!Ys(a.immediate,S)&&!S||!Ys(m.decay,g)||!Ys(m.velocity,v))&&(C=!0)}if(k&&ur(this)&&(a.changed&&!y?C=!0:C||this._stop(l)),!f&&((C||qn(l))&&(a.values=x.getPayload(),a.toValues=qn(u)?null:j==ji?[1]:Qs(w)),a.immediate!=S&&(a.immediate=S,!S&&!y&&this._set(l)),C)){let{onRest:e}=a;Xs(yr,(e=>br(this,t,e)));let n=$i(this,mr(this,l));sn(this._pendingCalls,n),this._pendingCalls.add(s),a.changed&&ks.batchedUpdates((()=>{a.changed=!y,e?.(n,this),y?Mi(o.onRest,n):a.onStart?.(n,this)}))}y&&this._set(b),f?s(tr(t.to,t,this._state,this)):C?this._start():ur(this)&&!h?this._pendingCalls.add(s):s(Qi(b))}_focus(e){let t=this.animation;e!==t.to&&(Kn(this)&&this._detach(),t.to=e,Kn(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;qn(t)&&(Qn(t,this),rr(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;qn(e)&&$n(e,this)}_set(e,t=!0){let s=Zn(e);if(!Ks.und(s)){let e=yi(this);if(!e||!Ys(s,e.getValue())){let n=Ii(s);e&&e.constructor==n?e.setValue(s):bi(this,n.create(s)),e&&ks.batchedUpdates((()=>{this._onChange(s,t)}))}}return yi(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,wr(this,"onStart",$i(this,mr(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Mi(this.animation.onChange,e,this)),Mi(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;yi(this).reset(Zn(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),ur(this)||(pr(this,!0),dr(this)||this._resume())}_resume(){qs.skipAnimation?this.finish():hn.start(this)}_stop(e,t){if(ur(this)){pr(this,!1);let s=this.animation;Xs(s.values,(e=>{e.done=!0})),s.toValues&&(s.onChange=s.onPause=s.onResume=void 0),Yn(this,{type:"idle",parent:this});let n=t?er(this.get()):$i(this.get(),mr(this,e??s.to));sn(this._pendingCalls,n),s.changed&&(s.changed=!1,wr(this,"onRest",n,this))}}};function mr(e,t){let s=Hi(t);return Ys(Hi(e.get()),s)}function gr(e,t=e.loop,s=e.to){let n=Mi(t);if(n){let i=!0!==n&&Gi(n),r=(i||e).reverse,o=!i||i.reset;return vr({...e,loop:t,default:!1,pause:void 0,to:!r||Ui(s)?s:void 0,from:o?e.from:void 0,reset:o,...i})}}function vr(e){let{to:t,from:s}=e=Gi(e),n=new Set;return Ks.obj(t)&&xr(t,n),Ks.obj(s)&&xr(s,n),e.keys=n.size?Array.from(n):null,e}function xr(e,t){Js(e,((e,s)=>null!=e&&t.add(s)))}var yr=["onStart","onRest","onChange","onPause","onResume"];function br(e,t,s){e.animation[s]=t[s]!==Ri(t,s)?Fi(t[s],e.key):void 0}function wr(e,t,...s){e.animation[t]?.(...s),e.defaultProps[t]?.(...s)}var _r=["onStart","onChange","onRest"],Sr=1,jr=class{id=Sr++;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,s)=>e[s]=t.get())),e}set(e){for(let t in e){let s=e[t];Ks.und(s)||this.springs[t].set(s)}}update(e){return e&&this.queue.push(vr(e)),this}start(e){let{queue:t}=this;return e?t=Qs(e).map(vr):this.queue=[],this._flush?this._flush(this,t):(Ir(this,t),Cr(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let s=this.springs;Xs(Qs(t),(t=>s[t].stop(!!e)))}else sr(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Ks.und(e))this.start({pause:!0});else{let t=this.springs;Xs(Qs(e),(e=>t[e].pause()))}return this}resume(e){if(Ks.und(e))this.start({pause:!1});else{let t=this.springs;Xs(Qs(e),(e=>t[e].resume()))}return this}each(e){Js(this.springs,e)}_onFrame(){let{onStart:e,onChange:t,onRest:s}=this._events,n=this._active.size>0,i=this._changed.size>0;(n&&!this._started||i&&!this._started)&&(this._started=!0,$s(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));let r=!n&&this._started,o=i||r&&s.size?this.get():null;i&&t.size&&$s(t,(([e,t])=>{t.value=o,e(t,this,this._item)})),r&&(this._started=!1,$s(s,(([e,t])=>{t.value=o,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)}ks.onFrame(this._onFrame)}};function Cr(e,t){return Promise.all(t.map((t=>kr(e,t)))).then((t=>Ji(e,t)))}async function kr(e,t,s){let{keys:n,to:i,from:r,loop:o,onRest:a,onResolve:l}=t,c=Ks.obj(t.default)&&t.default;o&&(t.loop=!1),!1===i&&(t.to=null),!1===r&&(t.from=null);let u=Ks.arr(i)||Ks.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Xs(_r,(s=>{let n=t[s];if(Ks.fun(n)){let i=e._events[s];t[s]=({finished:e,cancelled:t})=>{let s=i.get(n);s?(e||(s.finished=!1),t&&(s.cancelled=!0)):i.set(n,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[s]=t[s])}}));let d=e._state;t.pause===!d.paused?(d.paused=t.pause,sn(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);let p=(n||Object.keys(e.springs)).map((s=>e.springs[s].start(t))),h=!0===t.cancel||!0===Ri(t,"cancel");(u||h&&d.asyncId)&&p.push(Xi(++e._lastAsyncId,{props:t,state:d,actions:{pause:Zs,resume:Zs,start(t,s){h?(sr(d,e._lastAsyncId),s(er(e))):(t.onRest=a,s(tr(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));let f=Ji(e,await Promise.all(p));if(o&&f.finished&&(!s||!f.noop)){let s=gr(t,o,i);if(s)return Ir(e,[s]),kr(e,s,!0)}return l&&ks.batchedUpdates((()=>l(f,e,e.item))),f}function Er(e,t){let s=new fr;return s.key=e,t&&Qn(s,t),s}function Pr(e,t,s){t.keys&&Xs(t.keys,(n=>{(e[n]||(e[n]=s(n)))._prepareNode(t)}))}function Ir(e,t){Xs(t,(t=>{Pr(e.springs,t,(t=>Er(t,e)))}))}var Tr=({children:e,...t})=>{let s=(0,Hs.useContext)(Or),n=t.pause||!!s.pause,i=t.immediate||!!s.immediate;t=function(e,t){let[s]=(0,Hs.useState)((()=>({inputs:t,result:e()}))),n=(0,Hs.useRef)(),i=n.current,r=i;return r?Boolean(t&&r.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(e[s]!==t[s])return!1;return!0}(t,r.inputs))||(r={inputs:t,result:e()}):r=s,(0,Hs.useEffect)((()=>{n.current=r,i==s&&(s.inputs=s.result=void 0)}),[r]),r.result}((()=>({pause:n,immediate:i})),[n,i]);let{Provider:r}=Or;return Hs.createElement(r,{value:t},e)},Or=function(e,t){return Object.assign(e,Hs.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}(Tr,{});Tr.Provider=Or.Provider,Tr.Consumer=Or.Consumer;var Ar=class extends ar{constructor(e,t){super(),this.source=e,this.calc=Fn(...t);let s=this._get(),n=Ii(s);bi(this,n.create(s))}key;idle=!0;calc;_active=new Set;advance(e){let t=this._get();Ys(t,this.get())||(yi(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Mr(this._active)&&Vr(this)}_get(){let e=Ks.arr(this.source)?this.source.map(Zn):Qs(Zn(this.source));return this.calc(...e)}_start(){this.idle&&!Mr(this._active)&&(this.idle=!1,Xs(wi(this),(e=>{e.done=!1})),qs.skipAnimation?(ks.batchedUpdates((()=>this.advance())),Vr(this)):hn.start(this))}_attach(){let e=1;Xs(Qs(this.source),(t=>{qn(t)&&Qn(t,this),rr(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Xs(Qs(this.source),(e=>{qn(e)&&$n(e,this)})),this._active.clear(),Vr(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=Qs(this.source).reduce(((e,t)=>Math.max(e,(rr(t)?t.priority:0)+1)),0))}};function Nr(e){return!1!==e.idle}function Mr(e){return!e.size||Array.from(e).every(Nr)}function Vr(e){e.idle||(e.idle=!0,Xs(wi(e),(e=>{e.done=!0})),Yn(e,{type:"idle",parent:e}))}qs.assign({createStringInterpolator:ui,to:(e,t)=>new Ar(e,t)});hn.advance;const Fr=window.ReactDOM;var Rr=/^--/;function Br(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Rr.test(e)||zr.hasOwnProperty(e)&&zr[e]?(""+t).trim():t+"px"}var Dr={};var zr={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"];zr=Object.keys(zr).reduce(((e,t)=>(Lr.forEach((s=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(s,t)]=e[t])),e)),zr);var Gr=/^(matrix|translate|scale|rotate|skew)/,Hr=/^(translate)/,Ur=/^(rotate|skew)/,Wr=(e,t)=>Ks.num(e)&&0!==e?e+t:e,qr=(e,t)=>Ks.arr(e)?e.every((e=>qr(e,t))):Ks.num(e)?e===t:parseFloat(e)===t,Zr=class extends ki{constructor({x:e,y:t,z:s,...n}){let i=[],r=[];(e||t||s)&&(i.push([e||0,t||0,s||0]),r.push((e=>[`translate3d(${e.map((e=>Wr(e,"px"))).join(",")})`,qr(e,0)]))),Js(n,((e,t)=>{if("transform"===t)i.push([e||""]),r.push((e=>[e,""===e]));else if(Gr.test(t)){if(delete n[t],Ks.und(e))return;let s=Hr.test(t)?"px":Ur.test(t)?"deg":"";i.push(Qs(e)),r.push("rotate3d"===t?([e,t,n,i])=>[`rotate3d(${e},${t},${n},${Wr(i,s)})`,qr(i,0)]:e=>[`${t}(${e.map((e=>Wr(e,s))).join(",")})`,qr(e,t.startsWith("scale")?1:0)])}})),i.length&&(n.transform=new Kr(i,r)),super(n)}},Kr=class extends Xn{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 Xs(this.inputs,((s,n)=>{let i=Zn(s[0]),[r,o]=this.transforms[n](Ks.arr(i)?i:s.map(Zn));e+=" "+r,t=t&&o})),t?"none":e}observerAdded(e){1==e&&Xs(this.inputs,(e=>Xs(e,(e=>qn(e)&&Qn(e,this)))))}observerRemoved(e){0==e&&Xs(this.inputs,(e=>Xs(e,(e=>qn(e)&&$n(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Yn(this,e)}};qs.assign({batchedUpdates:Fr.unstable_batchedUpdates,createStringInterpolator:ui,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:s=(e=>new ki(e)),getComponentProps:n=(e=>e)}={})=>{let i={applyAnimatedValues:t,createAnimatedStyle:s,getComponentProps:n},r=e=>{let t=Ni(e)||"Anonymous";return(e=Ks.str(e)?r[e]||(r[e]=Ti(e,i)):e[Ai]||(e[Ai]=Ti(e,i))).displayName=`Animated(${t})`,e};return Js(e,((t,s)=>{Ks.arr(e)&&(s=Ni(t)),r[s]=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 s="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:n,children:i,scrollTop:r,scrollLeft:o,viewBox:a,...l}=t,c=Object.values(l),u=Object.keys(l).map((t=>s||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 n)if(n.hasOwnProperty(t)){let s=Br(t,n[t]);Rr.test(t)?e.style.setProperty(t,s):e.style[t]=s}u.forEach(((t,s)=>{e.setAttribute(t,c[s])})),void 0!==r&&(e.scrollTop=r),void 0!==o&&(e.scrollLeft=o),void 0!==a&&e.setAttribute("viewBox",a)},createAnimatedStyle:e=>new Zr(e),getComponentProps:({scrollTop:e,scrollLeft:t,...s})=>s});Yr.animated;const Xr=function({triggerAnimationOnChange:e}){const t=(0,d.useRef)(),{previous:s,prevRect:n}=(0,d.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,d.useLayoutEffect)((()=>{if(!s||!t.current)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;const e=new jr({x:0,y:0,width:n.width,height:n.height,config:{duration:400,easing:Hn.easeInOutQuint},onChange({value:e}){if(!t.current)return;let{x:s,y:n,width:i,height:r}=e;s=Math.round(s),n=Math.round(n),i=Math.round(i),r=Math.round(r);const o=0===s&&0===n;t.current.style.transformOrigin="center center",t.current.style.transform=o?null:`translate3d(${s}px,${n}px,0)`,t.current.style.width=o?null:`${i}px`,t.current.style.height=o?null:`${r}px`}});t.current.style.transform=void 0;const i=t.current.getBoundingClientRect(),r=Math.round(n.left-i.left),o=Math.round(n.top-i.top),a=i.width,l=i.height;return e.start({x:0,y:0,width:a,height:l,from:{x:r,y:o,width:n.width,height:n.height}}),()=>{e.stop(),e.set({x:0,y:0,width:n.width,height:n.height})}}),[s,n]),t},Jr=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})});function Qr(){return void 0!==(0,ts.getQueryArg)(window.location.href,"wp_theme_preview")}function $r(){return Qr()?(0,ts.getQueryArg)(window.location.href,"wp_theme_preview"):null}const{useLocation:eo}=te(Gt.privateApis);function to({className:e="edit-site-save-button__button",variant:t="primary",showTooltip:s=!0,showReviewMessage:n,icon:i,size:r,__next40pxDefaultSize:o=!1}){const{params:a}=eo(),{setIsSaveViewOpened:c}=(0,l.useDispatch)(zt),{saveDirtyEntities:u}=te((0,l.useDispatch)(h.store)),{dirtyEntityRecords:d}=(0,h.useEntitiesSavedStatesIsDirty)(),{isSaving:p,isSaveViewOpen:f,previewingThemeName:m}=(0,l.useSelect)((e=>{const{isSavingEntityRecord:t,isResolving:s}=e(_.store),{isSaveViewOpened:n}=e(zt),i=s("activateTheme"),r=$r();return{isSaving:d.some((e=>t(e.kind,e.name,e.key)))||i,isSaveViewOpen:n(),previewingThemeName:r?e(_.store).getTheme(r)?.name?.rendered:void 0}}),[d]),g=!!d.length;let v;1===d.length&&(a.postId?v=`${d[0].key}`===a.postId&&d[0].name===a.postType:a.path?.includes("wp_global_styles")&&(v="globalStyles"===d[0].name));const x=p||!g&&!Qr(),w=Qr()?p?(0,b.sprintf)((0,b.__)("Activating %s"),m):x?(0,b.__)("Saved"):g?(0,b.sprintf)((0,b.__)("Activate %s & Save"),m):(0,b.sprintf)((0,b.__)("Activate %s"),m):p?(0,b.__)("Saving"):x?(0,b.__)("Saved"):!v&&n?(0,b.sprintf)((0,b._n)("Review %d change…","Review %d changes…",d.length),d.length):(0,b.__)("Save"),S=v?()=>u({dirtyEntityRecords:d}):()=>c(!0);return(0,oe.jsx)(y.Button,{variant:t,className:e,"aria-disabled":x,"aria-expanded":f,isBusy:p,onClick:x?void 0:S,label:w,shortcut:x?void 0:es.displayShortcut.primary("s"),showTooltip:s,icon:i,__next40pxDefaultSize:o,size:r,children:w})}function so(){const{isDisabled:e,isSaving:t}=(0,l.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,isSavingEntityRecord:s}=e(_.store),n=t(),i=n.some((e=>s(e.kind,e.name,e.key)));return{isSaving:i,isDisabled:i||!n.length&&!Qr()}}),[]);return(0,oe.jsx)(y.__experimentalHStack,{className:"edit-site-save-hub",alignment:"right",spacing:4,children:(0,oe.jsx)(to,{className:"edit-site-save-hub__button",variant:e?null:"primary",showTooltip:!1,icon:e&&!t?Jr:null,showReviewMessage:!0,__next40pxDefaultSize:!0})})}const{useHistory:no}=te(Gt.privateApis);const io=window.wp.apiFetch;var ro=i.n(io);const{EntitiesSavedStatesExtensible:oo,NavigableRegion:ao}=te(h.privateApis),lo=({onClose:e})=>{var t,s;const n=(0,h.useEntitiesSavedStatesIsDirty)();let i;i=n.isDirty?(0,b.__)("Activate & Save"):(0,b.__)("Activate");const r=function(){const[e,t]=(0,d.useState)();return(0,d.useEffect)((()=>{const e=(0,ts.addQueryArgs)("/wp/v2/themes?status=active",{context:"edit",wp_theme_preview:""});ro()({path:e}).then((e=>t(e[0]))).catch((()=>{}))}),[]),e}(),o=(0,l.useSelect)((e=>e(_.store).getCurrentTheme()),[]),a=(0,oe.jsx)("p",{children:(0,b.sprintf)((0,b.__)("Saving your changes will change your active theme from %1$s to %2$s."),null!==(t=r?.name?.rendered)&&void 0!==t?t:"...",null!==(s=o?.name?.rendered)&&void 0!==s?s:"...")}),c=function(){const e=no(),{startResolution:t,finishResolution:s}=(0,l.useDispatch)(_.store);return async()=>{if(Qr()){const n="themes.php?action=activate&stylesheet="+$r()+"&_wpnonce="+window.WP_BLOCK_THEME_ACTIVATE_NONCE;t("activateTheme"),await window.fetch(n),s("activateTheme");const{params:i}=e.getLocationWithParams();e.replace({...i,wp_theme_preview:void 0})}}}();return(0,oe.jsx)(oo,{...n,additionalPrompt:a,close:e,onSave:async e=>(await c(),e),saveEnabled:!0,saveLabel:i})},co=({onClose:e,renderDialog:t})=>Qr()?(0,oe.jsx)(lo,{onClose:e}):(0,oe.jsx)(h.EntitiesSavedStates,{close:e,renderDialog:t});function uo(){const{isSaveViewOpen:e,canvasMode:t,isDirty:s,isSaving:n}=(0,l.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,isSavingEntityRecord:s,isResolving:n}=e(_.store),i=t(),r=n("activateTheme"),{isSaveViewOpened:o,getCanvasMode:a}=te(e(zt));return{isSaveViewOpen:o(),canvasMode:a(),isDirty:i.length>0,isSaving:i.some((e=>s(e.kind,e.name,e.key)))||r}}),[]),{setIsSaveViewOpened:i}=(0,l.useDispatch)(zt),r=()=>i(!1);if("view"===t)return e?(0,oe.jsx)(y.Modal,{className:"edit-site-save-panel__modal",onRequestClose:r,__experimentalHideHeader:!0,contentLabel:(0,b.__)("Save site, content, and template changes"),children:(0,oe.jsx)(co,{onClose:r})}):null;const o=Qr()||s,a=n||!o;return(0,oe.jsxs)(ao,{className:Ut("edit-site-layout__actions",{"is-entity-save-view-open":e}),ariaLabel:(0,b.__)("Save panel"),children:[(0,oe.jsx)("div",{className:Ut("edit-site-editor__toggle-save-panel",{"screen-reader-text":e}),children:(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!1,variant:"secondary",className:"edit-site-editor__toggle-save-panel-button",onClick:()=>i(!0),"aria-haspopup":"dialog",disabled:a,accessibleWhenDisabled:!0,children:(0,b.__)("Open save panel")})}),e&&(0,oe.jsx)(co,{onClose:r,renderDialog:!0})]})}const{useLocation:po,useHistory:ho}=te(Gt.privateApis);const{useCommands:fo}=te(Zt.privateApis),{useGlobalStyle:mo}=te(x.privateApis),{NavigableRegion:go}=te(h.privateApis),vo=.3;function xo({route:e}){!function(){const e=ho(),{params:t}=po(),s=(0,l.useSelect)((e=>te(e(zt)).getCanvasMode()),[]),{setCanvasMode:n}=te((0,l.useDispatch)(zt)),i=(0,d.useRef)(s),{canvas:r}=t,o=(0,d.useRef)(r),a=(0,d.useRef)(t);(0,d.useEffect)((()=>{a.current=t}),[t]),(0,d.useEffect)((()=>{i.current=s,"init"!==s&&("edit"===s&&o.current!==s&&e.push({...a.current,canvas:"edit"}),"view"===s&&void 0!==o.current&&e.push({...a.current,canvas:void 0}))}),[s,e]),(0,d.useEffect)((()=>{o.current=r,"edit"!==r&&"view"!==i.current?n("view"):"edit"===r&&"edit"!==i.current&&n("edit")}),[r,n])}(),fo();const t=(0,v.useViewportMatch)("medium","<"),s=(0,d.useRef)(),{canvasMode:n,previousShortcut:i,nextShortcut:r}=(0,l.useSelect)((e=>{const{getAllShortcutKeyCombinations:t}=e(Wt.store),{getCanvasMode:s}=te(e(zt));return{canvasMode:s(),previousShortcut:t("core/editor/previous-region"),nextShortcut:t("core/editor/next-region")}}),[]),o=(0,y.__unstableUseNavigateRegions)({previous:i,next:r}),a=(0,v.useReducedMotion)(),[c,u]=(0,v.useResizeObserver)(),p=js(),[f,m]=(0,d.useState)(!1),{key:g,areas:x,widths:w}=e,_=Xr({triggerAnimationOnChange:n+"__"+g}),[S]=mo("color.background"),[j]=mo("color.gradient"),C=(0,v.usePrevious)(n);return(0,d.useEffect)((()=>{"edit"===C&&s.current?.focus()}),[n]),"init"===n?null:(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(qt.CommandMenu,{}),(0,oe.jsx)(bs,{}),(0,oe.jsx)(ws,{}),(0,oe.jsx)("div",{...o,ref:o.ref,className:Ut("edit-site-layout",o.className,{"is-full-canvas":"edit"===n}),children:(0,oe.jsxs)("div",{className:"edit-site-layout__content",children:[(!t||!x.mobile)&&(0,oe.jsx)(go,{ariaLabel:(0,b.__)("Navigation"),className:"edit-site-layout__sidebar-region",children:(0,oe.jsx)(y.__unstableAnimatePresence,{children:"view"===n&&(0,oe.jsxs)(y.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{type:"tween",duration:a||t?0:vo,ease:"easeOut"},className:"edit-site-layout__sidebar",children:[(0,oe.jsx)(ds,{ref:s,isTransparent:f}),(0,oe.jsx)(ls,{routeKey:g,children:x.sidebar}),(0,oe.jsx)(so,{}),(0,oe.jsx)(uo,{})]})})}),(0,oe.jsx)(h.EditorSnackbars,{}),t&&x.mobile&&(0,oe.jsxs)("div",{className:"edit-site-layout__mobile",children:["edit"!==n&&(0,oe.jsx)(ls,{routeKey:g,children:(0,oe.jsx)(ps,{ref:s,isTransparent:f})}),x.mobile]}),!t&&x.content&&"edit"!==n&&(0,oe.jsx)("div",{className:"edit-site-layout__area",style:{maxWidth:w?.content},children:x.content}),!t&&x.edit&&(0,oe.jsx)("div",{className:"edit-site-layout__area",style:{maxWidth:w?.edit},children:x.edit}),!t&&x.preview&&(0,oe.jsxs)("div",{className:"edit-site-layout__canvas-container",children:[c,!!u.width&&(0,oe.jsx)("div",{className:Ut("edit-site-layout__canvas",{"is-right-aligned":f}),ref:_,children:(0,oe.jsx)(Xt,{children:(0,oe.jsx)(ys,{isReady:!p,isFullWidth:"edit"===n,defaultSize:{width:u.width-24,height:u.height},isOversized:f,setIsOversized:m,innerContentStyle:{background:null!=j?j:S},children:x.preview})})})]})]})})]})}const yo=(0,oe.jsx)(Qt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,oe.jsx)(Qt.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"})}),bo=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.Path,{d:"M12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zM3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 8.75a1.5 1.5 0 01.167 2.99c-.465.052-.917.44-.917 1.01V14h1.5v-.845A3 3 0 109 10.25h1.5a1.5 1.5 0 011.5-1.5zM11.25 15v1.5h1.5V15h-1.5z"})}),wo=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"})}),_o=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.Path,{d:"M12 4V2.2L9 4.8l3 2.5V5.5c3.6 0 6.5 2.9 6.5 6.5 0 2.9-1.9 5.3-4.5 6.2v.2l-.1-.2c-.4.1-.7.2-1.1.2l.2 1.5c.3 0 .6-.1 1-.2 3.5-.9 6-4 6-7.7 0-4.4-3.6-8-8-8zm-7.9 7l1.5.2c.1-1.2.5-2.3 1.2-3.2l-1.1-.9C4.8 8.2 4.3 9.6 4.1 11zm1.5 1.8l-1.5.2c.1.7.3 1.4.5 2 .3.7.6 1.3 1 1.8l1.2-.8c-.3-.5-.6-1-.8-1.5s-.4-1.1-.4-1.7zm1.5 5.5c1.1.9 2.4 1.4 3.8 1.6l.2-1.5c-1.1-.1-2.2-.5-3.1-1.2l-.9 1.1z"})}),So=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.Path,{d:"M4 20h8v-1.5H4V20zM18.9 3.5c-.6-.6-1.5-.6-2.1 0l-7.2 7.2c-.4-.1-.7 0-1.1.1-.5.2-1.5.7-1.9 2.2-.4 1.7-.8 2.2-1.1 2.7-.1.1-.2.3-.3.4l-.6 1.1H6c2 0 3.4-.4 4.7-1.4.8-.6 1.2-1.4 1.3-2.3 0-.3 0-.5-.1-.7L19 5.7c.5-.6.5-1.6-.1-2.2zM9.7 14.7c-.7.5-1.5.8-2.4 1 .2-.5.5-1.2.8-2.3.2-.6.4-1 .8-1.1.5-.1 1 .1 1.3.3.2.2.3.5.2.8 0 .3-.1.9-.7 1.3z"})}),jo=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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"})}),Co=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})}),{useGlobalStylesReset:ko}=te(x.privateApis),{useHistory:Eo,useLocation:Po}=te(Gt.privateApis);function Io(){const{openGeneralSidebar:e,setCanvasMode:t}=te((0,l.useDispatch)(zt)),{params:s}=Po(),{getCanvasMode:n}=te((0,l.useSelect)(zt)),i=Eo(),r=(0,l.useSelect)((e=>e(_.store).getCurrentTheme().is_block_theme),[]);return{isLoading:!1,commands:(0,d.useMemo)((()=>r?[{name:"core/edit-site/open-styles",label:(0,b.__)("Open styles"),callback:({close:r})=>{r(),s.postId||i.push({path:"/wp_global_styles",canvas:"edit"}),s.postId&&"edit"!==n()&&t("edit"),e("edit-site/global-styles")},icon:yo}]:[]),[i,e,t,n,r,s.postId])}}function To(){const{openGeneralSidebar:e,setCanvasMode:t}=te((0,l.useDispatch)(zt)),{params:s}=Po(),{getCanvasMode:n}=te((0,l.useSelect)(zt)),{set:i}=(0,l.useDispatch)(f.store),r=Eo(),o=(0,l.useSelect)((e=>e(_.store).getCurrentTheme().is_block_theme),[]);return{isLoading:!1,commands:(0,d.useMemo)((()=>o?[{name:"core/edit-site/toggle-styles-welcome-guide",label:(0,b.__)("Learn about styles"),callback:({close:o})=>{o(),s.postId||r.push({path:"/wp_global_styles",canvas:"edit"}),s.postId&&"edit"!==n()&&t("edit"),e("edit-site/global-styles"),i("core/edit-site","welcomeGuideStyles",!0),setTimeout((()=>{i("core/edit-site","welcomeGuideStyles",!0)}),500)},icon:bo}]:[]),[r,e,t,n,o,i,s.postId])}}function Oo(){const[e,t]=ko();return{isLoading:!1,commands:(0,d.useMemo)((()=>e?[{name:"core/edit-site/reset-global-styles",label:(0,b.__)("Reset styles"),icon:(0,b.isRTL)()?wo:_o,callback:({close:e})=>{e(),t()}}]:[]),[e,t])}}function Ao(){const{openGeneralSidebar:e,setEditorCanvasContainerView:t,setCanvasMode:s}=te((0,l.useDispatch)(zt)),{params:n}=Po(),i=Eo(),{canEditCSS:r}=(0,l.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:s}=e(_.store),n=s(),i=n?t("root","globalStyles",n):void 0;return{canEditCSS:!!i?._links?.["wp:action-edit-css"]}}),[]),{getCanvasMode:o}=te((0,l.useSelect)(zt));return{isLoading:!1,commands:(0,d.useMemo)((()=>r?[{name:"core/edit-site/open-styles-css",label:(0,b.__)("Customize CSS"),icon:So,callback:({close:r})=>{r(),n.postId||i.push({path:"/wp_global_styles",canvas:"edit"}),n.postId&&"edit"!==o()&&s("edit"),e("edit-site/global-styles"),t("global-styles-css")}}]:[]),[i,e,t,r,o,s,n.postId])}}function No(){const{openGeneralSidebar:e,setEditorCanvasContainerView:t,setCanvasMode:s}=te((0,l.useDispatch)(zt)),{getCanvasMode:n}=te((0,l.useSelect)(zt)),{params:i}=Po(),r=Eo(),o=(0,l.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:s}=e(_.store),n=s(),i=n?t("root","globalStyles",n):void 0;return!!i?._links?.["version-history"]?.[0]?.count}),[]);return{isLoading:!1,commands:(0,d.useMemo)((()=>o?[{name:"core/edit-site/open-global-styles-revisions",label:(0,b.__)("Style revisions"),icon:jo,callback:({close:o})=>{o(),i.postId||r.push({path:"/wp_global_styles",canvas:"edit"}),i.postId&&"edit"!==n()&&s("edit"),e("edit-site/global-styles"),t("global-styles-revisions")}}]:[]),[o,r,e,t,n,s,i.postId])}}const Mo=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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"})}),Vo=(0,oe.jsxs)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,oe.jsx)(Qt.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,oe.jsx)(Qt.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"})]}),Fo=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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{useHistory:Ro}=te(Gt.privateApis);function Bo(e,t,s=!1){const n=Ro();const i=(0,ts.getQueryArgs)(window.location.href),r=(0,ts.removeQueryArgs)(window.location.href,...Object.keys(i));Qr()&&(e={...e,wp_theme_preview:$r()});return{href:(0,ts.addQueryArgs)(r,e),onClick:function(i){i?.preventDefault(),s?n.replace(e,t):n.push(e,t)}}}function Do({params:e={},state:t,replace:s=!1,children:n,...i}){const{href:r,onClick:o}=Bo(e,t,s);return(0,oe.jsx)("a",{href:r,onClick:o,...i,children:n})}const{useHistory:zo}=te(Gt.privateApis);function Lo(){const{record:e}=_s(),{isPage:t,canvasMode:s,templateId:n,currentPostType:i}=(0,l.useSelect)((e=>{const{isPage:t,getCanvasMode:s}=te(e(zt)),{getCurrentPostType:n,getCurrentTemplateId:i}=e(h.store);return{isPage:t(),canvasMode:s(),templateId:i(),currentPostType:n()}}),[]),{onClick:r}=Bo({postType:"wp_template",postId:n}),{setRenderingMode:o}=(0,l.useDispatch)(h.store);if(!t||"edit"!==s)return{isLoading:!1,commands:[]};const a=[];return"wp_template"!==i?a.push({name:"core/switch-to-template-focus",label:(0,b.sprintf)((0,b.__)("Edit template: %s"),(0,Jt.decodeEntities)(e.title)),icon:Mo,callback:({close:e})=>{r(),e()}}):a.push({name:"core/switch-to-page-focus",label:(0,b.__)("Back to page"),icon:Vo,callback:({close:e})=>{o("template-locked"),e()}}),{isLoading:!1,commands:a}}function Go(){const{isLoaded:e,record:t}=_s(),{removeTemplate:s,revertTemplate:n}=(0,l.useDispatch)(zt),i=zo(),r=(0,l.useSelect)((e=>e(zt).isPage()&&"wp_template"!==e(h.store).getCurrentPostType()),[]);if(!e)return{isLoading:!0,commands:[]};const o=[];if(function(e){return!!e&&e?.source===ke.custom&&(Boolean(e?.plugin)||e?.has_theme_file)}(t)&&!r){const e=t.type===je?(0,b.sprintf)((0,b.__)("Reset template: %s"),(0,Jt.decodeEntities)(t.title)):(0,b.sprintf)((0,b.__)("Reset template part: %s"),(0,Jt.decodeEntities)(t.title));o.push({name:"core/reset-template",label:e,icon:(0,b.isRTL)()?wo:_o,callback:({close:e})=>{n(t),e()}})}if(function(e){return!!e&&e.source===ke.custom&&!Boolean(e.plugin)&&!e.has_theme_file}(t)&&!r){const e=t.type===je?(0,b.sprintf)((0,b.__)("Delete template: %s"),(0,Jt.decodeEntities)(t.title)):(0,b.sprintf)((0,b.__)("Delete template part: %s"),(0,Jt.decodeEntities)(t.title));o.push({name:"core/remove-template",label:e,icon:Fo,callback:({close:e})=>{s(t),i.push({postType:t.type}),e()}})}return{isLoading:!e,commands:o}}const{useLocation:Ho}=te(Gt.privateApis),Uo=[je,Ce,Se,Ie.user],Wo=["page","post"];function qo(){const{params:e={}}=Ho(),{postType:t,postId:s,context:n,isReady:i}=function({postId:e,postType:t}){const{hasLoadedAllDependencies:s,homepageId:n,postsPageId:i,url:r,frontPageTemplateId:o}=(0,l.useSelect)((e=>{const{getEntityRecord:t,getEntityRecords:s}=e(_.store),n=t("root","site"),i=t("root","__unstableBase"),r=s("postType",je,{per_page:-1}),o="page"===n?.show_on_front&&["number","string"].includes(typeof n.page_on_front)&&+n.page_on_front?n.page_on_front.toString():null,a="page"===n?.show_on_front&&["number","string"].includes(typeof n.page_for_posts)?n.page_for_posts.toString():null;let l;if(r){const e=r.find((e=>"front-page"===e.slug));l=!!e&&e.id}return{hasLoadedAllDependencies:!!i&&!!n,homepageId:o,postsPageId:a,url:i?.home,frontPageTemplateId:l}}),[]),a=(0,l.useSelect)((a=>{if(Uo.includes(t)&&e)return;if(e&&e.includes(","))return;const{getEditedEntityRecord:l,getEntityRecords:c,getDefaultTemplateId:u,__experimentalGetTemplateForLink:d}=a(_.store);function p(e,t){if("page"===e&&n===t){if(void 0===o)return;if(o)return o}const s=l("postType",e,t);if(!s)return;if("page"===e&&i===t)return d(s.link)?.id;const r=s.template;if(r){const e=c("postType",je,{per_page:-1})?.find((({slug:e})=>e===r));if(e)return e.id}let a;return a=s.slug?"page"===e?`${e}-${s.slug}`:`single-${e}-${s.slug}`:"page"===e?"page":`single-${e}`,u({slug:a})}if(s){if(t&&e&&Wo.includes(t))return p(t,e);if(n)return p("page",n);if(r){const e=d(r);return e?.id}}}),[n,i,s,r,e,t,o]),c=(0,d.useMemo)((()=>Uo.includes(t)&&e?{}:t&&e&&Wo.includes(t)?{postType:t,postId:e}:n?{postType:"page",postId:n}:{}),[n,t,e]);return Uo.includes(t)&&e?{isReady:!0,postType:t,postId:e,context:c}:s?{isReady:void 0!==a,postType:je,postId:a,context:c}:{isReady:!1}}(e),{setEditedEntity:r}=(0,l.useDispatch)(zt);(0,d.useEffect)((()=>{i&&r(t,s,n)}),[i,t,s,n,r])}const Zo=(0,d.forwardRef)((function({icon:e,size:t=24,...s},n){return(0,d.cloneElement)(e,{width:t,height:t,...s,ref:n})})),Ko=(0,oe.jsx)(Qt.SVG,{width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,oe.jsx)(Qt.Path,{d:"M14 6H6v8h1.5V8.5L17 18l1-1-9.5-9.5H14V6Z"})});function Yo({nonAnimatedSrc:e,animatedSrc:t}){return(0,oe.jsxs)("picture",{className:"edit-site-welcome-guide__image",children:[(0,oe.jsx)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,oe.jsx)("img",{src:t,width:"312",height:"240",alt:""})]})}function Xo(){const{toggle:e}=(0,l.useDispatch)(f.store),{isActive:t,isBlockBasedTheme:s}=(0,l.useSelect)((e=>({isActive:!!e(f.store).get("core/edit-site","welcomeGuide"),isBlockBasedTheme:e(_.store).getCurrentTheme()?.is_block_theme})),[]);return t&&s?(0,oe.jsx)(y.Guide,{className:"edit-site-welcome-guide guide-editor",contentLabel:(0,b.__)("Welcome to the site editor"),finishButtonText:(0,b.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuide"),pages:[{image:(0,oe.jsx)(Yo,{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,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:(0,b.__)("Edit your site")}),(0,oe.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,b.__)("Design everything on your site — from the header right down to the footer — using blocks.")}),(0,oe.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,d.createInterpolateElement)((0,b.__)("Click <StylesIconImage /> to start designing your blocks, and choose your typography, layout, and colors."),{StylesIconImage:(0,oe.jsx)("img",{alt:(0,b.__)("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:Jo}=te(h.privateApis);function Qo(){const{toggle:e}=(0,l.useDispatch)(f.store),{isActive:t,isStylesOpen:s}=(0,l.useSelect)((e=>{const t=e(Jo).getActiveComplementaryArea("core");return{isActive:!!e(f.store).get("core/edit-site","welcomeGuideStyles"),isStylesOpen:"edit-site/global-styles"===t}}),[]);if(!t||!s)return null;const n=(0,b.__)("Welcome to Styles");return(0,oe.jsx)(y.Guide,{className:"edit-site-welcome-guide guide-styles",contentLabel:n,finishButtonText:(0,b.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuideStyles"),pages:[{image:(0,oe.jsx)(Yo,{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,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:n}),(0,oe.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,b.__)("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,oe.jsx)(Yo,{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,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:(0,b.__)("Set the design")}),(0,oe.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,b.__)("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,oe.jsx)(Yo,{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,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:(0,b.__)("Personalize blocks")}),(0,oe.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,b.__)("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,oe.jsx)(Yo,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:(0,b.__)("Learn more")}),(0,oe.jsxs)("p",{className:"edit-site-welcome-guide__text",children:[(0,b.__)("New to block themes and styling your site?")," ",(0,oe.jsx)(y.ExternalLink,{href:(0,b.__)("https://wordpress.org/documentation/article/styles-overview/"),children:(0,b.__)("Heres a detailed guide to learn how to make the most of it.")})]})]})}]})}function $o(){const{toggle:e}=(0,l.useDispatch)(f.store),t=(0,l.useSelect)((e=>{const t=!!e(f.store).get("core/edit-site","welcomeGuidePage"),s=!!e(f.store).get("core/edit-site","welcomeGuide"),{isPage:n}=e(zt);return t&&!s&&n()}),[]);if(!t)return null;const s=(0,b.__)("Editing a page");return(0,oe.jsx)(y.Guide,{className:"edit-site-welcome-guide guide-page",contentLabel:s,finishButtonText:(0,b.__)("Continue"),onFinish:()=>e("core/edit-site","welcomeGuidePage"),pages:[{image:(0,oe.jsx)("video",{className:"edit-site-welcome-guide__video",autoPlay:!0,loop:!0,muted:!0,width:"312",height:"240",children:(0,oe.jsx)("source",{src:"https://s.w.org/images/block-editor/editing-your-page.mp4",type:"video/mp4"})}),content:(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:s}),(0,oe.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,b.__)("Its 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 ea(){const{toggle:e}=(0,l.useDispatch)(f.store),{isLoaded:t,record:s}=_s(),n=t&&"wp_template"===s.type,{isActive:i,hasPreviousEntity:r}=(0,l.useSelect)((e=>{const{getEditorSettings:t}=e(h.store),{get:s}=e(f.store);return{isActive:s("core/edit-site","welcomeGuideTemplate"),hasPreviousEntity:!!t().onNavigateToPreviousEntityRecord}}),[]);if(!(i&&n&&r))return null;const o=(0,b.__)("Editing a template");return(0,oe.jsx)(y.Guide,{className:"edit-site-welcome-guide guide-template",contentLabel:o,finishButtonText:(0,b.__)("Continue"),onFinish:()=>e("core/edit-site","welcomeGuideTemplate"),pages:[{image:(0,oe.jsx)("video",{className:"edit-site-welcome-guide__video",autoPlay:!0,loop:!0,muted:!0,width:"312",height:"240",children:(0,oe.jsx)("source",{src:"https://s.w.org/images/block-editor/editing-your-template.mp4",type:"video/mp4"})}),content:(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:o}),(0,oe.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,b.__)("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 ta(){return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(Xo,{}),(0,oe.jsx)(Qo,{}),(0,oe.jsx)($o,{}),(0,oe.jsx)(ea,{})]})}const{useGlobalStylesOutput:sa}=te(x.privateApis);function na(){return function(){const e=(0,l.useSelect)((e=>e(zt).getEditedPostType())),[t,s]=sa(e!==je),{getSettings:n}=(0,l.useSelect)(zt),{updateSettings:i}=(0,l.useDispatch)(zt);(0,d.useEffect)((()=>{var e;if(!t||!s)return;const r=n(),o=Object.values(null!==(e=r.styles)&&void 0!==e?e:[]).filter((e=>!e.isGlobalStyles));i({...r,styles:[...o,...t],__experimentalFeatures:s})}),[t,s,i,n])}(),null}const{Theme:ia}=te(y.privateApis),{useGlobalStyle:ra}=te(x.privateApis);function oa({id:e}){var t;const[s]=ra("color.text"),[n]=ra("color.background"),{highlightedColors:i}=ie(),r=null!==(t=i[0]?.color)&&void 0!==t?t:s,{elapsed:o,total:a}=(0,l.useSelect)((e=>{var t,s;const n=e(_.store).countSelectorsByStatus(),i=null!==(t=n.resolving)&&void 0!==t?t:0,r=null!==(s=n.finished)&&void 0!==s?s:0;return{elapsed:r,total:r+i}}),[]);return(0,oe.jsx)("div",{className:"edit-site-canvas-loader",children:(0,oe.jsx)(ia,{accent:r,background:n,children:(0,oe.jsx)(y.ProgressBar,{id:e,max:a,value:o})})})}const{useHistory:aa}=te(Gt.privateApis);const{useLocation:la,useHistory:ca}=te(Gt.privateApis);function ua(){const e=function(){const e=aa();return(0,d.useCallback)((t=>{e.push({...t,focusMode:!0,canvas:"edit"})}),[e])}(),{canvasMode:t,settings:s,shouldUseTemplateAsDefaultRenderingMode:n}=(0,l.useSelect)((e=>{const{getEditedPostContext:t,getCanvasMode:s,getSettings:n}=te(e(zt)),i=t();return{canvasMode:s(),settings:n(),shouldUseTemplateAsDefaultRenderingMode:i?.postId&&"post"!==i?.postType}}),[]),i=n?"template-locked":"post-only",r=function(){const e=la(),t=(0,v.usePrevious)(e),s=ca();return(0,d.useMemo)((()=>{const n=e.params.focusMode||e.params.postId&&Me.includes(e.params.postType),i="edit"===t?.params.canvas;return n&&i?()=>s.back():void 0}),[e,s])}();return(0,d.useMemo)((()=>({...s,richEditingEnabled:!0,supportsTemplateMode:!0,focusMode:"view"!==t,defaultRenderingMode:i,onNavigateToEntityRecord:e,onNavigateToPreviousEntityRecord:r,__unstableIsPreviewMode:"view"===t})),[s,t,i,e,r])}const{Fill:da,Slot:pa}=(0,y.createSlotFill)("PluginTemplateSettingPanel"),ha=({children:e})=>{u()("wp.editSite.PluginTemplateSettingPanel",{since:"6.6",version:"6.8",alternative:"wp.editor.PluginDocumentSettingPanel"});return(0,l.useSelect)((e=>"wp_template"===e(h.store).getCurrentPostType()),[])?(0,oe.jsx)(da,{children:e}):null};ha.Slot=pa;const fa=ha,ma=(0,oe.jsx)(Qt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,oe.jsx)(Qt.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"})}),ga=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})}),va=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})}),xa=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});function ya({className:e,...t}){return(0,oe.jsx)(y.Icon,{className:Ut(e,"edit-site-global-styles-icon-with-current-color"),...t})}function ba({icon:e,children:t,...s}){return(0,oe.jsxs)(y.__experimentalItem,{...s,children:[e&&(0,oe.jsxs)(y.__experimentalHStack,{justify:"flex-start",children:[(0,oe.jsx)(ya,{icon:e,size:24}),(0,oe.jsx)(y.FlexItem,{children:t})]}),!e&&t]})}function wa(e){return(0,oe.jsx)(y.__experimentalNavigatorButton,{as:ba,...e})}const _a=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.Path,{d:"M6.9 7L3 17.8h1.7l1-2.8h4.1l1 2.8h1.7L8.6 7H6.9zm-.7 6.6l1.5-4.3 1.5 4.3h-3zM21.6 17c-.1.1-.2.2-.3.2-.1.1-.2.1-.4.1s-.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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"})}),ja=(0,oe.jsx)(Qt.SVG,{width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,oe.jsx)(Qt.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"})}),Ca=(0,oe.jsx)(Qt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,oe.jsx)(Qt.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"})}),{useHasDimensionsPanel:ka,useHasTypographyPanel:Ea,useHasColorPanel:Pa,useGlobalSetting:Ia,useSettingsForBlockElement:Ta,useHasBackgroundPanel:Oa}=te(x.privateApis);const Aa=function(){const[e]=Ia(""),t=Ta(e),s=Oa(e),n=Ea(t),i=Pa(t),r=ka(t);return(0,oe.jsx)(oe.Fragment,{children:(0,oe.jsxs)(y.__experimentalItemGroup,{children:[n&&(0,oe.jsx)(wa,{icon:_a,path:"/typography","aria-label":(0,b.__)("Typography styles"),children:(0,b.__)("Typography")}),i&&(0,oe.jsx)(wa,{icon:Sa,path:"/colors","aria-label":(0,b.__)("Colors styles"),children:(0,b.__)("Colors")}),s&&(0,oe.jsx)(wa,{icon:ja,path:"/background","aria-label":(0,b.__)("Background styles"),children:(0,b.__)("Background")}),(0,oe.jsx)(wa,{icon:Ca,path:"/shadows","aria-label":(0,b.__)("Shadow styles"),children:(0,b.__)("Shadows")}),r&&(0,oe.jsx)(wa,{icon:Mo,path:"/layout","aria-label":(0,b.__)("Layout styles"),children:(0,b.__)("Layout")})]})})};function Na(e){const t=/^(?!generic\([ a-zA-Z\-]+\)$)(?!^[a-zA-Z\-]+$).+/,s=e.trim(),n=e=>(e=e.trim()).match(t)?`"${e=e.replace(/^["']|["']$/g,"")}"`:e;return s.includes(",")?s.split(",").map(n).filter((e=>""!==e)).join(", "):n(s)}function Ma(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 Va(e){const t={fontFamily:Na(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 s=String(e.fontWeight).split(" ");if(2===s.length){const e=parseInt(s[0]),n=parseInt(s[1]);for(let s=e;s<=n;s+=100)t.push(s)}else 1===s.length&&t.push(parseInt(s[0]))})),t}(i),r=(s=400,0===(n=e).length?null:(n.sort(((e,t)=>Math.abs(s-e)-Math.abs(s-t))),n[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 s,n;return t}function Fa(e){return e?`is-style-${e}`:""}function Ra(e,t){const s=new RegExp(`^${t}([\\d]+)$`);return e.reduce(((e,t)=>{if("string"==typeof t?.slug){const n=t?.slug.match(s);if(n){const t=parseInt(n[1],10);if(t>e)return t}}return e}),0)+1}function Ba(e,t){if(!Array.isArray(e)||!t)return null;const s=t.replace("var(","").replace(")",""),n=s?.split("--").slice(-1)[0];return e.find((e=>e.slug===n))}const{GlobalStylesContext:Da}=te(x.privateApis),{mergeBaseAndUserConfigs:za}=te(h.privateApis);function La({fontSize:e,variation:t}){const{base:s}=(0,d.useContext)(Da);let n=s;t&&(n=za(s,t));const[i,r]=function(e){const t=e?.settings?.typography?.fontFamilies?.theme,s=e?.settings?.typography?.fontFamilies?.custom;let n=[];t&&s?n=[...t,...s]:t?n=t:s&&(n=s);const i=e?.styles?.typography?.fontFamily,r=Ba(n,i),o=e?.styles?.elements?.heading?.typography?.fontFamily;let a;return a=o?Ba(n,e?.styles?.elements?.heading?.typography?.fontFamily):r,[r,a]}(n),o=i?Va(i):{},a=r?Va(r):{};return e&&(o.fontSize=e,a.fontSize=e),(0,oe.jsxs)(y.__unstableMotion.div,{animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"},style:{textAlign:"center"},children:[(0,oe.jsx)("span",{style:a,children:(0,b._x)("A","Uppercase letter A")}),(0,oe.jsx)("span",{style:o,children:(0,b._x)("a","Lowercase letter A")})]})}function Ga({normalizedColorSwatchSize:e,ratio:t}){const{highlightedColors:s}=ie(),n=e*t;return s.map((({slug:e,color:t},s)=>(0,oe.jsx)(y.__unstableMotion.div,{style:{height:n,width:n,background:t,borderRadius:n/2},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:1===s?.2:.1}},`${e}-${s}`)))}const{useGlobalStyle:Ha,useGlobalStylesOutput:Ua}=te(x.privateApis),Wa={leading:!0,trailing:!0};function qa({children:e,label:t,isFocused:s,withHoverView:n}){const[i="white"]=Ha("color.background"),[r]=Ha("color.gradient"),[o]=Ua(),a=(0,v.useReducedMotion)(),[l,c]=(0,d.useState)(!1),[u,{width:p}]=(0,v.useResizeObserver)(),[h,f]=(0,d.useState)(p),[m,g]=(0,d.useState)(),b=(0,v.useThrottle)(f,250,Wa);(0,d.useLayoutEffect)((()=>{p&&b(p)}),[p,b]),(0,d.useLayoutEffect)((()=>{const e=h?h/248:1,t=e-(m||0);!(Math.abs(t)>.1)&&m||g(e)}),[h,m]);const w=m||(p?p/248:1),_=(0,d.useMemo)((()=>o?[...o,{css:"html{overflow:hidden}body{min-width: 0;padding: 0;border: none;cursor: pointer;}",isGlobalStyles:!0}]:o),[o]),S=!!p;return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)("div",{style:{position:"relative"},children:u}),S&&(0,oe.jsxs)(x.__unstableIframe,{className:"edit-site-global-styles-preview__iframe",style:{height:152*w},onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),tabIndex:-1,children:[(0,oe.jsx)(x.__unstableEditorStyles,{styles:_}),(0,oe.jsx)(y.__unstableMotion.div,{style:{height:152*w,width:"100%",background:null!=r?r:i,cursor:n?"pointer":void 0},initial:"start",animate:(l||s)&&!a&&t?"hover":"start",children:[].concat(e).map(((e,t)=>e({ratio:w,key:t})))})]})]})}const{useGlobalStyle:Za}=te(x.privateApis),Ka={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},Ya={hover:{opacity:1},start:{opacity:.5}},Xa={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}},Ja=({label:e,isFocused:t,withHoverView:s,variation:n})=>{const[i]=Za("typography.fontWeight"),[r="serif"]=Za("typography.fontFamily"),[o=r]=Za("elements.h1.typography.fontFamily"),[a=i]=Za("elements.h1.typography.fontWeight"),[l="black"]=Za("color.text"),[c=l]=Za("elements.h1.color.text"),{paletteColors:u}=ie();return(0,oe.jsxs)(qa,{label:e,isFocused:t,withHoverView:s,children:[({ratio:e,key:t})=>(0,oe.jsx)(y.__unstableMotion.div,{variants:Ka,style:{height:"100%",overflow:"hidden"},children:(0,oe.jsxs)(y.__experimentalHStack,{spacing:10*e,justify:"center",style:{height:"100%",overflow:"hidden"},children:[(0,oe.jsx)(La,{fontSize:65*e,variation:n}),(0,oe.jsx)(y.__experimentalVStack,{spacing:4*e,children:(0,oe.jsx)(Ga,{normalizedColorSwatchSize:32,ratio:e})})]})},t),({key:e})=>(0,oe.jsx)(y.__unstableMotion.div,{variants:s&&Ya,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1},children:(0,oe.jsx)(y.__experimentalHStack,{spacing:0,justify:"flex-start",style:{height:"100%",overflow:"hidden"},children:u.slice(0,4).map((({color:e},t)=>(0,oe.jsx)("div",{style:{height:"100%",background:e,flexGrow:1}},t)))})},e),({ratio:t,key:s})=>(0,oe.jsx)(y.__unstableMotion.div,{variants:Xa,style:{height:"100%",width:"100%",overflow:"hidden",position:"absolute",top:0},children:(0,oe.jsx)(y.__experimentalVStack,{spacing:3*t,justify:"center",style:{height:"100%",overflow:"hidden",padding:10*t,boxSizing:"border-box"},children:e&&(0,oe.jsx)("div",{style:{fontSize:40*t,fontFamily:o,color:c,fontWeight:a,lineHeight:"1em",textAlign:"center"},children:e})})},s)]})},{useGlobalStyle:Qa}=te(x.privateApis);const $a=function(){const[e]=Qa("css"),{hasVariations:t,canEditCSS:s}=(0,l.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:s,__experimentalGetCurrentThemeGlobalStylesVariations:n}=e(_.store),i=s(),r=i?t("root","globalStyles",i):void 0;return{hasVariations:!!n()?.length,canEditCSS:!!r?._links?.["wp:action-edit-css"]}}),[]);return(0,oe.jsxs)(y.Card,{size:"small",className:"edit-site-global-styles-screen-root",isRounded:!1,children:[(0,oe.jsx)(y.CardBody,{children:(0,oe.jsxs)(y.__experimentalVStack,{spacing:4,children:[(0,oe.jsx)(y.Card,{className:"edit-site-global-styles-screen-root__active-style-tile",children:(0,oe.jsx)(y.CardMedia,{className:"edit-site-global-styles-screen-root__active-style-tile-preview",children:(0,oe.jsx)(Ja,{})})}),t&&(0,oe.jsx)(y.__experimentalItemGroup,{children:(0,oe.jsx)(wa,{path:"/variations","aria-label":(0,b.__)("Browse styles"),children:(0,oe.jsxs)(y.__experimentalHStack,{justify:"space-between",children:[(0,oe.jsx)(y.FlexItem,{children:(0,b.__)("Browse styles")}),(0,oe.jsx)(ya,{icon:(0,b.isRTL)()?va:xa})]})})}),(0,oe.jsx)(Aa,{})]})}),(0,oe.jsx)(y.CardDivider,{}),(0,oe.jsxs)(y.CardBody,{children:[(0,oe.jsx)(y.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:4,children:(0,b.__)("Customize the appearance of specific blocks for the whole site.")}),(0,oe.jsx)(y.__experimentalItemGroup,{children:(0,oe.jsx)(wa,{path:"/blocks","aria-label":(0,b.__)("Blocks styles"),children:(0,oe.jsxs)(y.__experimentalHStack,{justify:"space-between",children:[(0,oe.jsx)(y.FlexItem,{children:(0,b.__)("Blocks")}),(0,oe.jsx)(ya,{icon:(0,b.isRTL)()?va:xa})]})})})]}),s&&!!e&&(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(y.CardDivider,{}),(0,oe.jsxs)(y.CardBody,{children:[(0,oe.jsx)(y.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:4,children:(0,b.__)("Add your own CSS to customize the appearance and layout of your site.")}),(0,oe.jsx)(y.__experimentalItemGroup,{children:(0,oe.jsx)(wa,{path:"/css","aria-label":(0,b.__)("Additional CSS"),children:(0,oe.jsxs)(y.__experimentalHStack,{justify:"space-between",children:[(0,oe.jsx)(y.FlexItem,{children:(0,b.__)("Additional CSS")}),(0,oe.jsx)(ya,{icon:(0,b.isRTL)()?va:xa})]})})})]})]})]})},el=window.wp.a11y,{useGlobalStyle:tl}=te(x.privateApis);function sl(e){const t=(0,l.useSelect)((t=>{const{getBlockStyles:s}=t(o.store);return s(e)}),[e]),[s]=tl("variations",e);return function(e,t){return e?.filter((e=>"block"===e.source||t.includes(e.name)))}(t,Object.keys(null!=s?s:{}))}function nl({name:e}){const t=sl(e);return(0,oe.jsx)(y.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map(((t,s)=>t?.isDefault?null:(0,oe.jsx)(wa,{path:"/blocks/"+encodeURIComponent(e)+"/variations/"+encodeURIComponent(t.name),"aria-label":t.label,children:t.label},s)))})}const il=function({title:e,description:t,onBack:s}){return(0,oe.jsxs)(y.__experimentalVStack,{spacing:0,children:[(0,oe.jsx)(y.__experimentalView,{children:(0,oe.jsx)(y.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,oe.jsxs)(y.__experimentalHStack,{spacing:2,children:[(0,oe.jsx)(y.__experimentalNavigatorBackButton,{icon:(0,b.isRTL)()?xa:va,size:"small",label:(0,b.__)("Back"),onClick:s}),(0,oe.jsx)(y.__experimentalSpacer,{children:(0,oe.jsx)(y.__experimentalHeading,{className:"edit-site-global-styles-header",level:2,size:13,children:e})})]})})}),t&&(0,oe.jsx)("p",{className:"edit-site-global-styles-header__description",children:t})]})},{useHasDimensionsPanel:rl,useHasTypographyPanel:ol,useHasBorderPanel:al,useGlobalSetting:ll,useSettingsForBlockElement:cl,useHasColorPanel:ul}=te(x.privateApis);function dl(e){const[t]=ll("",e),s=cl(t,e),n=ol(s),i=ul(s),r=al(s),o=rl(s),a=r||o,l=!!sl(e)?.length;return n||i||a||l}function pl({block:e}){if(!dl(e.name))return null;const t=(0,b.sprintf)((0,b.__)("%s block styles"),e.title);return(0,oe.jsx)(wa,{path:"/blocks/"+encodeURIComponent(e.name),"aria-label":t,children:(0,oe.jsxs)(y.__experimentalHStack,{justify:"flex-start",children:[(0,oe.jsx)(x.BlockIcon,{icon:e.icon}),(0,oe.jsx)(y.FlexItem,{children:e.title})]})})}const hl=(0,d.memo)((function({filterValue:e}){const t=function(){const e=(0,l.useSelect)((e=>e(o.store).getBlockTypes()),[]),{core:t,noncore:s}=e.reduce(((e,t)=>{const{core:s,noncore:n}=e;return(t.name.startsWith("core/")?s:n).push(t),e}),{core:[],noncore:[]});return[...t,...s]}(),s=(0,v.useDebounce)(el.speak,500),{isMatchingSearchTerm:n}=(0,l.useSelect)(o.store),i=e?t.filter((t=>n(t,e))):t,r=(0,d.useRef)();return(0,d.useEffect)((()=>{if(!e)return;const t=r.current.childElementCount,n=(0,b.sprintf)((0,b._n)("%d result found.","%d results found.",t),t);s(n,t)}),[e,s]),(0,oe.jsx)("div",{ref:r,className:"edit-site-block-types-item-list",children:i.map((e=>(0,oe.jsx)(pl,{block:e},"menu-itemblock-"+e.name)))})}));const fl=function(){const[e,t]=(0,d.useState)(""),s=(0,d.useDeferredValue)(e);return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(il,{title:(0,b.__)("Blocks"),description:(0,b.__)("Customize the appearance of specific blocks and for the whole site.")}),(0,oe.jsx)(y.SearchControl,{__nextHasNoMarginBottom:!0,className:"edit-site-block-types-search",onChange:t,value:e,label:(0,b.__)("Search for blocks"),placeholder:(0,b.__)("Search")}),(0,oe.jsx)(hl,{filterValue:s})]})},ml=({name:e,variation:t=""})=>{var s;const n=(0,o.getBlockType)(e)?.example,i=(0,d.useMemo)((()=>{if(!n)return null;let s=n;return t&&(s={...s,attributes:{...s.attributes,className:Fa(t)}}),(0,o.getBlockFromExample)(e,s)}),[e,n,t]),r=null!==(s=n?.viewportWidth)&&void 0!==s?s:500,a=144,l=235/r,c=0!==l&&l<1?a/l:a;return n?(0,oe.jsx)(y.__experimentalSpacer,{marginX:4,marginBottom:4,children:(0,oe.jsx)("div",{className:"edit-site-global-styles__block-preview-panel",style:{maxHeight:a,boxSizing:"initial"},children:(0,oe.jsx)(x.BlockPreview,{blocks:i,viewportWidth:r,minHeight:a,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};const gl=function({children:e,level:t}){return(0,oe.jsx)(y.__experimentalHeading,{className:"edit-site-global-styles-subtitle",level:null!=t?t:2,children:e})},vl={backgroundSize:"cover",backgroundPosition:"50% 50%"};function xl(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:yl,useHasTypographyPanel:bl,useHasBorderPanel:wl,useGlobalSetting:_l,useSettingsForBlockElement:Sl,useHasColorPanel:jl,useHasFiltersPanel:Cl,useHasImageSettingsPanel:kl,useGlobalStyle:El,useHasBackgroundPanel:Pl,BackgroundPanel:Il,BorderPanel:Tl,ColorPanel:Ol,TypographyPanel:Al,DimensionsPanel:Nl,FiltersPanel:Ml,ImageSettingsPanel:Vl,AdvancedPanel:Fl}=te(x.privateApis);const Rl=function({name:e,variation:t}){let s=[];t&&(s=["variations",t].concat(s));const n=s.join("."),[i]=El(n,e,"user",{shouldDecodeEncode:!1}),[r,a]=El(n,e,"all",{shouldDecodeEncode:!1}),[c]=_l("",e,"user"),[u,p]=_l("",e),h=Sl(u,e),f=(0,o.getBlockType)(e);h?.spacing?.blockGap&&f?.supports?.spacing?.blockGap&&(!0===f?.supports?.spacing?.__experimentalSkipSerialization||f?.supports?.spacing?.__experimentalSkipSerialization?.some?.((e=>"blockGap"===e)))&&(h.spacing.blockGap=!1),h?.dimensions?.aspectRatio&&"core/group"===e&&(h.dimensions.aspectRatio=!1);const m=sl(e),g=Pl(h),v=bl(h),x=jl(h),w=wl(h),S=yl(h),j=Cl(h),C=kl(e,c,h),k=!!m?.length&&!t,{canEditCSS:E}=(0,l.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:s}=e(_.store),n=s(),i=n?t("root","globalStyles",n):void 0;return{canEditCSS:!!i?._links?.["wp:action-edit-css"]}}),[]),P=t?m.find((e=>e.name===t)):null,I=(0,d.useMemo)((()=>({...r,layout:h.layout})),[r,h.layout]),T=(0,d.useMemo)((()=>({...i,layout:c.layout})),[i,c.layout]);return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(il,{title:t?P?.label:f.title}),(0,oe.jsx)(ml,{name:e,variation:t}),k&&(0,oe.jsx)("div",{className:"edit-site-global-styles-screen-variations",children:(0,oe.jsxs)(y.__experimentalVStack,{spacing:3,children:[(0,oe.jsx)(gl,{children:(0,b.__)("Style Variations")}),(0,oe.jsx)(nl,{name:e})]})}),x&&(0,oe.jsx)(Ol,{inheritedValue:r,value:i,onChange:a,settings:h}),g&&(0,oe.jsx)(Il,{inheritedValue:r,value:i,onChange:a,settings:h,defaultValues:vl}),v&&(0,oe.jsx)(Al,{inheritedValue:r,value:i,onChange:a,settings:h}),S&&(0,oe.jsx)(Nl,{inheritedValue:I,value:T,onChange:e=>{const t={...e};delete t.layout,a(t),e.layout!==c.layout&&p({...c,layout:e.layout})},settings:h,includeLayoutControls:!0}),w&&(0,oe.jsx)(Tl,{inheritedValue:r,value:i,onChange:e=>{if(!e?.border)return void a(e);const{radius:t,...s}=e.border,n=function(e){return e?(0,y.__experimentalHasSplitBorders)(e)?{top:xl(e.top),right:xl(e.right),bottom:xl(e.bottom),left:xl(e.left)}:xl(e):e}(s),i=(0,y.__experimentalHasSplitBorders)(n)?{color:null,style:null,width:null,...n}:{top:n,right:n,bottom:n,left:n};a({...e,border:{...i,radius:t}})},settings:h}),j&&(0,oe.jsx)(Ml,{inheritedValue:I,value:T,onChange:a,settings:h,includeLayoutControls:!0}),C&&(0,oe.jsx)(Vl,{onChange:e=>{p(void 0===e?{...u,lightbox:void 0}:{...u,lightbox:{...u.lightbox,...e}})},value:c,inheritedValue:h}),E&&(0,oe.jsxs)(y.PanelBody,{title:(0,b.__)("Advanced"),initialOpen:!1,children:[(0,oe.jsx)("p",{children:(0,b.sprintf)((0,b.__)("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."),f?.title)}),(0,oe.jsx)(Fl,{value:i,onChange:a,inheritedValue:r})]})]})},{useGlobalStyle:Bl}=te(x.privateApis);function Dl({parentMenu:e,element:t,label:s}){var n;const i="text"!==t&&t?`elements.${t}.`:"",r="link"===t?{textDecoration:"underline"}:{},[o]=Bl(i+"typography.fontFamily"),[a]=Bl(i+"typography.fontStyle"),[l]=Bl(i+"typography.fontWeight"),[c]=Bl(i+"color.background"),[u]=Bl("color.background"),[d]=Bl(i+"color.gradient"),[p]=Bl(i+"color.text"),h=(0,b.sprintf)((0,b.__)("Typography %s styles"),s);return(0,oe.jsx)(wa,{path:e+"/typography/"+t,"aria-label":h,children:(0,oe.jsxs)(y.__experimentalHStack,{justify:"flex-start",children:[(0,oe.jsx)(y.FlexItem,{className:"edit-site-global-styles-screen-typography__indicator",style:{fontFamily:null!=o?o:"serif",background:null!==(n=null!=d?d:c)&&void 0!==n?n:u,color:p,fontStyle:a,fontWeight:l,...r},children:(0,b.__)("Aa")}),(0,oe.jsx)(y.FlexItem,{children:s})]})})}const zl=function(){return(0,oe.jsxs)(y.__experimentalVStack,{spacing:3,children:[(0,oe.jsx)(gl,{level:3,children:(0,b.__)("Elements")}),(0,oe.jsxs)(y.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:[(0,oe.jsx)(Dl,{parentMenu:"",element:"text",label:(0,b.__)("Text")}),(0,oe.jsx)(Dl,{parentMenu:"",element:"link",label:(0,b.__)("Links")}),(0,oe.jsx)(Dl,{parentMenu:"",element:"heading",label:(0,b.__)("Headings")}),(0,oe.jsx)(Dl,{parentMenu:"",element:"caption",label:(0,b.__)("Captions")}),(0,oe.jsx)(Dl,{parentMenu:"",element:"button",label:(0,b.__)("Buttons")})]})]})},Ll=({variation:e,isFocused:t,withHoverView:s})=>(0,oe.jsx)(qa,{label:e.title,isFocused:t,withHoverView:s,children:({ratio:t,key:s})=>(0,oe.jsx)(y.__experimentalHStack,{spacing:10*t,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,oe.jsx)(La,{variation:e,fontSize:85*t})},s)}),{GlobalStylesContext:Gl,areGlobalStyleConfigsEqual:Hl}=te(x.privateApis),{mergeBaseAndUserConfigs:Ul}=te(h.privateApis);function Wl(e,t){if(!t?.length)return e;if("object"!=typeof e||!e||!Object.keys(e).length)return e;for(const s in e)t.includes(s)?delete e[s]:"object"==typeof e[s]&&Wl(e[s],t);return e}function ql({title:e,settings:t,styles:s}){return e===(0,b.__)("Default")||Object.keys(t).length>0||Object.keys(s).length>0}function Zl(e=[]){const{variationsFromTheme:t}=(0,l.useSelect)((e=>({variationsFromTheme:e(_.store).__experimentalGetCurrentThemeGlobalStylesVariations()||[]})),[]),{user:s}=(0,d.useContext)(Gl),n=e.toString();return(0,d.useMemo)((()=>{const n=Wl(structuredClone(s),e);n.title=(0,b.__)("Default");const i=t.filter((t=>Yl(t,e))).map((e=>Ul(n,e))),r=[n,...i];return r?.length?r.filter(ql):[]}),[n,s,t])}const Kl=(e,t)=>{if(!e||!t?.length)return{};const s={};return Object.keys(e).forEach((n=>{if(t.includes(n))s[n]=e[n];else if("object"==typeof e[n]){const i=Kl(e[n],t);Object.keys(i).length&&(s[n]=i)}})),s};function Yl(e,t){const s=Kl(structuredClone(e),t);return Hl(s,e)}const{mergeBaseAndUserConfigs:Xl}=te(h.privateApis),{GlobalStylesContext:Jl,areGlobalStyleConfigsEqual:Ql}=te(x.privateApis);function $l({variation:e,children:t,isPill:s,properties:n,showTooltip:i}){const[r,o]=(0,d.useState)(!1),{base:a,user:l,setUserConfig:c}=(0,d.useContext)(Jl),u=(0,d.useMemo)((()=>{let t=Xl(a,e);return n&&(t=Kl(t,n)),{user:e,base:a,merged:t,setUserConfig:()=>{}}}),[e,a,n]),p=()=>c(e),h=(0,d.useMemo)((()=>Ql(l,e)),[l,e]);let f=e?.title;e?.description&&(f=(0,b.sprintf)((0,b.__)("%1$s (%2$s)"),e?.title,e?.description));const m=(0,oe.jsx)("div",{className:Ut("edit-site-global-styles-variations_item",{"is-active":h}),role:"button",onClick:p,onKeyDown:e=>{e.keyCode===es.ENTER&&(e.preventDefault(),p())},tabIndex:"0","aria-label":f,"aria-current":h,onFocus:()=>o(!0),onBlur:()=>o(!1),children:(0,oe.jsx)("div",{className:Ut("edit-site-global-styles-variations_item-preview",{"is-pill":s}),children:t(r)})});return(0,oe.jsx)(Jl.Provider,{value:u,children:i?(0,oe.jsx)(y.Tooltip,{text:e?.title,children:m}):m})}function ec({title:e,gap:t=2}){const s=["typography"],n=Zl(s);return n?.length<=1?null:(0,oe.jsxs)(y.__experimentalVStack,{spacing:3,children:[e&&(0,oe.jsx)(gl,{level:3,children:e}),(0,oe.jsx)(y.__experimentalGrid,{columns:3,gap:t,className:"edit-site-global-styles-style-variations-container",children:n.map(((e,t)=>(0,oe.jsx)($l,{variation:e,properties:s,showTooltip:!0,children:()=>(0,oe.jsx)(Ll,{variation:e})},t)))})]})}const tc=function(){return(0,oe.jsxs)(y.__experimentalVStack,{spacing:2,children:[(0,oe.jsx)(y.__experimentalHStack,{justify:"space-between",children:(0,oe.jsx)(gl,{level:3,children:(0,b.__)("Font Sizes")})}),(0,oe.jsx)(y.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,oe.jsx)(wa,{path:"/typography/font-sizes/","aria-label":(0,b.__)("Edit font size presets"),children:(0,oe.jsxs)(y.__experimentalHStack,{direction:"row",children:[(0,oe.jsx)(y.FlexItem,{children:(0,b.__)("Font size presets")}),(0,oe.jsx)(Zo,{icon:(0,b.isRTL)()?va:xa})]})})})]})},sc="/wp/v2/font-families",nc="/wp/v2/font-collections";async function ic(e){const t={path:sc,method:"POST",body:e},s=await ro()(t);return{id:s.id,...s.font_family_settings,fontFace:[]}}async function rc(e,t){const s={path:`${sc}/${e}/font-faces`,method:"POST",body:t},n=await ro()(s);return{id:n.id,...n.font_face_settings}}async function oc(e){const t={path:`${sc}?slug=${e}&_embed=true`,method:"GET"},s=await ro()(t);if(!s||0===s.length)return null;const n=s[0];return{id:n.id,...n.font_family_settings,fontFace:n?._embedded?.font_faces.map((e=>e.font_face_settings))||[]}}async function ac(e){const t={path:`${sc}/${e}?force=true`,method:"DELETE"};return await ro()(t)}const lc=["otf","ttf","woff","woff2"],cc={100:(0,b._x)("Thin","font weight"),200:(0,b._x)("Extra-light","font weight"),300:(0,b._x)("Light","font weight"),400:(0,b._x)("Normal","font weight"),500:(0,b._x)("Medium","font weight"),600:(0,b._x)("Semi-bold","font weight"),700:(0,b._x)("Bold","font weight"),800:(0,b._x)("Extra-bold","font weight"),900:(0,b._x)("Black","font weight")},uc={normal:(0,b._x)("Normal","font style"),italic:(0,b._x)("Italic","font style")},{File:dc}=window,{kebabCase:pc}=te(y.privateApis);function hc(e,t={}){return e.name||!e.fontFamily&&!e.slug||(e.name=e.fontFamily||e.slug),{...e,...t}}function fc(e){return`${cc[e.fontWeight]||e.fontWeight} ${"normal"===e.fontStyle?"":uc[e.fontStyle]||e.fontStyle}`}function mc(e=[],t=[]){const s=new Map;for(const t of e)s.set(`${t.fontWeight}${t.fontStyle}`,t);for(const e of t)s.set(`${e.fontWeight}${e.fontStyle}`,e);return Array.from(s.values())}function gc(e=[],t=[]){const s=new Map;for(const t of e)s.set(t.slug,{...t});for(const e of t)if(s.has(e.slug)){const{fontFace:t,...n}=e,i=mc(s.get(e.slug).fontFace,t);s.set(e.slug,{...n,fontFace:i})}else s.set(e.slug,{...e});return Array.from(s.values())}async function vc(e,t,s="all"){let n;if("string"==typeof t)n=`url(${t})`;else{if(!(t instanceof dc))return;n=await t.arrayBuffer()}const i=new window.FontFace(Ma(e.fontFamily),n,{style:e.fontStyle,weight:e.fontWeight}),r=await i.load();if("document"!==s&&"all"!==s||document.fonts.add(r),"iframe"===s||"all"===s){document.querySelector('iframe[name="editor-canvas"]').contentDocument.fonts.add(r)}}function xc(e,t="all"){const s=t=>{t.forEach((s=>{s.family===Ma(e?.fontFamily)&&s.weight===e?.fontWeight&&s.style===e?.fontStyle&&t.delete(s)}))};if("document"!==t&&"all"!==t||s(document.fonts),"iframe"===t||"all"===t){s(document.querySelector('iframe[name="editor-canvas"]').contentDocument.fonts)}}function yc(e){if(!e)return;let t;var s;return t=Array.isArray(e)?e[0]:e,t.startsWith("file:.")?void 0:(("string"!=typeof(s=t)||s===decodeURIComponent(s))&&(t=encodeURI(t)),t)}function bc(e){const t=new FormData,{fontFace:s,category:n,...i}=e,r={...i,slug:pc(e.slug)};return t.append("font_family_settings",JSON.stringify(r)),t}function wc(e){if(e?.fontFace){const t=e.fontFace.map(((e,t)=>{const s={...e},n=new FormData;if(s.file){const e=Array.isArray(s.file)?s.file:[s.file],i=[];e.forEach(((e,s)=>{const r=`file-${t}-${s}`;n.append(r,e,e.name),i.push(r)})),s.src=1===i.length?i[0]:i,delete s.file,n.append("font_face_settings",JSON.stringify(s))}else n.append("font_face_settings",JSON.stringify(s));return n}));return t}}async function _c(e,t){const s=[];for(const n of t)try{const t=await rc(e,n);s.push({status:"fulfilled",value:t})}catch(e){s.push({status:"rejected",reason:e})}const n={errors:[],successes:[]};return s.forEach(((e,s)=>{if("fulfilled"===e.status){const i=e.value;i.id?n.successes.push(i):n.errors.push({data:t[s],message:`Error: ${i.message}`})}else n.errors.push({data:t[s],message:e.reason.message})})),n}function Sc(e,t){return-1!==t.findIndex((t=>t.fontWeight===e.fontWeight&&t.fontStyle===e.fontStyle))}function jc(e,t,s){const n=t=>t.slug===e.slug,i=s.find(n);return t?(i=>{const r=e=>e.fontWeight===t.fontWeight&&e.fontStyle===t.fontStyle;if(!i)return[...s,{...e,fontFace:[t]}];let o=i.fontFace||[];return o=o.find(r)?o.filter((e=>!r(e))):[...o,t],0===o.length?s.filter((e=>!n(e))):s.map((e=>n(e)?{...e,fontFace:o}:e))})(i):(t=>t?s.filter((e=>!n(e))):[...s,e])(i)}const{useGlobalSetting:Cc}=te(x.privateApis),kc=(0,d.createContext)({});const Ec=function({children:e}){const{saveEntityRecord:t}=(0,l.useDispatch)(_.store),{globalStylesId:s}=(0,l.useSelect)((e=>{const{__experimentalGetCurrentGlobalStylesId:t}=e(_.store);return{globalStylesId:t()}})),n=(0,_.useEntityRecord)("root","globalStyles",s),[i,r]=(0,d.useState)(!1),[o,a]=(0,d.useState)(0),c=()=>{a(Date.now())},{records:u=[],isResolving:p}=(0,_.useEntityRecords)("postType","wp_font_family",{refreshKey:o,_embed:!0}),h=(u||[]).map((e=>({id:e.id,...e.font_family_settings,fontFace:e?._embedded?.font_faces.map((e=>e.font_face_settings))||[]})))||[],[f,m]=Cc("typography.fontFamilies"),g=async e=>{const s=n.record;re(s,["settings","typography","fontFamilies"],e),await t("root","globalStyles",s)},[v,x]=(0,d.useState)(!1),[y,w]=(0,d.useState)(null),S=f?.theme?f.theme.map((e=>hc(e,{source:"theme"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],j=f?.custom?f.custom.map((e=>hc(e,{source:"custom"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],C=h?h.map((e=>hc(e,{source:"custom"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[];(0,d.useEffect)((()=>{v||w(null)}),[v]);const[k]=(0,d.useState)(new Set),E=e=>e.reduce(((e,t)=>{const s=t?.fontFace&&t.fontFace?.length>0?t?.fontFace.map((e=>`${e.fontStyle+e.fontWeight}`)):["normal400"];return e[t.slug]=s,e}),{}),P=e=>E("theme"===e?S:j),I=(e,t,s,n)=>t||s?!!P(n)[e]?.includes(t+s):!!P(n)[e],T=e=>{var t;const s=(null!==(t=f?.[e.source])&&void 0!==t?t:[]).filter((t=>t.slug!==e.slug)),n={...f,[e.source]:s};return m(n),e.fontFace&&e.fontFace.forEach((e=>{xc(e,"all")})),n},O=e=>{const t=A(e),s={...f,custom:gc(f?.custom,t)};return m(s),N(t),s},A=e=>e.map((({id:e,fontFace:t,...s})=>({...s,...t&&t.length>0?{fontFace:t.map((({id:e,...t})=>t))}:{}}))),N=e=>{e.forEach((e=>{e.fontFace&&e.fontFace.forEach((e=>{vc(e,yc(e.src),"all")}))}))},[M,V]=(0,d.useState)([]),F=async()=>{const e=await async function(){const e={path:`${nc}?_fields=slug,name,description`,method:"GET"};return await ro()(e)}();V(e)};return(0,d.useEffect)((()=>{F()}),[]),(0,oe.jsx)(kc.Provider,{value:{libraryFontSelected:y,handleSetLibraryFontSelected:e=>{if(!e)return void w(null);const t=("theme"===e.source?S:C).find((t=>t.slug===e.slug));w({...t||e,source:e.source})},fontFamilies:f,baseCustomFonts:C,isFontActivated:I,getFontFacesActivated:(e,t)=>P(t)[e]||[],loadFontFaceAsset:async e=>{if(!e.src)return;const t=yc(e.src);t&&!k.has(t)&&(vc(e,t,"document"),k.add(t))},installFonts:async function(e){r(!0);try{const t=[];let s=[];for(const n of e){let e=!1,i=await oc(n.slug);i||(e=!0,i=await ic(bc(n)));const r=i.fontFace&&n.fontFace?i.fontFace.filter((e=>Sc(e,n.fontFace))):[];i.fontFace&&n.fontFace&&(n.fontFace=n.fontFace.filter((e=>!Sc(e,i.fontFace))));let o=[],a=[];if(n?.fontFace?.length>0){const e=await _c(i.id,wc(n));o=e?.successes,a=e?.errors}(o?.length>0||r?.length>0)&&(i.fontFace=[...o],t.push(i)),i&&!n?.fontFace?.length&&t.push(i),e&&n?.fontFace?.length>0&&0===o?.length&&await ac(i.id),s=s.concat(a)}if(s=s.reduce(((e,t)=>e.includes(t.message)?e:[...e,t.message]),[]),t.length>0){const e=O(t);await g(e),c()}if(s.length>0){const e=new Error((0,b.__)("There was an error installing fonts."));throw e.installationErrors=s,e}}finally{r(!1)}},uninstallFontFamily:async function(e){try{const t=await ac(e.id);if(t.deleted){const t=T(e);await g(t)}return c(),t}catch(e){throw console.error("There was an error uninstalling the font family:",e),e}},toggleActivateFont:(e,t)=>{var s;const n=jc(e,t,null!==(s=f?.[e.source])&&void 0!==s?s:[]);m({...f,[e.source]:n});I(e.slug,t?.fontStyle,t?.fontWeight,e.source)?xc(t,"all"):vc(t,yc(t?.src),"all")},getAvailableFontsOutline:E,modalTabOpen:v,setModalTabOpen:x,refreshLibrary:c,saveFontFamilies:g,isResolvingLibrary:p,isInstalling:i,collections:M,getFontCollection:async e=>{try{if(!!M.find((t=>t.slug===e))?.font_families)return;const t=await async function(e){const t={path:`${nc}/${e}`,method:"GET"};return await ro()(t)}(e),s=M.map((s=>s.slug===e?{...s,...t}:s));V(s)}catch(e){throw console.error(e),e}}},children:e})};const Pc=function({font:e,text:t}){const s=(0,d.useRef)(null),n=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=Va(e);t=t||e.name;const r=e.preview,[o,a]=(0,d.useState)(!1),[l,c]=(0,d.useState)(!1),{loadFontFaceAsset:u}=(0,d.useContext)(kc),p=null!=r?r:function(e){return e.preview?e.preview:e.src?Array.isArray(e.src)?e.src[0]:e.src:void 0}(n),h=p&&p.match(/\.(png|jpg|jpeg|gif|svg)$/i);var f;const m={fontSize:"18px",lineHeight:1,opacity:l?"1":"0",...i,...{fontFamily:Na((f=n).fontFamily),fontStyle:f.fontStyle||"normal",fontWeight:f.fontWeight||"400"}};return(0,d.useEffect)((()=>{const e=new window.IntersectionObserver((([e])=>{a(e.isIntersecting)}),{});return e.observe(s.current),()=>e.disconnect()}),[s]),(0,d.useEffect)((()=>{(async()=>{o&&(!h&&n.src&&await u(n),c(!0))})()}),[n,o,u,h]),(0,oe.jsx)("div",{ref:s,children:h?(0,oe.jsx)("img",{src:p,loading:"lazy",alt:t,className:"font-library-modal__font-variant_demo-image"}):(0,oe.jsx)(y.__experimentalText,{style:m,className:"font-library-modal__font-variant_demo-text",children:t})})};const Ic=function({font:e,onClick:t,variantsText:s,navigatorPath:n}){const i=e.fontFace?.length||1,r={cursor:t?"pointer":"default"},o=(0,y.__experimentalUseNavigator)();return(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,onClick:()=>{t(),n&&o.goTo(n)},style:r,className:"font-library-modal__font-card",children:(0,oe.jsxs)(y.Flex,{justify:"space-between",wrap:!1,children:[(0,oe.jsx)(Pc,{font:e}),(0,oe.jsxs)(y.Flex,{justify:"flex-end",children:[(0,oe.jsx)(y.FlexItem,{children:(0,oe.jsx)(y.__experimentalText,{className:"font-library-modal__font-card__count",children:s||(0,b.sprintf)((0,b._n)("%d variant","%d variants",i),i)})}),(0,oe.jsx)(y.FlexItem,{children:(0,oe.jsx)(y.Icon,{icon:(0,b.isRTL)()?va:xa})})]})]})})},{kebabCase:Tc}=te(y.privateApis);const Oc=function({face:e,font:t}){const{isFontActivated:s,toggleActivateFont:n}=(0,d.useContext)(kc),i=t?.fontFace?.length>0?s(t.slug,e.fontStyle,e.fontWeight,t.source):s(t.slug,null,null,t.source),r=()=>{t?.fontFace?.length>0?n(t,e):n(t)},o=t.name+" "+fc(e),a=Tc(`${t.slug}-${fc(e)}`);return(0,oe.jsx)("div",{className:"font-library-modal__font-card",children:(0,oe.jsxs)(y.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,oe.jsx)(y.CheckboxControl,{checked:i,onChange:r,__nextHasNoMarginBottom:!0,id:a}),(0,oe.jsx)("label",{htmlFor:a,children:(0,oe.jsx)(Pc,{font:e,text:o,onClick:r})})]})})};function Ac(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 Nc(e){return e.sort(((e,t)=>"normal"===e.fontStyle&&"normal"!==t.fontStyle?-1:"normal"===t.fontStyle&&"normal"!==e.fontStyle?1:e.fontStyle===t.fontStyle?Ac(e.fontWeight)-Ac(t.fontWeight):e.fontStyle.localeCompare(t.fontStyle)))}const{useGlobalSetting:Mc}=te(x.privateApis);function Vc({font:e,isOpen:t,setIsOpen:s,setNotice:n,uninstallFontFamily:i,handleSetLibraryFontSelected:r}){const o=(0,y.__experimentalUseNavigator)();return(0,oe.jsx)(y.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,b.__)("Cancel"),confirmButtonText:(0,b.__)("Delete"),onCancel:()=>{s(!1)},onConfirm:async()=>{n(null),s(!1);try{await i(e),o.goBack(),r(null),n({type:"success",message:(0,b.__)("Font family uninstalled successfully.")})}catch(e){n({type:"error",message:(0,b.__)("There was an error uninstalling the font family.")+e.message})}},size:"medium",children:e&&(0,b.sprintf)((0,b.__)('Are you sure you want to delete "%s" font and all its variants and assets?'),e.name)})}const Fc=function(){var e;const{baseCustomFonts:t,libraryFontSelected:s,handleSetLibraryFontSelected:n,refreshLibrary:i,uninstallFontFamily:r,isResolvingLibrary:o,isInstalling:a,saveFontFamilies:c,getFontFacesActivated:u}=(0,d.useContext)(kc),[p,h]=Mc("typography.fontFamilies"),[f,m]=(0,d.useState)(!1),[g,v]=(0,d.useState)(!1),[x]=Mc("typography.fontFamilies",void 0,"base"),w=(0,l.useSelect)((e=>{const{__experimentalGetCurrentGlobalStylesId:t}=e(_.store);return t()})),S=(0,_.useEntityRecord)("root","globalStyles",w),j=!!S?.edits?.settings?.typography?.fontFamilies,C=p?.theme?p.theme.map((e=>hc(e,{source:"theme"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],k=new Set(C.map((e=>e.slug))),E=x?.theme?C.concat(x.theme.filter((e=>!k.has(e.slug))).map((e=>hc(e,{source:"theme"}))).sort(((e,t)=>e.name.localeCompare(t.name)))):[],P="custom"===s?.source&&s?.id,I=(0,l.useSelect)((e=>{const{canUser:t}=e(_.store);return P&&t("delete",{kind:"postType",name:"wp_font_family",id:P})}),[P]),T=!!s&&"theme"!==s?.source&&I,O=e=>{const t=e?.fontFace?.length>0?e.fontFace.length:1,s=u(e.slug,e.source).length;return(0,b.sprintf)((0,b.__)("%1$s/%2$s variants active"),s,t)};(0,d.useEffect)((()=>{n(s),i()}),[]);const A=s?u(s.slug,s.source).length:0,N=null!==(e=s?.fontFace?.length)&&void 0!==e?e:s?.fontFamily?1:0,M=A>0&&A!==N,V=A===N,F=E.length>0||t.length>0;return(0,oe.jsxs)("div",{className:"font-library-modal__tabpanel-layout",children:[o&&(0,oe.jsx)("div",{className:"font-library-modal__loading",children:(0,oe.jsx)(y.ProgressBar,{})}),!o&&(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsxs)(y.__experimentalNavigatorProvider,{initialPath:s?"/fontFamily":"/",children:[(0,oe.jsx)(y.__experimentalNavigatorScreen,{path:"/",children:(0,oe.jsxs)(y.__experimentalVStack,{spacing:"8",children:[g&&(0,oe.jsx)(y.Notice,{status:g.type,onRemove:()=>v(null),children:g.message}),!F&&(0,oe.jsx)(y.__experimentalText,{as:"p",children:(0,b.__)("No fonts installed.")}),E.length>0&&(0,oe.jsxs)(y.__experimentalVStack,{children:[(0,oe.jsx)("h2",{className:"font-library-modal__fonts-title",children:(0,b._x)("Theme","font source")}),(0,oe.jsx)("ul",{role:"list",className:"font-library-modal__fonts-list",children:E.map((e=>(0,oe.jsx)("li",{className:"font-library-modal__fonts-list-item",children:(0,oe.jsx)(Ic,{font:e,navigatorPath:"/fontFamily",variantsText:O(e),onClick:()=>{v(null),n(e)}})},e.slug)))})]}),t.length>0&&(0,oe.jsxs)(y.__experimentalVStack,{children:[(0,oe.jsx)("h2",{className:"font-library-modal__fonts-title",children:(0,b._x)("Custom","font source")}),(0,oe.jsx)("ul",{role:"list",className:"font-library-modal__fonts-list",children:t.map((e=>(0,oe.jsx)("li",{className:"font-library-modal__fonts-list-item",children:(0,oe.jsx)(Ic,{font:e,navigatorPath:"/fontFamily",variantsText:O(e),onClick:()=>{v(null),n(e)}})},e.slug)))})]})]})}),(0,oe.jsxs)(y.__experimentalNavigatorScreen,{path:"/fontFamily",children:[(0,oe.jsx)(Vc,{font:s,isOpen:f,setIsOpen:m,setNotice:v,uninstallFontFamily:r,handleSetLibraryFontSelected:n}),(0,oe.jsxs)(y.Flex,{justify:"flex-start",children:[(0,oe.jsx)(y.__experimentalNavigatorBackButton,{icon:(0,b.isRTL)()?xa:va,size:"small",onClick:()=>{n(null),v(null)},label:(0,b.__)("Back")}),(0,oe.jsx)(y.__experimentalHeading,{level:2,size:13,className:"edit-site-global-styles-header",children:s?.name})]}),g&&(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(y.__experimentalSpacer,{margin:1}),(0,oe.jsx)(y.Notice,{status:g.type,onRemove:()=>v(null),children:g.message}),(0,oe.jsx)(y.__experimentalSpacer,{margin:1})]}),(0,oe.jsx)(y.__experimentalSpacer,{margin:4}),(0,oe.jsx)(y.__experimentalText,{children:(0,b.__)("Choose font variants. Keep in mind that too many variants could make your site slower.")}),(0,oe.jsx)(y.__experimentalSpacer,{margin:4}),(0,oe.jsxs)(y.__experimentalVStack,{spacing:0,children:[(0,oe.jsx)(y.CheckboxControl,{className:"font-library-modal__select-all",label:(0,b.__)("Select all"),checked:V,onChange:()=>{var e;const t=null!==(e=p?.[s.source]?.filter((e=>e.slug!==s.slug)))&&void 0!==e?e:[],n=V?t:[...t,s];h({...p,[s.source]:n}),s.fontFace&&s.fontFace.forEach((e=>{V?xc(e,"all"):vc(e,yc(e?.src),"all")}))},indeterminate:M,__nextHasNoMarginBottom:!0}),(0,oe.jsx)(y.__experimentalSpacer,{margin:8}),(0,oe.jsx)("ul",{role:"list",className:"font-library-modal__fonts-list",children:(e=>e?e.fontFace&&e.fontFace.length?Nc(e.fontFace):[{fontFamily:e.fontFamily,fontStyle:"normal",fontWeight:"400"}]:[])(s).map(((e,t)=>(0,oe.jsx)("li",{className:"font-library-modal__fonts-list-item",children:(0,oe.jsx)(Oc,{font:s,face:e},`face${t}`)},`face${t}`)))})]})]})]}),(0,oe.jsxs)(y.__experimentalHStack,{justify:"flex-end",className:"font-library-modal__footer",children:[a&&(0,oe.jsx)(y.ProgressBar,{}),T&&(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,isDestructive:!0,variant:"tertiary",onClick:()=>{m(!0)},children:(0,b.__)("Delete")}),(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{v(null);try{await c(p),v({type:"success",message:(0,b.__)("Font family updated successfully.")})}catch(e){v({type:"error",message:(0,b.sprintf)((0,b.__)("There was an error updating the font family. %s"),e.message)})}},disabled:!j,accessibleWhenDisabled:!0,children:(0,b.__)("Update")})]})]})]})};function Rc(e,t,s){return t?!!s[e]?.[`${t.fontStyle}-${t.fontWeight}`]:!!s[e]}const Bc=function(){return(0,oe.jsx)("div",{className:"font-library__google-fonts-confirm",children:(0,oe.jsx)(y.Card,{children:(0,oe.jsxs)(y.CardBody,{children:[(0,oe.jsx)(y.__experimentalHeading,{level:2,children:(0,b.__)("Connect to Google Fonts")}),(0,oe.jsx)(y.__experimentalSpacer,{margin:6}),(0,oe.jsx)(y.__experimentalText,{as:"p",children:(0,b.__)("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,oe.jsx)(y.__experimentalSpacer,{margin:3}),(0,oe.jsx)(y.__experimentalText,{as:"p",children:(0,b.__)("You can alternatively upload files directly on the Upload tab.")}),(0,oe.jsx)(y.__experimentalSpacer,{margin:6}),(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:()=>{window.localStorage.setItem("wp-font-library-google-fonts-permission","true"),window.dispatchEvent(new Event("storage"))},children:(0,b.__)("Allow access to Google Fonts")})]})})})},{kebabCase:Dc}=te(y.privateApis);const zc=function({face:e,font:t,handleToggleVariant:s,selected:n}){const i=()=>{t?.fontFace?s(t,e):s(t)},r=t.name+" "+fc(e),o=Dc(`${t.slug}-${fc(e)}`);return(0,oe.jsx)("div",{className:"font-library-modal__font-card",children:(0,oe.jsxs)(y.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,oe.jsx)(y.CheckboxControl,{checked:n,onChange:i,__nextHasNoMarginBottom:!0,id:o}),(0,oe.jsx)("label",{htmlFor:o,children:(0,oe.jsx)(Pc,{font:e,text:r,onClick:i})})]})})},Lc={slug:"all",name:(0,b._x)("All","font categories")},Gc="wp-font-library-google-fonts-permission";const Hc=function({slug:e}){var t;const s="google-fonts"===e,n=()=>"true"===window.localStorage.getItem(Gc),[i,r]=(0,d.useState)(null),[o,a]=(0,d.useState)(!1),[l,c]=(0,d.useState)([]),[u,p]=(0,d.useState)(1),[h,f]=(0,d.useState)({}),[m,g]=(0,d.useState)(s&&!n()),{collections:x,getFontCollection:w,installFonts:_,isInstalling:S}=(0,d.useContext)(kc),j=x.find((t=>t.slug===e));(0,d.useEffect)((()=>{const e=()=>{g(s&&!n())};return e(),window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[e,s]);const C=()=>{window.localStorage.setItem(Gc,"false"),window.dispatchEvent(new Event("storage"))};(0,d.useEffect)((()=>{(async()=>{try{await w(e),B()}catch(e){o||a({type:"error",message:e?.message})}})()}),[e,w,a,o]),(0,d.useEffect)((()=>{r(null)}),[e]),(0,d.useEffect)((()=>{c([])}),[i]);const k=(0,d.useMemo)((()=>{var e;return null!==(e=j?.font_families)&&void 0!==e?e:[]}),[j]),E=null!==(t=j?.categories)&&void 0!==t?t:[],P=[Lc,...E],I=(0,d.useMemo)((()=>function(e,t){const{category:s,search:n}=t;let i=e||[];return s&&"all"!==s&&(i=i.filter((e=>-1!==e.categories.indexOf(s)))),n&&(i=i.filter((e=>e.font_family_settings.name.toLowerCase().includes(n.toLowerCase())))),i}(k,h)),[k,h]),T=!j?.font_families&&!o,O=Math.max(window.innerHeight,500),A=Math.floor((O-417)/61),N=Math.ceil(I.length/A),M=(u-1)*A,V=u*A,F=I.slice(M,V),R=(0,v.debounce)((e=>{f({...h,search:e}),p(1)}),300),B=()=>{f({}),p(1)},D=(e,t)=>{const s=jc(e,t,l);c(s)},z=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,G=L>0&&L!==i?.fontFace?.length,H=L===i?.fontFace?.length;if(m)return(0,oe.jsx)(Bc,{});const U=()=>"google-fonts"!==e||m||i?null:(0,oe.jsx)(y.DropdownMenu,{icon:ga,label:(0,b.__)("Actions"),popoverProps:{position:"bottom left"},controls:[{title:(0,b.__)("Revoke access to Google Fonts"),onClick:C}]});return(0,oe.jsxs)("div",{className:"font-library-modal__tabpanel-layout",children:[T&&(0,oe.jsx)("div",{className:"font-library-modal__loading",children:(0,oe.jsx)(y.ProgressBar,{})}),!T&&(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsxs)(y.__experimentalNavigatorProvider,{initialPath:"/",className:"font-library-modal__tabpanel-layout",children:[(0,oe.jsxs)(y.__experimentalNavigatorScreen,{path:"/",children:[(0,oe.jsxs)(y.__experimentalHStack,{justify:"space-between",children:[(0,oe.jsxs)(y.__experimentalVStack,{children:[(0,oe.jsx)(y.__experimentalHeading,{level:2,size:13,children:j.name}),(0,oe.jsx)(y.__experimentalText,{children:j.description})]}),(0,oe.jsx)(U,{})]}),(0,oe.jsx)(y.__experimentalSpacer,{margin:4}),(0,oe.jsxs)(y.Flex,{children:[(0,oe.jsx)(y.FlexItem,{children:(0,oe.jsx)(y.SearchControl,{className:"font-library-modal__search",value:h.search,placeholder:(0,b.__)("Font name…"),label:(0,b.__)("Search"),onChange:R,__nextHasNoMarginBottom:!0,hideLabelFromVision:!1})}),(0,oe.jsx)(y.FlexItem,{children:(0,oe.jsx)(y.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,b.__)("Category"),value:h.category,onChange:e=>{f({...h,category:e}),p(1)},children:P&&P.map((e=>(0,oe.jsx)("option",{value:e.slug,children:e.name},e.slug)))})})]}),(0,oe.jsx)(y.__experimentalSpacer,{margin:4}),!!j?.font_families?.length&&!I.length&&(0,oe.jsx)(y.__experimentalText,{children:(0,b.__)("No fonts found. Try with a different search term")}),(0,oe.jsx)("div",{className:"font-library-modal__fonts-grid__main",children:(0,oe.jsx)("ul",{role:"list",className:"font-library-modal__fonts-list",children:F.map((e=>(0,oe.jsx)("li",{className:"font-library-modal__fonts-list-item",children:(0,oe.jsx)(Ic,{font:e.font_family_settings,navigatorPath:"/fontFamily",onClick:()=>{r(e.font_family_settings)}})},e.font_family_settings.slug)))})})]}),(0,oe.jsxs)(y.__experimentalNavigatorScreen,{path:"/fontFamily",children:[(0,oe.jsxs)(y.Flex,{justify:"flex-start",children:[(0,oe.jsx)(y.__experimentalNavigatorBackButton,{icon:(0,b.isRTL)()?xa:va,size:"small",onClick:()=>{r(null),a(null)},label:(0,b.__)("Back")}),(0,oe.jsx)(y.__experimentalHeading,{level:2,size:13,className:"edit-site-global-styles-header",children:i?.name})]}),o&&(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(y.__experimentalSpacer,{margin:1}),(0,oe.jsx)(y.Notice,{status:o.type,onRemove:()=>a(null),children:o.message}),(0,oe.jsx)(y.__experimentalSpacer,{margin:1})]}),(0,oe.jsx)(y.__experimentalSpacer,{margin:4}),(0,oe.jsx)(y.__experimentalText,{children:(0,b.__)("Select font variants to install.")}),(0,oe.jsx)(y.__experimentalSpacer,{margin:4}),(0,oe.jsx)(y.CheckboxControl,{className:"font-library-modal__select-all",label:(0,b.__)("Select all"),checked:H,onChange:()=>{c(H?[]:[i])},indeterminate:G,__nextHasNoMarginBottom:!0}),(0,oe.jsx)(y.__experimentalVStack,{spacing:0,children:(0,oe.jsx)("ul",{role:"list",className:"font-library-modal__fonts-list",children:(W=i,W?W.fontFace&&W.fontFace.length?Nc(W.fontFace):[{fontFamily:W.fontFamily,fontStyle:"normal",fontWeight:"400"}]:[]).map(((e,t)=>(0,oe.jsx)("li",{className:"font-library-modal__fonts-list-item",children:(0,oe.jsx)(zc,{font:i,face:e,handleToggleVariant:D,selected:Rc(i.slug,i.fontFace?e:null,z)})},`face${t}`)))})}),(0,oe.jsx)(y.__experimentalSpacer,{margin:16})]})]}),i&&(0,oe.jsx)(y.Flex,{justify:"flex-end",className:"font-library-modal__footer",children:(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{a(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 s=e.split("/").pop();return new dc([t],s,{type:t.type})})))));return 1===t.length?t[0]:t}(e.src))})))}catch(e){return void a({type:"error",message:(0,b.__)("Error installing the fonts, could not be downloaded.")})}try{await _([e]),a({type:"success",message:(0,b.__)("Fonts were installed successfully.")})}catch(e){a({type:"error",message:e.message})}c([])},isBusy:S,disabled:0===l.length||S,accessibleWhenDisabled:!0,children:(0,b.__)("Install")})}),!i&&(0,oe.jsxs)(y.__experimentalHStack,{spacing:4,justify:"center",className:"font-library-modal__footer",children:[(0,oe.jsx)(y.Button,{label:(0,b.__)("Previous page"),size:"compact",onClick:()=>p(u-1),disabled:1===u,showTooltip:!0,accessibleWhenDisabled:!0,icon:(0,b.isRTL)()?xa:va,tooltipPosition:"top"}),(0,oe.jsx)(y.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:2,className:"font-library-modal__page-selection",children:(0,d.createInterpolateElement)((0,b.sprintf)((0,b._x)("Page <CurrentPageControl /> of %s","paging"),N),{CurrentPageControl:(0,oe.jsx)(y.SelectControl,{"aria-label":(0,b.__)("Current page"),value:u,options:[...Array(N)].map(((e,t)=>({label:t+1,value:t+1}))),onChange:e=>p(parseInt(e)),size:"compact",__nextHasNoMarginBottom:!0})})}),(0,oe.jsx)(y.Button,{label:(0,b.__)("Next page"),size:"compact",onClick:()=>p(u+1),disabled:u===N,accessibleWhenDisabled:!0,icon:(0,b.isRTL)()?va:xa,tooltipPosition:"top"})]})]})]});var W};var Uc=i(8572),Wc=i.n(Uc),qc=i(4660),Zc=i.n(qc);globalThis.fetch;class Kc{constructor(e,t={},s){this.type=e,this.detail=t,this.msg=s,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 Yc{constructor(){this.listeners={}}addEventListener(e,t,s){let n=this.listeners[e]||[];s?n.unshift(t):n.push(t),this.listeners[e]=n}removeEventListener(e,t){let s=this.listeners[e]||[],n=s.findIndex((e=>e===t));n>-1&&(s.splice(n,1),this.listeners[e]=s)}dispatch(e){let t=this.listeners[e.type];if(t)for(let s=0,n=t.length;s<n&&e.__mayPropagate;s++)t[s](e)}}const Xc=new Date("1904-01-01T00:00:00+0000").getTime();class Jc{constructor(e,t,s){this.name=(s||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(),s=parseInt(e.replace(/[^\d]/g,""))/8;Object.defineProperty(this,t,{get:()=>this.getValue(e,s)})}))}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 s=this.start+this.offset;this.offset+=t;try{return this.data[e](s)}catch(s){throw console.error("parser",e,t,this),console.error("parser",this.start,this.offset),s}}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(Xc+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,s=8,n=!1){if(0===(e=e||this.length))return[];t&&(this.currentPosition=t);const i=`${n?"":"u"}int${s}`,r=[];for(;e--;)r.push(this[i]);return r}}class Qc{constructor(e){const t={enumerable:!1,get:()=>e};Object.defineProperty(this,"parser",t);const s=e.currentPosition,n={enumerable:!1,get:()=>s};Object.defineProperty(this,"start",n)}load(e){Object.keys(e).forEach((t=>{let s=Object.getOwnPropertyDescriptor(e,t);s.get?this[t]=s.get.bind(this):void 0!==s.value&&(this[t]=s.value)})),this.parser.length&&this.parser.verifyLength()}}class $c extends Qc{constructor(e,t,s){const{parser:n,start:i}=super(new Jc(e,t,s)),r={enumerable:!1,get:()=>n};Object.defineProperty(this,"p",r);const o={enumerable:!1,get:()=>i};Object.defineProperty(this,"tableStart",o)}}function eu(e,t,s){let n;Object.defineProperty(e,t,{get:()=>n||(n=s(),n),enumerable:!0})}class tu extends $c{constructor(e,t,s){const{p:n}=super({offset:0,length:12},t,"sfnt");this.version=n.uint32,this.numTables=n.uint16,this.searchRange=n.uint16,this.entrySelector=n.uint16,this.rangeShift=n.uint16,n.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new su(n))),this.tables={},this.directory.forEach((e=>{eu(this.tables,e.tag.trim(),(()=>s(this.tables,{tag:e.tag,offset:e.offset,length:e.length},t)))}))}}class su{constructor(e){this.tag=e.tag,this.checksum=e.uint32,this.offset=e.uint32,this.length=e.uint32}}const nu=Zc().inflate||void 0;let iu;class ru extends $c{constructor(e,t,s){const{p:n}=super({offset:0,length:44},t,"woff");this.signature=n.tag,this.flavor=n.uint32,this.length=n.uint32,this.numTables=n.uint16,n.uint16,this.totalSfntSize=n.uint32,this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.metaOffset=n.uint32,this.metaLength=n.uint32,this.metaOrigLength=n.uint32,this.privOffset=n.uint32,this.privLength=n.uint32,n.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new ou(n))),au(this,t,s)}}class ou{constructor(e){this.tag=e.tag,this.offset=e.uint32,this.compLength=e.uint32,this.origLength=e.uint32,this.origChecksum=e.uint32}}function au(e,t,s){e.tables={},e.directory.forEach((n=>{eu(e.tables,n.tag.trim(),(()=>{let i=0,r=t;if(n.compLength!==n.origLength){const e=t.buffer.slice(n.offset,n.offset+n.compLength);let s;if(nu)s=nu(new Uint8Array(e));else{if(!iu){const e="no brotli decoder available to decode WOFF2 font";throw font.onerror&&font.onerror(e),new Error(e)}s=iu(new Uint8Array(e))}r=new DataView(s.buffer)}else i=n.offset;return s(e.tables,{tag:n.tag,offset:i,length:n.origLength},r)}))}))}const lu=Wc();let cu;class uu extends $c{constructor(e,t,s){const{p:n}=super({offset:0,length:48},t,"woff2");this.signature=n.tag,this.flavor=n.uint32,this.length=n.uint32,this.numTables=n.uint16,n.uint16,this.totalSfntSize=n.uint32,this.totalCompressedSize=n.uint32,this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.metaOffset=n.uint32,this.metaLength=n.uint32,this.metaOrigLength=n.uint32,this.privOffset=n.uint32,this.privLength=n.uint32,n.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new du(n)));let i,r=n.currentPosition;this.directory[0].offset=0,this.directory.forEach(((e,t)=>{let s=this.directory[t+1];s&&(s.offset=e.offset+(void 0!==e.transformLength?e.transformLength:e.origLength))}));let o=t.buffer.slice(r);if(lu)i=lu(new Uint8Array(o));else{if(!cu){const t="no brotli decoder available to decode WOFF2 font";throw e.onerror&&e.onerror(t),new Error(t)}i=new Uint8Array(cu(o))}!function(e,t,s){e.tables={},e.directory.forEach((n=>{eu(e.tables,n.tag.trim(),(()=>{const i=n.offset,r=i+(n.transformLength?n.transformLength:n.origLength),o=new DataView(t.slice(i,r).buffer);try{return s(e.tables,{tag:n.tag,offset:0,length:n.origLength},o)}catch(e){console.error(e)}}))}))}(this,i,s)}}class du{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 s=0!==(this.transformVersion=(192&this.flags)>>6);"glyf"!==this.tag&&"loca"!==this.tag||(s=3!==this.transformVersion),this.origLength=e.uint128,s&&(this.transformLength=e.uint128)}}const pu={};let hu=!1;function fu(e,t,s){let n=t.tag.replace(/[^\w\d]/g,""),i=pu[n];return i?new i(t,s,e):(console.warn(`lib-font has no definition for ${n}. The table was skipped.`),{})}function mu(){let e=0;function t(s,n){if(!hu)return e>10?n(new Error("loading took too long")):(e++,setTimeout((()=>t(s)),250));s(fu)}return new Promise(((e,s)=>t(e)))}async function gu(e,t,s={}){if(!globalThis.document)return;let n=function(e,t){let s=e.lastIndexOf("."),n=(e.substring(s+1)||"").toLowerCase(),i={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"}[n];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."}[n];if(r||(r=`${e} is not a known webfont format.`),t)throw new Error(r);console.warn(`Could not load font: ${r}`)}(t,s.errorOnStyle);if(!n)return;let i=document.createElement("style");i.className="injected-by-Font-js";let r=[];return s.styleRules&&(r=Object.entries(s.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("${n}");\n}`,globalThis.document.head.appendChild(i),i}Promise.all([Promise.resolve().then((function(){return Du})),Promise.resolve().then((function(){return zu})),Promise.resolve().then((function(){return Lu})),Promise.resolve().then((function(){return Hu})),Promise.resolve().then((function(){return Uu})),Promise.resolve().then((function(){return Zu})),Promise.resolve().then((function(){return Ku})),Promise.resolve().then((function(){return Xu})),Promise.resolve().then((function(){return ad})),Promise.resolve().then((function(){return yd})),Promise.resolve().then((function(){return gp})),Promise.resolve().then((function(){return vp})),Promise.resolve().then((function(){return bp})),Promise.resolve().then((function(){return Sp})),Promise.resolve().then((function(){return jp})),Promise.resolve().then((function(){return Cp})),Promise.resolve().then((function(){return Ep})),Promise.resolve().then((function(){return Pp})),Promise.resolve().then((function(){return Ip})),Promise.resolve().then((function(){return Tp})),Promise.resolve().then((function(){return Op})),Promise.resolve().then((function(){return Ap})),Promise.resolve().then((function(){return Mp})),Promise.resolve().then((function(){return Dp})),Promise.resolve().then((function(){return Lp})),Promise.resolve().then((function(){return Gp})),Promise.resolve().then((function(){return Hp})),Promise.resolve().then((function(){return Up})),Promise.resolve().then((function(){return Wp})),Promise.resolve().then((function(){return Kp})),Promise.resolve().then((function(){return $p})),Promise.resolve().then((function(){return sh})),Promise.resolve().then((function(){return ih})),Promise.resolve().then((function(){return ah})),Promise.resolve().then((function(){return lh})),Promise.resolve().then((function(){return ch})),Promise.resolve().then((function(){return dh})),Promise.resolve().then((function(){return ph})),Promise.resolve().then((function(){return gh})),Promise.resolve().then((function(){return vh})),Promise.resolve().then((function(){return yh}))]).then((e=>{e.forEach((e=>{let t=Object.keys(e)[0];pu[t]=e[t]})),hu=!0}));const vu=[0,1,0,0],xu=[79,84,84,79],yu=[119,79,70,70],bu=[119,79,70,50];function wu(e,t){if(e.length===t.length){for(let s=0;s<e.length;s++)if(e[s]!==t[s])return;return!0}}class _u extends Yc{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 gu(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((s=>this.fromDataBuffer(s,t||e))).catch((s=>{const n=new Kc("error",s,`Failed to load font at ${t||e}`);this.dispatch(n),this.onerror&&this.onerror(n)}))}async fromDataBuffer(e,t){this.fontData=new DataView(e);let s=function(e){const t=[e.getUint8(0),e.getUint8(1),e.getUint8(2),e.getUint8(3)];return wu(t,vu)||wu(t,xu)?"SFNT":wu(t,yu)?"WOFF":wu(t,bu)?"WOFF2":void 0}(this.fontData);if(!s)throw new Error(`${t} is either an unsupported font format, or not a font at all.`);await this.parseBasicData(s);const n=new Kc("load",{font:this});this.dispatch(n),this.onload&&this.onload(n)}async parseBasicData(e){return mu().then((t=>("SFNT"===e&&(this.opentype=new tu(this,this.fontData,t)),"WOFF"===e&&(this.opentype=new ru(this,this.fontData,t)),"WOFF2"===e&&(this.opentype=new uu(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 s=document.createElement("div");s.textContent=e,s.style.fontFamily=this.name,s.style.fontSize=`${t}px`,s.style.color="transparent",s.style.background="transparent",s.style.top="0",s.style.left="0",s.style.position="absolute",document.body.appendChild(s);let n=s.getBoundingClientRect();document.body.removeChild(s);const i=this.opentype.tables["OS/2"];return n.fontSize=t,n.ascender=i.sTypoAscender,n.descender=i.sTypoDescender,n}unload(){if(this.styleElement.parentNode){this.styleElement.parentNode.removeElement(this.styleElement);const e=new Kc("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 Kc("load",{font:this});this.dispatch(e),this.onload&&this.onload(e)}}}globalThis.Font=_u;class Su extends Qc{constructor(e,t,s){super(e),this.plaformID=t,this.encodingID=s}}class ju extends Su{constructor(e,t,s){super(e,t,s),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 Cu extends Su{constructor(e,t,s){super(e,t,s),this.format=2,this.length=e.uint16,this.language=e.uint16,this.subHeaderKeys=[...new Array(256)].map((t=>e.uint16));const n=Math.max(...this.subHeaderKeys),i=e.currentPosition;eu(this,"subHeaders",(()=>(e.currentPosition=i,[...new Array(n)].map((t=>new ku(e))))));const r=i+8*n;eu(this,"glyphIndexArray",(()=>(e.currentPosition=r,[...new Array(n)].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,s=e&&65280,n=this.subHeaders[s],i=this.subHeaders[n],r=i.firstCode,o=r+i.entryCount;return r<=t&&t<=o}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 ku{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 Eu extends Su{constructor(e,t,s){super(e,t,s),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 n=e.currentPosition;eu(this,"endCode",(()=>e.readBytes(this.segCount,n,16)));const i=n+2+this.segCountX2;eu(this,"startCode",(()=>e.readBytes(this.segCount,i,16)));const r=i+this.segCountX2;eu(this,"idDelta",(()=>e.readBytes(this.segCount,r,16,!0)));const o=r+this.segCountX2;eu(this,"idRangeOffset",(()=>e.readBytes(this.segCount,o,16)));const a=o+this.segCountX2,l=this.length-(a-this.tableStart);eu(this,"glyphIdArray",(()=>e.readBytes(l,a,16))),eu(this,"segments",(()=>this.buildSegments(o,a,e)))}buildSegments(e,t,s){return[...new Array(this.segCount)].map(((t,n)=>{let i=this.startCode[n],r=this.endCode[n],o=this.idDelta[n],a=this.idRangeOffset[n],l=e+2*n,c=[];if(0===a)for(let e=i+o,t=r+o;e<=t;e++)c.push(e);else for(let e=0,t=r-i;e<=t;e++)s.currentPosition=l+a+2*e,c.push(s.uint16);return{startCode:i,endCode:r,idDelta:o,idRangeOffset:a,glyphIDs:c}}))}reverse(e){let t=this.segments.find((t=>t.glyphIDs.includes(e)));if(!t)return{};const s=t.startCode+t.glyphIDs.indexOf(e);return{code:s,unicode:String.fromCodePoint(s)}}getGlyphId(e){if(e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343)return 0;if(65534==(65534&e)||65535==(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 Pu extends Su{constructor(e,t,s){super(e,t,s),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;eu(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 Iu extends Su{constructor(e,t,s){super(e,t,s),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;eu(this,"groups",(()=>[...new Array(this.numGroups)].map((t=>new Tu(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 Tu{constructor(e){this.startcharCode=e.uint32,this.endcharCode=e.uint32,this.startGlyphID=e.uint32}}class Ou extends Su{constructor(e,t,s){super(e,t,s),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;eu(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 Au extends Su{constructor(e,t,s){super(e,t,s),this.format=12,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32;eu(this,"groups",(()=>[...new Array(this.numGroups)].map((t=>new Nu(e)))))}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343||65534==(65534&e)||65535==(65535&e)?0:-1!==this.groups.findIndex((t=>t.startCharCode<=e&&e<=t.endCharCode))}reverse(e){for(let t of this.groups){let s=t.startGlyphID;if(s>e)continue;if(s===e)return t.startCharCode;if(s+(t.endCharCode-t.startCharCode)<e)continue;const n=t.startCharCode+(e-s);return{code:n,unicode:String.fromCodePoint(n)}}return{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map((e=>({start:e.startCharCode,end:e.endCharCode})))}}class Nu{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.startGlyphID=e.uint32}}class Mu extends Su{constructor(e,t,s){super(e,t,s),this.format=13,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32;eu(this,"groups",[...new Array(this.numGroups)].map((t=>new Vu(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 Vu{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.glyphID=e.uint32}}class Fu extends Su{constructor(e,t,s){super(e,t,s),this.subTableStart=e.currentPosition,this.format=14,this.length=e.uint32,this.numVarSelectorRecords=e.uint32,eu(this,"varSelectors",(()=>[...new Array(this.numVarSelectorRecords)].map((t=>new Ru(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 Ru{constructor(e){this.varSelector=e.uint24,this.defaultUVSOffset=e.Offset32,this.nonDefaultUVSOffset=e.Offset32}}class Bu{constructor(e,t){const s=this.platformID=e.uint16,n=this.encodingID=e.uint16,i=this.offset=e.Offset32;eu(this,"table",(()=>(e.currentPosition=t+i,function(e,t,s){const n=e.uint16;return 0===n?new ju(e,t,s):2===n?new Cu(e,t,s):4===n?new Eu(e,t,s):6===n?new Pu(e,t,s):8===n?new Iu(e,t,s):10===n?new Ou(e,t,s):12===n?new Au(e,t,s):13===n?new Mu(e,t,s):14===n?new Fu(e,t,s):{}}(e,s,n))))}}var Du=Object.freeze({__proto__:null,cmap:class extends $c{constructor(e,t){const{p:s}=super(e,t);this.version=s.uint16,this.numTables=s.uint16,this.encodingRecords=[...new Array(this.numTables)].map((e=>new Bu(s,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 s=this.encodingRecords.findIndex((s=>s.platformID===e&&s.encodingID===t));if(-1===s)return!1;return this.getSubTable(s).getSupportedCharCodes()}reverse(e){for(let t=0;t<this.numTables;t++){let s=this.getSubTable(t).reverse(e);if(s)return s}}getGlyphId(e){let t=0;return this.encodingRecords.some(((s,n)=>{let i=this.getSubTable(n);return!!i.getGlyphId&&(t=i.getGlyphId(e),0!==t)})),t}supports(e){return this.encodingRecords.some(((t,s)=>{const n=this.getSubTable(s);return n.supports&&!1!==n.supports(e)}))}supportsVariation(e){return this.encodingRecords.some(((t,s)=>{const n=this.getSubTable(s);return n.supportsVariation&&!1!==n.supportsVariation(e)}))}}});var zu=Object.freeze({__proto__:null,head:class extends $c{constructor(e,t){const{p:s}=super(e,t);this.load({majorVersion:s.uint16,minorVersion:s.uint16,fontRevision:s.fixed,checkSumAdjustment:s.uint32,magicNumber:s.uint32,flags:s.flags(16),unitsPerEm:s.uint16,created:s.longdatetime,modified:s.longdatetime,xMin:s.int16,yMin:s.int16,xMax:s.int16,yMax:s.int16,macStyle:s.flags(16),lowestRecPPEM:s.uint16,fontDirectionHint:s.uint16,indexToLocFormat:s.uint16,glyphDataFormat:s.uint16})}}});var Lu=Object.freeze({__proto__:null,hhea:class extends $c{constructor(e,t){const{p:s}=super(e,t);this.majorVersion=s.uint16,this.minorVersion=s.uint16,this.ascender=s.fword,this.descender=s.fword,this.lineGap=s.fword,this.advanceWidthMax=s.ufword,this.minLeftSideBearing=s.fword,this.minRightSideBearing=s.fword,this.xMaxExtent=s.fword,this.caretSlopeRise=s.int16,this.caretSlopeRun=s.int16,this.caretOffset=s.int16,s.int16,s.int16,s.int16,s.int16,this.metricDataFormat=s.int16,this.numberOfHMetrics=s.uint16,s.verifyLength()}}});class Gu{constructor(e,t){this.advanceWidth=e,this.lsb=t}}var Hu=Object.freeze({__proto__:null,hmtx:class extends $c{constructor(e,t,s){const{p:n}=super(e,t),i=s.hhea.numberOfHMetrics,r=s.maxp.numGlyphs,o=n.currentPosition;if(eu(this,"hMetrics",(()=>(n.currentPosition=o,[...new Array(i)].map((e=>new Gu(n.uint16,n.int16)))))),i<r){const e=o+4*i;eu(this,"leftSideBearings",(()=>(n.currentPosition=e,[...new Array(r-i)].map((e=>n.int16)))))}}}});var Uu=Object.freeze({__proto__:null,maxp:class extends $c{constructor(e,t){const{p:s}=super(e,t);this.version=s.legacyFixed,this.numGlyphs=s.uint16,1===this.version&&(this.maxPoints=s.uint16,this.maxContours=s.uint16,this.maxCompositePoints=s.uint16,this.maxCompositeContours=s.uint16,this.maxZones=s.uint16,this.maxTwilightPoints=s.uint16,this.maxStorage=s.uint16,this.maxFunctionDefs=s.uint16,this.maxInstructionDefs=s.uint16,this.maxStackElements=s.uint16,this.maxSizeOfInstructions=s.uint16,this.maxComponentElements=s.uint16,this.maxComponentDepth=s.uint16),s.verifyLength()}}});class Wu{constructor(e,t){this.length=e,this.offset=t}}class qu{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,eu(this,"string",(()=>(e.currentPosition=t.stringStart+this.offset,function(e,t){const{platformID:s,length:n}=t;if(0===n)return"";if(0===s||3===s){const t=[];for(let s=0,i=n/2;s<i;s++)t[s]=String.fromCharCode(e.uint16);return t.join("")}const i=e.readBytes(n),r=[];return i.forEach((function(e,t){r[t]=String.fromCharCode(e)})),r.join("")}(e,this))))}}var Zu=Object.freeze({__proto__:null,name:class extends $c{constructor(e,t){const{p:s}=super(e,t);this.format=s.uint16,this.count=s.uint16,this.stringOffset=s.Offset16,this.nameRecords=[...new Array(this.count)].map((e=>new qu(s,this))),1===this.format&&(this.langTagCount=s.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map((e=>new Wu(s.uint16,s.Offset16)))),this.stringStart=this.tableStart+this.stringOffset}get(e){let t=this.nameRecords.find((t=>t.nameID===e));if(t)return t.string}}});var Ku=Object.freeze({__proto__:null,OS2:class extends $c{constructor(e,t){const{p:s}=super(e,t);return this.version=s.uint16,this.xAvgCharWidth=s.int16,this.usWeightClass=s.uint16,this.usWidthClass=s.uint16,this.fsType=s.uint16,this.ySubscriptXSize=s.int16,this.ySubscriptYSize=s.int16,this.ySubscriptXOffset=s.int16,this.ySubscriptYOffset=s.int16,this.ySuperscriptXSize=s.int16,this.ySuperscriptYSize=s.int16,this.ySuperscriptXOffset=s.int16,this.ySuperscriptYOffset=s.int16,this.yStrikeoutSize=s.int16,this.yStrikeoutPosition=s.int16,this.sFamilyClass=s.int16,this.panose=[...new Array(10)].map((e=>s.uint8)),this.ulUnicodeRange1=s.flags(32),this.ulUnicodeRange2=s.flags(32),this.ulUnicodeRange3=s.flags(32),this.ulUnicodeRange4=s.flags(32),this.achVendID=s.tag,this.fsSelection=s.uint16,this.usFirstCharIndex=s.uint16,this.usLastCharIndex=s.uint16,this.sTypoAscender=s.int16,this.sTypoDescender=s.int16,this.sTypoLineGap=s.int16,this.usWinAscent=s.uint16,this.usWinDescent=s.uint16,0===this.version?s.verifyLength():(this.ulCodePageRange1=s.flags(32),this.ulCodePageRange2=s.flags(32),1===this.version?s.verifyLength():(this.sxHeight=s.int16,this.sCapHeight=s.int16,this.usDefaultChar=s.uint16,this.usBreakChar=s.uint16,this.usMaxContext=s.uint16,this.version<=4?s.verifyLength():(this.usLowerOpticalPointSize=s.uint16,this.usUpperOpticalPointSize=s.uint16,5===this.version?s.verifyLength():void 0)))}}});const Yu=[".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 Xu=Object.freeze({__proto__:null,post:class extends $c{constructor(e,t){const{p:s}=super(e,t);if(this.version=s.legacyFixed,this.italicAngle=s.fixed,this.underlinePosition=s.fword,this.underlineThickness=s.fword,this.isFixedPitch=s.uint32,this.minMemType42=s.uint32,this.maxMemType42=s.uint32,this.minMemType1=s.uint32,this.maxMemType1=s.uint32,1===this.version||3===this.version)return s.verifyLength();if(this.numGlyphs=s.uint16,2===this.version){this.glyphNameIndex=[...new Array(this.numGlyphs)].map((e=>s.uint16)),this.namesOffset=s.currentPosition,this.glyphNameOffsets=[1];for(let e=0;e<this.numGlyphs;e++){if(this.glyphNameIndex[e]<Yu.length){this.glyphNameOffsets.push(this.glyphNameOffsets[e]);continue}let t=s.int8;s.skip(t),this.glyphNameOffsets.push(this.glyphNameOffsets[e]+t+1)}}2.5===this.version&&(this.offset=[...new Array(this.numGlyphs)].map((e=>s.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 Yu[t];let s=this.glyphNameOffsets[e],n=this.glyphNameOffsets[e+1]-s-1;if(0===n)return".notdef.";this.parser.currentPosition=this.namesOffset+s;return this.parser.readBytes(n,this.namesOffset+s,8,!0).map((e=>String.fromCharCode(e))).join("")}}});class Ju extends $c{constructor(e,t){const{p:s}=super(e,t,"AxisTable");this.baseTagListOffset=s.Offset16,this.baseScriptListOffset=s.Offset16,eu(this,"baseTagList",(()=>new Qu({offset:e.offset+this.baseTagListOffset},t))),eu(this,"baseScriptList",(()=>new $u({offset:e.offset+this.baseScriptListOffset},t)))}}class Qu extends $c{constructor(e,t){const{p:s}=super(e,t,"BaseTagListTable");this.baseTagCount=s.uint16,this.baselineTags=[...new Array(this.baseTagCount)].map((e=>s.tag))}}class $u extends $c{constructor(e,t){const{p:s}=super(e,t,"BaseScriptListTable");this.baseScriptCount=s.uint16;const n=s.currentPosition;eu(this,"baseScriptRecords",(()=>(s.currentPosition=n,[...new Array(this.baseScriptCount)].map((e=>new ed(this.start,s))))))}}class ed{constructor(e,t){this.baseScriptTag=t.tag,this.baseScriptOffset=t.Offset16,eu(this,"baseScriptTable",(()=>(t.currentPosition=e+this.baseScriptOffset,new td(t))))}}class td{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 sd(this.start,e))),eu(this,"baseValues",(()=>(e.currentPosition=this.start+this.baseValuesOffset,new nd(e)))),eu(this,"defaultMinMax",(()=>(e.currentPosition=this.start+this.defaultMinMaxOffset,new id(e))))}}class sd{constructor(e,t){this.baseLangSysTag=t.tag,this.minMaxOffset=t.Offset16,eu(this,"minMax",(()=>(t.currentPosition=e+this.minMaxOffset,new id(t))))}}class nd{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 od(this.parser)}}class id{constructor(e){this.minCoord=e.Offset16,this.maxCoord=e.Offset16,this.featMinMaxCount=e.uint16;const t=e.currentPosition;eu(this,"featMinMaxRecords",(()=>(e.currentPosition=t,[...new Array(this.featMinMaxCount)].map((t=>new rd(e))))))}}class rd{constructor(e){this.featureTableTag=e.tag,this.minCoord=e.Offset16,this.maxCoord=e.Offset16}}class od{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 ad=Object.freeze({__proto__:null,BASE:class extends $c{constructor(e,t){const{p:s}=super(e,t);this.majorVersion=s.uint16,this.minorVersion=s.uint16,this.horizAxisOffset=s.Offset16,this.vertAxisOffset=s.Offset16,eu(this,"horizAxis",(()=>new Ju({offset:e.offset+this.horizAxisOffset},t))),eu(this,"vertAxis",(()=>new Ju({offset:e.offset+this.vertAxisOffset},t))),1===this.majorVersion&&1===this.minorVersion&&(this.itemVarStoreOffset=s.Offset32,eu(this,"itemVarStore",(()=>new Ju({offset:e.offset+this.itemVarStoreOffset},t))))}}});class ld{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 cd(e))))}}class cd{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.class=e.uint16}}class ud extends Qc{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 dd(e))))}}class dd{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.startCoverageIndex=e.uint16}}class pd{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 hd extends Qc{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 fd(this.parser)}}class fd{constructor(e){this.pointCount=e.uint16,this.pointIndices=[...new Array(this.pointCount)].map((t=>e.uint16))}}class md extends Qc{constructor(e){super(e),this.coverageOffset=e.Offset16,eu(this,"coverage",(()=>(e.currentPosition=this.start+this.coverageOffset,new ud(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 gd(this.parser)}}class gd extends Qc{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 vd(this.parser)}}class vd{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 xd extends Qc{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 ud(this.parser)}}var yd=Object.freeze({__proto__:null,GDEF:class extends $c{constructor(e,t){const{p:s}=super(e,t);this.majorVersion=s.uint16,this.minorVersion=s.uint16,this.glyphClassDefOffset=s.Offset16,eu(this,"glyphClassDefs",(()=>{if(0!==this.glyphClassDefOffset)return s.currentPosition=this.tableStart+this.glyphClassDefOffset,new ld(s)})),this.attachListOffset=s.Offset16,eu(this,"attachList",(()=>{if(0!==this.attachListOffset)return s.currentPosition=this.tableStart+this.attachListOffset,new hd(s)})),this.ligCaretListOffset=s.Offset16,eu(this,"ligCaretList",(()=>{if(0!==this.ligCaretListOffset)return s.currentPosition=this.tableStart+this.ligCaretListOffset,new md(s)})),this.markAttachClassDefOffset=s.Offset16,eu(this,"markAttachClassDef",(()=>{if(0!==this.markAttachClassDefOffset)return s.currentPosition=this.tableStart+this.markAttachClassDefOffset,new ld(s)})),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=s.Offset16,eu(this,"markGlyphSetsDef",(()=>{if(0!==this.markGlyphSetsDefOffset)return s.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new xd(s)}))),3===this.minorVersion&&(this.itemVarStoreOffset=s.Offset32,eu(this,"itemVarStore",(()=>{if(0!==this.itemVarStoreOffset)return s.currentPosition=this.tableStart+this.itemVarStoreOffset,new pd(s)})))}}});class bd extends Qc{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(e){super(e),this.scriptCount=e.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map((t=>new wd(e)))}}class wd{constructor(e){this.scriptTag=e.tag,this.scriptOffset=e.Offset16}}class _d extends Qc{constructor(e){super(e),this.defaultLangSys=e.Offset16,this.langSysCount=e.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map((t=>new Sd(e)))}}class Sd{constructor(e){this.langSysTag=e.tag,this.langSysOffset=e.Offset16}}class jd{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 Cd extends Qc{static EMPTY={featureCount:0,featureRecords:[]};constructor(e){super(e),this.featureCount=e.uint16,this.featureRecords=[...new Array(this.featureCount)].map((t=>new kd(e)))}}class kd{constructor(e){this.featureTag=e.tag,this.featureOffset=e.Offset16}}class Ed extends Qc{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 Id(e);if(t.startsWith("cc"))return new Pd(e);if(t.startsWith("ss"))return new Td(e)}}}class Pd{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 Id{constructor(e){this.designSize=e.uint16,this.subfamilyIdentifier=e.uint16,this.subfamilyNameID=e.uint16,this.smallEnd=e.uint16,this.largeEnd=e.uint16}}class Td{constructor(e){this.version=e.uint16,this.UINameID=e.uint16}}function Od(e){e.parser.currentPosition-=2,delete e.coverageOffset,delete e.getCoverageTable}class Ad extends Qc{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 ud(e)}}class Nd{constructor(e){this.glyphSequenceIndex=e.uint16,this.lookupListIndex=e.uint16}}class Md extends Ad{constructor(e){super(e),this.deltaGlyphID=e.int16}}class Vd extends Ad{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 Fd(t)}}class Fd{constructor(e){this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}class Rd extends Ad{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 Bd(t)}}class Bd{constructor(e){this.glyphCount=e.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}class Dd extends Ad{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 zd(t)}}class zd extends Qc{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 Ld(t)}}class Ld{constructor(e){this.ligatureGlyph=e.uint16,this.componentCount=e.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map((t=>e.uint16))}}class Gd extends Ad{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&&(Od(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 Nd(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 Hd(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 Wd(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 ud(t)}}class Hd extends Qc{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 Ud(t)}}class Ud{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 Nd(e)))}}class Wd extends Qc{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 qd(t)}}class qd extends Ud{constructor(e){super(e)}}class Zd extends Ad{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&&(Od(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 Qd(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 Kd(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 Xd(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 ud(t)}}class Kd extends Qc{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 Yd(t)}}class Yd{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 Nd(e)))}}class Xd extends Qc{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 Jd(t)}}class Jd{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 Qd(e)))}}class Qd extends Qc{constructor(e){super(e),this.sequenceIndex=e.uint16,this.lookupListIndex=e.uint16}}class $d extends Qc{constructor(e){super(e),this.substFormat=e.uint16,this.extensionLookupType=e.uint16,this.extensionOffset=e.Offset32}}class ep extends Ad{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 tp={buildSubtable:function(e,t){const s=new[void 0,Md,Vd,Rd,Dd,Gd,Zd,$d,ep][e](t);return s.type=e,s}};class sp extends Qc{constructor(e){super(e)}}class np extends sp{constructor(e){super(e),console.log("lookup type 1")}}class ip extends sp{constructor(e){super(e),console.log("lookup type 2")}}class rp extends sp{constructor(e){super(e),console.log("lookup type 3")}}class op extends sp{constructor(e){super(e),console.log("lookup type 4")}}class ap extends sp{constructor(e){super(e),console.log("lookup type 5")}}class lp extends sp{constructor(e){super(e),console.log("lookup type 6")}}class cp extends sp{constructor(e){super(e),console.log("lookup type 7")}}class up extends sp{constructor(e){super(e),console.log("lookup type 8")}}class dp extends sp{constructor(e){super(e),console.log("lookup type 9")}}var pp={buildSubtable:function(e,t){const s=new[void 0,np,ip,rp,op,ap,lp,cp,up,dp][e](t);return s.type=e,s}};class hp extends Qc{static EMPTY={lookupCount:0,lookups:[]};constructor(e){super(e),this.lookupCount=e.uint16,this.lookups=[...new Array(this.lookupCount)].map((t=>e.Offset16))}}class fp extends Qc{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?tp:pp;return this.parser.currentPosition=this.start+this.subtableOffsets[e],t.buildSubtable(this.lookupType,this.parser)}}class mp extends $c{constructor(e,t,s){const{p:n,tableStart:i}=super(e,t,s);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.scriptListOffset=n.Offset16,this.featureListOffset=n.Offset16,this.lookupListOffset=n.Offset16,1===this.majorVersion&&1===this.minorVersion&&(this.featureVariationsOffset=n.Offset32);const r=!(this.scriptListOffset||this.featureListOffset||this.lookupListOffset);eu(this,"scriptList",(()=>r?bd.EMPTY:(n.currentPosition=i+this.scriptListOffset,new bd(n)))),eu(this,"featureList",(()=>r?Cd.EMPTY:(n.currentPosition=i+this.featureListOffset,new Cd(n)))),eu(this,"lookupList",(()=>r?hp.EMPTY:(n.currentPosition=i+this.lookupListOffset,new hp(n)))),this.featureVariationsOffset&&eu(this,"featureVariations",(()=>r?FeatureVariations.EMPTY:(n.currentPosition=i+this.featureVariationsOffset,new FeatureVariations(n))))}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 s=new _d(this.parser);return s.scriptTag=e,s}ensureScriptTable(e){return"string"==typeof e?this.getScriptTable(e):e}getSupportedLangSys(e){const t=0!==(e=this.ensureScriptTable(e)).defaultLangSys,s=e.langSysRecords.map((e=>e.langSysTag));return t&&s.unshift("dflt"),s}getDefaultLangSysTable(e){let t=(e=this.ensureScriptTable(e)).defaultLangSys;if(0!==t){this.parser.currentPosition=e.start+t;let s=new jd(this.parser);return s.langSysTag="",s.defaultForScript=e.scriptTag,s}}getLangSysTable(e,t="dflt"){if("dflt"===t)return this.getDefaultLangSysTable(e);let s=(e=this.ensureScriptTable(e)).langSysRecords.find((e=>e.langSysTag===t));this.parser.currentPosition=e.start+s.langSysOffset;let n=new jd(this.parser);return n.langSysTag=t,n}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 s=new Ed(this.parser);return s.featureTag=t.featureTag,s}getLookups(e){return e.lookupListIndices.map((e=>this.getLookup(e)))}getLookup(e,t){let s=this.lookupList.lookups[e];return this.parser.currentPosition=this.lookupList.start+s,new fp(this.parser,t)}}var gp=Object.freeze({__proto__:null,GSUB:class extends mp{constructor(e,t){super(e,t,"GSUB")}getLookup(e){return super.getLookup(e,"GSUB")}}});var vp=Object.freeze({__proto__:null,GPOS:class extends mp{constructor(e,t){super(e,t,"GPOS")}getLookup(e){return super.getLookup(e,"GPOS")}}});class xp extends Qc{constructor(e){super(e),this.numEntries=e.uint16,this.documentRecords=[...new Array(this.numEntries)].map((t=>new yp(e)))}getDocument(e){let t=this.documentRecords[e];if(!t)return"";let s=this.start+t.svgDocOffset;return this.parser.currentPosition=s,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 yp{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.svgDocOffset=e.Offset32,this.svgDocLength=e.uint32}}var bp=Object.freeze({__proto__:null,SVG:class extends $c{constructor(e,t){const{p:s}=super(e,t);this.version=s.uint16,this.offsetToSVGDocumentList=s.Offset32,s.currentPosition=this.tableStart+this.offsetToSVGDocumentList,this.documentList=new xp(s)}}});class wp{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 _p{constructor(e,t,s){let n=e.currentPosition;this.subfamilyNameID=e.uint16,e.uint16,this.coordinates=[...new Array(t)].map((t=>e.fixed)),e.currentPosition-n<s&&(this.postScriptNameID=e.uint16)}}var Sp=Object.freeze({__proto__:null,fvar:class extends $c{constructor(e,t){const{p:s}=super(e,t);this.majorVersion=s.uint16,this.minorVersion=s.uint16,this.axesArrayOffset=s.Offset16,s.uint16,this.axisCount=s.uint16,this.axisSize=s.uint16,this.instanceCount=s.uint16,this.instanceSize=s.uint16;const n=this.tableStart+this.axesArrayOffset;eu(this,"axes",(()=>(s.currentPosition=n,[...new Array(this.axisCount)].map((e=>new wp(s))))));const i=n+this.axisCount*this.axisSize;eu(this,"instances",(()=>{let e=[];for(let t=0;t<this.instanceCount;t++)s.currentPosition=i+t*this.instanceSize,e.push(new _p(s,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 jp=Object.freeze({__proto__:null,cvt:class extends $c{constructor(e,t){const{p:s}=super(e,t),n=e.length/2;eu(this,"items",(()=>[...new Array(n)].map((e=>s.fword))))}}});var Cp=Object.freeze({__proto__:null,fpgm:class extends $c{constructor(e,t){const{p:s}=super(e,t);eu(this,"instructions",(()=>[...new Array(e.length)].map((e=>s.uint8))))}}});class kp{constructor(e){this.rangeMaxPPEM=e.uint16,this.rangeGaspBehavior=e.uint16}}var Ep=Object.freeze({__proto__:null,gasp:class extends $c{constructor(e,t){const{p:s}=super(e,t);this.version=s.uint16,this.numRanges=s.uint16;eu(this,"gaspRanges",(()=>[...new Array(this.numRanges)].map((e=>new kp(s)))))}}});var Pp=Object.freeze({__proto__:null,glyf:class extends $c{constructor(e,t){super(e,t)}getGlyphData(e,t){return this.parser.currentPosition=this.tableStart+e,this.parser.readBytes(t)}}});var Ip=Object.freeze({__proto__:null,loca:class extends $c{constructor(e,t,s){const{p:n}=super(e,t),i=s.maxp.numGlyphs+1;0===s.head.indexToLocFormat?(this.x2=!0,eu(this,"offsets",(()=>[...new Array(i)].map((e=>n.Offset16))))):eu(this,"offsets",(()=>[...new Array(i)].map((e=>n.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 Tp=Object.freeze({__proto__:null,prep:class extends $c{constructor(e,t){const{p:s}=super(e,t);eu(this,"instructions",(()=>[...new Array(e.length)].map((e=>s.uint8))))}}});var Op=Object.freeze({__proto__:null,CFF:class extends $c{constructor(e,t){const{p:s}=super(e,t);eu(this,"data",(()=>s.readBytes()))}}});var Ap=Object.freeze({__proto__:null,CFF2:class extends $c{constructor(e,t){const{p:s}=super(e,t);eu(this,"data",(()=>s.readBytes()))}}});class Np{constructor(e){this.glyphIndex=e.uint16,this.vertOriginY=e.int16}}var Mp=Object.freeze({__proto__:null,VORG:class extends $c{constructor(e,t){const{p:s}=super(e,t);this.majorVersion=s.uint16,this.minorVersion=s.uint16,this.defaultVertOriginY=s.int16,this.numVertOriginYMetrics=s.uint16,eu(this,"vertORiginYMetrics",(()=>[...new Array(this.numVertOriginYMetrics)].map((e=>new Np(s)))))}}});class Vp{constructor(e){this.indexSubTableArrayOffset=e.Offset32,this.indexTablesSize=e.uint32,this.numberofIndexSubTables=e.uint32,this.colorRef=e.uint32,this.hori=new Rp(e),this.vert=new Rp(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 Fp{constructor(e){this.hori=new Rp(e),this.vert=new Rp(e),this.ppemX=e.uint8,this.ppemY=e.uint8,this.substitutePpemX=e.uint8,this.substitutePpemY=e.uint8}}class Rp{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 Bp extends $c{constructor(e,t,s){const{p:n}=super(e,t,s);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.numSizes=n.uint32,eu(this,"bitMapSizes",(()=>[...new Array(this.numSizes)].map((e=>new Vp(n)))))}}var Dp=Object.freeze({__proto__:null,EBLC:Bp});class zp extends $c{constructor(e,t,s){const{p:n}=super(e,t,s);this.majorVersion=n.uint16,this.minorVersion=n.uint16}}var Lp=Object.freeze({__proto__:null,EBDT:zp});var Gp=Object.freeze({__proto__:null,EBSC:class extends $c{constructor(e,t){const{p:s}=super(e,t);this.majorVersion=s.uint16,this.minorVersion=s.uint16,this.numSizes=s.uint32,eu(this,"bitmapScales",(()=>[...new Array(this.numSizes)].map((e=>new Fp(s)))))}}});var Hp=Object.freeze({__proto__:null,CBLC:class extends Bp{constructor(e,t){super(e,t,"CBLC")}}});var Up=Object.freeze({__proto__:null,CBDT:class extends zp{constructor(e,t){super(e,t,"CBDT")}}});var Wp=Object.freeze({__proto__:null,sbix:class extends $c{constructor(e,t){const{p:s}=super(e,t);this.version=s.uint16,this.flags=s.flags(16),this.numStrikes=s.uint32,eu(this,"strikeOffsets",(()=>[...new Array(this.numStrikes)].map((e=>s.Offset32))))}}});class qp{constructor(e){this.gID=e.uint16,this.firstLayerIndex=e.uint16,this.numLayers=e.uint16}}class Zp{constructor(e){this.gID=e.uint16,this.paletteIndex=e.uint16}}var Kp=Object.freeze({__proto__:null,COLR:class extends $c{constructor(e,t){const{p:s}=super(e,t);this.version=s.uint16,this.numBaseGlyphRecords=s.uint16,this.baseGlyphRecordsOffset=s.Offset32,this.layerRecordsOffset=s.Offset32,this.numLayerRecords=s.uint16}getBaseGlyphRecord(e){let t=this.tableStart+this.baseGlyphRecordsOffset;this.parser.currentPosition=t;let s=new qp(this.parser),n=s.gID,i=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=i;let r=new qp(this.parser),o=r.gID;if(n===e)return s;if(o===e)return r;for(;t!==i;){let s=t+(i-t)/12;this.parser.currentPosition=s;let n=new qp(this.parser),r=n.gID;if(r===e)return n;r>e?i=s:r<e&&(t=s)}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 Zp(p)))}}});class Yp{constructor(e){this.blue=e.uint8,this.green=e.uint8,this.red=e.uint8,this.alpha=e.uint8}}class Xp{constructor(e,t){this.paletteTypes=[...new Array(t)].map((t=>e.uint32))}}class Jp{constructor(e,t){this.paletteLabels=[...new Array(t)].map((t=>e.uint16))}}class Qp{constructor(e,t){this.paletteEntryLabels=[...new Array(t)].map((t=>e.uint16))}}var $p=Object.freeze({__proto__:null,CPAL:class extends $c{constructor(e,t){const{p:s}=super(e,t);this.version=s.uint16,this.numPaletteEntries=s.uint16;const n=this.numPalettes=s.uint16;this.numColorRecords=s.uint16,this.offsetFirstColorRecord=s.Offset32,this.colorRecordIndices=[...new Array(this.numPalettes)].map((e=>s.uint16)),eu(this,"colorRecords",(()=>(s.currentPosition=this.tableStart+this.offsetFirstColorRecord,[...new Array(this.numColorRecords)].map((e=>new Yp(s)))))),1===this.version&&(this.offsetPaletteTypeArray=s.Offset32,this.offsetPaletteLabelArray=s.Offset32,this.offsetPaletteEntryLabelArray=s.Offset32,eu(this,"paletteTypeArray",(()=>(s.currentPosition=this.tableStart+this.offsetPaletteTypeArray,new Xp(s,n)))),eu(this,"paletteLabelArray",(()=>(s.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new Jp(s,n)))),eu(this,"paletteEntryLabelArray",(()=>(s.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new Qp(s,n)))))}}});class eh{constructor(e){this.format=e.uint32,this.length=e.uint32,this.offset=e.Offset32}}class th{constructor(e){e.uint16,e.uint16,this.signatureLength=e.uint32,this.signature=e.readBytes(this.signatureLength)}}var sh=Object.freeze({__proto__:null,DSIG:class extends $c{constructor(e,t){const{p:s}=super(e,t);this.version=s.uint32,this.numSignatures=s.uint16,this.flags=s.uint16,this.signatureRecords=[...new Array(this.numSignatures)].map((e=>new eh(s)))}getData(e){const t=this.signatureRecords[e];return this.parser.currentPosition=this.tableStart+t.offset,new th(this.parser)}}});class nh{constructor(e,t){this.pixelSize=e.uint8,this.maxWidth=e.uint8,this.widths=e.readBytes(t)}}var ih=Object.freeze({__proto__:null,hdmx:class extends $c{constructor(e,t,s){const{p:n}=super(e,t),i=s.hmtx.numGlyphs;this.version=n.uint16,this.numRecords=n.int16,this.sizeDeviceRecord=n.int32,this.records=[...new Array(numRecords)].map((e=>new nh(n,i)))}}});class rh{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,eu(this,"pairs",(()=>[...new Array(this.nPairs)].map((t=>new oh(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 oh{constructor(e){this.left=e.uint16,this.right=e.uint16,this.value=e.fword}}var ah=Object.freeze({__proto__:null,kern:class extends $c{constructor(e,t){const{p:s}=super(e,t);this.version=s.uint16,this.nTables=s.uint16,eu(this,"tables",(()=>{let e=this.tableStart+4;const t=[];for(let n=0;n<this.nTables;n++){s.currentPosition=e;let n=new rh(s);t.push(n),e+=n}return t}))}}});var lh=Object.freeze({__proto__:null,LTSH:class extends $c{constructor(e,t){const{p:s}=super(e,t);this.version=s.uint16,this.numGlyphs=s.uint16,this.yPels=s.readBytes(this.numGlyphs)}}});var ch=Object.freeze({__proto__:null,MERG:class extends $c{constructor(e,t){const{p:s}=super(e,t);this.version=s.uint16,this.mergeClassCount=s.uint16,this.mergeDataOffset=s.Offset16,this.classDefCount=s.uint16,this.offsetToClassDefOffsets=s.Offset16,eu(this,"mergeEntryMatrix",(()=>[...new Array(this.mergeClassCount)].map((e=>s.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 uh{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 dh=Object.freeze({__proto__:null,meta:class extends $c{constructor(e,t){const{p:s}=super(e,t);this.version=s.uint32,this.flags=s.uint32,s.uint32,this.dataMapsCount=s.uint32,this.dataMaps=[...new Array(this.dataMapsCount)].map((e=>new uh(this.tableStart,s)))}}});var ph=Object.freeze({__proto__:null,PCLT:class extends $c{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 hh{constructor(e){this.bCharSet=e.uint8,this.xRatio=e.uint8,this.yStartRatio=e.uint8,this.yEndRatio=e.uint8}}class fh{constructor(e){this.recs=e.uint16,this.startsz=e.uint8,this.endsz=e.uint8,this.records=[...new Array(this.recs)].map((t=>new mh(e)))}}class mh{constructor(e){this.yPelHeight=e.uint16,this.yMax=e.int16,this.yMin=e.int16}}var gh=Object.freeze({__proto__:null,VDMX:class extends $c{constructor(e,t){const{p:s}=super(e,t);this.version=s.uint16,this.numRecs=s.uint16,this.numRatios=s.uint16,this.ratRanges=[...new Array(this.numRatios)].map((e=>new hh(s))),this.offsets=[...new Array(this.numRatios)].map((e=>s.Offset16)),this.VDMXGroups=[...new Array(this.numRecs)].map((e=>new fh(s)))}}});var vh=Object.freeze({__proto__:null,vhea:class extends $c{constructor(e,t){const{p:s}=super(e,t);this.version=s.fixed,this.ascent=this.vertTypoAscender=s.int16,this.descent=this.vertTypoDescender=s.int16,this.lineGap=this.vertTypoLineGap=s.int16,this.advanceHeightMax=s.int16,this.minTopSideBearing=s.int16,this.minBottomSideBearing=s.int16,this.yMaxExtent=s.int16,this.caretSlopeRise=s.int16,this.caretSlopeRun=s.int16,this.caretOffset=s.int16,this.reserved=s.int16,this.reserved=s.int16,this.reserved=s.int16,this.reserved=s.int16,this.metricDataFormat=s.int16,this.numOfLongVerMetrics=s.uint16,s.verifyLength()}}});class xh{constructor(e,t){this.advanceHeight=e,this.topSideBearing=t}}var yh=Object.freeze({__proto__:null,vmtx:class extends $c{constructor(e,t,s){super(e,t);const n=s.vhea.numOfLongVerMetrics,i=s.maxp.numGlyphs,r=p.currentPosition;if(lazy(this,"vMetrics",(()=>(p.currentPosition=r,[...new Array(n)].map((e=>new xh(p.uint16,p.int16)))))),n<i){const e=r+4*n;lazy(this,"topSideBearings",(()=>(p.currentPosition=e,[...new Array(i-n)].map((e=>p.int16)))))}}}});const{kebabCase:bh}=te(y.privateApis);const wh=function(){const{installFonts:e}=(0,d.useContext)(kc),[t,s]=(0,d.useState)(!1),[n,i]=(0,d.useState)(!1),r=async e=>{i(null),s(!0);const t=new Set,n=[...e];let r=!1;const l=n.map((async e=>{const s=await async function(e){const t=new _u("Uploaded Font");try{const s=await a(e);return await t.fromDataBuffer(s,"font"),!0}catch(e){return!1}}(e);if(!s)return r=!0,null;if(t.has(e.name))return null;const n=e.name.split(".").pop().toLowerCase();return lc.includes(n)?(t.add(e.name),e):null})),c=(await Promise.all(l)).filter((e=>null!==e));if(c.length>0)o(c);else{const e=r?(0,b.__)("Sorry, you are not allowed to upload this file type."):(0,b.__)("No fonts found to install.");i({type:"error",message:e}),s(!1)}},o=async e=>{const t=await Promise.all(e.map((async e=>{const t=await l(e);return await vc(t,t.file,"all"),t})));c(t)};async function a(e){return new Promise(((t,s)=>{const n=new window.FileReader;n.readAsArrayBuffer(e),n.onload=()=>t(n.result),n.onerror=s}))}const l=async e=>{const t=await a(e),s=new _u("Uploaded Font");s.fromDataBuffer(t,e.name);const n=(await new Promise((e=>s.onload=e))).detail.font,{name:i}=n.opentype.tables,r=i.get(16)||i.get(1),o=i.get(2).toLowerCase().includes("italic"),l=n.opentype.tables["OS/2"].usWeightClass||"normal",c=!!n.opentype.tables.fvar&&n.opentype.tables.fvar.axes.find((({tag:e})=>"wght"===e));return{file:e,fontFamily:r,fontStyle:o?"italic":"normal",fontWeight:(c?`${c.minValue} ${c.maxValue}`:null)||l}},c=async t=>{const n=function(e){const t=e.reduce(((e,t)=>(e[t.fontFamily]||(e[t.fontFamily]={name:t.fontFamily,fontFamily:t.fontFamily,slug:bh(t.fontFamily.toLowerCase()),fontFace:[]}),e[t.fontFamily].fontFace.push(t),e)),{});return Object.values(t)}(t);try{await e(n),i({type:"success",message:(0,b.__)("Fonts were installed successfully.")})}catch(e){i({type:"error",message:e.message,errors:e?.installationErrors})}s(!1)};return(0,oe.jsxs)("div",{className:"font-library-modal__tabpanel-layout",children:[(0,oe.jsx)(y.DropZone,{onFilesDrop:e=>{r(e)}}),(0,oe.jsxs)(y.__experimentalVStack,{className:"font-library-modal__local-fonts",children:[n&&(0,oe.jsxs)(y.Notice,{status:n.type,__unstableHTML:!0,onRemove:()=>i(null),children:[n.message,n.errors&&(0,oe.jsx)("ul",{children:n.errors.map(((e,t)=>(0,oe.jsx)("li",{children:e},t)))})]}),t&&(0,oe.jsx)(y.FlexItem,{children:(0,oe.jsx)("div",{className:"font-library-modal__upload-area",children:(0,oe.jsx)(y.ProgressBar,{})})}),!t&&(0,oe.jsx)(y.FormFileUpload,{accept:lc.map((e=>`.${e}`)).join(","),multiple:!0,onChange:e=>{r(e.target.files)},render:({openFileDialog:e})=>(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,className:"font-library-modal__upload-area",onClick:e,children:(0,b.__)("Upload font")})}),(0,oe.jsx)(y.__experimentalSpacer,{margin:2}),(0,oe.jsx)(y.__experimentalText,{className:"font-library-modal__upload-area__text",children:(0,b.__)("Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2.")})]})]})},{Tabs:_h}=te(y.privateApis),Sh={id:"installed-fonts",title:(0,b._x)("Library","Font library")},jh={id:"upload-fonts",title:(0,b.__)("Upload")};const Ch=function({onRequestClose:e,defaultTabId:t="installed-fonts"}){const{collections:s}=(0,d.useContext)(kc),n=(0,l.useSelect)((e=>e(_.store).canUser("create",{kind:"postType",name:"wp_font_family"})),[]),i=[Sh];return n&&(i.push(jh),i.push(...(e=>e.map((({slug:t,name:s})=>({id:t,title:1===e.length&&"google-fonts"===t?(0,b.__)("Install Fonts"):s}))))(s||[]))),(0,oe.jsx)(y.Modal,{title:(0,b.__)("Fonts"),onRequestClose:e,isFullScreen:!0,className:"font-library-modal",children:(0,oe.jsxs)(_h,{defaultTabId:t,children:[(0,oe.jsx)("div",{className:"font-library-modal__tablist",children:(0,oe.jsx)(_h.TabList,{children:i.map((({id:e,title:t})=>(0,oe.jsx)(_h.Tab,{tabId:e,children:t},e)))})}),i.map((({id:e})=>{let t;switch(e){case"upload-fonts":t=(0,oe.jsx)(wh,{});break;case"installed-fonts":t=(0,oe.jsx)(Fc,{});break;default:t=(0,oe.jsx)(Hc,{slug:e})}return(0,oe.jsx)(_h.TabPanel,{tabId:e,focusable:!1,children:t},e)}))]})})};const kh=function({font:e}){const{handleSetLibraryFontSelected:t,setModalTabOpen:s}=(0,d.useContext)(kc),n=e?.fontFace?.length||1,i=Va(e);return(0,oe.jsx)(y.__experimentalItem,{onClick:()=>{t(e),s("installed-fonts")},children:(0,oe.jsxs)(y.__experimentalHStack,{justify:"space-between",children:[(0,oe.jsx)(y.FlexItem,{style:i,children:e.name}),(0,oe.jsx)(y.FlexItem,{className:"edit-site-global-styles-screen-typography__font-variants-count",children:(0,b.sprintf)((0,b._n)("%d variant","%d variants",n),n)})]})})},{useGlobalSetting:Eh}=te(x.privateApis);function Ph(){const{baseCustomFonts:e,modalTabOpen:t,setModalTabOpen:s}=(0,d.useContext)(kc),[n]=Eh("typography.fontFamilies"),[i]=Eh("typography.fontFamilies",void 0,"base"),r=n?.theme?n.theme.map((e=>hc(e,{source:"theme"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],o=n?.custom?n.custom.map((e=>hc(e,{source:"custom"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],a=0<o.length||0<r.length,l=a||i?.theme?.length>0||e?.length>0;return(0,oe.jsxs)(oe.Fragment,{children:[!!t&&(0,oe.jsx)(Ch,{onRequestClose:()=>s(null),defaultTabId:t}),(0,oe.jsxs)(y.__experimentalVStack,{spacing:4,children:[[...r,...o].length>0&&(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(gl,{level:3,children:(0,b.__)("Fonts")}),(0,oe.jsx)(y.__experimentalItemGroup,{size:"large",isBordered:!0,isSeparated:!0,children:r.map((e=>(0,oe.jsx)(kh,{font:e},e.slug)))})]}),!a&&(0,oe.jsxs)(y.__experimentalVStack,{children:[(0,oe.jsx)(gl,{level:3,children:(0,b.__)("Fonts")}),(0,oe.jsx)(y.__experimentalText,{as:"p",children:l?(0,b.__)("No fonts activated."):(0,b.__)("No fonts installed.")})]}),(0,oe.jsx)(y.Button,{className:"edit-site-global-styles-font-families__manage-fonts",variant:"secondary",__next40pxDefaultSize:!0,onClick:()=>{s(l?"installed-fonts":"upload-fonts")},children:l?(0,b.__)("Manage fonts"):(0,b.__)("Add fonts")})]})]})}const Ih=({...e})=>(0,oe.jsx)(Ec,{children:(0,oe.jsx)(Ph,{...e})});const Th=function(){const e=(0,l.useSelect)((e=>e(h.store).getEditorSettings().fontLibraryEnabled),[]);return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(il,{title:(0,b.__)("Typography"),description:(0,b.__)("Available fonts, typographic styles, and the application of those styles.")}),(0,oe.jsx)("div",{className:"edit-site-global-styles-screen",children:(0,oe.jsxs)(y.__experimentalVStack,{spacing:7,children:[(0,oe.jsx)(ec,{title:(0,b.__)("Typesets")}),e&&(0,oe.jsx)(Ih,{}),(0,oe.jsx)(zl,{}),(0,oe.jsx)(tc,{})]})})]})},{useGlobalStyle:Oh,useGlobalSetting:Ah,useSettingsForBlockElement:Nh,TypographyPanel:Mh}=te(x.privateApis);function Vh({element:e,headingLevel:t}){let s=[];"heading"===e?s=s.concat(["elements",t]):e&&"text"!==e&&(s=s.concat(["elements",e]));const n=s.join("."),[i]=Oh(n,void 0,"user",{shouldDecodeEncode:!1}),[r,o]=Oh(n,void 0,"all",{shouldDecodeEncode:!1}),[a]=Ah(""),l=Nh(a,void 0,"heading"===e?t:e);return(0,oe.jsx)(Mh,{inheritedValue:r,value:i,onChange:o,settings:l})}const{useGlobalStyle:Fh}=te(x.privateApis);function Rh({name:e,element:t,headingLevel:s}){var n;let i="";"heading"===t?i=`elements.${s}.`:t&&"text"!==t&&(i=`elements.${t}.`);const[r]=Fh(i+"typography.fontFamily",e),[o]=Fh(i+"color.gradient",e),[a]=Fh(i+"color.background",e),[l]=Fh("color.background"),[c]=Fh(i+"color.text",e),[u]=Fh(i+"typography.fontSize",e),[d]=Fh(i+"typography.fontStyle",e),[p]=Fh(i+"typography.fontWeight",e),[h]=Fh(i+"typography.letterSpacing",e),f="link"===t?{textDecoration:"underline"}:{};return(0,oe.jsx)("div",{className:"edit-site-typography-preview",style:{fontFamily:null!=r?r:"serif",background:null!==(n=null!=o?o:a)&&void 0!==n?n:l,color:c,fontSize:u,fontStyle:d,fontWeight:p,letterSpacing:h,...f},children:"Aa"})}const Bh={text:{description:(0,b.__)("Manage the fonts used on the site."),title:(0,b.__)("Text")},link:{description:(0,b.__)("Manage the fonts and typography used on the links."),title:(0,b.__)("Links")},heading:{description:(0,b.__)("Manage the fonts and typography used on headings."),title:(0,b.__)("Headings")},caption:{description:(0,b.__)("Manage the fonts and typography used on captions."),title:(0,b.__)("Captions")},button:{description:(0,b.__)("Manage the fonts and typography used on buttons."),title:(0,b.__)("Buttons")}};const Dh=function({element:e}){const[t,s]=(0,d.useState)("heading");return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(il,{title:Bh[e].title,description:Bh[e].description}),(0,oe.jsx)(y.__experimentalSpacer,{marginX:4,children:(0,oe.jsx)(Rh,{element:e,headingLevel:t})}),"heading"===e&&(0,oe.jsx)(y.__experimentalSpacer,{marginX:4,marginBottom:"1em",children:(0,oe.jsxs)(y.__experimentalToggleGroupControl,{label:(0,b.__)("Select heading level"),hideLabelFromVision:!0,value:t,onChange:s,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0,children:[(0,oe.jsx)(y.__experimentalToggleGroupControlOption,{value:"heading",showTooltip:!0,"aria-label":(0,b.__)("All headings"),label:(0,b._x)("All","heading levels")}),(0,oe.jsx)(y.__experimentalToggleGroupControlOption,{value:"h1",showTooltip:!0,"aria-label":(0,b.__)("Heading 1"),label:(0,b.__)("H1")}),(0,oe.jsx)(y.__experimentalToggleGroupControlOption,{value:"h2",showTooltip:!0,"aria-label":(0,b.__)("Heading 2"),label:(0,b.__)("H2")}),(0,oe.jsx)(y.__experimentalToggleGroupControlOption,{value:"h3",showTooltip:!0,"aria-label":(0,b.__)("Heading 3"),label:(0,b.__)("H3")}),(0,oe.jsx)(y.__experimentalToggleGroupControlOption,{value:"h4",showTooltip:!0,"aria-label":(0,b.__)("Heading 4"),label:(0,b.__)("H4")}),(0,oe.jsx)(y.__experimentalToggleGroupControlOption,{value:"h5",showTooltip:!0,"aria-label":(0,b.__)("Heading 5"),label:(0,b.__)("H5")}),(0,oe.jsx)(y.__experimentalToggleGroupControlOption,{value:"h6",showTooltip:!0,"aria-label":(0,b.__)("Heading 6"),label:(0,b.__)("H6")})]})}),(0,oe.jsx)(Vh,{element:e,headingLevel:t})]})},{useGlobalStyle:zh}=te(x.privateApis);const Lh=function({fontSize:e}){var t;const[s]=zh("typography"),n=e?.fluid?.min&&e?.fluid?.max?{minimumFontSize:e.fluid.min,maximumFontSize:e.fluid.max}:{fontSize:e.size},i=(0,x.getComputedFluidTypographyValue)(n);return(0,oe.jsx)("div",{className:"edit-site-typography-preview",style:{fontSize:i,fontFamily:null!==(t=s?.fontFamily)&&void 0!==t?t:"serif"},children:(0,b.__)("Aa")})};const Gh=function({fontSize:e,isOpen:t,toggleOpen:s,handleRemoveFontSize:n}){return(0,oe.jsx)(y.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,b.__)("Cancel"),confirmButtonText:(0,b.__)("Delete"),onCancel:()=>{s()},onConfirm:async()=>{s(),n(e)},size:"medium",children:e&&(0,b.sprintf)((0,b.__)('Are you sure you want to delete "%s" font size preset?'),e.name)})};const Hh=function({fontSize:e,toggleOpen:t,handleRename:s}){const[n,i]=(0,d.useState)(e.name);return(0,oe.jsx)(y.Modal,{onRequestClose:t,focusOnMount:"firstContentElement",title:(0,b.__)("Rename"),size:"small",children:(0,oe.jsx)("form",{onSubmit:e=>{e.preventDefault(),n.trim()&&s(n),t(),t()},children:(0,oe.jsxs)(y.__experimentalVStack,{spacing:"3",children:[(0,oe.jsx)(y.__experimentalInputControl,{__next40pxDefaultSize:!0,autoComplete:"off",value:n,onChange:i,label:(0,b.__)("Name"),placeholder:(0,b.__)("Font size preset name")}),(0,oe.jsxs)(y.__experimentalHStack,{justify:"right",children:[(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,b.__)("Cancel")}),(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,b.__)("Save")})]})]})})})},Uh=["px","em","rem","vw","vh"];const Wh=function({__nextHasNoMarginBottom:e,...t}){const{baseControlProps:s}=(0,y.useBaseControlProps)(t),{value:n,onChange:i,fallbackValue:r,disabled:o,label:a}=t,l=(0,y.__experimentalUseCustomUnits)({availableUnits:Uh}),[c,u="px"]=(0,y.__experimentalParseQuantityAndUnitFromRawValue)(n,l),d=!!u&&["em","rem","vw","vh"].includes(u);return(0,oe.jsx)(y.BaseControl,{...s,__nextHasNoMarginBottom:!0,children:(0,oe.jsxs)(y.Flex,{children:[(0,oe.jsx)(y.FlexItem,{isBlock:!0,children:(0,oe.jsx)(y.__experimentalUnitControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:a,hideLabelFromVision:!0,value:n,onChange:e=>{i(e)},units:l,min:0,disabled:o})}),(0,oe.jsx)(y.FlexItem,{isBlock:!0,children:(0,oe.jsx)(y.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,oe.jsx)(y.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:a,hideLabelFromVision:!0,value:c,initialPosition:r,withInputField:!1,onChange:e=>{i?.(e+u)},min:0,max:d?10:100,step:d?.1:1,disabled:o})})})]})})},{DropdownMenuV2:qh}=te(y.privateApis),{useGlobalSetting:Zh}=te(x.privateApis);const Kh=function(){var e;const[t,s]=(0,d.useState)(!1),[n,i]=(0,d.useState)(!1),{params:{origin:r,slug:o},goBack:a,goTo:l}=(0,y.__experimentalUseNavigator)(),[c,u]=Zh("typography.fontSizes"),[p]=Zh("typography.fluid"),h=null!==(e=c[r])&&void 0!==e?e:[],f=h.find((e=>e.slug===o)),m=void 0!==f.fluid?!!f.fluid:!!p,g="object"==typeof f.fluid,v=(e,t)=>{const s=h.map((s=>s.slug===o?{...s,[e]:t}:s));u({...c,[r]:s})},x=()=>{s(!t)},w=()=>{i(!n)};return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(Gh,{fontSize:f,isOpen:t,toggleOpen:x,handleRemoveFontSize:()=>{a();const e=h.filter((e=>e.slug!==o));u({...c,[r]:e})}}),n&&(0,oe.jsx)(Hh,{fontSize:f,toggleOpen:w,handleRename:e=>{v("name",e)}}),(0,oe.jsxs)(y.__experimentalVStack,{spacing:4,children:[(0,oe.jsxs)(y.__experimentalHStack,{justify:"space-between",align:"flex-start",children:[(0,oe.jsx)(il,{title:f.name,description:(0,b.sprintf)((0,b.__)("Manage the font size %s."),f.name),onBack:()=>l("/typography/font-sizes/")}),"custom"===r&&(0,oe.jsx)(y.FlexItem,{children:(0,oe.jsx)(y.__experimentalSpacer,{marginTop:3,marginBottom:0,paddingX:4,children:(0,oe.jsxs)(qh,{trigger:(0,oe.jsx)(y.Button,{size:"small",icon:ga,label:(0,b.__)("Font size options")}),children:[(0,oe.jsx)(qh.Item,{onClick:w,children:(0,oe.jsx)(qh.ItemLabel,{children:(0,b.__)("Rename")})}),(0,oe.jsx)(qh.Item,{onClick:x,children:(0,oe.jsx)(qh.ItemLabel,{children:(0,b.__)("Delete")})})]})})})]}),(0,oe.jsx)(y.__experimentalView,{children:(0,oe.jsx)(y.__experimentalSpacer,{paddingX:4,children:(0,oe.jsxs)(y.__experimentalVStack,{spacing:4,children:[(0,oe.jsx)(y.FlexItem,{children:(0,oe.jsx)(Lh,{fontSize:f})}),(0,oe.jsx)(Wh,{label:(0,b.__)("Size"),value:g?"":f.size,onChange:e=>{v("size",e)},disabled:g}),(0,oe.jsx)(y.ToggleControl,{label:(0,b.__)("Fluid typography"),help:(0,b.__)("Scale the font size dynamically to fit the screen or viewport."),checked:m,onChange:e=>{v("fluid",e)},__nextHasNoMarginBottom:!0}),m&&(0,oe.jsx)(y.ToggleControl,{label:(0,b.__)("Custom fluid values"),help:(0,b.__)("Set custom min and max values for the fluid font size."),checked:g,onChange:e=>{v("fluid",!e||{min:f.size,max:f.size})},__nextHasNoMarginBottom:!0}),g&&(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(Wh,{label:(0,b.__)("Minimum"),value:f.fluid?.min,onChange:e=>{v("fluid",{...f.fluid,min:e})}}),(0,oe.jsx)(Wh,{label:(0,b.__)("Maximum"),value:f.fluid?.max,onChange:e=>{v("fluid",{...f.fluid,max:e})}})]})]})})})]})]})},Yh=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});const Xh=function({text:e,confirmButtonText:t,isOpen:s,toggleOpen:n,onConfirm:i}){return(0,oe.jsx)(y.__experimentalConfirmDialog,{isOpen:s,cancelButtonText:(0,b.__)("Cancel"),confirmButtonText:t,onCancel:()=>{n()},onConfirm:async()=>{n(),i()},size:"medium",children:e})},{DropdownMenuV2:Jh}=te(y.privateApis),{useGlobalSetting:Qh}=te(x.privateApis);function $h({label:e,origin:t,sizes:s,handleAddFontSize:n,handleResetFontSizes:i}){const[r,o]=(0,d.useState)(!1),a=()=>o(!r),l="custom"===t?(0,b.__)("Are you sure you want to remove all custom font size presets?"):(0,b.__)("Are you sure you want to reset all font size presets to their default values?");return(0,oe.jsxs)(oe.Fragment,{children:[r&&(0,oe.jsx)(Xh,{text:l,confirmButtonText:"custom"===t?(0,b.__)("Remove"):(0,b.__)("Reset"),isOpen:r,toggleOpen:a,onConfirm:i}),(0,oe.jsxs)(y.__experimentalVStack,{spacing:4,children:[(0,oe.jsxs)(y.__experimentalHStack,{justify:"space-between",align:"center",children:[(0,oe.jsx)(gl,{level:3,children:e}),(0,oe.jsxs)(y.FlexItem,{children:["custom"===t&&(0,oe.jsx)(y.Button,{label:(0,b.__)("Add font size"),icon:Yh,size:"small",onClick:n}),!!i&&(0,oe.jsx)(Jh,{trigger:(0,oe.jsx)(y.Button,{size:"small",icon:ga,label:(0,b.__)("Font size presets options")}),children:(0,oe.jsx)(Jh.Item,{onClick:a,children:(0,oe.jsx)(Jh.ItemLabel,{children:"custom"===t?(0,b.__)("Remove font size presets"):(0,b.__)("Reset font size presets")})})})]})]}),!!s.length&&(0,oe.jsx)(y.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:s.map((e=>(0,oe.jsx)(wa,{path:`/typography/font-sizes/${t}/${e.slug}`,children:(0,oe.jsxs)(y.__experimentalHStack,{direction:"row",children:[(0,oe.jsx)(y.FlexItem,{className:"edit-site-font-size__item",children:e.name}),(0,oe.jsx)(y.FlexItem,{children:(0,oe.jsxs)(y.__experimentalHStack,{justify:"flex-end",children:[(0,oe.jsx)(y.FlexBlock,{className:"edit-site-font-size__item edit-site-font-size__item-value",children:e.size}),(0,oe.jsx)(Zo,{icon:(0,b.isRTL)()?va:xa})]})})]})},e.slug)))})]})]})}const ef=function(){const[e,t]=Qh("typography.fontSizes.theme"),[s]=Qh("typography.fontSizes.theme",null,"base"),[n,i]=Qh("typography.fontSizes.default"),[r]=Qh("typography.fontSizes.default",null,"base"),[o=[],a]=Qh("typography.fontSizes.custom"),[l]=Qh("typography.defaultFontSizes"),c=()=>{const e=Ra(o,"custom-"),t={name:(0,b.sprintf)((0,b.__)("New Font Size %d"),e),size:"16px",slug:`custom-${e}`};a([...o,t])},u=(e,t)=>e.map((e=>e.size)).join("")===t.map((e=>e.size)).join("");return(0,oe.jsxs)(y.__experimentalVStack,{spacing:2,children:[(0,oe.jsx)(il,{title:(0,b.__)("Font size presets"),description:(0,b.__)("Create and edit the presets used for font sizes across the site.")}),(0,oe.jsx)(y.__experimentalView,{children:(0,oe.jsx)(y.__experimentalSpacer,{paddingX:4,children:(0,oe.jsxs)(y.__experimentalVStack,{spacing:8,children:[!!e?.length&&(0,oe.jsx)($h,{label:(0,b.__)("Theme"),origin:"theme",sizes:e,baseSizes:s,handleAddFontSize:c,handleResetFontSizes:u(e,s)?null:()=>t(s)}),l&&!!n?.length&&(0,oe.jsx)($h,{label:(0,b.__)("Default"),origin:"default",sizes:n,baseSizes:r,handleAddFontSize:c,handleResetFontSizes:u(n,r)?null:()=>i(r)}),(0,oe.jsx)($h,{label:(0,b.__)("Custom"),origin:"custom",sizes:o,handleAddFontSize:c,handleResetFontSizes:o.length>0?()=>a([]):null})]})})})]})},tf=(0,oe.jsx)(Qt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/SVG",children:(0,oe.jsx)(Qt.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"})});const sf=function({className:e,...t}){return(0,oe.jsx)(y.Flex,{className:Ut("edit-site-global-styles__color-indicator-wrapper",e),...t})},{useGlobalSetting:nf}=te(x.privateApis),rf=[];const of=function({name:e}){const[t]=nf("color.palette.custom"),[s]=nf("color.palette.theme"),[n]=nf("color.palette.default"),[i]=nf("color.defaultPalette",e),[r]=function(e){const[t,s]=se("color.palette.theme",e);return window.__experimentalEnableColorRandomizer?[function(){const e=Math.floor(225*Math.random()),n=t.map((t=>{const{color:s}=t,n=Y(s).rotate(e).toHex();return{...t,color:n}}));s(n)}]:[]}(),o=(0,d.useMemo)((()=>[...t||rf,...s||rf,...n&&i?n:rf]),[t,s,n,i]),a=e?"/blocks/"+encodeURIComponent(e)+"/colors/palette":"/colors/palette",l=o.length>0?(0,b.__)("Edit palette"):(0,b.__)("Add colors");return(0,oe.jsxs)(y.__experimentalVStack,{spacing:3,children:[(0,oe.jsx)(gl,{level:3,children:(0,b.__)("Palette")}),(0,oe.jsx)(y.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,oe.jsx)(wa,{path:a,"aria-label":l,children:(0,oe.jsxs)(y.__experimentalHStack,{direction:"row",children:[o.length<=0&&(0,oe.jsx)(y.FlexItem,{children:(0,b.__)("Add colors")}),(0,oe.jsx)(y.__experimentalZStack,{isLayered:!1,offset:-8,children:o.slice(0,5).map((({color:e},t)=>(0,oe.jsx)(sf,{children:(0,oe.jsx)(y.ColorIndicator,{colorValue:e})},`${e}-${t}`)))}),(0,oe.jsx)(Zo,{icon:(0,b.isRTL)()?va:xa})]})})}),window.__experimentalEnableColorRandomizer&&s?.length>0&&(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,variant:"secondary",icon:tf,onClick:r,children:(0,b.__)("Randomize colors")})]})},{useGlobalStyle:af,useGlobalSetting:lf,useSettingsForBlockElement:cf,ColorPanel:uf}=te(x.privateApis);const df=function(){const[e]=af("",void 0,"user",{shouldDecodeEncode:!1}),[t,s]=af("",void 0,"all",{shouldDecodeEncode:!1}),[n]=lf(""),i=cf(n);return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(il,{title:(0,b.__)("Colors"),description:(0,b.__)("Palette colors and the application of those colors on site elements.")}),(0,oe.jsx)("div",{className:"edit-site-global-styles-screen",children:(0,oe.jsxs)(y.__experimentalVStack,{spacing:7,children:[(0,oe.jsx)(of,{}),(0,oe.jsx)(uf,{inheritedValue:t,value:e,onChange:s,settings:i})]})})]})};function pf(){const{paletteColors:e}=ie();return e.slice(0,4).map((({slug:e,color:t},s)=>(0,oe.jsx)("div",{style:{flexGrow:1,height:"100%",background:t}},`${e}-${s}`)))}const hf={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},ff=({label:e,isFocused:t,withHoverView:s})=>(0,oe.jsx)(qa,{label:e,isFocused:t,withHoverView:s,children:({key:e})=>(0,oe.jsx)(y.__unstableMotion.div,{variants:hf,style:{height:"100%",overflow:"hidden"},children:(0,oe.jsx)(y.__experimentalHStack,{spacing:0,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,oe.jsx)(pf,{})})},e)});function mf({title:e,gap:t=2}){const s=["color"],n=Zl(s);return n?.length<=1?null:(0,oe.jsxs)(y.__experimentalVStack,{spacing:3,children:[e&&(0,oe.jsx)(gl,{level:3,children:e}),(0,oe.jsx)(y.__experimentalGrid,{spacing:t,children:n.map(((e,t)=>(0,oe.jsx)($l,{variation:e,isPill:!0,properties:s,showTooltip:!0,children:()=>(0,oe.jsx)(ff,{})},t)))})]})}const{useGlobalSetting:gf}=te(x.privateApis),vf={placement:"bottom-start",offset:8};function xf({name:e}){const[t,s]=gf("color.palette.theme",e),[n]=gf("color.palette.theme",e,"base"),[i,r]=gf("color.palette.default",e),[o]=gf("color.palette.default",e,"base"),[a,l]=gf("color.palette.custom",e),[c]=gf("color.defaultPalette",e),u=(0,v.useViewportMatch)("small","<")?vf:void 0;return(0,oe.jsxs)(y.__experimentalVStack,{className:"edit-site-global-styles-color-palette-panel",spacing:8,children:[!!t&&!!t.length&&(0,oe.jsx)(y.__experimentalPaletteEdit,{canReset:t!==n,canOnlyChangeValues:!0,colors:t,onChange:s,paletteLabel:(0,b.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:u}),!!i&&!!i.length&&!!c&&(0,oe.jsx)(y.__experimentalPaletteEdit,{canReset:i!==o,canOnlyChangeValues:!0,colors:i,onChange:r,paletteLabel:(0,b.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:u}),(0,oe.jsx)(y.__experimentalPaletteEdit,{colors:a,onChange:l,paletteLabel:(0,b.__)("Custom"),paletteLabelHeadingLevel:3,slugPrefix:"custom-",popoverProps:u}),(0,oe.jsx)(mf,{title:(0,b.__)("Palettes")})]})}const{useGlobalSetting:yf}=te(x.privateApis),bf={placement:"bottom-start",offset:8},wf=()=>{};function _f({name:e}){const[t,s]=yf("color.gradients.theme",e),[n]=yf("color.gradients.theme",e,"base"),[i,r]=yf("color.gradients.default",e),[o]=yf("color.gradients.default",e,"base"),[a,l]=yf("color.gradients.custom",e),[c]=yf("color.defaultGradients",e),[u]=yf("color.duotone.custom")||[],[d]=yf("color.duotone.default")||[],[p]=yf("color.duotone.theme")||[],[h]=yf("color.defaultDuotone"),f=[...u||[],...p||[],...d&&h?d:[]],m=(0,v.useViewportMatch)("small","<")?bf:void 0;return(0,oe.jsxs)(y.__experimentalVStack,{className:"edit-site-global-styles-gradient-palette-panel",spacing:8,children:[!!t&&!!t.length&&(0,oe.jsx)(y.__experimentalPaletteEdit,{canReset:t!==n,canOnlyChangeValues:!0,gradients:t,onChange:s,paletteLabel:(0,b.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:m}),!!i&&!!i.length&&!!c&&(0,oe.jsx)(y.__experimentalPaletteEdit,{canReset:i!==o,canOnlyChangeValues:!0,gradients:i,onChange:r,paletteLabel:(0,b.__)("Default"),paletteLabelLevel:3,popoverProps:m}),(0,oe.jsx)(y.__experimentalPaletteEdit,{gradients:a,onChange:l,paletteLabel:(0,b.__)("Custom"),paletteLabelLevel:3,slugPrefix:"custom-",popoverProps:m}),!!f&&!!f.length&&(0,oe.jsxs)("div",{children:[(0,oe.jsx)(gl,{level:3,children:(0,b.__)("Duotone")}),(0,oe.jsx)(y.__experimentalSpacer,{margin:3}),(0,oe.jsx)(y.DuotonePicker,{duotonePalette:f,disableCustomDuotone:!0,disableCustomColors:!0,clearable:!1,onChange:wf})]})]})}const{Tabs:Sf}=te(y.privateApis);const jf=function({name:e}){return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(il,{title:(0,b.__)("Edit palette"),description:(0,b.__)("The combination of colors used across the site and in color pickers.")}),(0,oe.jsxs)(Sf,{children:[(0,oe.jsxs)(Sf.TabList,{children:[(0,oe.jsx)(Sf.Tab,{tabId:"color",children:(0,b.__)("Color")}),(0,oe.jsx)(Sf.Tab,{tabId:"gradient",children:(0,b.__)("Gradient")})]}),(0,oe.jsx)(Sf.TabPanel,{tabId:"color",focusable:!1,children:(0,oe.jsx)(xf,{name:e})}),(0,oe.jsx)(Sf.TabPanel,{tabId:"gradient",focusable:!1,children:(0,oe.jsx)(_f,{name:e})})]})]})},Cf={backgroundSize:"auto"},{useGlobalStyle:kf,useGlobalSetting:Ef,BackgroundPanel:Pf}=te(x.privateApis);function If(){const[e]=kf("",void 0,"user",{shouldDecodeEncode:!1}),[t,s]=kf("",void 0,"all",{shouldDecodeEncode:!1}),[n]=Ef("");return(0,oe.jsx)(Pf,{inheritedValue:t,value:e,onChange:s,settings:n,defaultValues:Cf})}const{useHasBackgroundPanel:Tf,useGlobalSetting:Of}=te(x.privateApis);const Af=function(){const[e]=Of(""),t=Tf(e);return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(il,{title:(0,b.__)("Background"),description:(0,oe.jsx)(y.__experimentalText,{children:(0,b.__)("Set styles for the sites background.")})}),t&&(0,oe.jsx)(If,{})]})},{useGlobalSetting:Nf}=te(x.privateApis),Mf="6px 6px 9px rgba(0, 0, 0, 0.2)";function Vf(){const[e]=Nf("shadow.presets.default"),[t]=Nf("shadow.defaultPresets"),[s]=Nf("shadow.presets.theme"),[n,i]=Nf("shadow.presets.custom");return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(il,{title:(0,b.__)("Shadows"),description:(0,b.__)("Manage and create shadow styles for use across the site.")}),(0,oe.jsx)("div",{className:"edit-site-global-styles-screen",children:(0,oe.jsxs)(y.__experimentalVStack,{className:"edit-site-global-styles__shadows-panel",spacing:7,children:[t&&(0,oe.jsx)(Ff,{label:(0,b.__)("Default"),shadows:e||[],category:"default"}),s&&s.length>0&&(0,oe.jsx)(Ff,{label:(0,b.__)("Theme"),shadows:s||[],category:"theme"}),(0,oe.jsx)(Ff,{label:(0,b.__)("Custom"),shadows:n||[],category:"custom",canCreate:!0,onCreate:e=>{i([...n||[],e])}})]})})]})}function Ff({label:e,shadows:t,category:s,canCreate:n,onCreate:i}){return(0,oe.jsxs)(y.__experimentalVStack,{spacing:2,children:[(0,oe.jsxs)(y.__experimentalHStack,{justify:"space-between",children:[(0,oe.jsx)(y.Flex,{align:"center",className:"edit-site-global-styles__shadows-panel__title",children:(0,oe.jsx)(gl,{level:3,children:e})}),n&&(0,oe.jsx)(y.FlexItem,{className:"edit-site-global-styles__shadows-panel__options-container",children:(0,oe.jsx)(y.Button,{size:"small",icon:Yh,label:(0,b.__)("Add shadow"),onClick:()=>{(()=>{const e=Ra(t,"shadow-");i({name:(0,b.sprintf)((0,b.__)("Shadow %s"),e),shadow:Mf,slug:`shadow-${e}`})})()}})})]}),t.length>0&&(0,oe.jsx)(y.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map((e=>(0,oe.jsx)(Rf,{shadow:e,category:s},e.slug)))})]})}function Rf({shadow:e,category:t}){return(0,oe.jsx)(wa,{path:`/shadows/edit/${t}/${e.slug}`,"aria-label":(0,b.sprintf)("Edit shadow %s",e.name),icon:Ca,children:e.name})}const Bf=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.Path,{d:"M7 11.5h10V13H7z"})});const{useGlobalSetting:Df}=te(x.privateApis),{DropdownMenuV2:zf}=te(y.privateApis),Lf=[{label:(0,b.__)("Rename"),action:"rename"},{label:(0,b.__)("Delete"),action:"delete"}],Gf=[{label:(0,b.__)("Reset"),action:"reset"}];function Hf(){const{params:{category:e,slug:t},goTo:s}=(0,y.__experimentalUseNavigator)(),[n,i]=Df(`shadow.presets.${e}`),[r]=Df(`shadow.presets.${e}`,void 0,"base"),[o,a]=(0,d.useState)((()=>(n||[]).find((e=>e.slug===t)))),l=(0,d.useMemo)((()=>(r||[]).find((e=>e.slug===t))),[r,t]),[c,u]=(0,d.useState)(!1),[p,h]=(0,d.useState)(!1),[f,m]=(0,d.useState)(o.name);return o?(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsxs)(y.__experimentalHStack,{justify:"space-between",children:[(0,oe.jsx)(il,{title:o.name}),(0,oe.jsx)(y.FlexItem,{children:(0,oe.jsx)(y.__experimentalSpacer,{marginTop:2,marginBottom:0,paddingX:4,children:(0,oe.jsx)(zf,{trigger:(0,oe.jsx)(y.Button,{size:"small",icon:ga,label:(0,b.__)("Menu")}),children:("custom"===e?Lf:Gf).map((e=>(0,oe.jsx)(zf.Item,{onClick:()=>(e=>{if("reset"===e){const e=n.map((e=>e.slug===t?l:e));a(l),i(e)}else"delete"===e?u(!0):"rename"===e&&h(!0)})(e.action),disabled:"reset"===e.action&&o.shadow===l.shadow,children:(0,oe.jsx)(zf.ItemLabel,{children:e.label})},e.action)))})})})]}),(0,oe.jsxs)("div",{className:"edit-site-global-styles-screen",children:[(0,oe.jsx)(Uf,{shadow:o.shadow}),(0,oe.jsx)(Wf,{shadow:o.shadow,onChange:e=>{a({...o,shadow:e});const s=n.map((s=>s.slug===t?{...o,shadow:e}:s));i(s)}})]}),c&&(0,oe.jsx)(y.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{(()=>{const e=n.filter((e=>e.slug!==t));i(e),s("/shadows")})(),u(!1)},onCancel:()=>{u(!1)},confirmButtonText:(0,b.__)("Delete"),size:"medium",children:(0,b.sprintf)('Are you sure you want to delete "%s"?',o.name)}),p&&(0,oe.jsx)(y.Modal,{title:(0,b.__)("Rename"),onRequestClose:()=>h(!1),size:"small",children:(0,oe.jsxs)("form",{onSubmit:e=>{e.preventDefault(),(e=>{if(!e)return;const s=n.map((s=>s.slug===t?{...o,name:e}:s));a({...o,name:e}),i(s)})(f),h(!1)},children:[(0,oe.jsx)(y.__experimentalInputControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,b.__)("Name"),placeholder:(0,b.__)("Shadow name"),value:f,onChange:e=>m(e)}),(0,oe.jsx)(y.__experimentalSpacer,{marginBottom:6}),(0,oe.jsxs)(y.Flex,{className:"block-editor-shadow-edit-modal__actions",justify:"flex-end",expanded:!1,children:[(0,oe.jsx)(y.FlexItem,{children:(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>h(!1),children:(0,b.__)("Cancel")})}),(0,oe.jsx)(y.FlexItem,{children:(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,b.__)("Save")})})]})]})})]}):(0,oe.jsx)(il,{title:""})}function Uf({shadow:e}){const t={boxShadow:e};return(0,oe.jsx)(y.__experimentalSpacer,{marginBottom:4,marginTop:-2,children:(0,oe.jsx)(y.__experimentalHStack,{align:"center",justify:"center",className:"edit-site-global-styles__shadow-preview-panel",children:(0,oe.jsx)("div",{className:"edit-site-global-styles__shadow-preview-block",style:t})})})}function Wf({shadow:e,onChange:t}){const s=(0,d.useMemo)((()=>function(e){return(e.match(/(?:[^,(]|\([^)]*\))+/g)||[]).map((e=>e.trim()))}(e)),[e]);return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(y.__experimentalVStack,{spacing:2,children:(0,oe.jsxs)(y.__experimentalHStack,{justify:"space-between",children:[(0,oe.jsx)(y.Flex,{align:"center",className:"edit-site-global-styles__shadows-panel__title",children:(0,oe.jsx)(gl,{level:3,children:(0,b.__)("Shadows")})}),(0,oe.jsx)(y.FlexItem,{className:"edit-site-global-styles__shadows-panel__options-container",children:(0,oe.jsx)(y.Button,{size:"small",icon:Yh,label:(0,b.__)("Add shadow"),onClick:()=>{s.push(Mf),t(s.join(", "))}})})]})}),(0,oe.jsx)(y.__experimentalSpacer,{}),(0,oe.jsx)(y.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:s.map(((e,n)=>(0,oe.jsx)(qf,{shadow:e,onChange:e=>((e,n)=>{s[e]=n,t(s.join(", "))})(n,e),canRemove:s.length>1,onRemove:()=>(e=>{s.splice(e,1),t(s.join(", "))})(n)},n)))})]})}function qf({shadow:e,onChange:t,canRemove:s,onRemove:n}){const i=(0,d.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 s=/((?:^|\s+)(-?\d*\.?\d+(?:px|%|in|cm|mm|em|rem|ex|pt|pc|vh|vw|vmin|vmax|ch|lh)?)(?=\s|$)(?![^(]*\))){1,4}/g,n=e.match(s)||[];if(1!==n.length)return t;const i=n[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 o=1===r.length;let a=e.replace(s,"").trim();o&&(a=a.replace("inset","").replace("INSET","").trim());let l=(a.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=a.trim().split(" ").filter((e=>e)),l.length>1))return t;const[c,u,d,p]=i;return{x:c,y:u,blur:d||t.blur,spread:p||t.spread,inset:o,color:a||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,oe.jsx)(y.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:Ut("edit-site-global-styles__shadow-editor__dropdown-toggle",{"is-open":t}),"aria-expanded":t},o={onClick:n,className:Ut("edit-site-global-styles__shadow-editor__remove-button",{"is-open":t}),label:(0,b.__)("Remove shadow")};return(0,oe.jsxs)(y.__experimentalHStack,{align:"center",justify:"flex-start",spacing:0,children:[(0,oe.jsx)(y.FlexItem,{style:{flexGrow:1},children:(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,icon:Ca,...r,children:i.inset?(0,b.__)("Inner shadow"):(0,b.__)("Drop shadow")})}),s&&(0,oe.jsx)(y.FlexItem,{children:(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,icon:Bf,...o})})]})},renderContent:()=>(0,oe.jsx)(y.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"edit-site-global-styles__shadow-editor__dropdown-content",children:(0,oe.jsx)(Zf,{shadowObj:i,onChange:r})})})}function Zf({shadowObj:e,onChange:t}){const s=(s,n)=>{const i={...e,[s]:n};t(i)};return(0,oe.jsxs)(y.__experimentalVStack,{spacing:4,className:"edit-site-global-styles__shadow-editor-panel",children:[(0,oe.jsx)(y.ColorPalette,{clearable:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,value:e.color,onChange:e=>s("color",e)}),(0,oe.jsxs)(y.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,value:e.inset?"inset":"outset",isBlock:!0,onChange:e=>s("inset","inset"===e),hideLabelFromVision:!0,__next40pxDefaultSize:!0,children:[(0,oe.jsx)(y.__experimentalToggleGroupControlOption,{value:"outset",label:(0,b.__)("Outset")}),(0,oe.jsx)(y.__experimentalToggleGroupControlOption,{value:"inset",label:(0,b.__)("Inset")})]}),(0,oe.jsxs)(y.__experimentalGrid,{columns:2,gap:4,children:[(0,oe.jsx)(Kf,{label:(0,b.__)("X Position"),value:e.x,onChange:e=>s("x",e)}),(0,oe.jsx)(Kf,{label:(0,b.__)("Y Position"),value:e.y,onChange:e=>s("y",e)}),(0,oe.jsx)(Kf,{label:(0,b.__)("Blur"),value:e.blur,onChange:e=>s("blur",e)}),(0,oe.jsx)(Kf,{label:(0,b.__)("Spread"),value:e.spread,onChange:e=>s("spread",e)})]})]})}function Kf({label:e,value:t,onChange:s}){return(0,oe.jsx)(y.__experimentalUnitControl,{label:e,__next40pxDefaultSize:!0,value:t,onChange:e=>{const t=void 0!==e&&!isNaN(parseFloat(e));s(t?e:"0px")}})}function Yf(){return(0,oe.jsx)(Vf,{})}function Xf(){return(0,oe.jsx)(Hf,{})}const{useGlobalStyle:Jf,useGlobalSetting:Qf,useSettingsForBlockElement:$f,DimensionsPanel:em}=te(x.privateApis),tm={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,minHeight:!0,childLayout:!1};function sm(){const[e]=Jf("",void 0,"user",{shouldDecodeEncode:!1}),[t,s]=Jf("",void 0,"all",{shouldDecodeEncode:!1}),[n]=Qf("",void 0,"user"),[i,r]=Qf(""),o=$f(i),a=(0,d.useMemo)((()=>({...t,layout:o.layout})),[t,o.layout]),l=(0,d.useMemo)((()=>({...e,layout:n.layout})),[e,n.layout]);return(0,oe.jsx)(em,{inheritedValue:a,value:l,onChange:e=>{const t={...e};if(delete t.layout,s(t),e.layout!==n.layout){const t={...n,layout:e.layout};t.layout?.definitions&&delete t.layout.definitions,r(t)}},settings:o,includeLayoutControls:!0,defaultControls:tm})}const{useHasDimensionsPanel:nm,useGlobalSetting:im,useSettingsForBlockElement:rm}=te(x.privateApis);const om=function(){const[e]=im(""),t=rm(e),s=nm(t);return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(il,{title:(0,b.__)("Layout")}),s&&(0,oe.jsx)(sm,{})]})},{GlobalStylesContext:am}=te(x.privateApis);function lm({gap:e=2}){const{user:t}=(0,d.useContext)(am),[s,n]=(0,d.useState)(t),i=s?.styles;(0,d.useEffect)((()=>{n(t)}),[t]);const r=(0,l.useSelect)((e=>e(_.store).__experimentalGetCurrentThemeGlobalStylesVariations()),[]),o=r?.filter((e=>!Yl(e,["color"])&&!Yl(e,["typography","spacing"]))),a=(0,d.useMemo)((()=>[...[{title:(0,b.__)("Default"),settings:{},styles:{}},...null!=o?o:[]].map((e=>{var t;const s={...e?.styles?.blocks}||{};i?.blocks&&Object.keys(i.blocks).forEach((e=>{if(i.blocks[e].css){const t=s[e]||{},n={css:`${s[e]?.css||""} ${i.blocks[e].css.trim()||""}`};s[e]={...t,...n}}}));const n=i?.css||e.styles?.css?{css:`${e.styles?.css||""} ${i?.css||""}`}:{},r=Object.keys(s).length>0?{blocks:s}:{},o={...e.styles,...n,...r};return{...e,settings:null!==(t=e.settings)&&void 0!==t?t:{},styles:o}}))]),[o,i?.blocks,i?.css]);return!o||o?.length<1?null:(0,oe.jsx)(y.__experimentalGrid,{columns:2,className:"edit-site-global-styles-style-variations-container",gap:e,children:a.map(((e,t)=>(0,oe.jsx)($l,{variation:e,children:t=>(0,oe.jsx)(Ja,{label:e?.title,withHoverView:!0,isFocused:t,variation:e})},t)))})}const cm=()=>{};function um(){const{storedSettings:e}=(0,l.useSelect)((e=>{const{getSettings:t}=te(e(zt));return{storedSettings:t()}}),[]);return(0,oe.jsx)(x.BlockEditorProvider,{settings:e,onChange:cm,onInput:cm,children:(0,oe.jsxs)(y.__experimentalVStack,{spacing:10,className:"edit-site-global-styles-variation-container",children:[(0,oe.jsx)(lm,{gap:3}),(0,oe.jsx)(mf,{title:(0,b.__)("Palettes"),gap:3}),(0,oe.jsx)(ec,{title:(0,b.__)("Typography"),gap:3})]})})}const dm=function(){return(0,x.useZoomOut)(),(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(il,{title:(0,b.__)("Browse styles"),description:(0,b.__)("Choose a variation to change the look of the site.")}),(0,oe.jsx)(y.Card,{size:"small",isBorderless:!0,className:"edit-site-global-styles-screen-style-variations",children:(0,oe.jsx)(y.CardBody,{children:(0,oe.jsx)(um,{})})})]})},pm=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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"})}),{EditorContentSlotFill:hm,ResizableEditor:fm}=te(h.privateApis);function mm(e){switch(e){case"style-book":return(0,b.__)("Style Book");case"global-styles-revisions":case"global-styles-revisions:style-book":return(0,b.__)("Style Revisions");default:return""}}function gm(){const e=(0,y.__experimentalUseSlotFills)(hm.privateKey);return!!e?.length}const vm=function({children:e,closeButtonLabel:t,onClose:s,enableResizing:n=!1}){const{editorCanvasContainerView:i,showListViewByDefault:r}=(0,l.useSelect)((e=>({editorCanvasContainerView:te(e(zt)).getEditorCanvasContainerView(),showListViewByDefault:e(f.store).get("core","showListViewByDefault")})),[]),[o,a]=(0,d.useState)(!1),{setEditorCanvasContainerView:c}=te((0,l.useDispatch)(zt)),{setIsListViewOpened:u}=(0,l.useDispatch)(h.store),p=(0,v.useFocusOnMount)("firstElement"),m=(0,v.useFocusReturn)();function g(){u(r),c(void 0),a(!0),"function"==typeof s&&s()}const x=Array.isArray(e)?d.Children.map(e,((e,t)=>0===t?(0,d.cloneElement)(e,{ref:m}):e)):(0,d.cloneElement)(e,{ref:m});if(o)return null;const w=mm(i),_=s||t;return(0,oe.jsx)(hm.Fill,{children:(0,oe.jsx)("div",{className:"edit-site-editor-canvas-container",children:(0,oe.jsx)(fm,{enableResizing:n,children:(0,oe.jsxs)("section",{className:"edit-site-editor-canvas-container__section",ref:_?p:null,onKeyDown:function(e){e.keyCode!==es.ESCAPE||e.defaultPrevented||(e.preventDefault(),g())},"aria-label":w,children:[_&&(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,className:"edit-site-editor-canvas-container__close-button",icon:pm,label:t||(0,b.__)("Close"),onClick:g}),x]})})})})},{ExperimentalBlockEditorProvider:xm,useGlobalStyle:ym,GlobalStylesContext:bm,useGlobalStylesOutputWithConfig:wm}=te(x.privateApis),{mergeBaseAndUserConfigs:_m}=te(h.privateApis),{Tabs:Sm}=te(y.privateApis);function jm(e){return!e||0===Object.keys(e).length}function Cm(){const e=(0,o.getBlockTypes)().filter((e=>{const{name:t,example:s,supports:n}=e;return"core/heading"!==t&&!!s&&!1!==n.inserter})).map((e=>({name:e.name,title:e.title,category:e.category,blocks:(0,o.getBlockFromExample)(e.name,e.example)})));if(!!!(0,o.getBlockType)("core/heading"))return e;return[{name:"core/heading",title:(0,b.__)("Headings"),category:"text",blocks:[1,2,3,4,5,6].map((e=>(0,o.createBlock)("core/heading",{content:(0,b.sprintf)((0,b.__)("Heading %d"),e),level:e})))},...e]}const km=({category:e,examples:t,isSelected:s,onClick:n,onSelect:i,settings:r,sizes:o,title:a})=>{const[l,c]=(0,d.useState)(!1),u={role:"button",onFocus:()=>c(!0),onBlur:()=>c(!1),onKeyDown:e=>{if(e.defaultPrevented)return;const{keyCode:t}=e;!n||t!==es.ENTER&&t!==es.SPACE||(e.preventDefault(),n(e))},onClick:e=>{e.defaultPrevented||n&&(e.preventDefault(),n(e))},readonly:!0},p=n?"body { cursor: pointer; } body * { pointer-events: none; }":"";return(0,oe.jsxs)(x.__unstableIframe,{className:Ut("edit-site-style-book__iframe",{"is-focused":l&&!!n,"is-button":!!n}),name:"style-book-canvas",tabIndex:0,...n?u:{},children:[(0,oe.jsx)(x.__unstableEditorStyles,{styles:r.styles}),(0,oe.jsx)("style",{children:'.is-root-container { display: flow-root; }\n\t\t\t\t\t\tbody { position: relative; padding: 32px !important; }\n\t.edit-site-style-book__examples {\n\t\tmax-width: 900px;\n\t\tmargin: 0 auto;\n\t}\n\n\t.edit-site-style-book__example {\n\t\tborder-radius: 2px;\n\t\tcursor: pointer;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 40px;\n\t\tmargin-bottom: 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}\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: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__examples.is-wide .edit-site-style-book__example {\n\t\tflex-direction: row;\n\t}\n\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: 11px;\n\t\tfont-weight: 500;\n\t\tline-height: normal;\n\t\tmargin: 0;\n\t\ttext-align: left;\n\t\ttext-transform: uppercase;\n\t}\n\n\t.edit-site-style-book__examples.is-wide .edit-site-style-book__example-title {\n\t\ttext-align: right;\n\t\twidth: 120px;\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\n\t.edit-site-style-book__example-preview .is-root-container > .wp-block:first-child {\n\t\tmargin-top: 0;\n\t}\n\t.edit-site-style-book__example-preview .is-root-container > .wp-block:last-child {\n\t\tmargin-bottom: 0;\n\t}\n'+p}),(0,oe.jsx)(Em,{className:Ut("edit-site-style-book__examples",{"is-wide":o.width>600}),examples:t,category:e,label:a?(0,b.sprintf)((0,b.__)("Examples of blocks in the %s category"),a):(0,b.__)("Examples of blocks"),isSelected:s,onSelect:i},e)]})},Em=(0,d.memo)((({className:e,examples:t,category:s,label:n,isSelected:i,onSelect:r})=>(0,oe.jsx)(y.Composite,{orientation:"vertical",className:e,"aria-label":n,role:"grid",children:t.filter((e=>!s||e.category===s)).map((e=>(0,oe.jsx)(Pm,{id:`example-${e.name}`,title:e.title,blocks:e.blocks,isSelected:i(e.name),onClick:()=>{r?.(e.name)}},e.name)))}))),Pm=({id:e,title:t,blocks:s,isSelected:n,onClick:i})=>{const r=(0,l.useSelect)((e=>e(x.store).getSettings()),[]),o=(0,d.useMemo)((()=>({...r,focusMode:!1,__unstableIsPreviewMode:!0})),[r]),a=(0,d.useMemo)((()=>Array.isArray(s)?s:[s]),[s]);return(0,oe.jsx)("div",{role:"row",children:(0,oe.jsx)("div",{role:"gridcell",children:(0,oe.jsxs)(y.Composite.Item,{className:Ut("edit-site-style-book__example",{"is-selected":n}),id:e,"aria-label":(0,b.sprintf)((0,b.__)("Open %s styles in Styles panel"),t),render:(0,oe.jsx)("div",{}),role:"button",onClick:i,children:[(0,oe.jsx)("span",{className:"edit-site-style-book__example-title",children:t}),(0,oe.jsx)("div",{className:"edit-site-style-book__example-preview","aria-hidden":!0,children:(0,oe.jsx)(y.Disabled,{className:"edit-site-style-book__example-preview__content",children:(0,oe.jsx)(xm,{value:a,settings:o,children:(0,oe.jsx)(x.BlockList,{renderAppender:!1})})})})]})})})},Im=function({enableResizing:e=!0,isSelected:t,onClick:s,onSelect:n,showCloseButton:i=!0,onClose:r,showTabs:a=!0,userConfig:c={}}){const[u,p]=(0,v.useResizeObserver)(),[h]=ym("color.text"),[f]=ym("color.background"),[m]=(0,d.useState)(Cm),g=(0,d.useMemo)((()=>(0,o.getCategories)().filter((e=>m.some((t=>t.category===e.slug)))).map((e=>({name:e.slug,title:e.title,icon:e.icon})))),[m]),{base:y}=(0,d.useContext)(bm),w=(0,d.useMemo)((()=>jm(c)||jm(y)?{}:_m(y,c)),[y,c]),_=(0,l.useSelect)((e=>e(x.store).getSettings()),[]),S=(0,d.useMemo)((()=>({..._,__unstableIsPreviewMode:!0})),[_]),[j]=wm(w);return S.styles=jm(j)||jm(c)?S.styles:j,(0,oe.jsx)(vm,{onClose:r,enableResizing:e,closeButtonLabel:i?(0,b.__)("Close"):null,children:(0,oe.jsxs)("div",{className:Ut("edit-site-style-book",{"is-wide":p.width>600,"is-button":!!s}),style:{color:h,background:f},children:[u,a?(0,oe.jsx)("div",{className:"edit-site-style-book__tabs",children:(0,oe.jsxs)(Sm,{children:[(0,oe.jsx)(Sm.TabList,{children:g.map((e=>(0,oe.jsx)(Sm.Tab,{tabId:e.name,children:e.title},e.name)))}),g.map((e=>(0,oe.jsx)(Sm.TabPanel,{tabId:e.name,focusable:!1,children:(0,oe.jsx)(km,{category:e.name,examples:m,isSelected:t,onSelect:n,settings:S,sizes:p,title:e.title})},e.name)))]})}):(0,oe.jsx)(km,{examples:m,isSelected:t,onClick:s,onSelect:n,settings:S,sizes:p})]})})},{useGlobalStyle:Tm,AdvancedPanel:Om}=te(x.privateApis);const Am=function(){const e=(0,b.__)("Add your own CSS to customize the appearance and layout of your site."),[t]=Tm("",void 0,"user",{shouldDecodeEncode:!1}),[s,n]=Tm("",void 0,"all",{shouldDecodeEncode:!1});return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(il,{title:(0,b.__)("CSS"),description:(0,oe.jsxs)(oe.Fragment,{children:[e,(0,oe.jsx)(y.ExternalLink,{href:(0,b.__)("https://developer.wordpress.org/advanced-administration/wordpress/css/"),className:"edit-site-global-styles-screen-css-help-link",children:(0,b.__)("Learn more about CSS")})]})}),(0,oe.jsx)("div",{className:"edit-site-global-styles-screen-css",children:(0,oe.jsx)(Om,{value:t,onChange:n,inheritedValue:s})})]})},{ExperimentalBlockEditorProvider:Nm,GlobalStylesContext:Mm,useGlobalStylesOutputWithConfig:Vm,__unstableBlockStyleVariationOverridesWithConfig:Fm}=te(x.privateApis),{mergeBaseAndUserConfigs:Rm}=te(h.privateApis);function Bm(e){return!e||0===Object.keys(e).length}const Dm=function({userConfig:e,blocks:t}){const{base:s}=(0,d.useContext)(Mm),n=(0,d.useMemo)((()=>Bm(e)||Bm(s)?{}:Rm(s,e)),[s,e]),i=(0,d.useMemo)((()=>Array.isArray(t)?t:[t]),[t]),r=(0,l.useSelect)((e=>e(x.store).getSettings()),[]),o=(0,d.useMemo)((()=>({...r,__unstableIsPreviewMode:!0})),[r]),[a]=Vm(n),c=Bm(a)||Bm(e)?o.styles:a;return(0,oe.jsx)(vm,{title:(0,b.__)("Revisions"),closeButtonLabel:(0,b.__)("Close revisions"),enableResizing:!0,children:(0,oe.jsxs)(x.__unstableIframe,{className:"edit-site-revisions__iframe",name:"revisions",tabIndex:0,children:[(0,oe.jsx)("style",{children:".is-root-container { display: flow-root; }"}),(0,oe.jsx)(y.Disabled,{className:"edit-site-revisions__example-preview__content",children:(0,oe.jsxs)(Nm,{value:i,settings:o,children:[(0,oe.jsx)(x.BlockList,{renderAppender:!1}),(0,oe.jsx)(x.__unstableEditorStyles,{styles:c}),(0,oe.jsx)(Fm,{config:n})]})})]})})},zm={per_page:-1,_fields:"id,name,avatar_urls",context:"view",capabilities:["edit_theme_options"]},Lm={per_page:100,page:1},Gm=[],{GlobalStylesContext:Hm}=te(x.privateApis);function Um({query:e}={}){const{user:t}=(0,d.useContext)(Hm),s={...Lm,...e},{authors:n,currentUser:i,isDirty:r,revisions:o,isLoadingGlobalStylesRevisions:a,revisionsCount:c}=(0,l.useSelect)((e=>{var t;const{__experimentalGetDirtyEntityRecords:n,getCurrentUser:i,getUsers:r,getRevisions:o,__experimentalGetCurrentGlobalStylesId:a,getEntityRecord:l,isResolving:c}=e(_.store),u=n(),d=i(),p=u.length>0,h=a(),f=h?l("root","globalStyles",h):void 0,m=null!==(t=f?._links?.["version-history"]?.[0]?.count)&&void 0!==t?t:0,g=o("root","globalStyles",h,s)||Gm;return{authors:r(zm)||Gm,currentUser:d,isDirty:p,revisions:g,isLoadingGlobalStylesRevisions:c("getRevisions",["root","globalStyles",h,s]),revisionsCount:m}}),[e]);return(0,d.useMemo)((()=>{if(!n.length||a)return{revisions:Gm,hasUnsavedChanges:r,isLoading:!0,revisionsCount:c};const e=o.map((e=>({...e,author:n.find((t=>t.id===e.author))})));if(o.length){if("unsaved"!==e[0].id&&1===s.page&&(e[0].isLatest=!0),r&&t&&Object.keys(t).length>0&&i&&1===s.page){const s={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(s)}s.page===Math.ceil(c/s.per_page)&&e.push({id:"parent",styles:{},settings:{}})}return{revisions:e,hasUnsavedChanges:r,isLoading:!1,revisionsCount:c}}),[r,o,i,n,t,a])}const Wm=window.wp.date,{getGlobalStylesChanges:qm}=te(x.privateApis);function Zm({revision:e,previousRevision:t}){const s=qm(e,t,{maxResults:7});return s.length?(0,oe.jsx)("ul",{"data-testid":"global-styles-revision-changes",className:"edit-site-global-styles-screen-revisions__changes",children:s.map((e=>(0,oe.jsx)("li",{children:e},e)))}):null}const Km=function({userRevisions:e,selectedRevisionId:t,onChange:s,canApplyRevision:n,onApplyRevision:i}){const{currentThemeName:r,currentUser:o}=(0,l.useSelect)((e=>{const{getCurrentTheme:t,getCurrentUser:s}=e(_.store),n=t();return{currentThemeName:n?.name?.rendered||n?.stylesheet,currentUser:s()}}),[]),a=(0,Wm.getDate)().getTime(),{datetimeAbbreviated:c}=(0,Wm.getSettings)().formats;return(0,oe.jsx)("ol",{className:"edit-site-global-styles-screen-revisions__revisions-list","aria-label":(0,b.__)("Global styles revisions list"),role:"group",children:e.map(((l,u)=>{const{id:d,author:p,modified:h}=l,f="unsaved"===d,m=f?o:p,g=m?.name||(0,b.__)("User"),v=m?.avatar_urls?.[48],x=t?t===d:0===u,w=!n&&x,_="parent"===d,S=(0,Wm.getDate)(h),j=h&&a-S.getTime()>864e5?(0,Wm.dateI18n)(c,S):(0,Wm.humanTimeDiff)(h),C=function(e,t,s,n){return"parent"===e?(0,b.__)("Reset the styles to the theme defaults"):"unsaved"===e?(0,b.sprintf)((0,b.__)("Unsaved changes by %s"),t):n?(0,b.sprintf)((0,b.__)("Changes saved by %1$s on %2$s. This revision matches current editor styles."),t,s):(0,b.sprintf)((0,b.__)("Changes saved by %1$s on %2$s"),t,s)}(d,g,(0,Wm.dateI18n)(c,S),w);return(0,oe.jsxs)("li",{className:Ut("edit-site-global-styles-screen-revisions__revision-item",{"is-selected":x,"is-active":w,"is-reset":_}),"aria-current":x,children:[(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,className:"edit-site-global-styles-screen-revisions__revision-button",accessibleWhenDisabled:!0,disabled:x,onClick:()=>{s(l)},"aria-label":C,children:_?(0,oe.jsxs)("span",{className:"edit-site-global-styles-screen-revisions__description",children:[(0,b.__)("Default styles"),(0,oe.jsx)("span",{className:"edit-site-global-styles-screen-revisions__meta",children:r})]}):(0,oe.jsxs)("span",{className:"edit-site-global-styles-screen-revisions__description",children:[f?(0,oe.jsx)("span",{className:"edit-site-global-styles-screen-revisions__date",children:(0,b.__)("(Unsaved)")}):(0,oe.jsx)("time",{className:"edit-site-global-styles-screen-revisions__date",dateTime:h,children:j}),(0,oe.jsxs)("span",{className:"edit-site-global-styles-screen-revisions__meta",children:[(0,oe.jsx)("img",{alt:g,src:v}),g]}),x&&(0,oe.jsx)(Zm,{revision:l,previousRevision:u<e.length?e[u+1]:{}})]})}),x&&(w?(0,oe.jsx)("p",{className:"edit-site-global-styles-screen-revisions__applied-text",children:(0,b.__)("These styles are already applied to your site.")}):(0,oe.jsx)(y.Button,{size:"compact",variant:"primary",className:"edit-site-global-styles-screen-revisions__apply-button",onClick:i,children:_?(0,b.__)("Reset to defaults"):(0,b.__)("Apply")}))]},d)}))})},Ym=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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"})}),Xm=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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 Jm({currentPage:e,numPages:t,changePage:s,totalItems:n,className:i,disabled:r=!1,buttonVariant:o="tertiary",label:a=(0,b.__)("Pagination Navigation")}){return(0,oe.jsxs)(y.__experimentalHStack,{expanded:!1,as:"nav","aria-label":a,spacing:3,justify:"flex-start",className:Ut("edit-site-pagination",i),children:[(0,oe.jsx)(y.__experimentalText,{variant:"muted",className:"edit-site-pagination__total",children:(0,b.sprintf)((0,b._n)("%s item","%s items",n),n)}),(0,oe.jsxs)(y.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,oe.jsx)(y.Button,{variant:o,onClick:()=>s(1),accessibleWhenDisabled:!0,disabled:r||1===e,label:(0,b.__)("First page"),icon:(0,b.isRTL)()?Ym:Xm,size:"compact"}),(0,oe.jsx)(y.Button,{variant:o,onClick:()=>s(e-1),accessibleWhenDisabled:!0,disabled:r||1===e,label:(0,b.__)("Previous page"),icon:(0,b.isRTL)()?xa:va,size:"compact"})]}),(0,oe.jsx)(y.__experimentalText,{variant:"muted",children:(0,b.sprintf)((0,b._x)("%1$s of %2$s","paging"),e,t)}),(0,oe.jsxs)(y.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,oe.jsx)(y.Button,{variant:o,onClick:()=>s(e+1),accessibleWhenDisabled:!0,disabled:r||e===t,label:(0,b.__)("Next page"),icon:(0,b.isRTL)()?va:xa,size:"compact"}),(0,oe.jsx)(y.Button,{variant:o,onClick:()=>s(t),accessibleWhenDisabled:!0,disabled:r||e===t,label:(0,b.__)("Last page"),icon:(0,b.isRTL)()?Xm:Ym,size:"compact"})]})]})}const{GlobalStylesContext:Qm,areGlobalStyleConfigsEqual:$m}=te(x.privateApis);const eg=function(){const{goTo:e}=(0,y.__experimentalUseNavigator)(),{user:t,setUserConfig:s}=(0,d.useContext)(Qm),{blocks:n,editorCanvasContainerView:i}=(0,l.useSelect)((e=>({editorCanvasContainerView:te(e(zt)).getEditorCanvasContainerView(),blocks:e(x.store).getBlocks()})),[]),[r,o]=(0,d.useState)(1),[a,c]=(0,d.useState)([]),{revisions:u,isLoading:p,hasUnsavedChanges:h,revisionsCount:f}=Um({query:{per_page:10,page:r}}),m=Math.ceil(f/10),[g,v]=(0,d.useState)(t),[w,_]=(0,d.useState)(!1),{setEditorCanvasContainerView:S}=te((0,l.useDispatch)(zt)),j=$m(g,t),C=()=>{e("/");S("global-styles-revisions:style-book"===i?"style-book":void 0)},k=e=>{s((()=>e)),_(!1),C()};(0,d.useEffect)((()=>{i&&i.startsWith("global-styles-revisions")||e("/")}),[i]),(0,d.useEffect)((()=>{!p&&u.length&&c(u)}),[u,p]);const E=u[0],P=g?.id,I=!!E?.id&&!j&&!P;(0,d.useEffect)((()=>{I&&v(E)}),[I,E]);const T=!!P&&"unsaved"!==P&&!j,O=!!a.length;return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(il,{title:f&&(0,b.sprintf)((0,b.__)("Revisions (%s)"),f),description:(0,b.__)('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,oe.jsx)(y.Spinner,{className:"edit-site-global-styles-screen-revisions__loading"}),O&&("global-styles-revisions:style-book"===i?(0,oe.jsx)(Im,{userConfig:g,isSelected:()=>{},onClose:()=>{S("global-styles-revisions")}}):(0,oe.jsx)(Dm,{blocks:n,userConfig:g,closeButtonLabel:(0,b.__)("Close revisions")})),(0,oe.jsx)(Km,{onChange:v,selectedRevisionId:P,userRevisions:a,canApplyRevision:T,onApplyRevision:()=>h?_(!0):k(g)}),m>1&&(0,oe.jsx)("div",{className:"edit-site-global-styles-screen-revisions__footer",children:(0,oe.jsx)(Jm,{className:"edit-site-global-styles-screen-revisions__pagination",currentPage:r,numPages:m,changePage:o,totalItems:f,disabled:p,label:(0,b.__)("Global Styles pagination navigation")})}),w&&(0,oe.jsx)(y.__experimentalConfirmDialog,{isOpen:w,confirmButtonText:(0,b.__)("Apply"),onConfirm:()=>k(g),onCancel:()=>_(!1),size:"medium",children:(0,b.__)("Are you sure you want to apply this revision? Any unsaved changes will be lost.")})]})},{useGlobalStylesReset:tg}=te(x.privateApis),{Slot:sg,Fill:ng}=(0,y.createSlotFill)("GlobalStylesMenu");function ig(){const[e,t]=tg(),{toggle:s}=(0,l.useDispatch)(f.store),{canEditCSS:n}=(0,l.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:s}=e(_.store),n=s(),i=n?t("root","globalStyles",n):void 0;return{canEditCSS:!!i?._links?.["wp:action-edit-css"]}}),[]),{setEditorCanvasContainerView:i}=te((0,l.useDispatch)(zt)),{goTo:r}=(0,y.__experimentalUseNavigator)(),o=()=>{i("global-styles-css"),r("/css")};return(0,oe.jsx)(ng,{children:(0,oe.jsx)(y.DropdownMenu,{icon:ga,label:(0,b.__)("More"),toggleProps:{size:"compact"},children:({onClose:i})=>(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsxs)(y.MenuGroup,{children:[n&&(0,oe.jsx)(y.MenuItem,{onClick:o,children:(0,b.__)("Additional CSS")}),(0,oe.jsx)(y.MenuItem,{onClick:()=>{s("core/edit-site","welcomeGuideStyles"),i()},children:(0,b.__)("Welcome Guide")})]}),(0,oe.jsx)(y.MenuGroup,{children:(0,oe.jsx)(y.MenuItem,{onClick:()=>{t(),i()},disabled:!e,children:(0,b.__)("Reset styles")})})]})})})}function rg({className:e,...t}){return(0,oe.jsx)(y.__experimentalNavigatorScreen,{className:["edit-site-global-styles-sidebar__navigator-screen",e].filter(Boolean).join(" "),...t})}function og({parentMenu:e,blockStyles:t,blockName:s}){return t.map(((t,n)=>(0,oe.jsx)(rg,{path:e+"/variations/"+t.name,children:(0,oe.jsx)(Rl,{name:s,variation:t.name})},n)))}function ag({name:e,parentMenu:t=""}){const s=(0,l.useSelect)((t=>{const{getBlockStyles:s}=t(o.store);return s(e)}),[e]);return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(rg,{path:t+"/colors/palette",children:(0,oe.jsx)(jf,{name:e})}),!!s?.length&&(0,oe.jsx)(og,{parentMenu:t,blockStyles:s,blockName:e})]})}function lg(){const e=(0,y.__experimentalUseNavigator)(),{path:t}=e.location;return(0,oe.jsx)(Im,{isSelected:e=>t===`/blocks/${encodeURIComponent(e)}`||t.startsWith(`/blocks/${encodeURIComponent(e)}/`),onSelect:t=>{e.goTo("/blocks/"+encodeURIComponent(t))}})}function cg(){const e=(0,y.__experimentalUseNavigator)(),{selectedBlockName:t,selectedBlockClientId:s}=(0,l.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:s}=e(x.store),n=t();return{selectedBlockName:s(n),selectedBlockClientId:n}}),[]),n=dl(t);(0,d.useEffect)((()=>{if(!s||!n)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})}),[s,t,n])}function ug(){const{goTo:e,location:t}=(0,y.__experimentalUseNavigator)(),s=(0,l.useSelect)((e=>te(e(zt)).getEditorCanvasContainerView()),[]),n=t?.path,i="/revisions"===n;(0,d.useEffect)((()=>{switch(s){case"global-styles-revisions":case"global-styles-revisions:style-book":e("/revisions");break;case"global-styles-css":e("/css");break;case"style-book":i&&e("/");break;default:if("/"!==n&&!i)return;e("/")}}),[s,i,e])}const dg=function(){const e=(0,o.getBlockTypes)(),t=(0,l.useSelect)((e=>te(e(zt)).getEditorCanvasContainerView()),[]);return(0,oe.jsxs)(y.__experimentalNavigatorProvider,{className:"edit-site-global-styles-sidebar__navigator-provider",initialPath:"/",children:[(0,oe.jsx)(rg,{path:"/",children:(0,oe.jsx)($a,{})}),(0,oe.jsx)(rg,{path:"/variations",children:(0,oe.jsx)(dm,{})}),(0,oe.jsx)(rg,{path:"/blocks",children:(0,oe.jsx)(fl,{})}),(0,oe.jsx)(rg,{path:"/typography",children:(0,oe.jsx)(Th,{})}),(0,oe.jsx)(rg,{path:"/typography/font-sizes/",children:(0,oe.jsx)(ef,{})}),(0,oe.jsx)(rg,{path:"/typography/font-sizes/:origin/:slug",children:(0,oe.jsx)(Kh,{})}),(0,oe.jsx)(rg,{path:"/typography/text",children:(0,oe.jsx)(Dh,{element:"text"})}),(0,oe.jsx)(rg,{path:"/typography/link",children:(0,oe.jsx)(Dh,{element:"link"})}),(0,oe.jsx)(rg,{path:"/typography/heading",children:(0,oe.jsx)(Dh,{element:"heading"})}),(0,oe.jsx)(rg,{path:"/typography/caption",children:(0,oe.jsx)(Dh,{element:"caption"})}),(0,oe.jsx)(rg,{path:"/typography/button",children:(0,oe.jsx)(Dh,{element:"button"})}),(0,oe.jsx)(rg,{path:"/colors",children:(0,oe.jsx)(df,{})}),(0,oe.jsx)(rg,{path:"/shadows",children:(0,oe.jsx)(Yf,{})}),(0,oe.jsx)(rg,{path:"/shadows/edit/:category/:slug",children:(0,oe.jsx)(Xf,{})}),(0,oe.jsx)(rg,{path:"/layout",children:(0,oe.jsx)(om,{})}),(0,oe.jsx)(rg,{path:"/css",children:(0,oe.jsx)(Am,{})}),(0,oe.jsx)(rg,{path:"/revisions",children:(0,oe.jsx)(eg,{})}),(0,oe.jsx)(rg,{path:"/background",children:(0,oe.jsx)(Af,{})}),e.map((e=>(0,oe.jsx)(rg,{path:"/blocks/"+encodeURIComponent(e.name),children:(0,oe.jsx)(Rl,{name:e.name})},"menu-block-"+e.name))),(0,oe.jsx)(ag,{}),e.map((e=>(0,oe.jsx)(ag,{name:e.name,parentMenu:"/blocks/"+encodeURIComponent(e.name)},"screens-block-"+e.name))),"style-book"===t&&(0,oe.jsx)(lg,{}),(0,oe.jsx)(ig,{}),(0,oe.jsx)(cg,{}),(0,oe.jsx)(ug,{})]})},{ComplementaryArea:pg,ComplementaryAreaMoreMenuItem:hg}=te(h.privateApis);function fg({className:e,identifier:t,title:s,icon:n,children:i,closeLabel:r,header:o,headerClassName:a,panelClassName:l,isActiveByDefault:c}){return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(pg,{className:e,scope:"core",identifier:t,title:s,smallScreenTitle:s,icon:n,closeLabel:r,header:o,headerClassName:a,panelClassName:l,isActiveByDefault:c,children:i}),(0,oe.jsx)(hg,{scope:"core",identifier:t,icon:n,children:s})]})}const{interfaceStore:mg}=te(h.privateApis);function gg(){const{shouldClearCanvasContainerView:e,isStyleBookOpened:t,showListViewByDefault:s,hasRevisions:n,isRevisionsOpened:i,isRevisionsStyleBookOpened:r}=(0,l.useSelect)((e=>{const{getActiveComplementaryArea:t}=e(mg),{getEditorCanvasContainerView:s,getCanvasMode:n}=te(e(zt)),i=s(),r="visual"===e(h.store).getEditorMode(),o="edit"===n(),a=e(f.store).get("core","showListViewByDefault"),{getEntityRecord:l,__experimentalGetCurrentGlobalStylesId:c}=e(_.store),u=c(),d=u?l("root","globalStyles",u):void 0;return{isStyleBookOpened:"style-book"===i,shouldClearCanvasContainerView:"edit-site/global-styles"!==t("core")||!r||!o,showListViewByDefault:a,hasRevisions:!!d?._links?.["version-history"]?.[0]?.count,isRevisionsStyleBookOpened:"global-styles-revisions:style-book"===i,isRevisionsOpened:"global-styles-revisions"===i}}),[]),{setEditorCanvasContainerView:o}=te((0,l.useDispatch)(zt));(0,d.useEffect)((()=>{e&&o(void 0)}),[e]);const{setIsListViewOpened:a}=(0,l.useDispatch)(h.store),{goTo:c}=(0,y.__experimentalUseNavigator)();return(0,oe.jsx)(fg,{className:"edit-site-global-styles-sidebar",identifier:"edit-site/global-styles",title:(0,b.__)("Styles"),icon:yo,closeLabel:(0,b.__)("Close Styles"),panelClassName:"edit-site-global-styles-sidebar__panel",header:(0,oe.jsxs)(y.Flex,{className:"edit-site-global-styles-sidebar__header",gap:1,children:[(0,oe.jsx)(y.FlexBlock,{style:{minWidth:"min-content"},children:(0,oe.jsx)("h2",{className:"edit-site-global-styles-sidebar__header-title",children:(0,b.__)("Styles")})}),(0,oe.jsx)(y.FlexItem,{children:(0,oe.jsx)(y.Button,{icon:ma,label:(0,b.__)("Style Book"),isPressed:t||r,accessibleWhenDisabled:!0,disabled:e,onClick:()=>{i?o("global-styles-revisions:style-book"):r?o("global-styles-revisions"):(a(t&&s),o(t?void 0:"style-book"))},size:"compact"})}),(0,oe.jsx)(y.FlexItem,{children:(0,oe.jsx)(y.Button,{label:(0,b.__)("Revisions"),icon:jo,onClick:()=>(a(!1),r?(c("/"),void o("style-book")):i?(c("/"),void o(void 0)):(c("/revisions"),void o(t?"global-styles-revisions:style-book":"global-styles-revisions"))),accessibleWhenDisabled:!0,disabled:!n,isPressed:i||r,size:"compact"})}),(0,oe.jsx)(sg,{})]}),children:(0,oe.jsx)(dg,{})})}const vg=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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"})}),xg=window.wp.blob;function yg(){const{createErrorNotice:e}=(0,l.useDispatch)(w.store);return(0,oe.jsx)(y.MenuItem,{role:"menuitem",icon:vg,onClick:async function(){try{const e=await ro()({path:"/wp-block-editor/v1/export",parse:!1,headers:{Accept:"application/zip"}}),t=await e.blob(),s=e.headers.get("content-disposition").match(/=(.+)\.zip/),n=s[1]?s[1]:"edit-site-export";(0,xg.downloadBlob)(n+".zip",t,"application/zip")}catch(t){let s={};try{s=await t.json()}catch(e){}const n=s.message&&"unknown_error"!==s.code?s.message:(0,b.__)("An error occurred while creating the site export.");e(n,{type:"snackbar"})}},info:(0,b.__)("Download your theme with updated templates and styles."),children:(0,b._x)("Export","site exporter menu item")})}function bg(){const{toggle:e}=(0,l.useDispatch)(f.store);return(0,oe.jsx)(y.MenuItem,{onClick:()=>e("core/edit-site","welcomeGuide"),children:(0,b.__)("Welcome Guide")})}const{ToolsMoreMenuGroup:wg,PreferencesModal:_g}=te(h.privateApis);function Sg(){const e=(0,l.useSelect)((e=>e(_.store).getCurrentTheme().is_block_theme),[]);return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsxs)(wg,{children:[e&&(0,oe.jsx)(yg,{}),(0,oe.jsx)(bg,{})]}),(0,oe.jsx)(_g,{})]})}const{useLocation:jg}=te(Gt.privateApis);const Cg=function(){const{record:e,getTitle:t,isLoaded:s}=_s();let n;var i;s&&(n=(0,b.sprintf)((0,b.__)("%1$s %2$s"),t(),null!==(i=Ve[e.type])&&void 0!==i?i:Ve[je])),function(e){const t=jg(),s=(0,l.useSelect)((e=>e(_.store).getEntityRecord("root","site")?.title),[]),n=(0,d.useRef)(!0);(0,d.useEffect)((()=>{n.current=!1}),[t]),(0,d.useEffect)((()=>{if(!n.current&&e&&s){const t=(0,b.sprintf)((0,b.__)("%1$s %2$s Editor — WordPress"),(0,Jt.decodeEntities)(e),(0,Jt.decodeEntities)(s));document.title=t,(0,el.speak)(e,"assertive")}}),[e,s,t])}(s&&n)},{Editor:kg,BackButton:Eg}=te(h.privateApis),{useHistory:Pg,useLocation:Ig}=te(Gt.privateApis),{BlockKeyboardShortcuts:Tg}=te(a.privateApis),Og={edit:{opacity:0,scale:.2},hover:{opacity:1,scale:1,clipPath:"inset( 22% round 2px )"}},Ag={edit:{clipPath:"inset(0% round 0px)"},hover:{clipPath:"inset( 22% round 2px )"},tap:{clipPath:"inset(0% round 0px)"}};function Ng({isPostsList:e=!1}){const t=(0,v.useReducedMotion)(),{params:s}=Ig(),n=js(),{editedPostType:i,editedPostId:r,contextPostType:o,contextPostId:a,canvasMode:c,isEditingPage:u,supportsGlobalStyles:p,showIconLabels:m,editorCanvasView:g,currentPostIsTrashed:x,hasSiteIcon:S}=(0,l.useSelect)((e=>{const{getEditorCanvasContainerView:t,getEditedPostContext:s,getCanvasMode:n,isPage:i,getEditedPostType:r,getEditedPostId:o}=te(e(zt)),{get:a}=e(f.store),{getCurrentTheme:l,getEntityRecord:c}=e(_.store),u=s(),d=c("root","__unstableBase",void 0);return{editedPostType:r(),editedPostId:o(),contextPostType:u?.postId?u.postType:void 0,contextPostId:u?.postId?u.postId:void 0,canvasMode:n(),isEditingPage:i(),supportsGlobalStyles:l()?.is_block_theme,showIconLabels:a("core","showIconLabels"),editorCanvasView:t(),currentPostIsTrashed:"trash"===e(h.store).getCurrentPostAttribute("status"),hasSiteIcon:!!d?.site_icon_url}}),[]);Cg();const j=Qr(),C=!gm(),k=function(){const{canvasMode:e,currentPostIsTrashed:t}=(0,l.useSelect)((e=>{const{getCanvasMode:t}=te(e(zt));return{canvasMode:t(),currentPostIsTrashed:"trash"===e(h.store).getCurrentPostAttribute("status")}}),[]),{setCanvasMode:s}=te((0,l.useDispatch)(zt)),[n,i]=(0,d.useState)(!1);(0,d.useEffect)((()=>{"edit"===e&&i(!1)}),[e]);const r={"aria-label":(0,b.__)("Edit"),"aria-disabled":t,title:null,role:"button",tabIndex:0,onFocus:()=>i(!0),onBlur:()=>i(!1),onKeyDown:e=>{const{keyCode:n}=e;n!==es.ENTER&&n!==es.SPACE||t||(e.preventDefault(),s("edit"))},onClick:()=>{s("edit")},onClickCapture:e=>{t&&(e.preventDefault(),e.stopPropagation())},readonly:!0};return{className:Ut("edit-site-visual-editor__editor-canvas",{"is-focused":n&&"view"===e}),..."view"===e?r:{}}}(),E="edit"===c,P=!!a,I=(0,v.useInstanceId)(oa,"edit-site-editor__loading-progress"),T=ua(),O=(0,d.useMemo)((()=>[...T.styles,{css:"view"===c?`body{min-height: 100vh; ${x?"":"cursor: pointer;"}}`:void 0}]),[T.styles,c,x]),{setCanvasMode:A}=te((0,l.useDispatch)(zt)),{createSuccessNotice:N}=(0,l.useDispatch)(w.store),M=Pg(),V=(0,d.useCallback)(((e,t)=>{switch(e){case"move-to-trash":case"delete-post":M.push({postType:t[0].type});break;case"duplicate-post":{const e=t[0],s="string"==typeof e.title?e.title:e.title?.rendered;N((0,b.sprintf)((0,b.__)('"%s" successfully created.'),(0,Jt.decodeEntities)(s)),{type:"snackbar",id:"duplicate-post-action",actions:[{label:(0,b.__)("Edit"),onClick:()=>{M.push({postId:e.id,postType:e.type,canvas:"edit"})}}]})}}}),[M,N]),F=mm(g),R=!n,B={duration:t?0:.2};return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(na,{}),(0,oe.jsx)(h.EditorKeyboardShortcutsRegister,{}),E&&(0,oe.jsx)(Tg,{}),R?null:(0,oe.jsx)(oa,{id:I}),E&&(0,oe.jsx)(ta,{}),R&&(0,oe.jsxs)(kg,{postType:P?o:i,postId:P?a:r,templateId:P?r:void 0,settings:T,className:Ut("edit-site-editor__editor-interface",{"show-icon-labels":m}),styles:O,enableRegionNavigation:!1,customSaveButton:j&&(0,oe.jsx)(to,{size:"compact"}),customSavePanel:j&&(0,oe.jsx)(uo,{}),forceDisableBlockTools:!C,title:F,iframeProps:k,onActionPerformed:V,extraSidebarPanels:!u&&(0,oe.jsx)(fa.Slot,{}),children:[E&&(0,oe.jsx)(Eg,{children:({length:t})=>t<=1&&(0,oe.jsxs)(y.__unstableMotion.div,{className:"edit-site-editor__view-mode-toggle",transition:B,animate:"edit",initial:"edit",whileHover:"hover",whileTap:"tap",children:[(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,label:(0,b.__)("Open Navigation"),showTooltip:!0,tooltipPosition:"middle right",onClick:()=>{A("view"),e&&s?.focusMode&&M.push({page:"gutenberg-posts-dashboard",postType:"post"})},children:(0,oe.jsx)(y.__unstableMotion.div,{variants:Ag,children:(0,oe.jsx)(ns,{className:"edit-site-editor__view-mode-toggle-icon"})})}),(0,oe.jsx)(y.__unstableMotion.div,{className:Ut("edit-site-editor__back-icon",{"has-site-icon":S}),variants:Og,children:(0,oe.jsx)(Zo,{icon:Ko})})]})}),(0,oe.jsx)(Sg,{}),p&&(0,oe.jsx)(gg,{})]})]})}var Mg=i(9681),Vg=i.n(Mg);const Fg=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})}),Rg=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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"})}),Bg="is",Dg="isNot",zg="isAny",Lg="isNone",Gg="isAll",Hg="isNotAll",Ug=[Bg,Dg,zg,Lg,Gg,Hg],Wg={[Bg]:{key:"is-filter",label:(0,b.__)("Is")},[Dg]:{key:"is-not-filter",label:(0,b.__)("Is not")},[zg]:{key:"is-any-filter",label:(0,b.__)("Is any")},[Lg]:{key:"is-none-filter",label:(0,b.__)("Is none")},[Gg]:{key:"is-all-filter",label:(0,b.__)("Is all")},[Hg]:{key:"is-not-all-filter",label:(0,b.__)("Is not all")}},qg=["asc","desc"],Zg={asc:"↑",desc:"↓"},Kg={asc:"ascending",desc:"descending"},Yg={asc:(0,b.__)("Sort ascending"),desc:(0,b.__)("Sort descending")},Xg={asc:Fg,desc:Rg},Jg="table",Qg="grid",$g="list";const ev={sort:function(e,t,s){return"asc"===s?e-t:t-e},isValid:function(e,t){if(""===e)return!1;if(!Number.isInteger(Number(e)))return!1;if(t?.elements){const s=t?.elements.map((e=>e.value));if(!s.includes(Number(e)))return!1}return!0},Edit:"integer"};const tv={sort:function(e,t,s){return"asc"===s?e.localeCompare(t):t.localeCompare(e)},isValid:function(e,t){if(t?.elements){const s=t?.elements?.map((e=>e.value));if(!s.includes(e))return!1}return!0},Edit:"text"};const sv={sort:function(e,t,s){const n=new Date(e).getTime(),i=new Date(t).getTime();return"asc"===s?n-i:i-n},isValid:function(e,t){if(t?.elements){const s=t?.elements.map((e=>e.value));if(!s.includes(e))return!1}return!0},Edit:"datetime"};const nv={datetime:function({data:e,field:t,onChange:s,hideLabelFromVision:n}){const{id:i,label:r}=t,o=t.getValue({item:e}),a=(0,d.useCallback)((e=>s({[i]:e})),[i,s]);return(0,oe.jsxs)("fieldset",{className:"dataviews-controls__datetime",children:[!n&&(0,oe.jsx)(y.BaseControl.VisualLabel,{as:"legend",children:r}),n&&(0,oe.jsx)(y.VisuallyHidden,{as:"legend",children:r}),(0,oe.jsx)(y.TimePicker,{currentTime:o,onChange:a,hideLabelFromVision:!0})]})},integer:function({data:e,field:t,onChange:s,hideLabelFromVision:n}){var i;const{id:r,label:o,description:a}=t,l=null!==(i=t.getValue({item:e}))&&void 0!==i?i:"",c=(0,d.useCallback)((e=>s({[r]:Number(e)})),[r,s]);return(0,oe.jsx)(y.__experimentalNumberControl,{label:o,help:a,value:l,onChange:c,__next40pxDefaultSize:!0,hideLabelFromVision:n})},radio:function({data:e,field:t,onChange:s,hideLabelFromVision:n}){const{id:i,label:r}=t,o=t.getValue({item:e}),a=(0,d.useCallback)((e=>s({[i]:e})),[i,s]);return t.elements?(0,oe.jsx)(y.RadioControl,{label:r,onChange:a,options:t.elements,selected:o,hideLabelFromVision:n}):null},select:function({data:e,field:t,onChange:s,hideLabelFromVision:n}){var i,r;const{id:o,label:a}=t,l=null!==(i=t.getValue({item:e}))&&void 0!==i?i:"",c=(0,d.useCallback)((e=>s({[o]:e})),[o,s]),u=[{label:(0,b.__)("Select item"),value:""},...null!==(r=t?.elements)&&void 0!==r?r:[]];return(0,oe.jsx)(y.SelectControl,{label:a,value:l,options:u,onChange:c,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:n})},text:function({data:e,field:t,onChange:s,hideLabelFromVision:n}){const{id:i,label:r,placeholder:o}=t,a=t.getValue({item:e}),l=(0,d.useCallback)((e=>s({[i]:e})),[i,s]);return(0,oe.jsx)(y.TextControl,{label:r,placeholder:o,value:null!=a?a:"",onChange:l,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:n})}};function iv(e){if(Object.keys(nv).includes(e))return nv[e];throw"Control "+e+" not found"}function rv(e){return e.map((e=>{var t,s,n,i;const r="integer"===(o=e.type)?ev:"text"===o?tv:"datetime"===o?sv:{sort:(e,t,s)=>"number"==typeof e&&"number"==typeof t?"asc"===s?e-t:t-e:"asc"===s?e.localeCompare(t):t.localeCompare(e),isValid:(e,t)=>{if(t?.elements){const s=t?.elements?.map((e=>e.value));if(!s.includes(e))return!1}return!0},Edit:()=>null};var o;const a=e.getValue||(({item:t})=>t[e.id]),l=null!==(t=e.sort)&&void 0!==t?t:function(e,t,s){return r.sort(a({item:e}),a({item:t}),s)},c=null!==(s=e.isValid)&&void 0!==s?s:function(e,t){return r.isValid(a({item:e}),t)},u=function(e,t){return"function"==typeof e.Edit?e.Edit:"string"==typeof e.Edit?iv(e.Edit):e.elements?iv("select"):"string"==typeof t.Edit?iv(t.Edit):t.Edit}(e,r),d=e.render||(e.elements?({item:t})=>{const s=a({item:t});return e?.elements?.find((e=>e.value===s))?.label||a({item:t})}:a);return{...e,label:e.label||e.id,header:e.header||e.label||e.id,getValue:a,render:d,sort:l,isValid:c,Edit:u,enableHiding:null===(n=e.enableHiding)||void 0===n||n,enableSorting:null===(i=e.enableSorting)||void 0===i||i}}))}function ov(e=""){return Vg()(e.trim().toLowerCase())}const av=[];function lv(e,t,s){if(!e)return{data:av,paginationInfo:{totalItems:0,totalPages:0}};const n=rv(s);let i=[...e];if(t.search){const e=ov(t.search);i=i.filter((t=>n.filter((e=>e.enableGlobalSearch)).map((e=>ov(e.getValue({item:t})))).some((t=>t.includes(e)))))}if(t.filters&&t.filters?.length>0&&t.filters.forEach((e=>{const t=n.find((t=>t.id===e.field));t&&(e.operator===zg&&e?.value?.length>0?i=i.filter((s=>{const n=t.getValue({item:s});return Array.isArray(n)?e.value.some((e=>n.includes(e))):"string"==typeof n&&e.value.includes(n)})):e.operator===Lg&&e?.value?.length>0?i=i.filter((s=>{const n=t.getValue({item:s});return Array.isArray(n)?!e.value.some((e=>n.includes(e))):"string"==typeof n&&!e.value.includes(n)})):e.operator===Gg&&e?.value?.length>0?i=i.filter((s=>e.value.every((e=>t.getValue({item:s})?.includes(e))))):e.operator===Hg&&e?.value?.length>0?i=i.filter((s=>e.value.every((e=>!t.getValue({item:s})?.includes(e))))):e.operator===Bg?i=i.filter((s=>e.value===t.getValue({item:s}))):e.operator===Dg&&(i=i.filter((s=>e.value!==t.getValue({item:s})))))})),t.sort){const e=t.sort.field,s=n.find((t=>t.id===e));s&&i.sort(((e,n)=>{var i;return s.sort(e,n,null!==(i=t.sort?.direction)&&void 0!==i?i:"desc")}))}let r=i.length,o=1;if(void 0!==t.page&&void 0!==t.perPage){const e=(t.page-1)*t.perPage;r=i?.length||0,o=Math.ceil(r/t.perPage),i=i?.slice(e,e+t.perPage)}return{data:i,paginationInfo:{totalItems:r,totalPages:o}}}const cv=(0,d.createContext)({view:{type:Jg},onChangeView:()=>{},fields:[],data:[],paginationInfo:{totalItems:0,totalPages:0},selection:[],onChangeSelection:()=>{},setOpenedFilter:()=>{},openedFilter:null,getItemId:e=>e.id,density:0}),uv=(0,oe.jsx)(Qt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,oe.jsx)(Qt.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z"})});var dv=Object.defineProperty,pv=Object.defineProperties,hv=Object.getOwnPropertyDescriptors,fv=Object.getOwnPropertySymbols,mv=Object.prototype.hasOwnProperty,gv=Object.prototype.propertyIsEnumerable,vv=(e,t,s)=>t in e?dv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,xv=(e,t)=>{for(var s in t||(t={}))mv.call(t,s)&&vv(e,s,t[s]);if(fv)for(var s of fv(t))gv.call(t,s)&&vv(e,s,t[s]);return e},yv=(e,t)=>pv(e,hv(t)),bv=(e,t)=>{var s={};for(var n in e)mv.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&fv)for(var n of fv(e))t.indexOf(n)<0&&gv.call(e,n)&&(s[n]=e[n]);return s},wv=Object.defineProperty,_v=Object.defineProperties,Sv=Object.getOwnPropertyDescriptors,jv=Object.getOwnPropertySymbols,Cv=Object.prototype.hasOwnProperty,kv=Object.prototype.propertyIsEnumerable,Ev=(e,t,s)=>t in e?wv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Pv=(e,t)=>{for(var s in t||(t={}))Cv.call(t,s)&&Ev(e,s,t[s]);if(jv)for(var s of jv(t))kv.call(t,s)&&Ev(e,s,t[s]);return e},Iv=(e,t)=>_v(e,Sv(t)),Tv=(e,t)=>{var s={};for(var n in e)Cv.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&jv)for(var n of jv(e))t.indexOf(n)<0&&kv.call(e,n)&&(s[n]=e[n]);return s};function Ov(...e){}function Av(e,t){return"function"==typeof Object.hasOwn?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t)}function Nv(...e){return(...t)=>{for(const s of e)"function"==typeof s&&s(...t)}}function Mv(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function Vv(e){return e}function Fv(e,t){if(!e){if("string"!=typeof t)throw new Error("Invariant failed");throw new Error(t)}}function Rv(e){return e.disabled||!0===e["aria-disabled"]||"true"===e["aria-disabled"]}function Bv(e){const t={};for(const s in e)void 0!==e[s]&&(t[s]=e[s]);return t}function Dv(...e){for(const t of e)if(void 0!==t)return t}function zv(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Lv(e){if(!function(e){return!!e&&!!(0,Hs.isValidElement)(e)&&("ref"in e.props||"ref"in e)}(e))return null;return xv({},e.props).ref||e.ref}var Gv,Hv="undefined"!=typeof window&&!!(null==(Gv=window.document)?void 0:Gv.createElement);function Uv(e){return e?e.ownerDocument||e:document}function Wv(e,t=!1){const{activeElement:s}=Uv(e);if(!(null==s?void 0:s.nodeName))return null;if("IFRAME"===s.tagName&&s.contentDocument)return Wv(s.contentDocument.body,t);if(t){const e=s.getAttribute("aria-activedescendant");if(e){const t=Uv(s).getElementById(e);if(t)return t}}return s}function qv(e,t){return e===t||e.contains(t)}function Zv(e){const t=e.tagName.toLowerCase();return"button"===t||!("input"!==t||!e.type)&&-1!==Kv.indexOf(e.type)}var Kv=["button","color","file","image","reset","submit"];function Yv(e){try{const t=e instanceof HTMLInputElement&&null!==e.selectionStart,s="TEXTAREA"===e.tagName;return t||s||!1}catch(e){return!1}}function Xv(e){return e.isContentEditable||Yv(e)}function Jv(e){let t=0,s=0;if(Yv(e))t=e.selectionStart||0,s=e.selectionEnd||0;else if(e.isContentEditable){const n=Uv(e).getSelection();if((null==n?void 0:n.rangeCount)&&n.anchorNode&&qv(e,n.anchorNode)&&n.focusNode&&qv(e,n.focusNode)){const i=n.getRangeAt(0),r=i.cloneRange();r.selectNodeContents(e),r.setEnd(i.startContainer,i.startOffset),t=r.toString().length,r.setEnd(i.endContainer,i.endOffset),s=r.toString().length}}return{start:t,end:s}}function Qv(e,t){const s=null==e?void 0:e.getAttribute("role");return s&&-1!==["dialog","menu","listbox","tree","grid"].indexOf(s)?s:t}function $v(e){if(!e)return null;if(e.clientHeight&&e.scrollHeight>e.clientHeight){const{overflowY:t}=getComputedStyle(e);if("visible"!==t&&"hidden"!==t)return e}else if(e.clientWidth&&e.scrollWidth>e.clientWidth){const{overflowX:t}=getComputedStyle(e);if("visible"!==t&&"hidden"!==t)return e}return $v(e.parentElement)||document.scrollingElement||document.body}function ex(e,...t){/text|search|password|tel|url/i.test(e.type)&&e.setSelectionRange(...t)}function tx(){return Hv&&!!navigator.maxTouchPoints}function sx(){return!!Hv&&/mac|iphone|ipad|ipod/i.test(navigator.platform)}function nx(){return Hv&&sx()&&/apple/i.test(navigator.vendor)}function ix(e){return Boolean(e.currentTarget&&!qv(e.currentTarget,e.target))}function rx(e){return e.target===e.currentTarget}function ox(e,t){const s=new FocusEvent("blur",t),n=e.dispatchEvent(s),i=Iv(Pv({},t),{bubbles:!0});return e.dispatchEvent(new FocusEvent("focusout",i)),n}function ax(e,t){const s=new MouseEvent("click",t);return e.dispatchEvent(s)}function lx(e,t){const s=t||e.currentTarget,n=e.relatedTarget;return!n||!qv(s,n)}function cx(e,t,s,n){const i=(e=>{if(n){const t=setTimeout(e,n);return()=>clearTimeout(t)}const t=requestAnimationFrame(e);return()=>cancelAnimationFrame(t)})((()=>{e.removeEventListener(t,r,!0),s()})),r=()=>{i(),s()};return e.addEventListener(t,r,{once:!0,capture:!0}),i}function ux(e,t,s,n=window){const i=[];try{n.document.addEventListener(e,t,s);for(const r of Array.from(n.frames))i.push(ux(e,t,s,r))}catch(e){}return()=>{try{n.document.removeEventListener(e,t,s)}catch(e){}for(const e of i)e()}}var dx=xv({},Us),px=dx.useId,hx=(dx.useDeferredValue,dx.useInsertionEffect),fx=Hv?Hs.useLayoutEffect:Hs.useEffect;function mx(e){const t=(0,Hs.useRef)((()=>{throw new Error("Cannot call an event handler while rendering.")}));return hx?hx((()=>{t.current=e})):t.current=e,(0,Hs.useCallback)(((...e)=>{var s;return null==(s=t.current)?void 0:s.call(t,...e)}),[])}function gx(...e){return(0,Hs.useMemo)((()=>{if(e.some(Boolean))return t=>{for(const s of e)zv(s,t)}}),e)}function vx(e){if(px){const t=px();return e||t}const[t,s]=(0,Hs.useState)(e);return fx((()=>{if(e||t)return;const n=Math.random().toString(36).substr(2,6);s(`id-${n}`)}),[e,t]),e||t}function xx(e,t){const s=e=>{if("string"==typeof e)return e},[n,i]=(0,Hs.useState)((()=>s(t)));return fx((()=>{const n=e&&"current"in e?e.current:e;i((null==n?void 0:n.tagName.toLowerCase())||s(t))}),[e,t]),n}function yx(e,t){const s=(0,Hs.useRef)(!1);(0,Hs.useEffect)((()=>{if(s.current)return e();s.current=!0}),t),(0,Hs.useEffect)((()=>()=>{s.current=!1}),[])}function bx(e){return mx("function"==typeof e?e:()=>e)}function wx(e,t,s=[]){const n=(0,Hs.useCallback)((s=>(e.wrapElement&&(s=e.wrapElement(s)),t(s))),[...s,e.wrapElement]);return yv(xv({},e),{wrapElement:n})}var _x=!1,Sx=0,jx=0;function Cx(e){(function(e){const t=e.movementX||e.screenX-Sx,s=e.movementY||e.screenY-jx;return Sx=e.screenX,jx=e.screenY,t||s||!1})(e)&&(_x=!0)}function kx(){_x=!1}function Ex(e){const t=Hs.forwardRef(((t,s)=>e(yv(xv({},t),{ref:s}))));return t.displayName=e.displayName||e.name,t}function Px(e,t){return Hs.memo(e,t)}function Ix(e,t){const s=t,{wrapElement:n,render:i}=s,r=bv(s,["wrapElement","render"]),o=gx(t.ref,Lv(i));let a;if(Hs.isValidElement(i)){const e=yv(xv({},i.props),{ref:o});a=Hs.cloneElement(i,function(e,t){const s=xv({},e);for(const n in t){if(!Av(t,n))continue;if("className"===n){const n="className";s[n]=e[n]?`${e[n]} ${t[n]}`:t[n];continue}if("style"===n){const n="style";s[n]=e[n]?xv(xv({},e[n]),t[n]):t[n];continue}const i=t[n];if("function"==typeof i&&n.startsWith("on")){const t=e[n];if("function"==typeof t){s[n]=(...e)=>{i(...e),t(...e)};continue}}s[n]=i}return s}(r,e))}else a=i?i(r):(0,oe.jsx)(e,xv({},r));return n?n(a):a}function Tx(e){const t=(t={})=>e(t);return t.displayName=e.name,t}function Ox(e=[],t=[]){const s=Hs.createContext(void 0),n=Hs.createContext(void 0),i=()=>Hs.useContext(s),r=t=>e.reduceRight(((e,s)=>(0,oe.jsx)(s,yv(xv({},t),{children:e}))),(0,oe.jsx)(s.Provider,xv({},t)));return{context:s,scopedContext:n,useContext:i,useScopedContext:(e=!1)=>{const t=Hs.useContext(n),s=i();return e?t:t||s},useProviderContext:()=>{const e=Hs.useContext(n),t=i();if(!e||e!==t)return t},ContextProvider:r,ScopedContextProvider:e=>(0,oe.jsx)(r,yv(xv({},e),{children:t.reduceRight(((t,s)=>(0,oe.jsx)(s,yv(xv({},e),{children:t}))),(0,oe.jsx)(n.Provider,xv({},e)))}))}}var Ax=Ox(),Nx=Ax.useContext,Mx=(Ax.useScopedContext,Ax.useProviderContext,Ox([Ax.ContextProvider],[Ax.ScopedContextProvider])),Vx=Mx.useContext,Fx=(Mx.useScopedContext,Mx.useProviderContext),Rx=Mx.ContextProvider,Bx=Mx.ScopedContextProvider,Dx=(0,Hs.createContext)(void 0),zx=(0,Hs.createContext)(void 0),Lx=((0,Hs.createContext)(null),(0,Hs.createContext)(null),Ox([Rx],[Bx])),Gx=Lx.useContext;Lx.useScopedContext,Lx.useProviderContext,Lx.ContextProvider,Lx.ScopedContextProvider;function Hx(e,t){const s=e.__unstableInternals;return Fv(s,"Invalid store"),s[t]}function Ux(e,...t){let s=e,n=s,i=Symbol(),r=Ov;const o=new Set,a=new Set,l=new Set,c=new Set,u=new Set,d=new WeakMap,p=new WeakMap,h=(e,t,s=c)=>(s.add(t),p.set(t,e),()=>{var e;null==(e=d.get(t))||e(),d.delete(t),p.delete(t),s.delete(t)}),f=(e,r,o=!1)=>{var l;if(!Av(s,e))return;const h=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,s[e]);if(h===s[e])return;if(!o)for(const s of t)null==(l=null==s?void 0:s.setState)||l.call(s,e,h);const f=s;s=Iv(Pv({},s),{[e]:h});const m=Symbol();i=m,a.add(e);const g=(t,n,i)=>{var r;const o=p.get(t);o&&!o.some((t=>i?i.has(t):t===e))||(null==(r=d.get(t))||r(),d.set(t,t(s,n)))};for(const e of c)g(e,f);queueMicrotask((()=>{if(i!==m)return;const e=s;for(const e of u)g(e,n,a);n=e,a.clear()}))},m={getState:()=>s,setState:f,__unstableInternals:{setup:e=>(l.add(e),()=>l.delete(e)),init:()=>{const e=o.size,n=Symbol();o.add(n);const i=()=>{o.delete(n),o.size||r()};if(e)return i;const a=(c=s,Object.keys(c)).map((e=>Nv(...t.map((t=>{var s;const n=null==(s=null==t?void 0:t.getState)?void 0:s.call(t);if(n&&Av(n,e))return Kx(t,[e],(t=>{f(e,t[e],!0)}))})))));var c;const u=[];for(const e of l)u.push(e());const d=t.map(qx);return r=Nv(...a,...u,...d),i},subscribe:(e,t)=>h(e,t),sync:(e,t)=>(d.set(t,t(s,s)),h(e,t)),batch:(e,t)=>(d.set(t,t(s,n)),h(e,t,u)),pick:e=>Ux(function(e,t){const s={};for(const n of t)Av(e,n)&&(s[n]=e[n]);return s}(s,e),m),omit:e=>Ux(function(e,t){const s=Pv({},e);for(const e of t)Av(s,e)&&delete s[e];return s}(s,e),m)}};return m}function Wx(e,...t){if(e)return Hx(e,"setup")(...t)}function qx(e,...t){if(e)return Hx(e,"init")(...t)}function Zx(e,...t){if(e)return Hx(e,"subscribe")(...t)}function Kx(e,...t){if(e)return Hx(e,"sync")(...t)}function Yx(e,...t){if(e)return Hx(e,"batch")(...t)}function Xx(e,...t){if(e)return Hx(e,"omit")(...t)}function Jx(...e){const t=e.reduce(((e,t)=>{var s;const n=null==(s=null==t?void 0:t.getState)?void 0:s.call(t);return n?Object.assign(e,n):e}),{});return Ux(t,...e)}var Qx=i(422),{useSyncExternalStore:$x}=Qx,ey=()=>()=>{};function ty(e,t=Vv){const s=Hs.useCallback((t=>e?Zx(e,null,t):ey()),[e]),n=()=>{const s="string"==typeof t?t:null,n="function"==typeof t?t:null,i=null==e?void 0:e.getState();return n?n(i):i&&s&&Av(i,s)?i[s]:void 0};return $x(s,n,n)}function sy(e,t,s,n){const i=Av(t,s)?t[s]:void 0,r=n?t[n]:void 0,o=function(e){const t=(0,Hs.useRef)(e);return fx((()=>{t.current=e})),t}({value:i,setValue:r});fx((()=>Kx(e,[s],((e,t)=>{const{value:n,setValue:i}=o.current;i&&e[s]!==t[s]&&e[s]!==n&&i(e[s])}))),[e,s]),fx((()=>{if(void 0!==i)return e.setState(s,i),Yx(e,[s],(()=>{void 0!==i&&e.setState(s,i)}))}))}function ny(e,t,s){return yx(t,[s.store]),sy(e,s,"items","setItems"),e}function iy(e,t,s){return sy(e=ny(e,t,s),s,"activeId","setActiveId"),sy(e,s,"includesBaseElement"),sy(e,s,"virtualFocus"),sy(e,s,"orientation"),sy(e,s,"rtl"),sy(e,s,"focusLoop"),sy(e,s,"focusWrap"),sy(e,s,"focusShift"),e}function ry(e,t,s){return yx(t,[s.store,s.disclosure]),sy(e,s,"open","setOpen"),sy(e,s,"mounted","setMounted"),sy(e,s,"animated"),Object.assign(e,{disclosure:s.disclosure})}function oy(e,t,s){return ry(e,t,s)}function ay(e,t,s){return yx(t,[s.popover]),sy(e,s,"placement"),oy(e,t,s)}function ly(e){const t=e.map(((e,t)=>[t,e]));let s=!1;return t.sort((([e,t],[n,i])=>{const r=t.element,o=i.element;return r===o?0:r&&o?function(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}(r,o)?(e>n&&(s=!0),-1):(e<n&&(s=!0),1):0})),s?t.map((([e,t])=>t)):e}function cy(e={}){var t;e.store;const s=null==(t=e.store)?void 0:t.getState(),n=Dv(e.items,null==s?void 0:s.items,e.defaultItems,[]),i=new Map(n.map((e=>[e.id,e]))),r={items:n,renderedItems:Dv(null==s?void 0:s.renderedItems,[])},o=function(e){return null==e?void 0:e.__unstablePrivateStore}(e.store),a=Ux({items:n,renderedItems:r.renderedItems},o),l=Ux(r,e.store),c=e=>{const t=ly(e);a.setState("renderedItems",t),l.setState("renderedItems",t)};Wx(l,(()=>qx(a))),Wx(a,(()=>Yx(a,["items"],(e=>{l.setState("items",e.items)})))),Wx(a,(()=>Yx(a,["renderedItems"],(e=>{let t=!0,s=requestAnimationFrame((()=>{const{renderedItems:t}=l.getState();e.renderedItems!==t&&c(e.renderedItems)}));if("function"!=typeof IntersectionObserver)return()=>cancelAnimationFrame(s);const n=function(e){var t;const s=e.find((e=>!!e.element)),n=[...e].reverse().find((e=>!!e.element));let i=null==(t=null==s?void 0:s.element)?void 0:t.parentElement;for(;i&&(null==n?void 0:n.element);){if(n&&i.contains(n.element))return i;i=i.parentElement}return Uv(i).body}(e.renderedItems),i=new IntersectionObserver((()=>{t?t=!1:(cancelAnimationFrame(s),s=requestAnimationFrame((()=>c(e.renderedItems))))}),{root:n});for(const t of e.renderedItems)t.element&&i.observe(t.element);return()=>{cancelAnimationFrame(s),i.disconnect()}}))));const u=(e,t,s=!1)=>{let n;t((t=>{const s=t.findIndex((({id:t})=>t===e.id)),r=t.slice();if(-1!==s){n=t[s];const o=Pv(Pv({},n),e);r[s]=o,i.set(e.id,o)}else r.push(e),i.set(e.id,e);return r}));return()=>{t((t=>{if(!n)return s&&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 o=t.slice();return o[r]=n,i.set(e.id,n),o}))}},d=e=>u(e,(e=>a.setState("items",e)),!0);return Iv(Pv({},l),{registerItem:d,renderItem:e=>Nv(d(e),u(e,(e=>a.setState("renderedItems",e)))),item:e=>{if(!e)return null;let t=i.get(e);if(!t){const{items:s}=l.getState();t=s.find((t=>t.id===e)),t&&i.set(e,t)}return t||null},__unstablePrivateStore:a})}function uy(e){const t=[];for(const s of e)t.push(...s);return t}function dy(e){return e.slice().reverse()}var py={id:null};function hy(e,t){return e.find((e=>t?!e.disabled&&e.id!==t:!e.disabled))}function fy(e,t){return e.filter((e=>e.rowId===t))}function my(e){const t=[];for(const s of e){const e=t.find((e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===s.rowId}));e?e.push(s):t.push([s])}return t}function gy(e){let t=0;for(const{length:s}of e)s>t&&(t=s);return t}function vy(e,t,s){const n=gy(e);for(const i of e)for(let e=0;e<n;e+=1){const n=i[e];if(!n||s&&n.disabled){const n=0===e&&s?hy(i):i[e-1];i[e]=n&&t!==n.id&&s?n:{id:"__EMPTY_ITEM__",disabled:!0,rowId:null==n?void 0:n.rowId}}}return e}function xy(e){const t=my(e),s=gy(t),n=[];for(let e=0;e<s;e+=1)for(const s of t){const t=s[e];t&&n.push(Iv(Pv({},t),{rowId:t.rowId?`${e}`:void 0}))}return n}function yy(e={}){var t;const s=null==(t=e.store)?void 0:t.getState(),n=cy(e),i=Dv(e.activeId,null==s?void 0:s.activeId,e.defaultActiveId),r=Ux(Iv(Pv({},n.getState()),{activeId:i,baseElement:Dv(null==s?void 0:s.baseElement,null),includesBaseElement:Dv(e.includesBaseElement,null==s?void 0:s.includesBaseElement,null===i),moves:Dv(null==s?void 0:s.moves,0),orientation:Dv(e.orientation,null==s?void 0:s.orientation,"both"),rtl:Dv(e.rtl,null==s?void 0:s.rtl,!1),virtualFocus:Dv(e.virtualFocus,null==s?void 0:s.virtualFocus,!1),focusLoop:Dv(e.focusLoop,null==s?void 0:s.focusLoop,!1),focusWrap:Dv(e.focusWrap,null==s?void 0:s.focusWrap,!1),focusShift:Dv(e.focusShift,null==s?void 0:s.focusShift,!1)}),n,e.store);Wx(r,(()=>Kx(r,["renderedItems","activeId"],(e=>{r.setState("activeId",(t=>{var s;return void 0!==t?t:null==(s=hy(e.renderedItems))?void 0:s.id}))}))));const o=(e,t,s,n)=>{var i,o;const{activeId:a,rtl:l,focusLoop:c,focusWrap:u,includesBaseElement:d}=r.getState(),p=l&&"vertical"!==t?dy(e):e;if(null==a)return null==(i=hy(p))?void 0:i.id;const h=p.find((e=>e.id===a));if(!h)return null==(o=hy(p))?void 0:o.id;const f=!!h.rowId,m=p.indexOf(h),g=p.slice(m+1),v=fy(g,h.rowId);if(void 0!==n){const e=function(e,t){return e.filter((e=>t?!e.disabled&&e.id!==t:!e.disabled))}(v,a),t=e.slice(n)[0]||e[e.length-1];return null==t?void 0:t.id}const x=function(e){return"vertical"===e?"horizontal":"horizontal"===e?"vertical":void 0}(f?t||"horizontal":t),y=c&&c!==x,b=f&&u&&u!==x;if(s=s||!f&&y&&d,y){const e=function(e,t,s=!1){const n=e.findIndex((e=>e.id===t));return[...e.slice(n+1),...s?[py]:[],...e.slice(0,n)]}(b&&!s?p:fy(p,h.rowId),a,s),t=hy(e,a);return null==t?void 0:t.id}if(b){const e=hy(s?v:g,a);return s?(null==e?void 0:e.id)||null:null==e?void 0:e.id}const w=hy(v,a);return!w&&s?null:null==w?void 0:w.id};return Iv(Pv(Pv({},n),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=hy(r.getState().renderedItems))?void 0:e.id},last:()=>{var e;return null==(e=hy(dy(r.getState().renderedItems)))?void 0:e.id},next:e=>{const{renderedItems:t,orientation:s}=r.getState();return o(t,s,!1,e)},previous:e=>{var t;const{renderedItems:s,orientation:n,includesBaseElement:i}=r.getState(),a=!!!(null==(t=hy(s))?void 0:t.rowId)&&i;return o(dy(s),n,a,e)},down:e=>{const{activeId:t,renderedItems:s,focusShift:n,focusLoop:i,includesBaseElement:a}=r.getState(),l=n&&!e,c=xy(uy(vy(my(s),t,l)));return o(c,"vertical",i&&"horizontal"!==i&&a,e)},up:e=>{const{activeId:t,renderedItems:s,focusShift:n,includesBaseElement:i}=r.getState(),a=n&&!e,l=xy(dy(uy(vy(my(s),t,a))));return o(l,"vertical",i,e)}})}function by(e={}){return function(e={}){const t=Jx(e.store,Xx(e.disclosure,["contentElement","disclosureElement"])),s=null==t?void 0:t.getState(),n=Dv(e.open,null==s?void 0:s.open,e.defaultOpen,!1),i=Dv(e.animated,null==s?void 0:s.animated,!1),r=Ux({open:n,animated:i,animating:!!i&&n,mounted:n,contentElement:Dv(null==s?void 0:s.contentElement,null),disclosureElement:Dv(null==s?void 0:s.disclosureElement,null)},t);return Wx(r,(()=>Kx(r,["animated","animating"],(e=>{e.animated||r.setState("animating",!1)})))),Wx(r,(()=>Zx(r,["open"],(()=>{r.getState().animated&&r.setState("animating",!0)})))),Wx(r,(()=>Kx(r,["open","animating"],(e=>{r.setState("mounted",e.open||e.animating)})))),Iv(Pv({},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 wy=nx()&&tx();function _y(e={}){var t=e,{tag:s}=t,n=Tv(t,["tag"]);const i=Jx(n.store,function(e,...t){if(e)return Hx(e,"pick")(...t)}(s,["value","rtl"])),r=null==s?void 0:s.getState(),o=null==i?void 0:i.getState(),a=Dv(n.activeId,null==o?void 0:o.activeId,n.defaultActiveId,null),l=yy(Iv(Pv({},n),{activeId:a,includesBaseElement:Dv(n.includesBaseElement,null==o?void 0:o.includesBaseElement,!0),orientation:Dv(n.orientation,null==o?void 0:o.orientation,"vertical"),focusLoop:Dv(n.focusLoop,null==o?void 0:o.focusLoop,!0),focusWrap:Dv(n.focusWrap,null==o?void 0:o.focusWrap,!0),virtualFocus:Dv(n.virtualFocus,null==o?void 0:o.virtualFocus,!0)})),c=function(e={}){var t=e,{popover:s}=t,n=Tv(t,["popover"]);const i=Jx(n.store,Xx(s,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"])),r=null==i?void 0:i.getState(),o=by(Iv(Pv({},n),{store:i})),a=Dv(n.placement,null==r?void 0:r.placement,"bottom"),l=Ux(Iv(Pv({},o.getState()),{placement:a,currentPlacement:a,anchorElement:Dv(null==r?void 0:r.anchorElement,null),popoverElement:Dv(null==r?void 0:r.popoverElement,null),arrowElement:Dv(null==r?void 0:r.arrowElement,null),rendered:Symbol("rendered")}),o,i);return Iv(Pv(Pv({},o),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"))})}(Iv(Pv({},n),{placement:Dv(n.placement,null==o?void 0:o.placement,"bottom-start")})),u=Dv(n.value,null==o?void 0:o.value,n.defaultValue,""),d=Dv(n.selectedValue,null==o?void 0:o.selectedValue,null==r?void 0:r.values,n.defaultSelectedValue,""),p=Array.isArray(d),h=Iv(Pv(Pv({},l.getState()),c.getState()),{value:u,selectedValue:d,resetValueOnSelect:Dv(n.resetValueOnSelect,null==o?void 0:o.resetValueOnSelect,p),resetValueOnHide:Dv(n.resetValueOnHide,null==o?void 0:o.resetValueOnHide,p&&!s),activeValue:null==o?void 0:o.activeValue}),f=Ux(h,l,c,i);return wy&&Wx(f,(()=>Kx(f,["virtualFocus"],(()=>{f.setState("virtualFocus",!1)})))),Wx(f,(()=>{if(s)return Nv(Kx(f,["selectedValue"],(e=>{Array.isArray(e.selectedValue)&&s.setValues(e.selectedValue)})),Kx(s,["values"],(e=>{f.setState("selectedValue",e.values)})))})),Wx(f,(()=>Kx(f,["resetValueOnHide","mounted"],(e=>{e.resetValueOnHide&&(e.mounted||f.setState("value",u))})))),Wx(f,(()=>Kx(f,["open"],(e=>{e.open||(f.setState("activeId",a),f.setState("moves",0))})))),Wx(f,(()=>Kx(f,["moves","activeId"],((e,t)=>{e.moves===t.moves&&f.setState("activeValue",void 0)})))),Wx(f,(()=>Yx(f,["moves","renderedItems"],((e,t)=>{if(e.moves===t.moves)return;const{activeId:s}=f.getState(),n=l.item(s);f.setState("activeValue",null==n?void 0:n.value)})))),Iv(Pv(Pv(Pv({},c),l),f),{tag:s,setValue:e=>f.setState("value",e),resetValue:()=>f.setState("value",h.value),setSelectedValue:e=>f.setState("selectedValue",e)})}function Sy(e={}){const t=Gx();e=yv(xv({},e),{tag:void 0!==e.tag?e.tag:t});const[s,n]=function(e,t){const[s,n]=Hs.useState((()=>e(t)));fx((()=>qx(s)),[s]);const i=Hs.useCallback((e=>ty(s,e)),[s]);return[Hs.useMemo((()=>yv(xv({},s),{useState:i})),[s,i]),mx((()=>{n((s=>e(xv(xv({},t),s.getState()))))}))]}(_y,e);return function(e,t,s){return yx(t,[s.tag]),sy(e,s,"value","setValue"),sy(e,s,"selectedValue","setSelectedValue"),sy(e,s,"resetValueOnHide"),sy(e,s,"resetValueOnSelect"),Object.assign(iy(ay(e,t,s),t,s),{tag:s.tag})}(s,n,e)}var jy=Ox(),Cy=(jy.useContext,jy.useScopedContext,jy.useProviderContext),ky=Ox([jy.ContextProvider],[jy.ScopedContextProvider]),Ey=(ky.useContext,ky.useScopedContext,ky.useProviderContext,ky.ContextProvider),Py=ky.ScopedContextProvider,Iy=((0,Hs.createContext)(void 0),(0,Hs.createContext)(void 0),Ox([Ey],[Py])),Ty=(Iy.useContext,Iy.useScopedContext,Iy.useProviderContext),Oy=Iy.ContextProvider,Ay=Iy.ScopedContextProvider,Ny=(0,Hs.createContext)(void 0),My=Ox([Oy,Rx],[Ay,Bx]),Vy=My.useContext,Fy=My.useScopedContext,Ry=My.useProviderContext,By=My.ContextProvider,Dy=My.ScopedContextProvider,zy=(0,Hs.createContext)(void 0),Ly=(0,Hs.createContext)(!1);function Gy(e={}){const t=Sy(e);return(0,oe.jsx)(By,{value:t,children:e.children})}var Hy=Tx((function(e){var t=e,{store:s}=t,n=bv(t,["store"]);const i=Ry();Fv(s=s||i,!1);const r=s.useState((e=>{var t;return null==(t=e.baseElement)?void 0:t.id}));return Bv(n=xv({htmlFor:r},n))})),Uy=Px(Ex((function(e){return Ix("label",Hy(e))}))),Wy=Tx((function(e){var t=e,{store:s}=t,n=bv(t,["store"]);const i=Ty();return s=s||i,n=yv(xv({},n),{ref:gx(null==s?void 0:s.setAnchorElement,n.ref)})}));Ex((function(e){return Ix("div",Wy(e))}));function qy(e,t){return t&&e.item(t)||null}var Zy=Symbol("FOCUS_SILENTLY");function Ky(e,t,s){if(!t)return!1;if(t===s)return!1;const n=e.item(t.id);return!!n&&(!s||n.element!==s)}var Yy=(0,Hs.createContext)(!0),Xy="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 Jy(e){return!!e.matches(Xy)&&(!!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 Qy(e){const t=Wv(e);if(!t)return!1;if(t===e)return!0;const s=t.getAttribute("aria-activedescendant");return!!s&&s===e.id}function $y(e){const t=Wv(e);if(!t)return!1;if(qv(e,t))return!0;const s=t.getAttribute("aria-activedescendant");return!!s&&("id"in e&&(s===e.id||!!e.querySelector(`#${CSS.escape(s)}`)))}var eb=nx(),tb=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"],sb=Symbol("safariFocusAncestor");function nb(e,t){e&&(e[sb]=t)}function ib(e){return!("input"!==e.tagName.toLowerCase()||!e.type)&&("radio"===e.type||"checkbox"===e.type)}function rb(e,t,s,n,i){return e?t?s&&!n?-1:void 0:s?i:i||0:i}function ob(e,t){return mx((s=>{null==e||e(s),s.defaultPrevented||t&&(s.stopPropagation(),s.preventDefault())}))}var ab=!0;function lb(e){const t=e.target;t&&"hasAttribute"in t&&(t.hasAttribute("data-focus-visible")||(ab=!1))}function cb(e){e.metaKey||e.ctrlKey||e.altKey||(ab=!0)}var ub=Tx((function(e){var t=e,{focusable:s=!0,accessibleWhenDisabled:n,autoFocus:i,onFocusVisible:r}=t,o=bv(t,["focusable","accessibleWhenDisabled","autoFocus","onFocusVisible"]);const a=(0,Hs.useRef)(null);(0,Hs.useEffect)((()=>{s&&(ux("mousedown",lb,!0),ux("keydown",cb,!0))}),[s]),eb&&(0,Hs.useEffect)((()=>{if(!s)return;const e=a.current;if(!e)return;if(!ib(e))return;const t=function(e){return"labels"in e?e.labels:null}(e);if(!t)return;const n=()=>queueMicrotask((()=>e.focus()));for(const e of t)e.addEventListener("mouseup",n);return()=>{for(const e of t)e.removeEventListener("mouseup",n)}}),[s]);const l=s&&Rv(o),c=!!l&&!n,[u,d]=(0,Hs.useState)(!1);(0,Hs.useEffect)((()=>{s&&c&&u&&d(!1)}),[s,c,u]),(0,Hs.useEffect)((()=>{if(!s)return;if(!u)return;const e=a.current;if(!e)return;if("undefined"==typeof IntersectionObserver)return;const t=new IntersectionObserver((()=>{Jy(e)||d(!1)}));return t.observe(e),()=>t.disconnect()}),[s,u]);const p=ob(o.onKeyPressCapture,l),h=ob(o.onMouseDownCapture,l),f=ob(o.onClickCapture,l),m=o.onMouseDown,g=mx((e=>{if(null==m||m(e),e.defaultPrevented)return;if(!s)return;const t=e.currentTarget;if(!eb)return;if(ix(e))return;if(!Zv(t)&&!ib(t))return;let n=!1;const i=()=>{n=!0};t.addEventListener("focusin",i,{capture:!0,once:!0});const r=function(e){for(;e&&!Jy(e);)e=e.closest(Xy);return e||null}(t.parentElement);nb(r,!0),cx(t,"mouseup",(()=>{t.removeEventListener("focusin",i,!0),nb(r,!1),n||function(e){!$y(e)&&Jy(e)&&e.focus()}(t)}))})),v=(e,t)=>{if(t&&(e.currentTarget=t),!s)return;const n=e.currentTarget;n&&Qy(n)&&(null==r||r(e),e.defaultPrevented||(n.dataset.focusVisible="true",d(!0)))},x=o.onKeyDownCapture,y=mx((e=>{if(null==x||x(e),e.defaultPrevented)return;if(!s)return;if(u)return;if(e.metaKey)return;if(e.altKey)return;if(e.ctrlKey)return;if(!rx(e))return;const t=e.currentTarget;cx(t,"focusout",(()=>v(e,t)))})),b=o.onFocusCapture,w=mx((e=>{if(null==b||b(e),e.defaultPrevented)return;if(!s)return;if(!rx(e))return void d(!1);const t=e.currentTarget,n=()=>v(e,t);ab||function(e){const{tagName:t,readOnly:s,type:n}=e;return"TEXTAREA"===t&&!s||("SELECT"===t&&!s||("INPUT"!==t||s?!!e.isContentEditable||!("combobox"!==e.getAttribute("role")||!e.dataset.name):tb.includes(n)))}(e.target)?cx(e.target,"focusout",n):d(!1)})),_=o.onBlur,S=mx((e=>{null==_||_(e),s&&lx(e)&&d(!1)})),j=(0,Hs.useContext)(Yy),C=mx((e=>{s&&i&&e&&j&&queueMicrotask((()=>{Qy(e)||Jy(e)&&e.focus()}))})),k=xx(a),E=s&&function(e){return!e||"button"===e||"summary"===e||"input"===e||"select"===e||"textarea"===e||"a"===e}(k),P=s&&function(e){return!e||"button"===e||"input"===e||"select"===e||"textarea"===e}(k),I=o.style,T=(0,Hs.useMemo)((()=>c?xv({pointerEvents:"none"},I):I),[c,I]);return Bv(o=yv(xv({"data-focus-visible":s&&u||void 0,"data-autofocus":i||void 0,"aria-disabled":l||void 0},o),{ref:gx(a,C,o.ref),style:T,tabIndex:rb(s,c,E,P,o.tabIndex),disabled:!(!P||!c)||void 0,contentEditable:l?void 0:o.contentEditable,onKeyPressCapture:p,onClickCapture:f,onMouseDownCapture:h,onMouseDown:g,onKeyDownCapture:y,onFocusCapture:w,onBlur:S}))}));Ex((function(e){return Ix("div",ub(e))}));function db(e,t,s){return mx((n=>{var i;if(null==t||t(n),n.defaultPrevented)return;if(n.isPropagationStopped())return;if(!rx(n))return;if(function(e){return"Shift"===e.key||"Control"===e.key||"Alt"===e.key||"Meta"===e.key}(n))return;if(function(e){const t=e.target;return!(t&&!Yv(t)||1!==e.key.length||e.ctrlKey||e.metaKey)}(n))return;const r=e.getState(),o=null==(i=qy(e,r.activeId))?void 0:i.element;if(!o)return;const a=n,{view:l}=a,c=bv(a,["view"]);o!==(null==s?void 0:s.current)&&o.focus(),function(e,t,s){const n=new KeyboardEvent(t,s);return e.dispatchEvent(n)}(o,n.type,c)||n.preventDefault(),n.currentTarget.contains(o)&&n.stopPropagation()}))}var pb=Tx((function(e){var t=e,{store:s,composite:n=!0,focusOnMove:i=n,moveOnKeyPress:r=!0}=t,o=bv(t,["store","composite","focusOnMove","moveOnKeyPress"]);const a=Fx();Fv(s=s||a,!1);const l=(0,Hs.useRef)(null),c=(0,Hs.useRef)(null),u=function(e){const[t,s]=(0,Hs.useState)(!1),n=(0,Hs.useCallback)((()=>s(!0)),[]),i=e.useState((t=>qy(e,t.activeId)));return(0,Hs.useEffect)((()=>{const e=null==i?void 0:i.element;t&&e&&(s(!1),e.focus({preventScroll:!0}))}),[i,t]),n}(s),d=s.useState("moves"),[,p]=function(e){const[t,s]=(0,Hs.useState)(null);return fx((()=>{if(null==t)return;if(!e)return;let s=null;return e((e=>(s=e,t))),()=>{e(s)}}),[t,e]),[t,s]}(n?s.setBaseElement:null);(0,Hs.useEffect)((()=>{var e;if(!s)return;if(!d)return;if(!n)return;if(!i)return;const{activeId:t}=s.getState(),r=null==(e=qy(s,t))?void 0:e.element;var o,a;r&&("scrollIntoView"in(o=r)?(o.focus({preventScroll:!0}),o.scrollIntoView(Pv({block:"nearest",inline:"nearest"},a))):o.focus())}),[s,d,n,i]),fx((()=>{if(!s)return;if(!d)return;if(!n)return;const{baseElement:e,activeId:t}=s.getState();if(!(null===t))return;if(!e)return;const i=c.current;c.current=null,i&&ox(i,{relatedTarget:e}),Qy(e)||e.focus()}),[s,d,n]);const h=s.useState("activeId"),f=s.useState("virtualFocus");fx((()=>{var e;if(!s)return;if(!n)return;if(!f)return;const t=c.current;if(c.current=null,!t)return;const i=(null==(e=qy(s,h))?void 0:e.element)||Wv(t);i!==t&&ox(t,{relatedTarget:i})}),[s,h,f,n]);const m=db(s,o.onKeyDownCapture,c),g=db(s,o.onKeyUpCapture,c),v=o.onFocusCapture,x=mx((e=>{if(null==v||v(e),e.defaultPrevented)return;if(!s)return;const{virtualFocus:t}=s.getState();if(!t)return;const n=e.relatedTarget,i=function(e){const t=e[Zy];return delete e[Zy],t}(e.currentTarget);rx(e)&&i&&(e.stopPropagation(),c.current=n)})),y=o.onFocus,b=mx((e=>{if(null==y||y(e),e.defaultPrevented)return;if(!n)return;if(!s)return;const{relatedTarget:t}=e,{virtualFocus:i}=s.getState();i?rx(e)&&!Ky(s,t)&&queueMicrotask(u):rx(e)&&s.setActiveId(null)})),w=o.onBlurCapture,_=mx((e=>{var t;if(null==w||w(e),e.defaultPrevented)return;if(!s)return;const{virtualFocus:n,activeId:i}=s.getState();if(!n)return;const r=null==(t=qy(s,i))?void 0:t.element,o=e.relatedTarget,a=Ky(s,o),l=c.current;if(c.current=null,rx(e)&&a)o===r?l&&l!==o&&ox(l,e):r?ox(r,e):l&&ox(l,e),e.stopPropagation();else{!Ky(s,e.target)&&r&&ox(r,e)}})),S=o.onKeyDown,j=bx(r),C=mx((e=>{var t;if(null==S||S(e),e.defaultPrevented)return;if(!s)return;if(!rx(e))return;const{orientation:n,items:i,renderedItems:r,activeId:o}=s.getState(),a=qy(s,o);if(null==(t=null==a?void 0:a.element)?void 0:t.isConnected)return;const l="horizontal"!==n,c="vertical"!==n,u=function(e){return e.some((e=>!!e.rowId))}(r);if(("ArrowLeft"===e.key||"ArrowRight"===e.key||"Home"===e.key||"End"===e.key)&&Yv(e.currentTarget))return;const d={ArrowUp:(u||l)&&(()=>{if(u){const e=i&&function(e){return function(e,t){return e.find((e=>t?!e.disabled&&e.id!==t:!e.disabled))}(uy(dy(function(e){const t=[];for(const s of e){const e=t.find((e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===s.rowId}));e?e.push(s):t.push([s])}return t}(e))))}(i);return null==e?void 0:e.id}return null==s?void 0:s.last()}),ArrowRight:(u||c)&&s.first,ArrowDown:(u||l)&&s.first,ArrowLeft:(u||c)&&s.last,Home:s.first,End:s.last,PageUp:s.first,PageDown:s.last},p=d[e.key];if(p){const t=p();if(void 0!==t){if(!j(e))return;e.preventDefault(),s.move(t)}}}));o=wx(o,(e=>(0,oe.jsx)(Rx,{value:s,children:e})),[s]);const k=s.useState((e=>{var t;if(s&&n&&e.virtualFocus)return null==(t=qy(s,e.activeId))?void 0:t.id}));o=yv(xv({"aria-activedescendant":k},o),{ref:gx(l,p,o.ref),onKeyDownCapture:m,onKeyUpCapture:g,onFocusCapture:x,onFocus:b,onBlurCapture:_,onKeyDown:C});const E=s.useState((e=>n&&(e.virtualFocus||null===e.activeId)));return o=ub(xv({focusable:E},o))}));Ex((function(e){return Ix("div",pb(e))}));function hb(e,t,s){if(!s)return!1;const n=e.find((e=>!e.disabled&&e.value));return(null==n?void 0:n.value)===t}function fb(e,t){return!!t&&(null!=e&&(e=Mv(e),t.length>e.length&&0===t.toLowerCase().indexOf(e.toLowerCase())))}var mb=Tx((function(e){var t=e,{store:s,focusable:n=!0,autoSelect:i=!1,getAutoSelectId:r,setValueOnChange:o,showMinLength:a=0,showOnChange:l,showOnMouseDown:c,showOnClick:u=c,showOnKeyDown:d,showOnKeyPress:p=d,blurActiveItemOnClick:h,setValueOnClick:f=!0,moveOnKeyPress:m=!0,autoComplete:g="list"}=t,v=bv(t,["store","focusable","autoSelect","getAutoSelectId","setValueOnChange","showMinLength","showOnChange","showOnMouseDown","showOnClick","showOnKeyDown","showOnKeyPress","blurActiveItemOnClick","setValueOnClick","moveOnKeyPress","autoComplete"]);const x=Ry();Fv(s=s||x,!1);const y=(0,Hs.useRef)(null),[b,w]=(0,Hs.useReducer)((()=>[]),[]),_=(0,Hs.useRef)(!1),S=(0,Hs.useRef)(!1),j=s.useState((e=>e.virtualFocus&&i)),C="inline"===g||"both"===g,[k,E]=(0,Hs.useState)(C);!function(e,t){const s=(0,Hs.useRef)(!1);fx((()=>{if(s.current)return e();s.current=!0}),t),fx((()=>()=>{s.current=!1}),[])}((()=>{C&&E(!0)}),[C]);const P=s.useState("value"),I=(0,Hs.useRef)();(0,Hs.useEffect)((()=>Kx(s,["selectedValue","activeId"],((e,t)=>{I.current=t.selectedValue}))),[]);const T=s.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=s.useState("renderedItems"),A=s.useState("open"),N=s.useState("contentElement"),M=(0,Hs.useMemo)((()=>{if(!C)return P;if(!k)return P;if(hb(O,T,j)){if(fb(P,T)){const e=(null==T?void 0:T.slice(P.length))||"";return P+e}return P}return T||P}),[C,k,O,T,j,P]);(0,Hs.useEffect)((()=>{const e=y.current;if(!e)return;const t=()=>E(!0);return e.addEventListener("combobox-item-move",t),()=>{e.removeEventListener("combobox-item-move",t)}}),[]),(0,Hs.useEffect)((()=>{if(!C)return;if(!k)return;if(!T)return;if(!hb(O,T,j))return;if(!fb(P,T))return;let e=Ov;return queueMicrotask((()=>{const t=y.current;if(!t)return;const{start:s,end:n}=Jv(t),i=P.length,r=T.length;ex(t,i,r),e=()=>{if(!Qy(t))return;const{start:e,end:o}=Jv(t);e===i&&o===r&&ex(t,s,n)}})),()=>e()}),[b,C,k,T,O,j,P]);const V=(0,Hs.useRef)(null),F=mx(r),R=(0,Hs.useRef)(null);(0,Hs.useEffect)((()=>{if(!A)return;if(!N)return;const e=$v(N);if(!e)return;V.current=e;const t=()=>{_.current=!1},n=()=>{if(!s)return;if(!_.current)return;const{activeId:e}=s.getState();null!==e&&e!==R.current&&(_.current=!1)},i={passive:!0,capture:!0};return e.addEventListener("wheel",t,i),e.addEventListener("touchmove",t,i),e.addEventListener("scroll",n,i),()=>{e.removeEventListener("wheel",t,!0),e.removeEventListener("touchmove",t,!0),e.removeEventListener("scroll",n,!0)}}),[A,N,s]),fx((()=>{P&&(S.current||(_.current=!0))}),[P]),fx((()=>{"always"!==j&&A||(_.current=A)}),[j,A]);const B=s.useState("resetValueOnSelect");yx((()=>{var e,t;const n=_.current;if(!s)return;if(!A)return;if(!(j&&n||B))return;const{baseElement:i,contentElement:r,activeId:o}=s.getState();if(!i||Qy(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(j&&n){const t=F(O),n=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:s.first();R.current=n,s.move(null!=n?n:null)}else{const e=null==(t=s.item(o))?void 0:t.element;e&&"scrollIntoView"in e&&e.scrollIntoView({block:"nearest",inline:"nearest"})}}}),[s,A,b,P,j,B,F,O]),(0,Hs.useEffect)((()=>{if(!C)return;const e=y.current;if(!e)return;const t=[e,N].filter((e=>!!e)),n=e=>{t.every((t=>lx(e,t)))&&(null==s||s.setValue(M))};for(const e of t)e.addEventListener("focusout",n);return()=>{for(const e of t)e.removeEventListener("focusout",n)}}),[C,N,s,M]);const D=e=>e.currentTarget.value.length>=a,z=v.onChange,L=bx(null!=l?l:D),G=bx(null!=o?o:!s.tag),H=mx((e=>{if(null==z||z(e),e.defaultPrevented)return;if(!s)return;const t=e.currentTarget,{value:n,selectionStart:i,selectionEnd:r}=t,o=e.nativeEvent;if(_.current=!0,function(e){return"input"===e.type}(o)&&(o.isComposing&&(_.current=!1,S.current=!0),C)){const e="insertText"===o.inputType||"insertCompositionText"===o.inputType,t=i===n.length;E(e&&t)}if(G(e)){const e=n===s.getState().value;s.setValue(n),queueMicrotask((()=>{ex(t,i,r)})),C&&j&&e&&w()}L(e)&&s.show(),j&&_.current||s.setActiveId(null)})),U=v.onCompositionEnd,W=mx((e=>{_.current=!0,S.current=!1,null==U||U(e),e.defaultPrevented||j&&w()})),q=v.onMouseDown,Z=bx(null!=h?h:()=>!!(null==s?void 0:s.getState().includesBaseElement)),K=bx(f),Y=bx(null!=u?u:D),X=mx((e=>{null==q||q(e),e.defaultPrevented||e.button||e.ctrlKey||s&&(Z(e)&&s.setActiveId(null),K(e)&&s.setValue(M),Y(e)&&cx(e.currentTarget,"mouseup",s.show))})),J=v.onKeyDown,Q=bx(null!=p?p:D),$=mx((e=>{if(null==J||J(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(!s)return;const{open:t}=s.getState();t||"ArrowUp"!==e.key&&"ArrowDown"!==e.key||Q(e)&&(e.preventDefault(),s.show())})),ee=v.onBlur,te=mx((e=>{_.current=!1,null==ee||ee(e),e.defaultPrevented})),se=vx(v.id),ne=function(e){return"inline"===e||"list"===e||"both"===e||"none"===e}(g)?g:void 0,ie=s.useState((e=>null===e.activeId));return v=yv(xv({id:se,role:"combobox","aria-autocomplete":ne,"aria-haspopup":Qv(N,"listbox"),"aria-expanded":A,"aria-controls":null==N?void 0:N.id,"data-active-item":ie||void 0,value:M},v),{ref:gx(y,v.ref),onChange:H,onCompositionEnd:W,onMouseDown:X,onKeyDown:$,onBlur:te}),v=pb(yv(xv({store:s,focusable:n},v),{moveOnKeyPress:e=>!function(e,...t){const s="function"==typeof e?e(...t):e;return null!=s&&!s}(m,e)&&(C&&E(!0),!0)})),v=Wy(xv({store:s},v)),xv({autoComplete:"off"},v)})),gb=Ex((function(e){return Ix("input",mb(e))}));function vb(e,t){const s=setTimeout(t,e);return()=>clearTimeout(s)}function xb(...e){return e.join(", ").split(", ").reduce(((e,t)=>{const s=t.endsWith("ms")?1:1e3,n=Number.parseFloat(t||"0s")*s;return n>e?n:e}),0)}function yb(e,t,s){return!(s||!1===t||e&&!t)}var bb=Tx((function(e){var t=e,{store:s,alwaysVisible:n}=t,i=bv(t,["store","alwaysVisible"]);const r=Cy();Fv(s=s||r,!1);const o=(0,Hs.useRef)(null),a=vx(i.id),[l,c]=(0,Hs.useState)(null),u=s.useState("open"),d=s.useState("mounted"),p=s.useState("animated"),h=s.useState("contentElement"),f=ty(s.disclosure,"contentElement");fx((()=>{o.current&&(null==s||s.setContentElement(o.current))}),[s]),fx((()=>{let e;return null==s||s.setState("animated",(t=>(e=t,!0))),()=>{void 0!==e&&(null==s||s.setState("animated",e))}}),[s]),fx((()=>{if(p){if(null==h?void 0:h.isConnected)return function(e){let t=requestAnimationFrame((()=>{t=requestAnimationFrame(e)}));return()=>cancelAnimationFrame(t)}((()=>{c(u?"enter":d?"leave":null)}));c(null)}}),[p,h,u,d]),fx((()=>{if(!s)return;if(!p)return;const e=()=>null==s?void 0:s.setState("animating",!1),t=()=>(0,Fr.flushSync)(e);if(!l||!h)return void e();if("leave"===l&&u)return;if("enter"===l&&!u)return;if("number"==typeof p){return vb(p,t)}const{transitionDuration:n,animationDuration:i,transitionDelay:r,animationDelay:o}=getComputedStyle(h),{transitionDuration:a="0",animationDuration:c="0",transitionDelay:d="0",animationDelay:m="0"}=f?getComputedStyle(f):{},g=xb(r,o,d,m)+xb(n,i,a,c);if(!g)return"enter"===l&&s.setState("animated",!1),void e();return vb(Math.max(g-1e3/60,0),t)}),[s,p,h,f,u,l]),i=wx(i,(e=>(0,oe.jsx)(Py,{value:s,children:e})),[s]);const m=yb(d,i.hidden,n),g=i.style,v=(0,Hs.useMemo)((()=>m?yv(xv({},g),{display:"none"}):g),[m,g]);return Bv(i=yv(xv({id:a,"data-open":u||void 0,"data-enter":"enter"===l||void 0,"data-leave":"leave"===l||void 0,hidden:m},i),{ref:gx(a?s.setContentElement:null,o,i.ref),style:v}))})),wb=Ex((function(e){return Ix("div",bb(e))})),_b=(Ex((function(e){var t=e,{unmountOnHide:s}=t,n=bv(t,["unmountOnHide"]);const i=Cy();return!1===ty(n.store||i,(e=>!s||(null==e?void 0:e.mounted)))?null:(0,oe.jsx)(wb,xv({},n))})),Tx((function(e){var t=e,{store:s,alwaysVisible:n}=t,i=bv(t,["store","alwaysVisible"]);const r=Fy(!0),o=Vy(),a=!!(s=s||o)&&s===r;Fv(s,!1);const l=(0,Hs.useRef)(null),c=vx(i.id),u=s.useState("mounted"),d=yb(u,i.hidden,n),p=d?yv(xv({},i.style),{display:"none"}):i.style,h=s.useState((e=>Array.isArray(e.selectedValue))),f=function(e,t,s){const[n,i]=(0,Hs.useState)(s);return fx((()=>{const s=e&&"current"in e?e.current:e;if(!s)return;const n=()=>{const e=s.getAttribute(t);null!=e&&i(e)},r=new MutationObserver(n);return r.observe(s,{attributeFilter:[t]}),n(),()=>r.disconnect()}),[e,t]),n}(l,"role",i.role),m=("listbox"===f||"tree"===f||"grid"===f)&&h||void 0,[g,v]=(0,Hs.useState)(!1),x=s.useState("contentElement");fx((()=>{if(!u)return;const e=l.current;if(!e)return;if(x!==e)return;const t=()=>{v(!!e.querySelector("[role='listbox']"))},s=new MutationObserver(t);return s.observe(e,{subtree:!0,childList:!0,attributeFilter:["role"]}),t(),()=>s.disconnect()}),[u,x]),g||(i=xv({role:"listbox","aria-multiselectable":m},i)),i=wx(i,(e=>(0,oe.jsx)(Dy,{value:s,children:(0,oe.jsx)(Ny.Provider,{value:f,children:e})})),[s,f]);const y=!c||r&&a?null:s.setContentElement;return Bv(i=yv(xv({id:c,hidden:d},i),{ref:gx(y,l,i.ref),style:p}))}))),Sb=Ex((function(e){return Ix("div",_b(e))}));function jb(e){const t=e.relatedTarget;return(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE?t:null}var Cb=Symbol("composite-hover");var kb=Tx((function(e){var t=e,{store:s,focusOnHover:n=!0,blurOnHoverEnd:i=!!n}=t,r=bv(t,["store","focusOnHover","blurOnHoverEnd"]);const o=Vx();Fv(s=s||o,!1);const a=((0,Hs.useEffect)((()=>{ux("mousemove",Cx,!0),ux("mousedown",kx,!0),ux("mouseup",kx,!0),ux("keydown",kx,!0),ux("scroll",kx,!0)}),[]),mx((()=>_x))),l=r.onMouseMove,c=bx(n),u=mx((e=>{if(null==l||l(e),!e.defaultPrevented&&a()&&c(e)){if(!$y(e.currentTarget)){const e=null==s?void 0:s.getState().baseElement;e&&!Qy(e)&&e.focus()}null==s||s.setActiveId(e.currentTarget.id)}})),d=r.onMouseLeave,p=bx(i),h=mx((e=>{var t;null==d||d(e),e.defaultPrevented||a()&&(function(e){const t=jb(e);return!!t&&qv(e.currentTarget,t)}(e)||function(e){let t=jb(e);if(!t)return!1;do{if(Av(t,Cb)&&t[Cb])return!0;t=t.parentElement}while(t);return!1}(e)||c(e)&&p(e)&&(null==s||s.setActiveId(null),null==(t=null==s?void 0:s.getState().baseElement)||t.focus()))})),f=(0,Hs.useCallback)((e=>{e&&(e[Cb]=!0)}),[]);return Bv(r=yv(xv({},r),{ref:gx(f,r.ref),onMouseMove:u,onMouseLeave:h}))})),Eb=(Px(Ex((function(e){return Ix("div",kb(e))}))),Tx((function(e){var t=e,{store:s,shouldRegisterItem:n=!0,getItem:i=Vv,element:r}=t,o=bv(t,["store","shouldRegisterItem","getItem","element"]);const a=Nx();s=s||a;const l=vx(o.id),c=(0,Hs.useRef)(r);return(0,Hs.useEffect)((()=>{const e=c.current;if(!l)return;if(!e)return;if(!n)return;const t=i({id:l,element:e});return null==s?void 0:s.renderItem(t)}),[l,n,i,s]),Bv(o=yv(xv({},o),{ref:gx(c,o.ref)}))})));Ex((function(e){return Ix("div",Eb(e))}));function Pb(e){if(!e.isTrusted)return!1;const t=e.currentTarget;return"Enter"===e.key?Zv(t)||"SUMMARY"===t.tagName||"A"===t.tagName:" "===e.key&&(Zv(t)||"SUMMARY"===t.tagName||"INPUT"===t.tagName||"SELECT"===t.tagName)}var Ib=Symbol("command"),Tb=Tx((function(e){var t=e,{clickOnEnter:s=!0,clickOnSpace:n=!0}=t,i=bv(t,["clickOnEnter","clickOnSpace"]);const r=(0,Hs.useRef)(null),o=xx(r),a=i.type,[l,c]=(0,Hs.useState)((()=>!!o&&Zv({tagName:o,type:a})));(0,Hs.useEffect)((()=>{r.current&&c(Zv(r.current))}),[]);const[u,d]=(0,Hs.useState)(!1),p=(0,Hs.useRef)(!1),h=Rv(i),[f,m]=function(e,t,s){const n=e.onLoadedMetadataCapture,i=(0,Hs.useMemo)((()=>Object.assign((()=>{}),yv(xv({},n),{[t]:s}))),[n,t,s]);return[null==n?void 0:n[t],{onLoadedMetadataCapture:i}]}(i,Ib,!0),g=i.onKeyDown,v=mx((e=>{null==g||g(e);const t=e.currentTarget;if(e.defaultPrevented)return;if(f)return;if(h)return;if(!rx(e))return;if(Yv(t))return;if(t.isContentEditable)return;const i=s&&"Enter"===e.key,r=n&&" "===e.key,o="Enter"===e.key&&!s,a=" "===e.key&&!n;if(o||a)e.preventDefault();else if(i||r){const s=Pb(e);if(i){if(!s){e.preventDefault();const s=e,{view:n}=s,i=bv(s,["view"]),r=()=>ax(t,i);Hv&&/firefox\//i.test(navigator.userAgent)?cx(t,"keyup",r):queueMicrotask(r)}}else r&&(p.current=!0,s||(e.preventDefault(),d(!0)))}})),x=i.onKeyUp,y=mx((e=>{if(null==x||x(e),e.defaultPrevented)return;if(f)return;if(h)return;if(e.metaKey)return;const t=n&&" "===e.key;if(p.current&&t&&(p.current=!1,!Pb(e))){e.preventDefault(),d(!1);const t=e.currentTarget,s=e,{view:n}=s,i=bv(s,["view"]);queueMicrotask((()=>ax(t,i)))}}));return i=yv(xv(xv({"data-active":u||void 0,type:l?"button":void 0},m),i),{ref:gx(r,i.ref),onKeyDown:v,onKeyUp:y}),i=ub(i)}));Ex((function(e){return Ix("button",Tb(e))}));function Ob(e,t=!1){const{top:s}=e.getBoundingClientRect();return t?s+e.clientHeight:s}function Ab(e,t,s,n=!1){var i;if(!t)return;if(!s)return;const{renderedItems:r}=t.getState(),o=$v(e);if(!o)return;const a=function(e,t=!1){const s=e.clientHeight,{top:n}=e.getBoundingClientRect(),i=1.5*Math.max(.875*s,s-40),r=t?s-i+n:i+n;return"HTML"===e.tagName?r+e.scrollTop:r}(o,n);let l,c;for(let e=0;e<r.length;e+=1){const r=l;if(l=s(e),!l)break;if(l===r)continue;const o=null==(i=qy(t,l))?void 0:i.element;if(!o)continue;const u=Ob(o,n)-a,d=Math.abs(u);if(n&&u<=0||!n&&u>=0){void 0!==c&&c<d&&(l=r);break}c=d}return l}var Nb=Tx((function(e){var t=e,{store:s,rowId:n,preventScrollOnKeyDown:i=!1,moveOnKeyPress:r=!0,tabbable:o=!1,getItem:a,"aria-setsize":l,"aria-posinset":c}=t,u=bv(t,["store","rowId","preventScrollOnKeyDown","moveOnKeyPress","tabbable","getItem","aria-setsize","aria-posinset"]);const d=Vx();s=s||d;const p=vx(u.id),h=(0,Hs.useRef)(null),f=(0,Hs.useContext)(zx),m=ty(s,(e=>n||(e&&(null==f?void 0:f.baseElement)&&f.baseElement===e.baseElement?f.id:void 0))),g=Rv(u)&&!u.accessibleWhenDisabled,v=(0,Hs.useCallback)((e=>{const t=yv(xv({},e),{id:p||e.id,rowId:m,disabled:!!g});return a?a(t):t}),[p,m,g,a]),x=u.onFocus,y=(0,Hs.useRef)(!1),b=mx((e=>{if(null==x||x(e),e.defaultPrevented)return;if(ix(e))return;if(!p)return;if(!s)return;if(function(e,t){return!rx(e)&&Ky(t,e.target)}(e,s))return;const{virtualFocus:t,baseElement:n}=s.getState();if(s.setActiveId(p),Xv(e.currentTarget)&&function(e,t=!1){if(Yv(e))e.setSelectionRange(t?e.value.length:0,e.value.length);else if(e.isContentEditable){const s=Uv(e).getSelection();null==s||s.selectAllChildren(e),t&&(null==s||s.collapseToEnd())}}(e.currentTarget),!t)return;if(!rx(e))return;if(Xv(i=e.currentTarget)||"INPUT"===i.tagName&&!Zv(i))return;var i;if(!(null==n?void 0:n.isConnected))return;nx()&&e.currentTarget.hasAttribute("data-autofocus")&&e.currentTarget.scrollIntoView({block:"nearest",inline:"nearest"}),y.current=!0;e.relatedTarget===n||Ky(s,e.relatedTarget)?function(e){e[Zy]=!0,e.focus({preventScroll:!0})}(n):n.focus()})),w=u.onBlurCapture,_=mx((e=>{if(null==w||w(e),e.defaultPrevented)return;const t=null==s?void 0:s.getState();(null==t?void 0:t.virtualFocus)&&y.current&&(y.current=!1,e.preventDefault(),e.stopPropagation())})),S=u.onKeyDown,j=bx(i),C=bx(r),k=mx((e=>{if(null==S||S(e),e.defaultPrevented)return;if(!rx(e))return;if(!s)return;const{currentTarget:t}=e,n=s.getState(),i=s.item(p),r=!!(null==i?void 0:i.rowId),o="horizontal"!==n.orientation,a="vertical"!==n.orientation,l=()=>!!r||(!!a||(!n.baseElement||!Yv(n.baseElement))),c={ArrowUp:(r||o)&&s.up,ArrowRight:(r||a)&&s.next,ArrowDown:(r||o)&&s.down,ArrowLeft:(r||a)&&s.previous,Home:()=>{if(l())return!r||e.ctrlKey?null==s?void 0:s.first():null==s?void 0:s.previous(-1)},End:()=>{if(l())return!r||e.ctrlKey?null==s?void 0:s.last():null==s?void 0:s.next(-1)},PageUp:()=>Ab(t,s,null==s?void 0:s.up,!0),PageDown:()=>Ab(t,s,null==s?void 0:s.down)}[e.key];if(c){if(Xv(t)){const s=Jv(t),n=a&&"ArrowLeft"===e.key,i=a&&"ArrowRight"===e.key,r=o&&"ArrowUp"===e.key,l=o&&"ArrowDown"===e.key;if(i||l){const{length:e}=function(e){if(Yv(e))return e.value;if(e.isContentEditable){const t=Uv(e).createRange();return t.selectNodeContents(e),t.toString()}return""}(t);if(s.end!==e)return}else if((n||r)&&0!==s.start)return}const n=c();if(j(e)||void 0!==n){if(!C(e))return;e.preventDefault(),s.move(n)}}})),E=ty(s,(e=>(null==e?void 0:e.baseElement)||void 0)),P=(0,Hs.useMemo)((()=>({id:p,baseElement:E})),[p,E]);u=wx(u,(e=>(0,oe.jsx)(Dx.Provider,{value:P,children:e})),[P]);const I=ty(s,(e=>!!e&&e.activeId===p)),T=ty(s,(e=>null!=l?l:e&&(null==f?void 0:f.ariaSetSize)&&f.baseElement===e.baseElement?f.ariaSetSize:void 0)),O=ty(s,(e=>{if(null!=c)return c;if(!e)return;if(!(null==f?void 0:f.ariaPosInSet))return;if(f.baseElement!==e.baseElement)return;const t=e.renderedItems.filter((e=>e.rowId===m));return f.ariaPosInSet+t.findIndex((e=>e.id===p))})),A=ty(s,(e=>!(null==e?void 0:e.renderedItems.length)||!e.virtualFocus&&(!!o||e.activeId===p)));return u=yv(xv({id:p,"data-active-item":I||void 0},u),{ref:gx(h,u.ref),tabIndex:A?u.tabIndex:-1,onFocus:b,onBlurCapture:_,onKeyDown:k}),u=Tb(u),u=Eb(yv(xv({store:s},u),{getItem:v,shouldRegisterItem:!!p&&u.shouldRegisterItem})),Bv(yv(xv({},u),{"aria-setsize":T,"aria-posinset":O}))}));Px(Ex((function(e){return Ix("button",Nb(e))})));function Mb(e){var t;return null!=(t={menu:"menuitem",listbox:"option",tree:"treeitem"}[e])?t:"option"}var Vb=Tx((function(e){var t,s=e,{store:n,value:i,hideOnClick:r,setValueOnClick:o,selectValueOnClick:a=!0,resetValueOnSelect:l,focusOnHover:c=!1,moveOnKeyPress:u=!0,getItem:d}=s,p=bv(s,["store","value","hideOnClick","setValueOnClick","selectValueOnClick","resetValueOnSelect","focusOnHover","moveOnKeyPress","getItem"]);const h=Fy();Fv(n=n||h,!1);const f=(0,Hs.useCallback)((e=>{const t=yv(xv({},e),{value:i});return d?d(t):t}),[i,d]),m=n.useState((e=>Array.isArray(e.selectedValue))),g=n.useState((e=>function(e,t){if(null!=t)return null!=e&&(Array.isArray(e)?e.includes(t):e===t)}(e.selectedValue,i))),v=n.useState("resetValueOnSelect");o=null!=o?o:!m,r=null!=r?r:null!=i&&!m;const x=p.onClick,y=bx(o),b=bx(a),w=bx(null!=(t=null!=l?l:v)?t:m),_=bx(r),S=mx((e=>{null==x||x(e),e.defaultPrevented||function(e){const t=e.currentTarget;if(!t)return!1;const s=t.tagName.toLowerCase();return!!e.altKey&&("a"===s||"button"===s&&"submit"===t.type||"input"===s&&"submit"===t.type)}(e)||function(e){const t=e.currentTarget;if(!t)return!1;const s=sx();if(s&&!e.metaKey)return!1;if(!s&&!e.ctrlKey)return!1;const n=t.tagName.toLowerCase();return"a"===n||"button"===n&&"submit"===t.type||"input"===n&&"submit"===t.type}(e)||(null!=i&&(b(e)&&(w(e)&&(null==n||n.resetValue()),null==n||n.setSelectedValue((e=>Array.isArray(e)?e.includes(i)?e.filter((e=>e!==i)):[...e,i]:i))),y(e)&&(null==n||n.setValue(i))),_(e)&&(null==n||n.hide()))})),j=p.onKeyDown,C=mx((e=>{if(null==j||j(e),e.defaultPrevented)return;const t=null==n?void 0:n.getState().baseElement;if(!t)return;if(Qy(t))return;(1===e.key.length||"Backspace"===e.key||"Delete"===e.key)&&(queueMicrotask((()=>t.focus())),Yv(t)&&(null==n||n.setValue(t.value)))}));m&&null!=g&&(p=xv({"aria-selected":g},p)),p=wx(p,(e=>(0,oe.jsx)(zy.Provider,{value:i,children:(0,oe.jsx)(Ly.Provider,{value:null!=g&&g,children:e})})),[i,g]);const k=(0,Hs.useContext)(Ny);p=yv(xv({role:Mb(k),children:i},p),{onClick:S,onKeyDown:C});const E=bx(u);return p=Nb(yv(xv({store:n},p),{getItem:f,moveOnKeyPress:e=>{if(!E(e))return!1;const t=new Event("combobox-item-move"),s=null==n?void 0:n.getState().baseElement;return null==s||s.dispatchEvent(t),!0}})),p=kb(xv({store:n,focusOnHover:c},p))})),Fb=Px(Ex((function(e){return Ix("div",Vb(e))})));function Rb(e){return Mv(e).toLowerCase()}function Bb(e,t){if(!e)return e;if(!t)return e;const s=(n=t,Array.isArray(n)?n:void 0!==n?[n]:[]).filter(Boolean).map(Rb);var n;const i=[],r=(e,t=!1)=>(0,oe.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],s,n)=>!n.some((([n,i],r)=>r!==s&&n<=e&&n+i>=e+t))))}(function(e,t){const s=[];for(const n of t){let t=0;const i=n.length;for(;-1!==e.indexOf(n,t);){const r=e.indexOf(n,t);-1!==r&&s.push([r,i]),t=r+1}}return s}(Rb(e),new Set(s))));if(!o.length)return i.push(r(e,!0)),i;const[a]=o[0],l=[e.slice(0,a),...o.flatMap((([t,s],n)=>{var i;const r=e.slice(t,t+s),a=null==(i=o[n+1])?void 0:i[0];return[r,e.slice(t+s,a)]}))];return l.forEach(((e,t)=>{e&&i.push(r(e,t%2==0))})),i}var Db=Tx((function(e){var t=e,{store:s,value:n,userValue:i}=t,r=bv(t,["store","value","userValue"]);const o=Fy();s=s||o;const a=(0,Hs.useContext)(zy),l=null!=n?n:a,c=ty(s,(e=>null!=i?i:null==e?void 0:e.value)),u=(0,Hs.useMemo)((()=>{if(l)return c?Bb(l,c):l}),[l,c]);return Bv(r=xv({children:u},r))})),zb=Ex((function(e){return Ix("span",Db(e))}));const Lb=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.Circle,{cx:12,cy:12,r:3})});function Gb(e=""){return Vg()(e.trim().toLowerCase())}const Hb=[],Ub=(e,t)=>e.singleSelection?t?.value:Array.isArray(t?.value)?t.value:!Array.isArray(t?.value)&&t?.value?[t.value]:Hb,Wb=(e,t,s)=>e.singleSelection?s:Array.isArray(t?.value)?t.value.includes(s)?t.value.filter((e=>e!==s)):[...t.value,s]:[s];function qb(e,t){return`${e}-${t}`}function Zb({view:e,filter:t,onChangeView:s}){const n=(0,v.useInstanceId)(Zb,"dataviews-filter-list-box"),[i,r]=(0,d.useState)(1===t.operators?.length?void 0:null),o=e.filters?.find((e=>e.field===t.field)),a=Ub(t,o);return(0,oe.jsx)(y.Composite,{virtualFocus:!0,focusLoop:!0,activeId:i,setActiveId:r,role:"listbox",className:"dataviews-filters__search-widget-listbox","aria-label":(0,b.sprintf)((0,b.__)("List of: %1$s"),t.name),onFocusVisible:()=>{!i&&t.elements.length&&r(qb(n,t.elements[0].value))},render:(0,oe.jsx)(y.Composite.Typeahead,{}),children:t.elements.map((i=>(0,oe.jsxs)(y.Composite.Hover,{render:(0,oe.jsx)(y.Composite.Item,{id:qb(n,i.value),render:(0,oe.jsx)("div",{"aria-label":i.label,role:"option",className:"dataviews-filters__search-widget-listitem"}),onClick:()=>{var n,r;const a=o?[...(null!==(n=e.filters)&&void 0!==n?n:[]).map((e=>e.field===t.field?{...e,operator:o.operator||t.operators[0],value:Wb(t,o,i.value)}:e))]:[...null!==(r=e.filters)&&void 0!==r?r:[],{field:t.field,operator:t.operators[0],value:Wb(t,o,i.value)}];s({...e,page:1,filters:a})}}),children:[(0,oe.jsxs)("span",{className:"dataviews-filters__search-widget-listitem-check",children:[t.singleSelection&&a===i.value&&(0,oe.jsx)(y.Icon,{icon:Lb}),!t.singleSelection&&a.includes(i.value)&&(0,oe.jsx)(y.Icon,{icon:Jr})]}),(0,oe.jsx)("span",{children:i.label})]},i.value)))})}function Kb({view:e,filter:t,onChangeView:s}){const[n,i]=(0,d.useState)(""),r=(0,d.useDeferredValue)(n),o=e.filters?.find((e=>e.field===t.field)),a=Ub(t,o),l=(0,d.useMemo)((()=>{const e=Gb(r);return t.elements.filter((t=>Gb(t.label).includes(e)))}),[t.elements,r]);return(0,oe.jsxs)(Gy,{selectedValue:a,setSelectedValue:n=>{var i,r;const a=o?[...(null!==(i=e.filters)&&void 0!==i?i:[]).map((e=>e.field===t.field?{...e,operator:o.operator||t.operators[0],value:n}:e))]:[...null!==(r=e.filters)&&void 0!==r?r:[],{field:t.field,operator:t.operators[0],value:n}];s({...e,page:1,filters:a})},setValue:i,children:[(0,oe.jsxs)("div",{className:"dataviews-filters__search-widget-filter-combobox__wrapper",children:[(0,oe.jsx)(Uy,{render:(0,oe.jsx)(y.VisuallyHidden,{children:(0,b.__)("Search items")}),children:(0,b.__)("Search items")}),(0,oe.jsx)(gb,{autoSelect:"always",placeholder:(0,b.__)("Search"),className:"dataviews-filters__search-widget-filter-combobox__input"}),(0,oe.jsx)("div",{className:"dataviews-filters__search-widget-filter-combobox__icon",children:(0,oe.jsx)(y.Icon,{icon:$t})})]}),(0,oe.jsxs)(Sb,{className:"dataviews-filters__search-widget-filter-combobox-list",alwaysVisible:!0,children:[l.map((e=>(0,oe.jsxs)(Fb,{resetValueOnSelect:!1,value:e.value,className:"dataviews-filters__search-widget-listitem",hideOnClick:!1,setValueOnClick:!1,focusOnHover:!0,children:[(0,oe.jsxs)("span",{className:"dataviews-filters__search-widget-listitem-check",children:[t.singleSelection&&a===e.value&&(0,oe.jsx)(y.Icon,{icon:Lb}),!t.singleSelection&&a.includes(e.value)&&(0,oe.jsx)(y.Icon,{icon:Jr})]}),(0,oe.jsxs)("span",{children:[(0,oe.jsx)(zb,{className:"dataviews-filters__search-widget-filter-combobox-item-value",value:e.label}),!!e.description&&(0,oe.jsx)("span",{className:"dataviews-filters__search-widget-listitem-description",children:e.description})]})]},e.value))),!l.length&&(0,oe.jsx)("p",{children:(0,b.__)("No results found")})]})]})}function Yb(e){const t=e.filter.elements.length>10?Kb:Zb;return(0,oe.jsx)(t,{...e})}const Xb="Enter",Jb=" ",Qb=({activeElements:e,filterInView:t,filter:s})=>{if(void 0===e||0===e.length)return s.name;const n={Name:(0,oe.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,oe.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};return t?.operator===zg?(0,d.createInterpolateElement)((0,b.sprintf)((0,b.__)("<Name>%1$s is any: </Name><Value>%2$s</Value>"),s.name,e.map((e=>e.label)).join(", ")),n):t?.operator===Lg?(0,d.createInterpolateElement)((0,b.sprintf)((0,b.__)("<Name>%1$s is none: </Name><Value>%2$s</Value>"),s.name,e.map((e=>e.label)).join(", ")),n):t?.operator===Gg?(0,d.createInterpolateElement)((0,b.sprintf)((0,b.__)("<Name>%1$s is all: </Name><Value>%2$s</Value>"),s.name,e.map((e=>e.label)).join(", ")),n):t?.operator===Hg?(0,d.createInterpolateElement)((0,b.sprintf)((0,b.__)("<Name>%1$s is not all: </Name><Value>%2$s</Value>"),s.name,e.map((e=>e.label)).join(", ")),n):t?.operator===Bg?(0,d.createInterpolateElement)((0,b.sprintf)((0,b.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),s.name,e[0].label),n):t?.operator===Dg?(0,d.createInterpolateElement)((0,b.sprintf)((0,b.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),s.name,e[0].label),n):(0,b.sprintf)((0,b.__)("Unknown status for %1$s"),s.name)};function $b({filter:e,view:t,onChangeView:s}){const n=e.operators?.map((e=>({value:e,label:Wg[e]?.label}))),i=t.filters?.find((t=>t.field===e.field)),r=i?.operator||e.operators[0];return n.length>1&&(0,oe.jsxs)(y.__experimentalHStack,{spacing:2,justify:"flex-start",className:"dataviews-filters__summary-operators-container",children:[(0,oe.jsx)(y.FlexItem,{className:"dataviews-filters__summary-operators-filter-name",children:e.name}),(0,oe.jsx)(y.SelectControl,{label:(0,b.__)("Conditions"),value:r,options:n,onChange:n=>{var r,o;const a=n,l=i?[...(null!==(r=t.filters)&&void 0!==r?r:[]).map((t=>t.field===e.field?{...t,operator:a}:t))]:[...null!==(o=t.filters)&&void 0!==o?o:[],{field:e.field,operator:a,value:void 0}];s({...t,page:1,filters:l})},size:"small",__nextHasNoMarginBottom:!0,hideLabelFromVision:!0})]})}function ew({addFilterRef:e,openedFilter:t,...s}){const n=(0,d.useRef)(null),{filter:i,view:r,onChangeView:o}=s,a=r.filters?.find((e=>e.field===i.field)),l=i.elements.filter((e=>i.singleSelection?e.value===a?.value:a?.value?.includes(e.value))),c=i.isPrimary,u=void 0!==a?.value,p=!c||u;return(0,oe.jsx)(y.Dropdown,{defaultOpen:t===i.field,contentClassName:"dataviews-filters__summary-popover",popoverProps:{placement:"bottom-start",role:"dialog"},onClose:()=>{n.current?.focus()},renderToggle:({isOpen:t,onToggle:s})=>(0,oe.jsxs)("div",{className:"dataviews-filters__summary-chip-container",children:[(0,oe.jsx)(y.Tooltip,{text:(0,b.sprintf)((0,b.__)("Filter by: %1$s"),i.name.toLowerCase()),placement:"top",children:(0,oe.jsx)("div",{className:Ut("dataviews-filters__summary-chip",{"has-reset":p,"has-values":u}),role:"button",tabIndex:0,onClick:s,onKeyDown:e=>{[Xb,Jb].includes(e.key)&&(s(),e.preventDefault())},"aria-pressed":t,"aria-expanded":t,ref:n,children:(0,oe.jsx)(Qb,{activeElements:l,filterInView:a,filter:i})})}),p&&(0,oe.jsx)(y.Tooltip,{text:c?(0,b.__)("Reset"):(0,b.__)("Remove"),placement:"top",children:(0,oe.jsx)("button",{className:Ut("dataviews-filters__summary-chip-remove",{"has-values":u}),onClick:()=>{o({...r,page:1,filters:r.filters?.filter((e=>e.field!==i.field))}),c?n.current?.focus():e.current?.focus()},children:(0,oe.jsx)(y.Icon,{icon:pm})})})]}),renderContent:()=>(0,oe.jsxs)(y.__experimentalVStack,{spacing:0,justify:"flex-start",children:[(0,oe.jsx)($b,{...s}),(0,oe.jsx)(Yb,{...s})]})})}const{lock:tw,unlock:sw}=(0,$.__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"),{DropdownMenuV2:nw}=sw(y.privateApis);function iw({filters:e,view:t,onChangeView:s,setOpenedFilter:n,trigger:i}){const r=e.filter((e=>!e.isVisible));return(0,oe.jsx)(nw,{trigger:i,children:r.map((e=>(0,oe.jsx)(nw.Item,{onClick:()=>{n(e.field),s({...t,page:1,filters:[...t.filters||[],{field:e.field,value:void 0,operator:e.operators[0]}]})},children:(0,oe.jsx)(nw.ItemLabel,{children:e.name})},e.field)))})}const rw=(0,d.forwardRef)((function({filters:e,view:t,onChangeView:s,setOpenedFilter:n},i){if(!e.length||e.every((({isPrimary:e})=>e)))return null;const r=e.filter((e=>!e.isVisible));return(0,oe.jsx)(iw,{trigger:(0,oe.jsx)(y.Button,{accessibleWhenDisabled:!0,size:"compact",className:"dataviews-filters-button",variant:"tertiary",disabled:!r.length,ref:i,children:(0,b.__)("Add filter")}),filters:e,view:t,onChangeView:s,setOpenedFilter:n})}));function ow({filters:e,view:t,onChangeView:s}){const n=!t.search&&!t.filters?.some((t=>{return void 0!==t.value||(s=t.field,!e.some((e=>e.field===s&&e.isPrimary)));var s}));return(0,oe.jsx)(y.Button,{disabled:n,accessibleWhenDisabled:!0,size:"compact",variant:"tertiary",className:"dataviews-filters__reset-button",onClick:()=>{s({...t,page:1,search:"",filters:[]})},children:(0,b.__)("Reset")})}function aw(e){let t=e.filterBy?.operators;return t&&Array.isArray(t)||(t=[zg,Lg]),t=t.filter((e=>Ug.includes(e))),(t.includes(Bg)||t.includes(Dg))&&(t=t.filter((e=>[Bg,Dg].includes(e)))),t}function lw(e,t){return(0,d.useMemo)((()=>{const s=[];return e.forEach((e=>{if(!e.elements?.length)return;const n=aw(e);if(0===n.length)return;const i=!!e.filterBy?.isPrimary;s.push({field:e.id,name:e.label,elements:e.elements,singleSelection:n.some((e=>[Bg,Dg].includes(e))),operators:n,isVisible:i||!!t.filters?.some((t=>t.field===e.id&&Ug.includes(t.operator))),isPrimary:i})})),s.sort(((e,t)=>e.isPrimary&&!t.isPrimary?-1:!e.isPrimary&&t.isPrimary?1:e.name.localeCompare(t.name))),s}),[e,t])}function cw({filters:e,view:t,onChangeView:s,setOpenedFilter:n,isShowingFilter:i,setIsShowingFilter:r}){const o=(0,d.useCallback)((e=>{s(e),r(!0)}),[s,r]),a=!!e.filter((e=>e.isVisible)).length;return 0===e.length?null:a?(0,oe.jsxs)("div",{className:"dataviews-filters__container-visibility-toggle",children:[(0,oe.jsx)(y.Button,{className:"dataviews-filters__visibility-toggle",size:"compact",icon:uv,label:(0,b.__)("Toggle filter display"),onClick:()=>{i||n(null),r(!i)},isPressed:i,"aria-expanded":i}),a&&!!t.filters?.length&&(0,oe.jsx)("span",{className:"dataviews-filters-toggle__count",children:t.filters?.length})]}):(0,oe.jsx)(iw,{filters:e,view:t,onChangeView:o,setOpenedFilter:n,trigger:(0,oe.jsx)(y.Button,{className:"dataviews-filters__visibility-toggle",size:"compact",icon:uv,label:(0,b.__)("Add filter"),isPressed:!1,"aria-expanded":!1})})}const uw=(0,d.memo)((function(){const{fields:e,view:t,onChangeView:s,openedFilter:n,setOpenedFilter:i}=(0,d.useContext)(cv),r=(0,d.useRef)(null),o=lw(e,t),a=(0,oe.jsx)(rw,{filters:o,view:t,onChangeView:s,ref:r,setOpenedFilter:i},"add-filter"),l=o.filter((e=>e.isVisible));if(0===l.length)return null;const c=[...l.map((e=>(0,oe.jsx)(ew,{filter:e,view:t,onChangeView:s,addFilterRef:r,openedFilter:n},e.field))),a];return c.push((0,oe.jsx)(ow,{filters:o,view:t,onChangeView:s},"reset-filters")),(0,oe.jsx)(y.__experimentalHStack,{justify:"flex-start",style:{width:"fit-content"},className:"dataviews-filters__container",wrap:!0,children:c})})),dw=(0,oe.jsx)(Qt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,oe.jsx)(Qt.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"})}),pw=(0,oe.jsx)(Qt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,oe.jsx)(Qt.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,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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"})}),fw=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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 mw({selection:e,onChangeSelection:t,item:s,getItemId:n,primaryField:i,disabled:r}){const o=n(s),a=!r&&e.includes(o);let l;return l=i?.getValue&&s?(0,b.sprintf)(a?(0,b.__)("Deselect item: %s"):(0,b.__)("Select item: %s"),i.getValue({item:s})):a?(0,b.__)("Select a new item"):(0,b.__)("Deselect item"),(0,oe.jsx)(y.CheckboxControl,{className:"dataviews-selection-checkbox",__nextHasNoMarginBottom:!0,"aria-label":l,"aria-disabled":r,checked:a,onChange:()=>{r||t(e.includes(o)?e.filter((e=>o!==e)):[...e,o])}})}const{DropdownMenuV2:gw,kebabCase:vw}=sw(y.privateApis);function xw({action:e,onClick:t,items:s}){const n="string"==typeof e.label?e.label:e.label(s);return(0,oe.jsx)(y.Button,{label:n,icon:e.icon,isDestructive:e.isDestructive,size:"compact",onClick:t})}function yw({action:e,onClick:t,items:s}){const n="string"==typeof e.label?e.label:e.label(s);return(0,oe.jsx)(gw.Item,{onClick:t,hideOnClick:!("RenderModal"in e),children:(0,oe.jsx)(gw.ItemLabel,{children:n})})}function bw({action:e,items:t,closeModal:s}){const n="string"==typeof e.label?e.label:e.label(t);return(0,oe.jsx)(y.Modal,{title:e.modalHeader||n,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:null!=s?s:()=>{},focusOnMount:"firstContentElement",size:"small",overlayClassName:`dataviews-action-modal dataviews-action-modal__${vw(e.id)}`,children:(0,oe.jsx)(e.RenderModal,{items:t,closeModal:s})})}function ww({action:e,items:t,ActionTrigger:s,isBusy:n}){const[i,r]=(0,d.useState)(!1),o={action:e,onClick:()=>{r(!0)},items:t,isBusy:n};return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(s,{...o}),i&&(0,oe.jsx)(bw,{action:e,items:t,closeModal:()=>r(!1)})]})}function _w({actions:e,item:t}){const s=(0,l.useRegistry)();return(0,oe.jsx)(gw.Group,{children:e.map((e=>"RenderModal"in e?(0,oe.jsx)(ww,{action:e,items:[t],ActionTrigger:yw},e.id):(0,oe.jsx)(yw,{action:e,onClick:()=>{e.callback([t],{registry:s})},items:[t]},e.id)))})}function Sw({item:e,actions:t,isCompact:s}){const n=(0,l.useRegistry)(),{primaryActions:i,eligibleActions:r}=(0,d.useMemo)((()=>{const s=t.filter((t=>!t.isEligible||t.isEligible(e)));return{primaryActions:s.filter((e=>e.isPrimary&&!!e.icon)),eligibleActions:s}}),[t,e]);return s?(0,oe.jsx)(jw,{item:e,actions:r}):(0,oe.jsxs)(y.__experimentalHStack,{spacing:1,justify:"flex-end",className:"dataviews-item-actions",style:{flexShrink:"0",width:"auto"},children:[!!i.length&&i.map((t=>"RenderModal"in t?(0,oe.jsx)(ww,{action:t,items:[e],ActionTrigger:xw},t.id):(0,oe.jsx)(xw,{action:t,onClick:()=>{t.callback([e],{registry:n})},items:[e]},t.id))),(0,oe.jsx)(jw,{item:e,actions:r})]})}function jw({item:e,actions:t}){return(0,oe.jsx)(gw,{trigger:(0,oe.jsx)(y.Button,{size:"compact",icon:ga,label:(0,b.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,className:"dataviews-all-actions-button"}),placement:"bottom-end",children:(0,oe.jsx)(_w,{actions:t,item:e})})}function Cw(e,t){return(0,d.useMemo)((()=>e.some((e=>e.supportsBulk&&(!e.isEligible||e.isEligible(t))))),[e,t])}function kw(e,t){return(0,d.useMemo)((()=>t.some((t=>e.some((e=>e.supportsBulk&&(!e.isEligible||e.isEligible(t))))))),[e,t])}function Ew({selection:e,onChangeSelection:t,data:s,actions:n,getItemId:i}){const r=(0,d.useMemo)((()=>s.filter((e=>n.some((t=>t.supportsBulk&&(!t.isEligible||t.isEligible(e))))))),[s,n]),o=s.filter((t=>e.includes(i(t))&&r.includes(t))),a=o.length===r.length;return(0,oe.jsx)(y.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",__nextHasNoMarginBottom:!0,checked:a,indeterminate:!a&&!!o.length,onChange:()=>{t(a?[]:r.map((e=>i(e))))},"aria-label":a?(0,b.__)("Deselect all"):(0,b.__)("Select all")})}function Pw({action:e,onClick:t,isBusy:s,items:n}){const i="string"==typeof e.label?e.label:e.label(n);return(0,oe.jsx)(y.Button,{disabled:s,accessibleWhenDisabled:!0,label:i,icon:e.icon,isDestructive:e.isDestructive,size:"compact",onClick:t,isBusy:s,tooltipPosition:"top"})}const Iw=[];function Tw({action:e,selectedItems:t,actionInProgress:s,setActionInProgress:n}){const i=(0,l.useRegistry)(),r=(0,d.useMemo)((()=>t.filter((t=>!e.isEligible||e.isEligible(t)))),[e,t]);return"RenderModal"in e?(0,oe.jsx)(ww,{action:e,items:r,ActionTrigger:Pw},e.id):(0,oe.jsx)(Pw,{action:e,onClick:async()=>{n(e.id),await e.callback(t,{registry:i}),n(null)},items:r,isBusy:s===e.id},e.id)}function Ow(e,t,s,n,i,r,o,a,l){const c=r.length>0?(0,b.sprintf)((0,b._n)("%d Item selected","%d Items selected",r.length),r.length):(0,b.sprintf)((0,b._n)("%d Item","%d Items",e.length),e.length);return(0,oe.jsxs)(y.__experimentalHStack,{expanded:!1,className:"dataviews-bulk-actions-footer__container",spacing:3,children:[(0,oe.jsx)(Ew,{selection:n,onChangeSelection:l,data:e,actions:t,getItemId:s}),(0,oe.jsx)("span",{className:"dataviews-bulk-actions-footer__item-count",children:c}),(0,oe.jsxs)(y.__experimentalHStack,{className:"dataviews-bulk-actions-footer__action-buttons",expanded:!1,spacing:1,children:[i.map((e=>(0,oe.jsx)(Tw,{action:e,selectedItems:r,actionInProgress:o,setActionInProgress:a},e.id))),r.length>0&&(0,oe.jsx)(y.Button,{icon:pm,showTooltip:!0,tooltipPosition:"top",size:"compact",label:(0,b.__)("Cancel"),disabled:!!o,accessibleWhenDisabled:!1,onClick:()=>{l(Iw)}})]})]})}function Aw({selection:e,actions:t,onChangeSelection:s,data:n,getItemId:i}){const[r,o]=(0,d.useState)(null),a=(0,d.useRef)(null),l=(0,d.useMemo)((()=>t.filter((e=>e.supportsBulk))),[t]),c=(0,d.useMemo)((()=>n.filter((e=>l.some((t=>!t.isEligible||t.isEligible(e)))))),[n,l]),u=(0,d.useMemo)((()=>n.filter((t=>e.includes(i(t))&&c.includes(t)))),[e,n,i,c]),p=(0,d.useMemo)((()=>t.filter((e=>e.supportsBulk&&e.icon&&u.some((t=>!e.isEligible||e.isEligible(t)))))),[t,u]);return r?(a.current||(a.current=Ow(n,t,i,e,p,u,r,o,s)),a.current):(a.current&&(a.current=null),Ow(n,t,i,e,p,u,r,o,s))}function Nw(){const{data:e,selection:t,actions:s=Iw,onChangeSelection:n,getItemId:i}=(0,d.useContext)(cv);return(0,oe.jsx)(Aw,{selection:t,onChangeSelection:n,data:e,actions:s,getItemId:i})}const Mw=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})}),Vw=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})}),Fw=(0,oe.jsx)(Qt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,oe.jsx)(Qt.Path,{d:"M4.67 10.664s-2.09 1.11-2.917 1.582l.494.87 1.608-.914.002.002c.343.502.86 1.17 1.563 1.84.348.33.742.663 1.185.976L5.57 16.744l.858.515 1.02-1.701a9.1 9.1 0 0 0 4.051 1.18V19h1v-2.263a9.1 9.1 0 0 0 4.05-1.18l1.021 1.7.858-.514-1.034-1.723c.442-.313.837-.646 1.184-.977.703-.669 1.22-1.337 1.563-1.839l.002-.003 1.61.914.493-.87c-1.75-.994-2.918-1.58-2.918-1.58l-.003.005a8.29 8.29 0 0 1-.422.689 10.097 10.097 0 0 1-1.36 1.598c-1.218 1.16-3.042 2.293-5.544 2.293-2.503 0-4.327-1.132-5.546-2.293a10.099 10.099 0 0 1-1.359-1.599 8.267 8.267 0 0 1-.422-.689l-.003-.005Z"})}),{DropdownMenuV2:Rw}=sw(y.privateApis);function Bw({children:e}){return d.Children.toArray(e).filter(Boolean).map(((e,t)=>(0,oe.jsxs)(d.Fragment,{children:[t>0&&(0,oe.jsx)(Rw.Separator,{}),e]},t)))}const Dw=(0,d.forwardRef)((function({fieldId:e,view:t,fields:s,onChangeView:n,onHide:i,setOpenedFilter:r},o){const a=e_(t,s),l=a?.indexOf(e),c=t.sort?.field===e;let u,d=!1,p=!1,h=!1,f=[];const m=t.layout?.combinedFields?.find((t=>t.id===e)),g=s.find((t=>t.id===e));if(m)u=m.header||m.label;else{if(!g)return null;d=!1!==g.enableHiding,p=!1!==g.enableSorting,u=g.header,f=aw(g),h=!(t.filters?.some((t=>e===t.field))||!g.elements?.length||!f.length||g.filterBy?.isPrimary)}return(0,oe.jsx)(Rw,{align:"start",trigger:(0,oe.jsxs)(y.Button,{size:"compact",className:"dataviews-view-table-header-button",ref:o,variant:"tertiary",children:[u,t.sort&&c&&(0,oe.jsx)("span",{"aria-hidden":"true",children:Zg[t.sort.direction]})]}),style:{minWidth:"240px"},children:(0,oe.jsxs)(Bw,{children:[p&&(0,oe.jsx)(Rw.Group,{children:qg.map((s=>{const i=t.sort&&c&&t.sort.direction===s,r=`${e}-${s}`;return(0,oe.jsx)(Rw.RadioItem,{name:"view-table-sorting",value:r,checked:i,onChange:()=>{n({...t,sort:{field:e,direction:s}})},children:(0,oe.jsx)(Rw.ItemLabel,{children:Yg[s]})},r)}))}),h&&(0,oe.jsx)(Rw.Group,{children:(0,oe.jsx)(Rw.Item,{prefix:(0,oe.jsx)(y.Icon,{icon:uv}),onClick:()=>{r(e),n({...t,page:1,filters:[...t.filters||[],{field:e,value:void 0,operator:f[0]}]})},children:(0,oe.jsx)(Rw.ItemLabel,{children:(0,b.__)("Add filter")})})}),(0,oe.jsxs)(Rw.Group,{children:[(0,oe.jsx)(Rw.Item,{prefix:(0,oe.jsx)(y.Icon,{icon:Mw}),disabled:l<1,onClick:()=>{var s;n({...t,fields:[...null!==(s=a.slice(0,l-1))&&void 0!==s?s:[],e,a[l-1],...a.slice(l+1)]})},children:(0,oe.jsx)(Rw.ItemLabel,{children:(0,b.__)("Move left")})}),(0,oe.jsx)(Rw.Item,{prefix:(0,oe.jsx)(y.Icon,{icon:Vw}),disabled:l>=a.length-1,onClick:()=>{var s;n({...t,fields:[...null!==(s=a.slice(0,l))&&void 0!==s?s:[],a[l+1],e,...a.slice(l+2)]})},children:(0,oe.jsx)(Rw.ItemLabel,{children:(0,b.__)("Move right")})}),d&&g&&(0,oe.jsx)(Rw.Item,{prefix:(0,oe.jsx)(y.Icon,{icon:Fw}),onClick:()=>{i(g),n({...t,fields:a.filter((t=>t!==e))})},children:(0,oe.jsx)(Rw.ItemLabel,{children:(0,b.__)("Hide column")})})]})]})})})),zw=Dw;function Lw({column:e,fields:t,view:s,...n}){const i=t.find((t=>t.id===e));if(i)return(0,oe.jsx)(Gw,{...n,field:i});const r=s.layout?.combinedFields?.find((t=>t.id===e));return r?(0,oe.jsx)(Hw,{...n,fields:t,view:s,field:r}):null}function Gw({primaryField:e,item:t,field:s}){return(0,oe.jsx)("div",{className:Ut("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__primary-field":e?.id===s.id}),children:(0,oe.jsx)(s.render,{item:t})})}function Hw({field:e,...t}){const s=e.children.map((e=>(0,oe.jsx)(Lw,{...t,column:e},e)));return"horizontal"===e.direction?(0,oe.jsx)(y.__experimentalHStack,{spacing:3,children:s}):(0,oe.jsx)(y.__experimentalVStack,{spacing:0,children:s})}function Uw({hasBulkActions:e,item:t,actions:s,fields:n,id:i,view:r,primaryField:o,selection:a,getItemId:l,onChangeSelection:c}){const u=Cw(s,t),p=u&&a.includes(i),[h,f]=(0,d.useState)(!1),m=(0,d.useRef)(!1),g=e_(r,n);return(0,oe.jsxs)("tr",{className:Ut("dataviews-view-table__row",{"is-selected":u&&p,"is-hovered":h,"has-bulk-actions":u}),onMouseEnter:()=>{f(!0)},onMouseLeave:()=>{f(!1)},onTouchStart:()=>{m.current=!0},onClick:()=>{u&&(m.current||"Range"===document.getSelection()?.type||c(a.includes(i)?a.filter((e=>i!==e)):[i]))},children:[e&&(0,oe.jsx)("td",{className:"dataviews-view-table__checkbox-column",style:{width:"1%"},children:(0,oe.jsx)("div",{className:"dataviews-view-table__cell-content-wrapper",children:(0,oe.jsx)(mw,{item:t,selection:a,onChangeSelection:c,getItemId:l,primaryField:o,disabled:!u})})}),g.map((e=>{var s;const{width:i,maxWidth:a,minWidth:l}=null!==(s=r.layout?.styles?.[e])&&void 0!==s?s:{};return(0,oe.jsx)("td",{style:{width:i,maxWidth:a,minWidth:l},children:(0,oe.jsx)(Lw,{primaryField:o,fields:n,item:t,column:e,view:r})},e)})),!!s?.length&&(0,oe.jsx)("td",{className:"dataviews-view-table__actions-column",onClick:e=>e.stopPropagation(),children:(0,oe.jsx)(Sw,{item:t,actions:s})})]})}const Ww=function({actions:e,data:t,fields:s,getItemId:n,isLoading:i=!1,onChangeView:r,onChangeSelection:o,selection:a,setOpenedFilter:l,view:c}){const u=(0,d.useRef)(new Map),p=(0,d.useRef)(),[h,f]=(0,d.useState)(),m=kw(e,t);(0,d.useEffect)((()=>{p.current&&(p.current.focus(),p.current=void 0)}));const g=(0,d.useId)();if(h)return p.current=h,void f(void 0);const v=e=>{const t=u.current.get(e.id),s=t?u.current.get(t.fallback):void 0;f(s?.node)},x=e_(c,s),w=!!t?.length,_=s.find((e=>e.id===c.layout?.primaryField));return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsxs)("table",{className:"dataviews-view-table","aria-busy":i,"aria-describedby":g,children:[(0,oe.jsx)("thead",{children:(0,oe.jsxs)("tr",{className:"dataviews-view-table__row",children:[m&&(0,oe.jsx)("th",{className:"dataviews-view-table__checkbox-column",style:{width:"1%"},scope:"col",children:(0,oe.jsx)(Ew,{selection:a,onChangeSelection:o,data:t,actions:e,getItemId:n})}),x.map(((e,t)=>{var n;const{width:i,maxWidth:o,minWidth:a}=null!==(n=c.layout?.styles?.[e])&&void 0!==n?n:{};return(0,oe.jsx)("th",{style:{width:i,maxWidth:o,minWidth:a},"aria-sort":c.sort?.field===e?Kg[c.sort.direction]:void 0,scope:"col",children:(0,oe.jsx)(zw,{ref:s=>{s?u.current.set(e,{node:s,fallback:x[t>0?t-1:1]}):u.current.delete(e)},fieldId:e,view:c,fields:s,onChangeView:r,onHide:v,setOpenedFilter:l})},e)})),!!e?.length&&(0,oe.jsx)("th",{className:"dataviews-view-table__actions-column",children:(0,oe.jsx)("span",{className:"dataviews-view-table-header",children:(0,b.__)("Actions")})})]})}),(0,oe.jsx)("tbody",{children:w&&t.map(((t,i)=>(0,oe.jsx)(Uw,{item:t,hasBulkActions:m,actions:e,fields:s,id:n(t)||i.toString(),view:c,primaryField:_,selection:a,getItemId:n,onChangeSelection:o},n(t))))})]}),(0,oe.jsx)("div",{className:Ut({"dataviews-loading":i,"dataviews-no-results":!w&&!i}),id:g,children:!w&&(0,oe.jsx)("p",{children:i?(0,oe.jsx)(y.Spinner,{}):(0,b.__)("No results")})})]})};function qw({selection:e,onChangeSelection:t,getItemId:s,item:n,actions:i,mediaField:r,primaryField:o,visibleFields:a,badgeFields:l,columnFields:c}){const u=Cw(i,n),d=s(n),p=e.includes(d),h=r?.render?(0,oe.jsx)(r.render,{item:n}):null,f=o?.render?(0,oe.jsx)(o.render,{item:n}):null;return(0,oe.jsxs)(y.__experimentalVStack,{spacing:0,className:Ut("dataviews-view-grid__card",{"is-selected":u&&p}),onClickCapture:s=>{if(s.ctrlKey||s.metaKey){if(s.stopPropagation(),s.preventDefault(),!u)return;t(e.includes(d)?e.filter((e=>d!==e)):[...e,d])}},children:[(0,oe.jsx)("div",{className:"dataviews-view-grid__media",children:h}),(0,oe.jsx)(mw,{item:n,selection:e,onChangeSelection:t,getItemId:s,primaryField:o,disabled:!u}),(0,oe.jsxs)(y.__experimentalHStack,{justify:"space-between",className:"dataviews-view-grid__title-actions",children:[(0,oe.jsx)(y.__experimentalHStack,{className:"dataviews-view-grid__primary-field",children:f}),(0,oe.jsx)(Sw,{item:n,actions:i,isCompact:!0})]}),!!l?.length&&(0,oe.jsx)(y.__experimentalHStack,{className:"dataviews-view-grid__badge-fields",spacing:2,wrap:!0,alignment:"top",justify:"flex-start",children:l.map((e=>(0,oe.jsx)(y.FlexItem,{className:"dataviews-view-grid__field-value",children:(0,oe.jsx)(e.render,{item:n})},e.id)))}),!!a?.length&&(0,oe.jsx)(y.__experimentalVStack,{className:"dataviews-view-grid__fields",spacing:1,children:a.map((e=>(0,oe.jsx)(y.Flex,{className:Ut("dataviews-view-grid__field",c?.includes(e.id)?"is-column":"is-row"),gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:c?.includes(e.id)?"column":"row",children:(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(y.FlexItem,{className:"dataviews-view-grid__field-name",children:e.header}),(0,oe.jsx)(y.FlexItem,{className:"dataviews-view-grid__field-value",style:{maxHeight:"none"},children:(0,oe.jsx)(e.render,{item:n})})]})},e.id)))})]},d)}const{DropdownMenuV2:Zw}=sw(y.privateApis);function Kw(e){return`${e}-item-wrapper`}function Yw(e){return`${e}-dropdown`}function Xw({idPrefix:e,primaryAction:t,item:s}){const n=(0,l.useRegistry)(),[i,r]=(0,d.useState)(!1),o=function(e,t){return`${e}-primary-action-${t}`}(e,t.id),a="string"==typeof t.label?t.label:t.label([s]);return"RenderModal"in t?(0,oe.jsx)("div",{role:"gridcell",children:(0,oe.jsx)(y.Composite.Item,{id:o,render:(0,oe.jsx)(y.Button,{label:a,icon:t.icon,isDestructive:t.isDestructive,size:"small",onClick:()=>r(!0)}),children:i&&(0,oe.jsx)(bw,{action:t,items:[s],closeModal:()=>r(!1)})})},t.id):(0,oe.jsx)("div",{role:"gridcell",children:(0,oe.jsx)(y.Composite.Item,{id:o,render:(0,oe.jsx)(y.Button,{label:a,icon:t.icon,isDestructive:t.isDestructive,size:"small",onClick:()=>{t.callback([s],{registry:n})}})})},t.id)}function Jw({actions:e,idPrefix:t,isSelected:s,item:n,mediaField:i,onSelect:r,primaryField:o,visibleFields:a,onDropdownTriggerKeyDown:l}){const c=(0,d.useRef)(null),u=`${t}-label`,p=`${t}-description`,[h,f]=(0,d.useState)(!1);(0,d.useEffect)((()=>{s&&c.current?.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}),[s]);const{primaryAction:m,eligibleActions:g}=(0,d.useMemo)((()=>{const t=e.filter((e=>!e.isEligible||e.isEligible(n))),s=t.filter((e=>e.isPrimary&&!!e.icon));return{primaryAction:s?.[0],eligibleActions:t}}),[e,n]),v=i?.render?(0,oe.jsx)(i.render,{item:n}):(0,oe.jsx)("div",{className:"dataviews-view-list__media-placeholder"}),x=o?.render?(0,oe.jsx)(o.render,{item:n}):null;return(0,oe.jsx)(y.Composite.Row,{ref:c,render:(0,oe.jsx)("li",{}),role:"row",className:Ut({"is-selected":s,"is-hovered":h}),onMouseEnter:()=>{f(!0)},onMouseLeave:()=>{f(!1)},children:(0,oe.jsxs)(y.__experimentalHStack,{className:"dataviews-view-list__item-wrapper",alignment:"center",spacing:0,children:[(0,oe.jsx)("div",{role:"gridcell",children:(0,oe.jsx)(y.Composite.Item,{render:(0,oe.jsx)("div",{}),role:"button",id:Kw(t),"aria-pressed":s,"aria-labelledby":u,"aria-describedby":p,className:"dataviews-view-list__item",onClick:()=>r(n),children:(0,oe.jsxs)(y.__experimentalHStack,{spacing:3,justify:"start",alignment:"flex-start",children:[(0,oe.jsx)("div",{className:"dataviews-view-list__media-wrapper",children:v}),(0,oe.jsxs)(y.__experimentalVStack,{spacing:1,className:"dataviews-view-list__field-wrapper",children:[(0,oe.jsx)("span",{className:"dataviews-view-list__primary-field",id:u,children:x}),(0,oe.jsx)("div",{className:"dataviews-view-list__fields",id:p,children:a.map((e=>(0,oe.jsxs)("div",{className:"dataviews-view-list__field",children:[(0,oe.jsx)(y.VisuallyHidden,{as:"span",className:"dataviews-view-list__field-label",children:e.label}),(0,oe.jsx)("span",{className:"dataviews-view-list__field-value",children:(0,oe.jsx)(e.render,{item:n})})]},e.id)))})]})]})})}),g?.length>0&&(0,oe.jsxs)(y.__experimentalHStack,{spacing:3,justify:"flex-end",className:"dataviews-view-list__item-actions",style:{flexShrink:"0",width:"auto"},children:[m&&(0,oe.jsx)(Xw,{idPrefix:t,primaryAction:m,item:n}),(0,oe.jsx)("div",{role:"gridcell",children:(0,oe.jsx)(Zw,{trigger:(0,oe.jsx)(y.Composite.Item,{id:Yw(t),render:(0,oe.jsx)(y.Button,{size:"small",icon:ga,label:(0,b.__)("Actions"),accessibleWhenDisabled:!0,disabled:!e.length,onKeyDown:l})}),placement:"bottom-end",children:(0,oe.jsx)(_w,{actions:g,item:n})})})]})]})})}const Qw=[{type:Jg,label:(0,b.__)("Table"),component:Ww,icon:dw},{type:Qg,label:(0,b.__)("Grid"),component:function({actions:e,data:t,fields:s,getItemId:n,isLoading:i,onChangeSelection:r,selection:o,view:a,density:l}){const c=s.find((e=>e.id===a.layout?.mediaField)),u=s.find((e=>e.id===a.layout?.primaryField)),d=a.fields||s.map((e=>e.id)),{visibleFields:p,badgeFields:h}=s.reduce(((e,t)=>{if(!d.includes(t.id)||[a.layout?.mediaField,a?.layout?.primaryField].includes(t.id))return e;return e[a.layout?.badgeFields?.includes(t.id)?"badgeFields":"visibleFields"].push(t),e}),{visibleFields:[],badgeFields:[]}),f=!!t?.length,m=l?{gridTemplateColumns:`repeat(${l}, minmax(0, 1fr))`}:{};return(0,oe.jsxs)(oe.Fragment,{children:[f&&(0,oe.jsx)(y.__experimentalGrid,{gap:8,columns:2,alignment:"top",className:"dataviews-view-grid",style:m,"aria-busy":i,children:t.map((t=>(0,oe.jsx)(qw,{selection:o,onChangeSelection:r,getItemId:n,item:t,actions:e,mediaField:c,primaryField:u,visibleFields:p,badgeFields:h,columnFields:a.layout?.columnFields},n(t))))}),!f&&(0,oe.jsx)("div",{className:Ut({"dataviews-loading":i,"dataviews-no-results":!i}),children:(0,oe.jsx)("p",{children:i?(0,oe.jsx)(y.Spinner,{}):(0,b.__)("No results")})})]})},icon:pw},{type:$g,label:(0,b.__)("List"),component:function e(t){const{actions:s,data:n,fields:i,getItemId:r,isLoading:o,onChangeSelection:a,selection:l,view:c}=t,u=(0,v.useInstanceId)(e,"view-list"),p=n?.findLast((e=>l.includes(r(e)))),h=i.find((e=>e.id===c.layout?.mediaField)),f=i.find((e=>e.id===c.layout?.primaryField)),m=c.fields||i.map((e=>e.id)),g=i.filter((e=>m.includes(e.id)&&![c.layout?.primaryField,c.layout?.mediaField].includes(e.id))),x=e=>a([r(e)]),w=(0,d.useCallback)((e=>`${u}-${r(e)}`),[u,r]),_=(0,d.useCallback)(((e,t)=>t.startsWith(w(e))),[w]),[S,j]=(0,d.useState)(void 0);(0,d.useEffect)((()=>{p&&j(Kw(w(p)))}),[p,w]);const C=n.findIndex((e=>_(e,null!=S?S:""))),k=(0,v.usePrevious)(C),E=-1!==C,P=(0,d.useCallback)(((e,t)=>{const s=Math.min(n.length-1,Math.max(0,e));if(!n[s])return;const i=t(w(n[s]));j(i),document.getElementById(i)?.focus()}),[n,w]);(0,d.useEffect)((()=>{!E&&(void 0!==k&&-1!==k)&&P(k,Kw)}),[E,P,k]);const I=(0,d.useCallback)((e=>{"ArrowDown"===e.key&&(e.preventDefault(),P(C+1,Yw)),"ArrowUp"===e.key&&(e.preventDefault(),P(C-1,Yw))}),[P,C]),T=n?.length;return T?(0,oe.jsx)(y.Composite,{id:u,render:(0,oe.jsx)("ul",{}),className:"dataviews-view-list",role:"grid",activeId:S,setActiveId:j,children:n.map((e=>{const t=w(e);return(0,oe.jsx)(Jw,{idPrefix:t,actions:s,item:e,isSelected:e===p,onSelect:x,mediaField:h,primaryField:f,visibleFields:g,onDropdownTriggerKeyDown:I},t)}))}):(0,oe.jsx)("div",{className:Ut({"dataviews-loading":o,"dataviews-no-results":!T&&!o}),children:!T&&(0,oe.jsx)("p",{children:o?(0,oe.jsx)(y.Spinner,{}):(0,b.__)("No results")})})},icon:(0,b.isRTL)()?hw:fw}];function $w(e){const t=[];return e.type===Jg&&e.layout?.combinedFields&&e.layout.combinedFields.forEach((e=>{t.push(...e.children)})),t}function e_(e,t){const s=$w(e);if(e.fields)return e.fields.filter((e=>!s.includes(e)));const n=[];return e.type===Jg&&e.layout?.combinedFields&&n.push(...e.layout.combinedFields.map((({id:e})=>e))),n.push(...t.filter((({id:e})=>!s.includes(e))).map((({id:e})=>e))),n}function t_(){const{actions:e=[],data:t,fields:s,getItemId:n,isLoading:i,view:r,onChangeView:o,selection:a,onChangeSelection:l,setOpenedFilter:c,density:u}=(0,d.useContext)(cv),p=Qw.find((e=>e.type===r.type))?.component;return(0,oe.jsx)(p,{actions:e,data:t,fields:s,getItemId:n,isLoading:i,onChangeView:o,onChangeSelection:l,selection:a,setOpenedFilter:c,view:r,density:u})}const s_=(0,d.memo)((function(){var e;const{view:t,onChangeView:s,paginationInfo:{totalItems:n=0,totalPages:i}}=(0,d.useContext)(cv);if(!n||!i)return null;const r=null!==(e=t.page)&&void 0!==e?e:1,o=Array.from(Array(i)).map(((e,t)=>{const s=t+1;return{value:s.toString(),label:s.toString(),"aria-label":r===s?(0,b.sprintf)((0,b.__)("Page %1$s of %2$s"),r,i):s.toString()}}));return!!n&&1!==i&&(0,oe.jsxs)(y.__experimentalHStack,{expanded:!1,className:"dataviews-pagination",justify:"end",spacing:6,children:[(0,oe.jsx)(y.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:1,className:"dataviews-pagination__page-select",children:(0,d.createInterpolateElement)((0,b.sprintf)((0,b._x)("<div>Page</div>%1$s<div>of %2$s</div>","paging"),"<CurrentPage />",i),{div:(0,oe.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,oe.jsx)(y.SelectControl,{"aria-label":(0,b.__)("Current page"),value:r.toString(),options:o,onChange:e=>{s({...t,page:+e})},size:"small",__nextHasNoMarginBottom:!0,variant:"minimal"})})}),(0,oe.jsxs)(y.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,oe.jsx)(y.Button,{onClick:()=>s({...t,page:r-1}),disabled:1===r,accessibleWhenDisabled:!0,label:(0,b.__)("Previous page"),icon:(0,b.isRTL)()?Ym:Xm,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,oe.jsx)(y.Button,{onClick:()=>s({...t,page:r+1}),disabled:r>=i,accessibleWhenDisabled:!0,label:(0,b.__)("Next page"),icon:(0,b.isRTL)()?Xm:Ym,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})})),n_=[];function i_(){const{view:e,paginationInfo:{totalItems:t=0,totalPages:s},data:n,actions:i=n_}=(0,d.useContext)(cv),r=kw(i,n)&&[Jg,Qg].includes(e.type);return!t||!s||s<=1&&!r?null:!!t&&(0,oe.jsxs)(y.__experimentalHStack,{expanded:!1,justify:"end",className:"dataviews-footer",children:[r&&(0,oe.jsx)(Nw,{}),(0,oe.jsx)(s_,{})]})}const r_=(0,d.memo)((function({label:e}){const{view:t,onChangeView:s}=(0,d.useContext)(cv),[n,i,r]=(0,v.useDebouncedInput)(t.search);(0,d.useEffect)((()=>{var e;i(null!==(e=t.search)&&void 0!==e?e:"")}),[t.search,i]);const o=(0,d.useRef)(s),a=(0,d.useRef)(t);(0,d.useEffect)((()=>{o.current=s,a.current=t}),[s,t]),(0,d.useEffect)((()=>{r!==a.current?.search&&o.current({...a.current,page:1,search:r})}),[r]);const l=e||(0,b.__)("Search");return(0,oe.jsx)(y.SearchControl,{className:"dataviews-search",__nextHasNoMarginBottom:!0,onChange:i,value:n,label:l,placeholder:l,size:"compact"})})),o_=r_,a_=(0,oe.jsx)(Qt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,oe.jsx)(Qt.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),l_=(0,oe.jsx)(Qt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,oe.jsx)(Qt.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})}),c_=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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"})}),u_=(window.wp.warning,{xhuge:{min:3,max:6,default:5},huge:{min:2,max:4,default:4},xlarge:{min:2,max:3,default:3},large:{min:1,max:2,default:2},mobile:{min:1,max:2,default:2}});function d_({density:e,setDensity:t}){const s=function(){const e=(0,v.useViewportMatch)("xhuge",">="),t=(0,v.useViewportMatch)("huge",">="),s=(0,v.useViewportMatch)("xlarge",">="),n=(0,v.useViewportMatch)("large",">="),i=(0,v.useViewportMatch)("mobile",">=");return e?"xhuge":t?"huge":s?"xlarge":n?"large":i?"mobile":null}();(0,d.useEffect)((()=>{t((e=>{if(!s||!e)return 0;const t=u_[s];return e<t.min?t.min:e>t.max?t.max:e}))}),[t,s]);const n=u_[s||"mobile"],i=e||n.default,r=(0,d.useMemo)((()=>Array.from({length:n.max-n.min+1},((e,t)=>({value:n.min+t})))),[n]);return s?(0,oe.jsx)(y.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,showTooltip:!1,label:(0,b.__)("Preview size"),value:n.max+n.min-i,marks:r,min:n.min,max:n.max,withInputField:!1,onChange:(e=0)=>{t(n.max+n.min-e)},step:1}):null}const{DropdownMenuV2:p_}=sw(y.privateApis);function h_({defaultLayouts:e={list:{},grid:{},table:{}}}){const{view:t,onChangeView:s}=(0,d.useContext)(cv),n=Object.keys(e);if(n.length<=1)return null;const i=Qw.find((e=>t.type===e.type));return(0,oe.jsx)(p_,{trigger:(0,oe.jsx)(y.Button,{size:"compact",icon:i?.icon,label:(0,b.__)("Layout")}),children:n.map((n=>{const i=Qw.find((e=>e.type===n));return i?(0,oe.jsx)(p_.RadioItem,{value:n,name:"view-actions-available-view",checked:n===t.type,hideOnClick:!0,onChange:n=>{switch(n.target.value){case"list":case"grid":case"table":return s({...t,type:n.target.value,...e[n.target.value]})}},children:(0,oe.jsx)(p_.ItemLabel,{children:i.label})},n):null}))})}function f_(){const{view:e,fields:t,onChangeView:s}=(0,d.useContext)(cv),n=(0,d.useMemo)((()=>t.filter((e=>!1!==e.enableSorting)).map((e=>({label:e.label,value:e.id})))),[t]);return(0,oe.jsx)(y.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,b.__)("Sort by"),value:e.sort?.field,options:n,onChange:t=>{s({...e,sort:{direction:e?.sort?.direction||"desc",field:t}})}})}function m_(){const{view:e,fields:t,onChangeView:s}=(0,d.useContext)(cv);if(0===t.filter((e=>!1!==e.enableSorting)).length)return null;let n=e.sort?.direction;return!n&&e.sort?.field&&(n="desc"),(0,oe.jsx)(y.__experimentalToggleGroupControl,{className:"dataviews-view-config__sort-direction",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,label:(0,b.__)("Order"),value:n,onChange:n=>{"asc"!==n&&"desc"!==n||s({...e,sort:{direction:n,field:e.sort?.field||t.find((e=>!1!==e.enableSorting))?.id||""}})},children:qg.map((e=>(0,oe.jsx)(y.__experimentalToggleGroupControlOptionIcon,{value:e,icon:Xg[e],label:Yg[e]},e)))})}const g_=[10,20,50,100];function v_(){const{view:e,onChangeView:t}=(0,d.useContext)(cv);return(0,oe.jsx)(y.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,label:(0,b.__)("Items per page"),value:e.perPage||10,disabled:!e?.sort?.field,onChange:s=>{const n="number"==typeof s||void 0===s?s:parseInt(s,10);t({...e,perPage:n,page:1})},children:g_.map((e=>(0,oe.jsx)(y.__experimentalToggleGroupControlOption,{value:e,label:e.toString()},e)))})}function x_({field:{id:e,label:t,index:s,isVisible:n,isHidable:i},fields:r,view:o,onChangeView:a}){const l=e_(o,r);return(0,oe.jsx)(y.__experimentalItem,{children:(0,oe.jsxs)(y.__experimentalHStack,{expanded:!0,className:`dataviews-field-control__field dataviews-field-control__field-${e}`,children:[(0,oe.jsx)("span",{children:t}),(0,oe.jsxs)(y.__experimentalHStack,{justify:"flex-end",expanded:!1,className:"dataviews-field-control__actions",children:[o.type===Jg&&n&&(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(y.Button,{disabled:s<1,accessibleWhenDisabled:!0,size:"compact",onClick:()=>{var t;a({...o,fields:[...null!==(t=l.slice(0,s-1))&&void 0!==t?t:[],e,l[s-1],...l.slice(s+1)]})},icon:a_,label:(0,b.sprintf)((0,b.__)("Move %s up"),t)}),(0,oe.jsx)(y.Button,{disabled:s>=l.length-1,accessibleWhenDisabled:!0,size:"compact",onClick:()=>{var t;a({...o,fields:[...null!==(t=l.slice(0,s))&&void 0!==t?t:[],l[s+1],e,...l.slice(s+2)]})},icon:l_,label:(0,b.sprintf)((0,b.__)("Move %s down"),t)})," "]}),(0,oe.jsx)(y.Button,{className:"dataviews-field-control__field-visibility-button",disabled:!i,accessibleWhenDisabled:!0,size:"compact",onClick:()=>{a({...o,fields:n?l.filter((t=>t!==e)):[...l,e]}),setTimeout((()=>{const t=document.querySelector(`.dataviews-field-control__field-${e} .dataviews-field-control__field-visibility-button`);t instanceof HTMLElement&&t.focus()}),50)},icon:n?ma:Fw,label:n?(0,b.sprintf)((0,b.__)("Hide %s"),t):(0,b.sprintf)((0,b.__)("Show %s"),t)})]})]})},e)}function y_(){const{view:e,fields:t,onChangeView:s}=(0,d.useContext)(cv),n=(0,d.useMemo)((()=>e_(e,t)),[e,t]),i=(0,d.useMemo)((()=>function(e,t){const s=[...$w(e),...e_(e,t)];return e.type===Qg&&e.layout?.mediaField&&s.push(e.layout?.mediaField),e.type===$g&&e.layout?.mediaField&&s.push(e.layout?.mediaField),t.filter((({id:e,enableHiding:t})=>!s.includes(e)&&t)).map((({id:e})=>e))}(e,t)),[e,t]),r=(0,d.useMemo)((()=>function(e){var t;return"table"===e.type?[e.layout?.primaryField].concat(null!==(t=e.layout?.combinedFields?.flatMap((e=>e.children)))&&void 0!==t?t:[]).filter((e=>!!e)):"grid"===e.type||"list"===e.type?[e.layout?.primaryField,e.layout?.mediaField].filter((e=>!!e)):[]}(e)),[e]),o=t.filter((({id:e})=>n.includes(e))).map((({id:e,label:t,enableHiding:s})=>({id:e,label:t,index:n.indexOf(e),isVisible:!0,isHidable:!r.includes(e)&&s})));e.type===Jg&&e.layout?.combinedFields&&e.layout.combinedFields.forEach((({id:e,label:t})=>{o.push({id:e,label:t,index:n.indexOf(e),isVisible:!0,isHidable:r.includes(e)})})),o.sort(((e,t)=>e.index-t.index));const a=t.filter((({id:e})=>i.includes(e))).map((({id:e,label:t,enableHiding:s},n)=>({id:e,label:t,index:n,isVisible:!1,isHidable:s})));return o?.length||a?.length?(0,oe.jsxs)(y.__experimentalVStack,{spacing:6,className:"dataviews-field-control",children:[!!o?.length&&(0,oe.jsx)(y.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:o.map((n=>(0,oe.jsx)(x_,{field:n,fields:t,view:e,onChangeView:s},n.id)))}),!!a?.length&&(0,oe.jsx)(oe.Fragment,{children:(0,oe.jsxs)(y.__experimentalVStack,{spacing:4,children:[(0,oe.jsx)(y.BaseControl.VisualLabel,{style:{margin:0},children:(0,b.__)("Hidden")}),(0,oe.jsx)(y.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:a.map((n=>(0,oe.jsx)(x_,{field:n,fields:t,view:e,onChangeView:s},n.id)))})]})})]}):null}function b_({title:e,description:t,children:s}){return(0,oe.jsxs)(y.__experimentalGrid,{columns:12,className:"dataviews-settings-section",gap:4,children:[(0,oe.jsxs)("div",{className:"dataviews-settings-section__sidebar",children:[(0,oe.jsx)(y.__experimentalHeading,{level:2,className:"dataviews-settings-section__title",children:e}),t&&(0,oe.jsx)(y.__experimentalText,{variant:"muted",className:"dataviews-settings-section__description",children:t})]}),(0,oe.jsx)(y.__experimentalGrid,{columns:8,gap:4,className:"dataviews-settings-section__content",children:s})]})}function w_({density:e,setDensity:t}){const{view:s}=(0,d.useContext)(cv);return(0,oe.jsxs)(y.__experimentalVStack,{className:"dataviews-view-config",spacing:6,children:[(0,oe.jsxs)(b_,{title:(0,b.__)("Appearance"),children:[(0,oe.jsxs)(y.__experimentalHStack,{expanded:!0,className:"is-divided-in-two",children:[(0,oe.jsx)(f_,{}),(0,oe.jsx)(m_,{})]}),s.type===Qg&&(0,oe.jsx)(d_,{density:e,setDensity:t}),(0,oe.jsx)(v_,{})]}),(0,oe.jsx)(b_,{title:(0,b.__)("Properties"),children:(0,oe.jsx)(y_,{})})]})}const __=(0,d.memo)((function({density:e,setDensity:t,defaultLayouts:s={list:{},grid:{},table:{}}}){return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(h_,{defaultLayouts:s}),(0,oe.jsx)(y.Dropdown,{popoverProps:{placement:"bottom-end",offset:9},contentClassName:"dataviews-view-config",renderToggle:({onToggle:e})=>(0,oe.jsx)(y.Button,{size:"compact",icon:c_,label:(0,b._x)("View options","View is used as a noun"),onClick:e}),renderContent:()=>(0,oe.jsx)(w_,{density:e,setDensity:t})})]})})),S_=__,j_=e=>e.id;function C_({view:e,onChangeView:t,fields:s,search:n=!0,searchLabel:i,actions:r=[],data:o,getItemId:a=j_,isLoading:l=!1,paginationInfo:c,defaultLayouts:u,selection:p,onChangeSelection:h,header:f}){const[m,g]=(0,d.useState)([]),[v,x]=(0,d.useState)(0),b=void 0===p||void 0===h,w=b?m:p,[_,S]=(0,d.useState)(null);const j=(0,d.useMemo)((()=>rv(s)),[s]),C=(0,d.useMemo)((()=>w.filter((e=>o.some((t=>a(t)===e))))),[w,o,a]),k=lw(j,e),[E,P]=(0,d.useState)((()=>(k||[]).some((e=>e.isPrimary))));return(0,oe.jsx)(cv.Provider,{value:{view:e,onChangeView:t,fields:j,actions:r,data:o,isLoading:l,paginationInfo:c,selection:C,onChangeSelection:function(e){const t="function"==typeof e?e(w):e;b&&g(t),h&&h(t)},openedFilter:_,setOpenedFilter:S,getItemId:a,density:v},children:(0,oe.jsxs)("div",{className:"dataviews-wrapper",children:[(0,oe.jsxs)(y.__experimentalHStack,{alignment:"top",justify:"space-between",className:"dataviews__view-actions",spacing:1,children:[(0,oe.jsxs)(y.__experimentalHStack,{justify:"start",expanded:!1,className:"dataviews__search",children:[n&&(0,oe.jsx)(o_,{label:i}),(0,oe.jsx)(cw,{filters:k,view:e,onChangeView:t,setOpenedFilter:S,setIsShowingFilter:P,isShowingFilter:E})]}),(0,oe.jsxs)(y.__experimentalHStack,{spacing:1,expanded:!1,style:{flexShrink:0},children:[(0,oe.jsx)(S_,{defaultLayouts:u,density:v,setDensity:x}),f]})]}),E&&(0,oe.jsx)(uw,{}),(0,oe.jsx)(t_,{}),(0,oe.jsx)(i_,{})]})})}const k_=(0,oe.jsx)(Qt.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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 E_({title:e,subTitle:t,actions:s}){return(0,oe.jsxs)(y.__experimentalVStack,{className:"edit-site-page-header",as:"header",spacing:0,children:[(0,oe.jsxs)(y.__experimentalHStack,{className:"edit-site-page-header__page-title",children:[(0,oe.jsx)(y.__experimentalHeading,{as:"h2",level:3,weight:500,className:"edit-site-page-header__title",truncate:!0,children:e}),(0,oe.jsx)(y.FlexItem,{className:"edit-site-page-header__actions",children:s})]}),t&&(0,oe.jsx)(y.__experimentalText,{variant:"muted",as:"p",className:"edit-site-page-header__sub-title",children:t})]})}const{NavigableRegion:P_}=te(h.privateApis);function I_({title:e,subTitle:t,actions:s,children:n,className:i,hideTitleFromUI:r=!1}){const o=Ut("edit-site-page",i);return(0,oe.jsx)(P_,{className:o,ariaLabel:e,children:(0,oe.jsxs)("div",{className:"edit-site-page-content",children:[!r&&e&&(0,oe.jsx)(E_,{title:e,subTitle:t,actions:s}),n]})})}const T_=(0,oe.jsxs)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,oe.jsx)(Qt.Path,{d:"M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z"}),(0,oe.jsx)(Qt.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,oe.jsx)(Qt.Path,{d:"M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z"})]}),O_=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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"})}),A_=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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"})}),N_=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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"})}),M_=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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"})}),V_=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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"})}),F_={[Re]:{layout:{primaryField:"title",styles:{"featured-image":{width:"1%"},title:{maxWidth:300}}}},[Fe]:{layout:{mediaField:"featured-image",primaryField:"title"}},[Be]:{layout:{primaryField:"title",mediaField:"featured-image"}}},R_={type:Be,search:"",filters:[],page:1,perPage:20,sort:{field:"date",direction:"desc"},fields:["title","author","status"],layout:F_[Be].layout};function B_({postType:e}){const t=(0,l.useSelect)((t=>{const{getPostType:s}=t(_.store);return s(e)?.labels}),[e]);return(0,d.useMemo)((()=>[{title:t?.all_items||(0,b.__)("All items"),slug:"all",icon:T_,view:R_},{title:(0,b.__)("Published"),slug:"published",icon:O_,view:R_,filters:[{field:"status",operator:De,value:"publish"}]},{title:(0,b.__)("Scheduled"),slug:"future",icon:A_,view:R_,filters:[{field:"status",operator:De,value:"future"}]},{title:(0,b.__)("Drafts"),slug:"drafts",icon:N_,view:R_,filters:[{field:"status",operator:De,value:"draft"}]},{title:(0,b.__)("Pending"),slug:"pending",icon:M_,view:R_,filters:[{field:"status",operator:De,value:"pending"}]},{title:(0,b.__)("Private"),slug:"private",icon:V_,view:R_,filters:[{field:"status",operator:De,value:"private"}]},{title:(0,b.__)("Trash"),slug:"trash",icon:Fo,view:{...R_,type:Re,layout:F_[Re].layout},filters:[{field:"status",operator:De,value:"trash"}]}]),[t])}function D_({postType:e,onSave:t,onClose:s}){const n=(0,l.useSelect)((t=>t(_.store).getPostType(e)?.labels),[e]),[i,r]=(0,d.useState)(!1),[a,c]=(0,d.useState)(""),{saveEntityRecord:u}=(0,l.useDispatch)(_.store),{createErrorNotice:p,createSuccessNotice:h}=(0,l.useDispatch)(w.store),{resolveSelect:f}=(0,l.useRegistry)();return(0,oe.jsx)(y.Modal,{title:(0,b.sprintf)((0,b.__)("Draft new: %s"),n?.singular_name),onRequestClose:s,focusOnMount:"firstContentElement",size:"small",children:(0,oe.jsx)("form",{onSubmit:async function(s){if(s.preventDefault(),!i){r(!0);try{const s=await f(_.store).getPostType(e),n=await u("postType",e,{status:"draft",title:a,slug:a||(0,b.__)("No title"),content:s.template&&s.template.length?(0,o.serialize)((0,o.synchronizeBlocksWithTemplate)([],s.template)):void 0},{throwOnError:!0});t(n),h((0,b.sprintf)((0,b.__)('"%s" successfully created.'),(0,Jt.decodeEntities)(n.title?.rendered||a)),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("An error occurred while creating the item.");p(t,{type:"snackbar"})}finally{r(!1)}}},children:(0,oe.jsxs)(y.__experimentalVStack,{spacing:4,children:[(0,oe.jsx)(y.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,b.__)("Title"),onChange:c,placeholder:(0,b.__)("No title"),value:a}),(0,oe.jsxs)(y.__experimentalHStack,{spacing:2,justify:"end",children:[(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:s,children:(0,b.__)("Cancel")}),(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:i,"aria-disabled":i,children:(0,b.__)("Create draft")})]})]})})})}const z_=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})}),{useHistory:L_}=te(Gt.privateApis),G_=()=>{const e=L_();return(0,d.useMemo)((()=>({id:"edit-post",label:(0,b.__)("Edit"),isPrimary:!0,icon:z_,isEligible:e=>"trash"!==e.status&&e.type!==Ie.theme,callback(t){const s=t[0];e.push({postId:s.id,postType:s.type,canvas:"edit"})}})),[e])},H_=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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"})});const U_=function({id:e,size:t=["large","medium","thumbnail"],...s}){const{record:n}=(0,_.useEntityRecord)("root","media",e),i=t.find((e=>!!n?.media_details?.sizes[e])),r=n?.media_details?.sizes[i]?.source_url||n?.source_url;return r?(0,oe.jsx)("img",{...s,src:r,alt:n.alt_text}):null},W_=[{value:"draft",label:(0,b.__)("Draft"),icon:N_,description:(0,b.__)("Not ready to publish.")},{value:"future",label:(0,b.__)("Scheduled"),icon:A_,description:(0,b.__)("Publish automatically on a chosen date.")},{value:"pending",label:(0,b.__)("Pending Review"),icon:M_,description:(0,b.__)("Waiting for review before publishing.")},{value:"private",label:(0,b.__)("Private"),icon:V_,description:(0,b.__)("Only visible to site admins and editors.")},{value:"publish",label:(0,b.__)("Published"),icon:O_,description:(0,b.__)("Visible to everyone.")},{value:"trash",label:(0,b.__)("Trash"),icon:Fo}],q_=e=>(0,Wm.dateI18n)((0,Wm.getSettings)().formats.datetimeAbbreviated,(0,Wm.getDate)(e));function Z_({item:e,viewType:t}){const s="trash"===e.status,{onClick:n}=Bo({postId:e.id,postType:e.type,canvas:"edit"}),i=!!e.featured_media,r=t===Fe?["large","full","medium","thumbnail"]:["thumbnail","medium","large","full"],o=i?(0,oe.jsx)(U_,{className:"edit-site-post-list__featured-image",id:e.featured_media,size:r}):null,a=t!==Be&&!s;return(0,oe.jsx)("div",{className:`edit-site-post-list__featured-image-wrapper is-layout-${t}`,children:a?(0,oe.jsx)("button",{className:"edit-site-post-list__featured-image-button",type:"button",onClick:n,"aria-label":e.title?.rendered||(0,b.__)("(no title)"),children:o}):o})}function K_({item:e}){const t=W_.find((({value:t})=>t===e.status)),s=t?.label||e.status,n=t?.icon;return(0,oe.jsxs)(y.__experimentalHStack,{alignment:"left",spacing:0,children:[n&&(0,oe.jsx)("div",{className:"edit-site-post-list__status-icon",children:(0,oe.jsx)(y.Icon,{icon:n})}),(0,oe.jsx)("span",{children:s})]})}function Y_({item:e}){const{text:t,imageUrl:s}=(0,l.useSelect)((t=>{const{getUser:s}=t(_.store),n=s(e.author);return{imageUrl:n?.avatar_urls?.[48],text:n?.name}}),[e]),[n,i]=(0,d.useState)(!1);return(0,oe.jsxs)(y.__experimentalHStack,{alignment:"left",spacing:0,children:[!!s&&(0,oe.jsx)("div",{className:Ut("page-templates-author-field__avatar",{"is-loaded":n}),children:(0,oe.jsx)("img",{onLoad:()=>i(!0),alt:(0,b.__)("Author avatar"),src:s})}),!s&&(0,oe.jsx)("div",{className:"page-templates-author-field__icon",children:(0,oe.jsx)(y.Icon,{icon:H_})}),(0,oe.jsx)("span",{className:"page-templates-author-field__name",children:t})]})}const X_=function(e){const{records:t,isResolving:s}=(0,_.useEntityRecords)("root","user",{per_page:-1}),{frontPageId:n,postsPageId:i}=(0,l.useSelect)((e=>{const{getEntityRecord:t}=e(_.store),s=t("root","site");return{frontPageId:s?.page_on_front,postsPageId:s?.page_for_posts}}),[]),r=(0,d.useMemo)((()=>[{id:"featured-image",label:(0,b.__)("Featured Image"),getValue:({item:e})=>e.featured_media,render:({item:t})=>(0,oe.jsx)(Z_,{item:t,viewType:e}),enableSorting:!1},{label:(0,b.__)("Title"),id:"title",type:"text",getValue:({item:e})=>"string"==typeof e.title?e.title:e.title?.raw,render:({item:t})=>{const s=[Re,Fe].includes(e)&&"trash"!==t.status,r="string"==typeof t.title?t.title:t.title?.rendered,o=s?(0,oe.jsx)(Do,{params:{postId:t.id,postType:t.type,canvas:"edit"},children:(0,Jt.decodeEntities)(r)||(0,b.__)("(no title)")}):(0,oe.jsx)("span",{children:(0,Jt.decodeEntities)(r)||(0,b.__)("(no title)")});let a="";return t.id===n?a=(0,oe.jsx)("span",{className:"edit-site-post-list__title-badge",children:(0,b.__)("Homepage")}):t.id===i&&(a=(0,oe.jsx)("span",{className:"edit-site-post-list__title-badge",children:(0,b.__)("Posts Page")})),(0,oe.jsxs)(y.__experimentalHStack,{className:"edit-site-post-list__title",alignment:"center",justify:"flex-start",children:[o,a]})},enableHiding:!1},{label:(0,b.__)("Author"),id:"author",type:"integer",elements:t?.map((({id:e,name:t})=>({value:e,label:t})))||[],render:Y_,sort:(e,t,s)=>{const n=e._embedded?.author?.[0]?.name||"",i=t._embedded?.author?.[0]?.name||"";return"asc"===s?n.localeCompare(i):i.localeCompare(n)}},{label:(0,b.__)("Status"),id:"status",type:"text",elements:W_,render:K_,Edit:"radio",enableSorting:!1,filterBy:{operators:[De]}},{label:(0,b.__)("Date"),id:"date",type:"datetime",render:({item:e})=>{if(["draft","private"].includes(e.status))return(0,d.createInterpolateElement)((0,b.sprintf)((0,b.__)("<span>Modified: <time>%s</time></span>"),q_(e.date)),{span:(0,oe.jsx)("span",{}),time:(0,oe.jsx)("time",{})});if("future"===e.status)return(0,d.createInterpolateElement)((0,b.sprintf)((0,b.__)("<span>Scheduled: <time>%s</time></span>"),q_(e.date)),{span:(0,oe.jsx)("span",{}),time:(0,oe.jsx)("time",{})});if("publish"===e.status)return(0,d.createInterpolateElement)((0,b.sprintf)((0,b.__)("<span>Published: <time>%s</time></span>"),q_(e.date)),{span:(0,oe.jsx)("span",{}),time:(0,oe.jsx)("time",{})});const t=(0,Wm.getDate)(e.modified)>(0,Wm.getDate)(e.date)?e.modified:e.date;return"pending"===e.status?(0,d.createInterpolateElement)((0,b.sprintf)((0,b.__)("<span>Modified: <time>%s</time></span>"),q_(t)),{span:(0,oe.jsx)("span",{}),time:(0,oe.jsx)("time",{})}):(0,oe.jsx)("time",{children:q_(e.date)})}},{id:"comment_status",label:(0,b.__)("Discussion"),type:"text",Edit:"radio",enableSorting:!1,filterBy:{operators:[]},elements:[{value:"open",label:(0,b.__)("Open"),description:(0,b.__)("Visitors can add new comments and replies.")},{value:"closed",label:(0,b.__)("Closed"),description:(0,b.__)("Visitors cannot add new comments or replies. Existing comments remain visible.")}]}]),[t,e,n,i]);return{isLoading:s,fields:r}},{usePostActions:J_}=te(h.privateApis),{useLocation:Q_,useHistory:$_}=te(Gt.privateApis),{useEntityRecordsWithPermissions:eS}=te(_.privateApis),tS=[],sS=(e,t)=>e.find((({slug:e})=>e===t))?.view,nS=e=>{if(!e?.content)return;const t=JSON.parse(e.content);return t?{...t,layout:F_[t.type]?.layout}:void 0};const iS="draft,future,pending,private,publish";function rS(e){return e.id.toString()}function oS({postType:e}){var t,s,n;const[i,r]=function(e){const{params:{activeView:t="all",isCustom:s="false",layout:n}}=Q_(),i=$_(),r=B_({postType:e}),{editEntityRecord:o}=(0,l.useDispatch)(_.store),a=(0,l.useSelect)((e=>{if("true"!==s)return;const{getEditedEntityRecord:n}=e(_.store);return n("postType","wp_dataviews",Number(t))}),[t,s]),[c,u]=(0,d.useState)((()=>{let e;var i,o;e="true"===s?null!==(i=nS(a))&&void 0!==i?i:{type:null!=n?n:Be}:null!==(o=sS(r,t))&&void 0!==o?o:{type:null!=n?n:Be};const l=null!=n?n:e.type;return{...e,type:l}})),p=(0,d.useCallback)((e=>{const{params:t}=i.getLocationWithParams();(e.type!==Be||t?.layout)&&e.type!==t?.layout&&i.push({...t,layout:e.type}),u(e),"true"===s&&a?.id&&o("postType","wp_dataviews",a?.id,{content:JSON.stringify(e)})}),[i,s,o,a?.id]);return(0,d.useEffect)((()=>{u((e=>({...e,type:null!=n?n:Be})))}),[n]),(0,d.useEffect)((()=>{let e;if(e="true"===s?nS(a):sS(r,t),e){const t=null!=n?n:e.type;u({...e,type:t})}}),[t,s,n,r,a]),[c,p,p]}(e),o=B_({postType:e}),a=$_(),c=Q_(),{postId:u,quickEdit:p=!1,isCustom:h,activeView:f="all"}=c.params,[m,g]=(0,d.useState)(null!==(t=u?.split(","))&&void 0!==t?t:[]),x=(0,d.useCallback)((e=>{var t;g(e);const{params:s}=a.getLocationWithParams();"false"===(null!==(t=s.isCustom)&&void 0!==t?t:"false")&&a.push({...s,postId:e.join(",")})}),[a]),w=(e,t)=>{var s;const n=e.find((({slug:e})=>e===t));return null!==(s=n?.filters)&&void 0!==s?s:[]},{isLoading:S,fields:j}=X_(i.type),C=(0,d.useMemo)((()=>{const e=w(o,f).map((({field:e})=>e));return j.map((t=>({...t,elements:e.includes(t.id)?[]:t.elements})))}),[j,o,f]),k=(0,d.useMemo)((()=>{const e={};i.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&&t.operator===ze&&(e.author_exclude=t.value)}));return w(o,f).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&&t.operator===ze&&(e.author_exclude=t.value)})),e.status&&""!==e.status||(e.status=iS),{per_page:i.perPage,page:i.page,_embed:"author",order:i.sort?.direction,orderby:i.sort?.field,search:i.search,...e}}),[i,f,o]),{records:E,isResolving:P,totalItems:I,totalPages:T}=eS("postType",e,k),O=(0,d.useMemo)((()=>S||"author"!==i?.sort?.field?E:lv(E,{sort:{...i.sort}},C).data),[E,C,S,i?.sort]),A=null!==(s=O?.map((e=>rS(e))))&&void 0!==s?s:[],N=(null!==(n=(0,v.usePrevious)(A))&&void 0!==n?n:[]).filter((e=>!A.includes(e))).includes(u);(0,d.useEffect)((()=>{N&&a.push({...a.getLocationWithParams().params,postId:void 0})}),[N,a]);const M=(0,d.useMemo)((()=>({totalItems:I,totalPages:T})),[I,T]),{labels:V,canCreateRecord:F}=(0,l.useSelect)((t=>{const{getPostType:s,canUser:n}=t(_.store);return{labels:s(e)?.labels,canCreateRecord:n("create",{kind:"postType",name:e})}}),[e]),R=J_({postType:e,context:"list"}),B=G_(),D=(0,d.useMemo)((()=>[B,...R]),[R,B]),[z,L]=(0,d.useState)(!1),G=()=>L(!1);return(0,oe.jsx)(I_,{title:V?.name,actions:V?.add_new_item&&F&&(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(y.Button,{variant:"primary",onClick:()=>L(!0),__next40pxDefaultSize:!0,children:V.add_new_item}),z&&(0,oe.jsx)(D_,{postType:e,onSave:({type:e,id:t})=>{a.push({postId:t,postType:e,canvas:"edit"}),G()},onClose:G})]}),children:(0,oe.jsx)(C_,{paginationInfo:M,fields:C,actions:D,data:O||tS,isLoading:P||S,view:i,onChangeView:r,selection:m,onChangeSelection:x,getItemId:rS,defaultLayouts:F_,header:window.__experimentalQuickEditDataViews&&i.type!==Be&&"page"===e&&(0,oe.jsx)(y.Button,{size:"compact",isPressed:p,icon:k_,label:(0,b.__)("Toggle details panel"),onClick:()=>{a.push({...c.params,quickEdit:!p||void 0})}})},f+h)})}const aS=(e,t,s)=>t===s.findIndex((t=>e.name===t.name));function lS(){var e;const t=(0,l.useSelect)((e=>{const{getSettings:t}=te(e(zt));return t()}),[]),s=null!==(e=t.__experimentalAdditionalBlockPatterns)&&void 0!==e?e:t.__experimentalBlockPatterns,n=(0,l.useSelect)((e=>e(_.store).getBlockPatterns()),[]),i=(0,d.useMemo)((()=>[...s||[],...n||[]].filter(aS)),[s,n]);return(0,d.useMemo)((()=>{const{__experimentalAdditionalBlockPatterns:e,...s}=t;return{...s,__experimentalBlockPatterns:i,__unstableIsPreviewMode:!0}}),[t,i])}const{extractWords:cS,getNormalizedSearchTerms:uS,normalizeString:dS}=te(x.privateApis),pS=e=>e.type===Ie.user?e.slug:e.type===Ce?"":e.name||"",hS=e=>"string"==typeof e.title?e.title:e.title&&e.title.rendered?e.title.rendered:e.title&&e.title.raw?e.title.raw:"",fS=e=>e.type===Ie.user?e.excerpt.raw:e.description||"",mS=e=>e.keywords||[],gS=()=>!1,vS=(e=[],t="",s={})=>{const n=uS(t),i=s.categoryId!==Te&&!n.length,r={...s,onlyFilterByCategory:i},o=i?0:1,a=e.map((e=>[e,xS(e,t,r)])).filter((([,e])=>e>o));return 0===n.length||a.sort((([,e],[,t])=>t-e)),a.map((([e])=>e))};function xS(e,t,s){const{categoryId:n,getName:i=pS,getTitle:r=hS,getDescription:o=fS,getKeywords:a=mS,hasCategory:l=gS,onlyFilterByCategory:c}=s;let u=n===Te||n===Pe||n===Oe&&e.type===Ie.user||l(e,n)?1:0;if(!u||c)return u;const d=i(e),p=r(e),h=o(e),f=a(e),m=dS(t),g=dS(p);if(m===g)u+=30;else if(g.startsWith(m))u+=20;else{const e=[d,p,h,...f].join(" ");0===((e,t)=>e.filter((e=>!uS(t).some((t=>t.includes(e))))))(cS(m),e).length&&(u+=10)}return u}const yS=[],bS=(0,l.createSelector)(((e,t,s="")=>{var n;const{getEntityRecords:i,isResolving:r}=e(_.store),{__experimentalGetDefaultTemplatePartAreas:o}=e(h.store),a={per_page:-1},l=null!==(n=i("postType",Ce,a))&&void 0!==n?n:yS,c=(o()||[]).map((e=>e.area)),u=r("getEntityRecords",["postType",Ce,a]),d=vS(l,s,{categoryId:t,hasCategory:(e,t)=>t!==Ee?e.area===t:e.area===t||!c.includes(e.area)});return{patterns:d,isResolving:u}}),(e=>[e(_.store).getEntityRecords("postType",Ce,{per_page:-1}),e(_.store).isResolving("getEntityRecords",["postType",Ce,{per_page:-1}]),e(h.store).__experimentalGetDefaultTemplatePartAreas()])),wS=(0,l.createSelector)((e=>{var t;const{getSettings:s}=te(e(zt)),{isResolving:n}=e(_.store),i=s();return{patterns:[...(null!==(t=i.__experimentalAdditionalBlockPatterns)&&void 0!==t?t:i.__experimentalBlockPatterns)||[],...e(_.store).getBlockPatterns()||[]].filter((e=>!Ae.includes(e.source))).filter(aS).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(_.store).getBlockPatterns(),e(_.store).isResolving("getBlockPatterns"),te(e(zt)).getSettings()])),_S=(0,l.createSelector)(((e,t,s,n="")=>{const{patterns:i,isResolving:r}=wS(e),{patterns:o,isResolving:a,categories:l}=SS(e);let c=[...i||[],...o||[]];return s&&(c=c.filter((e=>e.type===Ie.user?(e.wp_pattern_sync_status||Ne.full)===s:s===Ne.unsynced))),c=vS(c,n,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||a}}),(e=>[wS(e),SS(e)])),SS=(0,l.createSelector)(((e,t,s="")=>{const{getEntityRecords:n,isResolving:i,getUserPatternCategories:r}=e(_.store),o={per_page:-1},a=n("postType",Ie.user,o),l=r(),c=new Map;l.forEach((e=>c.set(e.id,e)));let u=null!=a?a:yS;const d=i("getEntityRecords",["postType",Ie.user,o]);return t&&(u=u.filter((e=>e.wp_pattern_sync_status||Ne.full===t))),u=vS(u,s,{hasCategory:()=>!0}),{patterns:u,isResolving:d,categories:l}}),(e=>[e(_.store).getEntityRecords("postType",Ie.user,{per_page:-1}),e(_.store).isResolving("getEntityRecords",["postType",Ie.user,{per_page:-1}]),e(_.store).getUserPatternCategories()]));const jS=(e,t,{search:s="",syncStatus:n}={})=>(0,l.useSelect)((i=>{if(e===Ce)return bS(i,t,s);if(e===Ie.user&&t){return _S(i,"uncategorized"===t?"":t,n,s)}return e===Ie.user?SS(i,n,s):{patterns:yS,isResolving:!1}}),[t,e,s,n]),CS=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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"})}),kS=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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"})}),ES=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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"})}),{useHistory:PS}=te(Gt.privateApis),{CreatePatternModal:IS,useAddPatternCategory:TS}=te(_e.privateApis),{CreateTemplatePartModal:OS}=te(h.privateApis);function AS(){const e=PS(),[t,s]=(0,d.useState)(!1),[n,i]=(0,d.useState)(!1),{createPatternFromFile:r}=te((0,l.useDispatch)(_e.store)),{createSuccessNotice:o,createErrorNotice:a}=(0,l.useDispatch)(w.store),c=(0,d.useRef)(),{isBlockBasedTheme:u,addNewPatternLabel:p,addNewTemplatePartLabel:h,canCreatePattern:f,canCreateTemplatePart:m}=(0,l.useSelect)((e=>{const{getCurrentTheme:t,getPostType:s,canUser:n}=e(_.store);return{isBlockBasedTheme:t()?.is_block_theme,addNewPatternLabel:s(Ie.user)?.labels?.add_new_item,addNewTemplatePartLabel:s(Ce)?.labels?.add_new_item,canCreatePattern:n("create",{kind:"postType",name:Ie.user}),canCreateTemplatePart:n("create",{kind:"postType",name:Ce})}}),[]);function g(){s(!1),i(!1)}const v=[];f&&v.push({icon:CS,onClick:()=>s(!0),title:p}),u&&m&&v.push({icon:kS,onClick:()=>i(!0),title:h}),f&&v.push({icon:ES,onClick:()=>{c.current.click()},title:(0,b.__)("Import pattern from JSON")});const{categoryMap:x,findOrCreateTerm:S}=TS();return 0===v.length?null:(0,oe.jsxs)(oe.Fragment,{children:[p&&(0,oe.jsx)(y.DropdownMenu,{controls:v,icon:null,toggleProps:{variant:"primary",showTooltip:!1,__next40pxDefaultSize:!0},text:p,label:p}),t&&(0,oe.jsx)(IS,{onClose:()=>s(!1),onSuccess:function({pattern:t}){s(!1),e.push({postId:t.id,postType:Ie.user,canvas:"edit"})},onError:g}),n&&(0,oe.jsx)(OS,{closeModal:()=>i(!1),blocks:[],onCreate:function(t){i(!1),e.push({postId:t.id,postType:Ce,canvas:"edit"})},onError:g}),(0,oe.jsx)("input",{type:"file",accept:".json",hidden:!0,ref:c,onChange:async t=>{const s=t.target.files?.[0];if(s)try{const{params:{postType:t,categoryId:n}}=e.getLocationWithParams();let i;if(t!==Ce){const e=Array.from(x.values()).find((e=>e.name===n));e&&(i=e.id||await S(e.label))}const a=await r(s,i?[i]:void 0);i||"my-patterns"===n||e.push({postType:Ie.user,categoryId:Te}),o((0,b.sprintf)((0,b.__)('Imported "%s" from JSON.'),a.title.raw),{type:"snackbar",id:"import-pattern-success"})}catch(e){a(e.message,{type:"snackbar",id:"import-pattern-error"})}finally{t.target.value=""}}})]})}function NS(){const e=function(){const e=(0,l.useSelect)((e=>{var t;const{getSettings:s}=te(e(zt)),n=s();return null!==(t=n.__experimentalAdditionalBlockPatternCategories)&&void 0!==t?t:n.__experimentalBlockPatternCategories}));return[...e||[],...(0,l.useSelect)((e=>e(_.store).getBlockPatternCategories()))||[]]}();e.push({name:Ee,label:(0,b.__)("Uncategorized")});const t=function(){const e=(0,l.useSelect)((e=>{var t;const{getSettings:s}=te(e(zt));return null!==(t=s().__experimentalAdditionalBlockPatterns)&&void 0!==t?t:s().__experimentalBlockPatterns})),t=(0,l.useSelect)((e=>e(_.store).getBlockPatterns()));return(0,d.useMemo)((()=>[...e||[],...t||[]].filter((e=>!Ae.includes(e.source))).filter(aS).filter((e=>!1!==e.inserter))),[e,t])}(),{patterns:s,categories:n}=jS(Ie.user),i=(0,d.useMemo)((()=>{const i={},r=[];e.forEach((e=>{i[e.name]||(i[e.name]={...e,count:0})})),n.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)})),s.forEach((e=>{e.wp_pattern_category?.forEach((e=>{const t=n.find((t=>t.id===e))?.name;i[t]&&(i[t].count+=1)})),e.wp_pattern_category?.length&&e.wp_pattern_category.some((e=>n.find((t=>t.id===e))))||(i.uncategorized.count+=1)})),[...e,...n].forEach((e=>{i[e.name].count&&!r.find((t=>t.name===e.name))&&r.push(i[e.name])}));const o=r.sort(((e,t)=>e.label.localeCompare(t.label)));return o.unshift({name:Oe,label:(0,b.__)("My patterns"),count:s.length}),o.unshift({name:Te,label:(0,b.__)("All patterns"),description:(0,b.__)("A list of all patterns from all sources."),count:t.length+s.length}),o}),[e,t,n,s]);return{patternCategories:i,hasPatterns:!!i.length}}const{RenamePatternCategoryModal:MS}=te(_e.privateApis);function VS({category:e,onClose:t}){const[s,n]=(0,d.useState)(!1);return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(y.MenuItem,{onClick:()=>n(!0),children:(0,b.__)("Rename")}),s&&(0,oe.jsx)(FS,{category:e,onClose:()=>{n(!1),t()}})]})}function FS({category:e,onClose:t}){const s={id:e.id,slug:e.slug,name:e.label},n=NS();return(0,oe.jsx)(MS,{category:s,existingCategories:n,onClose:t,overlayClassName:"edit-site-list__rename-modal",focusOnMount:"firstContentElement",size:"small"})}const{useHistory:RS}=te(Gt.privateApis);function BS({category:e,onClose:t}){const[s,n]=(0,d.useState)(!1),i=RS(),{createSuccessNotice:r,createErrorNotice:o}=(0,l.useDispatch)(w.store),{deleteEntityRecord:a,invalidateResolution:c}=(0,l.useDispatch)(_.store);return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(y.MenuItem,{isDestructive:!0,onClick:()=>n(!0),children:(0,b.__)("Delete")}),(0,oe.jsx)(y.__experimentalConfirmDialog,{isOpen:s,onConfirm:async()=>{try{await a("taxonomy","wp_pattern_category",e.id,{force:!0},{throwOnError:!0}),c("getUserPatternCategories"),c("getEntityRecords",["postType",Ie.user,{per_page:-1}]),r((0,b.sprintf)((0,b.__)('"%s" deleted.'),e.label),{type:"snackbar",id:"pattern-category-delete"}),t?.(),i.push({postType:Ie.user,categoryId:Te})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("An error occurred while deleting the pattern category.");o(t,{type:"snackbar",id:"pattern-category-delete"})}},onCancel:()=>n(!1),confirmButtonText:(0,b.__)("Delete"),className:"edit-site-patterns__delete-modal",title:(0,b.sprintf)((0,b.__)('Delete "%s"?'),(0,Jt.decodeEntities)(e.label)),size:"medium",__experimentalHideHeader:!1,children:(0,b.sprintf)((0,b.__)('Are you sure you want to delete the category "%s"? The patterns will not be deleted.'),(0,Jt.decodeEntities)(e.label))})]})}function DS({categoryId:e,type:t,titleId:s,descriptionId:n}){const{patternCategories:i}=NS(),r=(0,l.useSelect)((e=>e(h.store).__experimentalGetDefaultTemplatePartAreas()),[]);let o,a,c;if(t===Ce){const t=r.find((t=>t.area===e));o=t?.label||(0,b.__)("All Template Parts"),a=t?.description||(0,b.__)("Includes every template part defined for any area.")}else t===Ie.user&&e&&(c=i.find((t=>t.name===e)),o=c?.label,a=c?.description);return o?(0,oe.jsxs)(y.__experimentalVStack,{className:"edit-site-patterns__section-header",spacing:1,children:[(0,oe.jsxs)(y.__experimentalHStack,{justify:"space-between",className:"edit-site-patterns__title",children:[(0,oe.jsx)(y.__experimentalHeading,{as:"h2",level:3,id:s,weight:500,truncate:!0,children:o}),(0,oe.jsxs)(y.__experimentalHStack,{expanded:!1,children:[(0,oe.jsx)(AS,{}),!!c?.id&&(0,oe.jsx)(y.DropdownMenu,{icon:ga,label:(0,b.__)("Actions"),toggleProps:{className:"edit-site-patterns__button",description:(0,b.sprintf)((0,b.__)("Action menu for %s pattern category"),o),size:"compact"},children:({onClose:e})=>(0,oe.jsxs)(y.MenuGroup,{children:[(0,oe.jsx)(VS,{category:c,onClose:e}),(0,oe.jsx)(BS,{category:c,onClose:e})]})})]})]}),a?(0,oe.jsx)(y.__experimentalText,{variant:"muted",as:"p",id:n,className:"edit-site-patterns__sub-title",children:a}):null]}):null}const zS=(0,oe.jsx)(Qt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,oe.jsx)(Qt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z"})}),LS=(0,window.wp.priorityQueue.createQueue)();function GS({children:e,placeholder:t}){const[s,n]=(0,d.useState)(!1);return(0,d.useEffect)((()=>{const e={};return LS.add(e,(()=>{(0,d.flushSync)((()=>{n(!0)}))})),()=>{LS.cancel(e)}}),[]),s?e:t}const HS=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"})}),US=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"})});function WS(e,t){return(0,l.useSelect)((s=>{const{getEntityRecord:n,getMedia:i,getUser:r,getEditedEntityRecord:o}=s(_.store),a=o("postType",e,t),l=a?.original_source,c=a?.author_text;switch(l){case"theme":return{type:l,icon:Mo,text:c,isCustomized:a.source===ke.custom};case"plugin":return{type:l,icon:HS,text:c,isCustomized:a.source===ke.custom};case"site":{const e=n("root","__unstableBase");return{type:l,icon:US,imageUrl:e?.site_logo?i(e.site_logo)?.source_url:void 0,text:c,isCustomized:!1}}default:{const e=r(a.author);return{type:"user",icon:H_,imageUrl:e?.avatar_urls?.[48],text:c,isCustomized:!1}}}}),[e,t])}const{useGlobalStyle:qS}=te(x.privateApis);function ZS({item:e,onClick:t,ariaDescribedBy:s,children:n}){return(0,oe.jsx)("button",{className:"page-patterns-preview-field__button",type:"button",onClick:e.type!==Ie.theme?t:void 0,"aria-label":e.title,"aria-describedby":s,"aria-disabled":e.type===Ie.theme,children:n})}const KS={label:(0,b.__)("Preview"),id:"preview",render:function({item:e}){const t=(0,d.useId)(),s=e.description||e?.excerpt?.raw,n=e.type===Ie.user,i=e.type===Ce,[r]=qS("color.background"),{onClick:a}=Bo({postType:e.type,postId:n||i?e.id:e.name,canvas:"edit"}),l=(0,d.useMemo)((()=>{var t;return null!==(t=e.blocks)&&void 0!==t?t:(0,o.parse)(e.content.raw,{__unstableSkipMigrationLogs:!0})}),[e?.content?.raw,e.blocks]),c=!l?.length;return(0,oe.jsxs)("div",{className:"page-patterns-preview-field",style:{backgroundColor:r},children:[(0,oe.jsxs)(ZS,{item:e,onClick:a,ariaDescribedBy:s?t:void 0,children:[c&&i&&(0,b.__)("Empty template part"),c&&!i&&(0,b.__)("Empty pattern"),!c&&(0,oe.jsx)(GS,{children:(0,oe.jsx)(x.BlockPreview,{blocks:l,viewportWidth:e.viewportWidth})})]}),!!s&&(0,oe.jsx)("div",{hidden:!0,id:t,children:s})]})},enableSorting:!1};const YS={label:(0,b.__)("Title"),id:"title",getValue:({item:e})=>e.title?.raw||e.title,render:function({item:e}){const t=e.type===Ie.user,s=e.type===Ce,{onClick:n}=Bo({postType:e.type,postId:t||s?e.id:e.name,canvas:"edit"}),i=(0,Jt.decodeEntities)(hS(e));return(0,oe.jsxs)(y.__experimentalHStack,{alignment:"center",justify:"flex-start",spacing:2,children:[(0,oe.jsx)(y.Flex,{as:"div",gap:0,justify:"flex-start",className:"edit-site-patterns__pattern-title",children:e.type===Ie.theme?i:(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!1,variant:"link",onClick:n,tabIndex:"-1",children:i})}),e.type===Ie.theme&&(0,oe.jsx)(y.Tooltip,{placement:"top",text:(0,b.__)("This pattern cannot be edited."),children:(0,oe.jsx)(Zo,{className:"edit-site-patterns__pattern-lock-icon",icon:zS,size:24})})]})},enableHiding:!1},XS=[{value:Ne.full,label:(0,b._x)("Synced","pattern (singular)"),description:(0,b.__)("Patterns that are kept in sync across the site.")},{value:Ne.unsynced,label:(0,b._x)("Not synced","pattern (singular)"),description:(0,b.__)("Patterns that can be changed freely without affecting the site.")}],JS={label:(0,b.__)("Sync status"),id:"sync-status",render:({item:e})=>{const t="wp_pattern_sync_status"in e?e.wp_pattern_sync_status||Ne.full:Ne.unsynced;return(0,oe.jsx)("span",{className:`edit-site-patterns__field-sync-status-${t}`,children:XS.find((({value:e})=>e===t)).label})},elements:XS,filterBy:{operators:["is"],isPrimary:!0},enableSorting:!1};const QS={label:(0,b.__)("Author"),id:"author",getValue:({item:e})=>e.author_text,render:function({item:e}){const[t,s]=(0,d.useState)(!1),{text:n,icon:i,imageUrl:r}=WS(e.type,e.id);return(0,oe.jsxs)(y.__experimentalHStack,{alignment:"left",spacing:0,children:[r&&(0,oe.jsx)("div",{className:Ut("page-templates-author-field__avatar",{"is-loaded":t}),children:(0,oe.jsx)("img",{onLoad:()=>s(!0),alt:"",src:r})}),!r&&(0,oe.jsx)("div",{className:"page-templates-author-field__icon",children:(0,oe.jsx)(Zo,{icon:i})}),(0,oe.jsx)("span",{className:"page-templates-author-field__name",children:n})]})},filterBy:{isPrimary:!0}},{ExperimentalBlockEditorProvider:$S}=te(x.privateApis),{usePostActions:ej}=te(h.privateApis),{useLocation:tj}=te(Gt.privateApis),sj=[],nj={[Re]:{layout:{primaryField:"title",styles:{preview:{width:"1%"},author:{width:"1%"}}}},[Fe]:{layout:{mediaField:"preview",primaryField:"title",badgeFields:["sync-status"]}}},ij={type:Fe,search:"",page:1,perPage:20,layout:nj[Fe].layout,fields:["title","sync-status"],filters:[]};function rj(){const{params:{postType:e,categoryId:t}}=tj(),s=e||Ie.user,n=t||Te,[i,r]=(0,d.useState)(ij),o=(0,v.usePrevious)(n),a=i.filters?.find((({field:e})=>"sync-status"===e))?.value,{patterns:c,isResolving:u}=jS(s,n,{search:i.search,syncStatus:a}),{records:p}=(0,_.useEntityRecords)("postType",Ce,{per_page:-1}),h=(0,d.useMemo)((()=>{if(!p)return sj;const e=new Set;return p.forEach((t=>{e.add(t.author_text)})),Array.from(e).map((e=>({value:e,label:e})))}),[p]),f=(0,d.useMemo)((()=>{const e=[KS,YS];return s===Ie.user?e.push(JS):s===Ce&&e.push({...QS,elements:h}),e}),[s,h]);(0,d.useEffect)((()=>{o!==n&&r((e=>({...e,page:1})))}),[n,o]);const{data:m,paginationInfo:g}=(0,d.useMemo)((()=>{const e={...i};return delete e.search,s!==Ce&&(e.filters=[]),lv(c,e,f)}),[c,i,f,s]),x=function(e){const t=(0,d.useMemo)((()=>{var t;return null!==(t=e?.filter((e=>e.type!==Ie.theme)).map((e=>[e.type,e.id])))&&void 0!==t?t:[]}),[e]),s=(0,l.useSelect)((e=>{const{getEntityRecordPermissions:s}=te(e(_.store));return t.reduce(((e,[t,n])=>(e[n]=s("postType",t,n),e)),{})}),[t]);return(0,d.useMemo)((()=>{var t;return null!==(t=e?.map((e=>{var t;return{...e,permissions:null!==(t=s?.[e.id])&&void 0!==t?t:{}}})))&&void 0!==t?t:[]}),[e,s])}(m),y=ej({postType:Ce,context:"list"}),w=ej({postType:Ie.user,context:"list"}),S=G_(),j=(0,d.useMemo)((()=>s===Ce?[S,...y].filter(Boolean):[S,...w].filter(Boolean)),[S,s,y,w]),C=(0,d.useId)(),k=lS();return(0,oe.jsx)($S,{settings:k,children:(0,oe.jsxs)(I_,{title:(0,b.__)("Patterns content"),className:"edit-site-page-patterns-dataviews",hideTitleFromUI:!0,children:[(0,oe.jsx)(DS,{categoryId:n,type:s,titleId:`${C}-title`,descriptionId:`${C}-description`}),(0,oe.jsx)(C_,{paginationInfo:g,fields:f,actions:j,data:x||sj,getItemId:e=>{var t;return null!==(t=e.name)&&void 0!==t?t:e.id},isLoading:u,view:i,onChangeView:r,defaultLayouts:nj},n+e)]})})}const oj=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})}),aj=(0,oe.jsx)(Qt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,oe.jsx)(Qt.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"})}),lj=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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"})}),cj=(0,oe.jsx)(Qt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,oe.jsx)(Qt.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"})}),uj=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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 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viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,oe.jsx)(Qt.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"})}),fj=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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"})}),mj=(0,oe.jsxs)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,oe.jsx)(Qt.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,oe.jsx)(Qt.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"})]}),gj=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.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"})}),vj={},xj=(e,t)=>{let s=e;return t.split(".").forEach((e=>{s=s?.[e]})),s},yj=(e,t)=>(e||[]).map((e=>({...e,name:(0,Jt.decodeEntities)(xj(e,t))}))),bj=()=>(0,l.useSelect)((e=>e(_.store).getEntityRecords("postType",je,{per_page:-1})),[]),wj=()=>(0,l.useSelect)((e=>e(h.store).__experimentalGetDefaultTemplateTypes()),[]),_j=()=>{const e=(0,l.useSelect)((e=>e(_.store).getPostTypes({per_page:-1})),[]);return(0,d.useMemo)((()=>{const t=["attachment"];return e?.filter((({viewable:e,slug:s})=>e&&!t.includes(s)))}),[e])};function Sj(){const e=_j(),t=(0,d.useMemo)((()=>e?.filter((e=>e.has_archive))),[e]),s=bj(),n=(0,d.useMemo)((()=>e?.reduce(((e,{labels:t})=>{const s=t.singular_name.toLowerCase();return e[s]=(e[s]||0)+1,e}),{})),[e]),i=(0,d.useCallback)((({labels:e,slug:t})=>{const s=e.singular_name.toLowerCase();return n[s]>1&&s!==t}),[n]);return(0,d.useMemo)((()=>t?.filter((e=>!(s||[]).some((t=>t.slug==="archive-"+e.slug)))).map((e=>{let t;return t=i(e)?(0,b.sprintf)((0,b.__)("Archive: %1$s (%2$s)"),e.labels.singular_name,e.slug):(0,b.sprintf)((0,b.__)("Archive: %s"),e.labels.singular_name),{slug:"archive-"+e.slug,description:(0,b.sprintf)((0,b.__)("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):cj,templatePrefix:"archive"}}))||[]),[t,s,i])}const jj=e=>{const t=_j(),s=bj(),n=wj(),i=(0,d.useMemo)((()=>t?.reduce(((e,{labels:t})=>{const s=(t.template_name||t.singular_name).toLowerCase();return e[s]=(e[s]||0)+1,e}),{})),[t]),r=(0,d.useCallback)((({labels:e,slug:t})=>{const s=(e.template_name||e.singular_name).toLowerCase();return i[s]>1&&s!==t}),[i]),o=(0,d.useMemo)((()=>t?.reduce(((e,{slug:t})=>{let s=t;return"page"!==t&&(s=`single-${s}`),e[t]=s,e}),{})),[t]),a=Ij("postType",o),l=(s||[]).map((({slug:e})=>e)),c=(t||[]).reduce(((t,s)=>{const{slug:i,labels:c,icon:u}=s,d=o[i],p=n?.find((({slug:e})=>e===d)),h=l?.includes(d),f=r(s);let m=c.template_name||(0,b.sprintf)((0,b.__)("Single item: %s"),c.singular_name);f&&(m=c.template_name?(0,b.sprintf)((0,b.__)("%1$s (%2$s)"),c.template_name,i):(0,b.sprintf)((0,b.__)("Single item: %1$s (%2$s)"),c.singular_name,i));const g=p?{...p,templatePrefix:o[i]}:{slug:d,title:m,description:(0,b.sprintf)((0,b.__)("Displays a single item: %s."),c.singular_name),icon:"string"==typeof u&&u.startsWith("dashicons-")?u.slice(10):gj,templatePrefix:o[i]},v=a?.[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:a[i].existingEntitiesIds}),getSpecificTemplate:e=>{const t=`${o[i]}-${e.slug}`;return{title:t,slug:t,templatePrefix:o[i]}}},labels:c,hasGeneralTemplate:h,template:t})}),h&&!v||t.push(g),t}),[]),u=(0,d.useMemo)((()=>c.reduce(((e,t)=>{const{slug:s}=t;let n="postTypesMenuItems";return"page"===s&&(n="defaultPostTypesMenuItems"),e[n].push(t),e}),{defaultPostTypesMenuItems:[],postTypesMenuItems:[]})),[c]);return u},Cj=e=>{const t=(()=>{const e=(0,l.useSelect)((e=>e(_.store).getTaxonomies({per_page:-1})),[]);return(0,d.useMemo)((()=>e?.filter((({visibility:e})=>e?.publicly_queryable))),[e])})(),s=bj(),n=wj(),i=(0,d.useMemo)((()=>t?.reduce(((e,{slug:t})=>{let s=t;return["category","post_tag"].includes(t)||(s=`taxonomy-${s}`),"post_tag"===t&&(s="tag"),e[t]=s,e}),{})),[t]),r=t?.reduce(((e,{labels:t})=>{const s=(t.template_name||t.singular_name).toLowerCase();return e[s]=(e[s]||0)+1,e}),{}),o=Ij("taxonomy",i),a=(s||[]).map((({slug:e})=>e)),c=(t||[]).reduce(((t,s)=>{const{slug:l,labels:c}=s,u=i[l],d=n?.find((({slug:e})=>e===u)),p=a?.includes(u),h=((e,t)=>{if(["category","post_tag"].includes(t))return!1;const s=(e.template_name||e.singular_name).toLowerCase();return r[s]>1&&s!==t})(c,l);let f=c.template_name||c.singular_name;h&&(f=c.template_name?(0,b.sprintf)((0,b.__)("%1$s (%2$s)"),c.template_name,l):(0,b.sprintf)((0,b.__)("%1$s (%2$s)"),c.singular_name,l));const m=d?{...d,templatePrefix:i[l]}:{slug:u,title:f,description:(0,b.sprintf)((0,b.__)("Displays taxonomy: %s."),c.singular_name),icon:pj,templatePrefix:i[l]},g=o?.[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:o[l].existingEntitiesIds}),getSpecificTemplate:e=>{const t=`${i[l]}-${e.slug}`;return{title:t,slug:t,templatePrefix:i[l]}}},labels:c,hasGeneralTemplate:p,template:t})}),p&&!g||t.push(m),t}),[]);return(0,d.useMemo)((()=>c.reduce(((e,t)=>{const{slug:s}=t;let n="taxonomiesMenuItems";return["category","tag"].includes(s)&&(n="defaultTaxonomiesMenuItems"),e[n].push(t),e}),{defaultTaxonomiesMenuItems:[],taxonomiesMenuItems:[]})),[c])},kj={user:"author"},Ej={user:{who:"authors"}};const Pj=(e,t,s={})=>{const n=(e=>{const t=bj();return(0,d.useMemo)((()=>Object.entries(e||{}).reduce(((e,[s,n])=>{const i=(t||[]).reduce(((e,t)=>{const s=`${n}-`;return t.slug.startsWith(s)&&e.push(t.slug.substring(s.length)),e}),[]);return i.length&&(e[s]=i),e}),{})),[e,t])})(t);return(0,l.useSelect)((t=>Object.entries(n||{}).reduce(((n,[i,r])=>{const o=t(_.store).getEntityRecords(e,i,{_fields:"id",context:"view",slug:r,...s[i]});return o?.length&&(n[i]=o),n}),{})),[n])},Ij=(e,t,s=vj)=>{const n=Pj(e,t,s),i=(0,l.useSelect)((i=>Object.keys(t||{}).reduce(((t,r)=>{const o=n?.[r]?.map((({id:e})=>e))||[];return t[r]=!!i(_.store).getEntityRecords(e,r,{per_page:1,_fields:"id",context:"view",exclude:o,...s[r]})?.length,t}),{})),[t,n,e,s]);return(0,d.useMemo)((()=>Object.keys(t||{}).reduce(((e,t)=>{const s=n?.[t]?.map((({id:e})=>e))||[];return e[t]={hasEntities:i[t],existingEntitiesIds:s},e}),{})),[t,n,i])},Tj=[];function Oj({suggestion:e,search:t,onSelect:s,entityForSuggestions:n}){const i="edit-site-custom-template-modal__suggestions_list__list-item";return(0,oe.jsxs)(y.Composite.Item,{render:(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,role:"option",className:i,onClick:()=>s(n.config.getSpecificTemplate(e))}),children:[(0,oe.jsx)(y.__experimentalText,{size:"body",lineHeight:1.53846153846,weight:500,className:`${i}__title`,children:(0,oe.jsx)(y.TextHighlight,{text:(0,Jt.decodeEntities)(e.name),highlight:t})}),e.link&&(0,oe.jsx)(y.__experimentalText,{size:"body",lineHeight:1.53846153846,className:`${i}__info`,children:e.link})]})}function Aj({entityForSuggestions:e,onSelect:t}){const[s,n,i]=(0,v.useDebouncedInput)(),r=function(e,t){const{config:s}=e,n=(0,d.useMemo)((()=>({order:"asc",context:"view",search:t,per_page:t?20:10,...s.queryArgs(t)})),[t,s]),{records:i,hasResolved:r}=(0,_.useEntityRecords)(e.type,e.slug,n),[o,a]=(0,d.useState)(Tj);return(0,d.useEffect)((()=>{if(!r)return;let e=Tj;i?.length&&(e=i,s.recordNamePath&&(e=yj(e,s.recordNamePath))),a(e)}),[i,r]),o}(e,i),{labels:o}=e,[a,l]=(0,d.useState)(!1);return!a&&r?.length>9&&l(!0),(0,oe.jsxs)(oe.Fragment,{children:[a&&(0,oe.jsx)(y.SearchControl,{__nextHasNoMarginBottom:!0,onChange:n,value:s,label:o.search_items,placeholder:o.search_items}),!!r?.length&&(0,oe.jsx)(y.Composite,{orientation:"vertical",role:"listbox",className:"edit-site-custom-template-modal__suggestions_list","aria-label":(0,b.__)("Suggestions list"),children:r.map((s=>(0,oe.jsx)(Oj,{suggestion:s,search:i,onSelect:t,entityForSuggestions:e},s.slug)))}),i&&!r?.length&&(0,oe.jsx)(y.__experimentalText,{as:"p",className:"edit-site-custom-template-modal__no-results",children:o.not_found})]})}const Nj=function({onSelect:e,entityForSuggestions:t}){const[s,n]=(0,d.useState)(t.hasGeneralTemplate);return(0,oe.jsxs)(y.__experimentalVStack,{spacing:4,className:"edit-site-custom-template-modal__contents-wrapper",alignment:"left",children:[!s&&(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(y.__experimentalText,{as:"p",children:(0,b.__)("Select whether to create a single template for all items or a specific one.")}),(0,oe.jsxs)(y.Flex,{className:"edit-site-custom-template-modal__contents",gap:"4",align:"initial",children:[(0,oe.jsxs)(y.FlexItem,{isBlock:!0,as:y.Button,onClick:()=>{const{slug:s,title:n,description:i,templatePrefix:r}=t.template;e({slug:s,title:n,description:i,templatePrefix:r})},children:[(0,oe.jsx)(y.__experimentalText,{as:"span",weight:500,lineHeight:1.53846153846,children:t.labels.all_items}),(0,oe.jsx)(y.__experimentalText,{as:"span",lineHeight:1.53846153846,children:(0,b.__)("For all items")})]}),(0,oe.jsxs)(y.FlexItem,{isBlock:!0,as:y.Button,onClick:()=>{n(!0)},children:[(0,oe.jsx)(y.__experimentalText,{as:"span",weight:500,lineHeight:1.53846153846,children:t.labels.singular_name}),(0,oe.jsx)(y.__experimentalText,{as:"span",lineHeight:1.53846153846,children:(0,b.__)("For a specific item")})]})]})]}),s&&(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(y.__experimentalText,{as:"p",children:(0,b.__)("This template will be used only for the specific item chosen.")}),(0,oe.jsx)(Aj,{entityForSuggestions:t,onSelect:e})]})]})};var Mj=function(){return Mj=Object.assign||function(e){for(var t,s=1,n=arguments.length;s<n;s++)for(var i in t=arguments[s])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Mj.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function Vj(e){return e.toLowerCase()}var Fj=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Rj=/[^A-Z0-9]+/gi;function Bj(e,t,s){return t instanceof RegExp?e.replace(t,s):t.reduce((function(e,t){return e.replace(t,s)}),e)}function Dj(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var s=t.splitRegexp,n=void 0===s?Fj:s,i=t.stripRegexp,r=void 0===i?Rj:i,o=t.transform,a=void 0===o?Vj:o,l=t.delimiter,c=void 0===l?" ":l,u=Bj(Bj(e,n,"$1\0$2"),r,"\0"),d=0,p=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(p-1);)p--;return u.slice(d,p).split("\0").map(a).join(c)}(e,Mj({delimiter:"."},t))}const zj=function({onClose:e,createTemplate:t}){const[s,n]=(0,d.useState)(""),i=(0,b.__)("Custom Template"),[r,o]=(0,d.useState)(!1);return(0,oe.jsx)("form",{onSubmit:async function(e){if(e.preventDefault(),!r){o(!0);try{await t({slug:"wp-custom-template-"+(n=s||i,void 0===a&&(a={}),Dj(n,Mj({delimiter:"-"},a))),title:s||i},!1)}finally{o(!1)}var n,a}},children:(0,oe.jsxs)(y.__experimentalVStack,{spacing:6,children:[(0,oe.jsx)(y.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,b.__)("Name"),value:s,onChange:n,placeholder:i,disabled:r,help:(0,b.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,oe.jsxs)(y.__experimentalHStack,{className:"edit-site-custom-generic-template__modal-actions",justify:"right",children:[(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{e()},children:(0,b.__)("Cancel")}),(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:r,"aria-disabled":r,children:(0,b.__)("Create")})]})]})})},{useHistory:Lj}=te(Gt.privateApis),Gj=["front-page","home","single","page","index","archive","author","category","date","tag","search","404"],Hj={"front-page":oj,home:aj,single:lj,page:Vo,archive:cj,search:$t,404:uj,index:dj,category:pw,author:H_,taxonomy:pj,date:hj,tag:fj,attachment:mj};function Uj({title:e,direction:t,className:s,description:n,icon:i,onClick:r,children:o}){return(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,className:s,onClick:r,label:n,showTooltip:!!n,children:(0,oe.jsxs)(y.Flex,{as:"span",spacing:2,align:"center",justify:"center",style:{width:"100%"},direction:t,children:[(0,oe.jsx)("div",{className:"edit-site-add-new-template__template-icon",children:(0,oe.jsx)(y.Icon,{icon:i})}),(0,oe.jsxs)(y.__experimentalVStack,{className:"edit-site-add-new-template__template-name",alignment:"center",spacing:0,children:[(0,oe.jsx)(y.__experimentalText,{align:"center",weight:500,lineHeight:1.53846153846,children:e}),o]})]})})}const Wj={templatesList:1,customTemplate:2,customGenericTemplate:3};function qj({onClose:e}){const[t,s]=(0,d.useState)(Wj.templatesList),[n,i]=(0,d.useState)({}),[r,o]=(0,d.useState)(!1),a=function(e,t){const s=bj(),n=wj(),i=(s||[]).map((({slug:e})=>e)),r=(n||[]).filter((e=>Gj.includes(e.slug)&&!i.includes(e.slug))),o=s=>{t?.(),e(s)},a=[...r],{defaultTaxonomiesMenuItems:l,taxonomiesMenuItems:c}=Cj(o),{defaultPostTypesMenuItems:u,postTypesMenuItems:d}=jj(o),p=function(e){const t=bj(),s=wj(),n=Ij("root",kj,Ej);let i=s?.find((({slug:e})=>"author"===e));i||(i={description:(0,b.__)("Displays latest posts written by a single author."),slug:"author",title:"Author"});const r=!!t?.find((({slug:e})=>"author"===e));if(n.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:n.user.existingEntitiesIds,who:"authors"}),getSpecificTemplate:e=>{const t=`author-${e.slug}`;return{title:t,slug:t,templatePrefix:"author"}}},labels:{singular_name:(0,b.__)("Author"),search_items:(0,b.__)("Search Authors"),not_found:(0,b.__)("No authors found."),all_items:(0,b.__)("All Authors")},hasGeneralTemplate:r,template:t})}),!r||n.user?.hasEntities)return i}(o);[...l,...u,p].forEach((e=>{if(!e)return;const t=a.findIndex((t=>t.slug===e.slug));t>-1?a[t]=e:a.push(e)})),a?.sort(((e,t)=>Gj.indexOf(e.slug)-Gj.indexOf(t.slug)));const h=[...a,...Sj(),...d,...c];return h}(i,(()=>s(Wj.customTemplate))),c=Lj(),{saveEntityRecord:u}=(0,l.useDispatch)(_.store),{createErrorNotice:p,createSuccessNotice:h}=(0,l.useDispatch)(w.store),f=(0,v.useViewportMatch)("medium","<"),m=(0,l.useSelect)((e=>e(_.store).getEntityRecord("root","__unstableBase")?.home),[]),g={"front-page":m,date:(0,b.sprintf)((0,b.__)("E.g. %s"),m+"/"+(new Date).getFullYear())};async function x(e,t=!0){if(!r){o(!0);try{const{title:s,description:n,slug:i}=e,r=await u("postType",je,{description:n,slug:i.toString(),status:"publish",title:s,is_wp_suggestion:t},{throwOnError:!0});c.push({postId:r.id,postType:je,canvas:"edit"}),h((0,b.sprintf)((0,b.__)('"%s" successfully created.'),(0,Jt.decodeEntities)(r.title?.rendered||s)),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("An error occurred while creating the template.");p(t,{type:"snackbar"})}finally{o(!1)}}}const S=()=>{e(),s(Wj.templatesList)};let j=(0,b.__)("Add template");return t===Wj.customTemplate?j=(0,b.sprintf)((0,b.__)("Add template: %s"),n.labels.singular_name):t===Wj.customGenericTemplate&&(j=(0,b.__)("Create custom template")),(0,oe.jsxs)(y.Modal,{title:j,className:Ut("edit-site-add-new-template__modal",{"edit-site-add-new-template__modal_template_list":t===Wj.templatesList,"edit-site-custom-template-modal":t===Wj.customTemplate}),onRequestClose:S,overlayClassName:t===Wj.customGenericTemplate?"edit-site-custom-generic-template__modal":void 0,children:[t===Wj.templatesList&&(0,oe.jsxs)(y.__experimentalGrid,{columns:f?2:3,gap:4,align:"flex-start",justify:"center",className:"edit-site-add-new-template__template-list__contents",children:[(0,oe.jsx)(y.Flex,{className:"edit-site-add-new-template__template-list__prompt",children:(0,b.__)("Select what the new template should apply to:")}),a.map((e=>{const{title:t,slug:s,onClick:n}=e;return(0,oe.jsx)(Uj,{title:t,direction:"column",className:"edit-site-add-new-template__template-button",description:g[s],icon:Hj[s]||Mo,onClick:()=>n?n(e):x(e)},s)})),(0,oe.jsx)(Uj,{title:(0,b.__)("Custom template"),direction:"row",className:"edit-site-add-new-template__custom-template-button",icon:z_,onClick:()=>s(Wj.customGenericTemplate),children:(0,oe.jsx)(y.__experimentalText,{lineHeight:1.53846153846,children:(0,b.__)("A custom template can be manually applied to any post or page.")})})]}),t===Wj.customTemplate&&(0,oe.jsx)(Nj,{onSelect:x,entityForSuggestions:n}),t===Wj.customGenericTemplate&&(0,oe.jsx)(zj,{onClose:S,createTemplate:x})]})}const Zj=(0,d.memo)((function(){const[e,t]=(0,d.useState)(!1),{postType:s}=(0,l.useSelect)((e=>{const{getPostType:t}=e(_.store);return{postType:t(je)}}),[]);return s?(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(y.Button,{variant:"primary",onClick:()=>t(!0),label:s.labels.add_new_item,__next40pxDefaultSize:!0,children:s.labels.add_new_item}),e&&(0,oe.jsx)(qj,{onClose:()=>t(!1)})]}):null})),{useGlobalStyle:Kj}=te(x.privateApis);const Yj={label:(0,b.__)("Preview"),id:"preview",render:function({item:e}){const t=lS(),[s="white"]=Kj("color.background"),n=(0,d.useMemo)((()=>(0,o.parse)(e.content.raw)),[e.content.raw]),{onClick:i}=Bo({postId:e.id,postType:e.type,canvas:"edit"}),r=!n?.length;return(0,oe.jsx)(h.EditorProvider,{post:e,settings:t,children:(0,oe.jsx)("div",{className:"page-templates-preview-field",style:{backgroundColor:s},children:(0,oe.jsxs)("button",{className:"page-templates-preview-field__button",type:"button",onClick:i,"aria-label":e.title?.rendered||e.title,children:[r&&(0,b.__)("Empty template"),!r&&(0,oe.jsx)(GS,{children:(0,oe.jsx)(x.BlockPreview,{blocks:n})})]})})})},enableSorting:!1};const Xj={label:(0,b.__)("Template"),id:"title",getValue:({item:e})=>e.title?.rendered,render:function({item:e}){const t={params:{postId:e.id,postType:e.type,canvas:"edit"}};return(0,oe.jsx)(Do,{...t,children:(0,Jt.decodeEntities)(e.title?.rendered)||(0,b.__)("(no title)")})},enableHiding:!1,enableGlobalSearch:!0},Jj={label:(0,b.__)("Description"),id:"description",render:({item:e})=>e.description&&(0,oe.jsx)("span",{className:"page-templates-description",children:(0,Jt.decodeEntities)(e.description)}),enableSorting:!1,enableGlobalSearch:!0};const Qj={label:(0,b.__)("Author"),id:"author",getValue:({item:e})=>e.author_text,render:function({item:e}){const[t,s]=(0,d.useState)(!1),{text:n,icon:i,imageUrl:r}=WS(e.type,e.id);return(0,oe.jsxs)(y.__experimentalHStack,{alignment:"left",spacing:0,children:[r&&(0,oe.jsx)("div",{className:Ut("page-templates-author-field__avatar",{"is-loaded":t}),children:(0,oe.jsx)("img",{onLoad:()=>s(!0),alt:"",src:r})}),!r&&(0,oe.jsx)("div",{className:"page-templates-author-field__icon",children:(0,oe.jsx)(y.Icon,{icon:i})}),(0,oe.jsx)("span",{className:"page-templates-author-field__name",children:n})]})}},{usePostActions:$j}=te(h.privateApis),{useHistory:eC,useLocation:tC}=te(Gt.privateApis),{useEntityRecordsWithPermissions:sC}=te(_.privateApis),nC=[],iC={[Re]:{fields:["template","author"],layout:{primaryField:"title",combinedFields:[{id:"template",label:(0,b.__)("Template"),children:["title","description"],direction:"vertical"}],styles:{template:{maxWidth:400,minWidth:320},preview:{width:"1%"},author:{width:"1%"}}}},[Fe]:{fields:["title","description","author"],layout:{mediaField:"preview",primaryField:"title",columnFields:["description"]}},[Be]:{fields:["title","description","author"],layout:{primaryField:"title",mediaField:"preview"}}},rC={type:Fe,search:"",page:1,perPage:20,sort:{field:"title",direction:"asc"},fields:iC[Fe].fields,layout:iC[Fe].layout,filters:[]};function oC(){const{params:e}=tC(),{activeView:t="all",layout:s,postId:n}=e,[i,r]=(0,d.useState)([n]),o=(0,d.useMemo)((()=>{const e=null!=s?s:rC.type;return{...rC,type:e,layout:iC[e].layout,fields:iC[e].fields,filters:"all"!==t?[{field:"author",operator:"isAny",value:[t]}]:[]}}),[s,t]),[a,l]=(0,d.useState)(o);(0,d.useEffect)((()=>{l((e=>({...e,filters:"all"!==t?[{field:"author",operator:De,value:[t]}]:[]})))}),[t]);const{records:c,isResolving:u}=sC("postType",je,{per_page:-1}),p=eC(),h=(0,d.useCallback)((t=>{r(t),a?.type===Be&&p.push({...e,postId:1===t.length?t[0]:void 0})}),[p,e,a?.type]),f=(0,d.useMemo)((()=>{if(!c)return nC;const e=new Set;return c.forEach((t=>{e.add(t.author_text)})),Array.from(e).map((e=>({value:e,label:e})))}),[c]),m=(0,d.useMemo)((()=>[Yj,Xj,Jj,{...Qj,elements:f}]),[f]),{data:g,paginationInfo:v}=(0,d.useMemo)((()=>lv(c,a,m)),[c,a,m]),x=$j({postType:je,context:"list"}),y=G_(),w=(0,d.useMemo)((()=>[y,...x]),[x,y]),_=(0,d.useCallback)((t=>{t.type!==a.type&&p.push({...e,layout:t.type}),l(t)}),[a.type,l,p,e]);return(0,oe.jsx)(I_,{className:"edit-site-page-templates",title:(0,b.__)("Templates"),actions:(0,oe.jsx)(Zj,{}),children:(0,oe.jsx)(C_,{paginationInfo:v,fields:m,actions:w,data:g,isLoading:u,view:a,onChangeView:_,onChangeSelection:h,selection:i,defaultLayouts:iC},t)})}function aC(e){return(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!1,...e,className:Ut("edit-site-sidebar-button",e.className)})}const{useHistory:lC,useLocation:cC}=te(Gt.privateApis);function uC({isRoot:e,title:t,actions:s,meta:n,content:i,footer:r,description:o,backPath:a}){const{dashboardLink:c,dashboardLinkText:u,previewingThemeName:p}=(0,l.useSelect)((e=>{const{getSettings:t}=te(e(zt)),s=$r();return{dashboardLink:t().__experimentalDashboardLink,dashboardLinkText:t().__experimentalDashboardLinkText,previewingThemeName:s?e(_.store).getTheme(s)?.name?.rendered:void 0}}),[]),h=cC(),f=lC(),{navigate:m}=(0,d.useContext)(rs),g=null!=a?a:h.state?.backPath,v=(0,b.isRTL)()?xa:va;return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsxs)(y.__experimentalVStack,{className:Ut("edit-site-sidebar-navigation-screen__main",{"has-footer":!!r}),spacing:0,justify:"flex-start",children:[(0,oe.jsxs)(y.__experimentalHStack,{spacing:3,alignment:"flex-start",className:"edit-site-sidebar-navigation-screen__title-icon",children:[!e&&(0,oe.jsx)(aC,{onClick:()=>{f.push(g),m("back")},icon:v,label:(0,b.__)("Back"),showTooltip:!1}),e&&(0,oe.jsx)(aC,{icon:v,label:u||(0,b.__)("Go to the Dashboard"),href:c||"index.php"}),(0,oe.jsx)(y.__experimentalHeading,{className:"edit-site-sidebar-navigation-screen__title",color:"#e0e0e0",level:1,size:20,children:Qr()?(0,b.sprintf)("Previewing %1$s: %2$s",p,t):t}),s&&(0,oe.jsx)("div",{className:"edit-site-sidebar-navigation-screen__actions",children:s})]}),n&&(0,oe.jsx)(oe.Fragment,{children:(0,oe.jsx)("div",{className:"edit-site-sidebar-navigation-screen__meta",children:n})}),(0,oe.jsxs)("div",{className:"edit-site-sidebar-navigation-screen__content",children:[o&&(0,oe.jsx)("p",{className:"edit-site-sidebar-navigation-screen__description",children:o}),i]})]}),r&&(0,oe.jsx)("footer",{className:"edit-site-sidebar-navigation-screen__footer",children:r})]})}const dC=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})}),pC=(0,oe.jsx)(Qt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oe.jsx)(Qt.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})}),{useHistory:hC}=te(Gt.privateApis);function fC({className:e,icon:t,withChevron:s=!1,suffix:n,uid:i,params:r,onClick:o,children:a,...l}){const c=hC(),{navigate:u}=(0,d.useContext)(rs);return(0,oe.jsx)(y.__experimentalItem,{className:Ut("edit-site-sidebar-navigation-item",{"with-suffix":!s&&n},e),onClick:function(e){o?(o(e),u("forward")):r&&(e.preventDefault(),c.push(r),u("forward",`[id="${i}"]`))},id:i,...l,children:(0,oe.jsxs)(y.__experimentalHStack,{justify:"flex-start",children:[t&&(0,oe.jsx)(Zo,{style:{fill:"currentcolor"},icon:t,size:24}),(0,oe.jsx)(y.FlexBlock,{children:a}),s&&(0,oe.jsx)(Zo,{icon:(0,b.isRTL)()?dC:pC,className:"edit-site-sidebar-navigation-item__drilldown-indicator",size:24}),!s&&n]})})}function mC({children:e}){return(0,oe.jsx)(y.__experimentalText,{className:"edit-site-sidebar-navigation-details-screen-panel__label",children:e})}function gC({label:e,children:t,className:s,...n}){return(0,oe.jsx)(y.__experimentalHStack,{spacing:5,alignment:"left",className:Ut("edit-site-sidebar-navigation-details-screen-panel__row",s),...n,children:t},e)}function vC({children:e}){return(0,oe.jsx)(y.__experimentalText,{className:"edit-site-sidebar-navigation-details-screen-panel__value",children:e})}function xC({record:e,...t}){var s,n;const i={},r=null!==(s=e?._links?.["predecessor-version"]?.[0]?.id)&&void 0!==s?s:null,o=null!==(n=e?._links?.["version-history"]?.[0]?.count)&&void 0!==n?n:0;return r&&o>1&&(i.href=(0,ts.addQueryArgs)("revision.php",{revision:e?._links["predecessor-version"][0].id}),i.as="a"),(0,oe.jsx)(y.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-details-footer",children:(0,oe.jsx)(fC,{"aria-label":(0,b.__)("Revisions"),...i,...t,children:(0,oe.jsxs)(gC,{justify:"space-between",children:[(0,oe.jsx)(mC,{children:(0,b.__)("Last modified")}),(0,oe.jsx)(vC,{children:(0,d.createInterpolateElement)((0,b.sprintf)((0,b.__)("<time>%s</time>"),(0,Wm.humanTimeDiff)(e.modified)),{time:(0,oe.jsx)("time",{dateTime:e.modified})})}),(0,oe.jsx)(y.Icon,{className:"edit-site-sidebar-navigation-screen-details-footer__icon",icon:jo})]})})})}function yC(e){const{openGeneralSidebar:t}=(0,l.useDispatch)(zt),{setCanvasMode:s}=te((0,l.useDispatch)(zt));return(0,l.useSelect)((e=>!!e(_.store).__experimentalGetCurrentThemeGlobalStylesVariations()?.length),[])?(0,oe.jsx)(fC,{...e,params:{path:"/wp_global_styles"},uid:"global-styles-navigation-item"}):(0,oe.jsx)(fC,{...e,onClick:()=>{s("edit"),t("edit-site/global-styles")}})}function bC({backPath:e}){const{revisions:t,isLoading:s}=Um(),{openGeneralSidebar:n}=(0,l.useDispatch)(zt),{setIsListViewOpened:i}=(0,l.useDispatch)(h.store),r=(0,v.useViewportMatch)("medium","<"),{setCanvasMode:o,setEditorCanvasContainerView:a}=te((0,l.useDispatch)(zt)),{isViewMode:c,isStyleBookOpened:u,revisionsCount:p}=(0,l.useSelect)((e=>{var t;const{getCanvasMode:s,getEditorCanvasContainerView:n}=te(e(zt)),{getEntityRecord:i,__experimentalGetCurrentGlobalStylesId:r}=e(_.store),o=r(),a=o?i("root","globalStyles",o):void 0;return{isViewMode:"view"===s(),isStyleBookOpened:"style-book"===n(),revisionsCount:null!==(t=a?._links?.["version-history"]?.[0]?.count)&&void 0!==t?t:0}}),[]),{set:m}=(0,l.useDispatch)(f.store),g=(0,d.useCallback)((async()=>Promise.all([m("core","distractionFree",!1),o("edit"),n("edit-site/global-styles")])),[o,n,m]),x=(0,d.useCallback)((async()=>{await g(),a("style-book"),i(!1)}),[g,a,i]),y=(0,d.useCallback)((async()=>{await g(),a("global-styles-revisions")}),[g,a]),w=p>0,S=t?.[0]?.modified,j=w&&!s&&S;return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(uC,{title:(0,b.__)("Styles"),description:(0,b.__)("Choose a different style combination for the theme styles."),backPath:e,content:(0,oe.jsx)(um,{}),footer:j&&(0,oe.jsx)(xC,{record:t?.[0],onClick:y}),actions:(0,oe.jsxs)(oe.Fragment,{children:[!r&&(0,oe.jsx)(aC,{icon:ma,label:(0,b.__)("Style Book"),onClick:()=>a(u?void 0:"style-book"),isPressed:u}),(0,oe.jsx)(aC,{icon:z_,label:(0,b.__)("Edit styles"),onClick:async()=>await g()})]})}),u&&!r&&c&&(0,oe.jsx)(Im,{enableResizing:!1,isSelected:()=>!1,onClick:x,onSelect:x,showCloseButton:!1,showTabs:!1})]})}const wC=(0,oe.jsx)(Qt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,oe.jsx)(Qt.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"})});function _C(){const{setEditorCanvasContainerView:e}=te((0,l.useDispatch)(zt));return(0,d.useEffect)((()=>{e(void 0)}),[e]),(0,oe.jsx)(uC,{isRoot:!0,title:(0,b.__)("Design"),description:(0,b.__)("Customize the appearance of your website using the block editor."),content:(0,oe.jsx)(oe.Fragment,{children:(0,oe.jsxs)(y.__experimentalItemGroup,{children:[(0,oe.jsx)(fC,{uid:"navigation-navigation-item",params:{postType:Se},withChevron:!0,icon:wC,children:(0,b.__)("Navigation")}),(0,oe.jsx)(yC,{uid:"styles-navigation-item",withChevron:!0,icon:yo,children:(0,b.__)("Styles")}),(0,oe.jsx)(fC,{uid:"page-navigation-item",params:{postType:"page"},withChevron:!0,icon:Vo,children:(0,b.__)("Pages")}),(0,oe.jsx)(fC,{uid:"template-navigation-item",params:{postType:je},withChevron:!0,icon:Mo,children:(0,b.__)("Templates")}),(0,oe.jsx)(fC,{uid:"patterns-navigation-item",params:{postType:Ie.user},withChevron:!0,icon:CS,children:(0,b.__)("Patterns")})]})})})}const SC={per_page:100,status:["publish","draft"],order:"desc",orderby:"date"},jC=e=>e?.trim()?.length>0;function CC({menuTitle:e,onClose:t,onSave:s}){const[n,i]=(0,d.useState)(e),r=n!==e&&jC(n);return(0,oe.jsx)(y.Modal,{title:(0,b.__)("Rename"),onRequestClose:t,focusOnMount:"firstContentElement",size:"small",children:(0,oe.jsx)("form",{className:"sidebar-navigation__rename-modal-form",children:(0,oe.jsxs)(y.__experimentalVStack,{spacing:"3",children:[(0,oe.jsx)(y.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:n,placeholder:(0,b.__)("Navigation title"),onChange:i,label:(0,b.__)("Name")}),(0,oe.jsxs)(y.__experimentalHStack,{justify:"right",children:[(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,b.__)("Cancel")}),(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,disabled:!r,variant:"primary",type:"submit",onClick:e=>{e.preventDefault(),r&&(s({title:n}),t())},children:(0,b.__)("Save")})]})]})})})}function kC({onClose:e,onConfirm:t}){return(0,oe.jsx)(y.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{t(),e()},onCancel:e,confirmButtonText:(0,b.__)("Delete"),size:"medium",children:(0,b.__)("Are you sure you want to delete this Navigation Menu?")})}const{useHistory:EC}=te(Gt.privateApis),PC={position:"bottom right"};function IC(e){const{onDelete:t,onSave:s,onDuplicate:n,menuTitle:i,menuId:r}=e,[o,a]=(0,d.useState)(!1),[l,c]=(0,d.useState)(!1),u=EC(),p=()=>{a(!1),c(!1)};return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(y.DropdownMenu,{className:"sidebar-navigation__more-menu",label:(0,b.__)("Actions"),icon:ga,popoverProps:PC,children:({onClose:e})=>(0,oe.jsx)("div",{children:(0,oe.jsxs)(y.MenuGroup,{children:[(0,oe.jsx)(y.MenuItem,{onClick:()=>{a(!0),e()},children:(0,b.__)("Rename")}),(0,oe.jsx)(y.MenuItem,{onClick:()=>{u.push({postId:r,postType:"wp_navigation",canvas:"edit"})},children:(0,b.__)("Edit")}),(0,oe.jsx)(y.MenuItem,{onClick:()=>{n(),e()},children:(0,b.__)("Duplicate")}),(0,oe.jsx)(y.MenuItem,{isDestructive:!0,onClick:()=>{c(!0),e()},children:(0,b.__)("Delete")})]})})}),l&&(0,oe.jsx)(kC,{onClose:p,onConfirm:t}),o&&(0,oe.jsx)(CC,{onClose:p,menuTitle:i,onSave:s})]})}const TC={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"},{useHistory:OC}=te(Gt.privateApis);function AC(e){const t=OC(),{block:s}=e,{clientId:n}=s,{moveBlocksDown:i,moveBlocksUp:r,removeBlocks:o}=(0,l.useDispatch)(x.store),a=(0,b.sprintf)((0,b.__)("Remove %s"),(0,x.BlockTitle)({clientId:n,maximumLength:25})),c=(0,b.sprintf)((0,b.__)("Go to %s"),(0,x.BlockTitle)({clientId:n,maximumLength:25})),u=(0,l.useSelect)((e=>{const{getBlockRootClientId:t}=e(x.store);return t(n)}),[n]),p=(0,d.useCallback)((e=>{const{attributes:s,name:n}=e;if("post-type"===s.kind&&s.id&&s.type&&t){const{params:e}=t.getLocationWithParams();t.push({postType:s.type,postId:s.id,canvas:"edit"},{backPath:e})}if("core/page-list-item"===n&&s.id&&t){const{params:e}=t.getLocationWithParams();t.push({postType:"page",postId:s.id,canvas:"edit"},{backPath:e})}}),[t]);return(0,oe.jsx)(y.DropdownMenu,{icon:ga,label:(0,b.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:TC,noIcons:!0,...e,children:({onClose:e})=>(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsxs)(y.MenuGroup,{children:[(0,oe.jsx)(y.MenuItem,{icon:a_,onClick:()=>{r([n],u),e()},children:(0,b.__)("Move up")}),(0,oe.jsx)(y.MenuItem,{icon:l_,onClick:()=>{i([n],u),e()},children:(0,b.__)("Move down")}),"page"===s.attributes?.type&&s.attributes?.id&&(0,oe.jsx)(y.MenuItem,{onClick:()=>{p(s),e()},children:c})]}),(0,oe.jsx)(y.MenuGroup,{children:(0,oe.jsx)(y.MenuItem,{onClick:()=>{o([n],!1),e()},children:a})})]})})}const{PrivateListView:NC}=te(x.privateApis),MC=["postType","page",{per_page:100,_fields:["id","link","menu_order","parent","title","type"],orderby:"menu_order",order:"asc"}];function VC({rootClientId:e}){const{listViewRootClientId:t,isLoading:s}=(0,l.useSelect)((t=>{const{areInnerBlocksControlled:s,getBlockName:n,getBlockCount:i,getBlockOrder:r}=t(x.store),{isResolving:o}=t(_.store),a=r(e),l=1===a.length&&"core/page-list"===n(a[0])&&i(a[0])>0,c=o("getEntityRecords",MC);return{listViewRootClientId:l?a[0]:e,isLoading:!s(e)||c}}),[e]),{replaceBlock:n,__unstableMarkNextChangeAsNotPersistent:i}=(0,l.useDispatch)(x.store),r=(0,d.useCallback)((e=>{"core/navigation-link"!==e.name||e.attributes.url||(i(),n(e.clientId,(0,o.createBlock)("core/navigation-link",e.attributes)))}),[i,n]);return(0,oe.jsxs)(oe.Fragment,{children:[!s&&(0,oe.jsx)(NC,{rootClientId:t,onSelect:r,blockSettingsMenu:AC,showAppender:!1}),(0,oe.jsx)("div",{className:"edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor",children:(0,oe.jsx)(x.BlockList,{})})]})}const FC=()=>{};function RC({navigationMenuId:e}){const{storedSettings:t}=(0,l.useSelect)((e=>{const{getSettings:t}=te(e(zt));return{storedSettings:t()}}),[]),s=(0,d.useMemo)((()=>e?[(0,o.createBlock)("core/navigation",{ref:e})]:[]),[e]);return e&&s?.length?(0,oe.jsx)(x.BlockEditorProvider,{settings:t,value:s,onChange:FC,onInput:FC,children:(0,oe.jsx)("div",{className:"edit-site-sidebar-navigation-screen-navigation-menus__content",children:(0,oe.jsx)(VC,{rootClientId:s[0].clientId})})}):null}function BC(e,t,s){return e?.rendered?"publish"===s?(0,Jt.decodeEntities)(e?.rendered):(0,b.sprintf)((0,b.__)("%1$s (%2$s)"),(0,Jt.decodeEntities)(e?.rendered),s):(0,b.sprintf)((0,b.__)("(no title %s)"),t)}function DC({navigationMenu:e,backPath:t,handleDelete:s,handleDuplicate:n,handleSave:i}){const r=e?.title?.rendered;return(0,oe.jsx)(JC,{actions:(0,oe.jsx)(oe.Fragment,{children:(0,oe.jsx)(IC,{menuId:e?.id,menuTitle:(0,Jt.decodeEntities)(r),onDelete:s,onSave:i,onDuplicate:n})}),backPath:t,title:BC(e?.title,e?.id,e?.status),description:(0,b.__)("Navigation Menus are a curated collection of blocks that allow visitors to get around your site."),children:(0,oe.jsx)(RC,{navigationMenuId:e?.id})})}const{useLocation:zC}=te(Gt.privateApis),LC="wp_navigation";function GC({backPath:e}){const{params:{postId:t}}=zC(),{record:s,isResolving:n}=(0,_.useEntityRecord)("postType",LC,t),{isSaving:i,isDeleting:r}=(0,l.useSelect)((e=>{const{isSavingEntityRecord:s,isDeletingEntityRecord:n}=e(_.store);return{isSaving:s("postType",LC,t),isDeleting:n("postType",LC,t)}}),[t]),o=n||i||r,a=s?.title?.rendered||s?.slug,{handleSave:c,handleDelete:u,handleDuplicate:d}=ZC(),p=()=>u(s),h=e=>c(s,e),f=()=>d(s);return o?(0,oe.jsx)(JC,{description:(0,b.__)("Navigation Menus are a curated collection of blocks that allow visitors to get around your site."),backPath:e,children:(0,oe.jsx)(y.Spinner,{className:"edit-site-sidebar-navigation-screen-navigation-menus__loading"})}):o||s?s?.content?.raw?(0,oe.jsx)(DC,{navigationMenu:s,backPath:e,handleDelete:p,handleSave:h,handleDuplicate:f}):(0,oe.jsx)(JC,{actions:(0,oe.jsx)(IC,{menuId:s?.id,menuTitle:(0,Jt.decodeEntities)(a),onDelete:p,onSave:h,onDuplicate:f}),backPath:e,title:BC(s?.title,s?.id,s?.status),description:(0,b.__)("This Navigation Menu is empty.")}):(0,oe.jsx)(JC,{description:(0,b.__)("Navigation Menu missing."),backPath:e})}const{useHistory:HC}=te(Gt.privateApis);function UC(){const{deleteEntityRecord:e}=(0,l.useDispatch)(_.store),{createSuccessNotice:t,createErrorNotice:s}=(0,l.useDispatch)(w.store),n=HC();return async i=>{const r=i?.id;try{await e("postType",LC,r,{force:!0},{throwOnError:!0}),t((0,b.__)("Navigation Menu successfully deleted."),{type:"snackbar"}),n.push({postType:"wp_navigation"})}catch(e){s((0,b.sprintf)((0,b.__)("Unable to delete Navigation Menu (%s)."),e?.message),{type:"snackbar"})}}}function WC(){const{getEditedEntityRecord:e}=(0,l.useSelect)((e=>{const{getEditedEntityRecord:t}=e(_.store);return{getEditedEntityRecord:t}}),[]),{editEntityRecord:t,__experimentalSaveSpecifiedEntityEdits:s}=(0,l.useDispatch)(_.store),{createSuccessNotice:n,createErrorNotice:i}=(0,l.useDispatch)(w.store);return async(r,o)=>{if(!o)return;const a=r?.id,l=e("postType",Se,a);t("postType",LC,a,o);const c=Object.keys(o);try{await s("postType",LC,a,c,{throwOnError:!0}),n((0,b.__)("Renamed Navigation Menu"),{type:"snackbar"})}catch(e){t("postType",LC,a,l),i((0,b.sprintf)((0,b.__)("Unable to rename Navigation Menu (%s)."),e?.message),{type:"snackbar"})}}}function qC(){const e=HC(),{saveEntityRecord:t}=(0,l.useDispatch)(_.store),{createSuccessNotice:s,createErrorNotice:n}=(0,l.useDispatch)(w.store);return async i=>{const r=i?.title?.rendered||i?.slug;try{const n=await t("postType",LC,{title:(0,b.sprintf)((0,b.__)("%s (Copy)"),r),content:i?.content?.raw,status:"publish"},{throwOnError:!0});n&&(s((0,b.__)("Duplicated Navigation Menu"),{type:"snackbar"}),e.push({postType:LC,postId:n.id}))}catch(e){n((0,b.sprintf)((0,b.__)("Unable to duplicate Navigation Menu (%s)."),e?.message),{type:"snackbar"})}}}function ZC(){return{handleDelete:UC(),handleSave:WC(),handleDuplicate:qC()}}function KC(e,t,s){return e?"publish"===s?(0,Jt.decodeEntities)(e):(0,b.sprintf)((0,b.__)("%1$s (%2$s)"),(0,Jt.decodeEntities)(e),s):(0,b.sprintf)((0,b.__)("(no title %s)"),t)}let YC=!1;function XC({backPath:e}){const{records:t,isResolving:s,hasResolved:n}=(0,_.useEntityRecords)("postType",Se,SC),i=s&&!n,{getNavigationFallbackId:r}=te((0,l.useSelect)(_.store)),o=t?.[0];o&&(YC=!0),o||s||!n||YC||r();const{handleSave:a,handleDelete:c,handleDuplicate:u}=ZC(),d=!!t?.length;return i?(0,oe.jsx)(JC,{backPath:e,children:(0,oe.jsx)(y.Spinner,{className:"edit-site-sidebar-navigation-screen-navigation-menus__loading"})}):i||d?1===t?.length?(0,oe.jsx)(DC,{navigationMenu:o,backPath:e,handleDelete:()=>c(o),handleDuplicate:()=>u(o),handleSave:e=>a(o,e)}):(0,oe.jsx)(JC,{backPath:e,children:(0,oe.jsx)(y.__experimentalItemGroup,{children:t?.map((({id:e,title:t,status:s},n)=>(0,oe.jsx)(QC,{postId:e,withChevron:!0,icon:wC,children:KC(t?.rendered,n+1,s)},e)))})}):(0,oe.jsx)(JC,{description:(0,b.__)("No Navigation Menus found."),backPath:e})}function JC({children:e,actions:t,title:s,description:n,backPath:i}){return(0,oe.jsx)(uC,{title:s||(0,b.__)("Navigation"),actions:t,description:n||(0,b.__)("Manage your Navigation Menus."),backPath:i,content:e})}const QC=({postId:e,...t})=>{const s=Bo({postId:e,postType:"wp_navigation"});return(0,oe.jsx)(fC,{...s,...t})},{useLocation:$C}=te(Gt.privateApis);function ek({title:e,slug:t,customViewId:s,type:n,icon:i,isActive:r,isCustom:o,suffix:a}){const{params:{postType:l}}=$C(),c=i||Qw.find((e=>e.type===n)).icon;let u=o?s:t;"all"===u&&(u=void 0);const d=Bo({postType:l,layout:n,activeView:u,isCustom:o?"true":void 0});return(0,oe.jsxs)(y.__experimentalHStack,{justify:"flex-start",className:Ut("edit-site-sidebar-dataviews-dataview-item",{"is-selected":r}),children:[(0,oe.jsx)(fC,{icon:c,...d,"aria-current":r?"true":void 0,children:e}),a]})}const tk=[];function sk({template:e,isActive:t}){const{text:s,icon:n}=WS(e.type,e.id);return(0,oe.jsx)(ek,{slug:s,title:s,icon:n,isActive:t,isCustom:!1},s)}function nk({activeView:e,title:t}){const{records:s}=(0,_.useEntityRecords)("postType",je,{per_page:-1}),n=(0,d.useMemo)((()=>{var e;const t=s?.reduce(((e,t)=>{const s=t.author_text;return s&&!e[s]&&(e[s]=t),e}),{});return null!==(e=t&&Object.values(t))&&void 0!==e?e:tk}),[s]);return(0,oe.jsxs)(y.__experimentalItemGroup,{children:[(0,oe.jsx)(ek,{slug:"all",title:t,icon:Mo,isActive:"all"===e,isCustom:!1}),n.map((t=>(0,oe.jsx)(sk,{template:t,isActive:e===t.author_text},t.author_text)))]})}const{useLocation:ik}=te(Gt.privateApis);function rk({backPath:e}){const{params:{activeView:t="all"}}=ik();return(0,oe.jsx)(uC,{title:(0,b.__)("Templates"),description:(0,b.__)("Create new templates, or reset any customizations made to the templates supplied by your theme."),backPath:e,content:(0,oe.jsx)(nk,{activeView:t,title:(0,b.__)("All templates")})})}const ok=(0,oe.jsx)(Qt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,oe.jsx)(Qt.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 ak({count:e,icon:t,id:s,isActive:n,label:i,type:r}){const o=Bo({categoryId:s!==Pe&&s!==Te?s:void 0,postType:r===Ce?Ce:Ie.user});if(e)return(0,oe.jsx)(fC,{...o,icon:t,suffix:(0,oe.jsx)("span",{children:e}),"aria-current":n?"true":void 0,children:i})}const lk=e=>{const t=e||[],s=(0,l.useSelect)((e=>e(h.store).__experimentalGetDefaultTemplatePartAreas()),[]),n={header:{},footer:{},sidebar:{},uncategorized:{}};s.forEach((e=>n[e.area]={...e,templateParts:[]}));return t.reduce(((e,t)=>(e[e[t.area]?t.area:Ee].templateParts.push(t),e)),n)};const{useLocation:ck}=te(Gt.privateApis);function uk({templatePartAreas:e,patternCategories:t,currentCategory:s,currentType:n}){const[i,...r]=t;return(0,oe.jsxs)(y.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group",children:[(0,oe.jsx)(ak,{count:Object.values(e).map((({templateParts:e})=>e?.length||0)).reduce(((e,t)=>e+t),0),icon:(0,h.getTemplatePartIcon)(),label:(0,b.__)("All template parts"),id:Pe,type:Ce,isActive:s===Pe&&n===Ce},"all"),Object.entries(e).map((([e,{label:t,templateParts:i}])=>(0,oe.jsx)(ak,{count:i?.length,icon:(0,h.getTemplatePartIcon)(e),label:t,id:e,type:Ce,isActive:s===e&&n===Ce},e))),(0,oe.jsx)("div",{className:"edit-site-sidebar-navigation-screen-patterns__divider"}),i&&(0,oe.jsx)(ak,{count:i.count,label:i.label,icon:ok,id:i.name,type:Ie.user,isActive:s===`${i.name}`&&n===Ie.user},i.name),r.map((e=>(0,oe.jsx)(ak,{count:e.count,label:e.label,icon:ok,id:e.name,type:Ie.user,isActive:s===`${e.name}`&&n===Ie.user},e.name)))]})}function dk({backPath:e}){const{params:{postType:t,categoryId:s}}=ck(),n=t||Ie.user,i=s||(n===Ie.user?Te:Pe),{templatePartAreas:r,hasTemplateParts:o,isLoading:a}=function(){const{records:e,isResolving:t}=(0,_.useEntityRecords)("postType",Ce,{per_page:-1});return{hasTemplateParts:!!e&&!!e.length,isLoading:t,templatePartAreas:lk(e)}}(),{patternCategories:c,hasPatterns:u}=NS(),d=(0,l.useSelect)((e=>e(_.store).getCurrentTheme()?.is_block_theme),[]);return(0,oe.jsx)(uC,{isRoot:!d,title:(0,b.__)("Patterns"),description:(0,b.__)("Manage what patterns are available when editing the site."),backPath:e,content:(0,oe.jsxs)(oe.Fragment,{children:[a&&(0,b.__)("Loading items…"),!a&&(0,oe.jsxs)(oe.Fragment,{children:[!o&&!u&&(0,oe.jsx)(y.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group",children:(0,oe.jsx)(y.__experimentalItem,{children:(0,b.__)("No items found")})}),(0,oe.jsx)(uk,{templatePartAreas:r,patternCategories:c,currentCategory:i,currentType:n})]})]})})}const{useHistory:pk}=te(Gt.privateApis);function hk({type:e,setIsAdding:t}){const s=pk(),{saveEntityRecord:n}=(0,l.useDispatch)(_.store),[i,r]=(0,d.useState)(""),[o,a]=(0,d.useState)(!1),c=B_({postType:e});return(0,oe.jsx)("form",{onSubmit:async r=>{r.preventDefault(),a(!0);const{getEntityRecords:o}=(0,l.resolveSelect)(_.store);let u;const d=await o("taxonomy","wp_dataviews_type",{slug:e});if(d&&d.length>0)u=d[0].id;else{const t=await n("taxonomy","wp_dataviews_type",{name:e});t&&t.id&&(u=t.id)}const p=await n("postType","wp_dataviews",{title:i,status:"publish",wp_dataviews_type:u,content:JSON.stringify(c[0].view)}),{params:{postType:h}}=s.getLocationWithParams();s.push({postType:h,activeView:p.id,isCustom:"true"}),a(!1),t(!1)},children:(0,oe.jsxs)(y.__experimentalVStack,{spacing:"5",children:[(0,oe.jsx)(y.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,b.__)("Name"),value:i,onChange:r,placeholder:(0,b.__)("My view"),className:"patterns-create-modal__name-input"}),(0,oe.jsxs)(y.__experimentalHStack,{justify:"right",children:[(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!1,variant:"tertiary",onClick:()=>{t(!1)},children:(0,b.__)("Cancel")}),(0,oe.jsx)(y.Button,{__next40pxDefaultSize:!1,variant:"primary",type:"submit","aria-disabled":!i||o,isBusy:o,children:(0,b.__)("Create")})]})]})})}function fk({type:e}){const[t,s]=(0,d.useState)(!1);return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(fC,{icon:Yh,onClick:()=>{s(!0)},className:"dataviews__siderbar-content-add-new-item",children:(0,b.__)("New view")}),t&&(0,oe.jsx)(y.Modal,{title:(0,b.__)("Add new view"),onRequestClose:()=>{s(!1)},children:(0,oe.jsx)(hk,{type:e,setIsAdding:s})})]})}const{useHistory:mk}=te(Gt.privateApis),gk=[];function vk({dataviewId:e,currentTitle:t,setIsRenaming:s}){const{editEntityRecord:n}=(0,l.useDispatch)(_.store),[i,r]=(0,d.useState)(t);return(0,oe.jsx)("form",{onSubmit:async t=>{t.preventDefault(),await n("postType","wp_dataviews",e,{title:i}),s(!1)},children:(0,oe.jsxs)(y.__experimentalVStack,{spacing:"5",children:[(0,oe.jsx)(y.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,b.__)("Name"),value:i,onChange:r,placeholder:(0,b.__)("My view"),className:"patterns-create-modal__name-input"}),(0,oe.jsxs)(y.__experimentalHStack,{justify:"right",children:[(0,oe.jsx)(y.Button,{variant:"tertiary",__next40pxDefaultSize:!0,onClick:()=>{s(!1)},children:(0,b.__)("Cancel")}),(0,oe.jsx)(y.Button,{variant:"primary",type:"submit","aria-disabled":!i,__next40pxDefaultSize:!0,children:(0,b.__)("Save")})]})]})})}function xk({dataviewId:e,isActive:t}){const s=mk(),{dataview:n}=(0,l.useSelect)((t=>{const{getEditedEntityRecord:s}=t(_.store);return{dataview:s("postType","wp_dataviews",e)}}),[e]),{deleteEntityRecord:i}=(0,l.useDispatch)(_.store),r=(0,d.useMemo)((()=>JSON.parse(n.content).type),[n.content]),[o,a]=(0,d.useState)(!1);return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(ek,{title:n.title,type:r,isActive:t,isCustom:!0,customViewId:e,suffix:(0,oe.jsx)(y.DropdownMenu,{icon:ga,label:(0,b.__)("Actions"),className:"edit-site-sidebar-dataviews-dataview-item__dropdown-menu",toggleProps:{style:{color:"inherit"},size:"small"},children:({onClose:e})=>(0,oe.jsxs)(y.MenuGroup,{children:[(0,oe.jsx)(y.MenuItem,{onClick:()=>{a(!0),e()},children:(0,b.__)("Rename")}),(0,oe.jsx)(y.MenuItem,{onClick:async()=>{if(await i("postType","wp_dataviews",n.id,{force:!0}),t){const{params:{postType:e}}=s.getLocationWithParams();s.replace({postType:e})}e()},isDestructive:!0,children:(0,b.__)("Delete")})]})})}),o&&(0,oe.jsx)(y.Modal,{title:(0,b.__)("Rename"),onRequestClose:()=>{a(!1)},focusOnMount:"firstContentElement",size:"small",children:(0,oe.jsx)(vk,{dataviewId:e,setIsRenaming:a,currentTitle:n.title})})]})}function yk({type:e,activeView:t,isCustom:s}){const n=function(e){return(0,l.useSelect)((t=>{const{getEntityRecords:s}=t(_.store),n=s("taxonomy","wp_dataviews_type",{slug:e});if(!n||0===n.length)return gk;return s("postType","wp_dataviews",{wp_dataviews_type:n[0].id,orderby:"date",order:"asc"})||gk}))}(e);return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)("div",{className:"edit-site-sidebar-navigation-screen-dataviews__group-header",children:(0,oe.jsx)(y.__experimentalHeading,{level:2,children:(0,b.__)("Custom Views")})}),(0,oe.jsxs)(y.__experimentalItemGroup,{children:[n.map((e=>(0,oe.jsx)(xk,{dataviewId:e.id,isActive:s&&Number(t)===e.id},e.id))),(0,oe.jsx)(fk,{type:e})]})]})}const{useLocation:bk}=te(Gt.privateApis);function wk(){const{params:{postType:e,activeView:t="all",isCustom:s="false"}}=bk(),n=B_({postType:e});if(!e)return null;const i="true"===s;return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(y.__experimentalItemGroup,{children:n.map((e=>(0,oe.jsx)(ek,{slug:e.slug,title:e.title,icon:e.icon,type:e.view.type,isActive:!i&&e.slug===t,isCustom:!1},e.slug)))}),window?.__experimentalCustomViews&&(0,oe.jsx)(yk,{activeView:t,type:e,isCustom:!0})]})}function _k({title:e,onClose:t}){return(0,oe.jsx)(y.__experimentalVStack,{className:"dataforms-layouts-panel__dropdown-header",spacing:4,children:(0,oe.jsxs)(y.__experimentalHStack,{alignment:"center",children:[(0,oe.jsx)(y.__experimentalHeading,{level:2,size:13,children:e}),(0,oe.jsx)(y.__experimentalSpacer,{}),t&&(0,oe.jsx)(y.Button,{label:(0,b.__)("Close"),icon:pm,onClick:t,size:"small"})]})})}function Sk({data:e,field:t,onChange:s}){const[n,i]=(0,d.useState)(null),r=(0,d.useMemo)((()=>({anchor:n,placement:"left-start",offset:36,shift:!0})),[n]);return(0,oe.jsxs)(y.__experimentalHStack,{ref:i,className:"dataforms-layouts-panel__field",children:[(0,oe.jsx)("div",{className:"dataforms-layouts-panel__field-label",children:t.label}),(0,oe.jsx)("div",{children:(0,oe.jsx)(y.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:r,focusOnMount:!0,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},renderToggle:({isOpen:s,onToggle:n})=>(0,oe.jsx)(y.Button,{className:"dataforms-layouts-panel__field-control",size:"compact",variant:"tertiary","aria-expanded":s,"aria-label":(0,b.sprintf)((0,b.__)("Edit %s"),t.label),onClick:n,children:(0,oe.jsx)(t.render,{item:e})}),renderContent:({onClose:n})=>(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(_k,{title:t.label,onClose:n}),(0,oe.jsx)(t.Edit,{data:e,field:t,onChange:s,hideLabelFromVision:!0},t.id)]})})})]})}const jk=[{type:"regular",component:function({data:e,fields:t,form:s,onChange:n}){const i=(0,d.useMemo)((()=>{var e;return rv((null!==(e=s.fields)&&void 0!==e?e:[]).map((e=>t.find((({id:t})=>t===e)))).filter((e=>!!e)))}),[t,s.fields]);return(0,oe.jsx)(y.__experimentalVStack,{spacing:4,children:i.map((t=>(0,oe.jsx)(t.Edit,{data:e,field:t,onChange:n},t.id)))})}},{type:"panel",component:function({data:e,fields:t,form:s,onChange:n}){const i=(0,d.useMemo)((()=>{var e;return rv((null!==(e=s.fields)&&void 0!==e?e:[]).map((e=>t.find((({id:t})=>t===e)))).filter((e=>!!e)))}),[t,s.fields]);return(0,oe.jsx)(y.__experimentalVStack,{spacing:2,children:i.map((t=>(0,oe.jsx)(Sk,{data:e,field:t,onChange:n},t.id)))})}}];function Ck({form:e,...t}){var s;const n=(i=null!==(s=e.type)&&void 0!==s?s:"regular",jk.find((e=>e.type===i)));var i;return n?(0,oe.jsx)(n.component,{form:e,...t}):null}const{PostCardPanel:kk}=te(h.privateApis);function Ek({postType:e,postId:t}){const s=(0,d.useMemo)((()=>t.split(",")),[t]),{record:n}=(0,l.useSelect)((t=>({record:1===s.length?t(_.store).getEditedEntityRecord("postType",e,s[0]):null})),[e,s]),[i,r]=(0,d.useState)({}),{editEntityRecord:o}=(0,l.useDispatch)(_.store),{fields:a}=X_(),c=(0,d.useMemo)((()=>a?.map((e=>"status"===e.id?{...e,elements:e.elements.filter((e=>"trash"!==e.value))}:e))),[a]);return(0,d.useEffect)((()=>{r({})}),[s]),(0,oe.jsxs)(y.__experimentalVStack,{spacing:4,children:[1===s.length&&(0,oe.jsx)(kk,{postType:e,postId:s[0]}),(0,oe.jsx)(Ck,{data:1===s.length?n:i,fields:c,form:{type:"panel",fields:["title","status","date","author","comment_status"]},onChange:t=>{for(const i of s)"future"!==t.status&&"future"===n.status&&new Date(n.date)>new Date&&(t.date=null),"private"===t.status&&n.password&&(t.password=""),o("postType",e,i,t),s.length>1&&r((e=>({...e,...t})))}})]})}function Pk({postType:e,postId:t}){return(0,oe.jsxs)(I_,{className:Ut("edit-site-post-edit",{"is-empty":!t}),label:(0,b.__)("Post Edit"),children:[t&&(0,oe.jsx)(Ek,{postType:e,postId:t}),!t&&(0,oe.jsx)("p",{children:(0,b.__)("Select a page to edit")})]})}const{useLocation:Ik,useHistory:Tk}=te(Gt.privateApis);function Ok(){const{params:e}=Ik(),{postType:t,postId:s,path:n,layout:i,isCustom:r,canvas:o,quickEdit:a}=e,l="edit"===o;if(function(){const e=Tk(),{params:t}=Ik();(0,d.useEffect)((()=>{const{postType:s,path:n,categoryType:i,...r}=t;"/wp_template_part/all"===n&&e.replace({postType:Ce}),"/page"===n&&e.replace({postType:"page",...r}),"/wp_template"===n&&e.replace({postType:je,...r}),"/patterns"===n&&e.replace({postType:i===Ce?Ce:Ie.user,...r}),"/navigation"===n&&e.replace({postType:Se,...r})}),[e,t])}(),"page"===t){const e="list"===i||!i,n=a&&!e;return{key:"pages",areas:{sidebar:(0,oe.jsx)(uC,{title:(0,b.__)("Pages"),backPath:{},content:(0,oe.jsx)(wk,{})}),content:(0,oe.jsx)(oS,{postType:t}),preview:!n&&(e||l)&&(0,oe.jsx)(Ng,{}),mobile:l?(0,oe.jsx)(Ng,{}):(0,oe.jsx)(oS,{postType:t}),edit:n&&(0,oe.jsx)(Pk,{postType:t,postId:s})},widths:{content:e?380:void 0,edit:n?380:void 0}}}if(t===je){const e="true"!==r&&"list"===i;return{key:"templates",areas:{sidebar:(0,oe.jsx)(rk,{backPath:{}}),content:(0,oe.jsx)(oC,{}),preview:(e||l)&&(0,oe.jsx)(Ng,{}),mobile:l?(0,oe.jsx)(Ng,{}):(0,oe.jsx)(oC,{})},widths:{content:e?380:void 0}}}return[Ce,Ie.user].includes(t)?{key:"patterns",areas:{sidebar:(0,oe.jsx)(dk,{backPath:{}}),content:(0,oe.jsx)(rj,{}),mobile:l?(0,oe.jsx)(Ng,{}):(0,oe.jsx)(rj,{}),preview:l&&(0,oe.jsx)(Ng,{})}}:"/wp_global_styles"===n?{key:"styles",areas:{sidebar:(0,oe.jsx)(bC,{backPath:{}}),preview:(0,oe.jsx)(Ng,{}),mobile:l&&(0,oe.jsx)(Ng,{})}}:t===Se?s?{key:"navigation",areas:{sidebar:(0,oe.jsx)(GC,{backPath:{postType:Se}}),preview:(0,oe.jsx)(Ng,{}),mobile:l&&(0,oe.jsx)(Ng,{})}}:{key:"navigation",areas:{sidebar:(0,oe.jsx)(XC,{backPath:{}}),preview:(0,oe.jsx)(Ng,{}),mobile:l&&(0,oe.jsx)(Ng,{})}}:{key:"default",areas:{sidebar:(0,oe.jsx)(_C,{}),preview:(0,oe.jsx)(Ng,{}),mobile:l&&(0,oe.jsx)(Ng,{})}}}const{useCommandContext:Ak}=te(qt.privateApis);const{RouterProvider:Nk}=te(Gt.privateApis),{GlobalStylesProvider:Mk}=te(h.privateApis);function Vk(){qo(),(0,qt.useCommandLoader)({name:"core/edit-site/page-content-focus",hook:Lo,context:"entity-edit"}),(0,qt.useCommandLoader)({name:"core/edit-site/manipulate-document",hook:Go}),function(){const e=(0,l.useSelect)((e=>e(_.store).getEntityRecord("root","__unstableBase")?.home),[]);(0,qt.useCommand)({name:"core/edit-site/view-site",label:(0,b.__)("View site"),callback:({close:t})=>{t(),window.open(e,"_blank")},icon:Co}),(0,qt.useCommandLoader)({name:"core/edit-site/open-styles",hook:Io}),(0,qt.useCommandLoader)({name:"core/edit-site/toggle-styles-welcome-guide",hook:To}),(0,qt.useCommandLoader)({name:"core/edit-site/reset-global-styles",hook:Oo}),(0,qt.useCommandLoader)({name:"core/edit-site/open-styles-css",hook:Ao}),(0,qt.useCommandLoader)({name:"core/edit-site/open-styles-revisions",hook:No})}(),function(){const{hasBlockSelected:e,canvasMode:t}=(0,l.useSelect)((e=>{const{getCanvasMode:t}=te(e(zt)),{getBlockSelectionStart:s}=e(x.store);return{canvasMode:t(),hasBlockSelected:s()}}),[]);let s="site-editor";"edit"===t&&(s="entity-edit"),e&&(s="block-selection-edit"),gm()&&(s=""),Ak(s)}();const e=Ok();return(0,oe.jsx)(xo,{route:e})}function Fk(){const{createErrorNotice:e}=(0,l.useDispatch)(w.store);return(0,oe.jsx)(y.SlotFillProvider,{children:(0,oe.jsxs)(Mk,{children:[(0,oe.jsx)(h.UnsavedChangesWarning,{}),(0,oe.jsxs)(Nk,{children:[(0,oe.jsx)(Vk,{}),(0,oe.jsx)(Lt.PluginArea,{onError:function(t){e((0,b.sprintf)((0,b.__)('The "%s" plugin has encountered an error and cannot be rendered.'),t))}})]})]})})}const Rk=(0,ts.getPath)(window.location.href)?.includes("site-editor.php"),Bk=e=>{u()(`wp.editPost.${e}`,{since:"6.6",alternative:`wp.editor.${e}`})};function Dk(e){return Rk?(Bk("PluginMoreMenuItem"),(0,oe.jsx)(h.PluginMoreMenuItem,{...e})):null}function zk(e){return Rk?(Bk("PluginSidebar"),(0,oe.jsx)(h.PluginSidebar,{...e})):null}function Lk(e){return Rk?(Bk("PluginSidebarMoreMenuItem"),(0,oe.jsx)(h.PluginSidebarMoreMenuItem,{...e})):null}const{useLocation:Gk}=te(Gt.privateApis);const{RouterProvider:Hk}=te(Gt.privateApis),{GlobalStylesProvider:Uk}=te(h.privateApis);function Wk(e,t){}const{registerCoreBlockBindingsSources:qk,bootstrapBlockBindingsSourcesFromServer:Zk}=te(h.privateApis);function Kk(e,t){const s=document.getElementById(e),n=(0,d.createRoot)(s);(0,l.dispatch)(o.store).reapplyBlockTypeFilters();const i=(0,a.__experimentalGetCoreBlocks)().filter((({name:e})=>"core/freeform"!==e));return(0,a.registerCoreBlocks)(i),Zk(t?.blockBindingsSources),qk(),(0,l.dispatch)(o.store).setFreeformFallbackBlockName("core/html"),(0,m.registerLegacyWidgetBlock)({inserter:!1}),(0,m.registerWidgetGroupBlock)({inserter:!1}),(0,l.dispatch)(f.store).setDefaults("core/edit-site",{welcomeGuide:!0,welcomeGuideStyles:!0,welcomeGuidePage:!0,welcomeGuideTemplate:!0}),(0,l.dispatch)(f.store).setDefaults("core",{allowRightClickOverrides:!0,distractionFree:!1,editorMode:"visual",fixedToolbar:!1,focusMode:!1,inactivePanels:[],keepCaretInsideBlock:!1,openPanels:["post-status"],showBlockBreadcrumbs:!0,showListViewByDefault:!1,enableChoosePatternModal:!0}),window.__experimentalMediaProcessing&&(0,l.dispatch)(f.store).setDefaults("core/media",{requireApproval:!0,optimizeOnUpload:!0}),(0,l.dispatch)(zt).updateSettings(t),(0,l.dispatch)(h.store).updateEditorSettings({defaultTemplateTypes:t.defaultTemplateTypes,defaultTemplatePartAreas:t.defaultTemplatePartAreas}),window.addEventListener("dragover",(e=>e.preventDefault()),!1),window.addEventListener("drop",(e=>e.preventDefault()),!1),n.render((0,oe.jsx)(d.StrictMode,{children:(0,oe.jsx)(Fk,{})})),n}function Yk(){u()("wp.editSite.reinitializeEditor",{since:"6.2",version:"6.3"})}})(),(window.wp=window.wp||{}).editSite=r})();