import{J as r,y as b,a as m,j as h,_ as p,l as d,A as I,aI as A}from"./main-tangy-colts-beg.js";import{T as C}from"./index-tangy-colts-beg-827.js";const l=t=>{let e;const s=new Set,a=(n,u)=>{const o=typeof n=="function"?n(e):n;if(!Object.is(o,e)){const f=e;e=u??(typeof o!="object"||o===null)?o:Object.assign({},e,o),s.forEach(j=>j(e,f))}},c=()=>e,i={setState:a,getState:c,getInitialState:()=>S,subscribe:n=>(s.add(n),()=>s.delete(n))},S=e=t(a,c,i);return i},T=(t=>t?l(t):l),_=t=>t;function P(t,e=_){const s=r.useSyncExternalStore(t.subscribe,r.useCallback(()=>e(t.getState()),[t,e]),r.useCallback(()=>e(t.getInitialState()),[t,e]));return r.useDebugValue(s),s}const g=t=>{const e=T(t),s=a=>P(e,a);return Object.assign(s,e),s},E=(t=>t?g(t):g);globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(t,e){return this.cache.has(t)?this.cache.get(t):(this.cache.set(t,e),e)}};function R({className:t}){if(!b.IS_PRO)return m(C,{className:d(["mr-0",t]),color:"orange",children:[h(I,{children:h(A,{className:"mr-1"})}),p("Pro")]})}globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(t,e){return this.cache.has(t)?this.cache.get(t):(this.cache.set(t,e),e)}};function U(t){const{AJAX_URL:e,NONCE:s,ROUTE_PREFIX:a}=b,c=new URL(e);return c.searchParams.append("action",`${a}${t}`),c.searchParams.append("_ajax_nonce",s),c.toString()}export{R as P,E as c,U as g};
