@payloadcms/ui 3.66.0-canary.7 → 3.66.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,7 @@ function require(m) {
10
10
  }
11
11
  // Workaround end
12
12
 
13
- import{a as or,b as Wg,c as z,d as Z5,e as Hg,f as It,g as Y5,h as J5,i as Ug,j as q5,k as Xg,l as Q5}from"./chunk-PXD7OIXB.js";import{a as bt,b as Tc,c as zg,d as E,e as Ma,f as _x,g as Tx,h as Ti,i as _m,j as X5,k as Fx,l as K5,m as eE,n as tE}from"./chunk-AZDI6MW4.js";import{c as en,d as Ix,e as _i}from"./chunk-5LKBKI4T.js";var jx=en(_t=>{"use strict";function qg(t,e){var o=t.length;t.push(e);e:for(;0<o;){var n=o-1>>>1,r=t[n];if(0<Tm(r,e))t[n]=e,t[o]=r,o=n;else break e}}function tn(t){return t.length===0?null:t[0]}function Dm(t){if(t.length===0)return null;var e=t[0],o=t.pop();if(o!==e){t[0]=o;e:for(var n=0,r=t.length,s=r>>>1;n<s;){var i=2*(n+1)-1,l=t[i],a=i+1,c=t[a];if(0>Tm(l,o))a<r&&0>Tm(c,l)?(t[n]=c,t[a]=o,n=a):(t[n]=l,t[i]=o,n=i);else if(a<r&&0>Tm(c,o))t[n]=c,t[a]=o,n=a;else break e}}return e}function Tm(t,e){var o=t.sortIndex-e.sortIndex;return o!==0?o:t.id-e.id}_t.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(Dx=performance,_t.unstable_now=function(){return Dx.now()}):(Zg=Date,Rx=Zg.now(),_t.unstable_now=function(){return Zg.now()-Rx});var Dx,Zg,Rx,Rn=[],Gs=[],oE=1,Lr=null,Lo=3,Rm=!1,Fi=!1,Dc=!1,Ex=typeof setTimeout=="function"?setTimeout:null,Nx=typeof clearTimeout=="function"?clearTimeout:null,Ax=typeof setImmediate<"u"?setImmediate:null;function Fm(t){for(var e=tn(Gs);e!==null;){if(e.callback===null)Dm(Gs);else if(e.startTime<=t)Dm(Gs),e.sortIndex=e.expirationTime,qg(Rn,e);else break;e=tn(Gs)}}function Qg(t){if(Dc=!1,Fm(t),!Fi)if(tn(Rn)!==null)Fi=!0,Kg();else{var e=tn(Gs);e!==null&&eb(Qg,e.startTime-t)}}var Am=!1,Rc=-1,Lx=5,$x=-1;function kx(){return!(_t.unstable_now()-$x<Lx)}function Yg(){if(Am){var t=_t.unstable_now();$x=t;var e=!0;try{e:{Fi=!1,Dc&&(Dc=!1,Nx(Rc),Rc=-1),Rm=!0;var o=Lo;try{t:{for(Fm(t),Lr=tn(Rn);Lr!==null&&!(Lr.expirationTime>t&&kx());){var n=Lr.callback;if(typeof n=="function"){Lr.callback=null,Lo=Lr.priorityLevel;var r=n(Lr.expirationTime<=t);if(t=_t.unstable_now(),typeof r=="function"){Lr.callback=r,Fm(t),e=!0;break t}Lr===tn(Rn)&&Dm(Rn),Fm(t)}else Dm(Rn);Lr=tn(Rn)}if(Lr!==null)e=!0;else{var s=tn(Gs);s!==null&&eb(Qg,s.startTime-t),e=!1}}break e}finally{Lr=null,Lo=o,Rm=!1}e=void 0}}finally{e?Fc():Am=!1}}}var Fc;typeof Ax=="function"?Fc=function(){Ax(Yg)}:typeof MessageChannel<"u"?(Jg=new MessageChannel,Px=Jg.port2,Jg.port1.onmessage=Yg,Fc=function(){Px.postMessage(null)}):Fc=function(){Ex(Yg,0)};var Jg,Px;function Kg(){Am||(Am=!0,Fc())}function eb(t,e){Rc=Ex(function(){t(_t.unstable_now())},e)}_t.unstable_IdlePriority=5;_t.unstable_ImmediatePriority=1;_t.unstable_LowPriority=4;_t.unstable_NormalPriority=3;_t.unstable_Profiling=null;_t.unstable_UserBlockingPriority=2;_t.unstable_cancelCallback=function(t){t.callback=null};_t.unstable_continueExecution=function(){Fi||Rm||(Fi=!0,Kg())};_t.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Lx=0<t?Math.floor(1e3/t):5};_t.unstable_getCurrentPriorityLevel=function(){return Lo};_t.unstable_getFirstCallbackNode=function(){return tn(Rn)};_t.unstable_next=function(t){switch(Lo){case 1:case 2:case 3:var e=3;break;default:e=Lo}var o=Lo;Lo=e;try{return t()}finally{Lo=o}};_t.unstable_pauseExecution=function(){};_t.unstable_requestPaint=function(){};_t.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var o=Lo;Lo=t;try{return e()}finally{Lo=o}};_t.unstable_scheduleCallback=function(t,e,o){var n=_t.unstable_now();switch(typeof o=="object"&&o!==null?(o=o.delay,o=typeof o=="number"&&0<o?n+o:n):o=n,t){case 1:var r=-1;break;case 2:r=250;break;case 5:r=1073741823;break;case 4:r=1e4;break;default:r=5e3}return r=o+r,t={id:oE++,callback:e,priorityLevel:t,startTime:o,expirationTime:r,sortIndex:-1},o>n?(t.sortIndex=o,qg(Gs,t),tn(Rn)===null&&t===tn(Gs)&&(Dc?(Nx(Rc),Rc=-1):Dc=!0,eb(Qg,o-n))):(t.sortIndex=r,qg(Rn,t),Fi||Rm||(Fi=!0,Kg())),t};_t.unstable_shouldYield=kx;_t.unstable_wrapCallback=function(t){var e=Lo;return function(){var o=Lo;Lo=e;try{return t.apply(this,arguments)}finally{Lo=o}}}});var Mx=en((Xee,Bx)=>{"use strict";Bx.exports=jx()});var WS=en(yt=>{"use strict";var xo=typeof Symbol=="function"&&Symbol.for,N1=xo?Symbol.for("react.element"):60103,L1=xo?Symbol.for("react.portal"):60106,Hf=xo?Symbol.for("react.fragment"):60107,Uf=xo?Symbol.for("react.strict_mode"):60108,Xf=xo?Symbol.for("react.profiler"):60114,Zf=xo?Symbol.for("react.provider"):60109,Yf=xo?Symbol.for("react.context"):60110,$1=xo?Symbol.for("react.async_mode"):60111,Jf=xo?Symbol.for("react.concurrent_mode"):60111,qf=xo?Symbol.for("react.forward_ref"):60112,Qf=xo?Symbol.for("react.suspense"):60113,ij=xo?Symbol.for("react.suspense_list"):60120,Kf=xo?Symbol.for("react.memo"):60115,ep=xo?Symbol.for("react.lazy"):60116,aj=xo?Symbol.for("react.block"):60121,lj=xo?Symbol.for("react.fundamental"):60117,cj=xo?Symbol.for("react.responder"):60118,uj=xo?Symbol.for("react.scope"):60119;function wr(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case N1:switch(t=t.type,t){case $1:case Jf:case Hf:case Xf:case Uf:case Qf:return t;default:switch(t=t&&t.$$typeof,t){case Yf:case qf:case ep:case Kf:case Zf:return t;default:return e}}case L1:return e}}}function zS(t){return wr(t)===Jf}yt.AsyncMode=$1;yt.ConcurrentMode=Jf;yt.ContextConsumer=Yf;yt.ContextProvider=Zf;yt.Element=N1;yt.ForwardRef=qf;yt.Fragment=Hf;yt.Lazy=ep;yt.Memo=Kf;yt.Portal=L1;yt.Profiler=Xf;yt.StrictMode=Uf;yt.Suspense=Qf;yt.isAsyncMode=function(t){return zS(t)||wr(t)===$1};yt.isConcurrentMode=zS;yt.isContextConsumer=function(t){return wr(t)===Yf};yt.isContextProvider=function(t){return wr(t)===Zf};yt.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===N1};yt.isForwardRef=function(t){return wr(t)===qf};yt.isFragment=function(t){return wr(t)===Hf};yt.isLazy=function(t){return wr(t)===ep};yt.isMemo=function(t){return wr(t)===Kf};yt.isPortal=function(t){return wr(t)===L1};yt.isProfiler=function(t){return wr(t)===Xf};yt.isStrictMode=function(t){return wr(t)===Uf};yt.isSuspense=function(t){return wr(t)===Qf};yt.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Hf||t===Jf||t===Xf||t===Uf||t===Qf||t===ij||typeof t=="object"&&t!==null&&(t.$$typeof===ep||t.$$typeof===Kf||t.$$typeof===Zf||t.$$typeof===Yf||t.$$typeof===qf||t.$$typeof===lj||t.$$typeof===cj||t.$$typeof===uj||t.$$typeof===aj)};yt.typeOf=wr});var US=en((jbe,HS)=>{"use strict";HS.exports=WS()});var KS=en((Bbe,QS)=>{"use strict";var k1=US(),dj={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},mj={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},fj={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},JS={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},j1={};j1[k1.ForwardRef]=fj;j1[k1.Memo]=JS;function XS(t){return k1.isMemo(t)?JS:j1[t.$$typeof]||dj}var pj=Object.defineProperty,hj=Object.getOwnPropertyNames,ZS=Object.getOwnPropertySymbols,gj=Object.getOwnPropertyDescriptor,bj=Object.getPrototypeOf,YS=Object.prototype;function qS(t,e,o){if(typeof e!="string"){if(YS){var n=bj(e);n&&n!==YS&&qS(t,n,o)}var r=hj(e);ZS&&(r=r.concat(ZS(e)));for(var s=XS(t),i=XS(e),l=0;l<r.length;++l){var a=r[l];if(!mj[a]&&!(o&&o[a])&&!(i&&i[a])&&!(s&&s[a])){var c=gj(e,a);try{pj(t,a,c)}catch{}}}}return t}QS.exports=qS});var vv=en((_Ce,pT)=>{var bv=Math.floor(Math.random()*16777215),cT=Ct.index=parseInt(Math.random()*16777215,10),uT=(typeof process>"u"||typeof process.pid!="number"?Math.floor(Math.random()*1e5):process.pid)%65535,dT=(()=>{try{return _Buffer}catch{try{return Buffer}catch{return null}}})(),gp=function(t){return!!(t!=null&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t))},fT=[];for(ar=0;ar<256;ar++)fT[ar]=(ar<=15?"0":"")+ar.toString(16);var ar,mT=new RegExp("^[0-9a-fA-F]{24}$"),Du=[];ar=0;for(;ar<10;)Du[48+ar]=ar++;for(;ar<16;)Du[55+ar]=Du[87+ar]=ar++;function Ct(t){if(!(this instanceof Ct))return new Ct(t);if(t&&(t instanceof Ct||t._bsontype==="ObjectID"))return t;if(this._bsontype="ObjectID",t==null||typeof t=="number"){this.id=this.generate(t);return}var e=Ct.isValid(t);if(!e&&t!=null)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");if(e&&typeof t=="string"&&t.length===24)return Ct.createFromHexString(t);if(t!=null&&t.length===12)this.id=t;else{if(t!=null&&typeof t.toHexString=="function")return t;throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters")}}pT.exports=Ct;Ct.default=Ct;Ct.createFromTime=function(t){return t=parseInt(t,10)%4294967295,new Ct(fO(8,t)+"0000000000000000")};Ct.createFromHexString=function(t){if(typeof t>"u"||t!=null&&t.length!==24)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");for(var e="",o=0;o<24;)e+=String.fromCharCode(Du[t.charCodeAt(o++)]<<4|Du[t.charCodeAt(o++)]);return new Ct(e)};Ct.isValid=function(t){return t==null?!1:typeof t=="number"?!0:typeof t=="string"?t.length===12||t.length===24&&mT.test(t):t instanceof Ct?!0:gp(t)?Ct.isValid(t.toString("hex")):typeof t.toHexString=="function"&&dT&&(t.id instanceof dT||typeof t.id=="string")?t.id.length===12||t.id.length===24&&mT.test(t.id):!1};Ct.prototype={constructor:Ct,toHexString:function(){if(!this.id||!this.id.length)throw new Error("invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is ["+JSON.stringify(this.id)+"]");if(this.id.length===24)return this.id;if(gp(this.id))return this.id.toString("hex");for(var t="",e=0;e<this.id.length;e++)t+=fT[this.id.charCodeAt(e)];return t},equals:function(t){return t instanceof Ct?this.toString()===t.toString():typeof t=="string"&&Ct.isValid(t)&&t.length===12&&gp(this.id)?t===this.id.toString("binary"):typeof t=="string"&&Ct.isValid(t)&&t.length===24?t.toLowerCase()===this.toHexString():typeof t=="string"&&Ct.isValid(t)&&t.length===12?t===this.id:t!=null&&(t instanceof Ct||t.toHexString)?t.toHexString()===this.toHexString():!1},getTimestamp:function(){var t=new Date,e;return gp(this.id)?e=this.id[3]|this.id[2]<<8|this.id[1]<<16|this.id[0]<<24:e=this.id.charCodeAt(3)|this.id.charCodeAt(2)<<8|this.id.charCodeAt(1)<<16|this.id.charCodeAt(0)<<24,t.setTime(Math.floor(e)*1e3),t},generate:function(t){typeof t!="number"&&(t=~~(Date.now()/1e3)),t=parseInt(t,10)%4294967295;var e=mO();return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,t&255,bv>>16&255,bv>>8&255,bv&255,uT>>8&255,uT&255,e>>16&255,e>>8&255,e&255)}};function mO(){return cT=(cT+1)%16777215}function fO(t,e){return e=e.toString(16),e.length===t?e:"00000000".substring(e.length,t)+e}var pO=Symbol&&Symbol.for&&Symbol.for("nodejs.util.inspect.custom")||"inspect";Ct.prototype[pO]=function(){return"ObjectID("+this+")"};Ct.prototype.toJSON=Ct.prototype.toHexString;Ct.prototype.toString=Ct.prototype.toHexString});var d0=en((cDe,YF)=>{function u0(t){return t===void 0}function CV(t){return t===null}function xV(t){return typeof t=="boolean"}function Gp(t){return t===Object(t)}function XF(t){return Array.isArray(t)}function wV(t){return t instanceof Date}function ZF(t,e){return e?Gp(t)&&!u0(t.uri):Gp(t)&&typeof t.size=="number"&&typeof t.type=="string"&&typeof t.slice=="function"}function SV(t,e){return ZF(t,e)&&typeof t.name=="string"&&(Gp(t.lastModifiedDate)||typeof t.lastModified=="number")}function aa(t){return u0(t)?!1:t}function c0(t,e,o,n){e=e||{},o=o||new FormData,e.indices=aa(e.indices),e.nullsAsUndefineds=aa(e.nullsAsUndefineds),e.booleansAsIntegers=aa(e.booleansAsIntegers),e.allowEmptyArrays=aa(e.allowEmptyArrays),e.noAttributesWithArrayNotation=aa(e.noAttributesWithArrayNotation),e.noFilesWithArrayNotation=aa(e.noFilesWithArrayNotation),e.dotsForObjectNotation=aa(e.dotsForObjectNotation);let r=typeof o.getParts=="function";return u0(t)||(CV(t)?e.nullsAsUndefineds||o.append(n,""):xV(t)?e.booleansAsIntegers?o.append(n,t?1:0):o.append(n,t):XF(t)?t.length?t.forEach((s,i)=>{let l=n+"["+(e.indices?i:"")+"]";(e.noAttributesWithArrayNotation||e.noFilesWithArrayNotation&&SV(s,r))&&(l=n),c0(s,e,o,l)}):e.allowEmptyArrays&&o.append(e.noAttributesWithArrayNotation?n:n+"[]",""):wV(t)?o.append(n,t.toISOString()):Gp(t)&&!ZF(t,r)?Object.keys(t).forEach(s=>{let i=t[s];if(XF(i))for(;s.length>2&&s.lastIndexOf("[]")===s.length-2;)s=s.substring(0,s.length-2);let l=n?e.dotsForObjectNotation?n+"."+s:n+"["+s+"]":s;c0(i,e,o,l)}):o.append(n,t)),o}YF.exports={serialize:c0}});var f4=en((zOe,m4)=>{(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e={rotl:function(o,n){return o<<n|o>>>32-n},rotr:function(o,n){return o<<32-n|o>>>n},endian:function(o){if(o.constructor==Number)return e.rotl(o,8)&16711935|e.rotl(o,24)&4278255360;for(var n=0;n<o.length;n++)o[n]=e.endian(o[n]);return o},randomBytes:function(o){for(var n=[];o>0;o--)n.push(Math.floor(Math.random()*256));return n},bytesToWords:function(o){for(var n=[],r=0,s=0;r<o.length;r++,s+=8)n[s>>>5]|=o[r]<<24-s%32;return n},wordsToBytes:function(o){for(var n=[],r=0;r<o.length*32;r+=8)n.push(o[r>>>5]>>>24-r%32&255);return n},bytesToHex:function(o){for(var n=[],r=0;r<o.length;r++)n.push((o[r]>>>4).toString(16)),n.push((o[r]&15).toString(16));return n.join("")},hexToBytes:function(o){for(var n=[],r=0;r<o.length;r+=2)n.push(parseInt(o.substr(r,2),16));return n},bytesToBase64:function(o){for(var n=[],r=0;r<o.length;r+=3)for(var s=o[r]<<16|o[r+1]<<8|o[r+2],i=0;i<4;i++)r*8+i*6<=o.length*8?n.push(t.charAt(s>>>6*(3-i)&63)):n.push("=");return n.join("")},base64ToBytes:function(o){o=o.replace(/[^A-Z0-9+\/]/ig,"");for(var n=[],r=0,s=0;r<o.length;s=++r%4)s!=0&&n.push((t.indexOf(o.charAt(r-1))&Math.pow(2,-2*s+8)-1)<<s*2|t.indexOf(o.charAt(r))>>>6-s*2);return n}};m4.exports=e})()});var cy=en((WOe,p4)=>{var ly={utf8:{stringToBytes:function(t){return ly.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(ly.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],o=0;o<t.length;o++)e.push(t.charCodeAt(o)&255);return e},bytesToString:function(t){for(var e=[],o=0;o<t.length;o++)e.push(String.fromCharCode(t[o]));return e.join("")}}};p4.exports=ly});var b4=en((HOe,g4)=>{g4.exports=function(t){return t!=null&&(h4(t)||IU(t)||!!t._isBuffer)};function h4(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function IU(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&h4(t.slice(0,0))}});var y4=en((UOe,v4)=>{(function(){var t=f4(),e=cy().utf8,o=b4(),n=cy().bin,r=function(s,i){s.constructor==String?i&&i.encoding==="binary"?s=n.stringToBytes(s):s=e.stringToBytes(s):o(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var l=t.bytesToWords(s),a=s.length*8,c=1732584193,u=-271733879,d=-1732584194,f=271733878,m=0;m<l.length;m++)l[m]=(l[m]<<8|l[m]>>>24)&16711935|(l[m]<<24|l[m]>>>8)&4278255360;l[a>>>5]|=128<<a%32,l[(a+64>>>9<<4)+14]=a;for(var p=r._ff,h=r._gg,g=r._hh,b=r._ii,m=0;m<l.length;m+=16){var C=c,v=u,y=d,x=f;c=p(c,u,d,f,l[m+0],7,-680876936),f=p(f,c,u,d,l[m+1],12,-389564586),d=p(d,f,c,u,l[m+2],17,606105819),u=p(u,d,f,c,l[m+3],22,-1044525330),c=p(c,u,d,f,l[m+4],7,-176418897),f=p(f,c,u,d,l[m+5],12,1200080426),d=p(d,f,c,u,l[m+6],17,-1473231341),u=p(u,d,f,c,l[m+7],22,-45705983),c=p(c,u,d,f,l[m+8],7,1770035416),f=p(f,c,u,d,l[m+9],12,-1958414417),d=p(d,f,c,u,l[m+10],17,-42063),u=p(u,d,f,c,l[m+11],22,-1990404162),c=p(c,u,d,f,l[m+12],7,1804603682),f=p(f,c,u,d,l[m+13],12,-40341101),d=p(d,f,c,u,l[m+14],17,-1502002290),u=p(u,d,f,c,l[m+15],22,1236535329),c=h(c,u,d,f,l[m+1],5,-165796510),f=h(f,c,u,d,l[m+6],9,-1069501632),d=h(d,f,c,u,l[m+11],14,643717713),u=h(u,d,f,c,l[m+0],20,-373897302),c=h(c,u,d,f,l[m+5],5,-701558691),f=h(f,c,u,d,l[m+10],9,38016083),d=h(d,f,c,u,l[m+15],14,-660478335),u=h(u,d,f,c,l[m+4],20,-405537848),c=h(c,u,d,f,l[m+9],5,568446438),f=h(f,c,u,d,l[m+14],9,-1019803690),d=h(d,f,c,u,l[m+3],14,-187363961),u=h(u,d,f,c,l[m+8],20,1163531501),c=h(c,u,d,f,l[m+13],5,-1444681467),f=h(f,c,u,d,l[m+2],9,-51403784),d=h(d,f,c,u,l[m+7],14,1735328473),u=h(u,d,f,c,l[m+12],20,-1926607734),c=g(c,u,d,f,l[m+5],4,-378558),f=g(f,c,u,d,l[m+8],11,-2022574463),d=g(d,f,c,u,l[m+11],16,1839030562),u=g(u,d,f,c,l[m+14],23,-35309556),c=g(c,u,d,f,l[m+1],4,-1530992060),f=g(f,c,u,d,l[m+4],11,1272893353),d=g(d,f,c,u,l[m+7],16,-155497632),u=g(u,d,f,c,l[m+10],23,-1094730640),c=g(c,u,d,f,l[m+13],4,681279174),f=g(f,c,u,d,l[m+0],11,-358537222),d=g(d,f,c,u,l[m+3],16,-722521979),u=g(u,d,f,c,l[m+6],23,76029189),c=g(c,u,d,f,l[m+9],4,-640364487),f=g(f,c,u,d,l[m+12],11,-421815835),d=g(d,f,c,u,l[m+15],16,530742520),u=g(u,d,f,c,l[m+2],23,-995338651),c=b(c,u,d,f,l[m+0],6,-198630844),f=b(f,c,u,d,l[m+7],10,1126891415),d=b(d,f,c,u,l[m+14],15,-1416354905),u=b(u,d,f,c,l[m+5],21,-57434055),c=b(c,u,d,f,l[m+12],6,1700485571),f=b(f,c,u,d,l[m+3],10,-1894986606),d=b(d,f,c,u,l[m+10],15,-1051523),u=b(u,d,f,c,l[m+1],21,-2054922799),c=b(c,u,d,f,l[m+8],6,1873313359),f=b(f,c,u,d,l[m+15],10,-30611744),d=b(d,f,c,u,l[m+6],15,-1560198380),u=b(u,d,f,c,l[m+13],21,1309151649),c=b(c,u,d,f,l[m+4],6,-145523070),f=b(f,c,u,d,l[m+11],10,-1120210379),d=b(d,f,c,u,l[m+2],15,718787259),u=b(u,d,f,c,l[m+9],21,-343485551),c=c+C>>>0,u=u+v>>>0,d=d+y>>>0,f=f+x>>>0}return t.endian([c,u,d,f])};r._ff=function(s,i,l,a,c,u,d){var f=s+(i&l|~i&a)+(c>>>0)+d;return(f<<u|f>>>32-u)+i},r._gg=function(s,i,l,a,c,u,d){var f=s+(i&a|l&~a)+(c>>>0)+d;return(f<<u|f>>>32-u)+i},r._hh=function(s,i,l,a,c,u,d){var f=s+(i^l^a)+(c>>>0)+d;return(f<<u|f>>>32-u)+i},r._ii=function(s,i,l,a,c,u,d){var f=s+(l^(i|~a))+(c>>>0)+d;return(f<<u|f>>>32-u)+i},r._blocksize=16,r._digestsize=16,v4.exports=function(s,i){if(s==null)throw new Error("Illegal argument "+s);var l=t.wordsToBytes(r(s,i));return i&&i.asBytes?l:i&&i.asString?n.bytesToString(l):t.bytesToHex(l)}})()});import{jsx as lb}from"react/jsx-runtime";import"react";function de({CustomComponent:t,Fallback:e}){return t!==void 0?t:e}import{jsx as hE}from"react/jsx-runtime";import ib from"react";import{createContext as zs,use as Ws}from"react";var Ac=_i(Mx(),1);import{createElement as rE,createContext as nE,useContext as sE,useEffect as iE,useLayoutEffect as aE,useReducer as lE,useRef as tb,useState as cE}from"react";var Pm=Symbol(),uE=Symbol(),dE=typeof window>"u"||/ServerSideRendering/.test(window.navigator&&window.navigator.userAgent),Ox=dE?iE:aE,mE=Ac.unstable_runWithPriority?t=>{try{(0,Ac.unstable_runWithPriority)(Ac.unstable_NormalPriority,t)}catch(e){if(e.message==="Not implemented.")t();else throw e}}:t=>t(),fE=t=>({value:o,children:n})=>{let r=tb(o),s=tb(0),[i,l]=cE(null);i&&(i(o),l(null));let a=tb();if(!a.current){let c=new Set,u=(d,f)=>{s.current+=1;let m={n:s.current};f?.suspense&&(m.n*=-1,m.p=new Promise(p=>{l(()=>h=>{m.v=h,delete m.p,p(h)})})),c.forEach(p=>p(m)),d()};a.current={[Pm]:{v:r,n:s,l:c,u}}}return Ox(()=>{r.current=o,s.current+=1,mE(()=>{a.current[Pm].l.forEach(c=>{c({n:s.current,v:o})})})},[o]),rE(t,{value:a.current},n)},pE=t=>t;function Vx(t){let e=nE({[Pm]:{v:{current:t},n:{current:-1},l:new Set,u:o=>o()}});return e[uE]=e.Provider,e.Provider=fE(e.Provider),delete e.Consumer,e}function ob(t,e){let o=sE(t)[Pm],{v:{current:n},n:{current:r},l:s}=o,i=e(n),[l,a]=lE((c,u)=>{if(!u)return[n,i];if("p"in u)throw u.p;if(u.n===r)return Object.is(c[1],i)?c:[n,i];try{if("v"in u){if(Object.is(c[0],u.v))return c;let d=e(u.v);return Object.is(c[1],d)?c:[u.v,d]}}catch{}return[...c]},[n,i]);return Object.is(l[1],i)||a(),Ox(()=>(s.add(a),()=>{s.delete(a)}),[s]),l[1]}function Gx(t){return ob(t,pE)}var Em=zs({}),Nm=zs({}),Lm=zs({}),$m=zs(!1),km=zs(!1),rb=zs(!1),jm=zs(!1),nb=zs(!1),Pc=Vx([{},()=>null]),ze=()=>Ws(Em),Oa=()=>Ws(Nm),Bm=()=>Ws(Lm),no=()=>Ws($m),$r=()=>Ws(km),sb=()=>Ws(rb),so=()=>Ws(jm),Di=()=>Ws(nb),Lt=t=>ob(Pc,t),Hs=()=>Gx(Pc);var zx=ib.createContext({data:{},path:"",rowNumber:void 0}),ab=({children:t,path:e,rowNumber:o})=>{let{getDataByPath:n,getSiblingData:r}=Bm(),s=r(e),l=n(e)||s,a=ib.useMemo(()=>({data:l,path:e,rowNumber:o}),[l,e,o]);return hE(zx,{value:a,children:t})},gE=()=>ib.use(zx);var bE="row-label",ss=t=>{let{className:e,CustomComponent:o,label:n,path:r,rowNumber:s}=t;return lb(ab,{path:r,rowNumber:s,children:lb(de,{CustomComponent:o,Fallback:typeof n=="string"?lb("span",{className:[bE,e].filter(Boolean).join(" "),style:{pointerEvents:"none"},children:n}):n})})};import{jsx as uo,jsxs as vi}from"react/jsx-runtime";import{getTranslation as H0}from"@payloadcms/translations";import iH,{Fragment as aH,useCallback as In,useMemo as lH}from"react";import Pe,{forwardRef as vE,isValidElement as cb}from"react";import yE from"react-dom";import rr from"react";import Wx from"react";import RE from"react";var CE=t=>{switch(t){case"success":return SE;case"info":return _E;case"warning":return IE;case"error":return TE;default:return null}},xE=Array(12).fill(0),wE=({visible:t,className:e})=>rr.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},rr.createElement("div",{className:"sonner-spinner"},xE.map((o,n)=>rr.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),SE=rr.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},rr.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),IE=rr.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},rr.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),_E=rr.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},rr.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),TE=rr.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},rr.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),FE=rr.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},rr.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),rr.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),DE=()=>{let[t,e]=Wx.useState(document.hidden);return Wx.useEffect(()=>{let o=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),t},ub=1,AE=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:o,...n}=t,r=typeof t?.id=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:ub++,s=this.toasts.find(l=>l.id===r),i=t.dismissible===void 0?!0:t.dismissible;return s?this.toasts=this.toasts.map(l=>l.id===r?(this.publish({...l,...t,id:r,title:o}),{...l,...t,id:r,dismissible:i,title:o}):l):this.addToast({title:o,...n,dismissible:i,id:r}),r},this.dismiss=t=>(t||this.toasts.forEach(e=>{this.subscribers.forEach(o=>o({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let o;e.loading!==void 0&&(o=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let n=t instanceof Promise?t:t(),r=o!==void 0,s,i=n.then(async a=>{if(s=["resolve",a],RE.isValidElement(a))r=!1,this.create({id:o,type:"default",message:a});else if(EE(a)&&!a.ok){r=!1;let c=typeof e.error=="function"?await e.error(`HTTP error! status: ${a.status}`):e.error,u=typeof e.description=="function"?await e.description(`HTTP error! status: ${a.status}`):e.description;this.create({id:o,type:"error",message:c,description:u})}else if(e.success!==void 0){r=!1;let c=typeof e.success=="function"?await e.success(a):e.success,u=typeof e.description=="function"?await e.description(a):e.description;this.create({id:o,type:"success",message:c,description:u})}}).catch(async a=>{if(s=["reject",a],e.error!==void 0){r=!1;let c=typeof e.error=="function"?await e.error(a):e.error,u=typeof e.description=="function"?await e.description(a):e.description;this.create({id:o,type:"error",message:c,description:u})}}).finally(()=>{var a;r&&(this.dismiss(o),o=void 0),(a=e.finally)==null||a.call(e)}),l=()=>new Promise((a,c)=>i.then(()=>s[0]==="reject"?c(s[1]):a(s[1])).catch(c));return typeof o!="string"&&typeof o!="number"?{unwrap:l}:Object.assign(o,{unwrap:l})},this.custom=(t,e)=>{let o=e?.id||ub++;return this.create({jsx:t(o),id:o,...e}),o},this.subscribers=[],this.toasts=[]}},hr=new AE,PE=(t,e)=>{let o=e?.id||ub++;return hr.addToast({title:t,...e,id:o}),o},EE=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",NE=PE,LE=()=>hr.toasts,oe=Object.assign(NE,{success:hr.success,info:hr.info,warning:hr.warning,error:hr.error,custom:hr.custom,message:hr.message,promise:hr.promise,dismiss:hr.dismiss,loading:hr.loading},{getHistory:LE});function $E(t,{insertAt:e}={}){if(!t||typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e==="top"&&o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}$E(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
13
+ import{a as or,b as Wg,c as z,d as Z5,e as Hg,f as It,g as Y5,h as J5,i as Ug,j as q5,k as Xg,l as Q5}from"./chunk-53XJ3K67.js";import{a as bt,b as Tc,c as zg,d as E,e as Ma,f as _x,g as Tx,h as Ti,i as _m,j as X5,k as Fx,l as K5,m as eE,n as tE}from"./chunk-7V3NHDV6.js";import{c as en,d as Ix,e as _i}from"./chunk-5LKBKI4T.js";var jx=en(_t=>{"use strict";function qg(t,e){var o=t.length;t.push(e);e:for(;0<o;){var n=o-1>>>1,r=t[n];if(0<Tm(r,e))t[n]=e,t[o]=r,o=n;else break e}}function tn(t){return t.length===0?null:t[0]}function Dm(t){if(t.length===0)return null;var e=t[0],o=t.pop();if(o!==e){t[0]=o;e:for(var n=0,r=t.length,s=r>>>1;n<s;){var i=2*(n+1)-1,l=t[i],a=i+1,c=t[a];if(0>Tm(l,o))a<r&&0>Tm(c,l)?(t[n]=c,t[a]=o,n=a):(t[n]=l,t[i]=o,n=i);else if(a<r&&0>Tm(c,o))t[n]=c,t[a]=o,n=a;else break e}}return e}function Tm(t,e){var o=t.sortIndex-e.sortIndex;return o!==0?o:t.id-e.id}_t.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(Dx=performance,_t.unstable_now=function(){return Dx.now()}):(Zg=Date,Rx=Zg.now(),_t.unstable_now=function(){return Zg.now()-Rx});var Dx,Zg,Rx,Rn=[],Gs=[],oE=1,Lr=null,Lo=3,Rm=!1,Fi=!1,Dc=!1,Ex=typeof setTimeout=="function"?setTimeout:null,Nx=typeof clearTimeout=="function"?clearTimeout:null,Ax=typeof setImmediate<"u"?setImmediate:null;function Fm(t){for(var e=tn(Gs);e!==null;){if(e.callback===null)Dm(Gs);else if(e.startTime<=t)Dm(Gs),e.sortIndex=e.expirationTime,qg(Rn,e);else break;e=tn(Gs)}}function Qg(t){if(Dc=!1,Fm(t),!Fi)if(tn(Rn)!==null)Fi=!0,Kg();else{var e=tn(Gs);e!==null&&eb(Qg,e.startTime-t)}}var Am=!1,Rc=-1,Lx=5,$x=-1;function kx(){return!(_t.unstable_now()-$x<Lx)}function Yg(){if(Am){var t=_t.unstable_now();$x=t;var e=!0;try{e:{Fi=!1,Dc&&(Dc=!1,Nx(Rc),Rc=-1),Rm=!0;var o=Lo;try{t:{for(Fm(t),Lr=tn(Rn);Lr!==null&&!(Lr.expirationTime>t&&kx());){var n=Lr.callback;if(typeof n=="function"){Lr.callback=null,Lo=Lr.priorityLevel;var r=n(Lr.expirationTime<=t);if(t=_t.unstable_now(),typeof r=="function"){Lr.callback=r,Fm(t),e=!0;break t}Lr===tn(Rn)&&Dm(Rn),Fm(t)}else Dm(Rn);Lr=tn(Rn)}if(Lr!==null)e=!0;else{var s=tn(Gs);s!==null&&eb(Qg,s.startTime-t),e=!1}}break e}finally{Lr=null,Lo=o,Rm=!1}e=void 0}}finally{e?Fc():Am=!1}}}var Fc;typeof Ax=="function"?Fc=function(){Ax(Yg)}:typeof MessageChannel<"u"?(Jg=new MessageChannel,Px=Jg.port2,Jg.port1.onmessage=Yg,Fc=function(){Px.postMessage(null)}):Fc=function(){Ex(Yg,0)};var Jg,Px;function Kg(){Am||(Am=!0,Fc())}function eb(t,e){Rc=Ex(function(){t(_t.unstable_now())},e)}_t.unstable_IdlePriority=5;_t.unstable_ImmediatePriority=1;_t.unstable_LowPriority=4;_t.unstable_NormalPriority=3;_t.unstable_Profiling=null;_t.unstable_UserBlockingPriority=2;_t.unstable_cancelCallback=function(t){t.callback=null};_t.unstable_continueExecution=function(){Fi||Rm||(Fi=!0,Kg())};_t.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Lx=0<t?Math.floor(1e3/t):5};_t.unstable_getCurrentPriorityLevel=function(){return Lo};_t.unstable_getFirstCallbackNode=function(){return tn(Rn)};_t.unstable_next=function(t){switch(Lo){case 1:case 2:case 3:var e=3;break;default:e=Lo}var o=Lo;Lo=e;try{return t()}finally{Lo=o}};_t.unstable_pauseExecution=function(){};_t.unstable_requestPaint=function(){};_t.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var o=Lo;Lo=t;try{return e()}finally{Lo=o}};_t.unstable_scheduleCallback=function(t,e,o){var n=_t.unstable_now();switch(typeof o=="object"&&o!==null?(o=o.delay,o=typeof o=="number"&&0<o?n+o:n):o=n,t){case 1:var r=-1;break;case 2:r=250;break;case 5:r=1073741823;break;case 4:r=1e4;break;default:r=5e3}return r=o+r,t={id:oE++,callback:e,priorityLevel:t,startTime:o,expirationTime:r,sortIndex:-1},o>n?(t.sortIndex=o,qg(Gs,t),tn(Rn)===null&&t===tn(Gs)&&(Dc?(Nx(Rc),Rc=-1):Dc=!0,eb(Qg,o-n))):(t.sortIndex=r,qg(Rn,t),Fi||Rm||(Fi=!0,Kg())),t};_t.unstable_shouldYield=kx;_t.unstable_wrapCallback=function(t){var e=Lo;return function(){var o=Lo;Lo=e;try{return t.apply(this,arguments)}finally{Lo=o}}}});var Mx=en((Xee,Bx)=>{"use strict";Bx.exports=jx()});var WS=en(yt=>{"use strict";var xo=typeof Symbol=="function"&&Symbol.for,N1=xo?Symbol.for("react.element"):60103,L1=xo?Symbol.for("react.portal"):60106,Hf=xo?Symbol.for("react.fragment"):60107,Uf=xo?Symbol.for("react.strict_mode"):60108,Xf=xo?Symbol.for("react.profiler"):60114,Zf=xo?Symbol.for("react.provider"):60109,Yf=xo?Symbol.for("react.context"):60110,$1=xo?Symbol.for("react.async_mode"):60111,Jf=xo?Symbol.for("react.concurrent_mode"):60111,qf=xo?Symbol.for("react.forward_ref"):60112,Qf=xo?Symbol.for("react.suspense"):60113,ij=xo?Symbol.for("react.suspense_list"):60120,Kf=xo?Symbol.for("react.memo"):60115,ep=xo?Symbol.for("react.lazy"):60116,aj=xo?Symbol.for("react.block"):60121,lj=xo?Symbol.for("react.fundamental"):60117,cj=xo?Symbol.for("react.responder"):60118,uj=xo?Symbol.for("react.scope"):60119;function wr(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case N1:switch(t=t.type,t){case $1:case Jf:case Hf:case Xf:case Uf:case Qf:return t;default:switch(t=t&&t.$$typeof,t){case Yf:case qf:case ep:case Kf:case Zf:return t;default:return e}}case L1:return e}}}function zS(t){return wr(t)===Jf}yt.AsyncMode=$1;yt.ConcurrentMode=Jf;yt.ContextConsumer=Yf;yt.ContextProvider=Zf;yt.Element=N1;yt.ForwardRef=qf;yt.Fragment=Hf;yt.Lazy=ep;yt.Memo=Kf;yt.Portal=L1;yt.Profiler=Xf;yt.StrictMode=Uf;yt.Suspense=Qf;yt.isAsyncMode=function(t){return zS(t)||wr(t)===$1};yt.isConcurrentMode=zS;yt.isContextConsumer=function(t){return wr(t)===Yf};yt.isContextProvider=function(t){return wr(t)===Zf};yt.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===N1};yt.isForwardRef=function(t){return wr(t)===qf};yt.isFragment=function(t){return wr(t)===Hf};yt.isLazy=function(t){return wr(t)===ep};yt.isMemo=function(t){return wr(t)===Kf};yt.isPortal=function(t){return wr(t)===L1};yt.isProfiler=function(t){return wr(t)===Xf};yt.isStrictMode=function(t){return wr(t)===Uf};yt.isSuspense=function(t){return wr(t)===Qf};yt.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Hf||t===Jf||t===Xf||t===Uf||t===Qf||t===ij||typeof t=="object"&&t!==null&&(t.$$typeof===ep||t.$$typeof===Kf||t.$$typeof===Zf||t.$$typeof===Yf||t.$$typeof===qf||t.$$typeof===lj||t.$$typeof===cj||t.$$typeof===uj||t.$$typeof===aj)};yt.typeOf=wr});var US=en((jbe,HS)=>{"use strict";HS.exports=WS()});var KS=en((Bbe,QS)=>{"use strict";var k1=US(),dj={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},mj={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},fj={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},JS={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},j1={};j1[k1.ForwardRef]=fj;j1[k1.Memo]=JS;function XS(t){return k1.isMemo(t)?JS:j1[t.$$typeof]||dj}var pj=Object.defineProperty,hj=Object.getOwnPropertyNames,ZS=Object.getOwnPropertySymbols,gj=Object.getOwnPropertyDescriptor,bj=Object.getPrototypeOf,YS=Object.prototype;function qS(t,e,o){if(typeof e!="string"){if(YS){var n=bj(e);n&&n!==YS&&qS(t,n,o)}var r=hj(e);ZS&&(r=r.concat(ZS(e)));for(var s=XS(t),i=XS(e),l=0;l<r.length;++l){var a=r[l];if(!mj[a]&&!(o&&o[a])&&!(i&&i[a])&&!(s&&s[a])){var c=gj(e,a);try{pj(t,a,c)}catch{}}}}return t}QS.exports=qS});var vv=en((_Ce,pT)=>{var bv=Math.floor(Math.random()*16777215),cT=Ct.index=parseInt(Math.random()*16777215,10),uT=(typeof process>"u"||typeof process.pid!="number"?Math.floor(Math.random()*1e5):process.pid)%65535,dT=(()=>{try{return _Buffer}catch{try{return Buffer}catch{return null}}})(),gp=function(t){return!!(t!=null&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t))},fT=[];for(ar=0;ar<256;ar++)fT[ar]=(ar<=15?"0":"")+ar.toString(16);var ar,mT=new RegExp("^[0-9a-fA-F]{24}$"),Du=[];ar=0;for(;ar<10;)Du[48+ar]=ar++;for(;ar<16;)Du[55+ar]=Du[87+ar]=ar++;function Ct(t){if(!(this instanceof Ct))return new Ct(t);if(t&&(t instanceof Ct||t._bsontype==="ObjectID"))return t;if(this._bsontype="ObjectID",t==null||typeof t=="number"){this.id=this.generate(t);return}var e=Ct.isValid(t);if(!e&&t!=null)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");if(e&&typeof t=="string"&&t.length===24)return Ct.createFromHexString(t);if(t!=null&&t.length===12)this.id=t;else{if(t!=null&&typeof t.toHexString=="function")return t;throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters")}}pT.exports=Ct;Ct.default=Ct;Ct.createFromTime=function(t){return t=parseInt(t,10)%4294967295,new Ct(fO(8,t)+"0000000000000000")};Ct.createFromHexString=function(t){if(typeof t>"u"||t!=null&&t.length!==24)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");for(var e="",o=0;o<24;)e+=String.fromCharCode(Du[t.charCodeAt(o++)]<<4|Du[t.charCodeAt(o++)]);return new Ct(e)};Ct.isValid=function(t){return t==null?!1:typeof t=="number"?!0:typeof t=="string"?t.length===12||t.length===24&&mT.test(t):t instanceof Ct?!0:gp(t)?Ct.isValid(t.toString("hex")):typeof t.toHexString=="function"&&dT&&(t.id instanceof dT||typeof t.id=="string")?t.id.length===12||t.id.length===24&&mT.test(t.id):!1};Ct.prototype={constructor:Ct,toHexString:function(){if(!this.id||!this.id.length)throw new Error("invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is ["+JSON.stringify(this.id)+"]");if(this.id.length===24)return this.id;if(gp(this.id))return this.id.toString("hex");for(var t="",e=0;e<this.id.length;e++)t+=fT[this.id.charCodeAt(e)];return t},equals:function(t){return t instanceof Ct?this.toString()===t.toString():typeof t=="string"&&Ct.isValid(t)&&t.length===12&&gp(this.id)?t===this.id.toString("binary"):typeof t=="string"&&Ct.isValid(t)&&t.length===24?t.toLowerCase()===this.toHexString():typeof t=="string"&&Ct.isValid(t)&&t.length===12?t===this.id:t!=null&&(t instanceof Ct||t.toHexString)?t.toHexString()===this.toHexString():!1},getTimestamp:function(){var t=new Date,e;return gp(this.id)?e=this.id[3]|this.id[2]<<8|this.id[1]<<16|this.id[0]<<24:e=this.id.charCodeAt(3)|this.id.charCodeAt(2)<<8|this.id.charCodeAt(1)<<16|this.id.charCodeAt(0)<<24,t.setTime(Math.floor(e)*1e3),t},generate:function(t){typeof t!="number"&&(t=~~(Date.now()/1e3)),t=parseInt(t,10)%4294967295;var e=mO();return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,t&255,bv>>16&255,bv>>8&255,bv&255,uT>>8&255,uT&255,e>>16&255,e>>8&255,e&255)}};function mO(){return cT=(cT+1)%16777215}function fO(t,e){return e=e.toString(16),e.length===t?e:"00000000".substring(e.length,t)+e}var pO=Symbol&&Symbol.for&&Symbol.for("nodejs.util.inspect.custom")||"inspect";Ct.prototype[pO]=function(){return"ObjectID("+this+")"};Ct.prototype.toJSON=Ct.prototype.toHexString;Ct.prototype.toString=Ct.prototype.toHexString});var d0=en((cDe,YF)=>{function u0(t){return t===void 0}function CV(t){return t===null}function xV(t){return typeof t=="boolean"}function Gp(t){return t===Object(t)}function XF(t){return Array.isArray(t)}function wV(t){return t instanceof Date}function ZF(t,e){return e?Gp(t)&&!u0(t.uri):Gp(t)&&typeof t.size=="number"&&typeof t.type=="string"&&typeof t.slice=="function"}function SV(t,e){return ZF(t,e)&&typeof t.name=="string"&&(Gp(t.lastModifiedDate)||typeof t.lastModified=="number")}function aa(t){return u0(t)?!1:t}function c0(t,e,o,n){e=e||{},o=o||new FormData,e.indices=aa(e.indices),e.nullsAsUndefineds=aa(e.nullsAsUndefineds),e.booleansAsIntegers=aa(e.booleansAsIntegers),e.allowEmptyArrays=aa(e.allowEmptyArrays),e.noAttributesWithArrayNotation=aa(e.noAttributesWithArrayNotation),e.noFilesWithArrayNotation=aa(e.noFilesWithArrayNotation),e.dotsForObjectNotation=aa(e.dotsForObjectNotation);let r=typeof o.getParts=="function";return u0(t)||(CV(t)?e.nullsAsUndefineds||o.append(n,""):xV(t)?e.booleansAsIntegers?o.append(n,t?1:0):o.append(n,t):XF(t)?t.length?t.forEach((s,i)=>{let l=n+"["+(e.indices?i:"")+"]";(e.noAttributesWithArrayNotation||e.noFilesWithArrayNotation&&SV(s,r))&&(l=n),c0(s,e,o,l)}):e.allowEmptyArrays&&o.append(e.noAttributesWithArrayNotation?n:n+"[]",""):wV(t)?o.append(n,t.toISOString()):Gp(t)&&!ZF(t,r)?Object.keys(t).forEach(s=>{let i=t[s];if(XF(i))for(;s.length>2&&s.lastIndexOf("[]")===s.length-2;)s=s.substring(0,s.length-2);let l=n?e.dotsForObjectNotation?n+"."+s:n+"["+s+"]":s;c0(i,e,o,l)}):o.append(n,t)),o}YF.exports={serialize:c0}});var f4=en((zOe,m4)=>{(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e={rotl:function(o,n){return o<<n|o>>>32-n},rotr:function(o,n){return o<<32-n|o>>>n},endian:function(o){if(o.constructor==Number)return e.rotl(o,8)&16711935|e.rotl(o,24)&4278255360;for(var n=0;n<o.length;n++)o[n]=e.endian(o[n]);return o},randomBytes:function(o){for(var n=[];o>0;o--)n.push(Math.floor(Math.random()*256));return n},bytesToWords:function(o){for(var n=[],r=0,s=0;r<o.length;r++,s+=8)n[s>>>5]|=o[r]<<24-s%32;return n},wordsToBytes:function(o){for(var n=[],r=0;r<o.length*32;r+=8)n.push(o[r>>>5]>>>24-r%32&255);return n},bytesToHex:function(o){for(var n=[],r=0;r<o.length;r++)n.push((o[r]>>>4).toString(16)),n.push((o[r]&15).toString(16));return n.join("")},hexToBytes:function(o){for(var n=[],r=0;r<o.length;r+=2)n.push(parseInt(o.substr(r,2),16));return n},bytesToBase64:function(o){for(var n=[],r=0;r<o.length;r+=3)for(var s=o[r]<<16|o[r+1]<<8|o[r+2],i=0;i<4;i++)r*8+i*6<=o.length*8?n.push(t.charAt(s>>>6*(3-i)&63)):n.push("=");return n.join("")},base64ToBytes:function(o){o=o.replace(/[^A-Z0-9+\/]/ig,"");for(var n=[],r=0,s=0;r<o.length;s=++r%4)s!=0&&n.push((t.indexOf(o.charAt(r-1))&Math.pow(2,-2*s+8)-1)<<s*2|t.indexOf(o.charAt(r))>>>6-s*2);return n}};m4.exports=e})()});var cy=en((WOe,p4)=>{var ly={utf8:{stringToBytes:function(t){return ly.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(ly.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],o=0;o<t.length;o++)e.push(t.charCodeAt(o)&255);return e},bytesToString:function(t){for(var e=[],o=0;o<t.length;o++)e.push(String.fromCharCode(t[o]));return e.join("")}}};p4.exports=ly});var b4=en((HOe,g4)=>{g4.exports=function(t){return t!=null&&(h4(t)||IU(t)||!!t._isBuffer)};function h4(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function IU(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&h4(t.slice(0,0))}});var y4=en((UOe,v4)=>{(function(){var t=f4(),e=cy().utf8,o=b4(),n=cy().bin,r=function(s,i){s.constructor==String?i&&i.encoding==="binary"?s=n.stringToBytes(s):s=e.stringToBytes(s):o(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var l=t.bytesToWords(s),a=s.length*8,c=1732584193,u=-271733879,d=-1732584194,f=271733878,m=0;m<l.length;m++)l[m]=(l[m]<<8|l[m]>>>24)&16711935|(l[m]<<24|l[m]>>>8)&4278255360;l[a>>>5]|=128<<a%32,l[(a+64>>>9<<4)+14]=a;for(var p=r._ff,h=r._gg,g=r._hh,b=r._ii,m=0;m<l.length;m+=16){var C=c,v=u,y=d,x=f;c=p(c,u,d,f,l[m+0],7,-680876936),f=p(f,c,u,d,l[m+1],12,-389564586),d=p(d,f,c,u,l[m+2],17,606105819),u=p(u,d,f,c,l[m+3],22,-1044525330),c=p(c,u,d,f,l[m+4],7,-176418897),f=p(f,c,u,d,l[m+5],12,1200080426),d=p(d,f,c,u,l[m+6],17,-1473231341),u=p(u,d,f,c,l[m+7],22,-45705983),c=p(c,u,d,f,l[m+8],7,1770035416),f=p(f,c,u,d,l[m+9],12,-1958414417),d=p(d,f,c,u,l[m+10],17,-42063),u=p(u,d,f,c,l[m+11],22,-1990404162),c=p(c,u,d,f,l[m+12],7,1804603682),f=p(f,c,u,d,l[m+13],12,-40341101),d=p(d,f,c,u,l[m+14],17,-1502002290),u=p(u,d,f,c,l[m+15],22,1236535329),c=h(c,u,d,f,l[m+1],5,-165796510),f=h(f,c,u,d,l[m+6],9,-1069501632),d=h(d,f,c,u,l[m+11],14,643717713),u=h(u,d,f,c,l[m+0],20,-373897302),c=h(c,u,d,f,l[m+5],5,-701558691),f=h(f,c,u,d,l[m+10],9,38016083),d=h(d,f,c,u,l[m+15],14,-660478335),u=h(u,d,f,c,l[m+4],20,-405537848),c=h(c,u,d,f,l[m+9],5,568446438),f=h(f,c,u,d,l[m+14],9,-1019803690),d=h(d,f,c,u,l[m+3],14,-187363961),u=h(u,d,f,c,l[m+8],20,1163531501),c=h(c,u,d,f,l[m+13],5,-1444681467),f=h(f,c,u,d,l[m+2],9,-51403784),d=h(d,f,c,u,l[m+7],14,1735328473),u=h(u,d,f,c,l[m+12],20,-1926607734),c=g(c,u,d,f,l[m+5],4,-378558),f=g(f,c,u,d,l[m+8],11,-2022574463),d=g(d,f,c,u,l[m+11],16,1839030562),u=g(u,d,f,c,l[m+14],23,-35309556),c=g(c,u,d,f,l[m+1],4,-1530992060),f=g(f,c,u,d,l[m+4],11,1272893353),d=g(d,f,c,u,l[m+7],16,-155497632),u=g(u,d,f,c,l[m+10],23,-1094730640),c=g(c,u,d,f,l[m+13],4,681279174),f=g(f,c,u,d,l[m+0],11,-358537222),d=g(d,f,c,u,l[m+3],16,-722521979),u=g(u,d,f,c,l[m+6],23,76029189),c=g(c,u,d,f,l[m+9],4,-640364487),f=g(f,c,u,d,l[m+12],11,-421815835),d=g(d,f,c,u,l[m+15],16,530742520),u=g(u,d,f,c,l[m+2],23,-995338651),c=b(c,u,d,f,l[m+0],6,-198630844),f=b(f,c,u,d,l[m+7],10,1126891415),d=b(d,f,c,u,l[m+14],15,-1416354905),u=b(u,d,f,c,l[m+5],21,-57434055),c=b(c,u,d,f,l[m+12],6,1700485571),f=b(f,c,u,d,l[m+3],10,-1894986606),d=b(d,f,c,u,l[m+10],15,-1051523),u=b(u,d,f,c,l[m+1],21,-2054922799),c=b(c,u,d,f,l[m+8],6,1873313359),f=b(f,c,u,d,l[m+15],10,-30611744),d=b(d,f,c,u,l[m+6],15,-1560198380),u=b(u,d,f,c,l[m+13],21,1309151649),c=b(c,u,d,f,l[m+4],6,-145523070),f=b(f,c,u,d,l[m+11],10,-1120210379),d=b(d,f,c,u,l[m+2],15,718787259),u=b(u,d,f,c,l[m+9],21,-343485551),c=c+C>>>0,u=u+v>>>0,d=d+y>>>0,f=f+x>>>0}return t.endian([c,u,d,f])};r._ff=function(s,i,l,a,c,u,d){var f=s+(i&l|~i&a)+(c>>>0)+d;return(f<<u|f>>>32-u)+i},r._gg=function(s,i,l,a,c,u,d){var f=s+(i&a|l&~a)+(c>>>0)+d;return(f<<u|f>>>32-u)+i},r._hh=function(s,i,l,a,c,u,d){var f=s+(i^l^a)+(c>>>0)+d;return(f<<u|f>>>32-u)+i},r._ii=function(s,i,l,a,c,u,d){var f=s+(l^(i|~a))+(c>>>0)+d;return(f<<u|f>>>32-u)+i},r._blocksize=16,r._digestsize=16,v4.exports=function(s,i){if(s==null)throw new Error("Illegal argument "+s);var l=t.wordsToBytes(r(s,i));return i&&i.asBytes?l:i&&i.asString?n.bytesToString(l):t.bytesToHex(l)}})()});import{jsx as lb}from"react/jsx-runtime";import"react";function de({CustomComponent:t,Fallback:e}){return t!==void 0?t:e}import{jsx as hE}from"react/jsx-runtime";import ib from"react";import{createContext as zs,use as Ws}from"react";var Ac=_i(Mx(),1);import{createElement as rE,createContext as nE,useContext as sE,useEffect as iE,useLayoutEffect as aE,useReducer as lE,useRef as tb,useState as cE}from"react";var Pm=Symbol(),uE=Symbol(),dE=typeof window>"u"||/ServerSideRendering/.test(window.navigator&&window.navigator.userAgent),Ox=dE?iE:aE,mE=Ac.unstable_runWithPriority?t=>{try{(0,Ac.unstable_runWithPriority)(Ac.unstable_NormalPriority,t)}catch(e){if(e.message==="Not implemented.")t();else throw e}}:t=>t(),fE=t=>({value:o,children:n})=>{let r=tb(o),s=tb(0),[i,l]=cE(null);i&&(i(o),l(null));let a=tb();if(!a.current){let c=new Set,u=(d,f)=>{s.current+=1;let m={n:s.current};f?.suspense&&(m.n*=-1,m.p=new Promise(p=>{l(()=>h=>{m.v=h,delete m.p,p(h)})})),c.forEach(p=>p(m)),d()};a.current={[Pm]:{v:r,n:s,l:c,u}}}return Ox(()=>{r.current=o,s.current+=1,mE(()=>{a.current[Pm].l.forEach(c=>{c({n:s.current,v:o})})})},[o]),rE(t,{value:a.current},n)},pE=t=>t;function Vx(t){let e=nE({[Pm]:{v:{current:t},n:{current:-1},l:new Set,u:o=>o()}});return e[uE]=e.Provider,e.Provider=fE(e.Provider),delete e.Consumer,e}function ob(t,e){let o=sE(t)[Pm],{v:{current:n},n:{current:r},l:s}=o,i=e(n),[l,a]=lE((c,u)=>{if(!u)return[n,i];if("p"in u)throw u.p;if(u.n===r)return Object.is(c[1],i)?c:[n,i];try{if("v"in u){if(Object.is(c[0],u.v))return c;let d=e(u.v);return Object.is(c[1],d)?c:[u.v,d]}}catch{}return[...c]},[n,i]);return Object.is(l[1],i)||a(),Ox(()=>(s.add(a),()=>{s.delete(a)}),[s]),l[1]}function Gx(t){return ob(t,pE)}var Em=zs({}),Nm=zs({}),Lm=zs({}),$m=zs(!1),km=zs(!1),rb=zs(!1),jm=zs(!1),nb=zs(!1),Pc=Vx([{},()=>null]),ze=()=>Ws(Em),Oa=()=>Ws(Nm),Bm=()=>Ws(Lm),no=()=>Ws($m),$r=()=>Ws(km),sb=()=>Ws(rb),so=()=>Ws(jm),Di=()=>Ws(nb),Lt=t=>ob(Pc,t),Hs=()=>Gx(Pc);var zx=ib.createContext({data:{},path:"",rowNumber:void 0}),ab=({children:t,path:e,rowNumber:o})=>{let{getDataByPath:n,getSiblingData:r}=Bm(),s=r(e),l=n(e)||s,a=ib.useMemo(()=>({data:l,path:e,rowNumber:o}),[l,e,o]);return hE(zx,{value:a,children:t})},gE=()=>ib.use(zx);var bE="row-label",ss=t=>{let{className:e,CustomComponent:o,label:n,path:r,rowNumber:s}=t;return lb(ab,{path:r,rowNumber:s,children:lb(de,{CustomComponent:o,Fallback:typeof n=="string"?lb("span",{className:[bE,e].filter(Boolean).join(" "),style:{pointerEvents:"none"},children:n}):n})})};import{jsx as uo,jsxs as vi}from"react/jsx-runtime";import{getTranslation as H0}from"@payloadcms/translations";import iH,{Fragment as aH,useCallback as In,useMemo as lH}from"react";import Pe,{forwardRef as vE,isValidElement as cb}from"react";import yE from"react-dom";import rr from"react";import Wx from"react";import RE from"react";var CE=t=>{switch(t){case"success":return SE;case"info":return _E;case"warning":return IE;case"error":return TE;default:return null}},xE=Array(12).fill(0),wE=({visible:t,className:e})=>rr.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},rr.createElement("div",{className:"sonner-spinner"},xE.map((o,n)=>rr.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),SE=rr.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},rr.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),IE=rr.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},rr.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),_E=rr.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},rr.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),TE=rr.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},rr.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),FE=rr.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},rr.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),rr.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),DE=()=>{let[t,e]=Wx.useState(document.hidden);return Wx.useEffect(()=>{let o=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),t},ub=1,AE=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:o,...n}=t,r=typeof t?.id=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:ub++,s=this.toasts.find(l=>l.id===r),i=t.dismissible===void 0?!0:t.dismissible;return s?this.toasts=this.toasts.map(l=>l.id===r?(this.publish({...l,...t,id:r,title:o}),{...l,...t,id:r,dismissible:i,title:o}):l):this.addToast({title:o,...n,dismissible:i,id:r}),r},this.dismiss=t=>(t||this.toasts.forEach(e=>{this.subscribers.forEach(o=>o({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let o;e.loading!==void 0&&(o=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let n=t instanceof Promise?t:t(),r=o!==void 0,s,i=n.then(async a=>{if(s=["resolve",a],RE.isValidElement(a))r=!1,this.create({id:o,type:"default",message:a});else if(EE(a)&&!a.ok){r=!1;let c=typeof e.error=="function"?await e.error(`HTTP error! status: ${a.status}`):e.error,u=typeof e.description=="function"?await e.description(`HTTP error! status: ${a.status}`):e.description;this.create({id:o,type:"error",message:c,description:u})}else if(e.success!==void 0){r=!1;let c=typeof e.success=="function"?await e.success(a):e.success,u=typeof e.description=="function"?await e.description(a):e.description;this.create({id:o,type:"success",message:c,description:u})}}).catch(async a=>{if(s=["reject",a],e.error!==void 0){r=!1;let c=typeof e.error=="function"?await e.error(a):e.error,u=typeof e.description=="function"?await e.description(a):e.description;this.create({id:o,type:"error",message:c,description:u})}}).finally(()=>{var a;r&&(this.dismiss(o),o=void 0),(a=e.finally)==null||a.call(e)}),l=()=>new Promise((a,c)=>i.then(()=>s[0]==="reject"?c(s[1]):a(s[1])).catch(c));return typeof o!="string"&&typeof o!="number"?{unwrap:l}:Object.assign(o,{unwrap:l})},this.custom=(t,e)=>{let o=e?.id||ub++;return this.create({jsx:t(o),id:o,...e}),o},this.subscribers=[],this.toasts=[]}},hr=new AE,PE=(t,e)=>{let o=e?.id||ub++;return hr.addToast({title:t,...e,id:o}),o},EE=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",NE=PE,LE=()=>hr.toasts,oe=Object.assign(NE,{success:hr.success,info:hr.info,warning:hr.warning,error:hr.error,custom:hr.custom,message:hr.message,promise:hr.promise,dismiss:hr.dismiss,loading:hr.loading},{getHistory:LE});function $E(t,{insertAt:e}={}){if(!t||typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e==="top"&&o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}$E(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
14
14
  `);function Mm(t){return t.label!==void 0}var kE=3,jE="32px",BE="16px",Hx=4e3,ME=356,OE=14,VE=20,GE=200;function on(...t){return t.filter(Boolean).join(" ")}function zE(t){let[e,o]=t.split("-"),n=[];return e&&n.push(e),o&&n.push(o),n}var WE=t=>{var e,o,n,r,s,i,l,a,c,u,d;let{invert:f,toast:m,unstyled:p,interacting:h,setHeights:g,visibleToasts:b,heights:C,index:v,toasts:y,expanded:x,removeToast:S,defaultRichColors:w,closeButton:T,style:I,cancelButtonStyle:R,actionButtonStyle:D,className:_="",descriptionClassName:F="",duration:A,position:$,gap:P,loadingIcon:j,expandByDefault:B,classNames:L,icons:N,closeButtonAriaLabel:M="Close toast",pauseWhenPageIsHidden:k}=t,[O,V]=Pe.useState(null),[G,U]=Pe.useState(null),[H,Z]=Pe.useState(!1),[Y,W]=Pe.useState(!1),[se,J]=Pe.useState(!1),[ie,ae]=Pe.useState(!1),[he,be]=Pe.useState(!1),[fe,Me]=Pe.useState(0),[xe,we]=Pe.useState(0),Te=Pe.useRef(m.duration||A||Hx),Q=Pe.useRef(null),Ve=Pe.useRef(null),Oe=v===0,le=v+1<=b,X=m.type,q=m.dismissible!==!1,te=m.className||"",pe=m.descriptionClassName||"",K=Pe.useMemo(()=>C.findIndex(Le=>Le.toastId===m.id)||0,[C,m.id]),re=Pe.useMemo(()=>{var Le;return(Le=m.closeButton)!=null?Le:T},[m.closeButton,T]),ge=Pe.useMemo(()=>m.duration||A||Hx,[m.duration,A]),me=Pe.useRef(0),ue=Pe.useRef(0),ye=Pe.useRef(0),Ie=Pe.useRef(null),[Ae,Ye]=$.split("-"),tt=Pe.useMemo(()=>C.reduce((Le,He,ce)=>ce>=K?Le:Le+He.height,0),[C,K]),Wt=DE(),po=m.invert||f,vo=X==="loading";ue.current=Pe.useMemo(()=>K*P+tt,[K,tt]),Pe.useEffect(()=>{Te.current=ge},[ge]),Pe.useEffect(()=>{Z(!0)},[]),Pe.useEffect(()=>{let Le=Ve.current;if(Le){let He=Le.getBoundingClientRect().height;return we(He),g(ce=>[{toastId:m.id,height:He,position:m.position},...ce]),()=>g(ce=>ce.filter(ve=>ve.toastId!==m.id))}},[g,m.id]),Pe.useLayoutEffect(()=>{if(!H)return;let Le=Ve.current,He=Le.style.height;Le.style.height="auto";let ce=Le.getBoundingClientRect().height;Le.style.height=He,we(ce),g(ve=>ve.find(Ce=>Ce.toastId===m.id)?ve.map(Ce=>Ce.toastId===m.id?{...Ce,height:ce}:Ce):[{toastId:m.id,height:ce,position:m.position},...ve])},[H,m.title,m.description,g,m.id]);let Dt=Pe.useCallback(()=>{W(!0),Me(ue.current),g(Le=>Le.filter(He=>He.toastId!==m.id)),setTimeout(()=>{S(m)},GE)},[m,S,g,ue]);Pe.useEffect(()=>{if(m.promise&&X==="loading"||m.duration===1/0||m.type==="loading")return;let Le;return x||h||k&&Wt?(()=>{if(ye.current<me.current){let He=new Date().getTime()-me.current;Te.current=Te.current-He}ye.current=new Date().getTime()})():Te.current!==1/0&&(me.current=new Date().getTime(),Le=setTimeout(()=>{var He;(He=m.onAutoClose)==null||He.call(m,m),Dt()},Te.current)),()=>clearTimeout(Le)},[x,h,m,X,k,Wt,Dt]),Pe.useEffect(()=>{m.delete&&Dt()},[Dt,m.delete]);function Wo(){var Le,He,ce;return N!=null&&N.loading?Pe.createElement("div",{className:on(L?.loader,(Le=m?.classNames)==null?void 0:Le.loader,"sonner-loader"),"data-visible":X==="loading"},N.loading):j?Pe.createElement("div",{className:on(L?.loader,(He=m?.classNames)==null?void 0:He.loader,"sonner-loader"),"data-visible":X==="loading"},j):Pe.createElement(wE,{className:on(L?.loader,(ce=m?.classNames)==null?void 0:ce.loader),visible:X==="loading"})}return Pe.createElement("li",{tabIndex:0,ref:Ve,className:on(_,te,L?.toast,(e=m?.classNames)==null?void 0:e.toast,L?.default,L?.[X],(o=m?.classNames)==null?void 0:o[X]),"data-sonner-toast":"","data-rich-colors":(n=m.richColors)!=null?n:w,"data-styled":!(m.jsx||m.unstyled||p),"data-mounted":H,"data-promise":!!m.promise,"data-swiped":he,"data-removed":Y,"data-visible":le,"data-y-position":Ae,"data-x-position":Ye,"data-index":v,"data-front":Oe,"data-swiping":se,"data-dismissible":q,"data-type":X,"data-invert":po,"data-swipe-out":ie,"data-swipe-direction":G,"data-expanded":!!(x||B&&H),style:{"--index":v,"--toasts-before":v,"--z-index":y.length-v,"--offset":`${Y?fe:ue.current}px`,"--initial-height":B?"auto":`${xe}px`,...I,...m.style},onPointerDown:Le=>{vo||!q||(Q.current=new Date,Me(ue.current),Le.target.setPointerCapture(Le.pointerId),Le.target.tagName!=="BUTTON"&&(J(!0),Ie.current={x:Le.clientX,y:Le.clientY}))},onPointerUp:()=>{var Le,He,ce,ve;if(ie||!q)return;Ie.current=null;let Ce=Number(((Le=Ve.current)==null?void 0:Le.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),We=Number(((He=Ve.current)==null?void 0:He.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),$e=new Date().getTime()-((ce=Q.current)==null?void 0:ce.getTime()),Ge=O==="x"?Ce:We,Ke=Math.abs(Ge)/$e;if(Math.abs(Ge)>=VE||Ke>.11){Me(ue.current),(ve=m.onDismiss)==null||ve.call(m,m),U(O==="x"?Ce>0?"right":"left":We>0?"down":"up"),Dt(),ae(!0),be(!1);return}J(!1),V(null)},onPointerMove:Le=>{var He,ce,ve,Ce;if(!Ie.current||!q||((He=window.getSelection())==null?void 0:He.toString().length)>0)return;let We=Le.clientY-Ie.current.y,$e=Le.clientX-Ie.current.x,Ge=(ce=t.swipeDirections)!=null?ce:zE($);!O&&(Math.abs($e)>1||Math.abs(We)>1)&&V(Math.abs($e)>Math.abs(We)?"x":"y");let Ke={x:0,y:0};O==="y"?(Ge.includes("top")||Ge.includes("bottom"))&&(Ge.includes("top")&&We<0||Ge.includes("bottom")&&We>0)&&(Ke.y=We):O==="x"&&(Ge.includes("left")||Ge.includes("right"))&&(Ge.includes("left")&&$e<0||Ge.includes("right")&&$e>0)&&(Ke.x=$e),(Math.abs(Ke.x)>0||Math.abs(Ke.y)>0)&&be(!0),(ve=Ve.current)==null||ve.style.setProperty("--swipe-amount-x",`${Ke.x}px`),(Ce=Ve.current)==null||Ce.style.setProperty("--swipe-amount-y",`${Ke.y}px`)}},re&&!m.jsx?Pe.createElement("button",{"aria-label":M,"data-disabled":vo,"data-close-button":!0,onClick:vo||!q?()=>{}:()=>{var Le;Dt(),(Le=m.onDismiss)==null||Le.call(m,m)},className:on(L?.closeButton,(r=m?.classNames)==null?void 0:r.closeButton)},(s=N?.close)!=null?s:FE):null,m.jsx||cb(m.title)?m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title:Pe.createElement(Pe.Fragment,null,X||m.icon||m.promise?Pe.createElement("div",{"data-icon":"",className:on(L?.icon,(i=m?.classNames)==null?void 0:i.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||Wo():null,m.type!=="loading"?m.icon||N?.[X]||CE(X):null):null,Pe.createElement("div",{"data-content":"",className:on(L?.content,(l=m?.classNames)==null?void 0:l.content)},Pe.createElement("div",{"data-title":"",className:on(L?.title,(a=m?.classNames)==null?void 0:a.title)},typeof m.title=="function"?m.title():m.title),m.description?Pe.createElement("div",{"data-description":"",className:on(F,pe,L?.description,(c=m?.classNames)==null?void 0:c.description)},typeof m.description=="function"?m.description():m.description):null),cb(m.cancel)?m.cancel:m.cancel&&Mm(m.cancel)?Pe.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||R,onClick:Le=>{var He,ce;Mm(m.cancel)&&q&&((ce=(He=m.cancel).onClick)==null||ce.call(He,Le),Dt())},className:on(L?.cancelButton,(u=m?.classNames)==null?void 0:u.cancelButton)},m.cancel.label):null,cb(m.action)?m.action:m.action&&Mm(m.action)?Pe.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||D,onClick:Le=>{var He,ce;Mm(m.action)&&((ce=(He=m.action).onClick)==null||ce.call(He,Le),!Le.defaultPrevented&&Dt())},className:on(L?.actionButton,(d=m?.classNames)==null?void 0:d.actionButton)},m.action.label):null))};function Ux(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function HE(t,e){let o={};return[t,e].forEach((n,r)=>{let s=r===1,i=s?"--mobile-offset":"--offset",l=s?BE:jE;function a(c){["top","right","bottom","left"].forEach(u=>{o[`${i}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof n=="number"||typeof n=="string"?a(n):typeof n=="object"?["top","right","bottom","left"].forEach(c=>{n[c]===void 0?o[`${i}-${c}`]=l:o[`${i}-${c}`]=typeof n[c]=="number"?`${n[c]}px`:n[c]}):a(l)}),o}var Xx=vE(function(t,e){let{invert:o,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:s,closeButton:i,className:l,offset:a,mobileOffset:c,theme:u="light",richColors:d,duration:f,style:m,visibleToasts:p=kE,toastOptions:h,dir:g=Ux(),gap:b=OE,loadingIcon:C,icons:v,containerAriaLabel:y="Notifications",pauseWhenPageIsHidden:x}=t,[S,w]=Pe.useState([]),T=Pe.useMemo(()=>Array.from(new Set([n].concat(S.filter(k=>k.position).map(k=>k.position)))),[S,n]),[I,R]=Pe.useState([]),[D,_]=Pe.useState(!1),[F,A]=Pe.useState(!1),[$,P]=Pe.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),j=Pe.useRef(null),B=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),L=Pe.useRef(null),N=Pe.useRef(!1),M=Pe.useCallback(k=>{w(O=>{var V;return(V=O.find(G=>G.id===k.id))!=null&&V.delete||hr.dismiss(k.id),O.filter(({id:G})=>G!==k.id)})},[]);return Pe.useEffect(()=>hr.subscribe(k=>{if(k.dismiss){w(O=>O.map(V=>V.id===k.id?{...V,delete:!0}:V));return}setTimeout(()=>{yE.flushSync(()=>{w(O=>{let V=O.findIndex(G=>G.id===k.id);return V!==-1?[...O.slice(0,V),{...O[V],...k},...O.slice(V+1)]:[k,...O]})})})}),[]),Pe.useEffect(()=>{if(u!=="system"){P(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?P("dark"):P("light")),typeof window>"u")return;let k=window.matchMedia("(prefers-color-scheme: dark)");try{k.addEventListener("change",({matches:O})=>{P(O?"dark":"light")})}catch{k.addListener(({matches:V})=>{try{P(V?"dark":"light")}catch(G){console.error(G)}})}},[u]),Pe.useEffect(()=>{S.length<=1&&_(!1)},[S]),Pe.useEffect(()=>{let k=O=>{var V,G;r.every(U=>O[U]||O.code===U)&&(_(!0),(V=j.current)==null||V.focus()),O.code==="Escape"&&(document.activeElement===j.current||(G=j.current)!=null&&G.contains(document.activeElement))&&_(!1)};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[r]),Pe.useEffect(()=>{if(j.current)return()=>{L.current&&(L.current.focus({preventScroll:!0}),L.current=null,N.current=!1)}},[j.current]),Pe.createElement("section",{ref:e,"aria-label":`${y} ${B}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((k,O)=>{var V;let[G,U]=k.split("-");return S.length?Pe.createElement("ol",{key:k,dir:g==="auto"?Ux():g,tabIndex:-1,ref:j,className:l,"data-sonner-toaster":!0,"data-theme":$,"data-y-position":G,"data-lifted":D&&S.length>1&&!s,"data-x-position":U,style:{"--front-toast-height":`${((V=I[0])==null?void 0:V.height)||0}px`,"--width":`${ME}px`,"--gap":`${b}px`,...m,...HE(a,c)},onBlur:H=>{N.current&&!H.currentTarget.contains(H.relatedTarget)&&(N.current=!1,L.current&&(L.current.focus({preventScroll:!0}),L.current=null))},onFocus:H=>{H.target instanceof HTMLElement&&H.target.dataset.dismissible==="false"||N.current||(N.current=!0,L.current=H.relatedTarget)},onMouseEnter:()=>_(!0),onMouseMove:()=>_(!0),onMouseLeave:()=>{F||_(!1)},onPointerDown:H=>{H.target instanceof HTMLElement&&H.target.dataset.dismissible==="false"||A(!0)},onPointerUp:()=>A(!1)},S.filter(H=>!H.position&&O===0||H.position===k).map((H,Z)=>{var Y,W;return Pe.createElement(WE,{key:H.id,icons:v,index:Z,toast:H,defaultRichColors:d,duration:(Y=h?.duration)!=null?Y:f,className:h?.className,descriptionClassName:h?.descriptionClassName,invert:o,visibleToasts:p,closeButton:(W=h?.closeButton)!=null?W:i,interacting:F,position:k,style:h?.style,unstyled:h?.unstyled,classNames:h?.classNames,cancelButtonStyle:h?.cancelButtonStyle,actionButtonStyle:h?.actionButtonStyle,removeToast:M,toasts:S.filter(se=>se.position==H.position),heights:I.filter(se=>se.position==H.position),setHeights:R,expandByDefault:s,gap:b,loadingIcon:C,expanded:D,pauseWhenPageIsHidden:x,swipeDirections:t.swipeDirections})})):null}))});import{jsx as pb,jsxs as rN}from"react/jsx-runtime";import Qx from"react";import{jsx as KE}from"react/jsx-runtime";import fb from"next/link.js";import{useRouter as eN}from"next/navigation.js";import"react";import{c as UE}from"react/compiler-runtime";import{jsx as XE}from"react/jsx-runtime";import db,{startTransition as ZE,useEffect as YE,useOptimistic as JE,useRef as Zx}from"react";var mb=t=>{let e=UE(11),{children:o}=t,[n,r]=JE(!1),[s,i]=db.useState(0),l=Zx(s),a=Zx(null),c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{a.current=setInterval(()=>{let g=l.current+(.93-l.current)*Math.random()*.2*Math.pow(Math.log(1+(1-l.current)*.75),.75);i(g),l.current=g},250)},e[0]=c):c=e[0];let u=c,d,f;e[1]!==n?(d=()=>{i(0),l.current=0,n?u():a.current&&clearInterval(a.current)},f=[n,u],e[1]=n,e[2]=d,e[3]=f):(d=e[2],f=e[3]),YE(d,f);let m;e[4]!==r?(m=g=>{ZE(()=>{r(!0),typeof g=="function"&&g()})},e[4]=r,e[5]=m):m=e[5];let p=m,h;return e[6]!==o||e[7]!==n||e[8]!==p||e[9]!==s?(h=XE(Yx,{value:{isTransitioning:n,startRouteTransition:p,transitionProgress:s},children:o}),e[6]=o,e[7]=n,e[8]=p,e[9]=s,e[10]=h):h=e[10],h},Yx=db.createContext({isTransitioning:!1,startRouteTransition:()=>{},transitionProgress:0}),qe=()=>db.use(Yx);var qE=/https?|ftp|gopher|file/;function Jx(t){return typeof t=="string"||typeof t=="number"&&!isNaN(t)||typeof t=="boolean"?String(t):""}function QE(t){let e=new URLSearchParams;return Object.entries(t).forEach(([o,n])=>{Array.isArray(n)?n.forEach(r=>e.append(o,Jx(r))):e.set(o,Jx(n))}),e}function qx(t){let{auth:e}=t,{hostname:o}=t,n=t.protocol||"",r=t.pathname||"",s=t.hash||"",i=t.query||"",l=!1;e=e?encodeURIComponent(e).replace(/%3A/i,":")+"@":"",t.host?l=e+t.host:o&&(l=e+(~o.indexOf(":")?`[${o}]`:o),t.port&&(l+=":"+t.port)),i&&typeof i=="object"&&(i=String(QE(i)));let a=t.search||i&&`?${i}`||"";return n&&!n.endsWith(":")&&(n+=":"),t.slashes||(!n||qE.test(n))&&l!==!1?(l="//"+(l||""),r&&r[0]!=="/"&&(r="/"+r)):l||(l=""),s&&s[0]!=="#"&&(s="#"+s),a&&a[0]!=="?"&&(a="?"+a),r=r.replace(/[?#]/g,encodeURIComponent),a=a.replace("#","%23"),`${n}${l}${r}${a}${s}`}var tN="default"in fb?fb.default:fb;function oN(t){let o=t.currentTarget.getAttribute("target");return o&&o!=="_self"||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&t.nativeEvent.which===2}var Ht=({children:t,href:e,onClick:o,preventDefault:n=!0,ref:r,replace:s,scroll:i,...l})=>{let a=eN(),{startRouteTransition:c}=qe();return KE(tN,{href:e,onClick:u=>{oN(u)||(o&&o(u),n&&u.preventDefault(),c(()=>{let d=typeof e=="string"?e:qx(e);s?a.replace(d,{scroll:i}):a.push(d,{scroll:i})}))},ref:r,...l,children:t})};var Ri="banner",rn=({type:t="default",alignIcon:e="right",children:o,className:n,icon:r,onClick:s,to:i})=>{let l=[Ri,`${Ri}--type-${t}`,n&&n,i&&`${Ri}--has-link`,(i||s)&&`${Ri}--has-action`,r&&`${Ri}--has-icon`,r&&`${Ri}--align-icon-${e}`].filter(Boolean).join(" "),a="div";return s&&!i&&(a="button"),i&&(a=Ht),rN(a,{className:l,href:i||null,onClick:s,children:[r&&e==="left"&&pb(Qx.Fragment,{children:r}),pb("span",{className:`${Ri}__content`,children:o}),r&&e==="right"&&pb(Qx.Fragment,{children:r})]})};import{jsx as br,jsxs as Wm}from"react/jsx-runtime";import xN,{Fragment as wN,isValidElement as SN}from"react";import{jsx as Kx}from"react/jsx-runtime";import"react";var Ze=({ariaLabel:t,className:e,direction:o,size:n})=>Kx("svg",{"aria-label":t,className:["icon icon--chevron",e,n&&`icon--size-${n}`].filter(Boolean).join(" "),height:"100%",style:{transform:o==="left"?"rotate(90deg)":o==="right"?"rotate(-90deg)":o==="up"?"rotate(180deg)":void 0},viewBox:"0 0 20 20",width:"100%",xmlns:"http://www.w3.org/2000/svg",children:Kx("path",{className:"stroke",d:"M14 8L10 12L6 8",strokeLinecap:"square"})});import{jsx as ew}from"react/jsx-runtime";import"react";var gr=({className:t})=>ew("svg",{className:[t,"icon icon--edit"].filter(Boolean).join(" "),viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:ew("path",{className:"stroke",d:"M9.68531 4.62938H5.2634C4.92833 4.62938 4.60698 4.76248 4.37004 4.99942C4.13311 5.23635 4 5.5577 4 5.89278V14.7366C4 15.0717 4.13311 15.393 4.37004 15.63C4.60698 15.8669 4.92833 16 5.2634 16H14.1072C14.4423 16 14.7636 15.8669 15.0006 15.63C15.2375 15.393 15.3706 15.0717 15.3706 14.7366V10.3147M13.7124 4.39249C13.9637 4.14118 14.3046 4 14.66 4C15.0154 4 15.3562 4.14118 15.6075 4.39249C15.8588 4.6438 16 4.98464 16 5.34004C16 5.69544 15.8588 6.03629 15.6075 6.28759L9.91399 11.9817C9.76399 12.1316 9.57868 12.2413 9.37515 12.3008L7.56027 12.8314C7.50591 12.8472 7.44829 12.8482 7.39344 12.8341C7.33859 12.8201 7.28853 12.7915 7.24849 12.7515C7.20845 12.7115 7.17991 12.6614 7.16586 12.6066C7.15181 12.5517 7.15276 12.4941 7.16861 12.4397L7.69924 10.6249C7.75896 10.4215 7.86888 10.2364 8.01888 10.0866L13.7124 4.39249Z",strokeLinecap:"square"})});import{jsx as tw}from"react/jsx-runtime";import"react";var hb=()=>tw("svg",{"aria-hidden":"true",className:"graphic link icon icon--link",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:tw("path",{className:"stroke",d:"M7.99999 13.3333H6.66666C5.78261 13.3333 4.93476 12.9821 4.30964 12.357C3.68452 11.7319 3.33333 10.884 3.33333 9.99999C3.33333 9.11593 3.68452 8.26809 4.30964 7.64297C4.93476 7.01785 5.78261 6.66666 6.66666 6.66666H7.99999M12 6.66666H13.3333C14.2174 6.66666 15.0652 7.01785 15.6904 7.64297C16.3155 8.26809 16.6667 9.11593 16.6667 9.99999C16.6667 10.884 16.3155 11.7319 15.6904 12.357C15.0652 12.9821 14.2174 13.3333 13.3333 13.3333H12M7.33333 9.99999H12.6667",strokeLinecap:"square"})});import{jsx as ow}from"react/jsx-runtime";import"react";var nr=()=>ow("svg",{className:"icon icon--plus",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:ow("path",{className:"stroke",d:"M5.33333 9.99998H14.6667M9.99999 5.33331V14.6666",strokeLinecap:"square"})});import{jsx as rw}from"react/jsx-runtime";import"react";var gb=()=>rw("svg",{className:"icon icon--swap",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:rw("path",{className:"stroke",d:"M7.33334 4L4.66667 6.66667M4.66667 6.66667L7.33334 9.33333M4.66667 6.66667H15.3333M12.6667 16L15.3333 13.3333M15.3333 13.3333L12.6667 10.6667M15.3333 13.3333H4.66667",strokeLinecap:"square"})});import{jsx as Ai,jsxs as Cb}from"react/jsx-runtime";var _e={};Ix(_e,{Button:()=>vb,ButtonGroup:()=>bb,Divider:()=>nw,GroupLabel:()=>sw});import{jsx as Om}from"react/jsx-runtime";import"react";import{jsx as nN}from"react/jsx-runtime";import"react";var sN="popup-divider",nw=()=>nN("hr",{className:sN});import{jsx as iN}from"react/jsx-runtime";import"react";var aN="popup-list-group-label",sw=({label:t})=>iN("p",{className:aN,children:t});var Va="popup-button-list",bb=({buttonSize:t="default",children:e,className:o,textAlign:n="left"})=>{let r=[Va,o,`${Va}__text-align--${n}`,`${Va}__button-size--${t}`].filter(Boolean).join(" ");return Om("div",{className:r,children:e})},vb=({id:t,active:e,children:o,className:n,disabled:r,href:s,onClick:i})=>{let l=[`${Va}__button`,r&&`${Va}__disabled`,e&&`${Va}__button--selected`,n].filter(Boolean).join(" ");if(!r){if(s)return Om(Ht,{className:l,href:s,id:t,onClick:a=>{i&&i(a)},prefetch:!1,children:o});if(i)return Om("button",{className:l,id:t,onClick:a=>{i&&i(a)},type:"button",children:o})}return Om("div",{className:l,id:t,children:o})};var Us={};Ix(Us,{WindowInfo:()=>lw,WindowInfoContext:()=>Ga,WindowInfoProvider:()=>dw,useWindowInfo:()=>$o,withWindowInfo:()=>mw});import{useContext as cN}from"react";import{createContext as lN}from"react";var Ga=lN({});var $o=()=>cN(Ga);import iw,{Fragment as aw}from"react";var lw=t=>{let{children:e}=t,o=$o();return e?typeof e=="function"?iw.createElement(aw,null,e(o)):iw.createElement(aw,null,e):null};import uN,{useCallback as cw,useEffect as uw,useReducer as dN,useRef as mN}from"react";var fN=(t,e)=>{let{payload:{breakpoints:o,animationRef:n}}=e;n.current=null;let{eventsFired:r}=t,{documentElement:{style:s,clientWidth:i,clientHeight:l}}=document,{innerWidth:a,innerHeight:c}=window,u=`${i/100}px`,d=`${l/100}px`,f=o?Object.keys(o).reduce((p,h)=>Object.assign(Object.assign({},p),{[h]:window.matchMedia(o[h]).matches}),{}):{},m={width:a,height:c,"--vw":u,"--vh":d,breakpoints:f,eventsFired:r+1};return s.setProperty("--vw",u),s.setProperty("--vh",d),m},dw=t=>{let{breakpoints:e,children:o}=t,n=mN(null),[r,s]=dN(fN,{width:void 0,height:void 0,"--vw":"","--vh":"",breakpoints:{},eventsFired:0}),i=cw(()=>{n.current&&cancelAnimationFrame(n.current),n.current=requestAnimationFrame(()=>s({type:"UPDATE",payload:{breakpoints:e,animationRef:n}}))},[e]),l=cw(()=>{setTimeout(()=>{i()},500)},[i]);return uw(()=>(window.addEventListener("resize",i),window.addEventListener("orientationchange",l),()=>{window.removeEventListener("resize",i),window.removeEventListener("orientationchange",l)}),[i,l]),uw(()=>{r.eventsFired===0&&s({type:"UPDATE",payload:{breakpoints:e,animationRef:n}})},[e,r]),uN.createElement(Ga.Provider,{value:Object.assign({},r)},o&&o)};import pN from"react";var mw=t=>o=>{let n=$o();return pN.createElement(t,Object.assign({},o,{windowInfo:n}))};import yN,{useCallback as hw,useEffect as Vm,useRef as gw,useState as xb}from"react";import{c as hN}from"react/compiler-runtime";import{useEffect as gN,useRef as bN,useState as fw}from"react";var is=(t,e)=>{let o=hN(8),{root:n,rootMargin:r,threshold:s}=t===void 0?{}:t,i=n===void 0?null:n,l=r===void 0?"0px":r,a=s===void 0?0:s,[c,u]=fw(),[d,f]=fw(null),m=bN(typeof window<"u"&&"IntersectionObserver"in window&&!e?new window.IntersectionObserver(b=>{let[C]=b;return u(C)},{root:i,rootMargin:l,threshold:a}):null),p,h;o[0]!==e||o[1]!==d?(p=()=>{if(e)return;let{current:b}=m;return b.disconnect(),d&&b.observe(d),()=>b.disconnect()},h=[d,e],o[0]=e,o[1]=d,o[2]=p,o[3]=h):(p=o[2],h=o[3]),gN(p,h);let g;return o[4]!==c||o[5]!==d||o[6]!==f?(g=[f,c,d],o[4]=c,o[5]=d,o[6]=f,o[7]=g):g=o[7],g};import{c as vN}from"react/compiler-runtime";import{jsx as pw}from"react/jsx-runtime";import"react";var Ec="popup-button",yb=t=>{let e=vN(24),{active:o,button:n,buttonType:r,className:s,disabled:i,noBackground:l,setActive:a,size:c}=t,u=`${Ec}--${r}`,d=!l&&`${Ec}--background`,f=c&&`${Ec}--size-${c}`,m=i&&`${Ec}--disabled`,p;e[0]!==s||e[1]!==u||e[2]!==d||e[3]!==f||e[4]!==m?(p=[Ec,s,u,d,f,m].filter(Boolean),e[0]=s,e[1]=u,e[2]=d,e[3]=f,e[4]=m,e[5]=p):p=e[5];let h=p.join(" "),g;e[6]!==o||e[7]!==a?(g=()=>{a(!o)},e[6]=o,e[7]=a,e[8]=g):g=e[8];let b=g;if(r==="none")return null;if(r==="custom"){let y;e[9]!==b?(y=S=>{S.key==="Enter"&&b()},e[9]=b,e[10]=y):y=e[10];let x;return e[11]!==n||e[12]!==h||e[13]!==b||e[14]!==y?(x=pw("div",{className:h,onClick:b,onKeyDown:y,role:"button",tabIndex:0,children:n}),e[11]=n,e[12]=h,e[13]=b,e[14]=y,e[15]=x):x=e[15],x}let C;e[16]!==b?(C=y=>{y.key==="Enter"&&b()},e[16]=b,e[17]=C):C=e[17];let v;return e[18]!==n||e[19]!==h||e[20]!==i||e[21]!==b||e[22]!==C?(v=pw("button",{className:h,disabled:i,onClick:b,onKeyDown:C,tabIndex:0,type:"button",children:n}),e[18]=n,e[19]=h,e[20]=i,e[21]=b,e[22]=C,e[23]=v):v=e[23],v};var sr="popup",st=t=>{let{id:e,boundingRef:o,button:n,buttonClassName:r,buttonSize:s,buttonType:i="default",caret:l=!0,children:a,className:c,disabled:u,forceOpen:d,horizontalAlign:f="left",initActive:m=!1,noBackground:p,onToggleClose:h,onToggleOpen:g,render:b,showOnHover:C=!1,showScrollbar:v=!1,size:y="medium",verticalAlign:x="top"}=t,{height:S,width:w}=$o(),[T,I]=is({root:o?.current||null,rootMargin:"-100px 0px 0px 0px",threshold:1}),R=gw(null),D=gw(null),[_,F]=xb(m),[A,$]=xb(x),[P,j]=xb(f),B=yN.useCallback(k=>{k&&typeof g=="function"&&g(!0),!k&&typeof h=="function"&&h(),F(k)},[h,g]),L=hw(({horizontal:k=!1,vertical:O=!1})=>{if(R.current){let V=R.current.getBoundingClientRect(),{bottom:G,left:U,right:H,top:Z}=V,Y=100,W=document.documentElement.clientWidth,se=document.documentElement.clientHeight,J=0;o?.current&&({bottom:se,left:J,right:W,top:Y}=o.current.getBoundingClientRect()),k&&(H>W&&U>J?j("right"):U<J&&H<W&&j("left")),O&&(Z<Y&&G<se?$("bottom"):G>se&&Z>Y&&$("top"))}},[o]),N=hw(k=>{R.current.contains(k.target)||D.current.contains(k.target)||B(!1)},[R,B]);Vm(()=>{L({horizontal:!0})},[I,L,w]),Vm(()=>{L({vertical:!0})},[I,L,S]),Vm(()=>(_?document.addEventListener("mousedown",N):document.removeEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}),[_,N,g]),Vm(()=>{B(d)},[d,B]);let M=[sr,c,`${sr}--size-${y}`,s&&`${sr}--button-size-${s}`,`${sr}--v-align-${A}`,`${sr}--h-align-${P}`,_&&`${sr}--active`,v&&`${sr}--show-scrollbar`].filter(Boolean).join(" ");return Cb("div",{className:M,id:e,children:[Ai("div",{className:`${sr}__trigger-wrap`,ref:D,children:C?Ai("div",{className:`${sr}__on-hover-watch`,onMouseEnter:()=>B(!0),onMouseLeave:()=>B(!1),role:"button",tabIndex:0,children:Ai(yb,{active:_,button:n,buttonType:i,className:r,disabled:u,noBackground:p,setActive:B,size:s})}):Ai(yb,{active:_,button:n,buttonType:i,className:r,disabled:u,noBackground:p,setActive:B,size:s})}),Cb("div",{className:`${sr}__content`,ref:R,children:[Ai("div",{className:`${sr}__hide-scrollbar`,ref:T,children:Ai("div",{className:`${sr}__scroll-container`,children:Cb("div",{className:`${sr}__scroll-content`,children:[b&&b({close:()=>B(!1)}),a]})})}),l&&Ai("div",{className:`${sr}__caret`})]})]})};import{jsx as Gm,jsxs as CN}from"react/jsx-runtime";import wb,{useEffect as bw}from"react";var Fo=t=>{let{alignCaret:e="center",boundingRef:o,children:n,className:r,delay:s=350,position:i,show:l=!0,staticPositioning:a=!1}=t,[c,u]=wb.useState(l),[d,f]=wb.useState("top"),m=g=>typeof g=="string"?g:"",[p,h]=is({root:o?.current||null,rootMargin:"-145px 0px 0px 100px",threshold:0},a);return bw(()=>{let g;return s&&l?g=setTimeout(()=>{u(l)},s):u(l),()=>{g&&clearTimeout(g)}},[l,s]),bw(()=>{a||f(h?.isIntersecting?"top":"bottom")},[h,a]),CN(wb.Fragment,{children:[!a&&Gm("aside",{"aria-hidden":"true",className:["tooltip",r,`tooltip--caret-${e}`,"tooltip--position-top"].filter(Boolean).join(" "),ref:p,style:{opacity:"0"},children:Gm("div",{className:"tooltip-content",children:n})}),Gm("aside",{className:["tooltip",r,c&&"tooltip--show",`tooltip--caret-${e}`,`tooltip--position-${i||d}`].filter(Boolean).join(" "),title:m(n),children:Gm("div",{className:"tooltip-content",children:n})})]})};var IN={chevron:Ze,edit:gr,link:hb,plus:nr,swap:gb,x:bt},ho="btn",zm=({children:t,icon:e,showTooltip:o,tooltip:n})=>{let r=IN[e];return Wm(wN,{children:[n&&br(Fo,{className:`${ho}__tooltip`,show:o,children:n}),Wm("span",{className:`${ho}__content`,children:[t&&br("span",{className:`${ho}__label`,children:t}),e&&Wm("span",{className:`${ho}__icon`,children:[SN(e)&&e,r&&br(r,{})]})]})]})},ee=t=>{let{id:e,type:o="button","aria-label":n,buttonStyle:r="primary",children:s,className:i,disabled:l,el:a="button",enableSubMenu:c,extraButtonProps:u={},icon:d,iconPosition:f="right",iconStyle:m="without-border",margin:p=!0,newTab:h,onClick:g,onMouseDown:b,ref:C,round:v,size:y="medium",SubMenuPopupContent:x,to:S,tooltip:w,url:T}=t,[I,R]=xN.useState(!1),D=[ho,i&&i,d&&`${ho}--icon`,m&&`${ho}--icon-style-${m}`,d&&!s&&`${ho}--icon-only`,y&&`${ho}--size-${y}`,d&&f&&`${ho}--icon-position-${f}`,w&&`${ho}--has-tooltip`,!x&&`${ho}--withoutPopup`,!p&&`${ho}--no-margin`].filter(Boolean).join(" ");function _(P){R(!1),o!=="submit"&&g&&P.preventDefault(),g&&g(P)}let F=[r&&`${ho}--style-${r}`,l&&`${ho}--disabled`,v&&`${ho}--round`,x?`${ho}--withPopup`:`${ho}--withoutPopup`].filter(Boolean).join(" "),A={id:e,type:o,"aria-disabled":l,"aria-label":n,className:x?D:[D,F].join(" "),disabled:l,onClick:l?void 0:_,onMouseDown:l?void 0:b,onPointerEnter:w?()=>R(!0):void 0,onPointerLeave:w?()=>R(!1):void 0,rel:h?"noopener noreferrer":void 0,target:h?"_blank":void 0,title:n,...u},$;switch(a){case"anchor":$=br("a",{...A,href:l?void 0:T,ref:C,children:br(zm,{icon:d,showTooltip:I,tooltip:w,children:s})});break;case"link":l&&($=br("div",{...A,children:br(zm,{icon:d,showTooltip:I,tooltip:w,children:s})})),$=br(Ht,{...A,href:S||T,prefetch:!1,children:br(zm,{icon:d,showTooltip:I,tooltip:w,children:s})});break;default:$=br(a,{ref:C,...A,children:br(zm,{icon:d,showTooltip:I,tooltip:w,children:s})});break}return x?Wm("div",{className:F,children:[$,br(st,{button:br(Ze,{}),buttonSize:y,className:l&&!c?`${ho}--popup-disabled`:"",disabled:l&&!c,horizontalAlign:"right",id:`${e}-popup`,noBackground:!0,render:({close:P})=>x({close:()=>P()}),size:"large",verticalAlign:"bottom"})]}):$};import{fieldAffectsData as vw,fieldHasSubFields as yw}from"payload/shared";function Cw({data:t,path:e,...o}){return typeof t>"u"||!e||!o.type?!1:o.type==="blocks"?_N({blocksFromClipboard:o.blocks,blocksFromConfig:o.schemaBlocks}):Sb({fieldsFromClipboard:o.fields,fieldsFromConfig:o.schemaFields})}function Sb({fieldsFromClipboard:t,fieldsFromConfig:e}){return!e||t.length!==e?.length?!1:t.every((o,n)=>{let r=e[n];if(o.type!==r.type||vw(o)&&vw(r)&&o.name!==r.name)return!1;let i=yw(r),l=yw(o);return l!==i?!1:l&&i?Sb({fieldsFromClipboard:o.fields,fieldsFromConfig:r.fields}):!0})}function _N({blocksFromClipboard:t,blocksFromConfig:e}){let o=new Map(e?.map(r=>[r.slug,r]));if(!o.size)return!1;let n=new Set;for(let r of t){let s=r.slug;if(!n.has(s)){let i=o.get(s);if(!i||!Sb({fieldsFromClipboard:r.fields,fieldsFromConfig:i.fields}))return!1;n.add(s)}}return!0}var xw="_payloadClipboard";function za(t){let{getDataToCopy:e,t:o,...n}=t,r={data:e(),...n};try{return localStorage.setItem(xw,JSON.stringify(r)),!0}catch{return o("error:unableToCopy")}}function Wa({onPaste:t,path:e,t:o,...n}){let r;try{let i=localStorage.getItem(xw);if(!i)return o("error:invalidClipboardData");r=JSON.parse(i)}catch{return o("error:invalidClipboardData")}let s={...r,...n,fieldPath:e};return Cw(s)?(t(r),!0):o("error:invalidClipboardData")}import{jsx as Ua,jsxs as AN}from"react/jsx-runtime";import{useCallback as Iw}from"react";import{jsx as Ib,jsxs as TN}from"react/jsx-runtime";import"react";var Nc=({className:t})=>TN("svg",{className:["icon icon--more",t].filter(Boolean).join(" "),viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[Ib("path",{className:"fill",d:"M10 10.6666C10.3682 10.6666 10.6667 10.3682 10.6667 9.99998C10.6667 9.63179 10.3682 9.33331 10 9.33331C9.63182 9.33331 9.33334 9.63179 9.33334 9.99998C9.33334 10.3682 9.63182 10.6666 10 10.6666Z",strokeLinecap:"square"}),Ib("path",{className:"fill",d:"M14.6667 10.6666C15.0349 10.6666 15.3333 10.3682 15.3333 9.99998C15.3333 9.63179 15.0349 9.33331 14.6667 9.33331C14.2985 9.33331 14 9.63179 14 9.99998C14 10.3682 14.2985 10.6666 14.6667 10.6666Z",strokeLinecap:"square"}),Ib("path",{className:"fill",d:"M5.33334 10.6666C5.70153 10.6666 6.00001 10.3682 6.00001 9.99998C6.00001 9.63179 5.70153 9.33331 5.33334 9.33331C4.96515 9.33331 4.66667 9.63179 4.66667 9.99998C4.66667 10.3682 4.96515 10.6666 5.33334 10.6666Z",strokeLinecap:"square"})]});import{c as FN}from"react/compiler-runtime";import{jsx as Sw,jsxs as DN}from"react/jsx-runtime";import{Fragment as RN}from"react";import{jsx as ww}from"react/jsx-runtime";import"react";var Pi=()=>ww("svg",{className:"icon icon--copy",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:ww("path",{className:"stroke",d:"M4.66666 12.6667C3.93333 12.6667 3.33333 12.0667 3.33333 11.3333V4.66668C3.33333 3.93334 3.93333 3.33334 4.66666 3.33334H11.3333C12.0667 3.33334 12.6667 3.93334 12.6667 4.66668M8.66666 7.33334H15.3333C16.0697 7.33334 16.6667 7.9303 16.6667 8.66668V15.3333C16.6667 16.0697 16.0697 16.6667 15.3333 16.6667H8.66666C7.93028 16.6667 7.33333 16.0697 7.33333 15.3333V8.66668C7.33333 7.9303 7.93028 7.33334 8.66666 7.33334Z",strokeLinecap:"square"})});var Ha=t=>{let e=FN(4),{isPaste:o,isRow:n}=t,{t:r}=E(),s;if(e[0]!==o||e[1]!==n||e[2]!==r){let i=r("general:copyField");!n&&o?i=r("general:pasteField"):n&&!o?i=r("general:copyRow"):n&&o&&(i=r("general:pasteRow")),s=DN(RN,{children:[o?Sw(gr,{}):Sw(Pi,{})," ",i]}),e[0]=o,e[1]=n,e[2]=r,e[3]=s}else s=e[3];return s};var PN="clipboard-action",Hm=({allowCopy:t,allowPaste:e,className:o,copyClassName:n,disabled:r,isRow:s,onPaste:i,pasteClassName:l,path:a,...c})=>{let{t:u}=E(),d=[`${PN}__popup`,o].filter(Boolean).join(" "),f=Iw(()=>{let p=za({path:a,t:u,...c});typeof p=="string"?oe.error(p):oe.success(u("general:copied"))},[u,c,a]),m=Iw(()=>{let p=Wa(c.type==="array"?{onPaste:i,path:a,schemaFields:c.fields,t:u}:{onPaste:i,path:a,schemaBlocks:c.blocks,t:u});typeof p=="string"&&oe.error(p)},[i,c,a,u]);return!e&&!t?null:Ua(st,{button:Ua(Nc,{}),className:d,disabled:r,horizontalAlign:"center",render:({close:p})=>AN(_e.ButtonGroup,{children:[Ua(_e.Button,{className:n,disabled:!t,onClick:()=>{f(),p()},children:Ua(Ha,{isRow:s})}),Ua(_e.Button,{className:l,disabled:!e,onClick:()=>{m(),p()},children:Ua(Ha,{isPaste:!0,isRow:s})})]}),size:"large",verticalAlign:"bottom"})};function Xa({formState:t,path:e,rowIndex:o}){let n={},r=typeof o!="number"?e:`${e}.${o}`;for(let s in t){if(!s.startsWith(r))continue;let{customComponents:i,validate:l,...a}=t[s];Array.isArray(a.rows)&&(a.rows=a.rows.map(c=>{if(!c||typeof c!="object")return c;let{customComponents:u,...d}=c;return d})),n[s]=a}return n}function Za({dataFromClipboard:t,formState:e,path:o,rowIndex:n}){let{type:r,data:s,path:i,rowIndex:l}=t,a=typeof l!="number",c=typeof n!="number",u=!a&&c,d=r==="array",f;a&&c?f=i:a?f=`${i}.${n}`:f=`${i}.${l}`;let m;if(c?u?m=`${o}.0`:m=o:m=`${o}.${n}`,u){let p=`${o}.0`,h=s[`${f}.id`].value,g=e[o].rows?.length;e[o].rows=[{...g&&d?e[o].rows[0]:{},id:h,isLoading:!1,lastRenderedPath:p}],e[o].value=1,e[o].initialValue=1,e[o].disableFormData=!0;for(let b in e)b!==o&&!b.startsWith(p)&&b.startsWith(o)&&delete e[b]}for(let p in s){if(!c&&p.endsWith(".id")||!p.startsWith(f))continue;let h=p.replace(f,m),g=d?e[h]?.customComponents:void 0,b=d?e[h]?.validate:void 0;e[h]={customComponents:g,validate:b,...s[p]}}return e}import{c as lL}from"react/compiler-runtime";import{jsx as cL}from"react/jsx-runtime";import{Fragment as uL}from"react";import{c as aL}from"react/compiler-runtime";import Ew,{useMemo as Xm,useRef as Fb,useEffect as Zm,useState as ON,useContext as VN}from"react";import{useDndContext as GN,getClientRect as zN,useDroppable as WN,useDraggable as HN,closestCorners as UN,getFirstCollision as XN,getScrollableAncestors as ZN,KeyboardCode as Xs}from"@dnd-kit/core";import{useMemo as _w,useLayoutEffect as EN,useEffect as NN,useRef as Bre,useCallback as Mre}from"react";function Tw(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return _w(()=>n=>{e.forEach(r=>r(n))},e)}var LN=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function $N(t){let e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function kN(t){return"nodeType"in t}function Fw(t){var e,o;return t?$N(t)?t:kN(t)&&(e=(o=t.ownerDocument)==null?void 0:o.defaultView)!=null?e:window:window}var Tb=LN?EN:NN;var _b={};function Dw(t,e){return _w(()=>{if(e)return e;let o=_b[t]==null?0:_b[t]+1;return _b[t]=o,t+"-"+o},[t,e])}function jN(t){return function(e){for(var o=arguments.length,n=new Array(o>1?o-1:0),r=1;r<o;r++)n[r-1]=arguments[r];return n.reduce((s,i)=>{let l=Object.entries(i);for(let[a,c]of l){let u=s[a];u!=null&&(s[a]=u+t*c)}return s},{...e})}}var Rw=jN(-1);function BN(t){return"clientX"in t&&"clientY"in t}function Aw(t){if(!t)return!1;let{KeyboardEvent:e}=Fw(t.target);return e&&t instanceof e}function MN(t){if(!t)return!1;let{TouchEvent:e}=Fw(t.target);return e&&t instanceof e}function Pw(t){if(MN(t)){if(t.touches&&t.touches.length){let{clientX:e,clientY:o}=t.touches[0];return{x:e,y:o}}else if(t.changedTouches&&t.changedTouches.length){let{clientX:e,clientY:o}=t.changedTouches[0];return{x:e,y:o}}}return BN(t)?{x:t.clientX,y:t.clientY}:null}var Lc=Object.freeze({Translate:{toString(t){if(!t)return;let{x:e,y:o}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(o?Math.round(o):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;let{scaleX:e,scaleY:o}=t;return"scaleX("+e+") scaleY("+o+")"}},Transform:{toString(t){if(t)return[Lc.Translate.toString(t),Lc.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:o,easing:n}=t;return e+" "+o+"ms "+n}}});function Jm(t,e,o){let n=t.slice();return n.splice(o<0?n.length+o:o,0,n.splice(e,1)[0]),n}function YN(t,e){return t.reduce((o,n,r)=>{let s=e.get(n);return s&&(o[r]=s),o},Array(t.length))}function Um(t){return t!==null&&t>=0}function JN(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0}function qN(t){return typeof t=="boolean"?{draggable:t,droppable:t}:t}var Nw=t=>{let{rects:e,activeIndex:o,overIndex:n,index:r}=t,s=Jm(e,n,o),i=e[r],l=s[r];return!l||!i?null:{x:l.left-i.left,y:l.top-i.top,scaleX:l.width/i.width,scaleY:l.height/i.height}};var Lw="Sortable",$w=Ew.createContext({activeIndex:-1,containerId:Lw,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Nw,disabled:{draggable:!1,droppable:!1}});function kw(t){let{children:e,id:o,items:n,strategy:r=Nw,disabled:s=!1}=t,{active:i,dragOverlay:l,droppableRects:a,over:c,measureDroppableContainers:u}=GN(),d=Dw(Lw,o),f=l.rect!==null,m=Xm(()=>n.map(S=>typeof S=="object"&&"id"in S?S.id:S),[n]),p=i!=null,h=i?m.indexOf(i.id):-1,g=c?m.indexOf(c.id):-1,b=Fb(m),C=!JN(m,b.current),v=g!==-1&&h===-1||C,y=qN(s);Tb(()=>{C&&p&&u(m)},[C,m,p,u]),Zm(()=>{b.current=m},[m]);let x=Xm(()=>({activeIndex:h,containerId:d,disabled:y,disableTransforms:v,items:m,overIndex:g,useDragOverlay:f,sortedRects:YN(m,a),strategy:r}),[h,d,y.draggable,y.droppable,v,m,g,a,f,r]);return Ew.createElement($w.Provider,{value:x},e)}var QN=t=>{let{id:e,items:o,activeIndex:n,overIndex:r}=t;return Jm(o,n,r).indexOf(e)},KN=t=>{let{containerId:e,isSorting:o,wasDragging:n,index:r,items:s,newIndex:i,previousItems:l,previousContainerId:a,transition:c}=t;return!c||!n||l!==s&&r===i?!1:o?!0:i!==r&&e===a},eL={duration:200,easing:"ease"},jw="transform",tL=Lc.Transition.toString({property:jw,duration:0,easing:"linear"}),oL={roleDescription:"sortable"};function rL(t){let{disabled:e,index:o,node:n,rect:r}=t,[s,i]=ON(null),l=Fb(o);return Tb(()=>{if(!e&&o!==l.current&&n.current){let a=r.current;if(a){let c=zN(n.current,{ignoreTransform:!0}),u={x:a.left-c.left,y:a.top-c.top,scaleX:a.width/c.width,scaleY:a.height/c.height};(u.x||u.y)&&i(u)}}o!==l.current&&(l.current=o)},[e,o,n,r]),Zm(()=>{s&&i(null)},[s]),s}function Bw(t){let{animateLayoutChanges:e=KN,attributes:o,disabled:n,data:r,getNewIndex:s=QN,id:i,strategy:l,resizeObserverConfig:a,transition:c=eL}=t,{items:u,containerId:d,activeIndex:f,disabled:m,disableTransforms:p,sortedRects:h,overIndex:g,useDragOverlay:b,strategy:C}=VN($w),v=nL(n,m),y=u.indexOf(i),x=Xm(()=>({sortable:{containerId:d,index:y,items:u},...r}),[d,r,y,u]),S=Xm(()=>u.slice(u.indexOf(i)),[u,i]),{rect:w,node:T,isOver:I,setNodeRef:R}=WN({id:i,data:x,disabled:v.droppable,resizeObserverConfig:{updateMeasurementsFor:S,...a}}),{active:D,activatorEvent:_,activeNodeRect:F,attributes:A,setNodeRef:$,listeners:P,isDragging:j,over:B,setActivatorNodeRef:L,transform:N}=HN({id:i,data:x,attributes:{...oL,...o},disabled:v.draggable}),M=Tw(R,$),k=!!D,O=k&&!p&&Um(f)&&Um(g),V=!b&&j,G=V&&O?N:null,H=O?G??(l??C)({rects:h,activeNodeRect:F,activeIndex:f,overIndex:g,index:y}):null,Z=Um(f)&&Um(g)?s({id:i,items:u,activeIndex:f,overIndex:g}):y,Y=D?.id,W=Fb({activeId:Y,items:u,newIndex:Z,containerId:d}),se=u!==W.current.items,J=e({active:D,containerId:d,isDragging:j,isSorting:k,id:i,index:y,items:u,newIndex:W.current.newIndex,previousItems:W.current.items,previousContainerId:W.current.containerId,transition:c,wasDragging:W.current.activeId!=null}),ie=rL({disabled:!J,index:y,node:T,rect:w});return Zm(()=>{k&&W.current.newIndex!==Z&&(W.current.newIndex=Z),d!==W.current.containerId&&(W.current.containerId=d),u!==W.current.items&&(W.current.items=u)},[k,Z,d,u]),Zm(()=>{if(Y===W.current.activeId)return;if(Y&&!W.current.activeId){W.current.activeId=Y;return}let he=setTimeout(()=>{W.current.activeId=Y},50);return()=>clearTimeout(he)},[Y]),{active:D,activeIndex:f,attributes:A,data:x,rect:w,index:y,newIndex:Z,items:u,isOver:I,isSorting:k,isDragging:j,listeners:P,node:T,overIndex:g,over:B,setNodeRef:M,setActivatorNodeRef:L,setDroppableNodeRef:R,setDraggableNodeRef:$,transform:ie??H,transition:ae()};function ae(){if(ie||se&&W.current.newIndex===y)return tL;if(!(V&&!Aw(_)||!c)&&(k||J))return Lc.Transition.toString({...c,property:jw})}}function nL(t,e){var o,n;return typeof t=="boolean"?{draggable:t,droppable:!1}:{draggable:(o=t?.draggable)!=null?o:e.draggable,droppable:(n=t?.droppable)!=null?n:e.droppable}}function Ym(t){if(!t)return!1;let e=t.data.current;return!!(e&&"sortable"in e&&typeof e.sortable=="object"&&"containerId"in e.sortable&&"items"in e.sortable&&"index"in e.sortable)}var sL=[Xs.Down,Xs.Right,Xs.Up,Xs.Left],Mw=(t,e)=>{let{context:{active:o,collisionRect:n,droppableRects:r,droppableContainers:s,over:i,scrollableAncestors:l}}=e;if(sL.includes(t.code)){if(t.preventDefault(),!o||!n)return;let a=[];s.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;let f=r.get(d.id);if(f)switch(t.code){case Xs.Down:n.top<f.top&&a.push(d);break;case Xs.Up:n.top>f.top&&a.push(d);break;case Xs.Left:n.left>f.left&&a.push(d);break;case Xs.Right:n.left<f.left&&a.push(d);break}});let c=UN({active:o,collisionRect:n,droppableRects:r,droppableContainers:a,pointerCoordinates:null}),u=XN(c,"id");if(u===i?.id&&c.length>1&&(u=c[1].id),u!=null){let d=s.get(o.id),f=s.get(u),m=f?r.get(f.id):null,p=f?.node.current;if(p&&m&&d&&f){let g=ZN(p).some((S,w)=>l[w]!==S),b=Ow(d,f),C=iL(d,f),v=g||!b?{x:0,y:0}:{x:C?n.width-m.width:0,y:C?n.height-m.height:0},y={x:m.left,y:m.top};return v.x&&v.y?y:Rw(y,v)}}}};function Ow(t,e){return!Ym(t)||!Ym(e)?!1:t.data.current.sortable.containerId===e.data.current.sortable.containerId}function iL(t,e){return!Ym(t)||!Ym(e)||!Ow(t,e)?!1:t.data.current.sortable.index<e.data.current.sortable.index}var Ya=t=>{let e=aL(17),{id:o,disabled:n}=t,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={duration:250,easing:"cubic-bezier(0, 0.2, 0.2, 1)"},e[0]=r):r=e[0];let s;e[1]!==n||e[2]!==o?(s={id:o,disabled:n,transition:r},e[1]=n,e[2]=o,e[3]=s):s=e[3];let{attributes:i,isDragging:l,listeners:a,setNodeRef:c,transform:u,transition:d}=Bw(s),f=l?"grabbing":"grab",m;e[4]!==f||e[5]!==d?(m={cursor:f,transition:d},e[4]=f,e[5]=d,e[6]=m):m=e[6];let p;e[7]!==i||e[8]!==m?(p={...i,style:m},e[7]=i,e[8]=m,e[9]=p):p=e[9];let h=u&&`translate3d(${u.x}px, ${u.y}px, 0)`,g;return e[10]!==l||e[11]!==a||e[12]!==c||e[13]!==p||e[14]!==h||e[15]!==d?(g={attributes:p,isDragging:l,listeners:a,setNodeRef:c,transform:h,transition:d},e[10]=l,e[11]=a,e[12]=c,e[13]=p,e[14]=h,e[15]=d,e[16]=g):g=e[16],g};var An=t=>{let e=lL(12),{id:o,children:n,disabled:r}=t,s;e[0]!==r||e[1]!==o?(s={id:o,disabled:r},e[0]=r,e[1]=o,e[2]=s):s=e[2];let{attributes:i,isDragging:l,listeners:a,setNodeRef:c,transform:u,transition:d}=Ya(s),f=l?"grabbing":"grab",m;return e[3]!==i||e[4]!==n||e[5]!==l||e[6]!==a||e[7]!==c||e[8]!==f||e[9]!==u||e[10]!==d?(m=cL(uL,{children:n({attributes:{...i,style:{cursor:f}},isDragging:l,listeners:a,setNodeRef:c,transform:u,transition:d})}),e[3]=i,e[4]=n,e[5]=l,e[6]=a,e[7]=c,e[8]=f,e[9]=u,e[10]=d,e[11]=m):m=e[11],m};import{c as dL}from"react/compiler-runtime";import{jsx as Db}from"react/jsx-runtime";import{closestCenter as mL,DndContext as fL,KeyboardSensor as pL,PointerSensor as hL,useDroppable as gL,useSensor as Vw,useSensors as bL}from"@dnd-kit/core";import{useId as vL}from"react";var kr=t=>{let e=dL(18),{children:o,className:n,ids:r,onDragEnd:s,onDragStart:i}=t,l=vL(),a;e[0]!==l?(a={id:l},e[0]=l,e[1]=a):a=e[1];let{setNodeRef:c}=gL(a),u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u={activationConstraint:{distance:5}},e[2]=u):u=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={coordinateGetter:Mw},e[3]=d):d=e[3];let f=bL(Vw(hL,u),Vw(pL,d)),m;e[4]!==r||e[5]!==s?(m=C=>{let{active:v,over:y}=C;C.activatorEvent.stopPropagation(),!(!v||!y)&&typeof s=="function"&&s({event:C,moveFromIndex:r.findIndex(x=>x===v.id),moveToIndex:r.findIndex(x=>x===y.id)})},e[4]=r,e[5]=s,e[6]=m):m=e[6];let p=m,h;e[7]!==i?(h=C=>{let{active:v}=C;v&&typeof i=="function"&&i({id:v.id,event:C})},e[7]=i,e[8]=h):h=e[8];let g=h,b;return e[9]!==o||e[10]!==n||e[11]!==p||e[12]!==g||e[13]!==l||e[14]!==r||e[15]!==f||e[16]!==c?(b=Db(fL,{collisionDetection:mL,id:l,onDragEnd:p,onDragStart:g,sensors:f,children:Db(kw,{items:r,children:Db("div",{className:n,ref:c,children:o})})}),e[9]=o,e[10]=n,e[11]=p,e[12]=g,e[13]=l,e[14]=r,e[15]=f,e[16]=c,e[17]=b):b=e[17],b};import{jsx as Gw,jsxs as yL}from"react/jsx-runtime";import"react";var qm="error-pill",yo=t=>{let{className:e,count:o,i18n:n,withMessage:r}=t,s=!r&&o<99,i=[qm,s&&`${qm}--fixed-width`,e&&e].filter(Boolean).join(" ");return o===0?null:Gw("div",{className:i,children:yL("div",{className:`${qm}__content`,children:[Gw("span",{className:`${qm}__count`,children:o}),r&&` ${o>1?n.t("general:errors"):n.t("general:error")}`]})})};import{c as CL}from"react/compiler-runtime";import{jsx as xL}from"react/jsx-runtime";import{getTranslation as wL}from"@payloadcms/translations";import"react";var zw="field-description",Je=t=>{let e=CL(8),{className:o,description:n,marginPlacement:r,path:s}=t,{i18n:i}=E();if(n){let l=`field-description-${s?.replace(/\./g,"__")}`,a=r&&`${zw}--margin-${r}`,c;e[0]!==o||e[1]!==l||e[2]!==a?(c=[zw,o,l,a].filter(Boolean),e[0]=o,e[1]=l,e[2]=a,e[3]=c):c=e[3];let u=c.join(" "),d;return e[4]!==n||e[5]!==i||e[6]!==u?(d=xL("div",{className:u,children:wL(n,i)}),e[4]=n,e[5]=i,e[6]=u,e[7]=d):d=e[7],d}return null};import{c as SL}from"react/compiler-runtime";import{jsx as IL}from"react/jsx-runtime";import"react";var _L="field-error",Qe=t=>{let e=SL(8),{alignCaret:o,message:n,path:r,showError:s}=t,i=o===void 0?"right":o,l=no(),a;e[0]!==r?(a=d=>{let[f]=d;return f&&f?.[r]||null},e[0]=r,e[1]=a):a=e[1];let c=Lt(a),u;if(e[2]!==i||e[3]!==c||e[4]!==l||e[5]!==n||e[6]!==s){u=Symbol.for("react.early_return_sentinel");e:{let{errorMessage:d,valid:f}=c||{},m=n||d;if((s||l&&f===!1)&&m?.length){u=IL(Fo,{alignCaret:i,className:_L,delay:0,staticPositioning:!0,children:m});break e}}e[2]=i,e[3]=c,e[4]=l,e[5]=n,e[6]=s,e[7]=u}else u=e[7];return u!==Symbol.for("react.early_return_sentinel")?u:null};import{jsx as $9,jsxs as _2}from"react/jsx-runtime";import{getTranslation as k9}from"@payloadcms/translations";import"react";import{c as TL}from"react/compiler-runtime";import{jsx as FL}from"react/jsx-runtime";import{createContext as DL,use as RL}from"react";var Ww=DL(0),as=t=>{let e=TL(3),{children:o}=t,r=dt()+1,s;return e[0]!==o||e[1]!==r?(s=FL(Ww,{value:r,children:o}),e[0]=o,e[1]=r,e[2]=s):s=e[2],s},dt=()=>RL(Ww);import{c as D9}from"react/compiler-runtime";import{jsx as y2}from"react/jsx-runtime";import{useSearchParams as R9}from"next/navigation.js";import A9,{createContext as x2,use as w2,useEffect as C2,useRef as P9,useState as E9}from"react";var Zs=(t,e)=>!t?.locales||t.locales.length===0?null:t.locales.find(o=>o?.code===e);import{jsx as x9}from"react/jsx-runtime";import{jsx as jb}from"react/jsx-runtime";import{useRef as t2,useEffect as Li,useState as Bb}from"react";import zL from"react-dom";function ke(){return ke=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)({}).hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},ke.apply(null,arguments)}function Ja(t,e){if(t==null)return{};var o={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;o[n]=t[n]}return o}function qa(t,e){return qa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,n){return o.__proto__=n,o},qa(t,e)}function Qm(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,qa(t,e)}function Rb(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function Ab(t,e){t.classList?t.classList.add(e):Rb(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function Hw(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Pb(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=Hw(t.className,e):t.setAttribute("class",Hw(t.className&&t.className.baseVal||"",e))}import Xw from"react";import ef from"react";import tf from"react-dom";var Eb={disabled:!1};import AL from"react";var Nb=AL.createContext(null);var Km=function(e){return e.scrollTop};var $c="unmounted",Ei="exited",Ni="entering",Ka="entered",Lb="exiting",ls=function(t){Qm(e,t);function e(n,r){var s;s=t.call(this,n,r)||this;var i=r,l=i&&!i.isMounting?n.enter:n.appear,a;return s.appearStatus=null,n.in?l?(a=Ei,s.appearStatus=Ni):a=Ka:n.unmountOnExit||n.mountOnEnter?a=$c:a=Ei,s.state={status:a},s.nextCallback=null,s}e.getDerivedStateFromProps=function(r,s){var i=r.in;return i&&s.status===$c?{status:Ei}:null};var o=e.prototype;return o.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},o.componentDidUpdate=function(r){var s=null;if(r!==this.props){var i=this.state.status;this.props.in?i!==Ni&&i!==Ka&&(s=Ni):(i===Ni||i===Ka)&&(s=Lb)}this.updateStatus(!1,s)},o.componentWillUnmount=function(){this.cancelNextCallback()},o.getTimeouts=function(){var r=this.props.timeout,s,i,l;return s=i=l=r,r!=null&&typeof r!="number"&&(s=r.exit,i=r.enter,l=r.appear!==void 0?r.appear:i),{exit:s,enter:i,appear:l}},o.updateStatus=function(r,s){if(r===void 0&&(r=!1),s!==null)if(this.cancelNextCallback(),s===Ni){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:tf.findDOMNode(this);i&&Km(i)}this.performEnter(r)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ei&&this.setState({status:$c})},o.performEnter=function(r){var s=this,i=this.props.enter,l=this.context?this.context.isMounting:r,a=this.props.nodeRef?[l]:[tf.findDOMNode(this),l],c=a[0],u=a[1],d=this.getTimeouts(),f=l?d.appear:d.enter;if(!r&&!i||Eb.disabled){this.safeSetState({status:Ka},function(){s.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:Ni},function(){s.props.onEntering(c,u),s.onTransitionEnd(f,function(){s.safeSetState({status:Ka},function(){s.props.onEntered(c,u)})})})},o.performExit=function(){var r=this,s=this.props.exit,i=this.getTimeouts(),l=this.props.nodeRef?void 0:tf.findDOMNode(this);if(!s||Eb.disabled){this.safeSetState({status:Ei},function(){r.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:Lb},function(){r.props.onExiting(l),r.onTransitionEnd(i.exit,function(){r.safeSetState({status:Ei},function(){r.props.onExited(l)})})})},o.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},o.safeSetState=function(r,s){s=this.setNextCallback(s),this.setState(r,s)},o.setNextCallback=function(r){var s=this,i=!0;return this.nextCallback=function(l){i&&(i=!1,s.nextCallback=null,r(l))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},o.onTransitionEnd=function(r,s){this.setNextCallback(s);var i=this.props.nodeRef?this.props.nodeRef.current:tf.findDOMNode(this),l=r==null&&!this.props.addEndListener;if(!i||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],c=a[0],u=a[1];this.props.addEndListener(c,u)}r!=null&&setTimeout(this.nextCallback,r)},o.render=function(){var r=this.state.status;if(r===$c)return null;var s=this.props,i=s.children,l=s.in,a=s.mountOnEnter,c=s.unmountOnExit,u=s.appear,d=s.enter,f=s.exit,m=s.timeout,p=s.addEndListener,h=s.onEnter,g=s.onEntering,b=s.onEntered,C=s.onExit,v=s.onExiting,y=s.onExited,x=s.nodeRef,S=Ja(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ef.createElement(Nb.Provider,{value:null},typeof i=="function"?i(r,S):ef.cloneElement(ef.Children.only(i),S))},e}(ef.Component);ls.contextType=Nb;ls.propTypes={};function Qa(){}ls.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Qa,onEntering:Qa,onEntered:Qa,onExit:Qa,onExiting:Qa,onExited:Qa};ls.UNMOUNTED=$c;ls.EXITED=Ei;ls.ENTERING=Ni;ls.ENTERED=Ka;ls.EXITING=Lb;var Uw=ls;var PL=function(e,o){return e&&o&&o.split(" ").forEach(function(n){return Ab(e,n)})},$b=function(e,o){return e&&o&&o.split(" ").forEach(function(n){return Pb(e,n)})},kb=function(t){Qm(e,t);function e(){for(var n,r=arguments.length,s=new Array(r),i=0;i<r;i++)s[i]=arguments[i];return n=t.call.apply(t,[this].concat(s))||this,n.appliedClasses={appear:{},enter:{},exit:{}},n.onEnter=function(l,a){var c=n.resolveArguments(l,a),u=c[0],d=c[1];n.removeClasses(u,"exit"),n.addClass(u,d?"appear":"enter","base"),n.props.onEnter&&n.props.onEnter(l,a)},n.onEntering=function(l,a){var c=n.resolveArguments(l,a),u=c[0],d=c[1],f=d?"appear":"enter";n.addClass(u,f,"active"),n.props.onEntering&&n.props.onEntering(l,a)},n.onEntered=function(l,a){var c=n.resolveArguments(l,a),u=c[0],d=c[1],f=d?"appear":"enter";n.removeClasses(u,f),n.addClass(u,f,"done"),n.props.onEntered&&n.props.onEntered(l,a)},n.onExit=function(l){var a=n.resolveArguments(l),c=a[0];n.removeClasses(c,"appear"),n.removeClasses(c,"enter"),n.addClass(c,"exit","base"),n.props.onExit&&n.props.onExit(l)},n.onExiting=function(l){var a=n.resolveArguments(l),c=a[0];n.addClass(c,"exit","active"),n.props.onExiting&&n.props.onExiting(l)},n.onExited=function(l){var a=n.resolveArguments(l),c=a[0];n.removeClasses(c,"exit"),n.addClass(c,"exit","done"),n.props.onExited&&n.props.onExited(l)},n.resolveArguments=function(l,a){return n.props.nodeRef?[n.props.nodeRef.current,l]:[l,a]},n.getClassNames=function(l){var a=n.props.classNames,c=typeof a=="string",u=c&&a?a+"-":"",d=c?""+u+l:a[l],f=c?d+"-active":a[l+"Active"],m=c?d+"-done":a[l+"Done"];return{baseClassName:d,activeClassName:f,doneClassName:m}},n}var o=e.prototype;return o.addClass=function(r,s,i){var l=this.getClassNames(s)[i+"ClassName"],a=this.getClassNames("enter"),c=a.doneClassName;s==="appear"&&i==="done"&&c&&(l+=" "+c),i==="active"&&r&&Km(r),l&&(this.appliedClasses[s][i]=l,PL(r,l))},o.removeClasses=function(r,s){var i=this.appliedClasses[s],l=i.base,a=i.active,c=i.done;this.appliedClasses[s]={},l&&$b(r,l),a&&$b(r,a),c&&$b(r,c)},o.render=function(){var r=this.props,s=r.classNames,i=Ja(r,["classNames"]);return Xw.createElement(Uw,ke({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(Xw.Component);kb.defaultProps={classNames:""};kb.propTypes={};var kc=kb;function Zw(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}import{useContext as NL}from"react";import{createContext as EL}from"react";var of=EL({});var ne=()=>NL(of);var rf=t=>t?{appear:`${t}--appear`,appearActive:`${t}--appearActive`,appearDone:`${t}--appearDone`,enter:`${t}--enter`,enterActive:`${t}--enterActive`,enterDone:`${t}--enterDone`,exit:`${t}--exit`,exitActive:`${t}--exitActive`,exitDone:`${t}--exitDone`}:{};X5();function Yw(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),o.push.apply(o,n)}return o}function Jw(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?Yw(Object(o),!0).forEach(function(n){LL(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Yw(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function LL(t,e,o){return e=kL(e),e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function $L(t,e){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function kL(t){var e=$L(t,"string");return typeof e=="symbol"?e:String(e)}var qw={activateTrap:function(e,o){if(e.length>0){var n=e[e.length-1];n!==o&&n.pause()}var r=e.indexOf(o);r===-1||e.splice(r,1),e.push(o)},deactivateTrap:function(e,o){var n=e.indexOf(o);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},jL=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},BL=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},Bc=function(e){return e?.key==="Tab"||e?.keyCode===9},ML=function(e){return Bc(e)&&!e.shiftKey},OL=function(e){return Bc(e)&&e.shiftKey},Qw=function(e){return setTimeout(e,0)},Kw=function(e,o){var n=-1;return e.every(function(r,s){return o(r)?(n=s,!1):!0}),n},jc=function(e){for(var o=arguments.length,n=new Array(o>1?o-1:0),r=1;r<o;r++)n[r-1]=arguments[r];return typeof e=="function"?e.apply(void 0,n):e},nf=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},VL=[],e2=function(e,o){var n=o?.document||document,r=o?.trapStack||VL,s=Jw({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:ML,isKeyBackward:OL},o),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},l,a=function(_,F,A){return _&&_[F]!==void 0?_[F]:s[A||F]},c=function(_,F){var A=typeof F?.composedPath=="function"?F.composedPath():void 0;return i.containerGroups.findIndex(function($){var P=$.container,j=$.tabbableNodes;return P.contains(_)||A?.includes(P)||j.find(function(B){return B===_})})},u=function(_){var F=s[_];if(typeof F=="function"){for(var A=arguments.length,$=new Array(A>1?A-1:0),P=1;P<A;P++)$[P-1]=arguments[P];F=F.apply(void 0,$)}if(F===!0&&(F=void 0),!F){if(F===void 0||F===!1)return F;throw new Error("`".concat(_,"` was specified but was not a node, or did not return a node"))}var j=F;if(typeof F=="string"&&(j=n.querySelector(F),!j))throw new Error("`".concat(_,"` as selector refers to no known node"));return j},d=function(){var _=u("initialFocus");if(_===!1)return!1;if(_===void 0||!_m(_,s.tabbableOptions))if(c(n.activeElement)>=0)_=n.activeElement;else{var F=i.tabbableGroups[0],A=F&&F.firstTabbableNode;_=A||u("fallbackFocus")}if(!_)throw new Error("Your focus-trap needs to have at least one focusable element");return _},f=function(){if(i.containerGroups=i.containers.map(function(_){var F=_x(_,s.tabbableOptions),A=Tx(_,s.tabbableOptions),$=F.length>0?F[0]:void 0,P=F.length>0?F[F.length-1]:void 0,j=A.find(function(N){return Ti(N)}),B=A.slice().reverse().find(function(N){return Ti(N)}),L=!!F.find(function(N){return Ma(N)>0});return{container:_,tabbableNodes:F,focusableNodes:A,posTabIndexesFound:L,firstTabbableNode:$,lastTabbableNode:P,firstDomTabbableNode:j,lastDomTabbableNode:B,nextTabbableNode:function(M){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,O=F.indexOf(M);return O<0?k?A.slice(A.indexOf(M)+1).find(function(V){return Ti(V)}):A.slice(0,A.indexOf(M)).reverse().find(function(V){return Ti(V)}):F[O+(k?1:-1)]}}}),i.tabbableGroups=i.containerGroups.filter(function(_){return _.tabbableNodes.length>0}),i.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(i.containerGroups.find(function(_){return _.posTabIndexesFound})&&i.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},m=function D(_){var F=_.activeElement;if(F)return F.shadowRoot&&F.shadowRoot.activeElement!==null?D(F.shadowRoot):F},p=function D(_){if(_!==!1&&_!==m(document)){if(!_||!_.focus){D(d());return}_.focus({preventScroll:!!s.preventScroll}),i.mostRecentlyFocusedNode=_,jL(_)&&_.select()}},h=function(_){var F=u("setReturnFocus",_);return F||(F===!1?!1:_)},g=function(_){var F=_.target,A=_.event,$=_.isBackward,P=$===void 0?!1:$;F=F||nf(A),f();var j=null;if(i.tabbableGroups.length>0){var B=c(F,A),L=B>=0?i.containerGroups[B]:void 0;if(B<0)P?j=i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:j=i.tabbableGroups[0].firstTabbableNode;else if(P){var N=Kw(i.tabbableGroups,function(U){var H=U.firstTabbableNode;return F===H});if(N<0&&(L.container===F||_m(F,s.tabbableOptions)&&!Ti(F,s.tabbableOptions)&&!L.nextTabbableNode(F,!1))&&(N=B),N>=0){var M=N===0?i.tabbableGroups.length-1:N-1,k=i.tabbableGroups[M];j=Ma(F)>=0?k.lastTabbableNode:k.lastDomTabbableNode}else Bc(A)||(j=L.nextTabbableNode(F,!1))}else{var O=Kw(i.tabbableGroups,function(U){var H=U.lastTabbableNode;return F===H});if(O<0&&(L.container===F||_m(F,s.tabbableOptions)&&!Ti(F,s.tabbableOptions)&&!L.nextTabbableNode(F))&&(O=B),O>=0){var V=O===i.tabbableGroups.length-1?0:O+1,G=i.tabbableGroups[V];j=Ma(F)>=0?G.firstTabbableNode:G.firstDomTabbableNode}else Bc(A)||(j=L.nextTabbableNode(F))}}else j=u("fallbackFocus");return j},b=function(_){var F=nf(_);if(!(c(F,_)>=0)){if(jc(s.clickOutsideDeactivates,_)){l.deactivate({returnFocus:s.returnFocusOnDeactivate});return}jc(s.allowOutsideClick,_)||_.preventDefault()}},C=function(_){var F=nf(_),A=c(F,_)>=0;if(A||F instanceof Document)A&&(i.mostRecentlyFocusedNode=F);else{_.stopImmediatePropagation();var $,P=!0;if(i.mostRecentlyFocusedNode)if(Ma(i.mostRecentlyFocusedNode)>0){var j=c(i.mostRecentlyFocusedNode),B=i.containerGroups[j].tabbableNodes;if(B.length>0){var L=B.findIndex(function(N){return N===i.mostRecentlyFocusedNode});L>=0&&(s.isKeyForward(i.recentNavEvent)?L+1<B.length&&($=B[L+1],P=!1):L-1>=0&&($=B[L-1],P=!1))}}else i.containerGroups.some(function(N){return N.tabbableNodes.some(function(M){return Ma(M)>0})})||(P=!1);else P=!1;P&&($=g({target:i.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(i.recentNavEvent)})),p($||i.mostRecentlyFocusedNode||d())}i.recentNavEvent=void 0},v=function(_){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;i.recentNavEvent=_;var A=g({event:_,isBackward:F});A&&(Bc(_)&&_.preventDefault(),p(A))},y=function(_){if(BL(_)&&jc(s.escapeDeactivates,_)!==!1){_.preventDefault(),l.deactivate();return}(s.isKeyForward(_)||s.isKeyBackward(_))&&v(_,s.isKeyBackward(_))},x=function(_){var F=nf(_);c(F,_)>=0||jc(s.clickOutsideDeactivates,_)||jc(s.allowOutsideClick,_)||(_.preventDefault(),_.stopImmediatePropagation())},S=function(){if(i.active)return qw.activateTrap(r,l),i.delayInitialFocusTimer=s.delayInitialFocus?Qw(function(){p(d())}):p(d()),n.addEventListener("focusin",C,!0),n.addEventListener("mousedown",b,{capture:!0,passive:!1}),n.addEventListener("touchstart",b,{capture:!0,passive:!1}),n.addEventListener("click",x,{capture:!0,passive:!1}),n.addEventListener("keydown",y,{capture:!0,passive:!1}),l},w=function(){if(i.active)return n.removeEventListener("focusin",C,!0),n.removeEventListener("mousedown",b,!0),n.removeEventListener("touchstart",b,!0),n.removeEventListener("click",x,!0),n.removeEventListener("keydown",y,!0),l},T=function(_){var F=_.some(function(A){var $=Array.from(A.removedNodes);return $.some(function(P){return P===i.mostRecentlyFocusedNode})});F&&p(d())},I=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(T):void 0,R=function(){I&&(I.disconnect(),i.active&&!i.paused&&i.containers.map(function(_){I.observe(_,{subtree:!0,childList:!0})}))};return l={get active(){return i.active},get paused(){return i.paused},activate:function(_){if(i.active)return this;var F=a(_,"onActivate"),A=a(_,"onPostActivate"),$=a(_,"checkCanFocusTrap");$||f(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=n.activeElement,F?.();var P=function(){$&&f(),S(),R(),A?.()};return $?($(i.containers.concat()).then(P,P),this):(P(),this)},deactivate:function(_){if(!i.active)return this;var F=Jw({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},_);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,w(),i.active=!1,i.paused=!1,R(),qw.deactivateTrap(r,l);var A=a(F,"onDeactivate"),$=a(F,"onPostDeactivate"),P=a(F,"checkCanReturnFocus"),j=a(F,"returnFocus","returnFocusOnDeactivate");A?.();var B=function(){Qw(function(){j&&p(h(i.nodeFocusedBeforeActivation)),$?.()})};return j&&P?(P(h(i.nodeFocusedBeforeActivation)).then(B,B),this):(B(),this)},pause:function(_){if(i.paused||!i.active)return this;var F=a(_,"onPause"),A=a(_,"onPostPause");return i.paused=!0,F?.(),w(),R(),A?.(),this},unpause:function(_){if(!i.paused||!i.active)return this;var F=a(_,"onUnpause"),A=a(_,"onPostUnpause");return i.paused=!1,F?.(),f(),S(),R(),A?.(),this},updateContainerElements:function(_){var F=[].concat(_).filter(Boolean);return i.containers=F.map(function(A){return typeof A=="string"?n.querySelector(A):A}),i.active&&f(),R(),this}},l.updateContainerElements(e),l};var GL=function(t,e){var o={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(o[n[r]]=t[n[r]]);return o},cs="modal-item",o2=(t,e)=>n=>{let r=ne(),s=t2(null),[i,l]=Bb(!1),a=t2(!1),[c,u]=Bb(null),{modalState:d,classPrefix:f,containerRef:m,transTime:p,setCloseOnBlur:h,setBodyScrollLock:g,openModal:b}=r,{className:C,htmlElement:v="dialog",slug:y="",closeOnBlur:x=!0,lockBodyScroll:S=!0,classPrefix:w,onEnter:T,onEntering:I,onEntered:R,onExit:D,onExiting:_,onExited:F,openOnInit:A,trapFocus:$=!0,focusTrapOptions:P={}}=n,j=GL(n,["className","htmlElement","slug","closeOnBlur","lockBodyScroll","classPrefix","onEnter","onEntering","onEntered","onExit","onExiting","onExited","openOnInit","trapFocus","focusTrapOptions"]),B=w||f,L=e||y,N=d[L]&&d[L].isOpen;Li(()=>{if($){let O=s.current;if(a.current===!1&&O){let V=e2(O,Object.assign(Object.assign({},P),{fallbackFocus:P?.fallbackFocus||O,allowOutsideClick:typeof P.allowOutsideClick<"u"?P.allowOutsideClick:!0}));u(V),a.current=!0}}},[$,i,P]),Li(()=>{l(!0)},[]),Li(()=>(c&&(N?c.activate():c.deactivate()),()=>{c&&c.deactivate()}),[N,c]),Li(()=>{N&&h(x)},[N,x,h]),Li(()=>{let O=s.current;return O&&g(!!(N&&S),O),()=>{O&&g(!1,O)}},[N,S,g]);let[M,k]=Bb(N);if(Li(()=>{N?k(N):setTimeout(()=>k(!1),p)},[N,p]),Li(()=>{A&&b(L)},[L,A,b]),m.current){let O=B?`${B}__${cs}`:cs,V=[O,`${O}--slug-${L}`,C].filter(Boolean).join(" "),G=Object.assign({role:v!=="dialog"?"dialog":void 0,open:v==="dialog"?M||N:void 0,"aria-modal":!0,"aria-label":j["aria-labelledby"]?void 0:L},j);return zL.createPortal(jb(kc,{nodeRef:s,timeout:p,in:N,classNames:rf(O),appear:!0,onEnter:T,onEntering:I,onEntered:R,onExit:D,onExiting:_,onExited:F,children:jb(v,Object.assign({ref:s,id:j?.id||L,className:V},G,{children:jb(t,Object.assign({},n,{isOpen:N,modal:r}))}))}),m.current)}return null};import{jsx as r2}from"react/jsx-runtime";import{Fragment as n2}from"react";var WL=t=>{let{children:e}=t;return e?typeof e=="function"?r2(n2,{children:e(t)}):r2(n2,{children:e}):null},vr=o2(WL);import{jsx as s2}from"react/jsx-runtime";var HL=function(t,e){var o={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(o[n[r]]=t[n[r]]);return o},us="modal-container",Mb=t=>{let{oneModalIsOpen:e,classPrefix:o,transTime:n,setContainerRef:r,containerRef:s,closeAllModals:i,closeOnBlur:l}=ne(),{className:a,htmlElement:c="div",children:u,onClick:d}=t,f=HL(t,["className","htmlElement","children","onClick"]),m=o?`${o}__${us}`:us,p=[m,a].filter(Boolean).join(" "),h=Object.assign(Object.assign({},f),{onClick:g=>{l&&i(),typeof d=="function"&&d(g)}});return s2(kc,{nodeRef:s,in:e,timeout:n,classNames:rf(m),appear:!0,children:s2(c,Object.assign({className:p,ref:r},h,{children:u&&u}))})};import{jsx as m2,jsxs as KL}from"react/jsx-runtime";import{Fragment as e9,useState as cf,useRef as f2,useEffect as uf,useCallback as Ys,useReducer as t9}from"react";function UL(t){if(Array.isArray(t)){for(var e=0,o=Array(t.length);e<t.length;e++)o[e]=t[e];return o}else return Array.from(t)}var Vb=!1;typeof window<"u"&&(Ob={get passive(){Vb=!0}},window.addEventListener("testPassive",null,Ob),window.removeEventListener("testPassive",null,Ob));var Ob,sf=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),ki=[],af=!1,i2=-1,Mc=void 0,$i=void 0,Oc=void 0,a2=function(e){return ki.some(function(o){return!!(o.options.allowTouchMove&&o.options.allowTouchMove(e))})},lf=function(e){var o=e||window.event;return a2(o.target)||o.touches.length>1?!0:(o.preventDefault&&o.preventDefault(),!1)},XL=function(e){if(Oc===void 0){var o=!!e&&e.reserveScrollBarGap===!0,n=window.innerWidth-document.documentElement.clientWidth;if(o&&n>0){var r=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);Oc=document.body.style.paddingRight,document.body.style.paddingRight=r+n+"px"}}Mc===void 0&&(Mc=document.body.style.overflow,document.body.style.overflow="hidden")},ZL=function(){Oc!==void 0&&(document.body.style.paddingRight=Oc,Oc=void 0),Mc!==void 0&&(document.body.style.overflow=Mc,Mc=void 0)},YL=function(){return window.requestAnimationFrame(function(){if($i===void 0){$i={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var e=window,o=e.scrollY,n=e.scrollX,r=e.innerHeight;document.body.style.position="fixed",document.body.style.top=-o,document.body.style.left=-n,setTimeout(function(){return window.requestAnimationFrame(function(){var s=r-window.innerHeight;s&&o>=r&&(document.body.style.top=-(o+s))})},300)}})},JL=function(){if($i!==void 0){var e=-parseInt(document.body.style.top,10),o=-parseInt(document.body.style.left,10);document.body.style.position=$i.position,document.body.style.top=$i.top,document.body.style.left=$i.left,window.scrollTo(o,e),$i=void 0}},qL=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},QL=function(e,o){var n=e.targetTouches[0].clientY-i2;return a2(e.target)?!1:o&&o.scrollTop===0&&n>0||qL(o)&&n<0?lf(e):(e.stopPropagation(),!0)},l2=function(e,o){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!ki.some(function(r){return r.targetElement===e})){var n={targetElement:e,options:o||{}};ki=[].concat(UL(ki),[n]),sf?YL():XL(o),sf&&(e.ontouchstart=function(r){r.targetTouches.length===1&&(i2=r.targetTouches[0].clientY)},e.ontouchmove=function(r){r.targetTouches.length===1&&QL(r,e)},af||(document.addEventListener("touchmove",lf,Vb?{passive:!1}:void 0),af=!0))}};var c2=function(e){if(!e){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}ki=ki.filter(function(o){return o.targetElement!==e}),sf&&(e.ontouchstart=null,e.ontouchmove=null,af&&ki.length===0&&(document.removeEventListener("touchmove",lf,Vb?{passive:!1}:void 0),af=!1)),sf?JL():ZL()};var u2=({classPrefix:t,zIndex:e})=>{let o=t?`${t}__`:"";return`
15
15
  .${o}${us} {
16
16
  top: 0;
@@ -45,7 +45,7 @@ import{a as or,b as Wg,c as z,d as Z5,e as Hg,f as It,g as Y5,h as J5,i as Ug,j
45
45
  .${o}${cs}--exit {
46
46
  visibility: visible;
47
47
  }
48
- `};var d2=(t,e)=>{let o=Object.assign({},t),{type:n,payload:r}=e;switch(n){case"UPDATE_MODAL":{let{slug:s}=r;s&&(o[s]=Object.assign(Object.assign({},o[s]),r));break}case"OPEN_MODAL":{let{slug:s}=r;s&&(s in o&&o[s].isOpen||(o[s]=Object.assign(Object.assign({},o[s]),{slug:s,openedOn:Date.now(),isOpen:!0})));break}case"TOGGLE_MODAL":{let{slug:s}=r;if(s){let i=s in o&&o[s].isOpen;o[s]=Object.assign(Object.assign({},o[s]),{slug:s,openedOn:i?void 0:Date.now(),isOpen:!i})}break}case"CLOSE_MODAL":{let{slug:s}=r;s&&(o[s]=Object.assign(Object.assign({},o[s]),{slug:s,openedOn:void 0,isOpen:!1}));break}case"REMOVE_MODAL":{let{slug:s}=r;s&&s in o&&delete o[s];break}case"CLOSE_LATEST_MODAL":{let s=Object.keys(o).reduce((i,l)=>{let a=o[l];return a.isOpen&&typeof a.openedOn=="number"&&(!i||typeof i.openedOn=="number"&&a.openedOn>i.openedOn)?a:i},void 0);s&&(o[s.slug]=Object.assign(Object.assign({},o[s.slug]),{isOpen:!1,openedOn:void 0}));break}case"CLOSE_ALL_MODALS":{o=Object.entries(o).reduce((s,[i,l])=>(s[i]=Object.assign(Object.assign({},l),{isOpen:!1,openedOn:void 0}),s),{});break}default:break}return o};var o9=()=>{if(typeof window<"u")return new URLSearchParams(window.location.search)},r9=()=>{let t=o9(),e=[];if(t){let o=t.get("modal");o&&(o.includes(",")?e=o.split(","):e=[o])}return e},Gb=t=>{let{classPrefix:e,minifyCSS:o=!0,generateCSS:n=!0,zIndex:r=9999,handleParamChange:s,children:i,transTime:l=250}=t,a=f2(null),[c,u]=t9(d2,{},()=>r9().reduce(($,P)=>($[P]={slug:P,isOpen:!0,openedOn:Date.now()},$),{})),[d,f]=cf(!1),[m,p]=cf(!1),[h,g]=cf(!1),[b,C]=cf(""),v=f2(!1),y=Ys(F=>{F.keyCode===27&&u({type:"CLOSE_LATEST_MODAL"})},[]);uf(()=>(v.current||(document.addEventListener("keydown",F=>y(F),!1),v.current=!0),()=>{v.current&&document.removeEventListener("keydown",F=>y(F),!1)}),[y]),uf(()=>{if(n){let F="";F=u2({classPrefix:e,zIndex:r}),o&&(F=F.replace(/\n/g,"").replace(/\s\s+/g," ")),C(F)}},[n,o,r,e]),uf(()=>{if(typeof s=="function"&&s(c),typeof s=="boolean"&&s){let F=Object.keys(c).filter(j=>c[j].isOpen),A=new URLSearchParams;for(let j of F)A.append("modal",j);let $=A.toString()?`?${A}`:"",P=`${window.location.pathname}${$}`;window.history.pushState({},"",P)}},[c,s]),uf(()=>{let F=Object.keys(c).some(A=>c[A].isOpen);f(F)},[c]);let x=Ys((F,A)=>{A&&(F?(l2(A),g(!0)):(c2(A),g(!1)))},[]),S=Ys(F=>{a.current=F},[]),w=Ys(F=>{u({type:"OPEN_MODAL",payload:{slug:F}})},[]),T=Ys(F=>{u({type:"CLOSE_MODAL",payload:{slug:F}})},[]),I=Ys(()=>{u({type:"CLOSE_ALL_MODALS"})},[]),R=Ys(F=>{u({type:"TOGGLE_MODAL",payload:{slug:F}})},[]),D=Ys(F=>c[F]&&c[F].isOpen,[c]),_=Object.assign({},t);return delete _.children,KL(e9,{children:[n&&m2("style",{dangerouslySetInnerHTML:{__html:b}}),m2(of.Provider,{value:Object.assign(Object.assign({},_),{transTime:l,containerRef:a,modalState:c,oneModalIsOpen:d,isModalOpen:D,closeOnBlur:m,bodyScrollIsLocked:h,classPrefix:e,closeAllModals:I,setCloseOnBlur:p,openModal:w,closeModal:T,toggleModal:R,setBodyScrollLock:x,setContainerRef:S}),children:i})]})};import{usePathname as w9,useRouter as S9}from"next/navigation.js";import{formatAdminURL as I9}from"payload/shared";import*as b2 from"qs-esm";import ff,{createContext as _9,use as T9,useCallback as ji,useEffect as pf,useState as el}from"react";import{c as p9}from"react/compiler-runtime";import{jsx as h9}from"react/jsx-runtime";import{useRouter as g9}from"next/navigation.js";import{formatAdminURL as b9}from"payload/shared";import"react";import{c as m9}from"react/compiler-runtime";import{jsx as Wc,jsxs as Hb}from"react/jsx-runtime";import f9 from"react";import{c as zb}from"react/compiler-runtime";import{jsx as ds,jsxs as df}from"react/jsx-runtime";import{createContext as a9,use as l9,useLayoutEffect as c9,useState as u9}from"react";import{jsx as n9}from"react/jsx-runtime";import"react";var Vc="gutter",Co=t=>{let{children:e,className:o,left:n=!0,negativeLeft:r=!1,negativeRight:s=!1,ref:i,right:l=!0}=t,a=n&&!r,c=l&&!s;return n9("div",{className:[Vc,a&&`${Vc}--left`,c&&`${Vc}--right`,r&&`${Vc}--negative-left`,s&&`${Vc}--negative-right`,o].filter(Boolean).join(" "),ref:i,children:e})};import{c as s9}from"react/compiler-runtime";import{useId as i9}from"react";var Gc=t=>{let e=s9(3),o=i9(),n=dt(),r=`${t}-${o}`,s;return e[0]!==n||e[1]!==r?(s=zc({slug:r,depth:n}),e[0]=n,e[1]=r,e[2]=s):s=e[2],s};var nn="drawer",Wb=100,zc=({slug:t,depth:e})=>`drawer_${e}_${t}`,ms=t=>{let e=zb(4),{slug:o,children:n,className:r,disabled:s,onClick:i,...l}=t,{openModal:a}=ne(),c;return e[0]!==i||e[1]!==a||e[2]!==o?(c=d=>{a(o),typeof i=="function"&&i(d)},e[0]=i,e[1]=a,e[2]=o,e[3]=c):c=e[3],ds("button",{className:r,disabled:s,onClick:c,type:"button",...l,children:n})},At=t=>{let e=zb(22),{slug:o,children:n,className:r,gutter:s,Header:i,hoverTitle:l,title:a}=t,c=s===void 0?!0:s,{t:u}=E(),{closeModal:d,modalState:f}=ne(),m=jr(),p=!!f[o]?.isOpen,[h,g]=u9(p),b,C;if(e[0]!==p?(b=()=>{g(p)},C=[p],e[0]=p,e[1]=b,e[2]=C):(b=e[1],C=e[2]),c9(b,C),p){let v=h&&`${nn}--is-open`,y=m>1&&`${nn}--nested`,x;e[3]!==r||e[4]!==v||e[5]!==y?(x=[r,nn,v,y].filter(Boolean),e[3]=r,e[4]=v,e[5]=y,e[6]=x):x=e[6];let S=x.join(" "),w=Wb+m,T;if(e[7]!==i||e[8]!==n||e[9]!==d||e[10]!==m||e[11]!==c||e[12]!==l||e[13]!==o||e[14]!==u||e[15]!==S||e[16]!==w||e[17]!==a){let I;e[19]!==d||e[20]!==o?(I=()=>d(o),e[19]=d,e[20]=o,e[21]=I):I=e[21],T=ds(d9,{children:df(vr,{className:S,closeOnBlur:!1,slug:o,style:{zIndex:w},children:[(!m||m===1)&&ds("div",{className:`${nn}__blur-bg`}),ds("button",{"aria-label":u("general:close"),className:`${nn}__close`,id:`close-drawer__${o}`,onClick:I,type:"button"}),df("div",{className:`${nn}__content`,style:{width:`calc(100% - (${m} * var(--gutter-h)))`},children:[ds("div",{className:`${nn}__blur-bg-content`}),df(Co,{className:`${nn}__content-children`,left:c,right:c,children:[i,i===void 0&&df("div",{className:`${nn}__header`,children:[ds("h2",{className:`${nn}__header__title`,title:l?a:null,children:a}),ds("button",{"aria-label":u("general:close"),className:`${nn}__header__close`,id:`close-drawer__${o}`,onClick:()=>d(o),type:"button",children:ds(bt,{})})]}),n]})]})]})}),e[7]=i,e[8]=n,e[9]=d,e[10]=m,e[11]=c,e[12]=l,e[13]=o,e[14]=u,e[15]=S,e[16]=w,e[17]=a,e[18]=T}else T=e[18];return T}return null},p2=a9(1),d9=t=>{let e=zb(3),{children:o}=t,r=jr()+1,s;return e[0]!==o||e[1]!==r?(s=ds(p2,{value:r,children:o}),e[0]=o,e[1]=r,e[2]=s):s=e[2],s},jr=()=>l9(p2);var mf="confirmation-modal";function rt(t){let e=m9(25),{body:o,cancelLabel:n,className:r,confirmingLabel:s,confirmLabel:i,heading:l,modalSlug:a,onCancel:c,onConfirm:u}=t,d=jr(),[f,m]=f9.useState(!1),{closeModal:p,isModalOpen:h}=ne(),{t:g}=E(),b;e[0]!==p||e[1]!==f||e[2]!==a||e[3]!==u?(b=async()=>{f||(m(!0),typeof u=="function"&&await u(),m(!1),p(a))},e[0]=p,e[1]=f,e[2]=a,e[3]=u,e[4]=b):b=e[4];let C=b,v;e[5]!==p||e[6]!==f||e[7]!==a||e[8]!==c?(v=()=>{f||(p(a),typeof c=="function"&&c())},e[5]=p,e[6]=f,e[7]=a,e[8]=c,e[9]=v):v=e[9];let y=v;if(!h(a))return null;let x;e[10]!==r?(x=[mf,r].filter(Boolean),e[10]=r,e[11]=x):x=e[11];let S=x.join(" "),w=Wb+d,T;return e[12]!==o||e[13]!==n||e[14]!==i||e[15]!==f||e[16]!==s||e[17]!==l||e[18]!==a||e[19]!==y||e[20]!==C||e[21]!==g||e[22]!==S||e[23]!==w?(T=Wc(vr,{className:S,closeOnBlur:!1,slug:a,style:{zIndex:w},children:Hb("div",{className:`${mf}__wrapper`,children:[Hb("div",{className:`${mf}__content`,children:[typeof l=="string"?Wc("h1",{children:l}):l,typeof o=="string"?Wc("p",{children:o}):o]}),Hb("div",{className:`${mf}__controls`,children:[Wc(ee,{buttonStyle:"secondary",disabled:f,id:"confirm-cancel",onClick:y,size:"large",type:"button",children:n||g("general:cancel")}),Wc(ee,{id:"confirm-action",onClick:C,size:"large",children:f?s||`${g("general:loading")}...`:i||g("general:confirm")})]})]})}),e[12]=o,e[13]=n,e[14]=i,e[15]=f,e[16]=s,e[17]=l,e[18]=a,e[19]=y,e[20]=C,e[21]=g,e[22]=S,e[23]=w,e[24]=T):T=e[24],T}var Ub="stay-logged-in",h2=()=>{let t=p9(11),{refreshCookie:e}=De(),o=g9(),{config:n}=z(),{admin:r,routes:s}=n,{routes:i}=r,{logout:l}=i,{admin:a}=s,{t:c}=E(),{startRouteTransition:u}=qe(),d;t[0]!==a||t[1]!==l||t[2]!==o||t[3]!==u?(d=()=>u(()=>o.push(b9({adminRoute:a,path:l}))),t[0]=a,t[1]=l,t[2]=o,t[3]=u,t[4]=d):d=t[4];let f=d,m;t[5]!==e?(m=()=>{e()},t[5]=e,t[6]=m):m=t[6];let p=m,h;return t[7]!==p||t[8]!==f||t[9]!==c?(h=h9(rt,{body:c("authentication:youAreInactive"),cancelLabel:c("authentication:stayLoggedIn"),confirmLabel:c("authentication:logOut"),heading:c("authentication:stayLoggedIn"),modalSlug:Ub,onCancel:p,onConfirm:f}),t[7]=p,t[8]=f,t[9]=c,t[10]=h):h=t[10],h};import{c as v9}from"react/compiler-runtime";import{useInsertionEffect as y9,useRef as C9}from"react";function ut(t){let e=v9(4),o=C9(t),n,r;e[0]!==t?(n=()=>{o.current=t},r=[t],e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]),y9(n,r);let s;return e[3]===Symbol.for("react.memo_cache_sentinel")?(s=(...i)=>{let l=i,a=o.current;return a(...l)},e[3]=s):s=e[3],s}import*as g2 from"qs-esm";var Ue={delete:(t,e={headers:{}})=>{let o=e&&e.headers?{...e.headers}:{},n={...e,credentials:"include",headers:{...o},method:"delete"};return fetch(t,n)},get:(t,e={headers:{}})=>{let o="";return e.params&&(o=g2.stringify(e.params,{addQueryPrefix:!0})),fetch(`${t}${o}`,{credentials:"include",...e})},patch:(t,e={headers:{}})=>{let o=e&&e.headers?{...e.headers}:{},n={...e,credentials:"include",headers:{...o},method:"PATCH"};return fetch(t,n)},post:(t,e={headers:{}})=>{let o=e&&e.headers?{...e.headers}:{},n={...e,credentials:"include",headers:{...o},method:"post"};return fetch(`${t}`,n)},put:(t,e={headers:{}})=>{let o=e&&e.headers?{...e.headers}:{},n={...e,credentials:"include",headers:{...o},method:"put"};return fetch(t,n)}};var v2=_9({}),F9=2147483647;function Xb({children:t,permissions:e,user:o}){let n=w9(),r=S9(),{config:s}=z(),{admin:{autoLogin:i,autoRefresh:l,routes:{inactivity:a},user:c},routes:{admin:u,api:d},serverURL:f}=s,{i18n:m}=E(),{closeAllModals:p,openModal:h}=ne(),{startRouteTransition:g}=qe(),[b,C]=el(o),[v,y]=el(),[x,S]=el(),[w,T]=el(e),[I,R]=el(12e4),[D,_]=el(!1),F=ff.useRef(null),A=ff.useRef(null),$=ff.useRef(null),P=b?.id,j=ji(()=>{g(()=>r.replace(I9({adminRoute:u,path:`${a}${window.location.pathname.startsWith(u)?`?redirect=${encodeURIComponent(window.location.pathname)}`:""}`}))),p()},[r,u,a,p,g]),B=ji(()=>{C(null),y(void 0),S(void 0),clearTimeout(F.current)},[]),L=ut(()=>{l?U():h(Ub)}),N=ji(Z=>{if(clearTimeout(A.current),clearTimeout($.current),Z?.user){C(Z.user),y(Z.token),S(Z.exp*1e3);let Y=Math.max(0,Math.min((Z.exp??0)*1e3-Date.now(),F9));if(Y){let W=Math.min(6e4,Y/2);R(W),A.current=setTimeout(L,Math.max(Y-W,0)),$.current=setTimeout(()=>{B(),j()},Y)}}else B()},[j,B]),M=ji(Z=>{if(!P)return;let Y=Math.max(0,(x??0)-Date.now());(Z||x&&Y<I*2)&&(clearTimeout(F.current),F.current=setTimeout(async()=>{try{let W=await Ue.post(`${f}${d}/${c}/refresh-token?refresh`,{headers:{"Accept-Language":m.language}});if(W.status===200){let se=await W.json();N(se)}else N(null),j()}catch(W){oe.error(W.message)}},1e3))},[d,m.language,j,f,N,x,c,I,P]),k=ji(async Z=>{try{let Y=await Ue.post(`${f}${d}/${c}/refresh-token`,{headers:{"Accept-Language":m.language}});if(Y.status===200){let W=await Y.json();return Z||N(W),W.user}b&&(N(null),j())}catch(Y){oe.error(`Refreshing token failed: ${Y.message}`)}return null},[d,m.language,j,f,N,c,b]),O=ji(async()=>{try{b&&b.collection&&(N(null),await Ue.post(`${f}${d}/${b.collection}/logout`))}catch{}return!0},[d,f,N,b]),V=ji(async({locale:Z}={})=>{let Y=b2.stringify({locale:Z},{addQueryPrefix:!0});try{let W=await Ue.get(`${f}${d}/access${Y}`,{headers:{"Accept-Language":m.language}});if(W.status===200){let se=await W.json();T(se)}else throw new Error(`Fetching permissions failed with status code ${W.status}`)}catch(W){oe.error(`Refreshing permissions failed: ${W.message}`)}},[f,d,m]),G=ff.useCallback(async()=>{try{let Z=await Ue.get(`${f}${d}/${c}/me`,{credentials:"include",headers:{"Accept-Language":m.language}});if(Z.status===200){let Y=await Z.json();return N(Y),Y?.user||null}}catch(Z){oe.error(`Fetching user failed: ${Z.message}`)}return null},[f,d,c,m.language,N]),U=ut(M);pf(()=>{U()},[n]);let H=ut(G);return pf(()=>{async function Z(){await H(),_(!0)}Z()},[]),pf(()=>{!b&&i&&!i.prefillOnly&&H()},[b,i]),pf(()=>()=>{clearTimeout(F.current),clearTimeout(A.current),clearTimeout($.current)},[]),!b&&!D?null:x9(v2,{value:{fetchFullUser:G,logOut:O,permissions:w,refreshCookie:M,refreshCookieAsync:k,refreshPermissions:V,setPermissions:T,setUser:N,token:v,tokenExpirationMs:x,user:b},children:t})}var De=()=>T9(v2);var S2=x2({}),I2=x2({localeIsLoading:!1,setLocaleIsLoading:t=>{}}),N9=async(t,e)=>await fetch(`${e}/payload-preferences/${t}`,{credentials:"include",headers:{"Content-Type":"application/json"},method:"GET"})?.then(o=>o.json()),Zb=t=>{let e=D9(26),{children:o,locale:n}=t,{config:r}=z(),{localization:s,routes:i,serverURL:l}=r,a=s===void 0?!1:s,{api:c}=i,{user:u}=De(),d=a?a.defaultLocale:"en",f=R9(),m;e[0]!==f?(m=f.get("locale"),e[0]=f,e[1]=m):m=e[1];let p=m,h;e[2]!==d||e[3]!==n||e[4]!==p||e[5]!==a?(h=()=>!a||a&&!a.locales.length?{}:Zs(a,p)||Zs(a,n)||Zs(a,d)||Zs(a,a.locales[0].code),e[2]=d,e[3]=n,e[4]=p,e[5]=a,e[6]=h):h=e[6];let[g,b]=A9.useState(h),[C,v]=E9(!1),y=P9(g),x,S;e[7]!==g?(x=()=>{g.code!==y.current.code&&v(!1),y.current=g},S=[g],e[7]=g,e[8]=x,e[9]=S):(x=e[8],S=e[9]),C2(x,S);let w=`${l}${c}`,T;e[10]!==d||e[11]!==w||e[12]!==p||e[13]!==a||e[14]!==u?.id?(T=()=>{(async function(){if(a&&u?.id){let A=p||await N9("locale",w)?.then(L9),$=Zs(a,A)||Zs(a,d)||Zs(a,a?.locales?.[0]?.code);$&&b($)}})()},e[10]=d,e[11]=w,e[12]=p,e[13]=a,e[14]=u?.id,e[15]=T):T=e[15];let I=u?.id,R;e[16]!==d||e[17]!==w||e[18]!==p||e[19]!==a||e[20]!==I?(R=[d,a,w,p,I],e[16]=d,e[17]=w,e[18]=p,e[19]=a,e[20]=I,e[21]=R):R=e[21],C2(T,R);let D;return e[22]!==o||e[23]!==C||e[24]!==g?(D=y2(S2,{value:g,children:y2(I2,{value:{localeIsLoading:C,setLocaleIsLoading:v},children:o})}),e[22]=o,e[23]=C,e[24]=g,e[25]=D):D=e[25],D},hf=()=>w2(I2),Se=()=>w2(S2);function L9(t){return t.value}var gf=(t,e,o)=>{if(t)return`field-${t.replace(/\./g,"__")}${e>1?`-${e}`:""}${o?`-${o}`:""}`};var Fe=t=>{let{as:e,hideLocale:o,htmlFor:n,label:r,localized:s,path:i,required:l,unstyled:a}=t,c=e===void 0?"label":e,u=o===void 0?!1:o,d=s===void 0?!1:s,f=l===void 0?!1:l,m=a===void 0?!1:a,{uuid:p}=ze(),h=dt(),g=n||gf(i,h,p),{i18n:b}=E(),{code:C,label:v}=Se(),y=c==="label"?g?"label":"span":c||"span";return r?_2(y,{className:`field-label${m?" unstyled":""}`,htmlFor:g,children:[k9(r,b),f&&!m&&$9("span",{className:"required",children:"*"}),d&&!u&&_2("span",{className:"localized",children:["\u2014 ",typeof v=="string"?v:C]})]}):null};var bf=({collapsed:t,rowID:e,rows:o})=>o.reduce((n,r)=>(e===r.id&&(r.collapsed=t),r.collapsed&&n.collapsedIDs.push(r.id),n.updatedRows.push(r),n),{collapsedIDs:[],updatedRows:[]}),vf=({collapsed:t,rows:e})=>e.reduce((o,n)=>(n.collapsed=t,t&&o.collapsedIDs.push(n.id),o.updatedRows.push(n),o),{collapsedIDs:[],updatedRows:[]});import{c as j$}from"react/compiler-runtime";import{jsx as F3}from"react/jsx-runtime";import*as D3 from"react";import{jsx as Kc,jsxs as N$}from"react/jsx-runtime";import{rtlLanguages as L$}from"@payloadcms/translations";import{useCallback as T3,useMemo as $$}from"react";import{c as F$}from"react/compiler-runtime";import l1,{useRef as x3}from"react";import{c as j9}from"react/compiler-runtime";import{useEffect as B9,useRef as M9}from"react";var Bi=(t,e,o)=>{let n=j9(9),r;n[0]!==o?(r=o===void 0?[]:o,n[0]=o,n[1]=r):r=n[1];let s=r,i;n[2]===Symbol.for("react.memo_cache_sentinel")?(i=Date.now(),n[2]=i):i=n[2];let l=M9(i),a;n[3]!==t||n[4]!==e?(a=()=>{let u=setTimeout(()=>{Date.now()-l.current>=e&&(t(),l.current=Date.now())},e-(Date.now()-l.current));return()=>{clearTimeout(u)}},n[3]=t,n[4]=e,n[5]=a):a=n[5];let c;n[6]!==e||n[7]!==s?(c=[e,...s],n[6]=e,n[7]=s,n[8]=c):c=n[8],B9(a,c)};import{jsx as _f}from"react/jsx-runtime";import*as v3 from"qs-esm";import y$,{createContext as C$,use as x$,useCallback as sl,useEffect as g3,useMemo as w$,useRef as b3,useState as Zc}from"react";import{getTranslation as i$}from"@payloadcms/translations";var O9={},Hc={};function tl(t,e){try{let n=(O9[t]||=new Intl.DateTimeFormat("en-GB",{timeZone:t,hour:"numeric",timeZoneName:"longOffset"}).format)(e).split("GMT")[1]||"";return n in Hc?Hc[n]:T2(n,n.split(":"))}catch{if(t in Hc)return Hc[t];let o=t?.match(V9);return o?T2(t,o.slice(1)):NaN}}var V9=/([+-]\d\d):?(\d\d)?/;function T2(t,e){let o=+e[0],n=+(e[1]||0);return Hc[t]=o>0?o*60+n:o*60-n}var Qt=class t extends Date{constructor(...e){super(),e.length>1&&typeof e[e.length-1]=="string"&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(tl(this.timeZone,this))?this.setTime(NaN):e.length?typeof e[0]=="number"&&(e.length===1||e.length===2&&typeof e[1]!="number")?this.setTime(e[0]):typeof e[0]=="string"?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),D2(this,NaN),Yb(this)):this.setTime(Date.now())}static tz(e,...o){return o.length?new t(...o,e):new t(Date.now(),e)}withTimeZone(e){return new t(+this,e)}getTimezoneOffset(){return-tl(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),Yb(this),+this}[Symbol.for("constructDateFrom")](e){return new t(+new Date(e),this.timeZone)}},F2=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(t=>{if(!F2.test(t))return;let e=t.replace(F2,"$1UTC");Qt.prototype[e]&&(t.startsWith("get")?Qt.prototype[t]=function(){return this.internal[e]()}:(Qt.prototype[t]=function(){return Date.prototype[e].apply(this.internal,arguments),G9(this),+this},Qt.prototype[e]=function(){return Date.prototype[e].apply(this,arguments),Yb(this),+this}))});function Yb(t){t.internal.setTime(+t),t.internal.setUTCMinutes(t.internal.getUTCMinutes()-t.getTimezoneOffset())}function G9(t){Date.prototype.setFullYear.call(t,t.internal.getUTCFullYear(),t.internal.getUTCMonth(),t.internal.getUTCDate()),Date.prototype.setHours.call(t,t.internal.getUTCHours(),t.internal.getUTCMinutes(),t.internal.getUTCSeconds(),t.internal.getUTCMilliseconds()),D2(t)}function D2(t){let e=tl(t.timeZone,t),o=new Date(+t);o.setUTCHours(o.getUTCHours()-1);let n=-new Date(+t).getTimezoneOffset(),r=-new Date(+o).getTimezoneOffset(),s=n-r,i=Date.prototype.getHours.apply(t)!==t.internal.getUTCHours();s&&i&&t.internal.setUTCMinutes(t.internal.getUTCMinutes()+s);let l=n-e;l&&Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+l);let a=tl(t.timeZone,t),u=-new Date(+t).getTimezoneOffset()-a,d=a!==e,f=u-l;if(d&&f){Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+f);let m=tl(t.timeZone,t),p=a-m;p&&(t.internal.setUTCMinutes(t.internal.getUTCMinutes()+p),Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+p))}}var z9=Math.pow(10,8)*24*60*60*1e3,Aae=-z9,yf=6048e5,R2=864e5;var Uc=43200,Jb=1440;var W9=3600;var A2=W9*24,Pae=A2*7,H9=A2*365.2425,U9=H9/12,Eae=U9*3,qb=Symbol.for("constructDateFrom");function io(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&qb in t?t[qb](e):t instanceof Date?new t.constructor(e):new Date(e)}function it(t,e){return io(e||t,t)}var X9={};function Pn(){return X9}function fs(t,e){let o=Pn(),n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,r=it(t,e?.in),s=r.getDay(),i=(s<n?7:0)+s-n;return r.setDate(r.getDate()-i),r.setHours(0,0,0,0),r}function Mi(t,e){return fs(t,{...e,weekStartsOn:1})}function Cf(t,e){let o=it(t,e?.in),n=o.getFullYear(),r=io(o,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);let s=Mi(r),i=io(o,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);let l=Mi(i);return o.getTime()>=s.getTime()?n+1:o.getTime()>=l.getTime()?n:n-1}function ol(t){let e=it(t),o=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return o.setUTCFullYear(e.getFullYear()),+t-+o}function En(t,...e){let o=io.bind(null,t||e.find(n=>typeof n=="object"));return e.map(o)}function Js(t,e){let o=it(t,e?.in);return o.setHours(0,0,0,0),o}function P2(t,e,o){let[n,r]=En(o?.in,t,e),s=Js(n),i=Js(r),l=+s-ol(s),a=+i-ol(i);return Math.round((l-a)/R2)}function E2(t,e){let o=Cf(t,e),n=io(e?.in||t,0);return n.setFullYear(o,0,4),n.setHours(0,0,0,0),Mi(n)}function rl(t,e){let o=+it(t)-+it(e);return o<0?-1:o>0?1:o}function xf(t){return io(t,Date.now())}function N2(t,e,o){let[n,r]=En(o?.in,t,e);return+Js(n)==+Js(r)}function L2(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function $2(t){return!(!L2(t)&&typeof t!="number"||isNaN(+it(t)))}function k2(t,e,o){let[n,r]=En(o?.in,t,e),s=n.getFullYear()-r.getFullYear(),i=n.getMonth()-r.getMonth();return s*12+i}function j2(t){return e=>{let n=(t?Math[t]:Math.trunc)(e);return n===0?0:n}}function B2(t,e){return+it(t)-+it(e)}function wf(t,e){let o=it(t,e?.in);return o.setHours(23,59,59,999),o}function M2(t,e){let o=it(t,e?.in),n=o.getMonth();return o.setFullYear(o.getFullYear(),n+1,0),o.setHours(23,59,59,999),o}function O2(t,e){let o=it(t,e?.in);return+wf(o,e)==+M2(o,e)}function V2(t,e,o){let[n,r,s]=En(o?.in,t,t,e),i=rl(r,s),l=Math.abs(k2(r,s));if(l<1)return 0;r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*l);let a=rl(r,s)===-i;O2(n)&&l===1&&rl(n,s)===1&&(a=!1);let c=i*(l-+a);return c===0?0:c}function G2(t,e,o){let n=B2(t,e)/1e3;return j2(o?.roundingMethod)(n)}function z2(t,e){let o=it(t,e?.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}function W2(t){return wf(Date.now(),t)}function H2(t,e){let o=it(t,e?.in);return P2(o,z2(o))+1}function U2(t,e){let o=it(t,e?.in),n=+Mi(o)-+E2(o);return Math.round(n/yf)+1}function Sf(t,e){let o=it(t,e?.in),n=o.getFullYear(),r=Pn(),s=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=io(e?.in||t,0);i.setFullYear(n+1,0,s),i.setHours(0,0,0,0);let l=fs(i,e),a=io(e?.in||t,0);a.setFullYear(n,0,s),a.setHours(0,0,0,0);let c=fs(a,e);return+o>=+l?n+1:+o>=+c?n:n-1}function X2(t,e){let o=Pn(),n=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,r=Sf(t,e),s=io(e?.in||t,0);return s.setFullYear(r,0,n),s.setHours(0,0,0,0),fs(s,e)}function Z2(t,e){let o=it(t,e?.in),n=+fs(o,e)-+X2(o,e);return Math.round(n/yf)+1}function ft(t,e){let o=t<0?"-":"",n=Math.abs(t).toString().padStart(e,"0");return o+n}var ps={y(t,e){let o=t.getFullYear(),n=o>0?o:1-o;return ft(e==="yy"?n%100:n,e.length)},M(t,e){let o=t.getMonth();return e==="M"?String(o+1):ft(o+1,2)},d(t,e){return ft(t.getDate(),e.length)},a(t,e){let o=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return o.toUpperCase();case"aaa":return o;case"aaaaa":return o[0];case"aaaa":default:return o==="am"?"a.m.":"p.m."}},h(t,e){return ft(t.getHours()%12||12,e.length)},H(t,e){return ft(t.getHours(),e.length)},m(t,e){return ft(t.getMinutes(),e.length)},s(t,e){return ft(t.getSeconds(),e.length)},S(t,e){let o=e.length,n=t.getMilliseconds(),r=Math.trunc(n*Math.pow(10,o-3));return ft(r,e.length)}};var nl={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Qb={G:function(t,e,o){let n=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})}},y:function(t,e,o){if(e==="yo"){let n=t.getFullYear(),r=n>0?n:1-n;return o.ordinalNumber(r,{unit:"year"})}return ps.y(t,e)},Y:function(t,e,o,n){let r=Sf(t,n),s=r>0?r:1-r;if(e==="YY"){let i=s%100;return ft(i,2)}return e==="Yo"?o.ordinalNumber(s,{unit:"year"}):ft(s,e.length)},R:function(t,e){let o=Cf(t);return ft(o,e.length)},u:function(t,e){let o=t.getFullYear();return ft(o,e.length)},Q:function(t,e,o){let n=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return ft(n,2);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,e,o){let n=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return ft(n,2);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,e,o){let n=t.getMonth();switch(e){case"M":case"MM":return ps.M(t,e);case"Mo":return o.ordinalNumber(n+1,{unit:"month"});case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})}},L:function(t,e,o){let n=t.getMonth();switch(e){case"L":return String(n+1);case"LL":return ft(n+1,2);case"Lo":return o.ordinalNumber(n+1,{unit:"month"});case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})}},w:function(t,e,o,n){let r=Z2(t,n);return e==="wo"?o.ordinalNumber(r,{unit:"week"}):ft(r,e.length)},I:function(t,e,o){let n=U2(t);return e==="Io"?o.ordinalNumber(n,{unit:"week"}):ft(n,e.length)},d:function(t,e,o){return e==="do"?o.ordinalNumber(t.getDate(),{unit:"date"}):ps.d(t,e)},D:function(t,e,o){let n=H2(t);return e==="Do"?o.ordinalNumber(n,{unit:"dayOfYear"}):ft(n,e.length)},E:function(t,e,o){let n=t.getDay();switch(e){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})}},e:function(t,e,o,n){let r=t.getDay(),s=(r-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return ft(s,2);case"eo":return o.ordinalNumber(s,{unit:"day"});case"eee":return o.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(r,{width:"short",context:"formatting"});case"eeee":default:return o.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,o,n){let r=t.getDay(),s=(r-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return ft(s,e.length);case"co":return o.ordinalNumber(s,{unit:"day"});case"ccc":return o.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(r,{width:"narrow",context:"standalone"});case"cccccc":return o.day(r,{width:"short",context:"standalone"});case"cccc":default:return o.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,o){let n=t.getDay(),r=n===0?7:n;switch(e){case"i":return String(r);case"ii":return ft(r,e.length);case"io":return o.ordinalNumber(r,{unit:"day"});case"iii":return o.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return o.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return o.day(n,{width:"short",context:"formatting"});case"iiii":default:return o.day(n,{width:"wide",context:"formatting"})}},a:function(t,e,o){let r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,o){let n=t.getHours(),r;switch(n===12?r=nl.noon:n===0?r=nl.midnight:r=n/12>=1?"pm":"am",e){case"b":case"bb":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,o){let n=t.getHours(),r;switch(n>=17?r=nl.evening:n>=12?r=nl.afternoon:n>=4?r=nl.morning:r=nl.night,e){case"B":case"BB":case"BBB":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,o){if(e==="ho"){let n=t.getHours()%12;return n===0&&(n=12),o.ordinalNumber(n,{unit:"hour"})}return ps.h(t,e)},H:function(t,e,o){return e==="Ho"?o.ordinalNumber(t.getHours(),{unit:"hour"}):ps.H(t,e)},K:function(t,e,o){let n=t.getHours()%12;return e==="Ko"?o.ordinalNumber(n,{unit:"hour"}):ft(n,e.length)},k:function(t,e,o){let n=t.getHours();return n===0&&(n=24),e==="ko"?o.ordinalNumber(n,{unit:"hour"}):ft(n,e.length)},m:function(t,e,o){return e==="mo"?o.ordinalNumber(t.getMinutes(),{unit:"minute"}):ps.m(t,e)},s:function(t,e,o){return e==="so"?o.ordinalNumber(t.getSeconds(),{unit:"second"}):ps.s(t,e)},S:function(t,e){return ps.S(t,e)},X:function(t,e,o){let n=t.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return J2(n);case"XXXX":case"XX":return Oi(n);case"XXXXX":case"XXX":default:return Oi(n,":")}},x:function(t,e,o){let n=t.getTimezoneOffset();switch(e){case"x":return J2(n);case"xxxx":case"xx":return Oi(n);case"xxxxx":case"xxx":default:return Oi(n,":")}},O:function(t,e,o){let n=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Y2(n,":");case"OOOO":default:return"GMT"+Oi(n,":")}},z:function(t,e,o){let n=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Y2(n,":");case"zzzz":default:return"GMT"+Oi(n,":")}},t:function(t,e,o){let n=Math.trunc(+t/1e3);return ft(n,e.length)},T:function(t,e,o){return ft(+t,e.length)}};function Y2(t,e=""){let o=t>0?"-":"+",n=Math.abs(t),r=Math.trunc(n/60),s=n%60;return s===0?o+String(r):o+String(r)+e+ft(s,2)}function J2(t,e){return t%60===0?(t>0?"-":"+")+ft(Math.abs(t)/60,2):Oi(t,e)}function Oi(t,e=""){let o=t>0?"-":"+",n=Math.abs(t),r=ft(Math.trunc(n/60),2),s=ft(n%60,2);return o+r+e+s}var q2=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},Q2=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Z9=(t,e)=>{let o=t.match(/(P+)(p+)?/)||[],n=o[1],r=o[2];if(!r)return q2(t,e);let s;switch(n){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",q2(n,e)).replace("{{time}}",Q2(r,e))},K2={p:Q2,P:Z9};var Y9=/^D+$/,J9=/^Y+$/,q9=["D","DD","YY","YYYY"];function e3(t){return Y9.test(t)}function t3(t){return J9.test(t)}function o3(t,e,o){let n=Q9(t,e,o);if(console.warn(n),q9.includes(t))throw new RangeError(n)}function Q9(t,e,o){let n=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${n} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var K9=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,e$=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,t$=/^'([^]*?)'?$/,o$=/''/g,r$=/[a-zA-Z]/;function Kb(t,e,o){let n=Pn(),r=o?.locale??n.locale??Tc,s=o?.firstWeekContainsDate??o?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=o?.weekStartsOn??o?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,l=it(t,o?.in);if(!$2(l))throw new RangeError("Invalid time value");let a=e.match(e$).map(u=>{let d=u[0];if(d==="p"||d==="P"){let f=K2[d];return f(u,r.formatLong)}return u}).join("").match(K9).map(u=>{if(u==="''")return{isToken:!1,value:"'"};let d=u[0];if(d==="'")return{isToken:!1,value:n$(u)};if(Qb[d])return{isToken:!0,value:u};if(d.match(r$))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});r.localize.preprocessor&&(a=r.localize.preprocessor(l,a));let c={firstWeekContainsDate:s,weekStartsOn:i,locale:r};return a.map(u=>{if(!u.isToken)return u.value;let d=u.value;(!o?.useAdditionalWeekYearTokens&&t3(d)||!o?.useAdditionalDayOfYearTokens&&e3(d))&&o3(d,e,String(t));let f=Qb[d[0]];return f(l,d,r.localize,c)}).join("")}function n$(t){let e=t.match(t$);return e?e[1].replace(o$,"'"):t}function r3(t,e,o){let n=Pn(),r=o?.locale??n.locale??Tc,s=2520,i=rl(t,e);if(isNaN(i))throw new RangeError("Invalid time value");let l=Object.assign({},o,{addSuffix:o?.addSuffix,comparison:i}),[a,c]=En(o?.in,...i>0?[e,t]:[t,e]),u=G2(c,a),d=(ol(c)-ol(a))/1e3,f=Math.round((u-d)/60),m;if(f<2)return o?.includeSeconds?u<5?r.formatDistance("lessThanXSeconds",5,l):u<10?r.formatDistance("lessThanXSeconds",10,l):u<20?r.formatDistance("lessThanXSeconds",20,l):u<40?r.formatDistance("halfAMinute",0,l):u<60?r.formatDistance("lessThanXMinutes",1,l):r.formatDistance("xMinutes",1,l):f===0?r.formatDistance("lessThanXMinutes",1,l):r.formatDistance("xMinutes",f,l);if(f<45)return r.formatDistance("xMinutes",f,l);if(f<90)return r.formatDistance("aboutXHours",1,l);if(f<Jb){let p=Math.round(f/60);return r.formatDistance("aboutXHours",p,l)}else{if(f<s)return r.formatDistance("xDays",1,l);if(f<Uc){let p=Math.round(f/Jb);return r.formatDistance("xDays",p,l)}else if(f<Uc*2)return m=Math.round(f/Uc),r.formatDistance("aboutXMonths",m,l)}if(m=V2(c,a),m<12){let p=Math.round(f/Uc);return r.formatDistance("xMonths",p,l)}else{let p=m%12,h=Math.trunc(m/12);return p<3?r.formatDistance("aboutXYears",h,l):p<9?r.formatDistance("overXYears",h,l):r.formatDistance("almostXYears",h+1,l)}}function n3(t,e){return r3(t,xf(t),e)}function sn(t,e){let o=s$(e)?new e(0):io(e,0);return o.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),o.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),o}function s$(t){return typeof t=="function"&&t.prototype?.constructor===t}function s3(t,e){return N2(io(e?.in||t,t),xf(e?.in||t))}var Br=({date:t,i18n:e,pattern:o,timezone:n})=>{let r=new Qt(new Date(t));if(n){let s=Qt.tz(n),i=r.withTimeZone(n),l=sn(i,s);return e.dateFNS?Kb(l,o,{locale:e.dateFNS}):`${e.t("general:loading")}...`}return e.dateFNS?Kb(r,o,{locale:e.dateFNS}):`${e.t("general:loading")}...`},e1=({date:t,i18n:e})=>{let o=typeof t=="string"?new Date(t):t;return e?.dateFNS?n3(o,{locale:e.dateFNS}):`${e.t("general:loading")}...`};function t1(t){return typeof t=="object"&&"root"in t}function If(t,e){for(let o of t)"text"in o&&o.text?e+=o.text:"children"in o||(e+=`[${o.type}]`),"children"in o&&o.children&&(e+=If(o.children,e));return e}var i3=t=>Array.isArray(t)?t.map(e=>typeof e=="object"&&e!==null?e.id:String(e)).filter(Boolean).join(", "):typeof t=="object"&&t!==null?t.id||"":String(t);var Zo=({collectionConfig:t,data:e,dateFormat:o,fallback:n,globalConfig:r,i18n:s})=>{let i;if(t){let l=t?.admin?.useAsTitle;if(l&&(i=e?.[l],i)){let a=t.fields.find(d=>"name"in d&&d.name===l),c=a?.type==="date",u=a?.type==="relationship";if(c){let d="date"in a.admin&&a?.admin?.date?.displayFormat||o;i=Br({date:i,i18n:s,pattern:d})||i}u&&(i=i3(e[l]))}}return r&&(i=i$(r?.label,s)||r?.slug),i&&t1(i)&&(i=If(i.root.children?.[0]?.children||[],"")),!i&&t1(n)&&(i=If(n.root.children?.[0]?.children||[],"")),i||(i=typeof n=="string"?n:`[${s.t("general:untitled")}]`),i};import{jsx as a$}from"react/jsx-runtime";import{createContext as l$,use as c$,useEffect as u$,useState as d$}from"react";var a3=l$({}),Do=()=>c$(a3),l3=({children:t})=>{let{id:e,collectionSlug:o,data:n,docConfig:r,globalSlug:s,initialData:i}=Re(),{config:{admin:{dateFormat:l}}}=z(),{i18n:a}=E(),[c,u]=d$(()=>Zo({collectionConfig:o?r:void 0,data:{...i||{},id:e},dateFormat:l,fallback:e?.toString(),globalConfig:s?r:void 0,i18n:a}));return u$(()=>{u(Zo({collectionConfig:o?r:void 0,data:{...n,id:e},dateFormat:l,fallback:e?.toString(),globalConfig:s?r:void 0,i18n:a}))},[n,l,a,e,o,r,s]),a$(a3,{value:{setDocumentTitle:u,title:c},children:t})};import{jsx as m$}from"react/jsx-runtime";import{dequal as c3}from"dequal/lite";import{createContext as f$,use as p$,useCallback as u3,useEffect as h$,useRef as r1}from"react";function o1(t,e){let o={...t};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(typeof e[n]=="object"&&!Array.isArray(e[n])&&t[n]?o[n]=o1(t[n],e[n]):o[n]=e[n]);return o}var m3=f$({}),d3=(t,e)=>({body:JSON.stringify({value:t}),headers:{"Accept-Language":e,"Content-Type":"application/json"}}),n1=({children:t})=>{let e=r1({}),o=r1({}),n=r1({}),{config:r}=z(),{user:s}=De(),{i18n:i}=E(),{routes:{api:l},serverURL:a}=r;h$(()=>{s||(o.current={})},[s]);let c=u3(async d=>{let f=o.current;if(typeof f[d]<"u")return f[d];let m=new Promise(p=>{(async()=>{let h=await Ue.get(`${a}${l}/payload-preferences/${d}`,{credentials:"include",headers:{"Accept-Language":i.language}}),g=null;h.status===200&&(g=(await h.json()).value),o.current[d]=g,p(g)})()});return f[d]=m,m},[i.language,l,o,a]),u=u3(async(d,f,m=!1)=>{if(m===!1){o.current[d]=f,await Ue.post(`${a}${l}/payload-preferences/${d}`,d3(f,i.language));return}let p=f,h=await c(d);if(typeof f=="object"&&typeof h=="object"&&typeof p=="object"){if(h&&(p=o1(h,p)),c3(p,h))return;n.current[d]={...n.current[d],...p}}else{if(p===h)return;n.current[d]=p}let g=async()=>{c3(n.current[d],o.current[d])||(o.current[d]=n.current[d],await Ue.post(`${a}${l}/payload-preferences/${d}`,d3(o.current[d],i.language)),delete n.current[d])};setTimeout(()=>{g()})},[l,c,i.language,n,a]);return e.current.getPreference=c,e.current.setPreference=u,m$(m3,{value:e.current,children:t})},Kt=()=>p$(m3);import{c as g$}from"react/compiler-runtime";import{jsx as b$}from"react/jsx-runtime";import s1 from"react";var f3=s1.createContext({getUploadEdits:()=>{},resetUploadEdits:void 0,updateUploadEdits:void 0,uploadEdits:void 0}),i1=t=>{let e=g$(10),{children:o,initialUploadEdits:n}=t,r;e[0]!==n?(r=n||{},e[0]=n,e[1]=r):r=e[1];let[s,i]=s1.useState(r),l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{i({})},e[2]=l):l=e[2];let a=l,c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=p=>{i(h=>({...h||{},...p||{}}))},e[3]=c):c=e[3];let u=c,d;e[4]!==s?(d=()=>s,e[4]=s,e[5]=d):d=e[5];let f=d,m;return e[6]!==o||e[7]!==f||e[8]!==s?(m=b$(f3,{value:{getUploadEdits:f,resetUploadEdits:a,updateUploadEdits:u,uploadEdits:s},children:o}),e[6]=o,e[7]=f,e[8]=s,e[9]=m):m=e[9],m},Vi=()=>s1.use(f3);import*as a1 from"qs-esm";import v$ from"react";var Xc=t=>{let{collectionSlug:e,docPermissions:o,globalSlug:n,isEditing:r}=t;return e?!!(r&&o?.update||!r&&o?.create):n?!!o?.update:!1};var p3=({id:t,collectionSlug:e,globalSlug:o})=>!!(o||e&&t);var h3=({id:t,api:e,collectionSlug:o,globalSlug:n,i18n:r,locale:s,permissions:i,serverURL:l,setDocPermissions:a,setHasPublishPermission:c,setHasSavePermission:u})=>v$.useCallback(async d=>{let f={locale:s||void 0},m=d?.id||t,p=p3({id:m,collectionSlug:o,globalSlug:n});if(p){let h=o?`/${o}/access/${m}`:n?`/globals/${n}/access`:null;if(h){let b=await(await fetch(`${l}${e}${h}?${a1.stringify(f)}`,{body:JSON.stringify({...d||{},_status:"draft"}),credentials:"include",headers:{"Accept-Language":r.language,"Content-Type":"application/json"},method:"post"})).json(),C=await fetch(`${l}${e}${h}?${a1.stringify(f)}`,{body:JSON.stringify({...d||{},_status:"published"}),credentials:"include",headers:{"Accept-Language":r.language,"Content-Type":"application/json"},method:"POST"}).then(v=>v.json());a(b),u(Xc({collectionSlug:o,docPermissions:b,globalSlug:n,isEditing:p})),c(C?.update)}}else{let h=o?i?.collections?.[o]:i?.globals?.[n];a(h),u(Xc({collectionSlug:o,docPermissions:h,globalSlug:n,isEditing:p}))}},[s,t,o,n,l,e,r.language,a,u,c,i?.collections,i?.globals]);var y3=C$({}),Re=()=>x$(y3),S$=({children:t,...e})=>{let{id:o,collectionSlug:n,currentEditor:r,docPermissions:s,globalSlug:i,hasPublishedDoc:l,hasPublishPermission:a,hasSavePermission:c,initialData:u,initialState:d,isLocked:f,lastUpdateTime:m,mostRecentVersionIsAutosaved:p,unpublishedVersionCount:h,versionCount:g}=e,[b,C]=or(s),[v,y]=or(c),[x,S]=or(a),{permissions:w}=De(),{config:{admin:{dateFormat:T},routes:{api:I},serverURL:R},getEntityConfig:D}=z(),_=D({collectionSlug:n}),F=D({globalSlug:i}),A=b3(new AbortController),$=_||F,{i18n:P}=E(),{uploadEdits:j}=Vi(),[B,L]=Zc(()=>Zo({collectionConfig:_,data:{...u||{},id:o},dateFormat:T,fallback:o?.toString(),globalConfig:F,i18n:P})),[N,M]=Zc(p),[k,O]=Zc(g),[V,G]=Zc(l),[U,H]=Zc(h),[Z,Y]=or(f),[W,se]=or(r),[J,ie]=or(m),[ae,he]=or(u),[be,fe]=or("idle"),Me=b3({hasShownLockedModal:!1,isLocked:!1,user:null}),xe=sl(Ae=>{fe(Ae)},[fe]),{getPreference:we,setPreference:Te}=Kt(),{code:Q}=Se(),{localeIsLoading:Ve}=hf(),Oe=w$(()=>d===void 0||u===void 0||Ve,[u,d,Ve]),le=`${R}${I}`,X,q,te;i&&(X=i,q="globals",te=`global-${X}`),n&&(X=n,q="collections",o&&(te=`collection-${X}-${o}`));let pe=sl(async(Ae,Ye)=>{try{let tt=Ye===i,Wt=await Ue.get(`${R}${I}/payload-locked-documents`,{credentials:"include",params:tt?{"where[globalSlug][equals]":Ye}:{"where[document.relationTo][equals]":Ye,"where[document.value][equals]":Ae}}),{docs:po}=await Wt.json();if(po?.length>0){let vo=po[0].id;await Ue.delete(`${R}${I}/payload-locked-documents/${vo}`,{credentials:"include",headers:{"Content-Type":"application/json"}}),Y(!1)}}catch(tt){console.error("Failed to unlock the document",tt)}},[R,I,i,Y]),K=sl(async(Ae,Ye,tt)=>{try{let Wt=Ye===i,po=await Ue.get(`${R}${I}/payload-locked-documents`,{credentials:"include",params:Wt?{"where[globalSlug][equals]":Ye}:{"where[document.relationTo][equals]":Ye,"where[document.value][equals]":Ae}}),{docs:vo}=await po.json();if(vo?.length>0){let Dt=vo[0].id,Wo=typeof tt=="object"?{relationTo:tt.collection,value:tt.id}:{relationTo:"users",value:tt};await Ue.patch(`${R}${I}/payload-locked-documents/${Dt}`,{body:JSON.stringify({user:Wo}),credentials:"include",headers:{"Content-Type":"application/json"}})}}catch(Wt){console.error("Failed to update the document editor",Wt)}},[R,I,i]),re=h3({id:o,api:I,collectionSlug:n,globalSlug:i,i18n:P,locale:Q,permissions:w,serverURL:R,setDocPermissions:C,setHasPublishPermission:S,setHasSavePermission:y}),ge=sl(()=>we(te),[we,te]),me=sl(async(Ae,Ye)=>{let tt=await ge();if(te)try{await Te(te,{...tt,fields:{...tt?.fields||{},[Ae]:{...tt?.fields?.[Ae],...Ye}}})}catch(Wt){console.error(Wt)}},[Te,te,ge]),ue=sl(()=>{let Ae=k+1;_&&_.versions?_.versions.maxPerDoc>0?O(Math.min(Ae,_.versions.maxPerDoc)):O(Ae):F&&F.versions&&(F.versions.max>0?O(Math.min(Ae,F.versions.max)):O(Ae))},[_,F,k]);g3(()=>{L(Zo({collectionConfig:_,data:{...ae,id:o},dateFormat:T,fallback:o?.toString(),globalConfig:F,i18n:P}))},[_,F,ae,T,P,o]),g3(()=>{let Ae=A.current;return()=>{if(Ae)try{Ae.abort()}catch{}}},[]);let ye=y$.useMemo(()=>`${`${le}${q==="globals"?"/globals":""}/${X}${o?`/${o}`:""}`}${v3.stringify({depth:0,"fallback-locale":"null",locale:Q,uploadEdits:j||void 0},{addQueryPrefix:!0})}`,[le,Q,q,o,X,j]),Ie={...e,action:ye,currentEditor:W,data:ae,docConfig:$,docPermissions:b,documentIsLocked:Z,documentLockState:Me,getDocPermissions:re,getDocPreferences:ge,hasPublishedDoc:V,hasPublishPermission:x,hasSavePermission:v,incrementVersionCount:ue,initialData:u,initialState:d,isInitializing:Oe,lastUpdateTime:J,mostRecentVersionIsAutosaved:N,preferencesKey:te,savedDocumentData:ae,setCurrentEditor:se,setData:he,setDocFieldPreferences:me,setDocumentIsLocked:Y,setDocumentTitle:L,setHasPublishedDoc:G,setLastUpdateTime:ie,setMostRecentVersionIsAutosaved:M,setUnpublishedVersionCount:H,setUploadStatus:xe,title:B,unlockDocument:pe,unpublishedVersionCount:U,updateDocumentEditor:K,updateSavedDocumentData:he,uploadStatus:be,versionCount:k};return _f(y3,{value:Ie,children:_f(l3,{children:t})})},Yc=t=>_f(i1,{children:_f(S$,{...t})});import{jsx as I$}from"react/jsx-runtime";import{createContext as _$,use as T$}from"react";var Tf=_$(""),Jc=({children:t,operation:e})=>I$(Tf,{value:e,children:t}),yr=()=>T$(Tf);import C3 from"react";var hs=C3.createContext(void 0),Ff=()=>{let t=C3.useContext(hs);if(t)return t};var D$=t=>{let e=F$(65),o;e[0]!==t?(o=t||{},e[0]=t,e[1]=o):o=e[1];let{disableFormData:n,hasRows:r,path:s,potentiallyStalePath:i,validate:l}=o,a=n===void 0?!1:n,c=Ff(),u=s||c||i,d=no(),f=$r(),m=Di(),{user:p}=De(),{id:h,collectionSlug:g}=Re(),b=yr(),C=Lt(R$),v;e[2]!==u?(v=be=>{let[fe]=be;return fe&&fe?.[u]||null},e[2]=u,e[3]=v):v=e[3];let y=Lt(v),{t:x}=E(),{config:S}=z(),{getData:w,getDataByPath:T,getSiblingData:I,setModified:R}=ze(),D=Oa(),_=y?.filterOptions,F=y?.value,A=y?.initialValue,$=typeof y?.valid=="boolean"?y.valid:!0,P=$===!1&&d,j=x3($),B=x3(y?.errorMessage),L;e[4]!==u?(L=u?u.split("."):[],e[4]=u,e[5]=L):L=e[5];let N=L,M;e[6]!==a||e[7]!==C||e[8]!==r||e[9]!==u||e[10]!==R?(M=(be,fe)=>{let Me=fe===void 0?!1:fe,we=be&&typeof be=="object"&&typeof be.preventDefault=="function"&&typeof be.stopPropagation=="function"?be.target.value:be;C({type:"UPDATE",disableFormData:a||r&&we>0,path:u,value:we}),Me||R(!0)},e[6]=a,e[7]=C,e[8]=r,e[9]=u,e[10]=R,e[11]=M):M=e[11];let k=M,O=y?.blocksFilterOptions,V=y?.customComponents,G=f||m,U=y?.errorMessage,H;e[12]!==y?.errorPaths?(H=y?.errorPaths||[],e[12]=y?.errorPaths,e[13]=H):H=e[13];let Z=y?.rows,Y=y?.selectFilterOptions,W=y?.valid,se;e[14]!==_||e[15]!==A||e[16]!==m||e[17]!==u||e[18]!==f||e[19]!==k||e[20]!==P||e[21]!==d||e[22]!==Z||e[23]!==Y||e[24]!==W||e[25]!==O||e[26]!==V||e[27]!==G||e[28]!==U||e[29]!==H||e[30]!==F?(se={blocksFilterOptions:O,customComponents:V,disabled:G,errorMessage:U,errorPaths:H,filterOptions:_,formInitializing:m,formProcessing:f,formSubmitted:d,initialValue:A,path:u,rows:Z,selectFilterOptions:Y,setValue:k,showError:P,valid:W,value:F},e[14]=_,e[15]=A,e[16]=m,e[17]=u,e[18]=f,e[19]=k,e[20]=P,e[21]=d,e[22]=Z,e[23]=Y,e[24]=W,e[25]=O,e[26]=V,e[27]=G,e[28]=U,e[29]=H,e[30]=F,e[31]=se):se=e[31];let J=se,ie;e[32]!==g||e[33]!==S||e[34]!==a||e[35]!==C||e[36]!==D||e[37]!==y||e[38]!==w||e[39]!==T||e[40]!==I||e[41]!==r||e[42]!==h||e[43]!==b||e[44]!==u||e[45]!==N||e[46]!==x||e[47]!==p||e[48]!==l||e[49]!==F?(ie=()=>{(async()=>{let fe=F;y?.rows&&Array.isArray(y.rows)&&(fe=T(u));let Me=B.current,xe=j.current,we=w(),Te=typeof l=="function"?await l(fe,{id:h,blockData:void 0,collectionSlug:g,data:D?.getData?D.getData():we,event:"onChange",operation:b,path:N,preferences:{},req:{payload:{config:S},t:x,user:p},siblingData:I(u)}):typeof B.current=="string"?B.current:j.current;if(typeof Te=="string"?(xe=!1,Me=Te):typeof Te=="boolean"&&(xe=Te,Me=void 0),xe!==j.current||Me!==B.current){j.current=xe,B.current=Me;let Q={type:"UPDATE",errorMessage:Me,path:u,rows:y?.rows,valid:xe,validate:l,value:F};(a||r&&typeof F=="number"&&F>0)&&(Q.disableFormData=!0),typeof C=="function"&&C(Q)}})()},e[32]=g,e[33]=S,e[34]=a,e[35]=C,e[36]=D,e[37]=y,e[38]=w,e[39]=T,e[40]=I,e[41]=r,e[42]=h,e[43]=b,e[44]=u,e[45]=N,e[46]=x,e[47]=p,e[48]=l,e[49]=F,e[50]=ie):ie=e[50];let ae=y?.rows,he;return e[51]!==g||e[52]!==a||e[53]!==C||e[54]!==w||e[55]!==T||e[56]!==I||e[57]!==h||e[58]!==b||e[59]!==u||e[60]!==ae||e[61]!==p||e[62]!==l||e[63]!==F?(he=[F,a,C,w,I,T,h,b,u,p,l,ae,g],e[51]=g,e[52]=a,e[53]=C,e[54]=w,e[55]=T,e[56]=I,e[57]=h,e[58]=b,e[59]=u,e[60]=ae,e[61]=p,e[62]=l,e[63]=F,e[64]=he):he=e[64],Bi(ie,150,he),J},w3=l1.createContext(void 0),Ee=t=>{let e=Ff(),o=l1.use(w3),n=l1.useRef(null);if(n.current===null){let r=t?.path||e||t.potentiallyStalePath;n.current=!!(o&&r&&o.path===r)}if(n.current===!0){if(!o)throw new Error("FieldContext was removed after mount. This breaks hook ordering.");return o}return D$(t)};function R$(t){let[,e]=t;return e}import{jsx as S3}from"react/jsx-runtime";import"react";import{c as A$}from"react/compiler-runtime";var c1=t=>{let e=A$(2),{children:o,path:n}=t,r;e[0]!==n?(r=l=>{let[a]=l;return a&&a?.[n]||null},e[0]=n,e[1]=r):r=e[1];let s=Lt(r),{passesCondition:i}=s||{};return i===!1?null:o};var Xe=t=>o=>{let{path:n}=o;return S3(c1,{path:n,children:S3(t,{...o})})};var et=t=>({...t?.admin?.style||{},...t?.admin?.width?{"--field-width":t.admin.width}:{flex:"1 1 auto"},...t?.admin?.style?.flex?{flex:t.admin.style.flex}:{}});var Ne="field-type";function il({fieldLocalized:t,fieldRTL:e,locale:o,localizationConfig:n}){let r=o&&n&&n.locales&&n.locales.length>1,s=o?.code===n?.defaultLocale;return e!==!1&&o?.rtl===!0&&(t||!t&&!r||!t&&s)||e===!0}import{c as P$}from"react/compiler-runtime";import{jsx as qc,jsxs as m1}from"react/jsx-runtime";import{useId as E$}from"react";import{jsx as I3}from"react/jsx-runtime";import"react";var u1=()=>I3("svg",{className:"icon icon--check",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:I3("path",{className:"stroke",d:"M15.3333 6.00001L8.00001 13.3333L4.66667 10",strokeLinecap:"square"})});import{jsx as _3}from"react/jsx-runtime";import"react";var d1=()=>_3("svg",{className:"icon icon--line",fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:_3("path",{className:"stroke",d:"M5.33333 10H14.6667",strokeLinecap:"square"})});var Qc="checkbox-input",ao=t=>{let e=P$(22),{id:o,name:n,AfterInput:r,BeforeInput:s,checked:i,className:l,inputRef:a,Label:c,label:u,localized:d,onToggle:f,partialChecked:m,readOnly:p,required:h}=t,g=E$(),b=o||g,C=i&&`${Qc}--checked`,v=p&&`${Qc}--read-only`,y;e[0]!==l||e[1]!==C||e[2]!==v?(y=[l,Qc,C,v].filter(Boolean),e[0]=l,e[1]=C,e[2]=v,e[3]=y):y=e[3];let x=y.join(" "),S=!!i,w;if(e[4]!==r||e[5]!==s||e[6]!==c||e[7]!==i||e[8]!==b||e[9]!==a||e[10]!==u||e[11]!==d||e[12]!==n||e[13]!==f||e[14]!==m||e[15]!==p||e[16]!==h||e[17]!==x||e[18]!==S){let T=qc("input",{"aria-label":"","aria-labelledby":n,defaultChecked:S,disabled:p,id:b,name:n,onInput:f,ref:a,required:h,title:n,type:"checkbox"}),I=!i&&m?"partial":"check",R;e[20]!==I?(R=[`${Qc}__icon`,I].filter(Boolean),e[20]=I,e[21]=R):R=e[21],w=m1("div",{className:x,children:[m1("div",{className:`${Qc}__input`,children:[s,T,m1("span",{className:R.join(" "),children:[i&&qc(u1,{}),!i&&m&&qc(d1,{})]}),r]}),qc(de,{CustomComponent:c,Fallback:qc(Fe,{htmlFor:b,label:u,localized:d,required:h})})]}),e[4]=r,e[5]=s,e[6]=c,e[7]=i,e[8]=b,e[9]=a,e[10]=u,e[11]=d,e[12]=n,e[13]=f,e[14]=m,e[15]=p,e[16]=h,e[17]=x,e[18]=S,e[19]=w}else w=e[19];return w};var f1="checkbox";var k$=t=>{let{id:e,checked:o,disableFormData:n,field:r,field:{admin:{className:s,description:i}={},label:l,required:a}={},onChange:c,partialChecked:u,path:d,readOnly:f,validate:m}=t,{uuid:p}=ze(),h=dt(),{i18n:{language:g}}=E(),b=L$.includes(g),C=T3((j,B)=>{if(typeof m=="function")return m(j,{...B,required:a})},[m,a]),{customComponents:{AfterInput:v,BeforeInput:y,Description:x,Error:S,Label:w}={},disabled:T,path:I,setValue:R,showError:D,value:_}=Ee({disableFormData:n,potentiallyStalePath:d,validate:C}),F=T3(()=>{f||(R(!_),typeof c=="function"&&c(!_))},[c,f,R,_]),A=o||!!_,$=e||gf(I,h,p),P=$$(()=>et(r),[r]);return N$("div",{className:[Ne,f1,D&&"error",s,_&&`${f1}--checked`,(f||T)&&`${f1}--read-only`].filter(Boolean).join(" "),style:P,children:[Kc(de,{CustomComponent:S,Fallback:Kc(Qe,{alignCaret:b?"right":"left",path:I,showError:D})}),Kc(ao,{AfterInput:v,BeforeInput:y,checked:A,id:$,inputRef:null,Label:w,label:l,name:I,onToggle:F,partialChecked:u,readOnly:f||T,required:a}),Kc(de,{CustomComponent:x,Fallback:Kc(Je,{description:i,path:I})})]})},Mr=Xe(k$);var B$="nullify-locale-field",eu=t=>{let e=j$(13),{fieldValue:o,localized:n,path:r,readOnly:s}=t,i=s===void 0?!1:s,{code:l}=Se(),{config:a}=z(),{localization:c}=a,[u,d]=D3.useState(typeof o!="number"),{t:f}=E(),{dispatchFields:m,setModified:p}=ze();if(!n||!c||c.defaultLocale===l||!c.fallback)return null;let h;e[0]!==u||e[1]!==m||e[2]!==o||e[3]!==r||e[4]!==p?(h=()=>{let C=!u;m({type:"UPDATE",path:r,value:C?null:o||0}),p(!0),d(C)},e[0]=u,e[1]=m,e[2]=o,e[3]=r,e[4]=p,e[5]=h):h=e[5];let g=h;if(o){let C=!1;if(typeof o=="number"&&o>0&&(C=!0),Array.isArray(o)&&o.length>0&&(C=!0),C)return u&&d(!1),null}let b;return e[6]!==u||e[7]!==o||e[8]!==g||e[9]!==r||e[10]!==i||e[11]!==f?(b=F3(rn,{className:B$,children:!o&&i?f("general:fallbackToDefaultLocale"):F3(Mr,{checked:u,field:{name:"",label:f("general:fallbackToDefaultLocale")},id:`field-${r.replace(/\./g,"__")}`,onChange:g,path:r,schemaPath:""})}),e[6]=u,e[7]=o,e[8]=g,e[9]=r,e[10]=i,e[11]=f,e[12]=b):b=e[12],b};var al=t=>{let e=document.getElementById(t);if(e){let o=e.getBoundingClientRect();window.scrollBy({behavior:"smooth",top:o.top-100})}};import{c as rH}from"react/compiler-runtime";import{jsx as bi,jsxs as nH}from"react/jsx-runtime";import{getTranslation as sH}from"@payloadcms/translations";import"react";import{c as M$}from"react/compiler-runtime";import{jsx as Cr,jsxs as Gi}from"react/jsx-runtime";import O$ from"react";var Ro="array-actions",Df=t=>{let e=M$(12),{addRow:o,copyRow:n,duplicateRow:r,hasMaxRows:s,index:i,isSortable:l,moveRow:a,pasteRow:c,removeRow:u,rowCount:d}=t,{t:f}=E(),m;return e[0]!==o||e[1]!==n||e[2]!==r||e[3]!==s||e[4]!==i||e[5]!==l||e[6]!==a||e[7]!==c||e[8]!==u||e[9]!==d||e[10]!==f?(m=Cr(st,{button:Cr(Nc,{}),buttonClassName:`${Ro}__button`,className:Ro,horizontalAlign:"center",render:p=>{let{close:h}=p;return Gi(_e.ButtonGroup,{buttonSize:"small",children:[l&&i!==0&&Gi(_e.Button,{className:`${Ro}__action ${Ro}__move-up`,onClick:()=>{a(i,i-1),h()},children:[Cr("div",{className:`${Ro}__action-chevron`,children:Cr(Ze,{direction:"up"})}),f("general:moveUp")]}),l&&i<d-1&&Gi(_e.Button,{className:`${Ro}__action`,onClick:()=>{a(i,i+1),h()},children:[Cr("div",{className:`${Ro}__action-chevron`,children:Cr(Ze,{})}),f("general:moveDown")]}),!s&&Gi(O$.Fragment,{children:[Gi(_e.Button,{className:`${Ro}__action ${Ro}__add`,onClick:()=>{o(i+1),h()},children:[Cr(nr,{}),f("general:addBelow")]}),Gi(_e.Button,{className:`${Ro}__action ${Ro}__duplicate`,onClick:()=>{r(i),h()},children:[Cr(Pi,{}),f("general:duplicate")]})]}),Cr(_e.Button,{className:`${Ro}__action ${Ro}__copy`,onClick:()=>{n(i),h()},children:Cr(Ha,{isRow:!0})}),Cr(_e.Button,{className:`${Ro}__action ${Ro}__paste`,onClick:()=>{c(i),h()},children:Cr(Ha,{isPaste:!0,isRow:!0})}),Gi(_e.Button,{className:`${Ro}__action ${Ro}__remove`,onClick:()=>{u(i),h()},children:[Cr(bt,{}),f("general:remove")]})]})},size:"medium"}),e[0]=o,e[1]=n,e[2]=r,e[3]=s,e[4]=i,e[5]=l,e[6]=a,e[7]=c,e[8]=u,e[9]=d,e[10]=f,e[11]=m):m=e[11],m};import{c as J$}from"react/compiler-runtime";import{jsx as ln,jsxs as g1}from"react/jsx-runtime";import{useState as N3}from"react";import{jsx as ll,jsxs as V$}from"react/jsx-runtime";import"react";var an=({className:t})=>V$("svg",{className:["icon icon--drag-handle",t].filter(Boolean).join(" "),viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[ll("path",{className:"fill",d:"M7.99999 10.6667C8.36818 10.6667 8.66666 10.3682 8.66666 9.99999C8.66666 9.6318 8.36818 9.33332 7.99999 9.33332C7.63181 9.33332 7.33333 9.6318 7.33333 9.99999C7.33333 10.3682 7.63181 10.6667 7.99999 10.6667Z",strokeLinecap:"square"}),ll("path",{className:"fill",d:"M7.99999 5.99999C8.36818 5.99999 8.66666 5.70151 8.66666 5.33332C8.66666 4.96513 8.36818 4.66666 7.99999 4.66666C7.63181 4.66666 7.33333 4.96513 7.33333 5.33332C7.33333 5.70151 7.63181 5.99999 7.99999 5.99999Z",strokeLinecap:"square"}),ll("path",{className:"fill",d:"M7.99999 15.3333C8.36818 15.3333 8.66666 15.0348 8.66666 14.6667C8.66666 14.2985 8.36818 14 7.99999 14C7.63181 14 7.33333 14.2985 7.33333 14.6667C7.33333 15.0348 7.63181 15.3333 7.99999 15.3333Z",strokeLinecap:"square"}),ll("path",{className:"fill",d:"M12 10.6667C12.3682 10.6667 12.6667 10.3682 12.6667 9.99999C12.6667 9.6318 12.3682 9.33332 12 9.33332C11.6318 9.33332 11.3333 9.6318 11.3333 9.99999C11.3333 10.3682 11.6318 10.6667 12 10.6667Z",strokeLinecap:"square"}),ll("path",{className:"fill",d:"M12 5.99999C12.3682 5.99999 12.6667 5.70151 12.6667 5.33332C12.6667 4.96513 12.3682 4.66666 12 4.66666C11.6318 4.66666 11.3333 4.96513 11.3333 5.33332C11.3333 5.70151 11.6318 5.99999 12 5.99999Z",strokeLinecap:"square"}),ll("path",{className:"fill",d:"M12 15.3333C12.3682 15.3333 12.6667 15.0348 12.6667 14.6667C12.6667 14.2985 12.3682 14 12 14C11.6318 14 11.3333 14.2985 11.3333 14.6667C11.3333 15.0348 11.6318 15.3333 12 15.3333Z",strokeLinecap:"square"})]});import{jsx as A3}from"react/jsx-runtime";import Rf,{useEffect as H$,useRef as h1}from"react";import{useEffect as G$,useMemo as z$,useRef as p1,useState as W$}from"react";var R3=({containerRef:t,contentRef:e,duration:o,open:n})=>{let r=z$(()=>typeof CSS<"u"&&CSS&&CSS.supports?CSS.supports("interpolate-size","allow-keywords"):!1,[]),s=p1(!1),i=p1(n),[l,a]=W$(!1),c=p1(null);return G$(()=>{let u=t.current,d=e.current;if(!u||!d||r)return;let f=h=>{u.style.height=h},m=()=>{u&&(u.style.transition="",u.style.height=n?"auto":"0px",a(!1))};return(()=>{if(!s.current&&n){f("auto"),a(!1);return}s.current=!0,i.current!==n&&f(n?"0px":`${d.scrollHeight}px`),u.offsetHeight,a(!0),u.style.transition=`height ${o}ms ease`,f(n?`${d.scrollHeight}px`:"0px");let h=()=>{m(),u.removeEventListener("transitionend",h)};u.addEventListener("transitionend",h)})(),i.current=n,c.current=new ResizeObserver(()=>{l&&(u.style.height=n?`${d.scrollHeight}px`:"0px")}),c.current.observe(d),()=>{u&&(u.style.transition="",u.style.height=""),c.current?.disconnect()}},[n,o,t,e,r]),{browserSupportsKeywordAnimation:r}};var xr=({id:t,children:e,className:o,duration:n=300,height:r})=>{let[s,i]=Rf.useState(()=>!!r),l=h1(s),[a,c]=Rf.useState(()=>s?"":"none"),[u,d]=Rf.useState(()=>s?"":"hidden"),[f,m]=Rf.useState(!1),p=h1(null),h=h1(null);return H$(()=>{let g,b,C=!!r,v=l.current!==C;return l.current=C,v&&(m(!0),d("hidden"),C?c(""):g=window.setTimeout(()=>{c("none")},n),i(C),b=window.setTimeout(()=>{d(""),m(!1)},n)),()=>{g&&clearTimeout(g),b&&clearTimeout(b)}},[r,n]),R3({containerRef:p,contentRef:h,duration:n,open:s}),A3("div",{"aria-hidden":!s,className:[o,"rah-static",s&&r==="auto"&&"rah-static--height-auto",f&&`rah-animating--${s?"down":"up"}`,f&&r==="auto"&&"rah-animating--to-height-auto"].filter(Boolean).join(" "),id:t,ref:p,style:{overflow:u,transition:`height ${n}ms ease`},children:A3("div",{ref:h,...a?{style:{display:a}}:{},children:e})})};import{jsx as U$}from"react/jsx-runtime";import X$,{createContext as Z$,use as Y$}from"react";var P3=Z$({isCollapsed:void 0,isVisible:void 0,isWithinCollapsible:void 0,toggle:()=>{}}),E3=({children:t,isCollapsed:e,isWithinCollapsible:o=!0,toggle:n})=>{let{isCollapsed:r,isVisible:s}=qs(),i=X$.useMemo(()=>({isCollapsed:e,isVisible:s&&!r,isWithinCollapsible:o,toggle:n}),[e,o,n,r,s]);return U$(P3,{value:i,children:t})},qs=()=>Y$(P3);var ko="collapsible";var zi=t=>{let e=J$(25),{actions:o,AfterCollapsible:n,children:r,className:s,collapsibleStyle:i,disableHeaderToggle:l,disableToggleIndicator:a,dragHandleProps:c,header:u,initCollapsed:d,isCollapsed:f,onToggle:m}=t,p=i===void 0?"default":i,h=l===void 0?!1:l,g=a===void 0?!1:a,[b,C]=N3(!!d),[v,y]=N3(!1),{isWithinCollapsible:x}=qs(),{t:S}=E(),w=typeof f=="boolean"?f:b,T;e[0]!==w||e[1]!==m?(T=()=>{typeof m=="function"&&m(!w),C(!w)},e[0]=w,e[1]=m,e[2]=T):T=e[2];let I=T,R=c&&`${ko}--has-drag-handle`,D=w&&`${ko}--collapsed`,_=x&&`${ko}--nested`,F=v&&!h&&`${ko}--hovered`,A=`${ko}--style-${p}`,$;e[3]!==s||e[4]!==R||e[5]!==D||e[6]!==_||e[7]!==F||e[8]!==A?($=[ko,s,R,D,_,F,A].filter(Boolean),e[3]=s,e[4]=R,e[5]=D,e[6]=_,e[7]=F,e[8]=A,e[9]=$):$=e[9];let P=$.join(" "),j=`${ko}__toggle-wrap${h?" toggle-disabled":""}`,B,L;e[10]===Symbol.for("react.memo_cache_sentinel")?(B=()=>y(!0),L=()=>y(!1),e[10]=B,e[11]=L):(B=e[10],L=e[11]);let N;return e[12]!==n||e[13]!==o||e[14]!==r||e[15]!==h||e[16]!==g||e[17]!==c||e[18]!==u||e[19]!==w||e[20]!==S||e[21]!==P||e[22]!==j||e[23]!==I?(N=ln("div",{className:P,children:g1(E3,{isCollapsed:w,toggle:I,children:[g1("div",{className:j,onMouseEnter:B,onMouseLeave:L,children:[!h&&ln("button",{className:[`${ko}__toggle`,`${ko}__toggle--${w?"collapsed":"open"}`].filter(Boolean).join(" "),onClick:I,type:"button",children:ln("span",{children:S("fields:toggleBlock")})}),c&&ln("div",{className:`${ko}__drag`,...c.attributes,...c.listeners,children:ln(an,{})}),u?ln("div",{className:[`${ko}__header-wrap`,c&&`${ko}__header-wrap--has-drag-handle`].filter(Boolean).join(" "),children:u}):null,g1("div",{className:`${ko}__actions-wrap`,children:[o?ln("div",{className:`${ko}__actions`,children:o}):null,!g&&ln("div",{className:`${ko}__indicator`,children:ln(Ze,{direction:w?void 0:"up"})})]})]}),ln(xr,{height:w?0:"auto",children:ln("div",{className:`${ko}__content`,children:r})}),n]})}),e[12]=n,e[13]=o,e[14]=r,e[15]=h,e[16]=g,e[17]=c,e[18]=u,e[19]=w,e[20]=S,e[21]=P,e[22]=j,e[23]=I,e[24]=N):N=e[24],N};import{c as KW}from"react/compiler-runtime";import{jsx as z0}from"react/jsx-runtime";import{fieldIsHiddenOrDisabled as eH,getFieldPaths as tH,getFieldPermissions as oH}from"payload/shared";import"react";import{c as q$}from"react/compiler-runtime";import{jsx as Q$}from"react/jsx-runtime";import L3 from"react";var $3=t=>{let e=q$(9),{children:o,className:n,forceRender:r}=t,[s,i]=L3.useState(!!r),l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={rootMargin:"1000px"},e[0]=l):l=e[0];let[a,c]=is(l,!!r),u=!!c?.isIntersecting,d=c?.boundingClientRect?.top<0,f=r||u||d,m,p;e[1]!==s||e[2]!==f?(m=()=>{f&&!s&&i(!0)},p=[f,s],e[1]=s,e[2]=f,e[3]=m,e[4]=p):(m=e[3],p=e[4]),L3.useEffect(m,p);let h=s?o:null,g;return e[5]!==n||e[6]!==a||e[7]!==h?(g=Q$("div",{className:n,ref:a,children:h}),e[5]=n,e[6]=a,e[7]=h,e[8]=g):g=e[8],g};import{c as QW}from"react/compiler-runtime";import{jsx as Vt}from"react/jsx-runtime";import"react";import{jsx as Ut,jsxs as bs}from"react/jsx-runtime";import{getTranslation as S1}from"@payloadcms/translations";import Fk,{Fragment as eS,useCallback as Ln,useMemo as tS}from"react";import{c as Ik}from"react/compiler-runtime";import{jsx as un,jsxs as Q3,Fragment as _k}from"react/jsx-runtime";import{getTranslation as Tk}from"@payloadcms/translations";import"react";import{c as K$}from"react/compiler-runtime";import{jsx as tu,jsxs as ek}from"react/jsx-runtime";import"react";var Or="pill",tk=t=>{let e=K$(12),{id:o,className:n}=t,r;e[0]!==o?(r={id:o},e[0]=o,e[1]=r):r=e[1];let{attributes:s,isDragging:i,listeners:l,setNodeRef:a,transform:c}=Ya(r),u=i&&`${Or}--is-dragging`,d;e[2]!==n||e[3]!==u?(d=[u,n].filter(Boolean),e[2]=n,e[3]=u,e[4]=d):d=e[4];let f=d.join(" "),m;return e[5]!==s||e[6]!==l||e[7]!==t||e[8]!==a||e[9]!==f||e[10]!==c?(m=tu(k3,{...t,className:f,elementProps:{...l,...s,ref:a,style:{transform:c}}}),e[5]=s,e[6]=l,e[7]=t,e[8]=a,e[9]=f,e[10]=c,e[11]=m):m=e[11],m},k3=t=>{let{id:e,alignIcon:o="right","aria-checked":n,"aria-controls":r,"aria-expanded":s,"aria-label":i,children:l,className:a,draggable:c,elementProps:u,icon:d,onClick:f,pillStyle:m="light",rounded:p,size:h="medium",to:g}=t,b=[Or,`${Or}--style-${m}`,`${Or}--size-${h}`,a&&a,g&&`${Or}--has-link`,(g||f)&&`${Or}--has-action`,d&&`${Or}--has-icon`,d&&`${Or}--align-icon-${o}`,c&&`${Or}--draggable`,p&&`${Or}--rounded`].filter(Boolean).join(" "),C="div";return f&&!g&&(C="button"),g&&(C=Ht),ek(C,{...u,"aria-checked":n,"aria-controls":r,"aria-expanded":s,"aria-label":i,className:b,href:g||null,id:e,onClick:f,type:C==="button"?"button":void 0,children:[tu("span",{className:`${Or}__label`,children:l}),!!d&&tu("span",{className:`${Or}__icon`,children:d})]})},at=t=>{let{draggable:e}=t;return e?tu(tk,{...t}):tu(k3,{...t})};import{useEffect as ok,useState as rk}from"react";function Af(t,e){let[o,n]=rk(t);return ok(()=>{let r=setTimeout(()=>{n(t)},e);return()=>{clearTimeout(r)}},[t,e]),o}import{c as xk}from"react/compiler-runtime";import{jsx as X3,jsxs as wk}from"react/jsx-runtime";import Z3 from"react";import{c as bk}from"react/compiler-runtime";import{jsx as U3}from"react/jsx-runtime";import{getTranslation as vk}from"@payloadcms/translations";import yk,{useEffect as Ck}from"react";import{jsx as Nn,jsxs as H3}from"react/jsx-runtime";import{getTranslation as C1}from"@payloadcms/translations";import{Fragment as mk,useEffect as fk,useMemo as pk,useState as hk}from"react";import{c as nk}from"react/compiler-runtime";import{jsx as j3,jsxs as sk}from"react/jsx-runtime";import"react";var ou="thumbnail-card",B3=t=>{let e=nk(13),{alignLabel:o,className:n,collection:r,doc:s,label:i,onClick:l,thumbnail:a}=t,{config:c}=z(),{i18n:u}=E(),d=typeof l=="function"&&`${ou}--has-on-click`,f=o&&`${ou}--align-label-${o}`,m;e[0]!==n||e[1]!==d||e[2]!==f?(m=[ou,n,d,f].filter(Boolean),e[0]=n,e[1]=d,e[2]=f,e[3]=m):m=e[3];let p=m.join(" "),h;if(e[4]!==p||e[5]!==r||e[6]!==c||e[7]!==s||e[8]!==u||e[9]!==i||e[10]!==l||e[11]!==a){let g=i;g||(g=Zo({collectionConfig:r,data:s,dateFormat:c.admin.dateFormat,fallback:s?.filename,i18n:u})),h=sk("button",{className:p,onClick:l,title:g,type:"button",children:[j3("div",{className:`${ou}__thumbnail`,children:a}),j3("div",{className:`${ou}__label`,children:g})]}),e[4]=p,e[5]=r,e[6]=c,e[7]=s,e[8]=u,e[9]=i,e[10]=l,e[11]=a,e[12]=h}else h=e[12];return h};import{jsx as gs,jsxs as O3}from"react/jsx-runtime";import{useState as ck}from"react";var Ao=[];for(Pf=0;Pf<256;++Pf)Ao.push((Pf+256).toString(16).slice(1));var Pf;function M3(t,e=0){return(Ao[t[e+0]]+Ao[t[e+1]]+Ao[t[e+2]]+Ao[t[e+3]]+"-"+Ao[t[e+4]]+Ao[t[e+5]]+"-"+Ao[t[e+6]]+Ao[t[e+7]]+"-"+Ao[t[e+8]]+Ao[t[e+9]]+"-"+Ao[t[e+10]]+Ao[t[e+11]]+Ao[t[e+12]]+Ao[t[e+13]]+Ao[t[e+14]]+Ao[t[e+15]]).toLowerCase()}var Ef,ik=new Uint8Array(16);function b1(){if(!Ef&&(Ef=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ef))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ef(ik)}var ak=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),v1={randomUUID:ak};function lk(t,e,o){if(v1.randomUUID&&!e&&!t)return v1.randomUUID();t=t||{};var n=t.random||(t.rng||b1)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){o=o||0;for(var r=0;r<16;++r)e[o+r]=n[r];return e}return M3(n)}var cn=lk;var y1=()=>{let[t]=ck(()=>`pattern${cn()}`);return O3("svg",{fill:"none",height:"151",preserveAspectRatio:"xMidYMid slice",viewBox:"0 0 231 151",width:"231",xmlns:"http://www.w3.org/2000/svg",children:[O3("g",{clipPath:`url(#${t})`,children:[gs("rect",{fill:"#D9D9D9",height:"100%",rx:"2",width:"100%"}),gs("rect",{fill:"#BCBCBC",height:"116.063",transform:"rotate(52.0687 33.7051 79.3051)",width:"85.8593",x:"33.7051",y:"79.3051"}),gs("rect",{fill:"#BCBCBC",height:"116.063",transform:"rotate(52.0687 86.1219 92.6272)",width:"85.8593",x:"86.1219",y:"92.6272"}),gs("circle",{cx:"189",cy:"45",fill:"#BCBCBC",r:"19"}),gs("rect",{fill:"#B8B8B8",height:"5",rx:"2.5",width:"98",x:"66",y:"70"}),gs("rect",{fill:"#B8B8B8",height:"5",rx:"2.5",width:"76",x:"77",y:"82"})]}),gs("defs",{children:gs("clipPath",{id:`${t}`,children:gs("rect",{fill:"white",height:"151",width:"231"})})})]})};import{c as uk}from"react/compiler-runtime";import{jsx as G3,jsxs as dk}from"react/jsx-runtime";import"react";import{jsx as V3}from"react/jsx-runtime";import"react";var ru=()=>V3("svg",{className:"icon icon--search",fill:"none",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:V3("path",{className:"stroke",d:"M16 16L13.1333 13.1333M14.6667 9.33333C14.6667 12.2789 12.2789 14.6667 9.33333 14.6667C6.38781 14.6667 4 12.2789 4 9.33333C4 6.38781 6.38781 4 9.33333 4C12.2789 4 14.6667 6.38781 14.6667 9.33333Z",strokeLinecap:"square"})});var z3="block-search",W3=t=>{let e=uk(5),{setSearchTerm:o}=t,{t:n}=E(),r;e[0]!==o?(r=l=>{o(l.target.value)},e[0]=o,e[1]=r):r=e[1];let s=r,i;return e[2]!==s||e[3]!==n?(i=dk("div",{className:z3,children:[G3("input",{className:`${z3}__input`,onChange:s,placeholder:n("fields:searchForBlock")}),G3(ru,{})]}),e[2]=s,e[3]=n,e[4]=i):i=e[4],i};var Qs="blocks-drawer",gk=(t,e)=>typeof t.labels.singular=="string"?t.labels.singular.toLowerCase():typeof t.labels.singular=="object"?C1(t.labels.singular,e).toLowerCase():"",x1=t=>{let{blocks:e,onSelect:o,searchTerm:n}=t,[r,s]=or(n??""),[i,l]=hk(e),{i18n:a}=E(),{config:c}=z(),u=pk(()=>{let d={_none:[]};return i.forEach(f=>{if(typeof f=="object"&&f.admin?.group){let m=f.admin.group,p=typeof m=="string"?m:C1(m,a);Object.hasOwn(d,p)?d[p].push(f):d[p]=[f]}else d._none.push(f)}),d},[i,a]);return fk(()=>{let d=r.toLowerCase(),f=e?.reduce((m,p)=>{let h=typeof p=="string"?c.blocksMap[p]:p;return gk(h,a).includes(d)&&m.push(h),m},[]);l(f)},[r,e,a,c.blocksMap]),H3(mk,{children:[Nn(W3,{setSearchTerm:s}),Nn("div",{className:`${Qs}__blocks-wrapper`,children:Nn("ul",{className:`${Qs}__block-groups`,children:Object.entries(u).map(([d,f])=>f.length?H3("li",{className:[`${Qs}__block-group`,d==="_none"&&`${Qs}__block-group-none`].filter(Boolean).join(" "),children:[d!=="_none"&&Nn("h3",{className:`${Qs}__block-group-label`,children:d}),Nn("ul",{className:`${Qs}__blocks`,children:f.map((m,p)=>{let h=typeof m=="string"?c.blocksMap[m]:m,{slug:g,imageAltText:b,imageURL:C,labels:v}=h;return Nn("li",{className:`${Qs}__block`,children:Nn(B3,{alignLabel:"center",label:C1(v?.singular,a),onClick:()=>{typeof o=="function"&&o(g)},thumbnail:Nn("div",{className:`${Qs}__default-image`,children:C?Nn("img",{alt:b,src:C}):Nn(y1,{})})})},p)})})]},d):null)})})]})};var nu=t=>{let e=bk(19),{addRow:o,addRowIndex:n,blocks:r,drawerSlug:s,labels:i}=t,{closeModal:l,isModalOpen:a}=ne(),{i18n:c,t:u}=E(),[d,f]=yk.useState(""),m,p;e[0]!==s||e[1]!==a?(m=()=>{a(s)||f("")},p=[a,s],e[0]=s,e[1]=a,e[2]=m,e[3]=p):(m=e[2],p=e[3]),Ck(m,p);let h;if(e[4]!==o||e[5]!==n||e[6]!==r||e[7]!==l||e[8]!==s||e[9]!==c||e[10]!==i.singular||e[11]!==d||e[12]!==u){let g;e[14]!==o||e[15]!==n||e[16]!==l||e[17]!==s?(g=b=>{o(n,b),l(s)},e[14]=o,e[15]=n,e[16]=l,e[17]=s,e[18]=g):g=e[18],h=U3(At,{slug:s,title:u("fields:addLabel",{label:vk(i.singular,c)}),children:U3(x1,{blocks:r,onSelect:g,searchTerm:d})}),e[4]=o,e[5]=n,e[6]=r,e[7]=l,e[8]=s,e[9]=c,e[10]=i.singular,e[11]=d,e[12]=u,e[13]=h}else h=e[13];return h};var Y3=t=>{let e=xk(28),{addRow:o,blocks:n,blockType:r,copyRow:s,duplicateRow:i,hasMaxRows:l,isSortable:a,labels:c,moveRow:u,pasteRow:d,removeRow:f,rowCount:m,rowIndex:p}=t,{closeModal:h,openModal:g}=ne(),b=Gc("blocks-drawer"),[C,v]=Z3.useState(null),y;e[0]!==o||e[1]!==h||e[2]!==b||e[3]!==C?(y=(S,w)=>{typeof o=="function"&&o(C,w),h(b)},e[0]=o,e[1]=h,e[2]=b,e[3]=C,e[4]=y):y=e[4];let x;if(e[5]!==r||e[6]!==n||e[7]!==s||e[8]!==b||e[9]!==i||e[10]!==l||e[11]!==a||e[12]!==c||e[13]!==u||e[14]!==g||e[15]!==d||e[16]!==f||e[17]!==m||e[18]!==p||e[19]!==y){let S;e[21]!==b||e[22]!==g?(S=T=>{v(T),g(b)},e[21]=b,e[22]=g,e[23]=S):S=e[23];let w;e[24]!==r||e[25]!==i||e[26]!==p?(w=()=>i(p,r),e[24]=r,e[25]=i,e[26]=p,e[27]=w):w=e[27],x=wk(Z3.Fragment,{children:[X3(nu,{addRow:y,addRowIndex:p,blocks:n,drawerSlug:b,labels:c}),X3(Df,{addRow:S,copyRow:s,duplicateRow:w,hasMaxRows:l,index:p,isSortable:a,moveRow:u,pasteRow:d,removeRow:f,rowCount:m})]}),e[5]=r,e[6]=n,e[7]=s,e[8]=b,e[9]=i,e[10]=l,e[11]=a,e[12]=c,e[13]=u,e[14]=g,e[15]=d,e[16]=f,e[17]=m,e[18]=p,e[19]=y,e[20]=x}else x=e[20];return x};import{c as Sk}from"react/compiler-runtime";import{jsx as J3}from"react/jsx-runtime";import"react";var q3="section-title",w1=t=>{let e=Sk(14),{customOnChange:o,customValue:n,path:r,readOnly:s}=t,i;e[0]!==r?(i={path:r},e[0]=r,e[1]=i):i=e[1];let{setValue:l,value:a}=Ee(i),{t:c}=E(),u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=[q3].filter(Boolean),e[2]=u):u=e[2];let d=u.join(" "),f;e[3]!==o||e[4]!==l?(f=o||(g=>{g.stopPropagation(),g.preventDefault(),l(g.target.value)}),e[3]=o,e[4]=l,e[5]=f):f=e[5];let m=f,p=n||a,h;return e[6]!==n||e[7]!==m||e[8]!==r||e[9]!==s||e[10]!==c||e[11]!==p||e[12]!==a?(h=J3("div",{className:d,"data-value":p,children:J3("input",{className:`${q3}__input`,id:r,name:r,onChange:m,placeholder:c("general:untitled"),readOnly:s,type:"text",value:n||a||""})}),e[6]=n,e[7]=m,e[8]=r,e[9]=s,e[10]=c,e[11]=p,e[12]=a,e[13]=h):h=e[13],h};var Ks="blocks-field",K3=t=>{let e=Ik(42),{addRow:o,attributes:n,block:r,blocks:s,copyRow:i,duplicateRow:l,errorCount:a,fields:c,hasMaxRows:u,isLoading:d,isSortable:f,Label:m,labels:p,listeners:h,moveRow:g,parentPath:b,pasteRow:C,path:v,permissions:y,readOnly:x,removeRow:S,row:w,rowCount:T,rowIndex:I,schemaPath:R,setCollapse:D,setNodeRef:_,transform:F}=t,A=Af(d,500),{i18n:$}=E(),j=no()&&a>0,B=!r.admin?.disableBlockName,L=j?`${Ks}__row--has-errors`:`${Ks}__row--no-errors`,N;e[0]!==L?(N=[`${Ks}__row`,L].filter(Boolean),e[0]=L,e[1]=N):N=e[1];let M=N.join(" "),k;if(e[2]!==m||e[3]!==o||e[4]!==n||e[5]!==r.fields||e[6]!==r.labels||e[7]!==r.slug||e[8]!==s||e[9]!==M||e[10]!==i||e[11]!==l||e[12]!==a||e[13]!==j||e[14]!==c||e[15]!==u||e[16]!==$||e[17]!==A||e[18]!==f||e[19]!==p||e[20]!==h||e[21]!==g||e[22]!==b||e[23]!==C||e[24]!==v||e[25]!==y||e[26]!==x||e[27]!==S||e[28]!==w.blockType||e[29]!==w.collapsed||e[30]!==w.id||e[31]!==T||e[32]!==I||e[33]!==R||e[34]!==D||e[35]!==_||e[36]!==B||e[37]!==F){let O;if(y===!0)O=!0;else{let G=y?.blocks?.[r.slug]||y?.blocks;if(G===!0)O=!0;else if(G?.fields)O=G.fields;else if(typeof y=="object"&&y&&!G){let U=y.read===!0,H=!y.create||!y.update;U&&(H||typeof y=="object"&&Object.keys(y).length===1&&y.read)?O={read:!0}:O=G?.fields}else O=G?.fields}let V;e[39]!==w.id||e[40]!==D?(V=G=>D(w.id,G),e[39]=w.id,e[40]=D,e[41]=V):V=e[41],k=un("div",{id:`${b?.split(".").join("-")}-row-${I}`,ref:_,style:{transform:F},children:un(zi,{actions:x?void 0:un(Y3,{addRow:o,blocks:s,blockType:w.blockType,copyRow:i,duplicateRow:l,fields:r.fields,hasMaxRows:u,isSortable:f,labels:p,moveRow:g,pasteRow:C,removeRow:S,rowCount:T,rowIndex:I}),className:M,collapsibleStyle:j?"error":"default",dragHandleProps:f?{id:w.id,attributes:n,listeners:h}:void 0,header:A?un(It,{height:"1rem",width:"8rem"}):Q3("div",{className:`${Ks}__block-header`,children:[un(ss,{CustomComponent:m,label:Q3(_k,{children:[un("span",{className:`${Ks}__block-number`,children:String(I+1).padStart(2,"0")}),un(at,{className:`${Ks}__block-pill ${Ks}__block-pill-${w.blockType}`,pillStyle:"white",size:"small",children:Tk(r.labels.singular,$)}),B&&un(w1,{path:`${v}.blockName`,readOnly:x})]}),path:v,rowNumber:I}),j&&un(yo,{count:a,i18n:$,withMessage:!0})]}),isCollapsed:w.collapsed,onToggle:V,children:A?un(It,{}):un(Po,{className:`${Ks}__fields`,fields:c,margins:"small",parentIndexPath:"",parentPath:v,parentSchemaPath:R,permissions:O,readOnly:x})},w.id)},`${b}-row-${I}`),e[2]=m,e[3]=o,e[4]=n,e[5]=r.fields,e[6]=r.labels,e[7]=r.slug,e[8]=s,e[9]=M,e[10]=i,e[11]=l,e[12]=a,e[13]=j,e[14]=c,e[15]=u,e[16]=$,e[17]=A,e[18]=f,e[19]=p,e[20]=h,e[21]=g,e[22]=b,e[23]=C,e[24]=v,e[25]=y,e[26]=x,e[27]=S,e[28]=w.blockType,e[29]=w.collapsed,e[30]=w.id,e[31]=T,e[32]=I,e[33]=R,e[34]=D,e[35]=_,e[36]=B,e[37]=F,e[38]=k}else k=e[38];return k};var Vr="blocks-field",Dk=t=>{let{i18n:e,t:o}=E(),{field:n,field:{name:r,type:s,admin:{className:i,description:l,isSortable:a=!0}={},blockReferences:c,blocks:u,label:d,labels:f,localized:m,maxRows:p,minRows:h,required:g},path:b,permissions:C,readOnly:v,schemaPath:y,validate:x}=t,S=y??r,w=h??g?1:0,{setDocFieldPreferences:T}=Re(),{addFieldRow:I,dispatchFields:R,getFields:D,moveFieldRow:_,removeFieldRow:F,replaceState:A,setModified:$}=ze(),{code:P}=Se(),{config:{localization:j},config:B}=z(),L=Gc("blocks-drawer"),N=no(),M={plural:o("fields:blocks"),singular:o("fields:block"),...f},k=(()=>{if(j&&j.fallback){let ue=j.defaultLocale;return P===ue}return!0})(),O=Ln((ue,ye)=>{if(!k&&ue===null)return!0;if(typeof x=="function")return x(ue,{...ye,maxRows:p,minRows:w,required:g})},[p,w,g,x,k]),{blocksFilterOptions:V,customComponents:{AfterInput:G,BeforeInput:U,Description:H,Error:Z,Label:Y}={},disabled:W,errorPaths:se,path:J,rows:ie=[],showError:ae,valid:he,value:be}=Ee({hasRows:!0,potentiallyStalePath:b,validate:O}),{clientBlocks:fe,clientBlocksAfterFilter:Me}=tS(()=>{let ue=[];if(!c)ue=u;else for(let ye of c){let Ie=typeof ye=="string"?B.blocksMap[ye]:ye;Ie&&ue.push(Ie)}if(Array.isArray(V)){let ye=ue.filter(Ie=>{let Ae=typeof Ie=="string"?Ie:Ie.slug;return V.includes(Ae)});return{clientBlocks:ue,clientBlocksAfterFilter:ye}}return{clientBlocks:ue,clientBlocksAfterFilter:ue}},[c,u,V,B.blocksMap]),xe=Ln((ue,ye)=>{I({blockType:ye,path:J,rowIndex:ue,schemaPath:S}),setTimeout(()=>{al(`${J}-row-${ue+1}`)},0)},[I,J,S]),we=Ln(ue=>{R({type:"DUPLICATE_ROW",path:J,rowIndex:ue}),$(!0),setTimeout(()=>{al(`${J}-row-${ue+1}`)},0)},[R,J,$]),Te=Ln(ue=>{F({path:J,rowIndex:ue})},[J,F]),Q=Ln((ue,ye)=>{_({moveFromIndex:ue,moveToIndex:ye,path:J})},[_,J]),Ve=Ln(ue=>{let{collapsedIDs:ye,updatedRows:Ie}=vf({collapsed:ue,rows:ie});R({type:"SET_ALL_ROWS_COLLAPSED",path:J,updatedRows:Ie}),T(J,{collapsed:ye})},[R,J,ie,T]),Oe=Ln((ue,ye)=>{let{collapsedIDs:Ie,updatedRows:Ae}=bf({collapsed:ye,rowID:ue,rows:ie});R({type:"SET_ROW_COLLAPSED",path:J,updatedRows:Ae}),T(J,{collapsed:Ie})},[R,J,ie,T]),le=Ln(ue=>{let ye=za({type:s,blocks:fe,getDataToCopy:()=>Xa({formState:{...D()},path:J,rowIndex:ue}),path:J,rowIndex:ue,t:o});typeof ye=="string"?oe.error(ye):oe.success(o("general:copied"))},[fe,J,o,s,D]),X=Ln(ue=>{let Ie=Wa({onPaste:Ae=>{let Ye={...D()},tt=Za({dataFromClipboard:Ae,formState:Ye,path:J,rowIndex:ue});A(tt),$(!0)},path:J,schemaBlocks:fe,t:o});typeof Ie=="string"&&oe.error(Ie)},[fe,D,J,A,$,o]),q=Ln(ue=>{let ye={...D()},Ie=Za({dataFromClipboard:ue,formState:ye,path:J});A(Ie),$(!0)},[D,J,A,$]),te=p&&ie.length>=p,pe=se.length,K=N&&pe+(he?0:1)>0,re=ie.length<w||g&&ie.length===0,ge=v&&ie.length===0,me=tS(()=>et(n),[n]);return bs("div",{className:[Ne,Vr,i,K?`${Vr}--has-error`:`${Vr}--has-no-error`].filter(Boolean).join(" "),id:`field-${J?.replace(/\./g,"__")}`,style:me,children:[ae&&Ut(de,{CustomComponent:Z,Fallback:Ut(Qe,{path:J,showError:ae})}),bs("header",{className:`${Vr}__header`,children:[bs("div",{className:`${Vr}__header-wrap`,children:[bs("div",{className:`${Vr}__heading-with-error`,children:[Ut("h3",{children:Ut(de,{CustomComponent:Y,Fallback:Ut(Fe,{as:"span",label:d,localized:m,path:J,required:g})})}),K&&pe>0&&Ut(yo,{count:pe,i18n:e,withMessage:!0})]}),bs("ul",{className:`${Vr}__header-actions`,children:[ie.length>0&&bs(eS,{children:[Ut("li",{children:Ut("button",{className:`${Vr}__header-action`,onClick:()=>Ve(!0),type:"button",children:o("fields:collapseAll")})}),Ut("li",{children:Ut("button",{className:`${Vr}__header-action`,onClick:()=>Ve(!1),type:"button",children:o("fields:showAll")})})]}),Ut("li",{children:Ut(Hm,{allowCopy:ie?.length>0,allowPaste:!v,blocks:fe,className:`${Vr}__header-action`,disabled:W,getDataToCopy:()=>Xa({formState:{...D()},path:J}),onPaste:q,path:J,type:s})})]})]}),Ut(de,{CustomComponent:H,Fallback:Ut(Je,{description:l,path:J})})]}),U,Ut(eu,{fieldValue:be,localized:m,path:J,readOnly:v}),(ie.length>0||!he&&(ge||re))&&bs(kr,{className:`${Vr}__rows`,ids:ie.map(ue=>ue.id),onDragEnd:({moveFromIndex:ue,moveToIndex:ye})=>Q(ue,ye),children:[ie.map((ue,ye)=>{let{blockType:Ie,isLoading:Ae}=ue,Ye=B.blocksMap[Ie]??fe.find(tt=>tt.slug===Ie);if(Ye){let tt=`${J}.${ye}`,Wt=se.filter(po=>po.startsWith(tt+".")).length;return Ut(An,{disabled:v||W||!a,id:ue.id,children:po=>Ut(K3,{...po,addRow:xe,block:Ye,blocks:fe,copyRow:le,duplicateRow:we,errorCount:Wt,fields:Ye.fields,hasMaxRows:te,isLoading:Ae,isSortable:a,Label:ie?.[ye]?.customComponents?.RowLabel,labels:M,moveRow:Q,parentPath:J,pasteRow:X,path:tt,permissions:C,readOnly:v||W,removeRow:Te,row:ue,rowCount:ie.length,rowIndex:ye,schemaPath:S+Ye.slug,setCollapse:Oe})},ue.id)}return null}),!k&&bs(Fk.Fragment,{children:[re&&Ut(rn,{type:"error",children:o("validation:requiresAtLeast",{count:w,label:S1(w>1?M.plural:M.singular,e)||o(w>1?"general:row":"general:rows")})}),ge&&Ut(rn,{children:o("validation:fieldHasNo",{label:S1(M.plural,e)})})]})]}),!te&&bs(eS,{children:[Ut(ms,{className:`${Vr}__drawer-toggler`,disabled:v||W,slug:L,children:Ut(ee,{buttonStyle:"icon-label",disabled:v||W,el:"span",icon:"plus",iconPosition:"left",iconStyle:"with-border",children:o("fields:addLabel",{label:S1(M.singular,e)})})}),Ut(nu,{addRow:xe,addRowIndex:ie?.length||0,blocks:Me,drawerSlug:L,labels:M})]}),G]})},su=Xe(Dk);import{jsx as Wi,jsxs as oS}from"react/jsx-runtime";import rS,{useCallback as nS,useEffect as Ek,useMemo as Nk,useState as Lk}from"react";import{jsx as I1}from"react/jsx-runtime";import{lazy as Rk,Suspense as Ak}from"react";var Pk=Rk(()=>import("./CodeEditor-ORMD3ID3.js")),iu=t=>I1(Ak,{fallback:I1(It,{}),children:I1(Pk,{...t})});var $k={js:"javascript",ts:"typescript",tsx:"typescript"},kk="code-field",jk=t=>{let{field:e,field:{admin:{className:o,description:n,editorOptions:r,editorProps:s,language:i="javascript"}={},label:l,localized:a,required:c},onMount:u,path:d,readOnly:f,validate:m}=t,p=rS.useRef("formState"),[h,g]=Lk(Date.now()),b=nS((P,j)=>{if(typeof m=="function")return m(P,{...j,required:c})},[m,c]),{customComponents:{AfterInput:C,BeforeInput:v,Description:y,Error:x,Label:S}={},disabled:w,initialValue:T,path:I,setValue:R,showError:D,value:_}=Ee({potentiallyStalePath:d,validate:b}),F=rS.useRef((_||T)!==void 0?_??T:void 0),A=nS(P=>{if(!(f||w)){p.current="internalEditor";try{R(P||null),F.current=P}catch{R(P||null),F.current=P}}},[f,w,R]);Ek(()=>{p.current==="formState"&&(F.current=(_||T)!==void 0?_??T:void 0,g(Date.now())),p.current="formState"},[T,I,_]);let $=Nk(()=>et(e),[e]);return oS("div",{className:[Ne,kk,o,D&&"error",(f||w)&&"read-only"].filter(Boolean).join(" "),style:$,children:[Wi(de,{CustomComponent:S,Fallback:Wi(Fe,{label:l,localized:a,path:I,required:c})}),oS("div",{className:`${Ne}__wrap`,children:[Wi(de,{CustomComponent:x,Fallback:Wi(Qe,{path:I,showError:D})}),v,Wi(iu,{defaultLanguage:$k[i]||i,onChange:A,onMount:u,options:r,readOnly:f||w,recalculatedHeightAt:h,value:F.current,wrapperProps:{id:`field-${I?.replace(/\./g,"__")}`},...s||{}}),C]}),Wi(de,{CustomComponent:y,Fallback:Wi(Je,{description:n,path:I})})]})},au=Xe(jk);import{jsx as Ui,jsxs as _1}from"react/jsx-runtime";import{getTranslation as Mk}from"@payloadcms/translations";import{Fragment as Ok,useCallback as Vk,useEffect as Gk,useMemo as zk,useState as iS}from"react";import{c as Bk}from"react/compiler-runtime";import{fieldAffectsData as sS}from"payload/shared";var Nf=t=>t.reduce((e,o)=>{let n="fields"in o?o.fields:void 0;return n?sS(o)?e.push(`${o.name}.`):e.push(...Nf(n)):o.type==="tabs"?"tabs"in o&&o.tabs?.forEach(r=>{"name"in r?e.push(`${r.name}.`):e.push(...Nf(r.fields))}):sS(o)&&e.push(o.name),e},[]);var Hi=t=>{let e=Bk(12),{fields:o,path:n,setErrorCount:r}=t,[s]=Hs(),i=no(),l;e[0]!==o?(l=Nf(o),e[0]=o,e[1]=l):l=e[1];let a=l,c;e[2]!==s||e[3]!==i||e[4]!==n||e[5]!==a||e[6]!==r?(c=()=>{if(i){let d=0;Object.entries(s).forEach(f=>{let[m]=f;if(a?.some(h=>{let g=[...n,h].join(".");return g.endsWith(".")?m.startsWith(g):m===g})){let h=s[m];"valid"in h&&!h.valid&&(d=d+1)}}),r(d)}},e[2]=s,e[3]=i,e[4]=n,e[5]=a,e[6]=r,e[7]=c):c=e[7];let u;return e[8]!==o||e[9]!==s||e[10]!==i?(u=[s,i,o],e[8]=o,e[9]=s,e[10]=i,e[11]=u):u=e[11],Bi(c,250,u),null};var lu="collapsible-field",Wk=t=>{let{field:e,field:{admin:{className:o,description:n,initCollapsed:r=!1}={},fields:s,label:i}={},indexPath:l,parentPath:a,parentSchemaPath:c,path:u,permissions:d,readOnly:f}=t,{i18n:m}=E(),{getPreference:p,setPreference:h}=Kt(),{preferencesKey:g}=Re(),[b,C]=iS(),v=`collapsible-${u?.replace(/\./g,"__")}`,[y,x]=iS(0),S=y>0,{customComponents:{AfterInput:w,BeforeInput:T,Description:I,Label:R}={},disabled:D}=Ee({path:u}),_=Vk(async A=>{let $=await p(g);g&&h(g,{...$,...u?{fields:{...$?.fields||{},[u]:{...$?.fields?.[u],collapsed:A}}}:{fields:{...$?.fields||{},[v]:{...$?.fields?.[v],collapsed:A}}}})},[g,v,p,h,u]);Gk(()=>{(async()=>{if(g){let $=await p(g),P=u?$?.fields?.[u]?.collapsed:$?.fields?.[v]?.collapsed;C(P!==void 0?!!P:typeof r=="boolean"?r:!1)}else C(typeof r=="boolean"?r:!1)})()},[p,g,v,r,u]);let F=zk(()=>et(e),[e]);return typeof b!="boolean"?null:_1(Ok,{children:[Ui(Hi,{fields:s,path:u.split(".").slice(0,-1),setErrorCount:x}),_1("div",{className:[Ne,lu,o,S?`${lu}--has-error`:`${lu}--has-no-error`].filter(Boolean).join(" "),id:`field-${v}`,style:F,children:[T,Ui(zi,{className:`${lu}__collapsible`,collapsibleStyle:S?"error":"default",header:_1("div",{className:`${lu}__row-label-wrap`,children:[Ui(ss,{CustomComponent:R,label:Mk(i,m),path:u}),S&&Ui(yo,{count:y,i18n:m,withMessage:!0})]}),initCollapsed:b,onToggle:_,children:Ui(Po,{fields:s,margins:"small",parentIndexPath:l,parentPath:a,parentSchemaPath:c,permissions:d,readOnly:f||D})}),w,Ui(de,{CustomComponent:I,Fallback:Ui(Je,{description:n,path:u})})]})]})},cu=Xe(Wk);import{jsx as ri,jsxs as q_}from"react/jsx-runtime";import{getTranslation as WM}from"@payloadcms/translations";import{useCallback as pv,useMemo as hv}from"react";import{jsx as T1}from"react/jsx-runtime";import{lazy as Hk,Suspense as Uk}from"react";var Xk=Hk(()=>import("./DatePicker-F432AIH3.js")),cl=t=>T1(Uk,{fallback:T1(It,{height:50}),children:T1(Xk,{...t})});import{jsx as J_,jsxs as GM}from"react/jsx-runtime";import{useMemo as zM}from"react";import{jsx as qi}from"react/jsx-runtime";import{getTranslation as X_}from"@payloadcms/translations";import Z_,{useEffect as BM,useId as MM}from"react";function dn(t){"@babel/helpers - typeof";return dn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dn(t)}function aS(t,e){if(dn(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(dn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Lf(t){var e=aS(t,"string");return dn(e)=="symbol"?e:e+""}function Xi(t,e,o){return(e=Lf(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function lS(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),o.push.apply(o,n)}return o}function je(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?lS(Object(o),!0).forEach(function(n){Xi(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):lS(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function cS(t){if(Array.isArray(t))return t}function uS(t,e){var o=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(o!=null){var n,r,s,i,l=[],a=!0,c=!1;try{if(s=(o=o.call(t)).next,e===0){if(Object(o)!==o)return;a=!1}else for(;!(a=(n=s.call(o)).done)&&(l.push(n.value),l.length!==e);a=!0);}catch(u){c=!0,r=u}finally{try{if(!a&&o.return!=null&&(i=o.return(),Object(i)!==i))return}finally{if(c)throw r}}return l}}function uu(t,e){(e==null||e>t.length)&&(e=t.length);for(var o=0,n=Array(e);o<e;o++)n[o]=t[o];return n}function $f(t,e){if(t){if(typeof t=="string")return uu(t,e);var o={}.toString.call(t).slice(8,-1);return o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set"?Array.from(t):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?uu(t,e):void 0}}function dS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
48
+ `};var d2=(t,e)=>{let o=Object.assign({},t),{type:n,payload:r}=e;switch(n){case"UPDATE_MODAL":{let{slug:s}=r;s&&(o[s]=Object.assign(Object.assign({},o[s]),r));break}case"OPEN_MODAL":{let{slug:s}=r;s&&(s in o&&o[s].isOpen||(o[s]=Object.assign(Object.assign({},o[s]),{slug:s,openedOn:Date.now(),isOpen:!0})));break}case"TOGGLE_MODAL":{let{slug:s}=r;if(s){let i=s in o&&o[s].isOpen;o[s]=Object.assign(Object.assign({},o[s]),{slug:s,openedOn:i?void 0:Date.now(),isOpen:!i})}break}case"CLOSE_MODAL":{let{slug:s}=r;s&&(o[s]=Object.assign(Object.assign({},o[s]),{slug:s,openedOn:void 0,isOpen:!1}));break}case"REMOVE_MODAL":{let{slug:s}=r;s&&s in o&&delete o[s];break}case"CLOSE_LATEST_MODAL":{let s=Object.keys(o).reduce((i,l)=>{let a=o[l];return a.isOpen&&typeof a.openedOn=="number"&&(!i||typeof i.openedOn=="number"&&a.openedOn>i.openedOn)?a:i},void 0);s&&(o[s.slug]=Object.assign(Object.assign({},o[s.slug]),{isOpen:!1,openedOn:void 0}));break}case"CLOSE_ALL_MODALS":{o=Object.entries(o).reduce((s,[i,l])=>(s[i]=Object.assign(Object.assign({},l),{isOpen:!1,openedOn:void 0}),s),{});break}default:break}return o};var o9=()=>{if(typeof window<"u")return new URLSearchParams(window.location.search)},r9=()=>{let t=o9(),e=[];if(t){let o=t.get("modal");o&&(o.includes(",")?e=o.split(","):e=[o])}return e},Gb=t=>{let{classPrefix:e,minifyCSS:o=!0,generateCSS:n=!0,zIndex:r=9999,handleParamChange:s,children:i,transTime:l=250}=t,a=f2(null),[c,u]=t9(d2,{},()=>r9().reduce(($,P)=>($[P]={slug:P,isOpen:!0,openedOn:Date.now()},$),{})),[d,f]=cf(!1),[m,p]=cf(!1),[h,g]=cf(!1),[b,C]=cf(""),v=f2(!1),y=Ys(F=>{F.keyCode===27&&u({type:"CLOSE_LATEST_MODAL"})},[]);uf(()=>(v.current||(document.addEventListener("keydown",F=>y(F),!1),v.current=!0),()=>{v.current&&document.removeEventListener("keydown",F=>y(F),!1)}),[y]),uf(()=>{if(n){let F="";F=u2({classPrefix:e,zIndex:r}),o&&(F=F.replace(/\n/g,"").replace(/\s\s+/g," ")),C(F)}},[n,o,r,e]),uf(()=>{if(typeof s=="function"&&s(c),typeof s=="boolean"&&s){let F=Object.keys(c).filter(j=>c[j].isOpen),A=new URLSearchParams;for(let j of F)A.append("modal",j);let $=A.toString()?`?${A}`:"",P=`${window.location.pathname}${$}`;window.history.pushState({},"",P)}},[c,s]),uf(()=>{let F=Object.keys(c).some(A=>c[A].isOpen);f(F)},[c]);let x=Ys((F,A)=>{A&&(F?(l2(A),g(!0)):(c2(A),g(!1)))},[]),S=Ys(F=>{a.current=F},[]),w=Ys(F=>{u({type:"OPEN_MODAL",payload:{slug:F}})},[]),T=Ys(F=>{u({type:"CLOSE_MODAL",payload:{slug:F}})},[]),I=Ys(()=>{u({type:"CLOSE_ALL_MODALS"})},[]),R=Ys(F=>{u({type:"TOGGLE_MODAL",payload:{slug:F}})},[]),D=Ys(F=>c[F]&&c[F].isOpen,[c]),_=Object.assign({},t);return delete _.children,KL(e9,{children:[n&&m2("style",{dangerouslySetInnerHTML:{__html:b}}),m2(of.Provider,{value:Object.assign(Object.assign({},_),{transTime:l,containerRef:a,modalState:c,oneModalIsOpen:d,isModalOpen:D,closeOnBlur:m,bodyScrollIsLocked:h,classPrefix:e,closeAllModals:I,setCloseOnBlur:p,openModal:w,closeModal:T,toggleModal:R,setBodyScrollLock:x,setContainerRef:S}),children:i})]})};import{usePathname as w9,useRouter as S9}from"next/navigation.js";import{formatAdminURL as I9}from"payload/shared";import*as b2 from"qs-esm";import ff,{createContext as _9,use as T9,useCallback as ji,useEffect as pf,useState as el}from"react";import{c as p9}from"react/compiler-runtime";import{jsx as h9}from"react/jsx-runtime";import{useRouter as g9}from"next/navigation.js";import{formatAdminURL as b9}from"payload/shared";import"react";import{c as m9}from"react/compiler-runtime";import{jsx as Wc,jsxs as Hb}from"react/jsx-runtime";import f9 from"react";import{c as zb}from"react/compiler-runtime";import{jsx as ds,jsxs as df}from"react/jsx-runtime";import{createContext as a9,use as l9,useLayoutEffect as c9,useState as u9}from"react";import{jsx as n9}from"react/jsx-runtime";import"react";var Vc="gutter",Co=t=>{let{children:e,className:o,left:n=!0,negativeLeft:r=!1,negativeRight:s=!1,ref:i,right:l=!0}=t,a=n&&!r,c=l&&!s;return n9("div",{className:[Vc,a&&`${Vc}--left`,c&&`${Vc}--right`,r&&`${Vc}--negative-left`,s&&`${Vc}--negative-right`,o].filter(Boolean).join(" "),ref:i,children:e})};import{c as s9}from"react/compiler-runtime";import{useId as i9}from"react";var Gc=t=>{let e=s9(3),o=i9(),n=dt(),r=`${t}-${o}`,s;return e[0]!==n||e[1]!==r?(s=zc({slug:r,depth:n}),e[0]=n,e[1]=r,e[2]=s):s=e[2],s};var nn="drawer",Wb=100,zc=({slug:t,depth:e})=>`drawer_${e}_${t}`,ms=t=>{let e=zb(4),{slug:o,children:n,className:r,disabled:s,onClick:i,...l}=t,{openModal:a}=ne(),c;return e[0]!==i||e[1]!==a||e[2]!==o?(c=d=>{a(o),typeof i=="function"&&i(d)},e[0]=i,e[1]=a,e[2]=o,e[3]=c):c=e[3],ds("button",{className:r,disabled:s,onClick:c,type:"button",...l,children:n})},At=t=>{let e=zb(22),{slug:o,children:n,className:r,gutter:s,Header:i,hoverTitle:l,title:a}=t,c=s===void 0?!0:s,{t:u}=E(),{closeModal:d,modalState:f}=ne(),m=jr(),p=!!f[o]?.isOpen,[h,g]=u9(p),b,C;if(e[0]!==p?(b=()=>{g(p)},C=[p],e[0]=p,e[1]=b,e[2]=C):(b=e[1],C=e[2]),c9(b,C),p){let v=h&&`${nn}--is-open`,y=m>1&&`${nn}--nested`,x;e[3]!==r||e[4]!==v||e[5]!==y?(x=[r,nn,v,y].filter(Boolean),e[3]=r,e[4]=v,e[5]=y,e[6]=x):x=e[6];let S=x.join(" "),w=Wb+m,T;if(e[7]!==i||e[8]!==n||e[9]!==d||e[10]!==m||e[11]!==c||e[12]!==l||e[13]!==o||e[14]!==u||e[15]!==S||e[16]!==w||e[17]!==a){let I;e[19]!==d||e[20]!==o?(I=()=>d(o),e[19]=d,e[20]=o,e[21]=I):I=e[21],T=ds(d9,{children:df(vr,{className:S,closeOnBlur:!1,slug:o,style:{zIndex:w},children:[(!m||m===1)&&ds("div",{className:`${nn}__blur-bg`}),ds("button",{"aria-label":u("general:close"),className:`${nn}__close`,id:`close-drawer__${o}`,onClick:I,type:"button"}),df("div",{className:`${nn}__content`,style:{width:`calc(100% - (${m} * var(--gutter-h)))`},children:[ds("div",{className:`${nn}__blur-bg-content`}),df(Co,{className:`${nn}__content-children`,left:c,right:c,children:[i,i===void 0&&df("div",{className:`${nn}__header`,children:[ds("h2",{className:`${nn}__header__title`,title:l?a:null,children:a}),ds("button",{"aria-label":u("general:close"),className:`${nn}__header__close`,id:`close-drawer__${o}`,onClick:()=>d(o),type:"button",children:ds(bt,{})})]}),n]})]})]})}),e[7]=i,e[8]=n,e[9]=d,e[10]=m,e[11]=c,e[12]=l,e[13]=o,e[14]=u,e[15]=S,e[16]=w,e[17]=a,e[18]=T}else T=e[18];return T}return null},p2=a9(1),d9=t=>{let e=zb(3),{children:o}=t,r=jr()+1,s;return e[0]!==o||e[1]!==r?(s=ds(p2,{value:r,children:o}),e[0]=o,e[1]=r,e[2]=s):s=e[2],s},jr=()=>l9(p2);var mf="confirmation-modal";function rt(t){let e=m9(25),{body:o,cancelLabel:n,className:r,confirmingLabel:s,confirmLabel:i,heading:l,modalSlug:a,onCancel:c,onConfirm:u}=t,d=jr(),[f,m]=f9.useState(!1),{closeModal:p,isModalOpen:h}=ne(),{t:g}=E(),b;e[0]!==p||e[1]!==f||e[2]!==a||e[3]!==u?(b=async()=>{f||(m(!0),typeof u=="function"&&await u(),m(!1),p(a))},e[0]=p,e[1]=f,e[2]=a,e[3]=u,e[4]=b):b=e[4];let C=b,v;e[5]!==p||e[6]!==f||e[7]!==a||e[8]!==c?(v=()=>{f||(p(a),typeof c=="function"&&c())},e[5]=p,e[6]=f,e[7]=a,e[8]=c,e[9]=v):v=e[9];let y=v;if(!h(a))return null;let x;e[10]!==r?(x=[mf,r].filter(Boolean),e[10]=r,e[11]=x):x=e[11];let S=x.join(" "),w=Wb+d,T;return e[12]!==o||e[13]!==n||e[14]!==i||e[15]!==f||e[16]!==s||e[17]!==l||e[18]!==a||e[19]!==y||e[20]!==C||e[21]!==g||e[22]!==S||e[23]!==w?(T=Wc(vr,{className:S,closeOnBlur:!1,slug:a,style:{zIndex:w},children:Hb("div",{className:`${mf}__wrapper`,children:[Hb("div",{className:`${mf}__content`,children:[typeof l=="string"?Wc("h1",{children:l}):l,typeof o=="string"?Wc("p",{children:o}):o]}),Hb("div",{className:`${mf}__controls`,children:[Wc(ee,{buttonStyle:"secondary",disabled:f,id:"confirm-cancel",onClick:y,size:"large",type:"button",children:n||g("general:cancel")}),Wc(ee,{id:"confirm-action",onClick:C,size:"large",children:f?s||`${g("general:loading")}...`:i||g("general:confirm")})]})]})}),e[12]=o,e[13]=n,e[14]=i,e[15]=f,e[16]=s,e[17]=l,e[18]=a,e[19]=y,e[20]=C,e[21]=g,e[22]=S,e[23]=w,e[24]=T):T=e[24],T}var Ub="stay-logged-in",h2=()=>{let t=p9(11),{refreshCookie:e}=De(),o=g9(),{config:n}=z(),{admin:r,routes:s}=n,{routes:i}=r,{logout:l}=i,{admin:a}=s,{t:c}=E(),{startRouteTransition:u}=qe(),d;t[0]!==a||t[1]!==l||t[2]!==o||t[3]!==u?(d=()=>u(()=>o.push(b9({adminRoute:a,path:l}))),t[0]=a,t[1]=l,t[2]=o,t[3]=u,t[4]=d):d=t[4];let f=d,m;t[5]!==e?(m=()=>{e()},t[5]=e,t[6]=m):m=t[6];let p=m,h;return t[7]!==p||t[8]!==f||t[9]!==c?(h=h9(rt,{body:c("authentication:youAreInactive"),cancelLabel:c("authentication:stayLoggedIn"),confirmLabel:c("authentication:logOut"),heading:c("authentication:stayLoggedIn"),modalSlug:Ub,onCancel:p,onConfirm:f}),t[7]=p,t[8]=f,t[9]=c,t[10]=h):h=t[10],h};import{c as v9}from"react/compiler-runtime";import{useInsertionEffect as y9,useRef as C9}from"react";function ut(t){let e=v9(4),o=C9(t),n,r;e[0]!==t?(n=()=>{o.current=t},r=[t],e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]),y9(n,r);let s;return e[3]===Symbol.for("react.memo_cache_sentinel")?(s=(...i)=>{let l=i,a=o.current;return a(...l)},e[3]=s):s=e[3],s}import*as g2 from"qs-esm";var Ue={delete:(t,e={headers:{}})=>{let o=e&&e.headers?{...e.headers}:{},n={...e,credentials:"include",headers:{...o},method:"delete"};return fetch(t,n)},get:(t,e={headers:{}})=>{let o="";return e.params&&(o=g2.stringify(e.params,{addQueryPrefix:!0})),fetch(`${t}${o}`,{credentials:"include",...e})},patch:(t,e={headers:{}})=>{let o=e&&e.headers?{...e.headers}:{},n={...e,credentials:"include",headers:{...o},method:"PATCH"};return fetch(t,n)},post:(t,e={headers:{}})=>{let o=e&&e.headers?{...e.headers}:{},n={...e,credentials:"include",headers:{...o},method:"post"};return fetch(`${t}`,n)},put:(t,e={headers:{}})=>{let o=e&&e.headers?{...e.headers}:{},n={...e,credentials:"include",headers:{...o},method:"put"};return fetch(t,n)}};var v2=_9({}),F9=2147483647;function Xb({children:t,permissions:e,user:o}){let n=w9(),r=S9(),{config:s}=z(),{admin:{autoLogin:i,autoRefresh:l,routes:{inactivity:a},user:c},routes:{admin:u,api:d},serverURL:f}=s,{i18n:m}=E(),{closeAllModals:p,openModal:h}=ne(),{startRouteTransition:g}=qe(),[b,C]=el(o),[v,y]=el(),[x,S]=el(),[w,T]=el(e),[I,R]=el(12e4),[D,_]=el(!1),F=ff.useRef(null),A=ff.useRef(null),$=ff.useRef(null),P=b?.id,j=ji(()=>{g(()=>r.replace(I9({adminRoute:u,path:`${a}${window.location.pathname.startsWith(u)?`?redirect=${encodeURIComponent(window.location.pathname)}`:""}`}))),p()},[r,u,a,p,g]),B=ji(()=>{C(null),y(void 0),S(void 0),clearTimeout(F.current)},[]),L=ut(()=>{l?U():h(Ub)}),N=ji(Z=>{if(clearTimeout(A.current),clearTimeout($.current),Z?.user){C(Z.user),y(Z.token),S(Z.exp*1e3);let Y=Math.max(0,Math.min((Z.exp??0)*1e3-Date.now(),F9));if(Y){let W=Math.min(6e4,Y/2);R(W),A.current=setTimeout(L,Math.max(Y-W,0)),$.current=setTimeout(()=>{B(),j()},Y)}}else B()},[j,B]),M=ji(Z=>{if(!P)return;let Y=Math.max(0,(x??0)-Date.now());(Z||x&&Y<I*2)&&(clearTimeout(F.current),F.current=setTimeout(async()=>{try{let W=await Ue.post(`${f}${d}/${c}/refresh-token?refresh`,{headers:{"Accept-Language":m.language}});if(W.status===200){let se=await W.json();N(se)}else N(null),j()}catch(W){oe.error(W.message)}},1e3))},[d,m.language,j,f,N,x,c,I,P]),k=ji(async Z=>{try{let Y=await Ue.post(`${f}${d}/${c}/refresh-token`,{headers:{"Accept-Language":m.language}});if(Y.status===200){let W=await Y.json();return Z||N(W),W.user}b&&(N(null),j())}catch(Y){oe.error(`Refreshing token failed: ${Y.message}`)}return null},[d,m.language,j,f,N,c,b]),O=ji(async()=>{try{b&&b.collection&&(N(null),await Ue.post(`${f}${d}/${b.collection}/logout`))}catch{}return!0},[d,f,N,b]),V=ji(async({locale:Z}={})=>{let Y=b2.stringify({locale:Z},{addQueryPrefix:!0});try{let W=await Ue.get(`${f}${d}/access${Y}`,{headers:{"Accept-Language":m.language}});if(W.status===200){let se=await W.json();T(se)}else throw new Error(`Fetching permissions failed with status code ${W.status}`)}catch(W){oe.error(`Refreshing permissions failed: ${W.message}`)}},[f,d,m]),G=ff.useCallback(async()=>{try{let Z=await Ue.get(`${f}${d}/${c}/me`,{credentials:"include",headers:{"Accept-Language":m.language}});if(Z.status===200){let Y=await Z.json();return N(Y),Y?.user||null}}catch(Z){oe.error(`Fetching user failed: ${Z.message}`)}return null},[f,d,c,m.language,N]),U=ut(M);pf(()=>{U()},[n]);let H=ut(G);return pf(()=>{async function Z(){await H(),_(!0)}Z()},[]),pf(()=>{!b&&i&&!i.prefillOnly&&H()},[b,i]),pf(()=>()=>{clearTimeout(F.current),clearTimeout(A.current),clearTimeout($.current)},[]),!b&&!D?null:x9(v2,{value:{fetchFullUser:G,logOut:O,permissions:w,refreshCookie:M,refreshCookieAsync:k,refreshPermissions:V,setPermissions:T,setUser:N,token:v,tokenExpirationMs:x,user:b},children:t})}var De=()=>T9(v2);var S2=x2({}),I2=x2({localeIsLoading:!1,setLocaleIsLoading:t=>{}}),N9=async(t,e)=>await fetch(`${e}/payload-preferences/${t}`,{credentials:"include",headers:{"Content-Type":"application/json"},method:"GET"})?.then(o=>o.json()),Zb=t=>{let e=D9(26),{children:o,locale:n}=t,{config:r}=z(),{localization:s,routes:i,serverURL:l}=r,a=s===void 0?!1:s,{api:c}=i,{user:u}=De(),d=a?a.defaultLocale:"en",f=R9(),m;e[0]!==f?(m=f.get("locale"),e[0]=f,e[1]=m):m=e[1];let p=m,h;e[2]!==d||e[3]!==n||e[4]!==p||e[5]!==a?(h=()=>!a||a&&!a.locales.length?{}:Zs(a,p)||Zs(a,n)||Zs(a,d)||Zs(a,a.locales[0].code),e[2]=d,e[3]=n,e[4]=p,e[5]=a,e[6]=h):h=e[6];let[g,b]=A9.useState(h),[C,v]=E9(!1),y=P9(g),x,S;e[7]!==g?(x=()=>{g.code!==y.current.code&&v(!1),y.current=g},S=[g],e[7]=g,e[8]=x,e[9]=S):(x=e[8],S=e[9]),C2(x,S);let w=`${l}${c}`,T;e[10]!==d||e[11]!==w||e[12]!==p||e[13]!==a||e[14]!==u?.id?(T=()=>{(async function(){if(a&&u?.id){let A=p||await N9("locale",w)?.then(L9),$=Zs(a,A)||Zs(a,d)||Zs(a,a?.locales?.[0]?.code);$&&b($)}})()},e[10]=d,e[11]=w,e[12]=p,e[13]=a,e[14]=u?.id,e[15]=T):T=e[15];let I=u?.id,R;e[16]!==d||e[17]!==w||e[18]!==p||e[19]!==a||e[20]!==I?(R=[d,a,w,p,I],e[16]=d,e[17]=w,e[18]=p,e[19]=a,e[20]=I,e[21]=R):R=e[21],C2(T,R);let D;return e[22]!==o||e[23]!==C||e[24]!==g?(D=y2(S2,{value:g,children:y2(I2,{value:{localeIsLoading:C,setLocaleIsLoading:v},children:o})}),e[22]=o,e[23]=C,e[24]=g,e[25]=D):D=e[25],D},hf=()=>w2(I2),Se=()=>w2(S2);function L9(t){return t.value}var gf=(t,e,o)=>{if(t)return`field-${t.replace(/\./g,"__")}${e>1?`-${e}`:""}${o?`-${o}`:""}`};var Fe=t=>{let{as:e,hideLocale:o,htmlFor:n,label:r,localized:s,path:i,required:l,unstyled:a}=t,c=e===void 0?"label":e,u=o===void 0?!1:o,d=s===void 0?!1:s,f=l===void 0?!1:l,m=a===void 0?!1:a,{uuid:p}=ze(),h=dt(),g=n||gf(i,h,p),{i18n:b}=E(),{code:C,label:v}=Se(),y=c==="label"?g?"label":"span":c||"span";return r?_2(y,{className:`field-label${m?" unstyled":""}`,htmlFor:g,children:[k9(r,b),f&&!m&&$9("span",{className:"required",children:"*"}),d&&!u&&_2("span",{className:"localized",children:["\u2014 ",typeof v=="string"?v:C]})]}):null};var bf=({collapsed:t,rowID:e,rows:o})=>o.reduce((n,r)=>(e===r.id&&(r.collapsed=t),r.collapsed&&n.collapsedIDs.push(r.id),n.updatedRows.push(r),n),{collapsedIDs:[],updatedRows:[]}),vf=({collapsed:t,rows:e})=>e.reduce((o,n)=>(n.collapsed=t,t&&o.collapsedIDs.push(n.id),o.updatedRows.push(n),o),{collapsedIDs:[],updatedRows:[]});import{c as j$}from"react/compiler-runtime";import{jsx as F3}from"react/jsx-runtime";import*as D3 from"react";import{jsx as Kc,jsxs as N$}from"react/jsx-runtime";import{rtlLanguages as L$}from"@payloadcms/translations";import{useCallback as T3,useMemo as $$}from"react";import{c as F$}from"react/compiler-runtime";import l1,{useRef as x3}from"react";import{c as j9}from"react/compiler-runtime";import{useEffect as B9,useRef as M9}from"react";var Bi=(t,e,o)=>{let n=j9(9),r;n[0]!==o?(r=o===void 0?[]:o,n[0]=o,n[1]=r):r=n[1];let s=r,i;n[2]===Symbol.for("react.memo_cache_sentinel")?(i=Date.now(),n[2]=i):i=n[2];let l=M9(i),a;n[3]!==t||n[4]!==e?(a=()=>{let u=setTimeout(()=>{Date.now()-l.current>=e&&(t(),l.current=Date.now())},e-(Date.now()-l.current));return()=>{clearTimeout(u)}},n[3]=t,n[4]=e,n[5]=a):a=n[5];let c;n[6]!==e||n[7]!==s?(c=[e,...s],n[6]=e,n[7]=s,n[8]=c):c=n[8],B9(a,c)};import{jsx as _f}from"react/jsx-runtime";import*as v3 from"qs-esm";import y$,{createContext as C$,use as x$,useCallback as sl,useEffect as g3,useMemo as w$,useRef as b3,useState as Zc}from"react";import{getTranslation as i$}from"@payloadcms/translations";var O9={},Hc={};function tl(t,e){try{let n=(O9[t]||=new Intl.DateTimeFormat("en-GB",{timeZone:t,hour:"numeric",timeZoneName:"longOffset"}).format)(e).split("GMT")[1]||"";return n in Hc?Hc[n]:T2(n,n.split(":"))}catch{if(t in Hc)return Hc[t];let o=t?.match(V9);return o?T2(t,o.slice(1)):NaN}}var V9=/([+-]\d\d):?(\d\d)?/;function T2(t,e){let o=+e[0],n=+(e[1]||0);return Hc[t]=o>0?o*60+n:o*60-n}var Qt=class t extends Date{constructor(...e){super(),e.length>1&&typeof e[e.length-1]=="string"&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(tl(this.timeZone,this))?this.setTime(NaN):e.length?typeof e[0]=="number"&&(e.length===1||e.length===2&&typeof e[1]!="number")?this.setTime(e[0]):typeof e[0]=="string"?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),D2(this,NaN),Yb(this)):this.setTime(Date.now())}static tz(e,...o){return o.length?new t(...o,e):new t(Date.now(),e)}withTimeZone(e){return new t(+this,e)}getTimezoneOffset(){return-tl(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),Yb(this),+this}[Symbol.for("constructDateFrom")](e){return new t(+new Date(e),this.timeZone)}},F2=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(t=>{if(!F2.test(t))return;let e=t.replace(F2,"$1UTC");Qt.prototype[e]&&(t.startsWith("get")?Qt.prototype[t]=function(){return this.internal[e]()}:(Qt.prototype[t]=function(){return Date.prototype[e].apply(this.internal,arguments),G9(this),+this},Qt.prototype[e]=function(){return Date.prototype[e].apply(this,arguments),Yb(this),+this}))});function Yb(t){t.internal.setTime(+t),t.internal.setUTCMinutes(t.internal.getUTCMinutes()-t.getTimezoneOffset())}function G9(t){Date.prototype.setFullYear.call(t,t.internal.getUTCFullYear(),t.internal.getUTCMonth(),t.internal.getUTCDate()),Date.prototype.setHours.call(t,t.internal.getUTCHours(),t.internal.getUTCMinutes(),t.internal.getUTCSeconds(),t.internal.getUTCMilliseconds()),D2(t)}function D2(t){let e=tl(t.timeZone,t),o=new Date(+t);o.setUTCHours(o.getUTCHours()-1);let n=-new Date(+t).getTimezoneOffset(),r=-new Date(+o).getTimezoneOffset(),s=n-r,i=Date.prototype.getHours.apply(t)!==t.internal.getUTCHours();s&&i&&t.internal.setUTCMinutes(t.internal.getUTCMinutes()+s);let l=n-e;l&&Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+l);let a=tl(t.timeZone,t),u=-new Date(+t).getTimezoneOffset()-a,d=a!==e,f=u-l;if(d&&f){Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+f);let m=tl(t.timeZone,t),p=a-m;p&&(t.internal.setUTCMinutes(t.internal.getUTCMinutes()+p),Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+p))}}var z9=Math.pow(10,8)*24*60*60*1e3,Aae=-z9,yf=6048e5,R2=864e5;var Uc=43200,Jb=1440;var W9=3600;var A2=W9*24,Pae=A2*7,H9=A2*365.2425,U9=H9/12,Eae=U9*3,qb=Symbol.for("constructDateFrom");function io(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&qb in t?t[qb](e):t instanceof Date?new t.constructor(e):new Date(e)}function it(t,e){return io(e||t,t)}var X9={};function Pn(){return X9}function fs(t,e){let o=Pn(),n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,r=it(t,e?.in),s=r.getDay(),i=(s<n?7:0)+s-n;return r.setDate(r.getDate()-i),r.setHours(0,0,0,0),r}function Mi(t,e){return fs(t,{...e,weekStartsOn:1})}function Cf(t,e){let o=it(t,e?.in),n=o.getFullYear(),r=io(o,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);let s=Mi(r),i=io(o,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);let l=Mi(i);return o.getTime()>=s.getTime()?n+1:o.getTime()>=l.getTime()?n:n-1}function ol(t){let e=it(t),o=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return o.setUTCFullYear(e.getFullYear()),+t-+o}function En(t,...e){let o=io.bind(null,t||e.find(n=>typeof n=="object"));return e.map(o)}function Js(t,e){let o=it(t,e?.in);return o.setHours(0,0,0,0),o}function P2(t,e,o){let[n,r]=En(o?.in,t,e),s=Js(n),i=Js(r),l=+s-ol(s),a=+i-ol(i);return Math.round((l-a)/R2)}function E2(t,e){let o=Cf(t,e),n=io(e?.in||t,0);return n.setFullYear(o,0,4),n.setHours(0,0,0,0),Mi(n)}function rl(t,e){let o=+it(t)-+it(e);return o<0?-1:o>0?1:o}function xf(t){return io(t,Date.now())}function N2(t,e,o){let[n,r]=En(o?.in,t,e);return+Js(n)==+Js(r)}function L2(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function $2(t){return!(!L2(t)&&typeof t!="number"||isNaN(+it(t)))}function k2(t,e,o){let[n,r]=En(o?.in,t,e),s=n.getFullYear()-r.getFullYear(),i=n.getMonth()-r.getMonth();return s*12+i}function j2(t){return e=>{let n=(t?Math[t]:Math.trunc)(e);return n===0?0:n}}function B2(t,e){return+it(t)-+it(e)}function wf(t,e){let o=it(t,e?.in);return o.setHours(23,59,59,999),o}function M2(t,e){let o=it(t,e?.in),n=o.getMonth();return o.setFullYear(o.getFullYear(),n+1,0),o.setHours(23,59,59,999),o}function O2(t,e){let o=it(t,e?.in);return+wf(o,e)==+M2(o,e)}function V2(t,e,o){let[n,r,s]=En(o?.in,t,t,e),i=rl(r,s),l=Math.abs(k2(r,s));if(l<1)return 0;r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*l);let a=rl(r,s)===-i;O2(n)&&l===1&&rl(n,s)===1&&(a=!1);let c=i*(l-+a);return c===0?0:c}function G2(t,e,o){let n=B2(t,e)/1e3;return j2(o?.roundingMethod)(n)}function z2(t,e){let o=it(t,e?.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}function W2(t){return wf(Date.now(),t)}function H2(t,e){let o=it(t,e?.in);return P2(o,z2(o))+1}function U2(t,e){let o=it(t,e?.in),n=+Mi(o)-+E2(o);return Math.round(n/yf)+1}function Sf(t,e){let o=it(t,e?.in),n=o.getFullYear(),r=Pn(),s=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=io(e?.in||t,0);i.setFullYear(n+1,0,s),i.setHours(0,0,0,0);let l=fs(i,e),a=io(e?.in||t,0);a.setFullYear(n,0,s),a.setHours(0,0,0,0);let c=fs(a,e);return+o>=+l?n+1:+o>=+c?n:n-1}function X2(t,e){let o=Pn(),n=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,r=Sf(t,e),s=io(e?.in||t,0);return s.setFullYear(r,0,n),s.setHours(0,0,0,0),fs(s,e)}function Z2(t,e){let o=it(t,e?.in),n=+fs(o,e)-+X2(o,e);return Math.round(n/yf)+1}function ft(t,e){let o=t<0?"-":"",n=Math.abs(t).toString().padStart(e,"0");return o+n}var ps={y(t,e){let o=t.getFullYear(),n=o>0?o:1-o;return ft(e==="yy"?n%100:n,e.length)},M(t,e){let o=t.getMonth();return e==="M"?String(o+1):ft(o+1,2)},d(t,e){return ft(t.getDate(),e.length)},a(t,e){let o=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return o.toUpperCase();case"aaa":return o;case"aaaaa":return o[0];case"aaaa":default:return o==="am"?"a.m.":"p.m."}},h(t,e){return ft(t.getHours()%12||12,e.length)},H(t,e){return ft(t.getHours(),e.length)},m(t,e){return ft(t.getMinutes(),e.length)},s(t,e){return ft(t.getSeconds(),e.length)},S(t,e){let o=e.length,n=t.getMilliseconds(),r=Math.trunc(n*Math.pow(10,o-3));return ft(r,e.length)}};var nl={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Qb={G:function(t,e,o){let n=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})}},y:function(t,e,o){if(e==="yo"){let n=t.getFullYear(),r=n>0?n:1-n;return o.ordinalNumber(r,{unit:"year"})}return ps.y(t,e)},Y:function(t,e,o,n){let r=Sf(t,n),s=r>0?r:1-r;if(e==="YY"){let i=s%100;return ft(i,2)}return e==="Yo"?o.ordinalNumber(s,{unit:"year"}):ft(s,e.length)},R:function(t,e){let o=Cf(t);return ft(o,e.length)},u:function(t,e){let o=t.getFullYear();return ft(o,e.length)},Q:function(t,e,o){let n=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return ft(n,2);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,e,o){let n=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return ft(n,2);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,e,o){let n=t.getMonth();switch(e){case"M":case"MM":return ps.M(t,e);case"Mo":return o.ordinalNumber(n+1,{unit:"month"});case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})}},L:function(t,e,o){let n=t.getMonth();switch(e){case"L":return String(n+1);case"LL":return ft(n+1,2);case"Lo":return o.ordinalNumber(n+1,{unit:"month"});case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})}},w:function(t,e,o,n){let r=Z2(t,n);return e==="wo"?o.ordinalNumber(r,{unit:"week"}):ft(r,e.length)},I:function(t,e,o){let n=U2(t);return e==="Io"?o.ordinalNumber(n,{unit:"week"}):ft(n,e.length)},d:function(t,e,o){return e==="do"?o.ordinalNumber(t.getDate(),{unit:"date"}):ps.d(t,e)},D:function(t,e,o){let n=H2(t);return e==="Do"?o.ordinalNumber(n,{unit:"dayOfYear"}):ft(n,e.length)},E:function(t,e,o){let n=t.getDay();switch(e){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})}},e:function(t,e,o,n){let r=t.getDay(),s=(r-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return ft(s,2);case"eo":return o.ordinalNumber(s,{unit:"day"});case"eee":return o.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(r,{width:"short",context:"formatting"});case"eeee":default:return o.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,o,n){let r=t.getDay(),s=(r-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return ft(s,e.length);case"co":return o.ordinalNumber(s,{unit:"day"});case"ccc":return o.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(r,{width:"narrow",context:"standalone"});case"cccccc":return o.day(r,{width:"short",context:"standalone"});case"cccc":default:return o.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,o){let n=t.getDay(),r=n===0?7:n;switch(e){case"i":return String(r);case"ii":return ft(r,e.length);case"io":return o.ordinalNumber(r,{unit:"day"});case"iii":return o.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return o.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return o.day(n,{width:"short",context:"formatting"});case"iiii":default:return o.day(n,{width:"wide",context:"formatting"})}},a:function(t,e,o){let r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,o){let n=t.getHours(),r;switch(n===12?r=nl.noon:n===0?r=nl.midnight:r=n/12>=1?"pm":"am",e){case"b":case"bb":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,o){let n=t.getHours(),r;switch(n>=17?r=nl.evening:n>=12?r=nl.afternoon:n>=4?r=nl.morning:r=nl.night,e){case"B":case"BB":case"BBB":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,o){if(e==="ho"){let n=t.getHours()%12;return n===0&&(n=12),o.ordinalNumber(n,{unit:"hour"})}return ps.h(t,e)},H:function(t,e,o){return e==="Ho"?o.ordinalNumber(t.getHours(),{unit:"hour"}):ps.H(t,e)},K:function(t,e,o){let n=t.getHours()%12;return e==="Ko"?o.ordinalNumber(n,{unit:"hour"}):ft(n,e.length)},k:function(t,e,o){let n=t.getHours();return n===0&&(n=24),e==="ko"?o.ordinalNumber(n,{unit:"hour"}):ft(n,e.length)},m:function(t,e,o){return e==="mo"?o.ordinalNumber(t.getMinutes(),{unit:"minute"}):ps.m(t,e)},s:function(t,e,o){return e==="so"?o.ordinalNumber(t.getSeconds(),{unit:"second"}):ps.s(t,e)},S:function(t,e){return ps.S(t,e)},X:function(t,e,o){let n=t.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return J2(n);case"XXXX":case"XX":return Oi(n);case"XXXXX":case"XXX":default:return Oi(n,":")}},x:function(t,e,o){let n=t.getTimezoneOffset();switch(e){case"x":return J2(n);case"xxxx":case"xx":return Oi(n);case"xxxxx":case"xxx":default:return Oi(n,":")}},O:function(t,e,o){let n=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Y2(n,":");case"OOOO":default:return"GMT"+Oi(n,":")}},z:function(t,e,o){let n=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Y2(n,":");case"zzzz":default:return"GMT"+Oi(n,":")}},t:function(t,e,o){let n=Math.trunc(+t/1e3);return ft(n,e.length)},T:function(t,e,o){return ft(+t,e.length)}};function Y2(t,e=""){let o=t>0?"-":"+",n=Math.abs(t),r=Math.trunc(n/60),s=n%60;return s===0?o+String(r):o+String(r)+e+ft(s,2)}function J2(t,e){return t%60===0?(t>0?"-":"+")+ft(Math.abs(t)/60,2):Oi(t,e)}function Oi(t,e=""){let o=t>0?"-":"+",n=Math.abs(t),r=ft(Math.trunc(n/60),2),s=ft(n%60,2);return o+r+e+s}var q2=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},Q2=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Z9=(t,e)=>{let o=t.match(/(P+)(p+)?/)||[],n=o[1],r=o[2];if(!r)return q2(t,e);let s;switch(n){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",q2(n,e)).replace("{{time}}",Q2(r,e))},K2={p:Q2,P:Z9};var Y9=/^D+$/,J9=/^Y+$/,q9=["D","DD","YY","YYYY"];function e3(t){return Y9.test(t)}function t3(t){return J9.test(t)}function o3(t,e,o){let n=Q9(t,e,o);if(console.warn(n),q9.includes(t))throw new RangeError(n)}function Q9(t,e,o){let n=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${n} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var K9=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,e$=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,t$=/^'([^]*?)'?$/,o$=/''/g,r$=/[a-zA-Z]/;function Kb(t,e,o){let n=Pn(),r=o?.locale??n.locale??Tc,s=o?.firstWeekContainsDate??o?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=o?.weekStartsOn??o?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,l=it(t,o?.in);if(!$2(l))throw new RangeError("Invalid time value");let a=e.match(e$).map(u=>{let d=u[0];if(d==="p"||d==="P"){let f=K2[d];return f(u,r.formatLong)}return u}).join("").match(K9).map(u=>{if(u==="''")return{isToken:!1,value:"'"};let d=u[0];if(d==="'")return{isToken:!1,value:n$(u)};if(Qb[d])return{isToken:!0,value:u};if(d.match(r$))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});r.localize.preprocessor&&(a=r.localize.preprocessor(l,a));let c={firstWeekContainsDate:s,weekStartsOn:i,locale:r};return a.map(u=>{if(!u.isToken)return u.value;let d=u.value;(!o?.useAdditionalWeekYearTokens&&t3(d)||!o?.useAdditionalDayOfYearTokens&&e3(d))&&o3(d,e,String(t));let f=Qb[d[0]];return f(l,d,r.localize,c)}).join("")}function n$(t){let e=t.match(t$);return e?e[1].replace(o$,"'"):t}function r3(t,e,o){let n=Pn(),r=o?.locale??n.locale??Tc,s=2520,i=rl(t,e);if(isNaN(i))throw new RangeError("Invalid time value");let l=Object.assign({},o,{addSuffix:o?.addSuffix,comparison:i}),[a,c]=En(o?.in,...i>0?[e,t]:[t,e]),u=G2(c,a),d=(ol(c)-ol(a))/1e3,f=Math.round((u-d)/60),m;if(f<2)return o?.includeSeconds?u<5?r.formatDistance("lessThanXSeconds",5,l):u<10?r.formatDistance("lessThanXSeconds",10,l):u<20?r.formatDistance("lessThanXSeconds",20,l):u<40?r.formatDistance("halfAMinute",0,l):u<60?r.formatDistance("lessThanXMinutes",1,l):r.formatDistance("xMinutes",1,l):f===0?r.formatDistance("lessThanXMinutes",1,l):r.formatDistance("xMinutes",f,l);if(f<45)return r.formatDistance("xMinutes",f,l);if(f<90)return r.formatDistance("aboutXHours",1,l);if(f<Jb){let p=Math.round(f/60);return r.formatDistance("aboutXHours",p,l)}else{if(f<s)return r.formatDistance("xDays",1,l);if(f<Uc){let p=Math.round(f/Jb);return r.formatDistance("xDays",p,l)}else if(f<Uc*2)return m=Math.round(f/Uc),r.formatDistance("aboutXMonths",m,l)}if(m=V2(c,a),m<12){let p=Math.round(f/Uc);return r.formatDistance("xMonths",p,l)}else{let p=m%12,h=Math.trunc(m/12);return p<3?r.formatDistance("aboutXYears",h,l):p<9?r.formatDistance("overXYears",h,l):r.formatDistance("almostXYears",h+1,l)}}function n3(t,e){return r3(t,xf(t),e)}function sn(t,e){let o=s$(e)?new e(0):io(e,0);return o.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),o.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),o}function s$(t){return typeof t=="function"&&t.prototype?.constructor===t}function s3(t,e){return N2(io(e?.in||t,t),xf(e?.in||t))}var Br=({date:t,i18n:e,pattern:o,timezone:n})=>{let r=new Qt(new Date(t));if(n){let s=Qt.tz(n),i=r.withTimeZone(n),l=sn(i,s);return e.dateFNS?Kb(l,o,{locale:e.dateFNS}):`${e.t("general:loading")}...`}return e.dateFNS?Kb(r,o,{locale:e.dateFNS}):`${e.t("general:loading")}...`},e1=({date:t,i18n:e})=>{let o=typeof t=="string"?new Date(t):t;return e?.dateFNS?n3(o,{locale:e.dateFNS}):`${e.t("general:loading")}...`};function t1(t){return typeof t=="object"&&"root"in t}function If(t,e){for(let o of t)"text"in o&&o.text?e+=o.text:"children"in o||(e+=`[${o.type}]`),"children"in o&&o.children&&(e+=If(o.children,e));return e}var i3=t=>Array.isArray(t)?t.map(e=>typeof e=="object"&&e!==null?e.id:String(e)).filter(Boolean).join(", "):typeof t=="object"&&t!==null?t.id||"":String(t);var Zo=({collectionConfig:t,data:e,dateFormat:o,fallback:n,globalConfig:r,i18n:s})=>{let i;if(t){let l=t?.admin?.useAsTitle;if(l&&(i=e?.[l],i)){let a=t.fields.find(d=>"name"in d&&d.name===l),c=a?.type==="date",u=a?.type==="relationship";if(c){let d="date"in a.admin&&a?.admin?.date?.displayFormat||o;i=Br({date:i,i18n:s,pattern:d})||i}u&&(i=i3(e[l]))}}return r&&(i=i$(r?.label,s)||r?.slug),i&&t1(i)&&(i=If(i.root.children?.[0]?.children||[],"")),!i&&t1(n)&&(i=If(n.root.children?.[0]?.children||[],"")),i||(i=typeof n=="string"?n:`[${s.t("general:untitled")}]`),i};import{jsx as a$}from"react/jsx-runtime";import{createContext as l$,use as c$,useEffect as u$,useState as d$}from"react";var a3=l$({}),Do=()=>c$(a3),l3=({children:t})=>{let{id:e,collectionSlug:o,data:n,docConfig:r,globalSlug:s,initialData:i}=Re(),{config:{admin:{dateFormat:l}}}=z(),{i18n:a}=E(),[c,u]=d$(()=>Zo({collectionConfig:o?r:void 0,data:{...i||{},id:e},dateFormat:l,fallback:e?.toString(),globalConfig:s?r:void 0,i18n:a}));return u$(()=>{u(Zo({collectionConfig:o?r:void 0,data:{...n,id:e},dateFormat:l,fallback:e?.toString(),globalConfig:s?r:void 0,i18n:a}))},[n,l,a,e,o,r,s]),a$(a3,{value:{setDocumentTitle:u,title:c},children:t})};import{jsx as m$}from"react/jsx-runtime";import{dequal as c3}from"dequal/lite";import{createContext as f$,use as p$,useCallback as u3,useEffect as h$,useRef as r1}from"react";function o1(t,e){let o={...t};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(typeof e[n]=="object"&&!Array.isArray(e[n])&&t[n]?o[n]=o1(t[n],e[n]):o[n]=e[n]);return o}var m3=f$({}),d3=(t,e)=>({body:JSON.stringify({value:t}),headers:{"Accept-Language":e,"Content-Type":"application/json"}}),n1=({children:t})=>{let e=r1({}),o=r1({}),n=r1({}),{config:r}=z(),{user:s}=De(),{i18n:i}=E(),{routes:{api:l},serverURL:a}=r;h$(()=>{s||(o.current={})},[s]);let c=u3(async d=>{let f=o.current;if(typeof f[d]<"u")return f[d];let m=new Promise(p=>{(async()=>{let h=await Ue.get(`${a}${l}/payload-preferences/${d}`,{credentials:"include",headers:{"Accept-Language":i.language}}),g=null;h.status===200&&(g=(await h.json()).value),o.current[d]=g,p(g)})()});return f[d]=m,m},[i.language,l,o,a]),u=u3(async(d,f,m=!1)=>{if(m===!1){o.current[d]=f,await Ue.post(`${a}${l}/payload-preferences/${d}`,d3(f,i.language));return}let p=f,h=await c(d);if(typeof f=="object"&&typeof h=="object"&&typeof p=="object"){if(h&&(p=o1(h,p)),c3(p,h))return;n.current[d]={...n.current[d],...p}}else{if(p===h)return;n.current[d]=p}let g=async()=>{c3(n.current[d],o.current[d])||(o.current[d]=n.current[d],await Ue.post(`${a}${l}/payload-preferences/${d}`,d3(o.current[d],i.language)),delete n.current[d])};setTimeout(()=>{g()})},[l,c,i.language,n,a]);return e.current.getPreference=c,e.current.setPreference=u,m$(m3,{value:e.current,children:t})},Kt=()=>p$(m3);import{c as g$}from"react/compiler-runtime";import{jsx as b$}from"react/jsx-runtime";import s1 from"react";var f3=s1.createContext({getUploadEdits:()=>{},resetUploadEdits:void 0,updateUploadEdits:void 0,uploadEdits:void 0}),i1=t=>{let e=g$(10),{children:o,initialUploadEdits:n}=t,r;e[0]!==n?(r=n||{},e[0]=n,e[1]=r):r=e[1];let[s,i]=s1.useState(r),l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{i({})},e[2]=l):l=e[2];let a=l,c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=p=>{i(h=>({...h||{},...p||{}}))},e[3]=c):c=e[3];let u=c,d;e[4]!==s?(d=()=>s,e[4]=s,e[5]=d):d=e[5];let f=d,m;return e[6]!==o||e[7]!==f||e[8]!==s?(m=b$(f3,{value:{getUploadEdits:f,resetUploadEdits:a,updateUploadEdits:u,uploadEdits:s},children:o}),e[6]=o,e[7]=f,e[8]=s,e[9]=m):m=e[9],m},Vi=()=>s1.use(f3);import*as a1 from"qs-esm";import v$ from"react";var Xc=t=>{let{collectionSlug:e,docPermissions:o,globalSlug:n,isEditing:r}=t;return e?!!(r&&o?.update||!r&&o?.create):n?!!o?.update:!1};var p3=({id:t,collectionSlug:e,globalSlug:o})=>!!(o||e&&t);var h3=({id:t,api:e,collectionSlug:o,globalSlug:n,i18n:r,locale:s,permissions:i,serverURL:l,setDocPermissions:a,setHasPublishPermission:c,setHasSavePermission:u})=>v$.useCallback(async d=>{let f={locale:s||void 0},m=d?.id||t,p=p3({id:m,collectionSlug:o,globalSlug:n});if(p){let h=o?`/${o}/access/${m}`:n?`/globals/${n}/access`:null;if(h){let b=await(await fetch(`${l}${e}${h}?${a1.stringify(f)}`,{body:JSON.stringify({...d||{},_status:"draft"}),credentials:"include",headers:{"Accept-Language":r.language,"Content-Type":"application/json"},method:"post"})).json(),C=await fetch(`${l}${e}${h}?${a1.stringify(f)}`,{body:JSON.stringify({...d||{},_status:"published"}),credentials:"include",headers:{"Accept-Language":r.language,"Content-Type":"application/json"},method:"POST"}).then(v=>v.json());a(b),u(Xc({collectionSlug:o,docPermissions:b,globalSlug:n,isEditing:p})),c(C?.update)}}else{let h=o?i?.collections?.[o]:i?.globals?.[n];a(h),u(Xc({collectionSlug:o,docPermissions:h,globalSlug:n,isEditing:p}))}},[s,t,o,n,l,e,r.language,a,u,c,i?.collections,i?.globals]);var y3=C$({}),Re=()=>x$(y3),S$=({children:t,...e})=>{let{id:o,collectionSlug:n,currentEditor:r,docPermissions:s,globalSlug:i,hasPublishedDoc:l,hasPublishPermission:a,hasSavePermission:c,initialData:u,initialState:d,isLocked:f,lastUpdateTime:m,mostRecentVersionIsAutosaved:p,unpublishedVersionCount:h,versionCount:g}=e,[b,C]=or(s),[v,y]=or(c),[x,S]=or(a),{permissions:w}=De(),{config:{admin:{dateFormat:T},routes:{api:I},serverURL:R},getEntityConfig:D}=z(),_=D({collectionSlug:n}),F=D({globalSlug:i}),A=b3(new AbortController),$=_||F,{i18n:P}=E(),{uploadEdits:j}=Vi(),[B,L]=Zc(()=>Zo({collectionConfig:_,data:{...u||{},id:o},dateFormat:T,fallback:o?.toString(),globalConfig:F,i18n:P})),[N,M]=Zc(p),[k,O]=Zc(g),[V,G]=Zc(l),[U,H]=Zc(h),[Z,Y]=or(f),[W,se]=or(r),[J,ie]=or(m),[ae,he]=or(u),[be,fe]=or("idle"),Me=b3({hasShownLockedModal:!1,isLocked:!1,user:null}),xe=sl(Ae=>{fe(Ae)},[fe]),{getPreference:we,setPreference:Te}=Kt(),{code:Q}=Se(),{localeIsLoading:Ve}=hf(),Oe=w$(()=>d===void 0||u===void 0||Ve,[u,d,Ve]),le=`${R}${I}`,X,q,te;i&&(X=i,q="globals",te=`global-${X}`),n&&(X=n,q="collections",o&&(te=`collection-${X}-${o}`));let pe=sl(async(Ae,Ye)=>{try{let tt=Ye===i,Wt=await Ue.get(`${R}${I}/payload-locked-documents`,{credentials:"include",params:tt?{"where[globalSlug][equals]":Ye}:{"where[document.relationTo][equals]":Ye,"where[document.value][equals]":Ae}}),{docs:po}=await Wt.json();if(po?.length>0){let vo=po[0].id;await Ue.delete(`${R}${I}/payload-locked-documents/${vo}`,{credentials:"include",headers:{"Content-Type":"application/json"}}),Y(!1)}}catch(tt){console.error("Failed to unlock the document",tt)}},[R,I,i,Y]),K=sl(async(Ae,Ye,tt)=>{try{let Wt=Ye===i,po=await Ue.get(`${R}${I}/payload-locked-documents`,{credentials:"include",params:Wt?{"where[globalSlug][equals]":Ye}:{"where[document.relationTo][equals]":Ye,"where[document.value][equals]":Ae}}),{docs:vo}=await po.json();if(vo?.length>0){let Dt=vo[0].id,Wo=typeof tt=="object"?{relationTo:tt.collection,value:tt.id}:{relationTo:"users",value:tt};await Ue.patch(`${R}${I}/payload-locked-documents/${Dt}`,{body:JSON.stringify({user:Wo}),credentials:"include",headers:{"Content-Type":"application/json"}})}}catch(Wt){console.error("Failed to update the document editor",Wt)}},[R,I,i]),re=h3({id:o,api:I,collectionSlug:n,globalSlug:i,i18n:P,locale:Q,permissions:w,serverURL:R,setDocPermissions:C,setHasPublishPermission:S,setHasSavePermission:y}),ge=sl(()=>we(te),[we,te]),me=sl(async(Ae,Ye)=>{let tt=await ge();if(te)try{await Te(te,{...tt,fields:{...tt?.fields||{},[Ae]:{...tt?.fields?.[Ae],...Ye}}})}catch(Wt){console.error(Wt)}},[Te,te,ge]),ue=sl(()=>{let Ae=k+1;_&&_.versions?_.versions.maxPerDoc>0?O(Math.min(Ae,_.versions.maxPerDoc)):O(Ae):F&&F.versions&&(F.versions.max>0?O(Math.min(Ae,F.versions.max)):O(Ae))},[_,F,k]);g3(()=>{L(Zo({collectionConfig:_,data:{...ae,id:o},dateFormat:T,fallback:o?.toString(),globalConfig:F,i18n:P}))},[_,F,ae,T,P,o]),g3(()=>{let Ae=A.current;return()=>{if(Ae)try{Ae.abort()}catch{}}},[]);let ye=y$.useMemo(()=>`${`${le}${q==="globals"?"/globals":""}/${X}${o?`/${o}`:""}`}${v3.stringify({depth:0,"fallback-locale":"null",locale:Q,uploadEdits:j||void 0},{addQueryPrefix:!0})}`,[le,Q,q,o,X,j]),Ie={...e,action:ye,currentEditor:W,data:ae,docConfig:$,docPermissions:b,documentIsLocked:Z,documentLockState:Me,getDocPermissions:re,getDocPreferences:ge,hasPublishedDoc:V,hasPublishPermission:x,hasSavePermission:v,incrementVersionCount:ue,initialData:u,initialState:d,isInitializing:Oe,lastUpdateTime:J,mostRecentVersionIsAutosaved:N,preferencesKey:te,savedDocumentData:ae,setCurrentEditor:se,setData:he,setDocFieldPreferences:me,setDocumentIsLocked:Y,setDocumentTitle:L,setHasPublishedDoc:G,setLastUpdateTime:ie,setMostRecentVersionIsAutosaved:M,setUnpublishedVersionCount:H,setUploadStatus:xe,title:B,unlockDocument:pe,unpublishedVersionCount:U,updateDocumentEditor:K,updateSavedDocumentData:he,uploadStatus:be,versionCount:k};return _f(y3,{value:Ie,children:_f(l3,{children:t})})},Yc=t=>_f(i1,{children:_f(S$,{...t})});import{jsx as I$}from"react/jsx-runtime";import{createContext as _$,use as T$}from"react";var Tf=_$(""),Jc=({children:t,operation:e})=>I$(Tf,{value:e,children:t}),yr=()=>T$(Tf);import C3 from"react";var hs=C3.createContext(void 0),Ff=()=>{let t=C3.useContext(hs);if(t)return t};var D$=t=>{let e=F$(65),o;e[0]!==t?(o=t||{},e[0]=t,e[1]=o):o=e[1];let{disableFormData:n,hasRows:r,path:s,potentiallyStalePath:i,validate:l}=o,a=n===void 0?!1:n,c=Ff(),u=s||c||i,d=no(),f=$r(),m=Di(),{user:p}=De(),{id:h,collectionSlug:g}=Re(),b=yr(),C=Lt(R$),v;e[2]!==u?(v=be=>{let[fe]=be;return fe&&fe?.[u]||null},e[2]=u,e[3]=v):v=e[3];let y=Lt(v),{t:x}=E(),{config:S}=z(),{getData:w,getDataByPath:T,getSiblingData:I,setModified:R}=ze(),D=Oa(),_=y?.filterOptions,F=y?.value,A=y?.initialValue,$=typeof y?.valid=="boolean"?y.valid:!0,P=$===!1&&d,j=x3($),B=x3(y?.errorMessage),L;e[4]!==u?(L=u?u.split("."):[],e[4]=u,e[5]=L):L=e[5];let N=L,M;e[6]!==a||e[7]!==C||e[8]!==r||e[9]!==u||e[10]!==R?(M=(be,fe)=>{let Me=fe===void 0?!1:fe,we=be&&typeof be=="object"&&typeof be.preventDefault=="function"&&typeof be.stopPropagation=="function"?be.target.value:be;C({type:"UPDATE",disableFormData:a||r&&we>0,path:u,value:we}),Me||R(!0)},e[6]=a,e[7]=C,e[8]=r,e[9]=u,e[10]=R,e[11]=M):M=e[11];let k=M,O=y?.blocksFilterOptions,V=y?.customComponents,G=f||m,U=y?.errorMessage,H;e[12]!==y?.errorPaths?(H=y?.errorPaths||[],e[12]=y?.errorPaths,e[13]=H):H=e[13];let Z=y?.rows,Y=y?.selectFilterOptions,W=y?.valid,se;e[14]!==_||e[15]!==A||e[16]!==m||e[17]!==u||e[18]!==f||e[19]!==k||e[20]!==P||e[21]!==d||e[22]!==Z||e[23]!==Y||e[24]!==W||e[25]!==O||e[26]!==V||e[27]!==G||e[28]!==U||e[29]!==H||e[30]!==F?(se={blocksFilterOptions:O,customComponents:V,disabled:G,errorMessage:U,errorPaths:H,filterOptions:_,formInitializing:m,formProcessing:f,formSubmitted:d,initialValue:A,path:u,rows:Z,selectFilterOptions:Y,setValue:k,showError:P,valid:W,value:F},e[14]=_,e[15]=A,e[16]=m,e[17]=u,e[18]=f,e[19]=k,e[20]=P,e[21]=d,e[22]=Z,e[23]=Y,e[24]=W,e[25]=O,e[26]=V,e[27]=G,e[28]=U,e[29]=H,e[30]=F,e[31]=se):se=e[31];let J=se,ie;e[32]!==g||e[33]!==S||e[34]!==a||e[35]!==C||e[36]!==D||e[37]!==y||e[38]!==w||e[39]!==T||e[40]!==I||e[41]!==r||e[42]!==h||e[43]!==b||e[44]!==u||e[45]!==N||e[46]!==x||e[47]!==p||e[48]!==l||e[49]!==F?(ie=()=>{(async()=>{let fe=F;y?.rows&&Array.isArray(y.rows)&&(fe=T(u));let Me=B.current,xe=j.current,we=w(),Te=typeof l=="function"?await l(fe,{id:h,blockData:void 0,collectionSlug:g,data:D?.getData?D.getData():we,event:"onChange",operation:b,path:N,preferences:{},req:{payload:{config:S},t:x,user:p},siblingData:I(u)}):typeof B.current=="string"?B.current:j.current;if(typeof Te=="string"?(xe=!1,Me=Te):typeof Te=="boolean"&&(xe=Te,Me=void 0),xe!==j.current||Me!==B.current){j.current=xe,B.current=Me;let Q={type:"UPDATE",errorMessage:Me,path:u,rows:y?.rows,valid:xe,validate:l,value:F};(a||r&&typeof F=="number"&&F>0)&&(Q.disableFormData=!0),typeof C=="function"&&C(Q)}})()},e[32]=g,e[33]=S,e[34]=a,e[35]=C,e[36]=D,e[37]=y,e[38]=w,e[39]=T,e[40]=I,e[41]=r,e[42]=h,e[43]=b,e[44]=u,e[45]=N,e[46]=x,e[47]=p,e[48]=l,e[49]=F,e[50]=ie):ie=e[50];let ae=y?.rows,he;return e[51]!==g||e[52]!==a||e[53]!==C||e[54]!==w||e[55]!==T||e[56]!==I||e[57]!==h||e[58]!==b||e[59]!==u||e[60]!==ae||e[61]!==p||e[62]!==l||e[63]!==F?(he=[F,a,C,w,I,T,h,b,u,p,l,ae,g],e[51]=g,e[52]=a,e[53]=C,e[54]=w,e[55]=T,e[56]=I,e[57]=h,e[58]=b,e[59]=u,e[60]=ae,e[61]=p,e[62]=l,e[63]=F,e[64]=he):he=e[64],Bi(ie,150,he),J},w3=l1.createContext(void 0),Ee=t=>{let e=Ff(),o=l1.use(w3),n=l1.useRef(null);if(n.current===null){let r=t?.path||e||t.potentiallyStalePath;n.current=!!(o&&r&&o.path===r)}if(n.current===!0){if(!o)throw new Error("FieldContext was removed after mount. This breaks hook ordering.");return o}return D$(t)};function R$(t){let[,e]=t;return e}import{jsx as S3}from"react/jsx-runtime";import"react";import{c as A$}from"react/compiler-runtime";var c1=t=>{let e=A$(2),{children:o,path:n}=t,r;e[0]!==n?(r=l=>{let[a]=l;return a&&a?.[n]||null},e[0]=n,e[1]=r):r=e[1];let s=Lt(r),{passesCondition:i}=s||{};return i===!1?null:o};var Xe=t=>o=>{let{path:n}=o;return S3(c1,{path:n,children:S3(t,{...o})})};var et=t=>({...t?.admin?.style||{},...t?.admin?.width?{"--field-width":t.admin.width}:{flex:"1 1 auto"},...t?.admin?.style?.flex?{flex:t.admin.style.flex}:{}});var Ne="field-type";function il({fieldLocalized:t,fieldRTL:e,locale:o,localizationConfig:n}){let r=o&&n&&n.locales&&n.locales.length>1,s=o?.code===n?.defaultLocale;return e!==!1&&o?.rtl===!0&&(t||!t&&!r||!t&&s)||e===!0}import{c as P$}from"react/compiler-runtime";import{jsx as qc,jsxs as m1}from"react/jsx-runtime";import{useId as E$}from"react";import{jsx as I3}from"react/jsx-runtime";import"react";var u1=()=>I3("svg",{className:"icon icon--check",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:I3("path",{className:"stroke",d:"M15.3333 6.00001L8.00001 13.3333L4.66667 10",strokeLinecap:"square"})});import{jsx as _3}from"react/jsx-runtime";import"react";var d1=()=>_3("svg",{className:"icon icon--line",fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:_3("path",{className:"stroke",d:"M5.33333 10H14.6667",strokeLinecap:"square"})});var Qc="checkbox-input",ao=t=>{let e=P$(22),{id:o,name:n,AfterInput:r,BeforeInput:s,checked:i,className:l,inputRef:a,Label:c,label:u,localized:d,onToggle:f,partialChecked:m,readOnly:p,required:h}=t,g=E$(),b=o||g,C=i&&`${Qc}--checked`,v=p&&`${Qc}--read-only`,y;e[0]!==l||e[1]!==C||e[2]!==v?(y=[l,Qc,C,v].filter(Boolean),e[0]=l,e[1]=C,e[2]=v,e[3]=y):y=e[3];let x=y.join(" "),S=!!i,w;if(e[4]!==r||e[5]!==s||e[6]!==c||e[7]!==i||e[8]!==b||e[9]!==a||e[10]!==u||e[11]!==d||e[12]!==n||e[13]!==f||e[14]!==m||e[15]!==p||e[16]!==h||e[17]!==x||e[18]!==S){let T=qc("input",{"aria-label":"","aria-labelledby":n,defaultChecked:S,disabled:p,id:b,name:n,onInput:f,ref:a,required:h,title:n,type:"checkbox"}),I=!i&&m?"partial":"check",R;e[20]!==I?(R=[`${Qc}__icon`,I].filter(Boolean),e[20]=I,e[21]=R):R=e[21],w=m1("div",{className:x,children:[m1("div",{className:`${Qc}__input`,children:[s,T,m1("span",{className:R.join(" "),children:[i&&qc(u1,{}),!i&&m&&qc(d1,{})]}),r]}),qc(de,{CustomComponent:c,Fallback:qc(Fe,{htmlFor:b,label:u,localized:d,required:h})})]}),e[4]=r,e[5]=s,e[6]=c,e[7]=i,e[8]=b,e[9]=a,e[10]=u,e[11]=d,e[12]=n,e[13]=f,e[14]=m,e[15]=p,e[16]=h,e[17]=x,e[18]=S,e[19]=w}else w=e[19];return w};var f1="checkbox";var k$=t=>{let{id:e,checked:o,disableFormData:n,field:r,field:{admin:{className:s,description:i}={},label:l,required:a}={},onChange:c,partialChecked:u,path:d,readOnly:f,validate:m}=t,{uuid:p}=ze(),h=dt(),{i18n:{language:g}}=E(),b=L$.includes(g),C=T3((j,B)=>{if(typeof m=="function")return m(j,{...B,required:a})},[m,a]),{customComponents:{AfterInput:v,BeforeInput:y,Description:x,Error:S,Label:w}={},disabled:T,path:I,setValue:R,showError:D,value:_}=Ee({disableFormData:n,potentiallyStalePath:d,validate:C}),F=T3(()=>{f||(R(!_),typeof c=="function"&&c(!_))},[c,f,R,_]),A=o||!!_,$=e||gf(I,h,p),P=$$(()=>et(r),[r]);return N$("div",{className:[Ne,f1,D&&"error",s,_&&`${f1}--checked`,(f||T)&&`${f1}--read-only`].filter(Boolean).join(" "),style:P,children:[Kc(de,{CustomComponent:S,Fallback:Kc(Qe,{alignCaret:b?"right":"left",path:I,showError:D})}),Kc(ao,{AfterInput:v,BeforeInput:y,checked:A,id:$,inputRef:null,Label:w,label:l,name:I,onToggle:F,partialChecked:u,readOnly:f||T,required:a}),Kc(de,{CustomComponent:x,Fallback:Kc(Je,{description:i,path:I})})]})},Mr=Xe(k$);var B$="nullify-locale-field",eu=t=>{let e=j$(13),{fieldValue:o,localized:n,path:r,readOnly:s}=t,i=s===void 0?!1:s,{code:l}=Se(),{config:a}=z(),{localization:c}=a,[u,d]=D3.useState(typeof o!="number"),{t:f}=E(),{dispatchFields:m,setModified:p}=ze();if(!n||!c||c.defaultLocale===l||!c.fallback)return null;let h;e[0]!==u||e[1]!==m||e[2]!==o||e[3]!==r||e[4]!==p?(h=()=>{let C=!u;m({type:"UPDATE",path:r,value:C?null:o||0}),p(!0),d(C)},e[0]=u,e[1]=m,e[2]=o,e[3]=r,e[4]=p,e[5]=h):h=e[5];let g=h;if(o){let C=!1;if(typeof o=="number"&&o>0&&(C=!0),Array.isArray(o)&&o.length>0&&(C=!0),C)return u&&d(!1),null}let b;return e[6]!==u||e[7]!==o||e[8]!==g||e[9]!==r||e[10]!==i||e[11]!==f?(b=F3(rn,{className:B$,children:!o&&i?f("general:fallbackToDefaultLocale"):F3(Mr,{checked:u,field:{name:"",label:f("general:fallbackToDefaultLocale")},id:`field-${r.replace(/\./g,"__")}`,onChange:g,path:r,schemaPath:""})}),e[6]=u,e[7]=o,e[8]=g,e[9]=r,e[10]=i,e[11]=f,e[12]=b):b=e[12],b};var al=t=>{let e=document.getElementById(t);if(e){let o=e.getBoundingClientRect();window.scrollBy({behavior:"smooth",top:o.top-100})}};import{c as rH}from"react/compiler-runtime";import{jsx as bi,jsxs as nH}from"react/jsx-runtime";import{getTranslation as sH}from"@payloadcms/translations";import"react";import{c as M$}from"react/compiler-runtime";import{jsx as Cr,jsxs as Gi}from"react/jsx-runtime";import O$ from"react";var Ro="array-actions",Df=t=>{let e=M$(12),{addRow:o,copyRow:n,duplicateRow:r,hasMaxRows:s,index:i,isSortable:l,moveRow:a,pasteRow:c,removeRow:u,rowCount:d}=t,{t:f}=E(),m;return e[0]!==o||e[1]!==n||e[2]!==r||e[3]!==s||e[4]!==i||e[5]!==l||e[6]!==a||e[7]!==c||e[8]!==u||e[9]!==d||e[10]!==f?(m=Cr(st,{button:Cr(Nc,{}),buttonClassName:`${Ro}__button`,className:Ro,horizontalAlign:"center",render:p=>{let{close:h}=p;return Gi(_e.ButtonGroup,{buttonSize:"small",children:[l&&i!==0&&Gi(_e.Button,{className:`${Ro}__action ${Ro}__move-up`,onClick:()=>{a(i,i-1),h()},children:[Cr("div",{className:`${Ro}__action-chevron`,children:Cr(Ze,{direction:"up"})}),f("general:moveUp")]}),l&&i<d-1&&Gi(_e.Button,{className:`${Ro}__action`,onClick:()=>{a(i,i+1),h()},children:[Cr("div",{className:`${Ro}__action-chevron`,children:Cr(Ze,{})}),f("general:moveDown")]}),!s&&Gi(O$.Fragment,{children:[Gi(_e.Button,{className:`${Ro}__action ${Ro}__add`,onClick:()=>{o(i+1),h()},children:[Cr(nr,{}),f("general:addBelow")]}),Gi(_e.Button,{className:`${Ro}__action ${Ro}__duplicate`,onClick:()=>{r(i),h()},children:[Cr(Pi,{}),f("general:duplicate")]})]}),Cr(_e.Button,{className:`${Ro}__action ${Ro}__copy`,onClick:()=>{n(i),h()},children:Cr(Ha,{isRow:!0})}),Cr(_e.Button,{className:`${Ro}__action ${Ro}__paste`,onClick:()=>{c(i),h()},children:Cr(Ha,{isPaste:!0,isRow:!0})}),Gi(_e.Button,{className:`${Ro}__action ${Ro}__remove`,onClick:()=>{u(i),h()},children:[Cr(bt,{}),f("general:remove")]})]})},size:"medium"}),e[0]=o,e[1]=n,e[2]=r,e[3]=s,e[4]=i,e[5]=l,e[6]=a,e[7]=c,e[8]=u,e[9]=d,e[10]=f,e[11]=m):m=e[11],m};import{c as J$}from"react/compiler-runtime";import{jsx as ln,jsxs as g1}from"react/jsx-runtime";import{useState as N3}from"react";import{jsx as ll,jsxs as V$}from"react/jsx-runtime";import"react";var an=({className:t})=>V$("svg",{className:["icon icon--drag-handle",t].filter(Boolean).join(" "),viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[ll("path",{className:"fill",d:"M7.99999 10.6667C8.36818 10.6667 8.66666 10.3682 8.66666 9.99999C8.66666 9.6318 8.36818 9.33332 7.99999 9.33332C7.63181 9.33332 7.33333 9.6318 7.33333 9.99999C7.33333 10.3682 7.63181 10.6667 7.99999 10.6667Z",strokeLinecap:"square"}),ll("path",{className:"fill",d:"M7.99999 5.99999C8.36818 5.99999 8.66666 5.70151 8.66666 5.33332C8.66666 4.96513 8.36818 4.66666 7.99999 4.66666C7.63181 4.66666 7.33333 4.96513 7.33333 5.33332C7.33333 5.70151 7.63181 5.99999 7.99999 5.99999Z",strokeLinecap:"square"}),ll("path",{className:"fill",d:"M7.99999 15.3333C8.36818 15.3333 8.66666 15.0348 8.66666 14.6667C8.66666 14.2985 8.36818 14 7.99999 14C7.63181 14 7.33333 14.2985 7.33333 14.6667C7.33333 15.0348 7.63181 15.3333 7.99999 15.3333Z",strokeLinecap:"square"}),ll("path",{className:"fill",d:"M12 10.6667C12.3682 10.6667 12.6667 10.3682 12.6667 9.99999C12.6667 9.6318 12.3682 9.33332 12 9.33332C11.6318 9.33332 11.3333 9.6318 11.3333 9.99999C11.3333 10.3682 11.6318 10.6667 12 10.6667Z",strokeLinecap:"square"}),ll("path",{className:"fill",d:"M12 5.99999C12.3682 5.99999 12.6667 5.70151 12.6667 5.33332C12.6667 4.96513 12.3682 4.66666 12 4.66666C11.6318 4.66666 11.3333 4.96513 11.3333 5.33332C11.3333 5.70151 11.6318 5.99999 12 5.99999Z",strokeLinecap:"square"}),ll("path",{className:"fill",d:"M12 15.3333C12.3682 15.3333 12.6667 15.0348 12.6667 14.6667C12.6667 14.2985 12.3682 14 12 14C11.6318 14 11.3333 14.2985 11.3333 14.6667C11.3333 15.0348 11.6318 15.3333 12 15.3333Z",strokeLinecap:"square"})]});import{jsx as A3}from"react/jsx-runtime";import Rf,{useEffect as H$,useRef as h1}from"react";import{useEffect as G$,useMemo as z$,useRef as p1,useState as W$}from"react";var R3=({containerRef:t,contentRef:e,duration:o,open:n})=>{let r=z$(()=>typeof CSS<"u"&&CSS&&CSS.supports?CSS.supports("interpolate-size","allow-keywords"):!1,[]),s=p1(!1),i=p1(n),[l,a]=W$(!1),c=p1(null);return G$(()=>{let u=t.current,d=e.current;if(!u||!d||r)return;let f=h=>{u.style.height=h},m=()=>{u&&(u.style.transition="",u.style.height=n?"auto":"0px",a(!1))};return(()=>{if(!s.current&&n){f("auto"),a(!1);return}s.current=!0,i.current!==n&&f(n?"0px":`${d.scrollHeight}px`),u.offsetHeight,a(!0),u.style.transition=`height ${o}ms ease`,f(n?`${d.scrollHeight}px`:"0px");let h=()=>{m(),u.removeEventListener("transitionend",h)};u.addEventListener("transitionend",h)})(),i.current=n,c.current=new ResizeObserver(()=>{l&&(u.style.height=n?`${d.scrollHeight}px`:"0px")}),c.current.observe(d),()=>{u&&(u.style.transition="",u.style.height=""),c.current?.disconnect()}},[n,o,t,e,r]),{browserSupportsKeywordAnimation:r}};var xr=({id:t,children:e,className:o,duration:n=300,height:r})=>{let[s,i]=Rf.useState(()=>!!r),l=h1(s),[a,c]=Rf.useState(()=>s?"":"none"),[u,d]=Rf.useState(()=>s?"":"hidden"),[f,m]=Rf.useState(!1),p=h1(null),h=h1(null);return H$(()=>{let g,b,C=!!r,v=l.current!==C;return l.current=C,v&&(m(!0),d("hidden"),C?c(""):g=window.setTimeout(()=>{c("none")},n),i(C),b=window.setTimeout(()=>{d(""),m(!1)},n)),()=>{g&&clearTimeout(g),b&&clearTimeout(b)}},[r,n]),R3({containerRef:p,contentRef:h,duration:n,open:s}),A3("div",{"aria-hidden":!s,className:[o,"rah-static",s&&r==="auto"&&"rah-static--height-auto",f&&`rah-animating--${s?"down":"up"}`,f&&r==="auto"&&"rah-animating--to-height-auto"].filter(Boolean).join(" "),id:t,ref:p,style:{overflow:u,transition:`height ${n}ms ease`},children:A3("div",{ref:h,...a?{style:{display:a}}:{},children:e})})};import{jsx as U$}from"react/jsx-runtime";import X$,{createContext as Z$,use as Y$}from"react";var P3=Z$({isCollapsed:void 0,isVisible:void 0,isWithinCollapsible:void 0,toggle:()=>{}}),E3=({children:t,isCollapsed:e,isWithinCollapsible:o=!0,toggle:n})=>{let{isCollapsed:r,isVisible:s}=qs(),i=X$.useMemo(()=>({isCollapsed:e,isVisible:s&&!r,isWithinCollapsible:o,toggle:n}),[e,o,n,r,s]);return U$(P3,{value:i,children:t})},qs=()=>Y$(P3);var ko="collapsible";var zi=t=>{let e=J$(25),{actions:o,AfterCollapsible:n,children:r,className:s,collapsibleStyle:i,disableHeaderToggle:l,disableToggleIndicator:a,dragHandleProps:c,header:u,initCollapsed:d,isCollapsed:f,onToggle:m}=t,p=i===void 0?"default":i,h=l===void 0?!1:l,g=a===void 0?!1:a,[b,C]=N3(!!d),[v,y]=N3(!1),{isWithinCollapsible:x}=qs(),{t:S}=E(),w=typeof f=="boolean"?f:b,T;e[0]!==w||e[1]!==m?(T=()=>{typeof m=="function"&&m(!w),C(!w)},e[0]=w,e[1]=m,e[2]=T):T=e[2];let I=T,R=c&&`${ko}--has-drag-handle`,D=w&&`${ko}--collapsed`,_=x&&`${ko}--nested`,F=v&&!h&&`${ko}--hovered`,A=`${ko}--style-${p}`,$;e[3]!==s||e[4]!==R||e[5]!==D||e[6]!==_||e[7]!==F||e[8]!==A?($=[ko,s,R,D,_,F,A].filter(Boolean),e[3]=s,e[4]=R,e[5]=D,e[6]=_,e[7]=F,e[8]=A,e[9]=$):$=e[9];let P=$.join(" "),j=`${ko}__toggle-wrap${h?" toggle-disabled":""}`,B,L;e[10]===Symbol.for("react.memo_cache_sentinel")?(B=()=>y(!0),L=()=>y(!1),e[10]=B,e[11]=L):(B=e[10],L=e[11]);let N;return e[12]!==n||e[13]!==o||e[14]!==r||e[15]!==h||e[16]!==g||e[17]!==c||e[18]!==u||e[19]!==w||e[20]!==S||e[21]!==P||e[22]!==j||e[23]!==I?(N=ln("div",{className:P,children:g1(E3,{isCollapsed:w,toggle:I,children:[g1("div",{className:j,onMouseEnter:B,onMouseLeave:L,children:[!h&&ln("button",{className:[`${ko}__toggle`,`${ko}__toggle--${w?"collapsed":"open"}`].filter(Boolean).join(" "),onClick:I,type:"button",children:ln("span",{children:S("fields:toggleBlock")})}),c&&ln("div",{className:`${ko}__drag`,...c.attributes,...c.listeners,children:ln(an,{})}),u?ln("div",{className:[`${ko}__header-wrap`,c&&`${ko}__header-wrap--has-drag-handle`].filter(Boolean).join(" "),children:u}):null,g1("div",{className:`${ko}__actions-wrap`,children:[o?ln("div",{className:`${ko}__actions`,children:o}):null,!g&&ln("div",{className:`${ko}__indicator`,children:ln(Ze,{direction:w?void 0:"up"})})]})]}),ln(xr,{height:w?0:"auto",children:ln("div",{className:`${ko}__content`,children:r})}),n]})}),e[12]=n,e[13]=o,e[14]=r,e[15]=h,e[16]=g,e[17]=c,e[18]=u,e[19]=w,e[20]=S,e[21]=P,e[22]=j,e[23]=I,e[24]=N):N=e[24],N};import{c as KW}from"react/compiler-runtime";import{jsx as z0}from"react/jsx-runtime";import{fieldIsHiddenOrDisabled as eH,getFieldPaths as tH,getFieldPermissions as oH}from"payload/shared";import"react";import{c as q$}from"react/compiler-runtime";import{jsx as Q$}from"react/jsx-runtime";import L3 from"react";var $3=t=>{let e=q$(9),{children:o,className:n,forceRender:r}=t,[s,i]=L3.useState(!!r),l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={rootMargin:"1000px"},e[0]=l):l=e[0];let[a,c]=is(l,!!r),u=!!c?.isIntersecting,d=c?.boundingClientRect?.top<0,f=r||u||d,m,p;e[1]!==s||e[2]!==f?(m=()=>{f&&!s&&i(!0)},p=[f,s],e[1]=s,e[2]=f,e[3]=m,e[4]=p):(m=e[3],p=e[4]),L3.useEffect(m,p);let h=s?o:null,g;return e[5]!==n||e[6]!==a||e[7]!==h?(g=Q$("div",{className:n,ref:a,children:h}),e[5]=n,e[6]=a,e[7]=h,e[8]=g):g=e[8],g};import{c as QW}from"react/compiler-runtime";import{jsx as Vt}from"react/jsx-runtime";import"react";import{jsx as Ut,jsxs as bs}from"react/jsx-runtime";import{getTranslation as S1}from"@payloadcms/translations";import Fk,{Fragment as eS,useCallback as Ln,useMemo as tS}from"react";import{c as Ik}from"react/compiler-runtime";import{jsx as un,jsxs as Q3,Fragment as _k}from"react/jsx-runtime";import{getTranslation as Tk}from"@payloadcms/translations";import"react";import{c as K$}from"react/compiler-runtime";import{jsx as tu,jsxs as ek}from"react/jsx-runtime";import"react";var Or="pill",tk=t=>{let e=K$(12),{id:o,className:n}=t,r;e[0]!==o?(r={id:o},e[0]=o,e[1]=r):r=e[1];let{attributes:s,isDragging:i,listeners:l,setNodeRef:a,transform:c}=Ya(r),u=i&&`${Or}--is-dragging`,d;e[2]!==n||e[3]!==u?(d=[u,n].filter(Boolean),e[2]=n,e[3]=u,e[4]=d):d=e[4];let f=d.join(" "),m;return e[5]!==s||e[6]!==l||e[7]!==t||e[8]!==a||e[9]!==f||e[10]!==c?(m=tu(k3,{...t,className:f,elementProps:{...l,...s,ref:a,style:{transform:c}}}),e[5]=s,e[6]=l,e[7]=t,e[8]=a,e[9]=f,e[10]=c,e[11]=m):m=e[11],m},k3=t=>{let{id:e,alignIcon:o="right","aria-checked":n,"aria-controls":r,"aria-expanded":s,"aria-label":i,children:l,className:a,draggable:c,elementProps:u,icon:d,onClick:f,pillStyle:m="light",rounded:p,size:h="medium",to:g}=t,b=[Or,`${Or}--style-${m}`,`${Or}--size-${h}`,a&&a,g&&`${Or}--has-link`,(g||f)&&`${Or}--has-action`,d&&`${Or}--has-icon`,d&&`${Or}--align-icon-${o}`,c&&`${Or}--draggable`,p&&`${Or}--rounded`].filter(Boolean).join(" "),C="div";return f&&!g&&(C="button"),g&&(C=Ht),ek(C,{...u,"aria-checked":n,"aria-controls":r,"aria-expanded":s,"aria-label":i,className:b,href:g||null,id:e,onClick:f,type:C==="button"?"button":void 0,children:[tu("span",{className:`${Or}__label`,children:l}),!!d&&tu("span",{className:`${Or}__icon`,children:d})]})},at=t=>{let{draggable:e}=t;return e?tu(tk,{...t}):tu(k3,{...t})};import{useEffect as ok,useState as rk}from"react";function Af(t,e){let[o,n]=rk(t);return ok(()=>{let r=setTimeout(()=>{n(t)},e);return()=>{clearTimeout(r)}},[t,e]),o}import{c as xk}from"react/compiler-runtime";import{jsx as X3,jsxs as wk}from"react/jsx-runtime";import Z3 from"react";import{c as bk}from"react/compiler-runtime";import{jsx as U3}from"react/jsx-runtime";import{getTranslation as vk}from"@payloadcms/translations";import yk,{useEffect as Ck}from"react";import{jsx as Nn,jsxs as H3}from"react/jsx-runtime";import{getTranslation as C1}from"@payloadcms/translations";import{Fragment as mk,useEffect as fk,useMemo as pk,useState as hk}from"react";import{c as nk}from"react/compiler-runtime";import{jsx as j3,jsxs as sk}from"react/jsx-runtime";import"react";var ou="thumbnail-card",B3=t=>{let e=nk(13),{alignLabel:o,className:n,collection:r,doc:s,label:i,onClick:l,thumbnail:a}=t,{config:c}=z(),{i18n:u}=E(),d=typeof l=="function"&&`${ou}--has-on-click`,f=o&&`${ou}--align-label-${o}`,m;e[0]!==n||e[1]!==d||e[2]!==f?(m=[ou,n,d,f].filter(Boolean),e[0]=n,e[1]=d,e[2]=f,e[3]=m):m=e[3];let p=m.join(" "),h;if(e[4]!==p||e[5]!==r||e[6]!==c||e[7]!==s||e[8]!==u||e[9]!==i||e[10]!==l||e[11]!==a){let g=i;g||(g=Zo({collectionConfig:r,data:s,dateFormat:c.admin.dateFormat,fallback:s?.filename,i18n:u})),h=sk("button",{className:p,onClick:l,title:g,type:"button",children:[j3("div",{className:`${ou}__thumbnail`,children:a}),j3("div",{className:`${ou}__label`,children:g})]}),e[4]=p,e[5]=r,e[6]=c,e[7]=s,e[8]=u,e[9]=i,e[10]=l,e[11]=a,e[12]=h}else h=e[12];return h};import{jsx as gs,jsxs as O3}from"react/jsx-runtime";import{useState as ck}from"react";var Ao=[];for(Pf=0;Pf<256;++Pf)Ao.push((Pf+256).toString(16).slice(1));var Pf;function M3(t,e=0){return(Ao[t[e+0]]+Ao[t[e+1]]+Ao[t[e+2]]+Ao[t[e+3]]+"-"+Ao[t[e+4]]+Ao[t[e+5]]+"-"+Ao[t[e+6]]+Ao[t[e+7]]+"-"+Ao[t[e+8]]+Ao[t[e+9]]+"-"+Ao[t[e+10]]+Ao[t[e+11]]+Ao[t[e+12]]+Ao[t[e+13]]+Ao[t[e+14]]+Ao[t[e+15]]).toLowerCase()}var Ef,ik=new Uint8Array(16);function b1(){if(!Ef&&(Ef=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ef))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ef(ik)}var ak=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),v1={randomUUID:ak};function lk(t,e,o){if(v1.randomUUID&&!e&&!t)return v1.randomUUID();t=t||{};var n=t.random||(t.rng||b1)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){o=o||0;for(var r=0;r<16;++r)e[o+r]=n[r];return e}return M3(n)}var cn=lk;var y1=()=>{let[t]=ck(()=>`pattern${cn()}`);return O3("svg",{fill:"none",height:"151",preserveAspectRatio:"xMidYMid slice",viewBox:"0 0 231 151",width:"231",xmlns:"http://www.w3.org/2000/svg",children:[O3("g",{clipPath:`url(#${t})`,children:[gs("rect",{fill:"#D9D9D9",height:"100%",rx:"2",width:"100%"}),gs("rect",{fill:"#BCBCBC",height:"116.063",transform:"rotate(52.0687 33.7051 79.3051)",width:"85.8593",x:"33.7051",y:"79.3051"}),gs("rect",{fill:"#BCBCBC",height:"116.063",transform:"rotate(52.0687 86.1219 92.6272)",width:"85.8593",x:"86.1219",y:"92.6272"}),gs("circle",{cx:"189",cy:"45",fill:"#BCBCBC",r:"19"}),gs("rect",{fill:"#B8B8B8",height:"5",rx:"2.5",width:"98",x:"66",y:"70"}),gs("rect",{fill:"#B8B8B8",height:"5",rx:"2.5",width:"76",x:"77",y:"82"})]}),gs("defs",{children:gs("clipPath",{id:`${t}`,children:gs("rect",{fill:"white",height:"151",width:"231"})})})]})};import{c as uk}from"react/compiler-runtime";import{jsx as G3,jsxs as dk}from"react/jsx-runtime";import"react";import{jsx as V3}from"react/jsx-runtime";import"react";var ru=()=>V3("svg",{className:"icon icon--search",fill:"none",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:V3("path",{className:"stroke",d:"M16 16L13.1333 13.1333M14.6667 9.33333C14.6667 12.2789 12.2789 14.6667 9.33333 14.6667C6.38781 14.6667 4 12.2789 4 9.33333C4 6.38781 6.38781 4 9.33333 4C12.2789 4 14.6667 6.38781 14.6667 9.33333Z",strokeLinecap:"square"})});var z3="block-search",W3=t=>{let e=uk(5),{setSearchTerm:o}=t,{t:n}=E(),r;e[0]!==o?(r=l=>{o(l.target.value)},e[0]=o,e[1]=r):r=e[1];let s=r,i;return e[2]!==s||e[3]!==n?(i=dk("div",{className:z3,children:[G3("input",{className:`${z3}__input`,onChange:s,placeholder:n("fields:searchForBlock")}),G3(ru,{})]}),e[2]=s,e[3]=n,e[4]=i):i=e[4],i};var Qs="blocks-drawer",gk=(t,e)=>typeof t.labels.singular=="string"?t.labels.singular.toLowerCase():typeof t.labels.singular=="object"?C1(t.labels.singular,e).toLowerCase():"",x1=t=>{let{blocks:e,onSelect:o,searchTerm:n}=t,[r,s]=or(n??""),[i,l]=hk(e),{i18n:a}=E(),{config:c}=z(),u=pk(()=>{let d={_none:[]};return i.forEach(f=>{if(typeof f=="object"&&f.admin?.group){let m=f.admin.group,p=typeof m=="string"?m:C1(m,a);Object.hasOwn(d,p)?d[p].push(f):d[p]=[f]}else d._none.push(f)}),d},[i,a]);return fk(()=>{let d=r.toLowerCase(),f=e?.reduce((m,p)=>{let h=typeof p=="string"?c.blocksMap[p]:p;return gk(h,a).includes(d)&&m.push(h),m},[]);l(f)},[r,e,a,c.blocksMap]),H3(mk,{children:[Nn(W3,{setSearchTerm:s}),Nn("div",{className:`${Qs}__blocks-wrapper`,children:Nn("ul",{className:`${Qs}__block-groups`,children:Object.entries(u).map(([d,f])=>f.length?H3("li",{className:[`${Qs}__block-group`,d==="_none"&&`${Qs}__block-group-none`].filter(Boolean).join(" "),children:[d!=="_none"&&Nn("h3",{className:`${Qs}__block-group-label`,children:d}),Nn("ul",{className:`${Qs}__blocks`,children:f.map((m,p)=>{let h=typeof m=="string"?c.blocksMap[m]:m,{slug:g,imageAltText:b,imageURL:C,labels:v}=h;return Nn("li",{className:`${Qs}__block`,children:Nn(B3,{alignLabel:"center",label:C1(v?.singular,a),onClick:()=>{typeof o=="function"&&o(g)},thumbnail:Nn("div",{className:`${Qs}__default-image`,children:C?Nn("img",{alt:b,src:C}):Nn(y1,{})})})},p)})})]},d):null)})})]})};var nu=t=>{let e=bk(19),{addRow:o,addRowIndex:n,blocks:r,drawerSlug:s,labels:i}=t,{closeModal:l,isModalOpen:a}=ne(),{i18n:c,t:u}=E(),[d,f]=yk.useState(""),m,p;e[0]!==s||e[1]!==a?(m=()=>{a(s)||f("")},p=[a,s],e[0]=s,e[1]=a,e[2]=m,e[3]=p):(m=e[2],p=e[3]),Ck(m,p);let h;if(e[4]!==o||e[5]!==n||e[6]!==r||e[7]!==l||e[8]!==s||e[9]!==c||e[10]!==i.singular||e[11]!==d||e[12]!==u){let g;e[14]!==o||e[15]!==n||e[16]!==l||e[17]!==s?(g=b=>{o(n,b),l(s)},e[14]=o,e[15]=n,e[16]=l,e[17]=s,e[18]=g):g=e[18],h=U3(At,{slug:s,title:u("fields:addLabel",{label:vk(i.singular,c)}),children:U3(x1,{blocks:r,onSelect:g,searchTerm:d})}),e[4]=o,e[5]=n,e[6]=r,e[7]=l,e[8]=s,e[9]=c,e[10]=i.singular,e[11]=d,e[12]=u,e[13]=h}else h=e[13];return h};var Y3=t=>{let e=xk(28),{addRow:o,blocks:n,blockType:r,copyRow:s,duplicateRow:i,hasMaxRows:l,isSortable:a,labels:c,moveRow:u,pasteRow:d,removeRow:f,rowCount:m,rowIndex:p}=t,{closeModal:h,openModal:g}=ne(),b=Gc("blocks-drawer"),[C,v]=Z3.useState(null),y;e[0]!==o||e[1]!==h||e[2]!==b||e[3]!==C?(y=(S,w)=>{typeof o=="function"&&o(C,w),h(b)},e[0]=o,e[1]=h,e[2]=b,e[3]=C,e[4]=y):y=e[4];let x;if(e[5]!==r||e[6]!==n||e[7]!==s||e[8]!==b||e[9]!==i||e[10]!==l||e[11]!==a||e[12]!==c||e[13]!==u||e[14]!==g||e[15]!==d||e[16]!==f||e[17]!==m||e[18]!==p||e[19]!==y){let S;e[21]!==b||e[22]!==g?(S=T=>{v(T),g(b)},e[21]=b,e[22]=g,e[23]=S):S=e[23];let w;e[24]!==r||e[25]!==i||e[26]!==p?(w=()=>i(p,r),e[24]=r,e[25]=i,e[26]=p,e[27]=w):w=e[27],x=wk(Z3.Fragment,{children:[X3(nu,{addRow:y,addRowIndex:p,blocks:n,drawerSlug:b,labels:c}),X3(Df,{addRow:S,copyRow:s,duplicateRow:w,hasMaxRows:l,index:p,isSortable:a,moveRow:u,pasteRow:d,removeRow:f,rowCount:m})]}),e[5]=r,e[6]=n,e[7]=s,e[8]=b,e[9]=i,e[10]=l,e[11]=a,e[12]=c,e[13]=u,e[14]=g,e[15]=d,e[16]=f,e[17]=m,e[18]=p,e[19]=y,e[20]=x}else x=e[20];return x};import{c as Sk}from"react/compiler-runtime";import{jsx as J3}from"react/jsx-runtime";import"react";var q3="section-title",w1=t=>{let e=Sk(14),{customOnChange:o,customValue:n,path:r,readOnly:s}=t,i;e[0]!==r?(i={path:r},e[0]=r,e[1]=i):i=e[1];let{setValue:l,value:a}=Ee(i),{t:c}=E(),u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=[q3].filter(Boolean),e[2]=u):u=e[2];let d=u.join(" "),f;e[3]!==o||e[4]!==l?(f=o||(g=>{g.stopPropagation(),g.preventDefault(),l(g.target.value)}),e[3]=o,e[4]=l,e[5]=f):f=e[5];let m=f,p=n||a,h;return e[6]!==n||e[7]!==m||e[8]!==r||e[9]!==s||e[10]!==c||e[11]!==p||e[12]!==a?(h=J3("div",{className:d,"data-value":p,children:J3("input",{className:`${q3}__input`,id:r,name:r,onChange:m,placeholder:c("general:untitled"),readOnly:s,type:"text",value:n||a||""})}),e[6]=n,e[7]=m,e[8]=r,e[9]=s,e[10]=c,e[11]=p,e[12]=a,e[13]=h):h=e[13],h};var Ks="blocks-field",K3=t=>{let e=Ik(42),{addRow:o,attributes:n,block:r,blocks:s,copyRow:i,duplicateRow:l,errorCount:a,fields:c,hasMaxRows:u,isLoading:d,isSortable:f,Label:m,labels:p,listeners:h,moveRow:g,parentPath:b,pasteRow:C,path:v,permissions:y,readOnly:x,removeRow:S,row:w,rowCount:T,rowIndex:I,schemaPath:R,setCollapse:D,setNodeRef:_,transform:F}=t,A=Af(d,500),{i18n:$}=E(),j=no()&&a>0,B=!r.admin?.disableBlockName,L=j?`${Ks}__row--has-errors`:`${Ks}__row--no-errors`,N;e[0]!==L?(N=[`${Ks}__row`,L].filter(Boolean),e[0]=L,e[1]=N):N=e[1];let M=N.join(" "),k;if(e[2]!==m||e[3]!==o||e[4]!==n||e[5]!==r.fields||e[6]!==r.labels||e[7]!==r.slug||e[8]!==s||e[9]!==M||e[10]!==i||e[11]!==l||e[12]!==a||e[13]!==j||e[14]!==c||e[15]!==u||e[16]!==$||e[17]!==A||e[18]!==f||e[19]!==p||e[20]!==h||e[21]!==g||e[22]!==b||e[23]!==C||e[24]!==v||e[25]!==y||e[26]!==x||e[27]!==S||e[28]!==w.blockType||e[29]!==w.collapsed||e[30]!==w.id||e[31]!==T||e[32]!==I||e[33]!==R||e[34]!==D||e[35]!==_||e[36]!==B||e[37]!==F){let O;if(y===!0)O=!0;else{let G=y?.blocks?.[r.slug]||y?.blocks;if(G===!0)O=!0;else if(G?.fields)O=G.fields;else if(typeof y=="object"&&y&&!G){let U=y.read===!0,H=!y.create||!y.update;U&&(H||typeof y=="object"&&Object.keys(y).length===1&&y.read)?O={read:!0}:O=G?.fields}else O=G?.fields}let V;e[39]!==w.id||e[40]!==D?(V=G=>D(w.id,G),e[39]=w.id,e[40]=D,e[41]=V):V=e[41],k=un("div",{id:`${b?.split(".").join("-")}-row-${I}`,ref:_,style:{transform:F},children:un(zi,{actions:x?void 0:un(Y3,{addRow:o,blocks:s,blockType:w.blockType,copyRow:i,duplicateRow:l,fields:r.fields,hasMaxRows:u,isSortable:f,labels:p,moveRow:g,pasteRow:C,removeRow:S,rowCount:T,rowIndex:I}),className:M,collapsibleStyle:j?"error":"default",dragHandleProps:f?{id:w.id,attributes:n,listeners:h}:void 0,header:A?un(It,{height:"1rem",width:"8rem"}):Q3("div",{className:`${Ks}__block-header`,children:[un(ss,{CustomComponent:m,label:Q3(_k,{children:[un("span",{className:`${Ks}__block-number`,children:String(I+1).padStart(2,"0")}),un(at,{className:`${Ks}__block-pill ${Ks}__block-pill-${w.blockType}`,pillStyle:"white",size:"small",children:Tk(r.labels.singular,$)}),B&&un(w1,{path:`${v}.blockName`,readOnly:x})]}),path:v,rowNumber:I}),j&&un(yo,{count:a,i18n:$,withMessage:!0})]}),isCollapsed:w.collapsed,onToggle:V,children:A?un(It,{}):un(Po,{className:`${Ks}__fields`,fields:c,margins:"small",parentIndexPath:"",parentPath:v,parentSchemaPath:R,permissions:O,readOnly:x})},w.id)},`${b}-row-${I}`),e[2]=m,e[3]=o,e[4]=n,e[5]=r.fields,e[6]=r.labels,e[7]=r.slug,e[8]=s,e[9]=M,e[10]=i,e[11]=l,e[12]=a,e[13]=j,e[14]=c,e[15]=u,e[16]=$,e[17]=A,e[18]=f,e[19]=p,e[20]=h,e[21]=g,e[22]=b,e[23]=C,e[24]=v,e[25]=y,e[26]=x,e[27]=S,e[28]=w.blockType,e[29]=w.collapsed,e[30]=w.id,e[31]=T,e[32]=I,e[33]=R,e[34]=D,e[35]=_,e[36]=B,e[37]=F,e[38]=k}else k=e[38];return k};var Vr="blocks-field",Dk=t=>{let{i18n:e,t:o}=E(),{field:n,field:{name:r,type:s,admin:{className:i,description:l,isSortable:a=!0}={},blockReferences:c,blocks:u,label:d,labels:f,localized:m,maxRows:p,minRows:h,required:g},path:b,permissions:C,readOnly:v,schemaPath:y,validate:x}=t,S=y??r,w=h??g?1:0,{setDocFieldPreferences:T}=Re(),{addFieldRow:I,dispatchFields:R,getFields:D,moveFieldRow:_,removeFieldRow:F,replaceState:A,setModified:$}=ze(),{code:P}=Se(),{config:{localization:j},config:B}=z(),L=Gc("blocks-drawer"),N=no(),M={plural:o("fields:blocks"),singular:o("fields:block"),...f},k=(()=>{if(j&&j.fallback){let ue=j.defaultLocale;return P===ue}return!0})(),O=Ln((ue,ye)=>{if(!k&&ue===null)return!0;if(typeof x=="function")return x(ue,{...ye,maxRows:p,minRows:w,required:g})},[p,w,g,x,k]),{blocksFilterOptions:V,customComponents:{AfterInput:G,BeforeInput:U,Description:H,Error:Z,Label:Y}={},disabled:W,errorPaths:se,path:J,rows:ie=[],showError:ae,valid:he,value:be}=Ee({hasRows:!0,potentiallyStalePath:b,validate:O}),{clientBlocks:fe,clientBlocksAfterFilter:Me}=tS(()=>{let ue=[];if(!c)ue=u;else for(let ye of c){let Ie=typeof ye=="string"?B.blocksMap[ye]:ye;Ie&&ue.push(Ie)}if(Array.isArray(V)){let ye=ue.filter(Ie=>{let Ae=typeof Ie=="string"?Ie:Ie.slug;return V.includes(Ae)});return{clientBlocks:ue,clientBlocksAfterFilter:ye}}return{clientBlocks:ue,clientBlocksAfterFilter:ue}},[c,u,V,B.blocksMap]),xe=Ln((ue,ye)=>{I({blockType:ye,path:J,rowIndex:ue,schemaPath:S}),setTimeout(()=>{al(`${J}-row-${ue+1}`)},0)},[I,J,S]),we=Ln(ue=>{R({type:"DUPLICATE_ROW",path:J,rowIndex:ue}),$(!0),setTimeout(()=>{al(`${J}-row-${ue+1}`)},0)},[R,J,$]),Te=Ln(ue=>{F({path:J,rowIndex:ue})},[J,F]),Q=Ln((ue,ye)=>{_({moveFromIndex:ue,moveToIndex:ye,path:J})},[_,J]),Ve=Ln(ue=>{let{collapsedIDs:ye,updatedRows:Ie}=vf({collapsed:ue,rows:ie});R({type:"SET_ALL_ROWS_COLLAPSED",path:J,updatedRows:Ie}),T(J,{collapsed:ye})},[R,J,ie,T]),Oe=Ln((ue,ye)=>{let{collapsedIDs:Ie,updatedRows:Ae}=bf({collapsed:ye,rowID:ue,rows:ie});R({type:"SET_ROW_COLLAPSED",path:J,updatedRows:Ae}),T(J,{collapsed:Ie})},[R,J,ie,T]),le=Ln(ue=>{let ye=za({type:s,blocks:fe,getDataToCopy:()=>Xa({formState:{...D()},path:J,rowIndex:ue}),path:J,rowIndex:ue,t:o});typeof ye=="string"?oe.error(ye):oe.success(o("general:copied"))},[fe,J,o,s,D]),X=Ln(ue=>{let Ie=Wa({onPaste:Ae=>{let Ye={...D()},tt=Za({dataFromClipboard:Ae,formState:Ye,path:J,rowIndex:ue});A(tt),$(!0)},path:J,schemaBlocks:fe,t:o});typeof Ie=="string"&&oe.error(Ie)},[fe,D,J,A,$,o]),q=Ln(ue=>{let ye={...D()},Ie=Za({dataFromClipboard:ue,formState:ye,path:J});A(Ie),$(!0)},[D,J,A,$]),te=p&&ie.length>=p,pe=se.length,K=N&&pe+(he?0:1)>0,re=ie.length<w||g&&ie.length===0,ge=v&&ie.length===0,me=tS(()=>et(n),[n]);return bs("div",{className:[Ne,Vr,i,K?`${Vr}--has-error`:`${Vr}--has-no-error`].filter(Boolean).join(" "),id:`field-${J?.replace(/\./g,"__")}`,style:me,children:[ae&&Ut(de,{CustomComponent:Z,Fallback:Ut(Qe,{path:J,showError:ae})}),bs("header",{className:`${Vr}__header`,children:[bs("div",{className:`${Vr}__header-wrap`,children:[bs("div",{className:`${Vr}__heading-with-error`,children:[Ut("h3",{children:Ut(de,{CustomComponent:Y,Fallback:Ut(Fe,{as:"span",label:d,localized:m,path:J,required:g})})}),K&&pe>0&&Ut(yo,{count:pe,i18n:e,withMessage:!0})]}),bs("ul",{className:`${Vr}__header-actions`,children:[ie.length>0&&bs(eS,{children:[Ut("li",{children:Ut("button",{className:`${Vr}__header-action`,onClick:()=>Ve(!0),type:"button",children:o("fields:collapseAll")})}),Ut("li",{children:Ut("button",{className:`${Vr}__header-action`,onClick:()=>Ve(!1),type:"button",children:o("fields:showAll")})})]}),Ut("li",{children:Ut(Hm,{allowCopy:ie?.length>0,allowPaste:!v,blocks:fe,className:`${Vr}__header-action`,disabled:W,getDataToCopy:()=>Xa({formState:{...D()},path:J}),onPaste:q,path:J,type:s})})]})]}),Ut(de,{CustomComponent:H,Fallback:Ut(Je,{description:l,path:J})})]}),U,Ut(eu,{fieldValue:be,localized:m,path:J,readOnly:v}),(ie.length>0||!he&&(ge||re))&&bs(kr,{className:`${Vr}__rows`,ids:ie.map(ue=>ue.id),onDragEnd:({moveFromIndex:ue,moveToIndex:ye})=>Q(ue,ye),children:[ie.map((ue,ye)=>{let{blockType:Ie,isLoading:Ae}=ue,Ye=B.blocksMap[Ie]??fe.find(tt=>tt.slug===Ie);if(Ye){let tt=`${J}.${ye}`,Wt=se.filter(po=>po.startsWith(tt+".")).length;return Ut(An,{disabled:v||W||!a,id:ue.id,children:po=>Ut(K3,{...po,addRow:xe,block:Ye,blocks:fe,copyRow:le,duplicateRow:we,errorCount:Wt,fields:Ye.fields,hasMaxRows:te,isLoading:Ae,isSortable:a,Label:ie?.[ye]?.customComponents?.RowLabel,labels:M,moveRow:Q,parentPath:J,pasteRow:X,path:tt,permissions:C,readOnly:v||W,removeRow:Te,row:ue,rowCount:ie.length,rowIndex:ye,schemaPath:S+Ye.slug,setCollapse:Oe})},ue.id)}return null}),!k&&bs(Fk.Fragment,{children:[re&&Ut(rn,{type:"error",children:o("validation:requiresAtLeast",{count:w,label:S1(w>1?M.plural:M.singular,e)||o(w>1?"general:row":"general:rows")})}),ge&&Ut(rn,{children:o("validation:fieldHasNo",{label:S1(M.plural,e)})})]})]}),!te&&bs(eS,{children:[Ut(ms,{className:`${Vr}__drawer-toggler`,disabled:v||W,slug:L,children:Ut(ee,{buttonStyle:"icon-label",disabled:v||W,el:"span",icon:"plus",iconPosition:"left",iconStyle:"with-border",children:o("fields:addLabel",{label:S1(M.singular,e)})})}),Ut(nu,{addRow:xe,addRowIndex:ie?.length||0,blocks:Me,drawerSlug:L,labels:M})]}),G]})},su=Xe(Dk);import{jsx as Wi,jsxs as oS}from"react/jsx-runtime";import rS,{useCallback as nS,useEffect as Ek,useMemo as Nk,useState as Lk}from"react";import{jsx as I1}from"react/jsx-runtime";import{lazy as Rk,Suspense as Ak}from"react";var Pk=Rk(()=>import("./CodeEditor-QOURTFMT.js")),iu=t=>I1(Ak,{fallback:I1(It,{}),children:I1(Pk,{...t})});var $k={js:"javascript",ts:"typescript",tsx:"typescript"},kk="code-field",jk=t=>{let{field:e,field:{admin:{className:o,description:n,editorOptions:r,editorProps:s,language:i="javascript"}={},label:l,localized:a,required:c},onMount:u,path:d,readOnly:f,validate:m}=t,p=rS.useRef("formState"),[h,g]=Lk(Date.now()),b=nS((P,j)=>{if(typeof m=="function")return m(P,{...j,required:c})},[m,c]),{customComponents:{AfterInput:C,BeforeInput:v,Description:y,Error:x,Label:S}={},disabled:w,initialValue:T,path:I,setValue:R,showError:D,value:_}=Ee({potentiallyStalePath:d,validate:b}),F=rS.useRef((_||T)!==void 0?_??T:void 0),A=nS(P=>{if(!(f||w)){p.current="internalEditor";try{R(P||null),F.current=P}catch{R(P||null),F.current=P}}},[f,w,R]);Ek(()=>{p.current==="formState"&&(F.current=(_||T)!==void 0?_??T:void 0,g(Date.now())),p.current="formState"},[T,I,_]);let $=Nk(()=>et(e),[e]);return oS("div",{className:[Ne,kk,o,D&&"error",(f||w)&&"read-only"].filter(Boolean).join(" "),style:$,children:[Wi(de,{CustomComponent:S,Fallback:Wi(Fe,{label:l,localized:a,path:I,required:c})}),oS("div",{className:`${Ne}__wrap`,children:[Wi(de,{CustomComponent:x,Fallback:Wi(Qe,{path:I,showError:D})}),v,Wi(iu,{defaultLanguage:$k[i]||i,onChange:A,onMount:u,options:r,readOnly:f||w,recalculatedHeightAt:h,value:F.current,wrapperProps:{id:`field-${I?.replace(/\./g,"__")}`},...s||{}}),C]}),Wi(de,{CustomComponent:y,Fallback:Wi(Je,{description:n,path:I})})]})},au=Xe(jk);import{jsx as Ui,jsxs as _1}from"react/jsx-runtime";import{getTranslation as Mk}from"@payloadcms/translations";import{Fragment as Ok,useCallback as Vk,useEffect as Gk,useMemo as zk,useState as iS}from"react";import{c as Bk}from"react/compiler-runtime";import{fieldAffectsData as sS}from"payload/shared";var Nf=t=>t.reduce((e,o)=>{let n="fields"in o?o.fields:void 0;return n?sS(o)?e.push(`${o.name}.`):e.push(...Nf(n)):o.type==="tabs"?"tabs"in o&&o.tabs?.forEach(r=>{"name"in r?e.push(`${r.name}.`):e.push(...Nf(r.fields))}):sS(o)&&e.push(o.name),e},[]);var Hi=t=>{let e=Bk(12),{fields:o,path:n,setErrorCount:r}=t,[s]=Hs(),i=no(),l;e[0]!==o?(l=Nf(o),e[0]=o,e[1]=l):l=e[1];let a=l,c;e[2]!==s||e[3]!==i||e[4]!==n||e[5]!==a||e[6]!==r?(c=()=>{if(i){let d=0;Object.entries(s).forEach(f=>{let[m]=f;if(a?.some(h=>{let g=[...n,h].join(".");return g.endsWith(".")?m.startsWith(g):m===g})){let h=s[m];"valid"in h&&!h.valid&&(d=d+1)}}),r(d)}},e[2]=s,e[3]=i,e[4]=n,e[5]=a,e[6]=r,e[7]=c):c=e[7];let u;return e[8]!==o||e[9]!==s||e[10]!==i?(u=[s,i,o],e[8]=o,e[9]=s,e[10]=i,e[11]=u):u=e[11],Bi(c,250,u),null};var lu="collapsible-field",Wk=t=>{let{field:e,field:{admin:{className:o,description:n,initCollapsed:r=!1}={},fields:s,label:i}={},indexPath:l,parentPath:a,parentSchemaPath:c,path:u,permissions:d,readOnly:f}=t,{i18n:m}=E(),{getPreference:p,setPreference:h}=Kt(),{preferencesKey:g}=Re(),[b,C]=iS(),v=`collapsible-${u?.replace(/\./g,"__")}`,[y,x]=iS(0),S=y>0,{customComponents:{AfterInput:w,BeforeInput:T,Description:I,Label:R}={},disabled:D}=Ee({path:u}),_=Vk(async A=>{let $=await p(g);g&&h(g,{...$,...u?{fields:{...$?.fields||{},[u]:{...$?.fields?.[u],collapsed:A}}}:{fields:{...$?.fields||{},[v]:{...$?.fields?.[v],collapsed:A}}}})},[g,v,p,h,u]);Gk(()=>{(async()=>{if(g){let $=await p(g),P=u?$?.fields?.[u]?.collapsed:$?.fields?.[v]?.collapsed;C(P!==void 0?!!P:typeof r=="boolean"?r:!1)}else C(typeof r=="boolean"?r:!1)})()},[p,g,v,r,u]);let F=zk(()=>et(e),[e]);return typeof b!="boolean"?null:_1(Ok,{children:[Ui(Hi,{fields:s,path:u.split(".").slice(0,-1),setErrorCount:x}),_1("div",{className:[Ne,lu,o,S?`${lu}--has-error`:`${lu}--has-no-error`].filter(Boolean).join(" "),id:`field-${v}`,style:F,children:[T,Ui(zi,{className:`${lu}__collapsible`,collapsibleStyle:S?"error":"default",header:_1("div",{className:`${lu}__row-label-wrap`,children:[Ui(ss,{CustomComponent:R,label:Mk(i,m),path:u}),S&&Ui(yo,{count:y,i18n:m,withMessage:!0})]}),initCollapsed:b,onToggle:_,children:Ui(Po,{fields:s,margins:"small",parentIndexPath:l,parentPath:a,parentSchemaPath:c,permissions:d,readOnly:f||D})}),w,Ui(de,{CustomComponent:I,Fallback:Ui(Je,{description:n,path:u})})]})]})},cu=Xe(Wk);import{jsx as ri,jsxs as q_}from"react/jsx-runtime";import{getTranslation as WM}from"@payloadcms/translations";import{useCallback as pv,useMemo as hv}from"react";import{jsx as T1}from"react/jsx-runtime";import{lazy as Hk,Suspense as Uk}from"react";var Xk=Hk(()=>import("./DatePicker-VMLA35FO.js")),cl=t=>T1(Uk,{fallback:T1(It,{height:50}),children:T1(Xk,{...t})});import{jsx as J_,jsxs as GM}from"react/jsx-runtime";import{useMemo as zM}from"react";import{jsx as qi}from"react/jsx-runtime";import{getTranslation as X_}from"@payloadcms/translations";import Z_,{useEffect as BM,useId as MM}from"react";function dn(t){"@babel/helpers - typeof";return dn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dn(t)}function aS(t,e){if(dn(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(dn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Lf(t){var e=aS(t,"string");return dn(e)=="symbol"?e:e+""}function Xi(t,e,o){return(e=Lf(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function lS(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),o.push.apply(o,n)}return o}function je(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?lS(Object(o),!0).forEach(function(n){Xi(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):lS(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function cS(t){if(Array.isArray(t))return t}function uS(t,e){var o=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(o!=null){var n,r,s,i,l=[],a=!0,c=!1;try{if(s=(o=o.call(t)).next,e===0){if(Object(o)!==o)return;a=!1}else for(;!(a=(n=s.call(o)).done)&&(l.push(n.value),l.length!==e);a=!0);}catch(u){c=!0,r=u}finally{try{if(!a&&o.return!=null&&(i=o.return(),Object(i)!==i))return}finally{if(c)throw r}}return l}}function uu(t,e){(e==null||e>t.length)&&(e=t.length);for(var o=0,n=Array(e);o<e;o++)n[o]=t[o];return n}function $f(t,e){if(t){if(typeof t=="string")return uu(t,e);var o={}.toString.call(t).slice(8,-1);return o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set"?Array.from(t):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?uu(t,e):void 0}}function dS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
49
49
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mn(t,e){return cS(t)||uS(t,e)||$f(t,e)||dS()}function ir(t,e){if(t==null)return{};var o,n,r=Ja(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)o=s[n],e.includes(o)||{}.propertyIsEnumerable.call(t,o)&&(r[o]=t[o])}return r}import{useState as F1,useCallback as kf}from"react";var Zk=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function jf(t){var e=t.defaultInputValue,o=e===void 0?"":e,n=t.defaultMenuIsOpen,r=n===void 0?!1:n,s=t.defaultValue,i=s===void 0?null:s,l=t.inputValue,a=t.menuIsOpen,c=t.onChange,u=t.onInputChange,d=t.onMenuClose,f=t.onMenuOpen,m=t.value,p=ir(t,Zk),h=F1(l!==void 0?l:o),g=mn(h,2),b=g[0],C=g[1],v=F1(a!==void 0?a:r),y=mn(v,2),x=y[0],S=y[1],w=F1(m!==void 0?m:i),T=mn(w,2),I=T[0],R=T[1],D=kf(function(B,L){typeof c=="function"&&c(B,L),R(B)},[c]),_=kf(function(B,L){var N;typeof u=="function"&&(N=u(B,L)),C(N!==void 0?N:B)},[u]),F=kf(function(){typeof f=="function"&&f(),S(!0)},[f]),A=kf(function(){typeof d=="function"&&d(),S(!1)},[d]),$=l!==void 0?l:b,P=a!==void 0?a:x,j=m!==void 0?m:I;return je(je({},p),{},{inputValue:$,menuIsOpen:P,onChange:D,onInputChange:_,onMenuClose:A,onMenuOpen:F,value:j})}import*as T_ from"react";import{forwardRef as vM,useMemo as Z1e}from"react";function mS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fS(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Lf(n.key),n)}}function pS(t,e,o){return e&&fS(t.prototype,e),o&&fS(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function hS(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qa(t,e)}function du(t){return du=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},du(t)}function D1(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(D1=function(){return!!t})()}function gS(t,e){if(e&&(dn(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zw(t)}function bS(t){var e=D1();return function(){var o,n=du(t);if(e){var r=du(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return gS(this,o)}}function vS(t){if(Array.isArray(t))return uu(t)}function yS(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function CS(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
50
50
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ei(t){return vS(t)||yS(t)||$f(t)||CS()}import*as vt from"react";import{useMemo as Cu,Fragment as q1,useRef as Sl,useCallback as oi,useEffect as h_,Component as LB}from"react";import*as zr from"react";import{useContext as Tj,forwardRef as Fj}from"react";var Yk=!1;function Jk(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function qk(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var xS=function(){function t(o){var n=this;this._insertTag=function(r){var s;n.tags.length===0?n.insertionPoint?s=n.insertionPoint.nextSibling:n.prepend?s=n.container.firstChild:s=n.before:s=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(r,s),n.tags.push(r)},this.isSpeedy=o.speedy===void 0?!Yk:o.speedy,this.tags=[],this.ctr=0,this.nonce=o.nonce,this.key=o.key,this.container=o.container,this.prepend=o.prepend,this.insertionPoint=o.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(n){n.forEach(this._insertTag)},e.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(qk(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var s=Jk(r);try{s.insertRule(n,s.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(n));this.ctr++},e.flush=function(){this.tags.forEach(function(n){var r;return(r=n.parentNode)==null?void 0:r.removeChild(n)}),this.tags=[],this.ctr=0},t}();var Eo="-ms-",mu="-moz-",mt="-webkit-",Bf="comm",ul="rule",dl="decl";var wS="@import";var Mf="@keyframes";var SS="@layer";var IS=Math.abs,Zi=String.fromCharCode,_S=Object.assign;function TS(t,e){return eo(t,0)^45?(((e<<2^eo(t,0))<<2^eo(t,1))<<2^eo(t,2))<<2^eo(t,3):0}function Of(t){return t.trim()}function R1(t,e){return(t=e.exec(t))?t[0]:t}function lt(t,e,o){return t.replace(e,o)}function fu(t,e){return t.indexOf(e)}function eo(t,e){return t.charCodeAt(e)|0}function ti(t,e,o){return t.slice(e,o)}function Yo(t){return t.length}function ml(t){return t.length}function fl(t,e){return e.push(t),t}function A1(t,e){return t.map(e).join("")}var Vf=1,pl=1,FS=0,Jo=0,lo=0,gl="";function pu(t,e,o,n,r,s,i){return{value:t,root:e,parent:o,type:n,props:r,children:s,line:Vf,column:pl,length:i,return:""}}function bl(t,e){return _S(pu("",null,null,"",null,null,0),t,{length:-t.length},e)}function DS(){return lo}function RS(){return lo=Jo>0?eo(gl,--Jo):0,pl--,lo===10&&(pl=1,Vf--),lo}function qo(){return lo=Jo<FS?eo(gl,Jo++):0,pl++,lo===10&&(pl=1,Vf++),lo}function Gr(){return eo(gl,Jo)}function hu(){return Jo}function vl(t,e){return ti(gl,t,e)}function hl(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Gf(t){return Vf=pl=1,FS=Yo(gl=t),Jo=0,[]}function zf(t){return gl="",t}function yl(t){return Of(vl(Jo-1,P1(t===91?t+2:t===40?t+1:t)))}function AS(t){for(;(lo=Gr())&&lo<33;)qo();return hl(t)>2||hl(lo)>3?"":" "}function PS(t,e){for(;--e&&qo()&&!(lo<48||lo>102||lo>57&&lo<65||lo>70&&lo<97););return vl(t,hu()+(e<6&&Gr()==32&&qo()==32))}function P1(t){for(;qo();)switch(lo){case t:return Jo;case 34:case 39:t!==34&&t!==39&&P1(lo);break;case 40:t===41&&P1(t);break;case 92:qo();break}return Jo}function ES(t,e){for(;qo()&&t+lo!==57;)if(t+lo===84&&Gr()===47)break;return"/*"+vl(e,Jo-1)+"*"+Zi(t===47?t:qo())}function NS(t){for(;!hl(Gr());)qo();return vl(t,Jo)}function kS(t){return zf(Wf("",null,null,null,[""],t=Gf(t),0,[0],t))}function Wf(t,e,o,n,r,s,i,l,a){for(var c=0,u=0,d=i,f=0,m=0,p=0,h=1,g=1,b=1,C=0,v="",y=r,x=s,S=n,w=v;g;)switch(p=C,C=qo()){case 40:if(p!=108&&eo(w,d-1)==58){fu(w+=lt(yl(C),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:w+=yl(C);break;case 9:case 10:case 13:case 32:w+=AS(p);break;case 92:w+=PS(hu()-1,7);continue;case 47:switch(Gr()){case 42:case 47:fl(Qk(ES(qo(),hu()),e,o),a);break;default:w+="/"}break;case 123*h:l[c++]=Yo(w)*b;case 125*h:case 59:case 0:switch(C){case 0:case 125:g=0;case 59+u:b==-1&&(w=lt(w,/\f/g,"")),m>0&&Yo(w)-d&&fl(m>32?$S(w+";",n,o,d-1):$S(lt(w," ","")+";",n,o,d-2),a);break;case 59:w+=";";default:if(fl(S=LS(w,e,o,c,u,r,l,v,y=[],x=[],d),s),C===123)if(u===0)Wf(w,e,S,S,y,s,d,l,x);else switch(f===99&&eo(w,3)===110?100:f){case 100:case 108:case 109:case 115:Wf(t,S,S,n&&fl(LS(t,S,S,0,0,r,l,v,r,y=[],d),x),r,x,d,l,n?y:x);break;default:Wf(w,S,S,S,[""],x,0,l,x)}}c=u=m=0,h=b=1,v=w="",d=i;break;case 58:d=1+Yo(w),m=p;default:if(h<1){if(C==123)--h;else if(C==125&&h++==0&&RS()==125)continue}switch(w+=Zi(C),C*h){case 38:b=u>0?1:(w+="\f",-1);break;case 44:l[c++]=(Yo(w)-1)*b,b=1;break;case 64:Gr()===45&&(w+=yl(qo())),f=Gr(),u=d=Yo(v=w+=NS(hu())),C++;break;case 45:p===45&&Yo(w)==2&&(h=0)}}return s}function LS(t,e,o,n,r,s,i,l,a,c,u){for(var d=r-1,f=r===0?s:[""],m=ml(f),p=0,h=0,g=0;p<n;++p)for(var b=0,C=ti(t,d+1,d=IS(h=i[p])),v=t;b<m;++b)(v=Of(h>0?f[b]+" "+C:lt(C,/&\f/g,f[b])))&&(a[g++]=v);return pu(t,e,o,r===0?ul:l,a,c,u)}function Qk(t,e,o){return pu(t,e,o,Bf,Zi(DS()),ti(t,2,-2),0)}function $S(t,e,o,n){return pu(t,e,o,dl,ti(t,0,n),ti(t,n+1,-1),n)}function Yi(t,e){for(var o="",n=ml(t),r=0;r<n;r++)o+=e(t[r],r,t,e)||"";return o}function jS(t,e,o,n){switch(t.type){case SS:if(t.children.length)break;case wS:case dl:return t.return=t.return||t.value;case Bf:return"";case Mf:return t.return=t.value+"{"+Yi(t.children,n)+"}";case ul:t.value=t.props.join(",")}return Yo(o=Yi(t.children,n))?t.return=t.value+"{"+o+"}":""}function BS(t){var e=ml(t);return function(o,n,r,s){for(var i="",l=0;l<e;l++)i+=t[l](o,n,r,s)||"";return i}}function MS(t){return function(e){e.root||(e=e.return)&&t(e)}}function OS(t){var e=Object.create(null);return function(o){return e[o]===void 0&&(e[o]=t(o)),e[o]}}var Kk=function(e,o,n){for(var r=0,s=0;r=s,s=Gr(),r===38&&s===12&&(o[n]=1),!hl(s);)qo();return vl(e,Jo)},ej=function(e,o){var n=-1,r=44;do switch(hl(r)){case 0:r===38&&Gr()===12&&(o[n]=1),e[n]+=Kk(Jo-1,o,n);break;case 2:e[n]+=yl(r);break;case 4:if(r===44){e[++n]=Gr()===58?"&\f":"",o[n]=e[n].length;break}default:e[n]+=Zi(r)}while(r=qo());return e},tj=function(e,o){return zf(ej(Gf(e),o))},VS=new WeakMap,oj=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var o=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(e.props.length===1&&o.charCodeAt(0)!==58&&!VS.get(n))&&!r){VS.set(e,!0);for(var s=[],i=tj(o,s),l=n.props,a=0,c=0;a<i.length;a++)for(var u=0;u<l.length;u++,c++)e.props[c]=s[a]?i[a].replace(/&\f/g,l[u]):l[u]+" "+i[a]}}},rj=function(e){if(e.type==="decl"){var o=e.value;o.charCodeAt(0)===108&&o.charCodeAt(2)===98&&(e.return="",e.value="")}};function GS(t,e){switch(TS(t,e)){case 5103:return mt+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return mt+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return mt+t+mu+t+Eo+t+t;case 6828:case 4268:return mt+t+Eo+t+t;case 6165:return mt+t+Eo+"flex-"+t+t;case 5187:return mt+t+lt(t,/(\w+).+(:[^]+)/,mt+"box-$1$2"+Eo+"flex-$1$2")+t;case 5443:return mt+t+Eo+"flex-item-"+lt(t,/flex-|-self/,"")+t;case 4675:return mt+t+Eo+"flex-line-pack"+lt(t,/align-content|flex-|-self/,"")+t;case 5548:return mt+t+Eo+lt(t,"shrink","negative")+t;case 5292:return mt+t+Eo+lt(t,"basis","preferred-size")+t;case 6060:return mt+"box-"+lt(t,"-grow","")+mt+t+Eo+lt(t,"grow","positive")+t;case 4554:return mt+lt(t,/([^-])(transform)/g,"$1"+mt+"$2")+t;case 6187:return lt(lt(lt(t,/(zoom-|grab)/,mt+"$1"),/(image-set)/,mt+"$1"),t,"")+t;case 5495:case 3959:return lt(t,/(image-set\([^]*)/,mt+"$1$`$1");case 4968:return lt(lt(t,/(.+:)(flex-)?(.*)/,mt+"box-pack:$3"+Eo+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+mt+t+t;case 4095:case 3583:case 4068:case 2532:return lt(t,/(.+)-inline(.+)/,mt+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Yo(t)-1-e>6)switch(eo(t,e+1)){case 109:if(eo(t,e+4)!==45)break;case 102:return lt(t,/(.+:)(.+)-([^]+)/,"$1"+mt+"$2-$3$1"+mu+(eo(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~fu(t,"stretch")?GS(lt(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(eo(t,e+1)!==115)break;case 6444:switch(eo(t,Yo(t)-3-(~fu(t,"!important")&&10))){case 107:return lt(t,":",":"+mt)+t;case 101:return lt(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+mt+(eo(t,14)===45?"inline-":"")+"box$3$1"+mt+"$2$3$1"+Eo+"$2box$3")+t}break;case 5936:switch(eo(t,e+11)){case 114:return mt+t+Eo+lt(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return mt+t+Eo+lt(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return mt+t+Eo+lt(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return mt+t+Eo+t+t}return t}var nj=function(e,o,n,r){if(e.length>-1&&!e.return)switch(e.type){case dl:e.return=GS(e.value,e.length);break;case Mf:return Yi([bl(e,{value:lt(e.value,"@","@"+mt)})],r);case ul:if(e.length)return A1(e.props,function(s){switch(R1(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Yi([bl(e,{props:[lt(s,/:(read-\w+)/,":"+mu+"$1")]})],r);case"::placeholder":return Yi([bl(e,{props:[lt(s,/:(plac\w+)/,":"+mt+"input-$1")]}),bl(e,{props:[lt(s,/:(plac\w+)/,":"+mu+"$1")]}),bl(e,{props:[lt(s,/:(plac\w+)/,Eo+"input-$1")]})],r)}return""})}},sj=[nj],E1=function(e){var o=e.key;if(o==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(h){var g=h.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var r=e.stylisPlugins||sj,s={},i,l=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+o+' "]'),function(h){for(var g=h.getAttribute("data-emotion").split(" "),b=1;b<g.length;b++)s[g[b]]=!0;l.push(h)});var a,c=[oj,rj];{var u,d=[jS,MS(function(h){u.insert(h)})],f=BS(c.concat(r,d)),m=function(g){return Yi(kS(g),f)};a=function(g,b,C,v){u=C,m(g?g+"{"+b.styles+"}":b.styles),v&&(p.inserted[b.name]=!0)}}var p={key:o,sheet:new xS({key:o,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:a};return p.sheet.hydrate(l),p};var vj=!0;function B1(t,e,o){var n="";return o.split(" ").forEach(function(r){t[r]!==void 0?e.push(t[r]+";"):r&&(n+=r+" ")}),n}var tp=function(e,o,n){var r=e.key+"-"+o.name;(n===!1||vj===!1)&&e.registered[r]===void 0&&(e.registered[r]=o.styles)},M1=function(e,o,n){tp(e,o,n);var r=e.key+"-"+o.name;if(e.inserted[o.name]===void 0){var s=o;do e.insert(o===s?"."+r:"",s,e.sheet,!0),s=s.next;while(s!==void 0)}};function eI(t){for(var e=0,o,n=0,r=t.length;r>=4;++n,r-=4)o=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,o=(o&65535)*1540483477+((o>>>16)*59797<<16),o^=o>>>24,e=(o&65535)*1540483477+((o>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(r){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var tI={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var yj=!1,Cj=/[A-Z]|^ms/g,xj=/_EMO_([^_]+?)_([^]*?)_EMO_/g,sI=function(e){return e.charCodeAt(1)===45},oI=function(e){return e!=null&&typeof e!="boolean"},O1=OS(function(t){return sI(t)?t:t.replace(Cj,"-$&").toLowerCase()}),rI=function(e,o){switch(e){case"animation":case"animationName":if(typeof o=="string")return o.replace(xj,function(n,r,s){return $n={name:r,styles:s,next:$n},r})}return tI[e]!==1&&!sI(e)&&typeof o=="number"&&o!==0?o+"px":o},wj="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function gu(t,e,o){if(o==null)return"";var n=o;if(n.__emotion_styles!==void 0)return n;switch(typeof o){case"boolean":return"";case"object":{var r=o;if(r.anim===1)return $n={name:r.name,styles:r.styles,next:$n},r.name;var s=o;if(s.styles!==void 0){var i=s.next;if(i!==void 0)for(;i!==void 0;)$n={name:i.name,styles:i.styles,next:$n},i=i.next;var l=s.styles+";";return l}return Sj(t,e,o)}case"function":{if(t!==void 0){var a=$n,c=o(t);return $n=a,gu(t,e,c)}break}}var u=o;if(e==null)return u;var d=e[u];return d!==void 0?d:u}function Sj(t,e,o){var n="";if(Array.isArray(o))for(var r=0;r<o.length;r++)n+=gu(t,e,o[r])+";";else for(var s in o){var i=o[s];if(typeof i!="object"){var l=i;e!=null&&e[l]!==void 0?n+=s+"{"+e[l]+"}":oI(l)&&(n+=O1(s)+":"+rI(s,l)+";")}else{if(s==="NO_COMPONENT_SELECTOR"&&yj)throw new Error(wj);if(Array.isArray(i)&&typeof i[0]=="string"&&(e==null||e[i[0]]===void 0))for(var a=0;a<i.length;a++)oI(i[a])&&(n+=O1(s)+":"+rI(s,i[a])+";");else{var c=gu(t,e,i);switch(s){case"animation":case"animationName":{n+=O1(s)+":"+c+";";break}default:n+=s+"{"+c+"}"}}}}return n}var nI=/label:\s*([^\s;{]+)\s*(;|$)/g,$n;function op(t,e,o){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var n=!0,r="";$n=void 0;var s=t[0];if(s==null||s.raw===void 0)n=!1,r+=gu(o,e,s);else{var i=s;r+=i[0]}for(var l=1;l<t.length;l++)if(r+=gu(o,e,t[l]),n){var a=s;r+=a[l]}nI.lastIndex=0;for(var c="",u;(u=nI.exec(r))!==null;)c+="-"+u[1];var d=eI(r)+c;return{name:d,styles:r,next:$n}}import*as rp from"react";var Ij=function(e){return e()},_j=rp.useInsertionEffect?rp.useInsertionEffect:!1,V1=_j||Ij;var iI=!1,aI=zr.createContext(typeof HTMLElement<"u"?E1({key:"css"}):null),t1e=aI.Provider;var lI=function(e){return Fj(function(o,n){var r=Tj(aI);return e(o,r,n)})},cI=zr.createContext({});var np={}.hasOwnProperty,G1="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",uI=function(e,o){var n={};for(var r in o)np.call(o,r)&&(n[r]=o[r]);return n[G1]=e,n},Dj=function(e){var o=e.cache,n=e.serialized,r=e.isStringTag;return tp(o,n,r),V1(function(){return M1(o,n,r)}),null},Rj=lI(function(t,e,o){var n=t.css;typeof n=="string"&&e.registered[n]!==void 0&&(n=e.registered[n]);var r=t[G1],s=[n],i="";typeof t.className=="string"?i=B1(e.registered,s,t.className):t.className!=null&&(i=t.className+" ");var l=op(s,void 0,zr.useContext(cI));i+=e.key+"-"+l.name;var a={};for(var c in t)np.call(t,c)&&c!=="css"&&c!==G1&&!iI&&(a[c]=t[c]);return a.className=i,o&&(a.ref=o),zr.createElement(zr.Fragment,null,zr.createElement(Dj,{cache:e,serialized:l,isStringTag:typeof r=="string"}),zr.createElement(r,a))}),dI=Rj;import*as Cl from"react";var d1e=_i(KS()),Be=function(e,o){var n=arguments;if(o==null||!np.call(o,"css"))return Cl.createElement.apply(void 0,n);var r=n.length,s=new Array(r);s[0]=dI,s[1]=uI(e,o);for(var i=2;i<r;i++)s[i]=n[i];return Cl.createElement.apply(null,s)};(function(t){var e;e||(e=t.JSX||(t.JSX={}))})(Be||(Be={}));function bu(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return op(e)}function mI(){var t=bu.apply(void 0,arguments),e="animation-"+t.name;return{name:e,styles:"@keyframes "+e+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}function fI(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}K5();import{useContext as Pj,useRef as H1,useState as lp,useMemo as Ej,useCallback as z1,createContext as Nj}from"react";import{createPortal as Lj}from"react-dom";import{useLayoutEffect as Aj}from"react";var sp=Aj;var $j=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],vu=function(){};function kj(t,e){return e?e[0]==="-"?t+e:t+"__"+e:t}function hI(t,e){for(var o=arguments.length,n=new Array(o>2?o-2:0),r=2;r<o;r++)n[r-2]=arguments[r];var s=[].concat(n);if(e&&t)for(var i in e)e.hasOwnProperty(i)&&e[i]&&s.push("".concat(kj(t,i)));return s.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var xl=function(e){return Gj(e)?e.filter(Boolean):dn(e)==="object"&&e!==null?[e]:[]},gI=function(e){e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme;var o=ir(e,$j);return je({},o)},Xt=function(e,o,n){var r=e.cx,s=e.getStyles,i=e.getClassNames,l=e.className;return{css:s(o,e),className:r(n??{},i(o,e),l)}};function yu(t){return[document.documentElement,document.body,window].indexOf(t)>-1}function jj(t){return yu(t)?window.innerHeight:t.clientHeight}function bI(t){return yu(t)?window.pageYOffset:t.scrollTop}function cp(t,e){if(yu(t)){window.scrollTo(0,e);return}t.scrollTop=e}function Bj(t){var e=getComputedStyle(t),o=e.position==="absolute",n=/(auto|scroll)/;if(e.position==="fixed")return document.documentElement;for(var r=t;r=r.parentElement;)if(e=getComputedStyle(r),!(o&&e.position==="static")&&n.test(e.overflow+e.overflowY+e.overflowX))return r;return document.documentElement}function Mj(t,e,o,n){return o*((t=t/n-1)*t*t+1)+e}function ip(t,e){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:vu,r=bI(t),s=e-r,i=10,l=0;function a(){l+=i;var c=Mj(l,r,s,o);cp(t,c),l<o?window.requestAnimationFrame(a):n(t)}a()}function U1(t,e){var o=t.getBoundingClientRect(),n=e.getBoundingClientRect(),r=e.offsetHeight/3;n.bottom+r>o.bottom?cp(t,Math.min(e.offsetTop+e.clientHeight-t.offsetHeight+r,t.scrollHeight)):n.top-r<o.top&&cp(t,Math.max(e.offsetTop-r,0))}function Oj(t){var e=t.getBoundingClientRect();return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width}}function X1(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function vI(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var yI=!1,Vj={get passive(){return yI=!0}},ap=typeof window<"u"?window:{};ap.addEventListener&&ap.removeEventListener&&(ap.addEventListener("p",vu,Vj),ap.removeEventListener("p",vu,!1));var CI=yI;function xI(t){return t!=null}function Gj(t){return Array.isArray(t)}function Ji(t,e,o){return t?e:o}var wI=function(e){for(var o=arguments.length,n=new Array(o>1?o-1:0),r=1;r<o;r++)n[r-1]=arguments[r];var s=Object.entries(e).filter(function(i){var l=mn(i,1),a=l[0];return!n.includes(a)});return s.reduce(function(i,l){var a=mn(l,2),c=a[0],u=a[1];return i[c]=u,i},{})},zj=["children","innerProps"],Wj=["children","innerProps"];function Hj(t){var e=t.maxHeight,o=t.menuEl,n=t.minHeight,r=t.placement,s=t.shouldScroll,i=t.isFixedPosition,l=t.controlHeight,a=Bj(o),c={placement:"bottom",maxHeight:e};if(!o||!o.offsetParent)return c;var u=a.getBoundingClientRect(),d=u.height,f=o.getBoundingClientRect(),m=f.bottom,p=f.height,h=f.top,g=o.offsetParent.getBoundingClientRect(),b=g.top,C=i?window.innerHeight:jj(a),v=bI(a),y=parseInt(getComputedStyle(o).marginBottom,10),x=parseInt(getComputedStyle(o).marginTop,10),S=b-x,w=C-h,T=S+v,I=d-v-h,R=m-C+v+y,D=v+h-x,_=160;switch(r){case"auto":case"bottom":if(w>=p)return{placement:"bottom",maxHeight:e};if(I>=p&&!i)return s&&ip(a,R,_),{placement:"bottom",maxHeight:e};if(!i&&I>=n||i&&w>=n){s&&ip(a,R,_);var F=i?w-y:I-y;return{placement:"bottom",maxHeight:F}}if(r==="auto"||i){var A=e,$=i?S:T;return $>=n&&(A=Math.min($-y-l,e)),{placement:"top",maxHeight:A}}if(r==="bottom")return s&&cp(a,R),{placement:"bottom",maxHeight:e};break;case"top":if(S>=p)return{placement:"top",maxHeight:e};if(T>=p&&!i)return s&&ip(a,D,_),{placement:"top",maxHeight:e};if(!i&&T>=n||i&&S>=n){var P=e;return(!i&&T>=n||i&&S>=n)&&(P=i?S-x:T-x),s&&ip(a,D,_),{placement:"top",maxHeight:P}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(r,'".'))}return c}function Uj(t){var e={bottom:"top",top:"bottom"};return t?e[t]:"bottom"}var SI=function(e){return e==="auto"?"bottom":e},II=function(e,o){var n,r=e.placement,s=e.theme,i=s.borderRadius,l=s.spacing,a=s.colors;return je((n={label:"menu"},Xi(n,Uj(r),"100%"),Xi(n,"position","absolute"),Xi(n,"width","100%"),Xi(n,"zIndex",1),n),o?{}:{backgroundColor:a.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:l.menuGutter,marginTop:l.menuGutter})},_I=Nj(null),TI=function(e){var o=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,s=e.menuPlacement,i=e.menuPosition,l=e.menuShouldScrollIntoView,a=e.theme,c=Pj(_I)||{},u=c.setPortalPlacement,d=H1(null),f=lp(r),m=mn(f,2),p=m[0],h=m[1],g=lp(null),b=mn(g,2),C=b[0],v=b[1],y=a.spacing.controlHeight;return sp(function(){var x=d.current;if(x){var S=i==="fixed",w=l&&!S,T=Hj({maxHeight:r,menuEl:x,minHeight:n,placement:s,shouldScroll:w,isFixedPosition:S,controlHeight:y});h(T.maxHeight),v(T.placement),u?.(T.placement)}},[r,s,i,l,n,u,y]),o({ref:d,placerProps:je(je({},e),{},{placement:C||SI(s),maxHeight:p})})},Xj=function(e){var o=e.children,n=e.innerRef,r=e.innerProps;return Be("div",ke({},Xt(e,"menu",{menu:!0}),{ref:n},r),o)},Zj=Xj,FI=function(e,o){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return je({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},o?{}:{paddingBottom:r,paddingTop:r})},Yj=function(e){var o=e.children,n=e.innerProps,r=e.innerRef,s=e.isMulti;return Be("div",ke({},Xt(e,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:r},n),o)},DI=function(e,o){var n=e.theme,r=n.spacing.baseUnit,s=n.colors;return je({textAlign:"center"},o?{}:{color:s.neutral40,padding:"".concat(r*2,"px ").concat(r*3,"px")})},RI=DI,AI=DI,Jj=function(e){var o=e.children,n=o===void 0?"No options":o,r=e.innerProps,s=ir(e,zj);return Be("div",ke({},Xt(je(je({},s),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},qj=function(e){var o=e.children,n=o===void 0?"Loading...":o,r=e.innerProps,s=ir(e,Wj);return Be("div",ke({},Xt(je(je({},s),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},PI=function(e){var o=e.rect,n=e.offset,r=e.position;return{left:o.left,position:r,top:n,width:o.width,zIndex:1}},Qj=function(e){var o=e.appendTo,n=e.children,r=e.controlElement,s=e.innerProps,i=e.menuPlacement,l=e.menuPosition,a=H1(null),c=H1(null),u=lp(SI(i)),d=mn(u,2),f=d[0],m=d[1],p=Ej(function(){return{setPortalPlacement:m}},[]),h=lp(null),g=mn(h,2),b=g[0],C=g[1],v=z1(function(){if(r){var w=Oj(r),T=l==="fixed"?0:window.pageYOffset,I=w[f]+T;(I!==b?.offset||w.left!==b?.rect.left||w.width!==b?.rect.width)&&C({offset:I,rect:w})}},[r,l,f,b?.offset,b?.rect.left,b?.rect.width]);sp(function(){v()},[v]);var y=z1(function(){typeof c.current=="function"&&(c.current(),c.current=null),r&&a.current&&(c.current=Fx(r,a.current,v,{elementResize:"ResizeObserver"in window}))},[r,v]);sp(function(){y()},[y]);var x=z1(function(w){a.current=w,y()},[y]);if(!o&&l!=="fixed"||!b)return null;var S=Be("div",ke({ref:x},Xt(je(je({},e),{},{offset:b.offset,position:l,rect:b.rect}),"menuPortal",{"menu-portal":!0}),s),n);return Be(_I.Provider,{value:p},o?Lj(S,o):S)},EI=function(e){var o=e.isDisabled,n=e.isRtl;return{label:"container",direction:n?"rtl":void 0,pointerEvents:o?"none":void 0,position:"relative"}},Kj=function(e){var o=e.children,n=e.innerProps,r=e.isDisabled,s=e.isRtl;return Be("div",ke({},Xt(e,"container",{"--is-disabled":r,"--is-rtl":s}),n),o)},NI=function(e,o){var n=e.theme.spacing,r=e.isMulti,s=e.hasValue,i=e.selectProps.controlShouldRenderValue;return je({alignItems:"center",display:r&&s&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},o?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(n.baseUnit*2,"px")})},eB=function(e){var o=e.children,n=e.innerProps,r=e.isMulti,s=e.hasValue;return Be("div",ke({},Xt(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":s}),n),o)},LI=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},tB=function(e){var o=e.children,n=e.innerProps;return Be("div",ke({},Xt(e,"indicatorsContainer",{indicators:!0}),n),o)},pI,oB=["size"],rB=["innerProps","isRtl","size"];var nB={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},$I=function(e){var o=e.size,n=ir(e,oB);return Be("svg",ke({height:o,width:o,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:nB},n))},Z1=function(e){return Be($I,ke({size:20},e),Be("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},kI=function(e){return Be($I,ke({size:20},e),Be("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},jI=function(e,o){var n=e.isFocused,r=e.theme,s=r.spacing.baseUnit,i=r.colors;return je({label:"indicatorContainer",display:"flex",transition:"color 150ms"},o?{}:{color:n?i.neutral60:i.neutral20,padding:s*2,":hover":{color:n?i.neutral80:i.neutral40}})},BI=jI,sB=function(e){var o=e.children,n=e.innerProps;return Be("div",ke({},Xt(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),o||Be(kI,null))},MI=jI,iB=function(e){var o=e.children,n=e.innerProps;return Be("div",ke({},Xt(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),o||Be(Z1,null))},OI=function(e,o){var n=e.isDisabled,r=e.theme,s=r.spacing.baseUnit,i=r.colors;return je({label:"indicatorSeparator",alignSelf:"stretch",width:1},o?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:s*2,marginTop:s*2})},aB=function(e){var o=e.innerProps;return Be("span",ke({},o,Xt(e,"indicatorSeparator",{"indicator-separator":!0})))},lB=mI(pI||(pI=fI([`
51
51
  0%, 80%, 100% { opacity: 0; }