@inploi/plugin-job-search 9.1.0 → 9.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/index.js +5 -5
- package/cdn/style.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/{job-search-CI9kMPab.js → job-search-B1b-rnEA.js} +5 -5
- package/dist/{job-search-NaGE4ixy.cjs → job-search-C3GQfRuS.cjs} +1 -1
- package/dist/{map-Cg3MSVPB.js → map-B07rie_d.js} +2 -2
- package/dist/{map-sXHS6vhg.cjs → map-f6ktiM4h.cjs} +1 -1
- package/dist/{mapbox-gl-B4QioMNv.js → mapbox-gl-CWJ5zGOw.js} +1 -1
- package/dist/{mapbox-gl-DP29e0dp.cjs → mapbox-gl-DaVFW41r.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/package.json +3 -3
|
@@ -41,4 +41,4 @@ ${n.concat(n).join(`
|
|
|
41
41
|
`)},sa=function(){var e=parseInt(document.body.getAttribute(Rt)||"0",10);return isFinite(e)?e:0},of=function(){j(function(){return document.body.setAttribute(Rt,(sa()+1).toString()),function(){var e=sa()-1;e<=0?document.body.removeAttribute(Rt):document.body.setAttribute(Rt,e.toString())}},[])},af=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;of();var i=J(function(){return tf(o)},[o]);return k(nf,{styles:rf(i,!t,o,n?"":"!important")})},yo=!1;if(typeof window<"u")try{var An=Object.defineProperty({},"passive",{get:function(){return yo=!0,!0}});window.addEventListener("test",An,An),window.removeEventListener("test",An,An)}catch{yo=!1}var $t=yo?{passive:!1}:!1,sf=function(e){return e.tagName==="TEXTAREA"},dc=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!sf(e)&&n[t]==="visible")},cf=function(e){return dc(e,"overflowY")},lf=function(e){return dc(e,"overflowX")},ca=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=fc(e,n);if(r){var o=pc(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},uf=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},df=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},fc=function(e,t){return e==="v"?cf(t):lf(t)},pc=function(e,t){return e==="v"?uf(t):df(t)},ff=function(e,t){return e==="h"&&t==="rtl"?-1:1},pf=function(e,t,n,r,o){var i=ff(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,c=t.contains(s),d=!1,f=a>0,l=0,h=0;do{var p=pc(e,s),g=p[0],v=p[1],y=p[2],m=v-y-i*g;(g||m)&&fc(e,s)&&(l+=m,h+=g),s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(f&&l===0||!f&&h===0)&&(d=!0),d},Tn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},la=function(e){return[e.deltaX,e.deltaY]},ua=function(e){return e&&"current"in e?e.current:e},hf=function(e,t){return e[0]===t[0]&&e[1]===t[1]},vf=function(e){return`
|
|
42
42
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
43
43
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
44
|
-
`)},gf=0,St=[];function mf(e){var t=R([]),n=R([0,0]),r=R(),o=D(gf++)[0],i=D(function(){return uc()})[0],a=R(e);j(function(){a.current=e},[e]),j(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=Nd([e.lockRef.current],(e.shards||[]).map(ua),!0).filter(Boolean);return v.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=H(function(v,y){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var m=Tn(v),_=n.current,b="deltaX"in v?v.deltaX:_[0]-m[0],w="deltaY"in v?v.deltaY:_[1]-m[1],$,x=v.target,C=Math.abs(b)>Math.abs(w)?"h":"v";if("touches"in v&&C==="h"&&x.type==="range")return!1;var S=ca(C,x);if(!S)return!0;if(S?$=C:($=C==="v"?"h":"v",S=ca(C,x)),!S)return!1;if(!r.current&&"changedTouches"in v&&(b||w)&&(r.current=$),!$)return!0;var E=r.current||$;return pf(E,y,v,E==="h"?b:w)},[]),c=H(function(v){var y=v;if(!(!St.length||St[St.length-1]!==i)){var m="deltaY"in y?la(y):Tn(y),_=t.current.filter(function($){return $.name===y.type&&$.target===y.target&&hf($.delta,m)})[0];if(_&&_.should){y.cancelable&&y.preventDefault();return}if(!_){var b=(a.current.shards||[]).map(ua).filter(Boolean).filter(function($){return $.contains(y.target)}),w=b.length>0?s(y,b[0]):!a.current.noIsolation;w&&y.cancelable&&y.preventDefault()}}},[]),d=H(function(v,y,m,_){var b={name:v,delta:y,target:m,should:_};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(w){return w!==b})},1)},[]),f=H(function(v){n.current=Tn(v),r.current=void 0},[]),l=H(function(v){d(v.type,la(v),v.target,s(v,e.lockRef.current))},[]),h=H(function(v){d(v.type,Tn(v),v.target,s(v,e.lockRef.current))},[]);j(function(){return St.push(i),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:h}),document.addEventListener("wheel",c,$t),document.addEventListener("touchmove",c,$t),document.addEventListener("touchstart",f,$t),function(){St=St.filter(function(v){return v!==i}),document.removeEventListener("wheel",c,$t),document.removeEventListener("touchmove",c,$t),document.removeEventListener("touchstart",f,$t)}},[]);var p=e.removeScrollBar,g=e.inert;return k(V,null,g?k(i,{styles:vf(o)}):null,p?k(af,{gapMode:"margin"}):null)}const _f=Bd(lc,mf);var Zo=te(function(e,t){return k(lr,Le({},e,{ref:t,sideCar:_f}))});Zo.classNames=lr.classNames;var yf=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ct=new WeakMap,Pn=new WeakMap,Rn={},zr=0,hc=function(e){return e&&(e.host||hc(e.parentNode))},bf=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=hc(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},wf=function(e,t,n,r){var o=bf(t,Array.isArray(e)?e:[e]);Rn[n]||(Rn[n]=new WeakMap);var i=Rn[n],a=[],s=new Set,c=new Set(o),d=function(l){!l||s.has(l)||(s.add(l),d(l.parentNode))};o.forEach(d);var f=function(l){!l||c.has(l)||Array.prototype.forEach.call(l.children,function(h){if(s.has(h))f(h);else try{var p=h.getAttribute(r),g=p!==null&&p!=="false",v=(Ct.get(h)||0)+1,y=(i.get(h)||0)+1;Ct.set(h,v),i.set(h,y),a.push(h),v===1&&g&&Pn.set(h,!0),y===1&&h.setAttribute(n,"true"),g||h.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",h,m)}})};return f(t),s.clear(),zr++,function(){a.forEach(function(l){var h=Ct.get(l)-1,p=i.get(l)-1;Ct.set(l,h),i.set(l,p),h||(Pn.has(l)||l.removeAttribute(r),Pn.delete(l)),p||l.removeAttribute(n)}),zr--,zr||(Ct=new WeakMap,Ct=new WeakMap,Pn=new WeakMap,Rn={})}},vc=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=yf(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),wf(r,o,n,"aria-hidden")):function(){return null}};const gc="Dialog",[mc]=Yo(gc),[xf,ht]=mc(gc),$f=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=R(null),c=R(null),[d=!1,f]=ec({prop:r,defaultProp:o,onChange:i});return k(xf,{scope:t,triggerRef:s,contentRef:c,contentId:Nn(),titleId:Nn(),descriptionId:Nn(),open:d,onOpenChange:f,onOpenToggle:H(()=>f(l=>!l),[f]),modal:a},n)},Sf="DialogTrigger",Cf=te((e,t)=>{const{__scopeDialog:n,...r}=e,o=ht(Sf,n),i=Fe(t,o.triggerRef);return k(pt.button,ee({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Xo(o.open)},r,{ref:i,onClick:Oe(e.onClick,o.onOpenToggle)}))}),_c="DialogPortal",[Ef,yc]=mc(_c,{forceMount:void 0}),Of=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=ht(_c,t);return k(Ef,{scope:t,forceMount:n},Ne.map(r,a=>k(qt,{present:n||i.open},k(ic,{asChild:!0,container:o},a))))},bo="DialogOverlay",kf=te((e,t)=>{const n=yc(bo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=ht(bo,e.__scopeDialog);return i.modal?k(qt,{present:r||i.open},k(Af,ee({},o,{ref:t}))):null}),Af=te((e,t)=>{const{__scopeDialog:n,...r}=e,o=ht(bo,n);return k(Zo,{as:cr,allowPinchZoom:!0,shards:[o.contentRef]},k(pt.div,ee({"data-state":Xo(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Ht="DialogContent",Tf=te((e,t)=>{const n=yc(Ht,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=ht(Ht,e.__scopeDialog);return k(qt,{present:r||i.open},i.modal?k(Pf,ee({},o,{ref:t})):k(Rf,ee({},o,{ref:t})))}),Pf=te((e,t)=>{const n=ht(Ht,e.__scopeDialog),r=R(null),o=Fe(t,n.contentRef,r);return j(()=>{const i=r.current;if(i)return vc(i)},[]),k(bc,ee({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oe(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Oe(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Oe(e.onFocusOutside,i=>i.preventDefault())}))}),Rf=te((e,t)=>{const n=ht(Ht,e.__scopeDialog),r=R(!1),o=R(!1);return k(bc,ee({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;!((s=n.triggerRef.current)===null||s===void 0)&&s.contains(c)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),bc=te((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=ht(Ht,n),c=R(null),d=Fe(t,c);return ac(),k(V,null,k(rc,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},k(tc,ee({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Xo(s.open)},a,{ref:d,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),Df="DialogTitle";function Xo(e){return e?"open":"closed"}const Lf="DialogTitleWarning";pd(Lf,{contentName:Ht,titleName:Df,docsSlug:"dialog"});const If=$f,Mf=Cf,Nf=Of,jf=kf,Ff=Tf,Vf=["top","right","bottom","left"],dt=Math.min,pe=Math.max,Xn=Math.round,Dn=Math.floor,je=e=>({x:e,y:e}),Hf={left:"right",right:"left",bottom:"top",top:"bottom"};function wo(e,t,n){return pe(e,dt(t,n))}function rt(e,t){return typeof e=="function"?e(t):e}function ot(e){return e.split("-")[0]}function Bt(e){return e.split("-")[1]}function Qo(e){return e==="x"?"y":"x"}function ei(e){return e==="y"?"height":"width"}function Me(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function ti(e){return Qo(Me(e))}function Uf(e,t,n){n===void 0&&(n=!1);const r=Bt(e),o=ti(e),i=ei(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Qn(a)),[a,Qn(a)]}function Wf(e){const t=Qn(e);return[xo(e),t,xo(t)]}function xo(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const da=["left","right"],fa=["right","left"],zf=["top","bottom"],qf=["bottom","top"];function Bf(e,t,n){switch(e){case"top":case"bottom":return n?t?fa:da:t?da:fa;case"left":case"right":return t?zf:qf;default:return[]}}function Kf(e,t,n,r){const o=Bt(e);let i=Bf(ot(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(xo)))),i}function Qn(e){const t=ot(e);return Hf[t]+e.slice(t.length)}function Gf(e){return{top:0,right:0,bottom:0,left:0,...e}}function wc(e){return typeof e!="number"?Gf(e):{top:e,right:e,bottom:e,left:e}}function er(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function pa(e,t,n){let{reference:r,floating:o}=e;const i=Me(t),a=ti(t),s=ei(a),c=ot(t),d=i==="y",f=r.x+r.width/2-o.width/2,l=r.y+r.height/2-o.height/2,h=r[s]/2-o[s]/2;let p;switch(c){case"top":p={x:f,y:r.y-o.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:l};break;case"left":p={x:r.x-o.width,y:l};break;default:p={x:r.x,y:r.y}}switch(Bt(t)){case"start":p[a]-=h*(n&&d?-1:1);break;case"end":p[a]+=h*(n&&d?-1:1);break}return p}async function Jf(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:l="floating",altBoundary:h=!1,padding:p=0}=rt(t,e),g=wc(p),y=s[h?l==="floating"?"reference":"floating":l],m=er(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:d,rootBoundary:f,strategy:c})),_=l==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),w=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},$=er(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:_,offsetParent:b,strategy:c}):_);return{top:(m.top-$.top+g.top)/w.y,bottom:($.bottom-m.bottom+g.bottom)/w.y,left:(m.left-$.left+g.left)/w.x,right:($.right-m.right+g.right)/w.x}}const Yf=50,Zf=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:Jf},c=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:l}=pa(d,r,c),h=r,p=0;const g={};for(let v=0;v<i.length;v++){const y=i[v];if(!y)continue;const{name:m,fn:_}=y,{x:b,y:w,data:$,reset:x}=await _({x:f,y:l,initialPlacement:r,placement:h,strategy:o,middlewareData:g,rects:d,platform:s,elements:{reference:e,floating:t}});f=b??f,l=w??l,g[m]={...g[m],...$},x&&p<Yf&&(p++,typeof x=="object"&&(x.placement&&(h=x.placement),x.rects&&(d=x.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:f,y:l}=pa(d,h,c)),v=-1)}return{x:f,y:l,placement:h,strategy:o,middlewareData:g}},Xf=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:c}=t,{element:d,padding:f=0}=rt(e,t)||{};if(d==null)return{};const l=wc(f),h={x:n,y:r},p=ti(o),g=ei(p),v=await a.getDimensions(d),y=p==="y",m=y?"top":"left",_=y?"bottom":"right",b=y?"clientHeight":"clientWidth",w=i.reference[g]+i.reference[p]-h[p]-i.floating[g],$=h[p]-i.reference[p],x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let C=x?x[b]:0;(!C||!await(a.isElement==null?void 0:a.isElement(x)))&&(C=s.floating[b]||i.floating[g]);const S=w/2-$/2,E=C/2-v[g]/2-1,A=dt(l[m],E),I=dt(l[_],E),P=A,M=C-v[g]-I,L=C/2-v[g]/2+S,z=wo(P,L,M),B=!c.arrow&&Bt(o)!=null&&L!==z&&i.reference[g]/2-(L<P?A:I)-v[g]/2<0,N=B?L<P?L-P:L-M:0;return{[p]:h[p]+N,data:{[p]:z,centerOffset:L-z-N,...B&&{alignmentOffset:N}},reset:B}}}),Qf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:d}=t,{mainAxis:f=!0,crossAxis:l=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...y}=rt(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const m=ot(o),_=Me(s),b=ot(s)===s,w=await(c.isRTL==null?void 0:c.isRTL(d.floating)),$=h||(b||!v?[Qn(s)]:Wf(s)),x=g!=="none";!h&&x&&$.push(...Kf(s,v,g,w));const C=[s,...$],S=await c.detectOverflow(t,y),E=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&E.push(S[m]),l){const L=Uf(o,a,w);E.push(S[L[0]],S[L[1]])}if(A=[...A,{placement:o,overflows:E}],!E.every(L=>L<=0)){var I,P;const L=(((I=i.flip)==null?void 0:I.index)||0)+1,z=C[L];if(z&&(!(l==="alignment"?_!==Me(z):!1)||A.every(K=>Me(K.placement)===_?K.overflows[0]>0:!0)))return{data:{index:L,overflows:A},reset:{placement:z}};let B=(P=A.filter(N=>N.overflows[0]<=0).sort((N,K)=>N.overflows[1]-K.overflows[1])[0])==null?void 0:P.placement;if(!B)switch(p){case"bestFit":{var M;const N=(M=A.filter(K=>{if(x){const q=Me(K.placement);return q===_||q==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(q=>q>0).reduce((q,le)=>q+le,0)]).sort((K,q)=>K[1]-q[1])[0])==null?void 0:M[0];N&&(B=N);break}case"initialPlacement":B=s;break}if(o!==B)return{reset:{placement:B}}}return{}}}};function ha(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function va(e){return Vf.some(t=>e[t]>=0)}const ep=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=rt(e,t);switch(o){case"referenceHidden":{const a=await r.detectOverflow(t,{...i,elementContext:"reference"}),s=ha(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:va(s)}}}case"escaped":{const a=await r.detectOverflow(t,{...i,altBoundary:!0}),s=ha(a,n.floating);return{data:{escapedOffsets:s,escaped:va(s)}}}default:return{}}}}},xc=new Set(["left","top"]);async function tp(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=ot(n),s=Bt(n),c=Me(n)==="y",d=xc.has(a)?-1:1,f=i&&c?-1:1,l=rt(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:g}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return s&&typeof g=="number"&&(p=s==="end"?g*-1:g),c?{x:p*f,y:h*d}:{x:h*d,y:p*f}}const np=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,c=await tp(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:a}}}}},rp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:m=>{let{x:_,y:b}=m;return{x:_,y:b}}},...d}=rt(e,t),f={x:n,y:r},l=await i.detectOverflow(t,d),h=Me(ot(o)),p=Qo(h);let g=f[p],v=f[h];if(a){const m=p==="y"?"top":"left",_=p==="y"?"bottom":"right",b=g+l[m],w=g-l[_];g=wo(b,g,w)}if(s){const m=h==="y"?"top":"left",_=h==="y"?"bottom":"right",b=v+l[m],w=v-l[_];v=wo(b,v,w)}const y=c.fn({...t,[p]:g,[h]:v});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[p]:a,[h]:s}}}}}},op=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:c=!0,crossAxis:d=!0}=rt(e,t),f={x:n,y:r},l=Me(o),h=Qo(l);let p=f[h],g=f[l];const v=rt(s,t),y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const b=h==="y"?"height":"width",w=i.reference[h]-i.floating[b]+y.mainAxis,$=i.reference[h]+i.reference[b]-y.mainAxis;p<w?p=w:p>$&&(p=$)}if(d){var m,_;const b=h==="y"?"width":"height",w=xc.has(ot(o)),$=i.reference[l]-i.floating[b]+(w&&((m=a.offset)==null?void 0:m[l])||0)+(w?0:y.crossAxis),x=i.reference[l]+i.reference[b]+(w?0:((_=a.offset)==null?void 0:_[l])||0)-(w?y.crossAxis:0);g<$?g=$:g>x&&(g=x)}return{[h]:p,[l]:g}}}},ip=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:c=()=>{},...d}=rt(e,t),f=await a.detectOverflow(t,d),l=ot(o),h=Bt(o),p=Me(o)==="y",{width:g,height:v}=i.floating;let y,m;l==="top"||l==="bottom"?(y=l,m=h===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(m=l,y=h==="end"?"top":"bottom");const _=v-f.top-f.bottom,b=g-f.left-f.right,w=dt(v-f[y],_),$=dt(g-f[m],b),x=!t.middlewareData.shift;let C=w,S=$;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=_),x&&!h){const A=pe(f.left,0),I=pe(f.right,0),P=pe(f.top,0),M=pe(f.bottom,0);p?S=g-2*(A!==0||I!==0?A+I:pe(f.left,f.right)):C=v-2*(P!==0||M!==0?P+M:pe(f.top,f.bottom))}await c({...t,availableWidth:S,availableHeight:C});const E=await a.getDimensions(s.floating);return g!==E.width||v!==E.height?{reset:{rects:!0}}:{}}}};function ur(){return typeof window<"u"}function Kt(e){return $c(e)?(e.nodeName||"").toLowerCase():"#document"}function he(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ve(e){var t;return(t=($c(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $c(e){return ur()?e instanceof Node||e instanceof he(e).Node:!1}function ke(e){return ur()?e instanceof Element||e instanceof he(e).Element:!1}function it(e){return ur()?e instanceof HTMLElement||e instanceof he(e).HTMLElement:!1}function ga(e){return!ur()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof he(e).ShadowRoot}function _n(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ae(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function ap(e){return/^(table|td|th)$/.test(Kt(e))}function dr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const sp=/transform|translate|scale|rotate|perspective|filter/,cp=/paint|layout|strict|content/,gt=e=>!!e&&e!=="none";let qr;function ni(e){const t=ke(e)?Ae(e):e;return gt(t.transform)||gt(t.translate)||gt(t.scale)||gt(t.rotate)||gt(t.perspective)||!ri()&&(gt(t.backdropFilter)||gt(t.filter))||sp.test(t.willChange||"")||cp.test(t.contain||"")}function lp(e){let t=ft(e);for(;it(t)&&!Ut(t);){if(ni(t))return t;if(dr(t))return null;t=ft(t)}return null}function ri(){return qr==null&&(qr=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),qr}function Ut(e){return/^(html|body|#document)$/.test(Kt(e))}function Ae(e){return he(e).getComputedStyle(e)}function fr(e){return ke(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ft(e){if(Kt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ga(e)&&e.host||Ve(e);return ga(t)?t.host:t}function Sc(e){const t=ft(e);return Ut(t)?e.ownerDocument?e.ownerDocument.body:e.body:it(t)&&_n(t)?t:Sc(t)}function an(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Sc(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=he(o);if(i){const s=$o(a);return t.concat(a,a.visualViewport||[],_n(o)?o:[],s&&n?an(s):[])}else return t.concat(o,an(o,[],n))}function $o(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Cc(e){const t=Ae(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=it(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Xn(n)!==i||Xn(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function oi(e){return ke(e)?e:e.contextElement}function Dt(e){const t=oi(e);if(!it(t))return je(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Cc(t);let a=(i?Xn(n.width):n.width)/r,s=(i?Xn(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const up=je(0);function Ec(e){const t=he(e);return!ri()||!t.visualViewport?up:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dp(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==he(e)?!1:t}function yt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=oi(e);let a=je(1);t&&(r?ke(r)&&(a=Dt(r)):a=Dt(e));const s=dp(i,n,r)?Ec(i):je(0);let c=(o.left+s.x)/a.x,d=(o.top+s.y)/a.y,f=o.width/a.x,l=o.height/a.y;if(i){const h=he(i),p=r&&ke(r)?he(r):r;let g=h,v=$o(g);for(;v&&r&&p!==g;){const y=Dt(v),m=v.getBoundingClientRect(),_=Ae(v),b=m.left+(v.clientLeft+parseFloat(_.paddingLeft))*y.x,w=m.top+(v.clientTop+parseFloat(_.paddingTop))*y.y;c*=y.x,d*=y.y,f*=y.x,l*=y.y,c+=b,d+=w,g=he(v),v=$o(g)}}return er({width:f,height:l,x:c,y:d})}function pr(e,t){const n=fr(e).scrollLeft;return t?t.left+n:yt(Ve(e)).left+n}function Oc(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-pr(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function fp(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Ve(r),s=t?dr(t.floating):!1;if(r===a||s&&i)return n;let c={scrollLeft:0,scrollTop:0},d=je(1);const f=je(0),l=it(r);if((l||!l&&!i)&&((Kt(r)!=="body"||_n(a))&&(c=fr(r)),l)){const p=yt(r);d=Dt(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}const h=a&&!l&&!i?Oc(a,c):je(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+f.x+h.x,y:n.y*d.y-c.scrollTop*d.y+f.y+h.y}}function pp(e){return Array.from(e.getClientRects())}function hp(e){const t=Ve(e),n=fr(e),r=e.ownerDocument.body,o=pe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=pe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+pr(e);const s=-n.scrollTop;return Ae(r).direction==="rtl"&&(a+=pe(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}const ma=25;function vp(e,t){const n=he(e),r=Ve(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const f=ri();(!f||f&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}const d=pr(r);if(d<=0){const f=r.ownerDocument,l=f.body,h=getComputedStyle(l),p=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(r.clientWidth-l.clientWidth-p);g<=ma&&(i-=g)}else d<=ma&&(i+=d);return{width:i,height:a,x:s,y:c}}function gp(e,t){const n=yt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=it(e)?Dt(e):je(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,d=r*i.y;return{width:a,height:s,x:c,y:d}}function _a(e,t,n){let r;if(t==="viewport")r=vp(e,n);else if(t==="document")r=hp(Ve(e));else if(ke(t))r=gp(t,n);else{const o=Ec(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return er(r)}function kc(e,t){const n=ft(e);return n===t||!ke(n)||Ut(n)?!1:Ae(n).position==="fixed"||kc(n,t)}function mp(e,t){const n=t.get(e);if(n)return n;let r=an(e,[],!1).filter(s=>ke(s)&&Kt(s)!=="body"),o=null;const i=Ae(e).position==="fixed";let a=i?ft(e):e;for(;ke(a)&&!Ut(a);){const s=Ae(a),c=ni(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||_n(a)&&!c&&kc(e,a))?r=r.filter(f=>f!==a):o=s,a=ft(a)}return t.set(e,r),r}function _p(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?dr(t)?[]:mp(t,this._c):[].concat(n),r],s=_a(t,a[0],o);let c=s.top,d=s.right,f=s.bottom,l=s.left;for(let h=1;h<a.length;h++){const p=_a(t,a[h],o);c=pe(p.top,c),d=dt(p.right,d),f=dt(p.bottom,f),l=pe(p.left,l)}return{width:d-l,height:f-c,x:l,y:c}}function yp(e){const{width:t,height:n}=Cc(e);return{width:t,height:n}}function bp(e,t,n){const r=it(t),o=Ve(t),i=n==="fixed",a=yt(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=je(0);function d(){c.x=pr(o)}if(r||!r&&!i)if((Kt(t)!=="body"||_n(o))&&(s=fr(t)),r){const p=yt(t,!0,i,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else o&&d();i&&!r&&o&&d();const f=o&&!r&&!i?Oc(o,s):je(0),l=a.left+s.scrollLeft-c.x-f.x,h=a.top+s.scrollTop-c.y-f.y;return{x:l,y:h,width:a.width,height:a.height}}function Br(e){return Ae(e).position==="static"}function ya(e,t){if(!it(e)||Ae(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ve(e)===n&&(n=n.ownerDocument.body),n}function Ac(e,t){const n=he(e);if(dr(e))return n;if(!it(e)){let o=ft(e);for(;o&&!Ut(o);){if(ke(o)&&!Br(o))return o;o=ft(o)}return n}let r=ya(e,t);for(;r&&ap(r)&&Br(r);)r=ya(r,t);return r&&Ut(r)&&Br(r)&&!ni(r)?n:r||lp(e)||n}const wp=async function(e){const t=this.getOffsetParent||Ac,n=this.getDimensions,r=await n(e.floating);return{reference:bp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function xp(e){return Ae(e).direction==="rtl"}const $p={convertOffsetParentRelativeRectToViewportRelativeRect:fp,getDocumentElement:Ve,getClippingRect:_p,getOffsetParent:Ac,getElementRects:wp,getClientRects:pp,getDimensions:yp,getScale:Dt,isElement:ke,isRTL:xp};function Tc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Sp(e,t){let n=null,r;const o=Ve(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const d=e.getBoundingClientRect(),{left:f,top:l,width:h,height:p}=d;if(s||t(),!h||!p)return;const g=Dn(l),v=Dn(o.clientWidth-(f+h)),y=Dn(o.clientHeight-(l+p)),m=Dn(f),b={rootMargin:-g+"px "+-v+"px "+-y+"px "+-m+"px",threshold:pe(0,dt(1,c))||1};let w=!0;function $(x){const C=x[0].intersectionRatio;if(C!==c){if(!w)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},1e3)}C===1&&!Tc(d,e.getBoundingClientRect())&&a(),w=!1}try{n=new IntersectionObserver($,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver($,b)}n.observe(e)}return a(!0),i}function Cp(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=oi(e),f=o||i?[...d?an(d):[],...t?an(t):[]]:[];f.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),i&&m.addEventListener("resize",n)});const l=d&&s?Sp(d,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(m=>{let[_]=m;_&&_.target===d&&p&&t&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),d&&!c&&p.observe(d),t&&p.observe(t));let g,v=c?yt(e):null;c&&y();function y(){const m=yt(e);v&&!Tc(v,m)&&n(),v=m,g=requestAnimationFrame(y)}return n(),()=>{var m;f.forEach(_=>{o&&_.removeEventListener("scroll",n),i&&_.removeEventListener("resize",n)}),l==null||l(),(m=p)==null||m.disconnect(),p=null,c&&cancelAnimationFrame(g)}}const Ep=np,Op=rp,kp=Qf,Ap=ip,Tp=ep,ba=Xf,Pp=op,Rp=(e,t,n)=>{const r=new Map,o={platform:$p,...n},i={...o.platform,_c:r};return Zf(e,t,{...o,platform:i})};var Vn=typeof document<"u"?se:j;function tr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!tr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!tr(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Pc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wa(e,t){const n=Pc(e);return Math.round(t*n)/n}function xa(e){const t=R(e);return Vn(()=>{t.current=e}),t}function Dp(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:d}=e,[f,l]=D({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=D(r);tr(h,r)||p(r);const[g,v]=D(null),[y,m]=D(null),_=H(N=>{N!==x.current&&(x.current=N,v(N))},[]),b=H(N=>{N!==C.current&&(C.current=N,m(N))},[]),w=i||g,$=a||y,x=R(null),C=R(null),S=R(f),E=c!=null,A=xa(c),I=xa(o),P=H(()=>{if(!x.current||!C.current)return;const N={placement:t,strategy:n,middleware:h};I.current&&(N.platform=I.current),Rp(x.current,C.current,N).then(K=>{const q={...K,isPositioned:!0};M.current&&!tr(S.current,q)&&(S.current=q,vn(()=>{l(q)}))})},[h,t,n,I]);Vn(()=>{d===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,l(N=>({...N,isPositioned:!1})))},[d]);const M=R(!1);Vn(()=>(M.current=!0,()=>{M.current=!1}),[]),Vn(()=>{if(w&&(x.current=w),$&&(C.current=$),w&&$){if(A.current)return A.current(w,$,P);P()}},[w,$,P,A,E]);const L=J(()=>({reference:x,floating:C,setReference:_,setFloating:b}),[_,b]),z=J(()=>({reference:w,floating:$}),[w,$]),B=J(()=>{const N={position:n,left:0,top:0};if(!z.floating)return N;const K=wa(z.floating,f.x),q=wa(z.floating,f.y);return s?{...N,transform:"translate("+K+"px, "+q+"px)",...Pc(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:q}},[n,s,z.floating,f.x,f.y]);return J(()=>({...f,update:P,refs:L,elements:z,floatingStyles:B}),[f,P,L,z,B])}const Lp=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?ba({element:r.current,padding:o}).fn(n):{}:r?ba({element:r,padding:o}).fn(n):{}}}},Ip=(e,t)=>({...Ep(e),options:[e,t]}),Mp=(e,t)=>({...Op(e),options:[e,t]}),Np=(e,t)=>({...Pp(e),options:[e,t]}),jp=(e,t)=>({...kp(e),options:[e,t]}),Fp=(e,t)=>({...Ap(e),options:[e,t]}),Vp=(e,t)=>({...Tp(e),options:[e,t]}),Hp=(e,t)=>({...Lp(e),options:[e,t]});function Up(e){const[t,n]=D(void 0);return Vt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const c=i.borderBoxSize,d=Array.isArray(c)?c[0]:c;a=d.inlineSize,s=d.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Rc="Popper",[Dc,Lc]=Yo(Rc),[Wp,Ic]=Dc(Rc),zp=e=>{const{__scopePopper:t,children:n}=e,[r,o]=D(null);return k(Wp,{scope:t,anchor:r,onAnchorChange:o},n)},qp="PopperAnchor",Bp=te((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Ic(qp,n),a=R(null),s=Fe(t,a);return j(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:k(pt.div,ee({},o,{ref:s}))}),Mc="PopperContent",[Kp,Ay]=Dc(Mc),Gp=te((e,t)=>{var n,r,o,i,a,s,c,d;const{__scopePopper:f,side:l="bottom",sideOffset:h=0,align:p="center",alignOffset:g=0,arrowPadding:v=0,avoidCollisions:y=!0,collisionBoundary:m=[],collisionPadding:_=0,sticky:b="partial",hideWhenDetached:w=!1,updatePositionStrategy:$="optimized",onPlaced:x,...C}=e,S=Ic(Mc,f),[E,A]=D(null),I=Fe(t,We=>A(We)),[P,M]=D(null),L=Up(P),z=(n=L==null?void 0:L.width)!==null&&n!==void 0?n:0,B=(r=L==null?void 0:L.height)!==null&&r!==void 0?r:0,N=l+(p!=="center"?"-"+p:""),K=typeof _=="number"?_:{top:0,right:0,bottom:0,left:0,..._},q=Array.isArray(m)?m:[m],le=q.length>0,at={padding:K,boundary:q.filter(Jp),altBoundary:le},{refs:Te,floatingStyles:_e,placement:He,isPositioned:Ce,middlewareData:ue}=Dp({strategy:"fixed",placement:N,whileElementsMounted:(...We)=>Cp(...We,{animationFrame:$==="always"}),elements:{reference:S.anchor},middleware:[Ip({mainAxis:h+B,alignmentAxis:g}),y&&Mp({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?Np():void 0,...at}),y&&jp({...at}),Fp({...at,apply:({elements:We,rects:W,availableWidth:Y,availableHeight:Z})=>{const{width:X,height:ce}=W.reference,T=We.floating.style;T.setProperty("--radix-popper-available-width",`${Y}px`),T.setProperty("--radix-popper-available-height",`${Z}px`),T.setProperty("--radix-popper-anchor-width",`${X}px`),T.setProperty("--radix-popper-anchor-height",`${ce}px`)}}),P&&Hp({element:P,padding:v}),Yp({arrowWidth:z,arrowHeight:B}),w&&Vp({strategy:"referenceHidden",...at})]}),[fe,Pe]=Nc(He),Ue=ut(x);Vt(()=>{Ce&&(Ue==null||Ue())},[Ce,Ue]);const st=(o=ue.arrow)===null||o===void 0?void 0:o.x,wt=(i=ue.arrow)===null||i===void 0?void 0:i.y,xt=((a=ue.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Re,vt]=D();return Vt(()=>{E&&vt(window.getComputedStyle(E).zIndex)},[E]),k("div",{ref:Te.setFloating,"data-radix-popper-content-wrapper":"",style:{..._e,transform:Ce?_e.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Re,"--radix-popper-transform-origin":[(s=ue.transformOrigin)===null||s===void 0?void 0:s.x,(c=ue.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},k(Kp,{scope:f,placedSide:fe,onArrowChange:M,arrowX:st,arrowY:wt,shouldHideArrow:xt},k(pt.div,ee({"data-side":fe,"data-align":Pe},C,{ref:I,style:{...C.style,animation:Ce?void 0:"none",opacity:(d=ue.hide)!==null&&d!==void 0&&d.referenceHidden?0:void 0}}))))});function Jp(e){return e!==null}const Yp=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:c,middlewareData:d}=t,l=((n=d.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,h=l?0:e.arrowWidth,p=l?0:e.arrowHeight,[g,v]=Nc(s),y={start:"0%",center:"50%",end:"100%"}[v],m=((r=(o=d.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+h/2,_=((i=(a=d.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+p/2;let b="",w="";return g==="bottom"?(b=l?y:`${m}px`,w=`${-p}px`):g==="top"?(b=l?y:`${m}px`,w=`${c.floating.height+p}px`):g==="right"?(b=`${-p}px`,w=l?y:`${_}px`):g==="left"&&(b=`${c.floating.width+p}px`,w=l?y:`${_}px`),{data:{x:b,y:w}}}});function Nc(e){const[t,n="center"]=e.split("-");return[t,n]}const Zp=zp,Xp=Bp,Qp=Gp,jc="Popover",[Fc]=Yo(jc,[Lc]),ii=Lc(),[eh,Gt]=Fc(jc),th=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,s=ii(t),c=R(null),[d,f]=D(!1),[l=!1,h]=ec({prop:r,defaultProp:o,onChange:i});return k(Zp,s,k(eh,{scope:t,contentId:Nn(),triggerRef:c,open:l,onOpenChange:h,onOpenToggle:H(()=>h(p=>!p),[h]),hasCustomAnchor:d,onCustomAnchorAdd:H(()=>f(!0),[]),onCustomAnchorRemove:H(()=>f(!1),[]),modal:a},n))},nh="PopoverTrigger",rh=te((e,t)=>{const{__scopePopover:n,...r}=e,o=Gt(nh,n),i=ii(n),a=Fe(t,o.triggerRef),s=k(pt.button,ee({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Uc(o.open)},r,{ref:a,onClick:Oe(e.onClick,o.onOpenToggle)}));return o.hasCustomAnchor?s:k(Xp,ee({asChild:!0},i),s)}),Vc="PopoverPortal",[oh,ih]=Fc(Vc,{forceMount:void 0}),ah=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=Gt(Vc,t);return k(oh,{scope:t,forceMount:n},k(qt,{present:n||i.open},k(ic,{asChild:!0,container:o},r)))},sn="PopoverContent",sh=te((e,t)=>{const n=ih(sn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=Gt(sn,e.__scopePopover);return k(qt,{present:r||i.open},i.modal?k(ch,ee({},o,{ref:t})):k(lh,ee({},o,{ref:t})))}),ch=te((e,t)=>{const n=Gt(sn,e.__scopePopover),r=R(null),o=Fe(t,r),i=R(!1);return j(()=>{const a=r.current;if(a)return vc(a)},[]),k(Zo,{as:cr,allowPinchZoom:!0},k(Hc,ee({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oe(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),i.current||(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:Oe(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0,d=s.button===2||c;i.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:Oe(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})))}),lh=te((e,t)=>{const n=Gt(sn,e.__scopePopover),r=R(!1),o=R(!1);return k(Hc,ee({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;!((s=n.triggerRef.current)===null||s===void 0)&&s.contains(c)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),Hc=te((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,...l}=e,h=Gt(sn,n),p=ii(n);return ac(),k(rc,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},k(tc,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>h.onOpenChange(!1)},k(Qp,ee({"data-state":Uc(h.open),role:"dialog",id:h.contentId},p,l,{ref:t,style:{...l.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))});function Uc(e){return e?"open":"closed"}const uh=th,dh=rh,fh=ah,ph=sh,$a=e=>{var n;const t=Number((n=e.match(/\d/g))==null?void 0:n.join(""));return Number.isNaN(t)?0:t},hh=(e,t={by:"results-count",order:"descending"})=>{const n=[...e];switch(t.by){case"results-count":n.sort((r,o)=>r.jobs-o.jobs);break;case"alphabetically":n.sort((r,o)=>r.label.localeCompare(o.label));break;case"numerically":n.sort((r,o)=>{const i=$a(r.value),a=$a(o.value);return i-a});break}return t.order==="descending"&&n.reverse(),n},yn=Se({base:"fr bg-lowest caret-accent-11 selection:bg-accent-4 selection:text-accent-12 placeholder:text-copy-neutral placeholder:opacity-30 ring-width-section ease-expo-out duration-snappy transition-all disabled:opacity-50 rounded-input font-style-input text-style-input font-weight-input",variants:{hasValue:{false:"text-copy-neutral ring-job-card-stroke",true:"text-interactive-accent-text ring-job-card-stroke"},size:{md:"py-2 px-4",unsized:""}},defaultVariants:{size:"md",hasValue:!1}}),Wc=Se({base:"flex-1 gutter-stable group/filter flex-col p-2 bg-app flex max-w-full overflow-y-auto items-stretch",variants:{ring:{default:"border-b-px border-neutral-4",unset:""}},defaultVariants:{ring:"default"}}),zc=Se({base:"max-w-full origin-top group/tag ease-expo-out transition-all duration-snappy",variants:{type:{pill:"",line:"[&:not(:last-child)]:border-b-px border-neutral-2 has-[[data-current-value=true]]:border-b-accent-3"}}}),qc=Se({base:"cursor-pointer flex fr gap-2 font-style-tag pointer-fine:group-[&:first-child]/filter:group-[&:first-child]/tag:rounded-t-tag py-2.5 px-2.5 font-family-tag font-weight-tag text-style-tag focus:relative w-full justify-between",variants:{active:{true:"bg-accent-2 text-accent-11",false:"text-neutral-11"},disabled:{true:"opacity-25 pointer-events-none",false:""}},compoundVariants:[{disabled:!1,active:!1,class:"hover:bg-neutral-2"}],defaultVariants:{disabled:!1,active:!1}}),vh=Se({base:"rounded-job-tag inline-block px-1 border-solid border-px ease-expo-out transition-all duration-snappy",variants:{colorScheme:{accentStrong:"text-accent-11 bg-accent-4 border-tag-accent-strong-stroke",neutralStrong:"text-neutral-11 bg-neutral-2 border-tag-neutral-strong-stroke"}}}),gh=({children:e,colorScheme:t})=>u("span",{class:vh({colorScheme:t}),children:u("span",{class:"block w-[3ch] text-center tabular-nums",children:e})}),mh=(e,t)=>{const n=e.indexOf(t);return n===-1?[...e,t]:e.filter((r,o)=>o!==n)},_h=(e,t)=>{if(e===null)return!1;const n=e[t.value];return n===void 0?!0:n===0},yh=(e,t)=>{const n=r=>r>99?"99+":r.toString();return n(e===null?t.jobs:e[t.value]??0)},bh=({value:e,hasKeyword:t,property:n,useQuery:r,isMobile:o,onValueChange:i,onClose:a})=>{const{t:s}=re(),c=pn(r()),d=J(()=>{switch(c.queryState){case"error":case"idle":case"loading":return null;case"loaded":case"revalidating":{const g=c.data[n.key]??[];return Object.fromEntries(g.map(v=>[v.value,v.jobs]))}default:At(c)}},[c,n.key]),f=Bc(e),l=f.length>0,[h,p]=D();return u("div",{class:"theme-fill:bg-neutral-1 flex min-h-0 w-full flex-1 flex-col",children:[n.searchable&&u("div",{class:"border-b-px border-neutral-4",children:u("input",{type:"search",class:"theme-fill:bg-neutral-2 theme-stroke:bg-neutral-1 theme-fill:focus:bg-neutral-1 theme-stroke:focus:bg-lowest focus:ring-px focus:ring-neutral-6 pointer-fine:theme-soft:rounded-t-lg pointer-fine:theme-rounded:rounded-t-lg caret-accent-11 selection:bg-accent-4 selection:text-accent-12 placeholder:text-copy-neutral ease-expo-out duration-snappy font-style-input text-style-input font-weight-input bg-transparent px-4 py-2.5 outline-none transition-all placeholder:opacity-30 disabled:opacity-50",value:h,onInput:g=>p(g.currentTarget.value),placeholder:s("type_to_search")})}),(()=>{var g;switch(c.queryState){case"error":return u(et,{error:new Error(s("filters_loading_error"),{cause:c.error}),class:"flex-1",resetError:()=>c.swr.mutate()});case"idle":case"loading":return u("div",{"aria-hidden":!0,class:"flex flex-col p-2",children:Array.from({length:10}).map((v,y)=>u("div",{style:{animationDelay:y*-.1+"s"},class:"bg-neutral-3 animate-skeleton h-12 w-full"},y))});case"revalidating":case"loaded":{const v=[...c.data[n.key]??[]];if(!t)for(const b of n.pinnedValues??[])v.some(w=>w.value===b)||v.push({value:b,label:b,jobs:0});const y=h&&h.length>1?v.filter(b=>b.label.toLowerCase().includes(h.toLowerCase())):v,m=[];for(const b of y){if(b.label.length<1)continue;const w=(g=n.pinnedValues)==null?void 0:g.includes(b.value);if(t&&w&&b.jobs===0)continue;const $={...b,results:yh(d,b),disabled:_h(d,b)};n.results==="only-available"?($.disabled===!1||w&&!t)&&m.push($):m.push($)}return m.some(b=>{var w;return!b.disabled||!t&&((w=n.pinnedValues)==null?void 0:w.includes(b.value))})?u("ul",{class:Wc(),children:hh(m,n.sortSuggestions).map(b=>{const w=f.includes(b.value);return u("li",{class:zc({type:"line"}),children:u("button",{type:"button",disabled:b.disabled,"data-filter":!0,"data-current-value":w?"true":void 0,"aria-pressed":w,onClick:()=>{switch(e.select){case"many":{const $=mh(f,b.value);i({select:"many",value:$});break}case"one":i({select:"one",value:w?void 0:b.value});break;default:At(e)}},class:qc({active:w,disabled:b.disabled}),children:[u("span",{class:"max-w-full truncate",children:b.label})," ",u(gh,{colorScheme:w?"accentStrong":"neutralStrong",children:b.results})]})},b.value)})}):u("p",{class:"font-style-tag text-style-tag font-weight-tag w-full flex-1 px-4 pb-1 pt-4 text-center",children:s("no_filter_options_available")})}default:At(c)}})(),u("footer",{class:"flex flex-none justify-end p-2",children:[u("div",{class:"flex-1",children:l&&u("button",{type:"button",class:ge({variant:"neutral",icon:"left"}),onClick:()=>{i(void 0)},children:[u(oe,{"aria-hidden":!0,name:"x"})," ",s("clear")]})}),e.select==="many"&&o&&u("div",{class:"flex items-center overflow-hidden",children:u("p",{class:"theme-light:text-neutral-11 theme-dark:text-neutral-12 font-style-default text-style-tag font-weight-default flex-grow select-none truncate text-center",children:[f.length," ",s("selected")]})}),u("div",{class:"flex-1",children:u("button",{type:"button",class:ge({variant:l?"accent":"neutral",class:"ml-auto"}),onClick:a,children:s(l?"done":"close")},l?"done":"close")})]})]})},Sa=8,Ca={contract_type:"clock",title:"magnifier",city:"mapPin",town:"mapPin",country:"mapPin",company_name:"briefcase",category:"briefcase",pay:"pay",pay_currency:"pay",pay_mask:"pay",pay_display:"pay",pay_max:"pay",pay_min:"pay",pay_type:"pay"},Ea=Se({base:"theme-fill:fr theme-fill:bg-neutral-2 theme-fill:hover:bg-neutral-3 theme-stroke:fr theme-stroke:hover:fr theme-stroke:ring-px theme-stroke:bg-lowest theme-stroke:ring-neutral-4 theme-stroke:hover:ring-neutral-6 group relative flex cursor-pointer select-none items-center gap-1.5 py-2.5 pl-3.5 pr-3 font-style-filter font-family-filter font-weight-filter text-style-filter duration-snappy outline-none ijs-filter flex-shrink-0 min-w-0 theme-rounded:rounded-md theme-soft:rounded-sm transition-all ease-expo-out active:scale-[0.975] origin-[50%_1.75rem]",variants:{state:{default:"text-copy-neutral-lowcontrast hover:text-copy-neutral",active:"text-copy-neutral"}}}),Oa=Se({base:"bg-lowest isolate z-50 flex flex-col overflow-hidden ring-neutral-4 ring-px",variants:{mode:{mobile:"fixed bottom-0 w-full h-[80svh] rounded-t-section animate-slide-out-bottom pb-[env(safe-area-inset-bottom)]",desktop:"min-w-64 max-w-xs max-h-[--radix-popover-content-available-height] rounded-section animate-slideDownFade data-[side=top]:animate-slideUpFade shadow-lg"}}}),Bc=e=>typeof e.value=="string"?[e.value]:e.value??[],wh=({selectedValues:e})=>{const t=e.length;return t===0?null:u("span",{"aria-label":"Current value",class:"animate-appear-tag text-style-job-card-info font-style-tag font-family-tag font-weight-tag text-tag-accent-strong-copy bg-tag-accent-strong-bg absolute -right-1 -top-1 inline-flex min-h-6 min-w-6 items-center justify-center rounded-[999px] px-2 tabular-nums",children:t},t)},Kc=({active:e,hasKeyword:t=!1,value:n,onActiveChange:r,property:o,onValueChange:i,unfilteredQuery:a,useQuery:s,theme:c,widgetId:d})=>{const f=yl(o.key,Ca)?Ca[o.key]:void 0,l=o.icon??f??"filter",h=Bc(n),p=h.length>0,{t:g}=re(),v=p?`${o.label}, ${h.length} ${g("selected")}`:o.label,y=Xs("(pointer: coarse)"),m=u(V,{children:[u("div",{class:"flex min-w-0 flex-1 items-center gap-1.5",children:[u(oe,{"aria-hidden":!0,class:"flex-none",name:l}),u("span",{class:"truncate",children:o.label})]}),u(oe,{"aria-hidden":!0,class:"text-neutral-8 flex-shrink-0 rotate-90 transition-transform group-data-[state=open]:-rotate-90",name:"chevron-right"}),u(wh,{selectedValues:h})]}),_=u(bh,{hasKeyword:t,useQuery:s,onClose:()=>r(!1),onValueChange:i,unfilteredQuery:a,property:o,value:n,isMobile:y});return y?u(If,{open:e,onOpenChange:r,children:[u(Mf,{"data-filter-key":o.key,"aria-label":v,class:Ea({state:e||p?"active":"default"}),onTouchStart:xh,children:m}),u(Nf,{children:u("div",{class:"inploi-job-search","data-widget-id":d,children:[u(jf,{class:"animate-fade-in fixed inset-0 z-50 bg-[#0009]"}),u(Ff,{class:Oa({mode:"mobile",class:go(c)}),children:[u("header",{class:"theme-fill:bg-neutral-1 text-neutral-12 border-b-px border-neutral-4 flex cursor-default items-center gap-2 p-4",children:[u(oe,{name:l,class:"flex-none"}),u("p",{class:"font-style-filter font-weight-filter text-style-filter truncate",children:o.label})]}),_]})]})})]}):u(uh,{open:e,onOpenChange:b=>r(b),modal:y,children:[u(dh,{"data-filter-key":o.key,"aria-label":v,class:Ea({state:e||p?"active":"default"}),children:m}),u(fh,{children:u("div",{class:"inploi-job-search","data-widget-id":d,children:u(ph,{side:"bottom",sideOffset:Sa,align:"center",collisionPadding:Sa,class:Oa({mode:"desktop",class:go(c)}),children:_})})})]})};function xh(){}const $h=(e,t)=>{var n,r,o;switch(t.select){case"many":(n=t.value)==null||n.forEach(i=>{var a,s;switch(e.select){case"many":(a=e.value)!=null&&a.includes(i)||(s=e.value)==null||s.push(i);break;case"one":e.value=i}});break;case"one":if(!t.value)break;switch(e.select){case"many":(r=e.value)!=null&&r.includes(t.value)||(o=e.value)==null||o.push(t.value);break;case"one":e.value=t.value}break}},Sh=({value:e,activeKey:t})=>{switch(e==null?void 0:e.select){case void 0:return{newValue:void 0,newActiveKey:t};case"one":case"many":return{newValue:e,newActiveKey:t};default:At(e)}},Ch=({properties:e,state:t,staged:n,onFilterValueChange:r,onResetFilters:o,rpcClient:i,theme:a,alerts:s,widgetId:c,i18n:d})=>{const{t:f}=re(),[l,h]=D(void 0),p=J(()=>({filters:or(e,"value"),mode:t.mode,query:"",geo:void 0,page:1,view:"list"}),[e,t.mode]),g=pn(Ft(Zn({state:p,baseKey:"filters"}),()=>Si({rpcClient:i,state:p,t:f,locale:d?d.locale:void 0,fallbackLocale:d?d.fallbackLocale:void 0}),Gn)),v=H(m=>()=>{const _={...t,resultOrder:void 0,filters:{...t.filters,[m]:p.filters[m]}};return Ft(Zn({state:_,baseKey:"filters"}),()=>Si({rpcClient:i,state:_,t:f,locale:d?d.locale:void 0,fallbackLocale:d?d.fallbackLocale:void 0}),Gn)},[i,p.filters,t,f,d]);if(g.queryState==="error")return u(et,{error:new Error(f("filters_loading_error"),{cause:g.error}),resetError:()=>g.swr.mutate()});const y=n?Eh:Kc;return u("div",{class:"ijs-filters-section flex w-full flex-col items-stretch justify-center gap-2 overflow-auto px-4 py-2 md:flex-row md:flex-wrap md:items-center",children:[e.filter(m=>m.hidden!==!0).map(m=>{const _=l===m.key,b=t.filters[m.key]??{select:m.select,value:void 0},w=p.filters[m.key];w&&$h(b,w);const $=S=>{const{newActiveKey:E,newValue:A}=Sh({activeKey:l,value:S??w,appliedFilters:t.filters});return h(E),r(m.key,A)},x=S=>h(S?m.key:void 0),C=v(m.key);return u(on,{Fallback:et,children:u(y,{unfilteredQuery:g,active:_,hasKeyword:!!t.query,property:m,onActiveChange:x,value:b,useQuery:C,onValueChange:$,theme:a,widgetId:c})},m.key)}),u("button",{type:"button",class:ge({variant:"neutral"}),onClick:o,children:f("reset")}),s?u("div",{id:"inploi-job-alerts",class:"min-h-[36px]",children:u("div",{class:"rounded-job-card bg-neutral-2 flex h-[36px] animate-pulse items-center gap-2 px-2",children:[u("div",{class:"block h-6 w-6"}),u("p",{class:"text-style-tag text-neutral-6 pr-2 font-[500]",children:s.params.config.label})]})}):null]})};function Eh({useQuery:e,...t}){const n=e();return u(Kc,{...t,useQuery:()=>n})}const Gc=["gb"],Oh=e=>{const t=$e.jobCountryCodes(e);return t.length?t:Gc},cn=e=>e*1609.34,So=e=>e*1e3,kh=()=>{const e=typeof document>"u"?"":document.documentElement.lang;if(e)try{return Intl.getCanonicalLocales(e)[0]}catch{return}},Jc=(e,t,n=1)=>new Intl.NumberFormat(kh()??e,{style:"unit",unit:t==="miles"?"mile":"kilometer",unitDisplay:"short",maximumFractionDigits:n,trailingZeroDisplay:"stripIfInteger"}),Ah=(e,t,n)=>Jc(n,t).format(e/(t==="miles"?cn(1):So(1)));function Th(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var hr=Th,Ph=typeof $n=="object"&&$n&&$n.Object===Object&&$n,Rh=Ph,Dh=Rh,Lh=typeof self=="object"&&self&&self.Object===Object&&self,Ih=Dh||Lh||Function("return this")(),vr=Ih,Mh=vr,Nh=function(){return Mh.Date.now()},jh=Nh,Fh=/\s/;function Vh(e){for(var t=e.length;t--&&Fh.test(e.charAt(t)););return t}var Hh=Vh,Uh=Hh,Wh=/^\s+/;function zh(e){return e&&e.slice(0,Uh(e)+1).replace(Wh,"")}var qh=zh,Bh=vr,Kh=Bh.Symbol,ai=Kh,ka=ai,Yc=Object.prototype,Gh=Yc.hasOwnProperty,Jh=Yc.toString,en=ka?ka.toStringTag:void 0;function Yh(e){var t=Gh.call(e,en),n=e[en];try{e[en]=void 0;var r=!0}catch{}var o=Jh.call(e);return r&&(t?e[en]=n:delete e[en]),o}var Zh=Yh,Xh=Object.prototype,Qh=Xh.toString;function ev(e){return Qh.call(e)}var tv=ev,Aa=ai,nv=Zh,rv=tv,ov="[object Null]",iv="[object Undefined]",Ta=Aa?Aa.toStringTag:void 0;function av(e){return e==null?e===void 0?iv:ov:Ta&&Ta in Object(e)?nv(e):rv(e)}var Zc=av;function sv(e){return e!=null&&typeof e=="object"}var cv=sv,lv=Zc,uv=cv,dv="[object Symbol]";function fv(e){return typeof e=="symbol"||uv(e)&&lv(e)==dv}var gr=fv,pv=qh,Pa=hr,hv=gr,Ra=NaN,vv=/^[-+]0x[0-9a-f]+$/i,gv=/^0b[01]+$/i,mv=/^0o[0-7]+$/i,_v=parseInt;function yv(e){if(typeof e=="number")return e;if(hv(e))return Ra;if(Pa(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Pa(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pv(e);var n=gv.test(e);return n||mv.test(e)?_v(e.slice(2),n?2:8):vv.test(e)?Ra:+e}var bv=yv,wv=hr,Kr=jh,Da=bv,xv="Expected a function",$v=Math.max,Sv=Math.min;function Cv(e,t,n){var r,o,i,a,s,c,d=0,f=!1,l=!1,h=!0;if(typeof e!="function")throw new TypeError(xv);t=Da(t)||0,wv(n)&&(f=!!n.leading,l="maxWait"in n,i=l?$v(Da(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function p(x){var C=r,S=o;return r=o=void 0,d=x,a=e.apply(S,C),a}function g(x){return d=x,s=setTimeout(m,t),f?p(x):a}function v(x){var C=x-c,S=x-d,E=t-C;return l?Sv(E,i-S):E}function y(x){var C=x-c,S=x-d;return c===void 0||C>=t||C<0||l&&S>=i}function m(){var x=Kr();if(y(x))return _(x);s=setTimeout(m,v(x))}function _(x){return s=void 0,h&&r?p(x):(r=o=void 0,a)}function b(){s!==void 0&&clearTimeout(s),d=0,r=c=o=s=void 0}function w(){return s===void 0?a:_(Kr())}function $(){var x=Kr(),C=y(x);if(r=arguments,o=this,c=x,C){if(s===void 0)return g(c);if(l)return clearTimeout(s),s=setTimeout(m,t),p(c)}return s===void 0&&(s=setTimeout(m,t)),a}return $.cancel=b,$.flush=w,$}var Ev=Cv;const Ov=Bo(Ev),Co="|",Xc=(e,t)=>{const n=structuredClone(e);return n.forEach(r=>{if(t.has(r.key)){const o=t.get(r.key);if(!o)return;switch(r.select){case"one":{r.defaultValue=o;break}case"many":o.includes(Co)?r.defaultValue=o.split(Co):r.defaultValue=o}}}),n},Qc=e=>{const t=e.get("mode");return t==="vector"||t==="query"?t:"query"},el=e=>{const t=e.get("view");return t==="list"||t==="map"?t:"list"},kv=({searchParams:e})=>({properties:t})=>({filters:or(Xc(t,e),"defaultValue"),mode:Qc(e),geo:tl(e),page:Hn(e.get("page"))??1,view:el(e),query:e.get("query")??"",...e.get("result_order")==="newest"?{resultOrder:"newest"}:{}}),Av=(e,t)=>{var n,r;if(e.filters!==void 0){const o=ir({filters:e.filters,mode:e.mode??"query",page:e.page??1,view:e.view??"list"});for(const[i,a]of Object.entries(o))if(i!=="geolocation"){if(a==null){t.delete(i);continue}Array.isArray(a)?a.length===0?t.delete(i):t.set(i,a.join(Co)):typeof a=="string"&&t.set(i,a)}}"geo"in e&&(((n=e.geo)==null?void 0:n.type)==="provided"?(e.geo.coords?(t.set("lat",e.geo.coords.lat.toString()),t.set("lng",e.geo.coords.lng.toString())):(t.delete("lat"),t.delete("lng")),t.set("radius",e.geo.radius.toString())):((r=e.geo)==null||r.type,t.delete("lat"),t.delete("lng"),t.delete("radius"))),"query"in e&&(e.query?t.set("query",e.query):t.delete("query")),"page"in e&&(e.page&&e.page>1?t.set("page",e.page.toString()):t.delete("page")),"resultOrder"in e&&(e.resultOrder==="newest"?t.set("result_order","newest"):t.delete("result_order")),"view"in e&&(e.view?t.set("view",e.view):t.delete("view"))},Hn=e=>{if(!e)return;const t=Number(e);if(!Number.isNaN(t))return t},tl=e=>{const t=e.get("lat"),n=e.get("lng"),r=e.get("radius");if(!t&&!n||!t||!n)return;const o=Hn(t),i=Hn(n),a=Hn(r)??cn(Oo);if(!(o===void 0||i===void 0))return{type:"provided",coords:{lat:o,lng:i},radius:Number.isNaN(a)?cn(Oo):a}},nl=(e,t=1e3)=>{const[n,r]=D(e),o=J(()=>Ov(i=>r(i),t),[t]);return j(()=>{o(e)},[e,o]),n},Tv=te(({disabled:e,error:t,name:n,inputPlaceholder:r,items:o,onItemSelect:i,onEnter:a,onQueryChange:s,onBlur:c,onFocus:d,inputProps:f,menuProps:l,query:h},p)=>{const[g,v]=D(!1),[y,m]=D(),_=R(!1),{t:b}=re();j(()=>{var x;m((x=o[0])==null?void 0:x.id),_.current=!1},[o]);const w=x=>{i(x),v(!1)},$=!t&&g&&!e&&o.length>0;return u("div",{class:"relative h-full",children:[u("input",{name:n,"aria-label":r,ref:p,disabled:e,"data-active":g?"true":void 0,"aria-controls":$?`ijs-${n}-menu`:void 0,placeholder:r,class:yn({size:"md"}),onFocus:()=>{d==null||d(),v(!0)},onBlur:()=>{window.setTimeout(()=>{c==null||c(),v(!1)},100)},value:h,onChange:x=>{_.current=!1,s(x.currentTarget.value)},onKeyDown:x=>{switch(v(!0),x.key){case"ArrowDown":case"ArrowUp":{const C=x.key==="ArrowDown"?1:-1;x.preventDefault();const S=o.findIndex(A=>A.id===y);if(S===-1)return;const E=o[S+C]??o[x.key==="ArrowDown"?0:o.length-1];if(!E)return;m(E.id),_.current=!0;break}case"Enter":x.preventDefault(),a(y,_.current)}},...f}),$?u("ul",{className:Wc({ring:"unset",className:"ring-width-section rounded-input ring-job-card-stroke absolute left-0 right-0 top-12 z-50 w-full shadow-sm"}),id:`ijs-${n}-menu`,onMouseDown:x=>x.preventDefault(),...l,children:t?u("div",{role:"alert",children:b("geo_suggestions_error")}):o.map(x=>u("li",{class:zc({type:"line",className:"group/tag"}),children:u("button",{type:"button",onMouseEnter:()=>{m(x.id),_.current=!0},class:qc({active:x.id===y,className:"line-clamp-1 overflow-hidden truncate"}),onClick:()=>w(x.id),onKeyDown:C=>{C.key==="Enter"&&w(x.id)},children:x.label})},x.id))}):null]})}),Pv="https://api.mapbox.com/search/geocode/v6/forward",Eo=3,Rv="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",Dv=e=>atob(e).split("").reverse().join(""),Lv="region,postcode,district,place,locality,neighborhood",Iv=we({features:fn(Xe(we({properties:we({mapbox_id:Q(),feature_type:Be(Q()),place_formatted:Be(Q()),name_preferred:Be(Q(),"Untitled location"),coordinates:Xe(we({latitude:be(),longitude:be()}),Ze(({latitude:e,longitude:t})=>({lat:e,lng:t})))})}),Ze(e=>e.properties)))}),Mv=e=>{const t=us(Iv,e);if(t.success===!1)throw console.error(t.issues),new Error("Invalid data");return t.output.features},Nv=(e,t)=>{const n=new URL(Pv);return n.searchParams.set("q",e),n.searchParams.set("proximity","ip"),n.searchParams.set("country",t.join(",")),n.searchParams.set("types",Lv),n.searchParams.set("access_token",Dv(Rv)),n},La=e=>e.replace(/\s/gu,"").toUpperCase(),jv=(e,t)=>{const n=La(e),r=t.find(o=>o.feature_type==="postcode"&&La(o.name_preferred)===n);return r?[r,...t.filter(o=>o!==r)]:t},Fv=(e,t)=>Array.from(new Map(e.map(n=>[typeof t=="function"?t(n):n[t],n])).values()),Ia="inploi:geo:job-search:seed";let Et;const Vv=()=>{if(Et)return Et;Et=$e.generateUUID();try{const e=sessionStorage.getItem(Ia);e&&/^[\w-]{1,64}$/.test(e)?Et=e:sessionStorage.setItem(Ia,Et)}catch{}return Et},Hv=e=>({mapbox_id:`${e.kind}:${e.label}`,feature_type:e.kind,name_preferred:e.name,place_formatted:e.label.startsWith(`${e.name}, `)?e.label.slice(e.name.length+2):e.label,coordinates:{lat:e.lat,lng:e.lng}}),Ma=async([e,t],n,r)=>{if(e.trim().length<Eo)return{results:[],lookup:null};const{results:o,arm:i,source:a}=await Cl({query:e,country:t.join(","),seed:Vv(),surface:"job-search",signal:n},Hv,async()=>{r==null||r();const c=await fetch(Nv(e,t),{signal:n});if(!c.ok)throw new Error("Failed to get address details");return Mv(await c.json())}),s=Fv(o,c=>c.name_preferred+c.place_formatted);return{results:jv(e,s),lookup:{arm:i,source:a}}},Uv=1e4;class rl extends Error{constructor(){super("Timed out waiting for the browser location"),this.name="LocateTimeoutError"}}const Wv=({signal:e,timeoutMs:t})=>new Promise((n,r)=>{if(e.aborted){r(new DOMException("Aborted","AbortError"));return}const o=setTimeout(()=>r(new rl),t);e.addEventListener("abort",()=>{clearTimeout(o),r(new DOMException("Aborted","AbortError"))},{once:!0}),navigator.geolocation.getCurrentPosition(i=>{clearTimeout(o),n(i.coords)},i=>{clearTimeout(o),r(i)},{timeout:t})}),zv=1,qv=3,Bv=e=>{if(e instanceof DOMException&&e.name==="AbortError")return null;if(e instanceof rl)return"geo_error_timeout";const t=typeof e=="object"&&e!==null&&"code"in e?e.code:void 0;return t===zv?"geo_error_permission_denied":t===qv?"geo_error_timeout":"geo_error_position_unavailable"},Kv=()=>typeof window<"u"&&"geolocation"in navigator&&window.isSecureContext,Gv=({onLocate:e,onError:t,signal:n})=>{const[r,o]=D("idle"),[i,a]=D(null),{t:s}=re(),c=f=>{o("idle"),a(f),e(f)},d=f=>{const l=Bv(f);if(!l)return o("idle");o("error"),t(s(l))};return u("button",{"aria-label":s(r==="loading"?"geo_locating":"geo_my_location"),type:"button",onClick:()=>{if(r!=="loading"){if(i)return c(i);if(!Kv())return d(void 0);o("loading"),Wv({signal:n,timeoutMs:Uv}).then(f=>c({lat:f.latitude,lng:f.longitude})).catch(d)}},"data-state":r,class:ge({variant:"accent",size:"lg",icon:"only",className:"data-[state=loading]:animate-pulse"}),children:u(oe,{name:"target-location"})})},Lt=Se({base:"block fr font-style-tag font-family-tag font-weight-tag",variants:{variant:{neutralWeak:"text-tag-neutral-weak-copy bg-tag-neutral-weak-bg border-solid border-px border-tag-neutral-weak-stroke",neutralStrong:"text-tag-neutral-strong-copy bg-tag-neutral-strong-bg border-solid border-px border-tag-neutral-strong-stroke",accentStrong:"text-tag-accent-strong-copy bg-tag-accent-strong-bg border-solid border-px border-tag-accent-strong-stroke",monetaryWeak:"text-tag-monetary-weak-copy bg-tag-monetary-weak-bg border-solid border-px border-tag-monetary-weak-stroke"},interactive:{true:"ease-expo-out rounded-interactive transition-all duration-snappy",false:"rounded-tag"},size:{xs:"px-2 py-0.5 text-style-tag",sm:"px-3 py-1.5 text-style-tag",lg:"px-5 py-2.5 text-style-tag",unsized:""},disabled:{true:"opacity-25 pointer-events-none",false:""}},compoundVariants:[{disabled:!1,interactive:!0,class:"cursor-pointer active:scale-[0.975]"}],defaultVariants:{variant:"neutralWeak",size:"sm",disabled:!1,interactive:!1}}),Jv=({onSelect:e,onValueChange:t,coords:n,radius:r,countries:o,onError:i})=>{const{t:a}=re(),[s,c]=D(""),[d,f]=D(),l=nl(s,500),[h,p]=D(new AbortController),g=Ft(l.trim().length>=Eo?[l,o]:null,Ma,{keepPreviousData:!1,revalidateIfStale:!1,revalidateOnFocus:!1}),{data:v,queryState:y,error:m}=pn(g),_=R(0),[b,w]=D("view"),$=R(null),x=R(null),C=R(null),S=R(!1);j(()=>{var P,M;b==="edit"&&((P=$.current)==null||P.focus()),b==="view"&&n&&S.current&&(S.current=!1,(M=C.current)==null||M.focus())},[b,n]);const E=(P,M)=>{var L;_.current++,S.current=((L=x.current)==null?void 0:L.contains(document.activeElement))??!1,e(P,M),f(M),c(""),w("view")},A=(P,M)=>{P&&El({kind:"places",surface:"job-search",...P,picked:M})};return u("div",{ref:x,class:"relative flex-1",children:[b==="view"&&n?u("button",{ref:C,"aria-label":`${a("geo_search_placeholder")}: ${d??a("location_provided")}`,type:"button",class:yn({size:"unsized",className:"flex h-10 w-full cursor-text items-stretch px-1 py-1"}),onClick:()=>{w("edit")},children:u("div",{class:Lt({size:"sm",variant:"accentStrong",interactive:!0,class:"truncate"}),children:d??a("location_provided")})}):u(Tv,{ref:$,error:m,query:s,name:"location-search",onQueryChange:P=>{_.current++,c(P),i(void 0)},onFocus:()=>{h.abort(),p(new AbortController)},onBlur:()=>{const P=$.current;if(!(!P||document.activeElement===P)){if(w("view"),n)return c("");P.value.trim()&&i(a("geo_choose_location"))}},onItemSelect:P=>{if(y!=="loaded")return;const M=v.results.find(L=>L.mapbox_id===P);M&&(A(v.lookup,!0),E(M.coordinates,M.name_preferred))},onEnter:async(P,M)=>{const L=s.trim();if(!L)return;if(L.length<Eo)return i(a("geo_query_too_short"));const z=++_.current;let B=null;try{const N=l===s&&y==="loaded"?v:await Ma([L,o],void 0,()=>{B={arm:"direct",source:"direct"}});if(z!==_.current)return;const K=N.results.find(le=>le.mapbox_id===P),q=K??N.results[0];if(A(N.lookup,M&&!!K),q)return E(q.coordinates,q.name_preferred);i(a("geo_no_match"))}catch{if(z!==_.current)return;A(B,!1),i(a("geo_suggestions_error"))}},inputPlaceholder:a("geo_search_placeholder"),inputProps:{enterkeyhint:"search"},items:(v==null?void 0:v.results.map(P=>({id:P.mapbox_id,label:u("div",{class:"flex min-w-0 max-w-full gap-2 overflow-hidden",children:[u("strong",{class:"truncate",children:P.name_preferred})," ",u("span",{class:"flex-1 truncate opacity-50",children:P.place_formatted})]})})))??[]}),u("div",{class:"absolute bottom-0 right-0 top-0 flex items-center",children:!s&&!n?u(Gv,{onLocate:P=>E(P,a("geo_my_location")),onError:i,signal:h.signal}):u("button",{type:"button","aria-label":a("geo_clear_search"),onClick:()=>{_.current++,c(""),i(void 0),f(void 0),t({radius:r,type:"provided"}),w("edit"),$.current&&($.current.value="",$.current.focus())},class:ge({variant:"neutral",size:"lg",icon:"only"}),children:u(oe,{name:"x"})})})]})},Yv=[.25,.5,1,3,5,10,15,20,30,40],Zv=[.5,1,3,5,10,15,25,50,100],Oo=20,Xv=25,Qv=({rpcClient:e,value:t,onValueChange:n,distanceUnit:r="miles"})=>{const{t:o,locale:i}=re(),a=sr(),[s,c]=D(),d=Ft("job-countries",()=>$e.getJobCountries(e),{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}),f=J(()=>d.data?Oh(d.data):Gc,[d.data]),l=J(()=>Jc(i,r,2),[i,r]),h=r==="miles"?cn(Oo):So(Xv),p=(t==null?void 0:t.type)==="provided"?t.radius:h,g=(t==null?void 0:t.type)==="provided"?t.coords:void 0,v=(t==null?void 0:t.type)==="provided"?t.label:void 0,y=r==="miles"?Yv.map(m=>({value:cn(m),label:l.format(m)})):Zv.map(m=>({value:So(m),label:l.format(m)}));return u("div",{class:"flex flex-col gap-2",children:[u("div",{class:"flex flex-col gap-2 md:flex-row",children:[u(Jv,{coords:g,radius:p,countries:f,onValueChange:n,onSelect:(m,_)=>{c(void 0),n({type:"provided",radius:p,coords:m,label:_})},onError:c}),u("div",{class:"relative",children:[u("label",{class:"sr-only",for:a,children:o("geo_range_label")}),u("select",{id:a,name:"radius",class:yn({size:"unsized",className:"w-full appearance-none truncate py-2 pl-3 pr-10"}),disabled:!g,value:g?p:"",onChange:m=>{c(void 0),n({type:"provided",coords:g,label:v,radius:Number(m.currentTarget.value)})},children:[g?null:u("option",{value:"",children:o("geo_any_distance")}),y.map(m=>u("option",{value:m.value,class:"truncate",children:m.label},m.value))]}),u("div",{class:"text-copy-neutral-lowcontrast pointer-events-none absolute bottom-0 right-0 top-0 flex w-10 items-center justify-center",children:u(oe,{name:"chevron-right",class:"h-6 w-6 rotate-90"})})]})]}),s?u("div",{role:"alert",class:"text-pretty text-copy-neutral font-style-tag font-weight-tag text-style-tag flex gap-1",children:[u(oe,{name:"warning",class:"animate-appear-tag size-[1lh] flex-none"}),s]}):null]})},ol=(e,t,n,r)=>{const[o,i]=D(e??""),a=R(),s=R(t);s.current=t;const c=H(()=>clearTimeout(a.current),[]);return se(()=>(i(e??""),c(),c),[e,c]),{input:o,changeInput:f=>{i(f),c();const l=f.trim();if(l.length<=n){s.current("");return}a.current=setTimeout(()=>s.current(l),r)},cancelPending:c}},eg=2,tg=({value:e,onValueChange:t,onSearch:n})=>{const{input:r,changeInput:o,cancelPending:i}=ol(e,t,eg,300),a=r!==""&&r===e,{t:s}=re();return u("div",{class:"flex flex-col gap-3",children:u("div",{class:"relative",children:[u("label",{class:"absolute left-0 flex h-full items-center px-2",for:"ijs-keyword",children:[u(oe,{"aria-hidden":!0,title:"Search by keyword",name:"magnifierSimple",class:Nt({"text-copy-neutral-icon":!a,"text-copy-accent-icon":a})}),u("span",{class:"sr-only",children:"Keyword"})]}),u("input",{autoComplete:"off",autocomplete:"off",name:"keyword",id:"ijs-keyword",type:"search",class:yn({hasValue:a,size:"unsized",class:"peer py-2 pl-10 pr-4"}),placeholder:s("type_to_search_jobs"),value:r,onKeyDown:c=>{if(n&&c.key==="Enter"){c.preventDefault(),i();const d=c.currentTarget.value.trim();t(d),n(d)}},onChange:c=>{o(c.currentTarget.value)}}),u("button",{type:"button",class:ge({variant:"neutral",size:"lg",position:"absolute",class:"bottom-0 right-0 top-0 h-full peer-placeholder-shown:hidden",icon:"only"}),onClick:()=>{o("")},children:u(oe,{name:"x"})})]})})},ng=({intervalMs:e,strings:t,class:n})=>{const[r,o]=D(0),[i,a]=D(!0),s=[...t,t[0]];return j(()=>{r===s.length&&(a(!1),o(0));const c=setTimeout(()=>{a(!0),o(d=>d+1)},e);return()=>clearTimeout(c)},[r,s.length,e]),u("div",{className:Nt("relative h-full w-full overflow-hidden",n),children:u("div",{className:Nt("absolute w-full",{"transition-transform duration-500 ease-in-out":i}),style:{height:`${100*s.length}%`,transform:`translateY(-${r*(100/s.length)}%)`},children:s.map((c,d)=>u("div",{className:"flex items-center whitespace-nowrap",style:{height:`${100/s.length}%`},children:c},d))})})},rg=(e,t)=>{j(()=>{const n=r=>{document.activeElement===e.current&&t(r)};return document.addEventListener("selectionchange",n),()=>document.removeEventListener("selectionchange",n)},[e,t])},Na=3,og=({value:e,onValueChange:t,options:n,onSearch:r})=>{const{input:o,changeInput:i,cancelPending:a}=ol(e,t,Na,1e3),s=o.trim(),c=s!==""&&s===e,{t:d}=re(),f=s.split(""),[l,h]=D(0),p=R(null);return rg(p,g=>{g.target instanceof HTMLInputElement&&h(g.target.scrollLeft)}),u("div",{class:"mb-2 flex flex-col gap-2",children:[u("div",{class:"relative",children:[u("label",{class:"absolute left-0 flex h-full items-center px-2",for:"ijs-keyword",children:[u(oe,{"aria-hidden":!0,title:"Search by keyword",name:"ai",class:Nt("duration-snappy transition-transform",{"text-copy-neutral-icon scale-90":!c,"text-copy-accent-icon":c})}),u("span",{class:"sr-only",children:"Keyword"})]}),u("input",{ref:p,autoComplete:"off",autocomplete:"off",name:"keyword",id:"ijs-keyword",type:"text",placeholder:n!=null&&n.suggestions?n.suggestions.join(", "):" ",class:yn({hasValue:c,size:"unsized",class:"peer px-10 py-2 tracking-tight !text-transparent placeholder:!text-transparent"}),style:{fontKerning:"none"},value:o,onChange:g=>{const v=g.currentTarget.value.trim();i(v)},onKeyDown:g=>{if(g.key==="Enter"){const v=g.currentTarget.value.trim();if(r){g.preventDefault(),a(),t(v),r(v);return}if(v.length<=Na)return;g.preventDefault(),a(),t(v)}}}),u("div",{"data-synced":c,class:"font-weight-input text-copy-neutral group pointer-events-none absolute inset-x-10 inset-y-0 flex overflow-hidden tracking-tight peer-placeholder-shown:right-0",children:s.length>0?u("div",{"aria-hidden":!0,class:"flex items-center whitespace-nowrap",style:{transform:`translateX(${-l}px)`},children:f.map((g,v)=>u("span",{style:{animationDelay:`${v*300/f.length}ms`},class:"group-data-[synced=true]:animate-ai-letter inline-block",children:g===" "?" ":g},s+v))}):n!=null&&n.suggestions?u(ng,{intervalMs:2e3,strings:n.suggestions,class:"opacity-30","aria-hidden":!0}):null}),u("button",{type:"button",class:ge({variant:"neutral",size:"lg",position:"absolute",class:"bottom-0 right-0 top-0 h-full peer-placeholder-shown:hidden",icon:"only"}),onClick:()=>{i("")},children:u(oe,{name:"x"})})]}),u("p",{class:"font-family-default font-style-default text-style-job-card-info text-copy-neutral-lowcontrast text-balance",children:d("ai_disclaimer")})]})},nr=Se({base:"fr flex min-h-8 min-w-0 items-center justify-center cursor-pointer text-style-tag rounded-interactive active:scale-95 transition-all duration-snappy pl-2 pr-2.5 py-1.5 gap-1",variants:{active:{true:"bg-lowest text-neutral-12 shadow-sm animate-appear-tag",false:"text-neutral-10 hover:text-neutral-12"}},defaultVariants:{active:!1}}),il="bg-neutral-3 rounded-interactive ring-neutral-3 mr-[3px] inline-flex min-w-0 max-w-full ring-[3px]",ig=({value:e,onValueChange:t})=>{const{t:n}=re();return u("div",{class:il,children:[u("button",{type:"button","aria-pressed":e==="list",class:nr({active:e==="list"}),onClick:()=>t("list"),children:[u(oe,{name:"list",class:"size-5 shrink-0"}),u("span",{children:n("list")})]}),u("button",{type:"button","aria-pressed":e==="map",class:nr({active:e==="map"}),onClick:()=>t("map"),children:[u(oe,{name:"map",class:"size-5 shrink-0"}),u("span",{children:n("map")})]})]})},ag=({state:e,onValueChange:t})=>{var o;const{t:n}=re(),r=e.query.trim()?"sort_most_relevant":((o=e.geo)==null?void 0:o.type)==="provided"&&e.geo.coords?"sort_closest":void 0;return r?u("div",{role:"group","aria-label":n("sort_by"),class:il,children:[u("button",{type:"button","aria-pressed":!e.resultOrder,class:nr({active:!e.resultOrder}),onClick:()=>t(void 0),children:n(r)}),u("button",{type:"button","aria-pressed":e.resultOrder==="newest",class:nr({active:e.resultOrder==="newest"}),onClick:()=>t("newest"),children:n("sort_newest")})]}):null};var sg=Array.isArray,si=sg,cg=si,lg=gr,ug=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dg=/^\w*$/;function fg(e,t){if(cg(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||lg(e)?!0:dg.test(e)||!ug.test(e)||t!=null&&e in Object(t)}var pg=fg,hg=Zc,vg=hr,gg="[object AsyncFunction]",mg="[object Function]",_g="[object GeneratorFunction]",yg="[object Proxy]";function bg(e){if(!vg(e))return!1;var t=hg(e);return t==mg||t==_g||t==gg||t==yg}var wg=bg,xg=vr,$g=xg["__core-js_shared__"],Sg=$g,Gr=Sg,ja=(function(){var e=/[^.]+$/.exec(Gr&&Gr.keys&&Gr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Cg(e){return!!ja&&ja in e}var Eg=Cg,Og=Function.prototype,kg=Og.toString;function Ag(e){if(e!=null){try{return kg.call(e)}catch{}try{return e+""}catch{}}return""}var Tg=Ag,Pg=wg,Rg=Eg,Dg=hr,Lg=Tg,Ig=/[\\^$.*+?()[\]{}|]/g,Mg=/^\[object .+?Constructor\]$/,Ng=Function.prototype,jg=Object.prototype,Fg=Ng.toString,Vg=jg.hasOwnProperty,Hg=RegExp("^"+Fg.call(Vg).replace(Ig,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ug(e){if(!Dg(e)||Rg(e))return!1;var t=Pg(e)?Hg:Mg;return t.test(Lg(e))}var Wg=Ug;function zg(e,t){return e==null?void 0:e[t]}var qg=zg,Bg=Wg,Kg=qg;function Gg(e,t){var n=Kg(e,t);return Bg(n)?n:void 0}var al=Gg,Jg=al,Yg=Jg(Object,"create"),mr=Yg,Fa=mr;function Zg(){this.__data__=Fa?Fa(null):{},this.size=0}var Xg=Zg;function Qg(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var em=Qg,tm=mr,nm="__lodash_hash_undefined__",rm=Object.prototype,om=rm.hasOwnProperty;function im(e){var t=this.__data__;if(tm){var n=t[e];return n===nm?void 0:n}return om.call(t,e)?t[e]:void 0}var am=im,sm=mr,cm=Object.prototype,lm=cm.hasOwnProperty;function um(e){var t=this.__data__;return sm?t[e]!==void 0:lm.call(t,e)}var dm=um,fm=mr,pm="__lodash_hash_undefined__";function hm(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=fm&&t===void 0?pm:t,this}var vm=hm,gm=Xg,mm=em,_m=am,ym=dm,bm=vm;function Jt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Jt.prototype.clear=gm;Jt.prototype.delete=mm;Jt.prototype.get=_m;Jt.prototype.has=ym;Jt.prototype.set=bm;var wm=Jt;function xm(){this.__data__=[],this.size=0}var $m=xm;function Sm(e,t){return e===t||e!==e&&t!==t}var Cm=Sm,Em=Cm;function Om(e,t){for(var n=e.length;n--;)if(Em(e[n][0],t))return n;return-1}var _r=Om,km=_r,Am=Array.prototype,Tm=Am.splice;function Pm(e){var t=this.__data__,n=km(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Tm.call(t,n,1),--this.size,!0}var Rm=Pm,Dm=_r;function Lm(e){var t=this.__data__,n=Dm(t,e);return n<0?void 0:t[n][1]}var Im=Lm,Mm=_r;function Nm(e){return Mm(this.__data__,e)>-1}var jm=Nm,Fm=_r;function Vm(e,t){var n=this.__data__,r=Fm(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Hm=Vm,Um=$m,Wm=Rm,zm=Im,qm=jm,Bm=Hm;function Yt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Yt.prototype.clear=Um;Yt.prototype.delete=Wm;Yt.prototype.get=zm;Yt.prototype.has=qm;Yt.prototype.set=Bm;var Km=Yt,Gm=al,Jm=vr,Ym=Gm(Jm,"Map"),Zm=Ym,Va=wm,Xm=Km,Qm=Zm;function e_(){this.size=0,this.__data__={hash:new Va,map:new(Qm||Xm),string:new Va}}var t_=e_;function n_(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var r_=n_,o_=r_;function i_(e,t){var n=e.__data__;return o_(t)?n[typeof t=="string"?"string":"hash"]:n.map}var yr=i_,a_=yr;function s_(e){var t=a_(this,e).delete(e);return this.size-=t?1:0,t}var c_=s_,l_=yr;function u_(e){return l_(this,e).get(e)}var d_=u_,f_=yr;function p_(e){return f_(this,e).has(e)}var h_=p_,v_=yr;function g_(e,t){var n=v_(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var m_=g_,__=t_,y_=c_,b_=d_,w_=h_,x_=m_;function Zt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Zt.prototype.clear=__;Zt.prototype.delete=y_;Zt.prototype.get=b_;Zt.prototype.has=w_;Zt.prototype.set=x_;var $_=Zt,sl=$_,S_="Expected a function";function ci(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(S_);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(ci.Cache||sl),n}ci.Cache=sl;var C_=ci,E_=C_,O_=500;function k_(e){var t=E_(e,function(r){return n.size===O_&&n.clear(),r}),n=t.cache;return t}var A_=k_,T_=A_,P_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,R_=/\\(\\)?/g,D_=T_(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(P_,function(n,r,o,i){t.push(o?i.replace(R_,"$1"):r||n)}),t}),L_=D_;function I_(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var M_=I_,Ha=ai,N_=M_,j_=si,F_=gr,Ua=Ha?Ha.prototype:void 0,Wa=Ua?Ua.toString:void 0;function cl(e){if(typeof e=="string")return e;if(j_(e))return N_(e,cl)+"";if(F_(e))return Wa?Wa.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var V_=cl,H_=V_;function U_(e){return e==null?"":H_(e)}var W_=U_,z_=si,q_=pg,B_=L_,K_=W_;function G_(e,t){return z_(e)?e:q_(e,t)?[e]:B_(K_(e))}var J_=G_,Y_=gr;function Z_(e){if(typeof e=="string"||Y_(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var X_=Z_,Q_=J_,ey=X_;function ty(e,t){t=Q_(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[ey(t[n++])];return n&&n==r?e:void 0}var ny=ty,ry=ny;function oy(e,t,n){var r=e==null?void 0:ry(e,t);return r===void 0?n:r}var iy=oy;const ll=Bo(iy),Un=new Map,ln=new Set,ko="isdk-saved-jobs-change",rr=e=>`${Hl}:${e}`,ul=e=>typeof e=="number"&&Number.isSafeInteger(e)&&e>0;function Wt(e){if(typeof window>"u")return[];if(ln.has(e))return[...Un.get(e)??[]];let t;try{t=window.localStorage.getItem(rr(e))}catch{return ln.add(e),[...Un.get(e)??[]]}let n;try{n=t===null?[]:JSON.parse(t)}catch{n=[]}const r=Array.isArray(n)?[...new Set(n.filter(ul))]:[];return Un.set(e,r),[...r]}function ay(e,t){return Wt(e).includes(t)}function sy(e,t){if(Un.set(e,t),!ln.has(e))try{t.length?window.localStorage.setItem(rr(e),JSON.stringify(t)):window.localStorage.removeItem(rr(e))}catch{ln.add(e)}window.dispatchEvent(new CustomEvent(ko,{detail:e}))}function dl(e,t){if(!ul(t))throw new TypeError("Job id must be a positive safe integer");if(typeof window>"u")return!1;const n=Wt(e),r=!n.includes(t);return sy(e,r?[...n,t]:n.filter(o=>o!==t)),r}function li(e,t){if(typeof window>"u")return()=>{};const n=o=>{o instanceof CustomEvent&&o.detail===e&&t(Wt(e))},r=o=>{if(!ln.has(e)){try{if(o.storageArea&&o.storageArea!==window.localStorage)return}catch{return}(o.key===null||o.key===rr(e))&&t(Wt(e))}};return window.addEventListener(ko,n),window.addEventListener("storage",r),()=>{window.removeEventListener(ko,n),window.removeEventListener("storage",r)}}function cy(e){const t=new URL(e);return t.searchParams.set("saved",""),t.href}const bn=Ye(void 0);function ui(e){const[t,n]=D();return se(()=>{const r=li(e,n);return n(Wt(e)),r},[e]),t}function ly({buttonRef:e,onClick:t}){const n=me(bn);if(!n)throw new Error("Saved jobs context is required");const r=ui(n.scope),{t:o}=re(),i=(r==null?void 0:r.length)??0;return u("button",{ref:e,type:"button",class:ge({variant:"neutral",size:"lg",class:"ring-neutral-7 focus-visible:outline-highest ring-px self-start focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2"}),onClick:t,children:i?o("view_saved_jobs_count",{count:i}):o("view_saved_jobs")})}function fl({id:e,title:t,unavailable:n=!1}){const r=me(bn);if(!r)throw new Error("Saved jobs context is required");const o=ui(r.scope),{t:i}=re(),a=(o==null?void 0:o.includes(e))??!1;return u("button",{type:"button","data-save-job":e,"aria-pressed":a,"aria-label":n?i("remove_unavailable_saved_job",{id:e}):i(a?"remove_saved_job":"save_job",{title:t}),class:ge({variant:n?"accent":a?"primary":"neutral",position:n?"relative":"absolute",size:n?"sm":"unsized",class:`${n?"shrink-0 underline underline-offset-4":`rounded-interactive right-4 top-4 p-2 transition-transform ${a?"":"bg-job-card-bg ring-job-card-stroke ring-px"}`} focus-visible:outline-highest focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2`}),onClick:s=>{s.preventDefault(),s.stopPropagation();const c=dl(r.scope,e);r.analytics.log({event:"SAVE_JOB",properties:{job_id:e,saved:c}})},children:n?i("remove"):u(oe,{"aria-hidden":!0,name:a?"bookmark-filled":"bookmark"})})}const nn=({chars:e})=>u("span",{style:{width:e+"ch"},class:"rounded-job-tag block h-[1lh] min-h-[1em] bg-[currentColor] opacity-25"}),pl=Se({base:"ijs-job relative rounded-job-card bg-job-card-bg ring-width-job-card ring-job-card-stroke flex gap-4 fr ease-expo-out min-w-0 p-4 transition-all duration-medium",variants:{interactive:{true:"active:bg-job-card-bg-active active:ring-job-card-stroke-active hover:bg-job-card-bg-active hover:ring-job-card-stroke-active active:scale-[0.975]",false:"animate-skeleton"}},defaultVariants:{interactive:!0}}),hl=Se({base:"font-style-job-heading font-weight-job-heading text-copy-neutral font-family-job-heading text-pretty",variants:{size:{sm:"text-style-filter",default:"text-style-job-heading"}},defaultVariants:{size:"default"}}),Ln=({job:e,property:t})=>{if(!t)return null;const n=ll(e.raw,t.key);return t.transform?t.transform(n):n},uy=({job:e,config:t="hidden"})=>t==="hidden"?null:u("div",{class:"rounded-logo h-12 flex-none overflow-hidden",style:{aspectRatio:t.replace(":","/")},children:e.company.logo?u("img",{src:e.company.logo,alt:e.company.name,class:"h-full w-full select-none object-contain [-webkit-user-drag:none]"}):null}),Jr=e=>Array.isArray(e)?e:[e],lt="[+-]?(?:\\d*\\.\\d+|\\d+)(?:[eE][+-]?\\d+)?",rn=`${lt}%`,Je=`${lt}%?`,di=`(?:\\s*\\/\\s*${Je})?`,vl=`(?:\\s*,\\s*${Je})?`,dy=`${Je}\\s+${Je}\\s+${Je}${di}`,fy=`(?:${lt}\\s*,\\s*${lt}\\s*,\\s*${lt}|${rn}\\s*,\\s*${rn}\\s*,\\s*${rn})${vl}`,py=`${lt}\\s+${Je}\\s+${Je}${di}`,hy=`${lt}\\s*,\\s*${rn}\\s*,\\s*${rn}${vl}`,vy=`${Je}\\s+${Je}\\s+${lt}${di}`,gy=new RegExp(`^(?:#(?:[a-fA-F0-9]{3}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})|var\\(--[a-z0-9-]+\\)|(?:rgb|rgba)\\(\\s*(?:${dy}|${fy})\\s*\\)|(?:hsl|hsla)\\(\\s*(?:${py}|${hy})\\s*\\)|oklch\\(\\s*${vy}\\s*\\))$`),my=1e3*60*60*24,fi=({job:e,config:t,onJobClick:n,size:r,distanceUnit:o})=>{var $,x,C,S,E,A;const{t:i,locale:a}=re(),s=me(bn),c=e.distanceMeters===null?null:i("distance_away",{distance:Ah(e.distanceMeters,o??"miles",a)}),d=Ln({job:e,property:t.eyebrow}),f=($=t.accent)==null?void 0:$.rules.find(I=>Jr(ll(e.raw,I.key)).includes(I.value)),l=f&&gy.test(f.color)?f:void 0,h=t.subheading?Ln({job:e,property:t.subheading}):null,p=t.infoTags.flatMap(I=>Jr(Ln({job:e,property:I}))).filter(Boolean),g=Jr((x=t.overrides)!=null&&x.salary?Ln({job:e,property:t.overrides.salary}):e.pay).filter(Boolean),v=t.postedDate??"show",y=(C=t.overrides)!=null&&C.baseUrl?t.overrides.baseUrl(e.id.toString()):e.href,m=t.newUnderDays??7,_=e.createdAt?new Date(e.createdAt).getTime()>Date.now()-m*my:!1,b=I=>{var P,M;n==null||n(e),(M=(P=t.overrides)==null?void 0:P.onClick)==null||M.call(P,I)},w=u("a",{onMouseEnter:(S=t.overrides)==null?void 0:S.onMouseEnter,onClick:b,href:y,"data-accent":l==null?void 0:l.value,style:l?{"--ijs-card-accent":l.color}:void 0,target:t.openJob==="redirect-new-tab"?"_blank":void 0,class:pl({class:s?"pr-20":void 0}),children:[l&&u("span",{"aria-hidden":"true",class:"pointer-events-none absolute inset-0 overflow-hidden [border-radius:inherit]",children:u("span",{"data-accent-style":((E=t.accent)==null?void 0:E.style)??"band",class:((A=t.accent)==null?void 0:A.style)==="edge"?"absolute inset-y-0 left-0 w-[4px]":"absolute inset-x-0 top-0 h-[4px]",style:{backgroundColor:"var(--ijs-card-accent)"}})}),u("div",{class:"flex min-w-0 flex-1 flex-col gap-4",children:[u("div",{class:"gap-logo flex items-center",children:[u(uy,{job:e,config:r!=="sm"?t.logo:void 0}),u("div",{class:"flex flex-col items-start gap-1",children:[u("div",{class:"order-2 flex flex-col gap-1",children:[e.match?u("p",{class:"text-style-job-card text-tag-accent-strong-bg flex items-center ",children:[u(oe,{name:"ai",class:"size-4 inline-block"}),u("span",{children:e.match})]}):null,d?u("p",{class:"text-style-job-card-info text-copy-job-info",children:d}):null,u("p",{class:hl({size:r}),children:[e.title.trim(),_&&v!=="hide"&&u(V,{children:[" ",u("span",{"aria-hidden":!0,class:"ring-px ring-tag-accent-strong-bg rounded-job-card text-tag-accent-strong-bg font-weight-tag not-sr-only order-1 inline-block px-2 py-1 align-middle text-[10px] leading-none",children:i("new")})]})]}),h?u("p",{class:"text-style-job-card text-copy-neutral-lowcontrast",children:h}):null]}),v==="show"?u("p",{class:"text-style-job-card-info text-copy-job-info order-1",children:[i("posted")," ",e.relativePostedDate]}):null]})]}),u("div",{class:"flex min-w-0 flex-col items-start gap-2",children:[c?u("p",{class:"text-style-job-card-info text-copy-job-info flex items-center gap-1",children:[u(oe,{name:"target-location",class:"size-4 flex-none","aria-hidden":!0}),c]}):null,u("div",{class:"flex min-w-0 max-w-full flex-wrap items-center gap-2",children:g.map((I,P)=>u("span",{class:Lt({variant:"monetaryWeak",size:"xs"}),children:I},P))}),p.length>0&&u("ul",{class:"flex min-w-0 max-w-full flex-wrap items-center gap-2",children:p.map(I=>u("li",{class:Lt({size:"xs",class:"max-w-full truncate"}),children:I},I))})]})]}),r==="sm"?u("div",{"aria-hidden":!0,class:"absolute right-1 top-1/2 -translate-y-1/2 transform",children:u(oe,{name:"chevron-right",class:"size-5 text-copy-neutral-icon"})}):u("div",{"aria-hidden":!0,class:"flex items-center",children:u(oe,{name:"chevron-right",class:"text-copy-neutral-icon"})})]});return s?u("div",{class:"relative",children:[w,u(fl,{id:e.id,title:e.title})]}):w},pi=({config:e,animationDelay:t,seed:n})=>{const r=e.logo??"hidden",o=e.postedDate??"show";return u("div",{"aria-hidden":!0,style:{animationDelay:t+"s"},class:pl({interactive:!1}),children:[u("div",{class:"flex flex-1 flex-col gap-4",children:[u("div",{class:"flex items-center gap-4",children:[r==="hidden"?null:u("div",{class:"rounded-logo bg-copy-neutral h-12 opacity-25",style:{aspectRatio:r.replace(":","/")}}),u("div",{class:"flex flex-col items-start gap-1",children:[o==="show"?u("p",{class:"text-style-job-card-info text-copy-job-info",children:u(nn,{chars:12})}):null,u("div",{class:"flex flex-col gap-1",children:[u("p",{class:"text-style-job-heading font-style-job-heading font-weight-job-heading text-copy-neutral font-family-job-heading",children:u(nn,{chars:13+(n+5)*n%7})}),e.subheading!==null?u("p",{class:"text-style-job-card text-copy-neutral-lowcontrast",children:u(nn,{chars:7+n*n%3})}):null]})]})]}),u("div",{class:"flex flex-col items-start gap-2",children:[n%2===0&&u("span",{class:Lt({variant:"neutralWeak",size:"xs",class:"h-[1lh] min-h-[1em] w-[10ch]"})}),u("div",{class:"flex items-center gap-2",children:[u("span",{class:Lt({variant:"neutralWeak",size:"xs",class:"h-[1lh] min-h-[1em] w-[6ch]"})}),u("span",{class:Lt({variant:"neutralWeak",size:"xs",class:"h-[1lh] min-h-[1em] w-[8ch]"})})]})]})]}),u("div",{"aria-hidden":!0,class:"flex items-center",children:u(oe,{name:"chevron-right",class:"text-copy-neutral-icon"})})]})},_y=({state:e,fetchNextPage:t,config:n,remainingItems:r})=>{const{t:o}=re(),i=Math.min(_t,r);return e==="revalidating"?u("ul",{class:"flex flex-col gap-3","aria-hidden":!0,children:Array.from({length:_t}).map((a,s)=>u("li",{children:u(pi,{seed:s,animationDelay:(s-4)*.1,config:n})},s))}):u("button",{type:"button",class:ge({variant:"neutral",class:"w-full max-w-[45rem] self-center py-2"}),onClick:t,children:[o("load_more_count",{count:i})," ",o("of_remaining_count",{count:r})]})},yy=({state:e,rpcClient:t,jobCardConfig:n,initialData:r,onResultsUpdate:o,onJobClick:i,onPaginate:a,mode:s,afterResults:c,prioritySegment:d,i18n:f,distanceUnit:l})=>{const{t:h}=re(),p=R(),[g,v]=D();return u(V,{children:[u("p",{class:"sr-only",role:"status",children:g===void 0?"":g===0?h("no_jobs_found"):h("jobs_found",{count:g})}),Array.from({length:e.page}).map((y,m)=>{const _=m===e.page-1;return u(on,{Fallback:et,children:u(by,{state:e,rpcClient:t,page:m+1,isFirst:m===0,isLast:_,fetchNextPage:()=>{p.current=e.page+1,a(e.page+1)},focusPage:p,jobCardConfig:n,initialData:r,onResultsUpdate:b=>{v(b.totalCount),o==null||o(b)},onJobClick:i,mode:s,afterResults:c,prioritySegment:d,i18n:f,distanceUnit:l},m)},m)})]})},za=({page:e})=>{const{t}=re();return u("div",{"aria-hidden":!0,class:"text-copy-neutral-lowcontrast mx-auto flex w-full max-w-[45rem] gap-2 py-4",onClick:n=>{n.preventDefault()},children:[u("span",{class:"bg-wavy bg-neutral-3 flex-1 opacity-10"}),u("span",{class:"text-style-tag justify-center text-center",children:[t("page")," ",e]}),u("span",{class:"bg-wavy bg-neutral-3 flex-1 opacity-10"})]})},by=({state:e,rpcClient:t,page:n,isFirst:r,isLast:o,fetchNextPage:i,focusPage:a,jobCardConfig:s,initialData:c,onResultsUpdate:d,onJobClick:f,afterResults:l,prioritySegment:h,i18n:p,distanceUnit:g})=>{const{t:v}=re(),y=n===1?c:void 0,{data:m,error:_,queryState:b,swr:w}=pn(Ft(Zn({state:e,baseKey:n.toString()}),()=>ms({rpcClient:t,state:e,page:n,t:v,prioritySegment:h,locale:p?p.locale:void 0,fallbackLocale:p?p.fallbackLocale:void 0}),{...Gn,fallbackData:y}));j(()=>{m&&r&&d({totalCount:m.pagination.total})},[m,r,d]);const $=R(null);switch(j(()=>{var x,C;!m||a.current!==n||(a.current=void 0,(!document.activeElement||document.activeElement===document.body)&&((C=(x=$.current)==null?void 0:x.querySelector("a"))==null||C.focus({preventScroll:!0})))},[m,a,n]),b){case"idle":return null;case"loading":return u(V,{children:[r?u("div",{class:"flex w-full max-w-[45rem] items-center justify-between gap-3 self-center",children:[u("p",{class:"animate-skeleton text-copy-neutral-lowcontrast text-style-tag m-0 min-w-0 max-w-[25%] flex-none p-0 text-left [overflow-wrap:anywhere]",children:u(nn,{chars:8})}),u("div",{class:"flex min-w-0 flex-1 justify-end",children:l})]}):u(za,{page:n}),u("ul",{class:"flex w-full max-w-[45rem] flex-col gap-3 self-center","aria-hidden":!0,children:Array.from({length:_t}).map((x,C)=>u("li",{children:u(pi,{seed:C,animationDelay:(C-_t)*.1,config:s})},C))})]});case"error":return u(et,{error:new Error(v("jobs_loading_error"),{cause:_}),resetError:()=>w.mutate()});case"revalidating":case"loaded":{if(qa(m.pagination.current_page===n,"Received wrong page from server"),m.pagination.total===0)return u("div",{class:"mx-auto flex flex-col items-center gap-2 px-2 py-4 text-center",children:[u(oe,{"aria-hidden":!0,name:"magnifier",class:"text-copy-neutral-lowcontrast"}),u("div",{class:"flex flex-col items-center gap-1",children:[u("p",{class:"text-copy-neutral text-style-job-heading",children:v("no_jobs_found")}),u("p",{class:"text-copy-neutral-lowcontrast text-style-tag [text-wrap:pretty]",children:v("no_jobs_found_description")})]})]});const x=m.pagination.last_page!==m.pagination.current_page,C=n*_t,S=Math.max(m.pagination.total-C,0),E=A=>{f(A,n)};return u(V,{children:[r?u("div",{class:"flex w-full max-w-[45rem] items-center justify-between gap-3 self-center",children:[u("p",{class:"text-copy-neutral-lowcontrast text-style-tag m-0 min-w-0 max-w-[25%] flex-none p-0 text-left [overflow-wrap:anywhere]",children:v("jobs_found",{count:m.pagination.total})}),u("div",{class:"flex min-w-0 flex-1 justify-end",children:l})]}):u(za,{page:n}),u("ul",{ref:$,"aria-label":`Page ${n}`,class:"flex w-full max-w-[45rem] flex-col gap-3 self-center",children:m.results.map(A=>u("li",{class:"ease-expo-out duration-slow transition-opacity",style:{opacity:b==="revalidating"?.33:1},children:u(fi,{job:A,onJobClick:E,config:s,distanceUnit:g})},A.id))}),x&&o&&u(_y,{state:b,fetchNextPage:i,config:s,remainingItems:S})]})}default:At(b)}},wy=zo(()=>Promise.resolve().then(()=>require("./map-sXHS6vhg.cjs")).then(e=>e.Map)),xy=({state:e,rpcClient:t,mapConfig:n,onGeoChange:r,afterResults:o,onJobClick:i,jobCardConfig:a,prioritySegment:s,i18n:c,distanceUnit:d})=>{var m,_;const{t:f}=re(),[l,h]=D(new AbortController),p=Xs("(max-width: 767px)"),g=H(b=>{r(b),l.abort(),h(new AbortController)},[r,l]),v=pn(Ft(Zn({state:e,baseKey:"map",mode:e.mode}),()=>Jl({rpcClient:t,state:e,t:f,signal:l.signal,prioritySegment:s,locale:c?c.locale:void 0,fallbackLocale:c?c.fallbackLocale:void 0}),Gn));if(v.queryState==="error")return u(et,{error:new Error(f("jobs_loading_error"),{cause:v.error}),resetError:()=>v.swr.mutate()});const y=v.queryState==="loaded"||v.queryState==="revalidating";return u(V,{children:[u("div",{class:"flex items-center justify-between gap-3",children:[u("p",{class:"text-copy-neutral-lowcontrast text-style-tag m-0 min-w-0 max-w-[25%] flex-none p-0 text-left [overflow-wrap:anywhere]",children:y?v.data.results.length!==0&&f("map_jobs_showing",{count:v.data.results.length}):u("div",{class:"animate-skeleton",children:u(nn,{chars:8})})}),u("div",{class:"flex min-w-0 flex-1 justify-end",children:o})]}),u("div",{class:"theme-fill:bg-neutral-2 theme-stroke:bg-lowest ring-px theme-fill:ring-neutral-3 theme-stroke:ring-neutral-3 theme-soft:rounded-lg theme-rounded:rounded-xl relative flex h-auto flex-col items-stretch overflow-hidden md:h-[70svh] md:flex-row",children:[u("div",{class:"aspect-square flex-1 md:order-2 md:aspect-auto md:min-w-80",children:y?u(Tt,{fallback:u("div",{class:"animate-skeleton bg-neutral-6 h-full w-full"}),children:u(wy,{config:n,mapData:v,autoFit:((m=e.geo)==null?void 0:m.type)!=="bounds",onBoundsChange:g})}):u("div",{class:"animate-skeleton bg-neutral-6 h-full w-full"})}),u("ul",{class:"flex h-full w-full snap-x snap-proximity scroll-px-4 gap-3 overflow-auto p-4 md:order-1 md:max-w-xl md:flex-col",children:[((_=v.data)==null?void 0:_.results.length)===0?u("div",{class:"mx-auto flex h-full w-full flex-col items-center justify-center gap-2 text-center",children:[u(oe,{"aria-hidden":!0,name:"magnifier",class:"text-copy-neutral-lowcontrast"}),u("div",{class:"flex flex-col items-center gap-1",children:[u("p",{class:"text-copy-neutral text-style-job-heading",children:f("no_jobs_found")}),u("p",{class:"text-copy-neutral-lowcontrast text-style-tag [text-wrap:pretty]",children:f("no_jobs_found_description")})]})]}):null,y?v.data.results.map(b=>u("li",{class:"ease-expo-out duration-slow min-w-[calc(100%-1rem)] snap-start transition-opacity",style:{opacity:v.queryState==="revalidating"?.33:1},children:u(fi,{job:b,onJobClick:w=>i(w,1),config:a,size:p?"sm":void 0,distanceUnit:d})},b.id)):Array.from({length:6}).map((b,w)=>u("li",{children:u(pi,{seed:w,animationDelay:(w-6)*.1,config:a})},w))]})]})]})},$y=e=>{var r;const t=e.state.view,n=u("div",{class:"flex min-w-0 max-w-full flex-wrap items-center justify-end gap-3",children:[(r=e.mapConfig)!=null&&r.enabled?u(ig,{value:t,onValueChange:e.onViewChange}):null,u(ag,{state:e.state,onValueChange:e.onResultOrderChange})]});return t==="list"?u(yy,{afterResults:n,...e}):u(xy,{...e,afterResults:n})};function Sy({rpcClient:e,filters:t,config:n,distanceUnit:r,onJobClick:o,onSearch:i}){const a=me(bn);if(!a)throw new Error("Saved jobs context is required");const{scope:s}=a,c=ui(s),{t:d,locale:f}=re(),[l,h]=D(null),[p,g]=D(),[v,y]=D(0),m=R(null),_=R(),b=R(!1);se(()=>{(l==null?void 0:l.filters)===t&&l.ids.some(S=>c==null?void 0:c.includes(S))?b.current=!0:(c==null?void 0:c.length)===0&&b.current&&i()},[c,l,t,i]),j(()=>{if(!c)return;const S=new AbortController,E=li(s,()=>S.abort());return g(void 0),Yl({rpcClient:e,ids:c,filters:t,t:d,locale:f,signal:S.signal}).then(A=>{S.signal.aborted||h({jobs:A,ids:c,filters:t})}).catch(A=>{S.signal.aborted||g(A)}),()=>{E(),S.abort()}},[e,s,c,t,d,f,v]);const w=(l==null?void 0:l.filters)===t?l.jobs.filter(S=>c==null?void 0:c.includes(S.id)):void 0,$=b.current&&(c==null?void 0:c.length)===0||c===void 0||l===null||l.filters!==t||c.some(S=>!l.ids.includes(S)),x=!p&&!$?c.filter(S=>!(w!=null&&w.some(E=>E.id===S))):[],C=[...(w==null?void 0:w.map(S=>S.id))??[],...x];return se(()=>{var E,A,I;if(_.current===void 0)return;(I=(_.current==="heading"?null:(E=m.current)==null?void 0:E.querySelector(`[data-save-job="${_.current}"]`))??((A=m.current)==null?void 0:A.querySelector("h2")))==null||I.focus(),_.current=void 0},[c,l]),u("div",{ref:m,class:"flex flex-col gap-4",onClickCapture:S=>{if(!(S.target instanceof Element))return;const E=S.target.closest("button[data-save-job]");if(!E||E.getAttribute("aria-pressed")!=="true")return;const A=C.indexOf(Number(E.dataset.saveJob));_.current=C[A+1]??C[A-1]??"heading"},children:[u("h2",{tabIndex:-1,class:"text-style-job-heading text-copy-neutral",children:!$&&c.length===0?d("no_saved_jobs"):d("saved_jobs_title")}),u("p",{role:"status",class:"sr-only",children:$||p?"":d("jobs_found",{count:c.length})}),p?u(et,{error:new Error(d("jobs_loading_error"),{cause:p}),resetError:()=>y(v+1)}):$&&!(w!=null&&w.length)?u("p",{class:"text-copy-neutral",children:d("loading_jobs")}):C.length?u("ul",{class:"flex w-full max-w-[45rem] flex-col gap-3 self-center",children:[w==null?void 0:w.map(S=>u("li",{children:u(fi,{job:S,config:n,distanceUnit:r,onJobClick:E=>o(E,1)})},S.id)),x.map(S=>u("li",{class:"rounded-job-card bg-job-card-bg ring-width-job-card ring-job-card-stroke flex items-center justify-between gap-4 p-4",children:[u("p",{class:hl(),children:d("saved_job_unavailable")}),u(fl,{id:S,title:d("saved_job_unavailable"),unavailable:!0})]},S))]}):null,u("button",{type:"button",class:ge({variant:"primary",size:"lg",class:"focus-visible:outline-highest self-start focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2"}),onClick:i,children:d("search_jobs")})]})}const or=(e,t="value")=>e.reduce((n,r)=>{switch(r.select){case"one":{const o=r.value??r[t],i=typeof o=="string"?o:o==null?void 0:o[0];n[r.key]={select:r.select,value:i};break}case"many":{const o=r.value??r[t],i=typeof o=="string"?[o]:Array.isArray(o)?o:[];n[r.key]={select:r.select,value:i};break}default:At(r.select)}return n},{}),Wn=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>{const r=n==null?void 0:n.value;return[t,Array.isArray(r)?r:r?[r]:[]]}).filter(([,t])=>t!==void 0&&t.length>0)),Yr=e=>(e==null?void 0:e.type)==="bounds"?void 0:e,Cy=(e,t,n)=>{var o;const r=Wn(e.filters);return n&&(r._locale=n),((o=e.geo)==null?void 0:o.type)==="provided"&&e.geo.coords&&(r.geolocation={type:"provided",lat:e.geo.coords.lat,lng:e.geo.coords.lng,radius:e.geo.radius,unit:t,...e.geo.label?{label:e.geo.label}:{}}),r},Ey=({rpcClient:e,properties:t,analytics:n,initialData:r,onStateChange:o,params:i})=>{var He,Ce,ue,fe,Pe,Ue,st,wt,xt,Re,vt,We,W,Y,Z,X,ce;const{t:a}=re(),s=R(null),c=J(()=>or(t,"defaultValue"),[t]),[d,f]=D(!0),[l,h]=D(()=>typeof i.initialState=="function"?i.initialState(i):i.initialState),p=i.applyFiltersOn==="submit",[g,v]=D(l),y=p?g:l,m=p?"form":"div",[_,b]=D(0),[w,$]=D((He=i.savedJobs)!=null&&He.enabled?void 0:!1),x=H(T=>{const O=new URL(window.location.href);T?O.searchParams.set("saved",""):O.searchParams.delete("saved"),window.history.replaceState(window.history.state,"",O),$(T)},[]);se(()=>{var O;if(!((O=i.savedJobs)!=null&&O.enabled))return;const T=()=>$(new URLSearchParams(window.location.search).has("saved"));return T(),window.addEventListener("popstate",T),()=>window.removeEventListener("popstate",T)},[(Ce=i.savedJobs)==null?void 0:Ce.enabled]);const C=H(()=>{var T;(T=i.savedJobs)!=null&&T.enabled&&x(!1)},[(ue=i.savedJobs)==null?void 0:ue.enabled,x]),S=R(null),E=R(),A=H(()=>{E.current="toggle",C()},[C]);se(()=>{var T,O,F;w===!0&&E.current==="heading"?((O=(T=s.current)==null?void 0:T.querySelector("h2"))==null||O.focus(),E.current=void 0):w===!1&&E.current==="toggle"&&((F=S.current??s.current)==null||F.focus(),E.current=void 0)},[w]);const[I,P]=D(0),{onJobClick:M,analyticsPaginate:L}=Oy({appRef:s,analytics:n,state:l,hasInteracted:!d,totalCount:I,defaultFilters:c}),z=H(T=>{h(O=>{if(O.page===T)return O;const F={...O,page:T};return o==null||o(F),F}),L(T)},[L,o]),B=H(T=>{h(O=>{const F={...O,view:T};return o==null||o(F),F})},[o]),N=H(T=>{if(p){v(T);return}h(O=>{const F=T(O);return F===O?O:(C(),f(!1),o==null||o(F),F)})},[p,C,o]),K=H(T=>{N(O=>{var F;return O.query===T?O:{...O,query:T,geo:Yr(O.geo),page:1,mode:(F=i.naturalLanguageSearch)!=null&&F.enabled?"vector":"query"}})},[N,(fe=i.naturalLanguageSearch)==null?void 0:fe.enabled]),q=(T=g.query)=>{var F;const O={...g,view:l.view,resultOrder:l.resultOrder,query:T,geo:T===g.query?g.geo:Yr(g.geo),page:1,mode:(F=i.naturalLanguageSearch)!=null&&F.enabled?"vector":"query"};C(),f(!1),v(O),h(O),o==null||o(O)},le=H(T=>{v(O=>({...O,geo:T})),f(!1),h(O=>{const F={...O,geo:T,page:1};return o==null||o(F),F})},[o]),at=H(()=>{C(),p&&b(T=>T+1),f(!1),h(T=>{const O={...T,filters:or(t,"defaultValue"),query:"",geo:void 0,page:1,resultOrder:void 0};return v(O),o==null||o(O),O})},[o,t,C,p]),Te=H(T=>{h(O=>{if(O.resultOrder===T)return O;f(!1);const F={...O,resultOrder:T,page:1};return o==null||o(F),F})},[o]),_e=J(()=>(e.environment,new Map),[e.environment]);return u(td,{value:{provider:()=>_e},children:u("div",{ref:s,tabIndex:(Pe=i.savedJobs)!=null&&Pe.enabled?-1:void 0,class:Nt("ijs-app font-family-default font-weight-default font-style-default flex min-h-screen flex-col gap-4",{"reduce-motion":(Ue=i.theme.accessibility)==null?void 0:Ue.reducedMotion},go(i.theme)),children:[u(on,{Fallback:et,children:u(m,{class:"flex flex-col gap-2",onSubmit:p?T=>{T.preventDefault();const O=T.currentTarget.querySelector('input[name="keyword"]');q(O==null?void 0:O.value.trim())}:void 0,children:[u("div",{class:"px-4",children:u("div",{class:"bg-section-strong-bg ring-section-weak-stroke rounded-section ring-px lg:ring-width-section flex flex-col gap-4 p-4 md:flex-row",children:[u("section",{class:"flex flex-1 flex-col gap-1",children:[u("p",{class:"text-style-filter text-copy-neutral font-style-filter font-weight-filter",children:a("search_label")}),(st=i.naturalLanguageSearch)!=null&&st.enabled?u(og,{value:y.query,onValueChange:K,options:i.naturalLanguageSearch,onSearch:p?q:(wt=i.savedJobs)!=null&&wt.enabled?C:void 0},_):i.enableKeywordSearch?u(tg,{value:y.query,onValueChange:K,onSearch:p?q:(xt=i.savedJobs)!=null&&xt.enabled?C:void 0},_):null]}),(Re=i.geolocation)!=null&&Re.enabled?u("section",{class:"flex flex-1 flex-col gap-1",children:[u("p",{class:"text-style-filter text-copy-neutral font-style-filter font-weight-filter",children:a("geo_label")}),u(Qv,{rpcClient:e,value:y.geo,distanceUnit:i.geolocation.distanceUnit,onValueChange:T=>{N(O=>({...O,geo:T,page:1})),p||L(1)}})]}):null]})}),u(Ch,{state:y,staged:p,onFilterValueChange:(T,O)=>{N(F=>({...F,filters:{...F.filters,[T]:O},geo:Yr(F.geo),page:1})),p||L(1)},onResetFilters:at,properties:t,rpcClient:e,alerts:i.alerts,theme:i.theme,widgetId:i.widgetId,i18n:i.i18n}),p?u("button",{type:"submit",class:ge({variant:"accent",class:"self-center"}),children:a("search")}):null]})}),u("section",{class:"flex flex-col gap-4 overflow-hidden px-4 py-4",children:[u(on,{Fallback:et,children:u(V,{children:[(vt=i.savedJobs)!=null&&vt.enabled&&i.savedJobs.showEntry!==!1&&!w?u(ly,{buttonRef:S,onClick:()=>{E.current="heading",b(T=>T+1),x(!0)}}):null,(We=i.savedJobs)!=null&&We.enabled&&w===void 0?u("p",{class:"text-copy-neutral",children:a("loading_jobs")}):(W=i.savedJobs)!=null&&W.enabled&&w?u(Sy,{rpcClient:e,filters:l.filters,config:i.jobCard,distanceUnit:(Y=i.geolocation)==null?void 0:Y.distanceUnit,onJobClick:M,onSearch:A}):u($y,{state:l,rpcClient:e,jobCardConfig:i.jobCard,mapConfig:i.map,initialData:d?r==null?void 0:r.jobs:void 0,onResultsUpdate:T=>{P(T.totalCount)},onJobClick:M,onPaginate:z,mode:(Z=i.naturalLanguageSearch)!=null&&Z.enabled?"vector":"query",onGeoChange:le,onViewChange:B,onResultOrderChange:Te,prioritySegment:(X=i.results)==null?void 0:X.prioritySegment,distanceUnit:(ce=i.geolocation)==null?void 0:ce.distanceUnit,i18n:i.i18n})]})}),i.feedback?u("div",{class:"flex flex-wrap items-center justify-center gap-2",children:[u("p",{class:"font-family-default font-style-default text-style-job-card-info text-copy-neutral-lowcontrast text-balance",children:a("feedback")}),u("div",{"data-widget":"inploi-feedback","data-key":"job-search",children:u("div",{class:"rounded-job-card bg-neutral-2 h-8 w-[72px] animate-pulse"})})]}):null]})]})})},Oy=({appRef:e,analytics:t,state:n,defaultFilters:r,totalCount:o,hasInteracted:i})=>{const a=H((d=1)=>({query:n.query,mode:n.mode,filters:Wn(n.filters),default_filters:Wn(r),total_count:o,page_size:_t,page:d}),[n.query,n.mode,n.filters,r,o]);return nd(e,{minViewTime:2e3,onView:()=>{t.log({event:"VIEW_SEARCH",properties:a()})}}),j(()=>{const d=window.setTimeout(()=>{i&&(!n.query&&!Object.keys(Wn(n.filters)).length||o!==0&&t.log({event:"SEARCH_SETTLE",properties:a()}))},5e3);return()=>{clearTimeout(d)}},[t,i,a,o,n.query,n.filters]),{onJobClick:(d,f)=>{t.log({event:"SEARCH_JOB_CLICK",properties:{job_id:d.id,...a(f)}})},analyticsPaginate:d=>{t.log({event:"SEARCH_PAGINATE",properties:a(d)})}}};exports.A=R;exports.ErrorBoundary=on;exports.IconSpritesheet=uu;exports.J=Mt;exports.JOB_SEARCH_WIDGET_ID=Ul;exports.JobSearch=Ey;exports.K=Do;exports.SavedJobsContext=bn;exports.TranslationProvider=ru;exports.UnstyledErrorView=cu;exports._=k;exports.alertsPayload=Cy;exports.createTFunction=ou;exports.d=D;exports.defaultTerms=iu;exports.generateColorThemeCss=dd;exports.getDefaultExportFromCjs=Bo;exports.getGeolocationFromSearchParams=tl;exports.getJobSearchResults=ms;exports.getModeFromSearchParams=Qc;exports.getSavedJobIds=Wt;exports.getSavedJobsUrl=cy;exports.getStatefulPropertiesFromSearchParams=Xc;exports.getViewFromSearchParams=el;exports.getWidgetStateFromSearchParams=kv;exports.invariant=qa;exports.isJobSaved=ay;exports.k=V;exports.setWidgetStateToSearchParams=Av;exports.subscribeSavedJobs=li;exports.toggleSavedJob=dl;exports.u=u;exports.useDebouncedValue=nl;exports.useTranslation=re;exports.y=j;
|
|
44
|
+
`)},gf=0,St=[];function mf(e){var t=R([]),n=R([0,0]),r=R(),o=D(gf++)[0],i=D(function(){return uc()})[0],a=R(e);j(function(){a.current=e},[e]),j(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=Nd([e.lockRef.current],(e.shards||[]).map(ua),!0).filter(Boolean);return v.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=H(function(v,y){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var m=Tn(v),_=n.current,b="deltaX"in v?v.deltaX:_[0]-m[0],w="deltaY"in v?v.deltaY:_[1]-m[1],$,x=v.target,C=Math.abs(b)>Math.abs(w)?"h":"v";if("touches"in v&&C==="h"&&x.type==="range")return!1;var S=ca(C,x);if(!S)return!0;if(S?$=C:($=C==="v"?"h":"v",S=ca(C,x)),!S)return!1;if(!r.current&&"changedTouches"in v&&(b||w)&&(r.current=$),!$)return!0;var E=r.current||$;return pf(E,y,v,E==="h"?b:w)},[]),c=H(function(v){var y=v;if(!(!St.length||St[St.length-1]!==i)){var m="deltaY"in y?la(y):Tn(y),_=t.current.filter(function($){return $.name===y.type&&$.target===y.target&&hf($.delta,m)})[0];if(_&&_.should){y.cancelable&&y.preventDefault();return}if(!_){var b=(a.current.shards||[]).map(ua).filter(Boolean).filter(function($){return $.contains(y.target)}),w=b.length>0?s(y,b[0]):!a.current.noIsolation;w&&y.cancelable&&y.preventDefault()}}},[]),d=H(function(v,y,m,_){var b={name:v,delta:y,target:m,should:_};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(w){return w!==b})},1)},[]),f=H(function(v){n.current=Tn(v),r.current=void 0},[]),l=H(function(v){d(v.type,la(v),v.target,s(v,e.lockRef.current))},[]),h=H(function(v){d(v.type,Tn(v),v.target,s(v,e.lockRef.current))},[]);j(function(){return St.push(i),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:h}),document.addEventListener("wheel",c,$t),document.addEventListener("touchmove",c,$t),document.addEventListener("touchstart",f,$t),function(){St=St.filter(function(v){return v!==i}),document.removeEventListener("wheel",c,$t),document.removeEventListener("touchmove",c,$t),document.removeEventListener("touchstart",f,$t)}},[]);var p=e.removeScrollBar,g=e.inert;return k(V,null,g?k(i,{styles:vf(o)}):null,p?k(af,{gapMode:"margin"}):null)}const _f=Bd(lc,mf);var Zo=te(function(e,t){return k(lr,Le({},e,{ref:t,sideCar:_f}))});Zo.classNames=lr.classNames;var yf=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ct=new WeakMap,Pn=new WeakMap,Rn={},zr=0,hc=function(e){return e&&(e.host||hc(e.parentNode))},bf=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=hc(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},wf=function(e,t,n,r){var o=bf(t,Array.isArray(e)?e:[e]);Rn[n]||(Rn[n]=new WeakMap);var i=Rn[n],a=[],s=new Set,c=new Set(o),d=function(l){!l||s.has(l)||(s.add(l),d(l.parentNode))};o.forEach(d);var f=function(l){!l||c.has(l)||Array.prototype.forEach.call(l.children,function(h){if(s.has(h))f(h);else try{var p=h.getAttribute(r),g=p!==null&&p!=="false",v=(Ct.get(h)||0)+1,y=(i.get(h)||0)+1;Ct.set(h,v),i.set(h,y),a.push(h),v===1&&g&&Pn.set(h,!0),y===1&&h.setAttribute(n,"true"),g||h.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",h,m)}})};return f(t),s.clear(),zr++,function(){a.forEach(function(l){var h=Ct.get(l)-1,p=i.get(l)-1;Ct.set(l,h),i.set(l,p),h||(Pn.has(l)||l.removeAttribute(r),Pn.delete(l)),p||l.removeAttribute(n)}),zr--,zr||(Ct=new WeakMap,Ct=new WeakMap,Pn=new WeakMap,Rn={})}},vc=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=yf(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),wf(r,o,n,"aria-hidden")):function(){return null}};const gc="Dialog",[mc]=Yo(gc),[xf,ht]=mc(gc),$f=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=R(null),c=R(null),[d=!1,f]=ec({prop:r,defaultProp:o,onChange:i});return k(xf,{scope:t,triggerRef:s,contentRef:c,contentId:Nn(),titleId:Nn(),descriptionId:Nn(),open:d,onOpenChange:f,onOpenToggle:H(()=>f(l=>!l),[f]),modal:a},n)},Sf="DialogTrigger",Cf=te((e,t)=>{const{__scopeDialog:n,...r}=e,o=ht(Sf,n),i=Fe(t,o.triggerRef);return k(pt.button,ee({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Xo(o.open)},r,{ref:i,onClick:Oe(e.onClick,o.onOpenToggle)}))}),_c="DialogPortal",[Ef,yc]=mc(_c,{forceMount:void 0}),Of=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=ht(_c,t);return k(Ef,{scope:t,forceMount:n},Ne.map(r,a=>k(qt,{present:n||i.open},k(ic,{asChild:!0,container:o},a))))},bo="DialogOverlay",kf=te((e,t)=>{const n=yc(bo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=ht(bo,e.__scopeDialog);return i.modal?k(qt,{present:r||i.open},k(Af,ee({},o,{ref:t}))):null}),Af=te((e,t)=>{const{__scopeDialog:n,...r}=e,o=ht(bo,n);return k(Zo,{as:cr,allowPinchZoom:!0,shards:[o.contentRef]},k(pt.div,ee({"data-state":Xo(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Ht="DialogContent",Tf=te((e,t)=>{const n=yc(Ht,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=ht(Ht,e.__scopeDialog);return k(qt,{present:r||i.open},i.modal?k(Pf,ee({},o,{ref:t})):k(Rf,ee({},o,{ref:t})))}),Pf=te((e,t)=>{const n=ht(Ht,e.__scopeDialog),r=R(null),o=Fe(t,n.contentRef,r);return j(()=>{const i=r.current;if(i)return vc(i)},[]),k(bc,ee({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oe(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Oe(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Oe(e.onFocusOutside,i=>i.preventDefault())}))}),Rf=te((e,t)=>{const n=ht(Ht,e.__scopeDialog),r=R(!1),o=R(!1);return k(bc,ee({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;!((s=n.triggerRef.current)===null||s===void 0)&&s.contains(c)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),bc=te((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=ht(Ht,n),c=R(null),d=Fe(t,c);return ac(),k(V,null,k(rc,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},k(tc,ee({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Xo(s.open)},a,{ref:d,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),Df="DialogTitle";function Xo(e){return e?"open":"closed"}const Lf="DialogTitleWarning";pd(Lf,{contentName:Ht,titleName:Df,docsSlug:"dialog"});const If=$f,Mf=Cf,Nf=Of,jf=kf,Ff=Tf,Vf=["top","right","bottom","left"],dt=Math.min,pe=Math.max,Xn=Math.round,Dn=Math.floor,je=e=>({x:e,y:e}),Hf={left:"right",right:"left",bottom:"top",top:"bottom"};function wo(e,t,n){return pe(e,dt(t,n))}function rt(e,t){return typeof e=="function"?e(t):e}function ot(e){return e.split("-")[0]}function Bt(e){return e.split("-")[1]}function Qo(e){return e==="x"?"y":"x"}function ei(e){return e==="y"?"height":"width"}function Me(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function ti(e){return Qo(Me(e))}function Uf(e,t,n){n===void 0&&(n=!1);const r=Bt(e),o=ti(e),i=ei(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Qn(a)),[a,Qn(a)]}function Wf(e){const t=Qn(e);return[xo(e),t,xo(t)]}function xo(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const da=["left","right"],fa=["right","left"],zf=["top","bottom"],qf=["bottom","top"];function Bf(e,t,n){switch(e){case"top":case"bottom":return n?t?fa:da:t?da:fa;case"left":case"right":return t?zf:qf;default:return[]}}function Kf(e,t,n,r){const o=Bt(e);let i=Bf(ot(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(xo)))),i}function Qn(e){const t=ot(e);return Hf[t]+e.slice(t.length)}function Gf(e){return{top:0,right:0,bottom:0,left:0,...e}}function wc(e){return typeof e!="number"?Gf(e):{top:e,right:e,bottom:e,left:e}}function er(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function pa(e,t,n){let{reference:r,floating:o}=e;const i=Me(t),a=ti(t),s=ei(a),c=ot(t),d=i==="y",f=r.x+r.width/2-o.width/2,l=r.y+r.height/2-o.height/2,h=r[s]/2-o[s]/2;let p;switch(c){case"top":p={x:f,y:r.y-o.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:l};break;case"left":p={x:r.x-o.width,y:l};break;default:p={x:r.x,y:r.y}}switch(Bt(t)){case"start":p[a]-=h*(n&&d?-1:1);break;case"end":p[a]+=h*(n&&d?-1:1);break}return p}async function Jf(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:l="floating",altBoundary:h=!1,padding:p=0}=rt(t,e),g=wc(p),y=s[h?l==="floating"?"reference":"floating":l],m=er(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:d,rootBoundary:f,strategy:c})),_=l==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),w=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},$=er(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:_,offsetParent:b,strategy:c}):_);return{top:(m.top-$.top+g.top)/w.y,bottom:($.bottom-m.bottom+g.bottom)/w.y,left:(m.left-$.left+g.left)/w.x,right:($.right-m.right+g.right)/w.x}}const Yf=50,Zf=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:Jf},c=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:l}=pa(d,r,c),h=r,p=0;const g={};for(let v=0;v<i.length;v++){const y=i[v];if(!y)continue;const{name:m,fn:_}=y,{x:b,y:w,data:$,reset:x}=await _({x:f,y:l,initialPlacement:r,placement:h,strategy:o,middlewareData:g,rects:d,platform:s,elements:{reference:e,floating:t}});f=b??f,l=w??l,g[m]={...g[m],...$},x&&p<Yf&&(p++,typeof x=="object"&&(x.placement&&(h=x.placement),x.rects&&(d=x.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:f,y:l}=pa(d,h,c)),v=-1)}return{x:f,y:l,placement:h,strategy:o,middlewareData:g}},Xf=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:c}=t,{element:d,padding:f=0}=rt(e,t)||{};if(d==null)return{};const l=wc(f),h={x:n,y:r},p=ti(o),g=ei(p),v=await a.getDimensions(d),y=p==="y",m=y?"top":"left",_=y?"bottom":"right",b=y?"clientHeight":"clientWidth",w=i.reference[g]+i.reference[p]-h[p]-i.floating[g],$=h[p]-i.reference[p],x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let C=x?x[b]:0;(!C||!await(a.isElement==null?void 0:a.isElement(x)))&&(C=s.floating[b]||i.floating[g]);const S=w/2-$/2,E=C/2-v[g]/2-1,A=dt(l[m],E),I=dt(l[_],E),P=A,M=C-v[g]-I,L=C/2-v[g]/2+S,z=wo(P,L,M),B=!c.arrow&&Bt(o)!=null&&L!==z&&i.reference[g]/2-(L<P?A:I)-v[g]/2<0,N=B?L<P?L-P:L-M:0;return{[p]:h[p]+N,data:{[p]:z,centerOffset:L-z-N,...B&&{alignmentOffset:N}},reset:B}}}),Qf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:d}=t,{mainAxis:f=!0,crossAxis:l=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...y}=rt(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const m=ot(o),_=Me(s),b=ot(s)===s,w=await(c.isRTL==null?void 0:c.isRTL(d.floating)),$=h||(b||!v?[Qn(s)]:Wf(s)),x=g!=="none";!h&&x&&$.push(...Kf(s,v,g,w));const C=[s,...$],S=await c.detectOverflow(t,y),E=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&E.push(S[m]),l){const L=Uf(o,a,w);E.push(S[L[0]],S[L[1]])}if(A=[...A,{placement:o,overflows:E}],!E.every(L=>L<=0)){var I,P;const L=(((I=i.flip)==null?void 0:I.index)||0)+1,z=C[L];if(z&&(!(l==="alignment"?_!==Me(z):!1)||A.every(K=>Me(K.placement)===_?K.overflows[0]>0:!0)))return{data:{index:L,overflows:A},reset:{placement:z}};let B=(P=A.filter(N=>N.overflows[0]<=0).sort((N,K)=>N.overflows[1]-K.overflows[1])[0])==null?void 0:P.placement;if(!B)switch(p){case"bestFit":{var M;const N=(M=A.filter(K=>{if(x){const q=Me(K.placement);return q===_||q==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(q=>q>0).reduce((q,le)=>q+le,0)]).sort((K,q)=>K[1]-q[1])[0])==null?void 0:M[0];N&&(B=N);break}case"initialPlacement":B=s;break}if(o!==B)return{reset:{placement:B}}}return{}}}};function ha(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function va(e){return Vf.some(t=>e[t]>=0)}const ep=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=rt(e,t);switch(o){case"referenceHidden":{const a=await r.detectOverflow(t,{...i,elementContext:"reference"}),s=ha(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:va(s)}}}case"escaped":{const a=await r.detectOverflow(t,{...i,altBoundary:!0}),s=ha(a,n.floating);return{data:{escapedOffsets:s,escaped:va(s)}}}default:return{}}}}},xc=new Set(["left","top"]);async function tp(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=ot(n),s=Bt(n),c=Me(n)==="y",d=xc.has(a)?-1:1,f=i&&c?-1:1,l=rt(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:g}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return s&&typeof g=="number"&&(p=s==="end"?g*-1:g),c?{x:p*f,y:h*d}:{x:h*d,y:p*f}}const np=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,c=await tp(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:a}}}}},rp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:m=>{let{x:_,y:b}=m;return{x:_,y:b}}},...d}=rt(e,t),f={x:n,y:r},l=await i.detectOverflow(t,d),h=Me(ot(o)),p=Qo(h);let g=f[p],v=f[h];if(a){const m=p==="y"?"top":"left",_=p==="y"?"bottom":"right",b=g+l[m],w=g-l[_];g=wo(b,g,w)}if(s){const m=h==="y"?"top":"left",_=h==="y"?"bottom":"right",b=v+l[m],w=v-l[_];v=wo(b,v,w)}const y=c.fn({...t,[p]:g,[h]:v});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[p]:a,[h]:s}}}}}},op=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:c=!0,crossAxis:d=!0}=rt(e,t),f={x:n,y:r},l=Me(o),h=Qo(l);let p=f[h],g=f[l];const v=rt(s,t),y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const b=h==="y"?"height":"width",w=i.reference[h]-i.floating[b]+y.mainAxis,$=i.reference[h]+i.reference[b]-y.mainAxis;p<w?p=w:p>$&&(p=$)}if(d){var m,_;const b=h==="y"?"width":"height",w=xc.has(ot(o)),$=i.reference[l]-i.floating[b]+(w&&((m=a.offset)==null?void 0:m[l])||0)+(w?0:y.crossAxis),x=i.reference[l]+i.reference[b]+(w?0:((_=a.offset)==null?void 0:_[l])||0)-(w?y.crossAxis:0);g<$?g=$:g>x&&(g=x)}return{[h]:p,[l]:g}}}},ip=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:c=()=>{},...d}=rt(e,t),f=await a.detectOverflow(t,d),l=ot(o),h=Bt(o),p=Me(o)==="y",{width:g,height:v}=i.floating;let y,m;l==="top"||l==="bottom"?(y=l,m=h===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(m=l,y=h==="end"?"top":"bottom");const _=v-f.top-f.bottom,b=g-f.left-f.right,w=dt(v-f[y],_),$=dt(g-f[m],b),x=!t.middlewareData.shift;let C=w,S=$;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=_),x&&!h){const A=pe(f.left,0),I=pe(f.right,0),P=pe(f.top,0),M=pe(f.bottom,0);p?S=g-2*(A!==0||I!==0?A+I:pe(f.left,f.right)):C=v-2*(P!==0||M!==0?P+M:pe(f.top,f.bottom))}await c({...t,availableWidth:S,availableHeight:C});const E=await a.getDimensions(s.floating);return g!==E.width||v!==E.height?{reset:{rects:!0}}:{}}}};function ur(){return typeof window<"u"}function Kt(e){return $c(e)?(e.nodeName||"").toLowerCase():"#document"}function he(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ve(e){var t;return(t=($c(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $c(e){return ur()?e instanceof Node||e instanceof he(e).Node:!1}function ke(e){return ur()?e instanceof Element||e instanceof he(e).Element:!1}function it(e){return ur()?e instanceof HTMLElement||e instanceof he(e).HTMLElement:!1}function ga(e){return!ur()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof he(e).ShadowRoot}function _n(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ae(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function ap(e){return/^(table|td|th)$/.test(Kt(e))}function dr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const sp=/transform|translate|scale|rotate|perspective|filter/,cp=/paint|layout|strict|content/,gt=e=>!!e&&e!=="none";let qr;function ni(e){const t=ke(e)?Ae(e):e;return gt(t.transform)||gt(t.translate)||gt(t.scale)||gt(t.rotate)||gt(t.perspective)||!ri()&&(gt(t.backdropFilter)||gt(t.filter))||sp.test(t.willChange||"")||cp.test(t.contain||"")}function lp(e){let t=ft(e);for(;it(t)&&!Ut(t);){if(ni(t))return t;if(dr(t))return null;t=ft(t)}return null}function ri(){return qr==null&&(qr=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),qr}function Ut(e){return/^(html|body|#document)$/.test(Kt(e))}function Ae(e){return he(e).getComputedStyle(e)}function fr(e){return ke(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ft(e){if(Kt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ga(e)&&e.host||Ve(e);return ga(t)?t.host:t}function Sc(e){const t=ft(e);return Ut(t)?e.ownerDocument?e.ownerDocument.body:e.body:it(t)&&_n(t)?t:Sc(t)}function an(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Sc(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=he(o);if(i){const s=$o(a);return t.concat(a,a.visualViewport||[],_n(o)?o:[],s&&n?an(s):[])}else return t.concat(o,an(o,[],n))}function $o(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Cc(e){const t=Ae(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=it(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Xn(n)!==i||Xn(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function oi(e){return ke(e)?e:e.contextElement}function Dt(e){const t=oi(e);if(!it(t))return je(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Cc(t);let a=(i?Xn(n.width):n.width)/r,s=(i?Xn(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const up=je(0);function Ec(e){const t=he(e);return!ri()||!t.visualViewport?up:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dp(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==he(e)?!1:t}function yt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=oi(e);let a=je(1);t&&(r?ke(r)&&(a=Dt(r)):a=Dt(e));const s=dp(i,n,r)?Ec(i):je(0);let c=(o.left+s.x)/a.x,d=(o.top+s.y)/a.y,f=o.width/a.x,l=o.height/a.y;if(i){const h=he(i),p=r&&ke(r)?he(r):r;let g=h,v=$o(g);for(;v&&r&&p!==g;){const y=Dt(v),m=v.getBoundingClientRect(),_=Ae(v),b=m.left+(v.clientLeft+parseFloat(_.paddingLeft))*y.x,w=m.top+(v.clientTop+parseFloat(_.paddingTop))*y.y;c*=y.x,d*=y.y,f*=y.x,l*=y.y,c+=b,d+=w,g=he(v),v=$o(g)}}return er({width:f,height:l,x:c,y:d})}function pr(e,t){const n=fr(e).scrollLeft;return t?t.left+n:yt(Ve(e)).left+n}function Oc(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-pr(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function fp(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Ve(r),s=t?dr(t.floating):!1;if(r===a||s&&i)return n;let c={scrollLeft:0,scrollTop:0},d=je(1);const f=je(0),l=it(r);if((l||!l&&!i)&&((Kt(r)!=="body"||_n(a))&&(c=fr(r)),l)){const p=yt(r);d=Dt(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}const h=a&&!l&&!i?Oc(a,c):je(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+f.x+h.x,y:n.y*d.y-c.scrollTop*d.y+f.y+h.y}}function pp(e){return Array.from(e.getClientRects())}function hp(e){const t=Ve(e),n=fr(e),r=e.ownerDocument.body,o=pe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=pe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+pr(e);const s=-n.scrollTop;return Ae(r).direction==="rtl"&&(a+=pe(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}const ma=25;function vp(e,t){const n=he(e),r=Ve(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const f=ri();(!f||f&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}const d=pr(r);if(d<=0){const f=r.ownerDocument,l=f.body,h=getComputedStyle(l),p=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(r.clientWidth-l.clientWidth-p);g<=ma&&(i-=g)}else d<=ma&&(i+=d);return{width:i,height:a,x:s,y:c}}function gp(e,t){const n=yt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=it(e)?Dt(e):je(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,d=r*i.y;return{width:a,height:s,x:c,y:d}}function _a(e,t,n){let r;if(t==="viewport")r=vp(e,n);else if(t==="document")r=hp(Ve(e));else if(ke(t))r=gp(t,n);else{const o=Ec(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return er(r)}function kc(e,t){const n=ft(e);return n===t||!ke(n)||Ut(n)?!1:Ae(n).position==="fixed"||kc(n,t)}function mp(e,t){const n=t.get(e);if(n)return n;let r=an(e,[],!1).filter(s=>ke(s)&&Kt(s)!=="body"),o=null;const i=Ae(e).position==="fixed";let a=i?ft(e):e;for(;ke(a)&&!Ut(a);){const s=Ae(a),c=ni(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||_n(a)&&!c&&kc(e,a))?r=r.filter(f=>f!==a):o=s,a=ft(a)}return t.set(e,r),r}function _p(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?dr(t)?[]:mp(t,this._c):[].concat(n),r],s=_a(t,a[0],o);let c=s.top,d=s.right,f=s.bottom,l=s.left;for(let h=1;h<a.length;h++){const p=_a(t,a[h],o);c=pe(p.top,c),d=dt(p.right,d),f=dt(p.bottom,f),l=pe(p.left,l)}return{width:d-l,height:f-c,x:l,y:c}}function yp(e){const{width:t,height:n}=Cc(e);return{width:t,height:n}}function bp(e,t,n){const r=it(t),o=Ve(t),i=n==="fixed",a=yt(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=je(0);function d(){c.x=pr(o)}if(r||!r&&!i)if((Kt(t)!=="body"||_n(o))&&(s=fr(t)),r){const p=yt(t,!0,i,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else o&&d();i&&!r&&o&&d();const f=o&&!r&&!i?Oc(o,s):je(0),l=a.left+s.scrollLeft-c.x-f.x,h=a.top+s.scrollTop-c.y-f.y;return{x:l,y:h,width:a.width,height:a.height}}function Br(e){return Ae(e).position==="static"}function ya(e,t){if(!it(e)||Ae(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ve(e)===n&&(n=n.ownerDocument.body),n}function Ac(e,t){const n=he(e);if(dr(e))return n;if(!it(e)){let o=ft(e);for(;o&&!Ut(o);){if(ke(o)&&!Br(o))return o;o=ft(o)}return n}let r=ya(e,t);for(;r&&ap(r)&&Br(r);)r=ya(r,t);return r&&Ut(r)&&Br(r)&&!ni(r)?n:r||lp(e)||n}const wp=async function(e){const t=this.getOffsetParent||Ac,n=this.getDimensions,r=await n(e.floating);return{reference:bp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function xp(e){return Ae(e).direction==="rtl"}const $p={convertOffsetParentRelativeRectToViewportRelativeRect:fp,getDocumentElement:Ve,getClippingRect:_p,getOffsetParent:Ac,getElementRects:wp,getClientRects:pp,getDimensions:yp,getScale:Dt,isElement:ke,isRTL:xp};function Tc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Sp(e,t){let n=null,r;const o=Ve(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const d=e.getBoundingClientRect(),{left:f,top:l,width:h,height:p}=d;if(s||t(),!h||!p)return;const g=Dn(l),v=Dn(o.clientWidth-(f+h)),y=Dn(o.clientHeight-(l+p)),m=Dn(f),b={rootMargin:-g+"px "+-v+"px "+-y+"px "+-m+"px",threshold:pe(0,dt(1,c))||1};let w=!0;function $(x){const C=x[0].intersectionRatio;if(C!==c){if(!w)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},1e3)}C===1&&!Tc(d,e.getBoundingClientRect())&&a(),w=!1}try{n=new IntersectionObserver($,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver($,b)}n.observe(e)}return a(!0),i}function Cp(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=oi(e),f=o||i?[...d?an(d):[],...t?an(t):[]]:[];f.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),i&&m.addEventListener("resize",n)});const l=d&&s?Sp(d,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(m=>{let[_]=m;_&&_.target===d&&p&&t&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),d&&!c&&p.observe(d),t&&p.observe(t));let g,v=c?yt(e):null;c&&y();function y(){const m=yt(e);v&&!Tc(v,m)&&n(),v=m,g=requestAnimationFrame(y)}return n(),()=>{var m;f.forEach(_=>{o&&_.removeEventListener("scroll",n),i&&_.removeEventListener("resize",n)}),l==null||l(),(m=p)==null||m.disconnect(),p=null,c&&cancelAnimationFrame(g)}}const Ep=np,Op=rp,kp=Qf,Ap=ip,Tp=ep,ba=Xf,Pp=op,Rp=(e,t,n)=>{const r=new Map,o={platform:$p,...n},i={...o.platform,_c:r};return Zf(e,t,{...o,platform:i})};var Vn=typeof document<"u"?se:j;function tr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!tr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!tr(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Pc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wa(e,t){const n=Pc(e);return Math.round(t*n)/n}function xa(e){const t=R(e);return Vn(()=>{t.current=e}),t}function Dp(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:d}=e,[f,l]=D({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=D(r);tr(h,r)||p(r);const[g,v]=D(null),[y,m]=D(null),_=H(N=>{N!==x.current&&(x.current=N,v(N))},[]),b=H(N=>{N!==C.current&&(C.current=N,m(N))},[]),w=i||g,$=a||y,x=R(null),C=R(null),S=R(f),E=c!=null,A=xa(c),I=xa(o),P=H(()=>{if(!x.current||!C.current)return;const N={placement:t,strategy:n,middleware:h};I.current&&(N.platform=I.current),Rp(x.current,C.current,N).then(K=>{const q={...K,isPositioned:!0};M.current&&!tr(S.current,q)&&(S.current=q,vn(()=>{l(q)}))})},[h,t,n,I]);Vn(()=>{d===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,l(N=>({...N,isPositioned:!1})))},[d]);const M=R(!1);Vn(()=>(M.current=!0,()=>{M.current=!1}),[]),Vn(()=>{if(w&&(x.current=w),$&&(C.current=$),w&&$){if(A.current)return A.current(w,$,P);P()}},[w,$,P,A,E]);const L=J(()=>({reference:x,floating:C,setReference:_,setFloating:b}),[_,b]),z=J(()=>({reference:w,floating:$}),[w,$]),B=J(()=>{const N={position:n,left:0,top:0};if(!z.floating)return N;const K=wa(z.floating,f.x),q=wa(z.floating,f.y);return s?{...N,transform:"translate("+K+"px, "+q+"px)",...Pc(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:q}},[n,s,z.floating,f.x,f.y]);return J(()=>({...f,update:P,refs:L,elements:z,floatingStyles:B}),[f,P,L,z,B])}const Lp=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?ba({element:r.current,padding:o}).fn(n):{}:r?ba({element:r,padding:o}).fn(n):{}}}},Ip=(e,t)=>({...Ep(e),options:[e,t]}),Mp=(e,t)=>({...Op(e),options:[e,t]}),Np=(e,t)=>({...Pp(e),options:[e,t]}),jp=(e,t)=>({...kp(e),options:[e,t]}),Fp=(e,t)=>({...Ap(e),options:[e,t]}),Vp=(e,t)=>({...Tp(e),options:[e,t]}),Hp=(e,t)=>({...Lp(e),options:[e,t]});function Up(e){const[t,n]=D(void 0);return Vt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const c=i.borderBoxSize,d=Array.isArray(c)?c[0]:c;a=d.inlineSize,s=d.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Rc="Popper",[Dc,Lc]=Yo(Rc),[Wp,Ic]=Dc(Rc),zp=e=>{const{__scopePopper:t,children:n}=e,[r,o]=D(null);return k(Wp,{scope:t,anchor:r,onAnchorChange:o},n)},qp="PopperAnchor",Bp=te((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Ic(qp,n),a=R(null),s=Fe(t,a);return j(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:k(pt.div,ee({},o,{ref:s}))}),Mc="PopperContent",[Kp,Ay]=Dc(Mc),Gp=te((e,t)=>{var n,r,o,i,a,s,c,d;const{__scopePopper:f,side:l="bottom",sideOffset:h=0,align:p="center",alignOffset:g=0,arrowPadding:v=0,avoidCollisions:y=!0,collisionBoundary:m=[],collisionPadding:_=0,sticky:b="partial",hideWhenDetached:w=!1,updatePositionStrategy:$="optimized",onPlaced:x,...C}=e,S=Ic(Mc,f),[E,A]=D(null),I=Fe(t,We=>A(We)),[P,M]=D(null),L=Up(P),z=(n=L==null?void 0:L.width)!==null&&n!==void 0?n:0,B=(r=L==null?void 0:L.height)!==null&&r!==void 0?r:0,N=l+(p!=="center"?"-"+p:""),K=typeof _=="number"?_:{top:0,right:0,bottom:0,left:0,..._},q=Array.isArray(m)?m:[m],le=q.length>0,at={padding:K,boundary:q.filter(Jp),altBoundary:le},{refs:Te,floatingStyles:_e,placement:He,isPositioned:Ce,middlewareData:ue}=Dp({strategy:"fixed",placement:N,whileElementsMounted:(...We)=>Cp(...We,{animationFrame:$==="always"}),elements:{reference:S.anchor},middleware:[Ip({mainAxis:h+B,alignmentAxis:g}),y&&Mp({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?Np():void 0,...at}),y&&jp({...at}),Fp({...at,apply:({elements:We,rects:W,availableWidth:Y,availableHeight:Z})=>{const{width:X,height:ce}=W.reference,T=We.floating.style;T.setProperty("--radix-popper-available-width",`${Y}px`),T.setProperty("--radix-popper-available-height",`${Z}px`),T.setProperty("--radix-popper-anchor-width",`${X}px`),T.setProperty("--radix-popper-anchor-height",`${ce}px`)}}),P&&Hp({element:P,padding:v}),Yp({arrowWidth:z,arrowHeight:B}),w&&Vp({strategy:"referenceHidden",...at})]}),[fe,Pe]=Nc(He),Ue=ut(x);Vt(()=>{Ce&&(Ue==null||Ue())},[Ce,Ue]);const st=(o=ue.arrow)===null||o===void 0?void 0:o.x,wt=(i=ue.arrow)===null||i===void 0?void 0:i.y,xt=((a=ue.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Re,vt]=D();return Vt(()=>{E&&vt(window.getComputedStyle(E).zIndex)},[E]),k("div",{ref:Te.setFloating,"data-radix-popper-content-wrapper":"",style:{..._e,transform:Ce?_e.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Re,"--radix-popper-transform-origin":[(s=ue.transformOrigin)===null||s===void 0?void 0:s.x,(c=ue.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},k(Kp,{scope:f,placedSide:fe,onArrowChange:M,arrowX:st,arrowY:wt,shouldHideArrow:xt},k(pt.div,ee({"data-side":fe,"data-align":Pe},C,{ref:I,style:{...C.style,animation:Ce?void 0:"none",opacity:(d=ue.hide)!==null&&d!==void 0&&d.referenceHidden?0:void 0}}))))});function Jp(e){return e!==null}const Yp=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:c,middlewareData:d}=t,l=((n=d.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,h=l?0:e.arrowWidth,p=l?0:e.arrowHeight,[g,v]=Nc(s),y={start:"0%",center:"50%",end:"100%"}[v],m=((r=(o=d.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+h/2,_=((i=(a=d.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+p/2;let b="",w="";return g==="bottom"?(b=l?y:`${m}px`,w=`${-p}px`):g==="top"?(b=l?y:`${m}px`,w=`${c.floating.height+p}px`):g==="right"?(b=`${-p}px`,w=l?y:`${_}px`):g==="left"&&(b=`${c.floating.width+p}px`,w=l?y:`${_}px`),{data:{x:b,y:w}}}});function Nc(e){const[t,n="center"]=e.split("-");return[t,n]}const Zp=zp,Xp=Bp,Qp=Gp,jc="Popover",[Fc]=Yo(jc,[Lc]),ii=Lc(),[eh,Gt]=Fc(jc),th=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,s=ii(t),c=R(null),[d,f]=D(!1),[l=!1,h]=ec({prop:r,defaultProp:o,onChange:i});return k(Zp,s,k(eh,{scope:t,contentId:Nn(),triggerRef:c,open:l,onOpenChange:h,onOpenToggle:H(()=>h(p=>!p),[h]),hasCustomAnchor:d,onCustomAnchorAdd:H(()=>f(!0),[]),onCustomAnchorRemove:H(()=>f(!1),[]),modal:a},n))},nh="PopoverTrigger",rh=te((e,t)=>{const{__scopePopover:n,...r}=e,o=Gt(nh,n),i=ii(n),a=Fe(t,o.triggerRef),s=k(pt.button,ee({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Uc(o.open)},r,{ref:a,onClick:Oe(e.onClick,o.onOpenToggle)}));return o.hasCustomAnchor?s:k(Xp,ee({asChild:!0},i),s)}),Vc="PopoverPortal",[oh,ih]=Fc(Vc,{forceMount:void 0}),ah=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=Gt(Vc,t);return k(oh,{scope:t,forceMount:n},k(qt,{present:n||i.open},k(ic,{asChild:!0,container:o},r)))},sn="PopoverContent",sh=te((e,t)=>{const n=ih(sn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=Gt(sn,e.__scopePopover);return k(qt,{present:r||i.open},i.modal?k(ch,ee({},o,{ref:t})):k(lh,ee({},o,{ref:t})))}),ch=te((e,t)=>{const n=Gt(sn,e.__scopePopover),r=R(null),o=Fe(t,r),i=R(!1);return j(()=>{const a=r.current;if(a)return vc(a)},[]),k(Zo,{as:cr,allowPinchZoom:!0},k(Hc,ee({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oe(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),i.current||(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:Oe(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0,d=s.button===2||c;i.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:Oe(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})))}),lh=te((e,t)=>{const n=Gt(sn,e.__scopePopover),r=R(!1),o=R(!1);return k(Hc,ee({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;!((s=n.triggerRef.current)===null||s===void 0)&&s.contains(c)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),Hc=te((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,...l}=e,h=Gt(sn,n),p=ii(n);return ac(),k(rc,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},k(tc,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>h.onOpenChange(!1)},k(Qp,ee({"data-state":Uc(h.open),role:"dialog",id:h.contentId},p,l,{ref:t,style:{...l.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))});function Uc(e){return e?"open":"closed"}const uh=th,dh=rh,fh=ah,ph=sh,$a=e=>{var n;const t=Number((n=e.match(/\d/g))==null?void 0:n.join(""));return Number.isNaN(t)?0:t},hh=(e,t={by:"results-count",order:"descending"})=>{const n=[...e];switch(t.by){case"results-count":n.sort((r,o)=>r.jobs-o.jobs);break;case"alphabetically":n.sort((r,o)=>r.label.localeCompare(o.label));break;case"numerically":n.sort((r,o)=>{const i=$a(r.value),a=$a(o.value);return i-a});break}return t.order==="descending"&&n.reverse(),n},yn=Se({base:"fr bg-lowest caret-accent-11 selection:bg-accent-4 selection:text-accent-12 placeholder:text-copy-neutral placeholder:opacity-30 ring-width-section ease-expo-out duration-snappy transition-all disabled:opacity-50 rounded-input font-style-input text-style-input font-weight-input",variants:{hasValue:{false:"text-copy-neutral ring-job-card-stroke",true:"text-interactive-accent-text ring-job-card-stroke"},size:{md:"py-2 px-4",unsized:""}},defaultVariants:{size:"md",hasValue:!1}}),Wc=Se({base:"flex-1 gutter-stable group/filter flex-col p-2 bg-app flex max-w-full overflow-y-auto items-stretch",variants:{ring:{default:"border-b-px border-neutral-4",unset:""}},defaultVariants:{ring:"default"}}),zc=Se({base:"max-w-full origin-top group/tag ease-expo-out transition-all duration-snappy",variants:{type:{pill:"",line:"[&:not(:last-child)]:border-b-px border-neutral-2 has-[[data-current-value=true]]:border-b-accent-3"}}}),qc=Se({base:"cursor-pointer flex fr gap-2 font-style-tag pointer-fine:group-[&:first-child]/filter:group-[&:first-child]/tag:rounded-t-tag py-2.5 px-2.5 font-family-tag font-weight-tag text-style-tag focus:relative w-full justify-between",variants:{active:{true:"bg-accent-2 text-accent-11",false:"text-neutral-11"},disabled:{true:"opacity-25 pointer-events-none",false:""}},compoundVariants:[{disabled:!1,active:!1,class:"hover:bg-neutral-2"}],defaultVariants:{disabled:!1,active:!1}}),vh=Se({base:"rounded-job-tag inline-block px-1 border-solid border-px ease-expo-out transition-all duration-snappy",variants:{colorScheme:{accentStrong:"text-accent-11 bg-accent-4 border-tag-accent-strong-stroke",neutralStrong:"text-neutral-11 bg-neutral-2 border-tag-neutral-strong-stroke"}}}),gh=({children:e,colorScheme:t})=>u("span",{class:vh({colorScheme:t}),children:u("span",{class:"block w-[3ch] text-center tabular-nums",children:e})}),mh=(e,t)=>{const n=e.indexOf(t);return n===-1?[...e,t]:e.filter((r,o)=>o!==n)},_h=(e,t)=>{if(e===null)return!1;const n=e[t.value];return n===void 0?!0:n===0},yh=(e,t)=>{const n=r=>r>99?"99+":r.toString();return n(e===null?t.jobs:e[t.value]??0)},bh=({value:e,hasKeyword:t,property:n,useQuery:r,isMobile:o,onValueChange:i,onClose:a})=>{const{t:s}=re(),c=pn(r()),d=J(()=>{switch(c.queryState){case"error":case"idle":case"loading":return null;case"loaded":case"revalidating":{const g=c.data[n.key]??[];return Object.fromEntries(g.map(v=>[v.value,v.jobs]))}default:At(c)}},[c,n.key]),f=Bc(e),l=f.length>0,[h,p]=D();return u("div",{class:"theme-fill:bg-neutral-1 flex min-h-0 w-full flex-1 flex-col",children:[n.searchable&&u("div",{class:"border-b-px border-neutral-4",children:u("input",{type:"search",class:"theme-fill:bg-neutral-2 theme-stroke:bg-neutral-1 theme-fill:focus:bg-neutral-1 theme-stroke:focus:bg-lowest focus:ring-px focus:ring-neutral-6 pointer-fine:theme-soft:rounded-t-lg pointer-fine:theme-rounded:rounded-t-lg caret-accent-11 selection:bg-accent-4 selection:text-accent-12 placeholder:text-copy-neutral ease-expo-out duration-snappy font-style-input text-style-input font-weight-input bg-transparent px-4 py-2.5 outline-none transition-all placeholder:opacity-30 disabled:opacity-50",value:h,onInput:g=>p(g.currentTarget.value),placeholder:s("type_to_search")})}),(()=>{var g;switch(c.queryState){case"error":return u(et,{error:new Error(s("filters_loading_error"),{cause:c.error}),class:"flex-1",resetError:()=>c.swr.mutate()});case"idle":case"loading":return u("div",{"aria-hidden":!0,class:"flex flex-col p-2",children:Array.from({length:10}).map((v,y)=>u("div",{style:{animationDelay:y*-.1+"s"},class:"bg-neutral-3 animate-skeleton h-12 w-full"},y))});case"revalidating":case"loaded":{const v=[...c.data[n.key]??[]];if(!t)for(const b of n.pinnedValues??[])v.some(w=>w.value===b)||v.push({value:b,label:b,jobs:0});const y=h&&h.length>1?v.filter(b=>b.label.toLowerCase().includes(h.toLowerCase())):v,m=[];for(const b of y){if(b.label.length<1)continue;const w=(g=n.pinnedValues)==null?void 0:g.includes(b.value);if(t&&w&&b.jobs===0)continue;const $={...b,results:yh(d,b),disabled:_h(d,b)};n.results==="only-available"?($.disabled===!1||w&&!t)&&m.push($):m.push($)}return m.some(b=>{var w;return!b.disabled||!t&&((w=n.pinnedValues)==null?void 0:w.includes(b.value))})?u("ul",{class:Wc(),children:hh(m,n.sortSuggestions).map(b=>{const w=f.includes(b.value);return u("li",{class:zc({type:"line"}),children:u("button",{type:"button",disabled:b.disabled,"data-filter":!0,"data-current-value":w?"true":void 0,"aria-pressed":w,onClick:()=>{switch(e.select){case"many":{const $=mh(f,b.value);i({select:"many",value:$});break}case"one":i({select:"one",value:w?void 0:b.value});break;default:At(e)}},class:qc({active:w,disabled:b.disabled}),children:[u("span",{class:"max-w-full truncate",children:b.label})," ",u(gh,{colorScheme:w?"accentStrong":"neutralStrong",children:b.results})]})},b.value)})}):u("p",{class:"font-style-tag text-style-tag font-weight-tag w-full flex-1 px-4 pb-1 pt-4 text-center",children:s("no_filter_options_available")})}default:At(c)}})(),u("footer",{class:"flex flex-none justify-end p-2",children:[u("div",{class:"flex-1",children:l&&u("button",{type:"button",class:ge({variant:"neutral",icon:"left"}),onClick:()=>{i(void 0)},children:[u(oe,{"aria-hidden":!0,name:"x"})," ",s("clear")]})}),e.select==="many"&&o&&u("div",{class:"flex items-center overflow-hidden",children:u("p",{class:"theme-light:text-neutral-11 theme-dark:text-neutral-12 font-style-default text-style-tag font-weight-default flex-grow select-none truncate text-center",children:[f.length," ",s("selected")]})}),u("div",{class:"flex-1",children:u("button",{type:"button",class:ge({variant:l?"accent":"neutral",class:"ml-auto"}),onClick:a,children:s(l?"done":"close")},l?"done":"close")})]})]})},Sa=8,Ca={contract_type:"clock",title:"magnifier",city:"mapPin",town:"mapPin",country:"mapPin",company_name:"briefcase",category:"briefcase",pay:"pay",pay_currency:"pay",pay_mask:"pay",pay_display:"pay",pay_max:"pay",pay_min:"pay",pay_type:"pay"},Ea=Se({base:"theme-fill:fr theme-fill:bg-neutral-2 theme-fill:hover:bg-neutral-3 theme-stroke:fr theme-stroke:hover:fr theme-stroke:ring-px theme-stroke:bg-lowest theme-stroke:ring-neutral-4 theme-stroke:hover:ring-neutral-6 group relative flex cursor-pointer select-none items-center gap-1.5 py-2.5 pl-3.5 pr-3 font-style-filter font-family-filter font-weight-filter text-style-filter duration-snappy outline-none ijs-filter flex-shrink-0 min-w-0 theme-rounded:rounded-md theme-soft:rounded-sm transition-all ease-expo-out active:scale-[0.975] origin-[50%_1.75rem]",variants:{state:{default:"text-copy-neutral-lowcontrast hover:text-copy-neutral",active:"text-copy-neutral"}}}),Oa=Se({base:"bg-lowest isolate z-50 flex flex-col overflow-hidden ring-neutral-4 ring-px",variants:{mode:{mobile:"fixed bottom-0 w-full h-[80svh] rounded-t-section animate-slide-out-bottom pb-[env(safe-area-inset-bottom)]",desktop:"min-w-64 max-w-xs max-h-[--radix-popover-content-available-height] rounded-section animate-slideDownFade data-[side=top]:animate-slideUpFade shadow-lg"}}}),Bc=e=>typeof e.value=="string"?[e.value]:e.value??[],wh=({selectedValues:e})=>{const t=e.length;return t===0?null:u("span",{"aria-label":"Current value",class:"animate-appear-tag text-style-job-card-info font-style-tag font-family-tag font-weight-tag text-tag-accent-strong-copy bg-tag-accent-strong-bg absolute -right-1 -top-1 inline-flex min-h-6 min-w-6 items-center justify-center rounded-[999px] px-2 tabular-nums",children:t},t)},Kc=({active:e,hasKeyword:t=!1,value:n,onActiveChange:r,property:o,onValueChange:i,unfilteredQuery:a,useQuery:s,theme:c,widgetId:d})=>{const f=yl(o.key,Ca)?Ca[o.key]:void 0,l=o.icon??f??"filter",h=Bc(n),p=h.length>0,{t:g}=re(),v=p?`${o.label}, ${h.length} ${g("selected")}`:o.label,y=Xs("(pointer: coarse)"),m=u(V,{children:[u("div",{class:"flex min-w-0 flex-1 items-center gap-1.5",children:[u(oe,{"aria-hidden":!0,class:"flex-none",name:l}),u("span",{class:"truncate",children:o.label})]}),u(oe,{"aria-hidden":!0,class:"text-neutral-8 flex-shrink-0 rotate-90 transition-transform group-data-[state=open]:-rotate-90",name:"chevron-right"}),u(wh,{selectedValues:h})]}),_=u(bh,{hasKeyword:t,useQuery:s,onClose:()=>r(!1),onValueChange:i,unfilteredQuery:a,property:o,value:n,isMobile:y});return y?u(If,{open:e,onOpenChange:r,children:[u(Mf,{"data-filter-key":o.key,"aria-label":v,class:Ea({state:e||p?"active":"default"}),onTouchStart:xh,children:m}),u(Nf,{children:u("div",{class:"inploi-job-search","data-widget-id":d,children:[u(jf,{class:"animate-fade-in fixed inset-0 z-50 bg-[#0009]"}),u(Ff,{class:Oa({mode:"mobile",class:go(c)}),children:[u("header",{class:"theme-fill:bg-neutral-1 text-neutral-12 border-b-px border-neutral-4 flex cursor-default items-center gap-2 p-4",children:[u(oe,{name:l,class:"flex-none"}),u("p",{class:"font-style-filter font-weight-filter text-style-filter truncate",children:o.label})]}),_]})]})})]}):u(uh,{open:e,onOpenChange:b=>r(b),modal:y,children:[u(dh,{"data-filter-key":o.key,"aria-label":v,class:Ea({state:e||p?"active":"default"}),children:m}),u(fh,{children:u("div",{class:"inploi-job-search","data-widget-id":d,children:u(ph,{side:"bottom",sideOffset:Sa,align:"center",collisionPadding:Sa,class:Oa({mode:"desktop",class:go(c)}),children:_})})})]})};function xh(){}const $h=(e,t)=>{var n,r,o;switch(t.select){case"many":(n=t.value)==null||n.forEach(i=>{var a,s;switch(e.select){case"many":(a=e.value)!=null&&a.includes(i)||(s=e.value)==null||s.push(i);break;case"one":e.value=i}});break;case"one":if(!t.value)break;switch(e.select){case"many":(r=e.value)!=null&&r.includes(t.value)||(o=e.value)==null||o.push(t.value);break;case"one":e.value=t.value}break}},Sh=({value:e,activeKey:t})=>{switch(e==null?void 0:e.select){case void 0:return{newValue:void 0,newActiveKey:t};case"one":case"many":return{newValue:e,newActiveKey:t};default:At(e)}},Ch=({properties:e,state:t,staged:n,onFilterValueChange:r,onResetFilters:o,rpcClient:i,theme:a,alerts:s,widgetId:c,i18n:d})=>{const{t:f}=re(),[l,h]=D(void 0),p=J(()=>({filters:or(e,"value"),mode:t.mode,query:"",geo:void 0,page:1,view:"list"}),[e,t.mode]),g=pn(Ft(Zn({state:p,baseKey:"filters"}),()=>Si({rpcClient:i,state:p,t:f,locale:d?d.locale:void 0,fallbackLocale:d?d.fallbackLocale:void 0}),Gn)),v=H(m=>()=>{const _={...t,resultOrder:void 0,filters:{...t.filters,[m]:p.filters[m]}};return Ft(Zn({state:_,baseKey:"filters"}),()=>Si({rpcClient:i,state:_,t:f,locale:d?d.locale:void 0,fallbackLocale:d?d.fallbackLocale:void 0}),Gn)},[i,p.filters,t,f,d]);if(g.queryState==="error")return u(et,{error:new Error(f("filters_loading_error"),{cause:g.error}),resetError:()=>g.swr.mutate()});const y=n?Eh:Kc;return u("div",{class:"ijs-filters-section flex w-full flex-col items-stretch justify-center gap-2 overflow-auto px-4 py-2 md:flex-row md:flex-wrap md:items-center",children:[e.filter(m=>m.hidden!==!0).map(m=>{const _=l===m.key,b=t.filters[m.key]??{select:m.select,value:void 0},w=p.filters[m.key];w&&$h(b,w);const $=S=>{const{newActiveKey:E,newValue:A}=Sh({activeKey:l,value:S??w,appliedFilters:t.filters});return h(E),r(m.key,A)},x=S=>h(S?m.key:void 0),C=v(m.key);return u(on,{Fallback:et,children:u(y,{unfilteredQuery:g,active:_,hasKeyword:!!t.query,property:m,onActiveChange:x,value:b,useQuery:C,onValueChange:$,theme:a,widgetId:c})},m.key)}),u("button",{type:"button",class:ge({variant:"neutral"}),onClick:o,children:f("reset")}),s?u("div",{id:"inploi-job-alerts",class:"min-h-[36px]",children:u("div",{class:"rounded-job-card bg-neutral-2 flex h-[36px] animate-pulse items-center gap-2 px-2",children:[u("div",{class:"block h-6 w-6"}),u("p",{class:"text-style-tag text-neutral-6 pr-2 font-[500]",children:s.params.config.label})]})}):null]})};function Eh({useQuery:e,...t}){const n=e();return u(Kc,{...t,useQuery:()=>n})}const Gc=["gb"],Oh=e=>{const t=$e.jobCountryCodes(e);return t.length?t:Gc},cn=e=>e*1609.34,So=e=>e*1e3,kh=()=>{const e=typeof document>"u"?"":document.documentElement.lang;if(e)try{return Intl.getCanonicalLocales(e)[0]}catch{return}},Jc=(e,t,n=1)=>new Intl.NumberFormat(kh()??e,{style:"unit",unit:t==="miles"?"mile":"kilometer",unitDisplay:"short",maximumFractionDigits:n,trailingZeroDisplay:"stripIfInteger"}),Ah=(e,t,n)=>Jc(n,t).format(e/(t==="miles"?cn(1):So(1)));function Th(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var hr=Th,Ph=typeof $n=="object"&&$n&&$n.Object===Object&&$n,Rh=Ph,Dh=Rh,Lh=typeof self=="object"&&self&&self.Object===Object&&self,Ih=Dh||Lh||Function("return this")(),vr=Ih,Mh=vr,Nh=function(){return Mh.Date.now()},jh=Nh,Fh=/\s/;function Vh(e){for(var t=e.length;t--&&Fh.test(e.charAt(t)););return t}var Hh=Vh,Uh=Hh,Wh=/^\s+/;function zh(e){return e&&e.slice(0,Uh(e)+1).replace(Wh,"")}var qh=zh,Bh=vr,Kh=Bh.Symbol,ai=Kh,ka=ai,Yc=Object.prototype,Gh=Yc.hasOwnProperty,Jh=Yc.toString,en=ka?ka.toStringTag:void 0;function Yh(e){var t=Gh.call(e,en),n=e[en];try{e[en]=void 0;var r=!0}catch{}var o=Jh.call(e);return r&&(t?e[en]=n:delete e[en]),o}var Zh=Yh,Xh=Object.prototype,Qh=Xh.toString;function ev(e){return Qh.call(e)}var tv=ev,Aa=ai,nv=Zh,rv=tv,ov="[object Null]",iv="[object Undefined]",Ta=Aa?Aa.toStringTag:void 0;function av(e){return e==null?e===void 0?iv:ov:Ta&&Ta in Object(e)?nv(e):rv(e)}var Zc=av;function sv(e){return e!=null&&typeof e=="object"}var cv=sv,lv=Zc,uv=cv,dv="[object Symbol]";function fv(e){return typeof e=="symbol"||uv(e)&&lv(e)==dv}var gr=fv,pv=qh,Pa=hr,hv=gr,Ra=NaN,vv=/^[-+]0x[0-9a-f]+$/i,gv=/^0b[01]+$/i,mv=/^0o[0-7]+$/i,_v=parseInt;function yv(e){if(typeof e=="number")return e;if(hv(e))return Ra;if(Pa(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Pa(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pv(e);var n=gv.test(e);return n||mv.test(e)?_v(e.slice(2),n?2:8):vv.test(e)?Ra:+e}var bv=yv,wv=hr,Kr=jh,Da=bv,xv="Expected a function",$v=Math.max,Sv=Math.min;function Cv(e,t,n){var r,o,i,a,s,c,d=0,f=!1,l=!1,h=!0;if(typeof e!="function")throw new TypeError(xv);t=Da(t)||0,wv(n)&&(f=!!n.leading,l="maxWait"in n,i=l?$v(Da(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function p(x){var C=r,S=o;return r=o=void 0,d=x,a=e.apply(S,C),a}function g(x){return d=x,s=setTimeout(m,t),f?p(x):a}function v(x){var C=x-c,S=x-d,E=t-C;return l?Sv(E,i-S):E}function y(x){var C=x-c,S=x-d;return c===void 0||C>=t||C<0||l&&S>=i}function m(){var x=Kr();if(y(x))return _(x);s=setTimeout(m,v(x))}function _(x){return s=void 0,h&&r?p(x):(r=o=void 0,a)}function b(){s!==void 0&&clearTimeout(s),d=0,r=c=o=s=void 0}function w(){return s===void 0?a:_(Kr())}function $(){var x=Kr(),C=y(x);if(r=arguments,o=this,c=x,C){if(s===void 0)return g(c);if(l)return clearTimeout(s),s=setTimeout(m,t),p(c)}return s===void 0&&(s=setTimeout(m,t)),a}return $.cancel=b,$.flush=w,$}var Ev=Cv;const Ov=Bo(Ev),Co="|",Xc=(e,t)=>{const n=structuredClone(e);return n.forEach(r=>{if(t.has(r.key)){const o=t.get(r.key);if(!o)return;switch(r.select){case"one":{r.defaultValue=o;break}case"many":o.includes(Co)?r.defaultValue=o.split(Co):r.defaultValue=o}}}),n},Qc=e=>{const t=e.get("mode");return t==="vector"||t==="query"?t:"query"},el=e=>{const t=e.get("view");return t==="list"||t==="map"?t:"list"},kv=({searchParams:e})=>({properties:t})=>({filters:or(Xc(t,e),"defaultValue"),mode:Qc(e),geo:tl(e),page:Hn(e.get("page"))??1,view:el(e),query:e.get("query")??"",...e.get("result_order")==="newest"?{resultOrder:"newest"}:{}}),Av=(e,t)=>{var n,r;if(e.filters!==void 0){const o=ir({filters:e.filters,mode:e.mode??"query",page:e.page??1,view:e.view??"list"});for(const[i,a]of Object.entries(o))if(i!=="geolocation"){if(a==null){t.delete(i);continue}Array.isArray(a)?a.length===0?t.delete(i):t.set(i,a.join(Co)):typeof a=="string"&&t.set(i,a)}}"geo"in e&&(((n=e.geo)==null?void 0:n.type)==="provided"?(e.geo.coords?(t.set("lat",e.geo.coords.lat.toString()),t.set("lng",e.geo.coords.lng.toString())):(t.delete("lat"),t.delete("lng")),t.set("radius",e.geo.radius.toString())):((r=e.geo)==null||r.type,t.delete("lat"),t.delete("lng"),t.delete("radius"))),"query"in e&&(e.query?t.set("query",e.query):t.delete("query")),"page"in e&&(e.page&&e.page>1?t.set("page",e.page.toString()):t.delete("page")),"resultOrder"in e&&(e.resultOrder==="newest"?t.set("result_order","newest"):t.delete("result_order")),"view"in e&&(e.view?t.set("view",e.view):t.delete("view"))},Hn=e=>{if(!e)return;const t=Number(e);if(!Number.isNaN(t))return t},tl=e=>{const t=e.get("lat"),n=e.get("lng"),r=e.get("radius");if(!t&&!n||!t||!n)return;const o=Hn(t),i=Hn(n),a=Hn(r)??cn(Oo);if(!(o===void 0||i===void 0))return{type:"provided",coords:{lat:o,lng:i},radius:Number.isNaN(a)?cn(Oo):a}},nl=(e,t=1e3)=>{const[n,r]=D(e),o=J(()=>Ov(i=>r(i),t),[t]);return j(()=>{o(e)},[e,o]),n},Tv=te(({disabled:e,error:t,name:n,inputPlaceholder:r,items:o,onItemSelect:i,onEnter:a,onQueryChange:s,onBlur:c,onFocus:d,inputProps:f,menuProps:l,query:h},p)=>{const[g,v]=D(!1),[y,m]=D(),_=R(!1),{t:b}=re();j(()=>{var x;m((x=o[0])==null?void 0:x.id),_.current=!1},[o]);const w=x=>{i(x),v(!1)},$=!t&&g&&!e&&o.length>0;return u("div",{class:"relative h-full",children:[u("input",{name:n,"aria-label":r,ref:p,disabled:e,"data-active":g?"true":void 0,"aria-controls":$?`ijs-${n}-menu`:void 0,placeholder:r,class:yn({size:"md"}),onFocus:()=>{d==null||d(),v(!0)},onBlur:()=>{window.setTimeout(()=>{c==null||c(),v(!1)},100)},value:h,onChange:x=>{_.current=!1,s(x.currentTarget.value)},onKeyDown:x=>{switch(v(!0),x.key){case"ArrowDown":case"ArrowUp":{const C=x.key==="ArrowDown"?1:-1;x.preventDefault();const S=o.findIndex(A=>A.id===y);if(S===-1)return;const E=o[S+C]??o[x.key==="ArrowDown"?0:o.length-1];if(!E)return;m(E.id),_.current=!0;break}case"Enter":x.preventDefault(),a(y,_.current)}},...f}),$?u("ul",{className:Wc({ring:"unset",className:"ring-width-section rounded-input ring-job-card-stroke absolute left-0 right-0 top-12 z-50 w-full shadow-sm"}),id:`ijs-${n}-menu`,onMouseDown:x=>x.preventDefault(),...l,children:t?u("div",{role:"alert",children:b("geo_suggestions_error")}):o.map(x=>u("li",{class:zc({type:"line",className:"group/tag"}),children:u("button",{type:"button",onMouseEnter:()=>{m(x.id),_.current=!0},class:qc({active:x.id===y,className:"line-clamp-1 overflow-hidden truncate"}),onClick:()=>w(x.id),onKeyDown:C=>{C.key==="Enter"&&w(x.id)},children:x.label})},x.id))}):null]})}),Pv="https://api.mapbox.com/search/geocode/v6/forward",Eo=3,Rv="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",Dv=e=>atob(e).split("").reverse().join(""),Lv="region,postcode,district,place,locality,neighborhood",Iv=we({features:fn(Xe(we({properties:we({mapbox_id:Q(),feature_type:Be(Q()),place_formatted:Be(Q()),name_preferred:Be(Q(),"Untitled location"),coordinates:Xe(we({latitude:be(),longitude:be()}),Ze(({latitude:e,longitude:t})=>({lat:e,lng:t})))})}),Ze(e=>e.properties)))}),Mv=e=>{const t=us(Iv,e);if(t.success===!1)throw console.error(t.issues),new Error("Invalid data");return t.output.features},Nv=(e,t)=>{const n=new URL(Pv);return n.searchParams.set("q",e),n.searchParams.set("proximity","ip"),n.searchParams.set("country",t.join(",")),n.searchParams.set("types",Lv),n.searchParams.set("access_token",Dv(Rv)),n},La=e=>e.replace(/\s/gu,"").toUpperCase(),jv=(e,t)=>{const n=La(e),r=t.find(o=>o.feature_type==="postcode"&&La(o.name_preferred)===n);return r?[r,...t.filter(o=>o!==r)]:t},Fv=(e,t)=>Array.from(new Map(e.map(n=>[typeof t=="function"?t(n):n[t],n])).values()),Ia="inploi:geo:job-search:seed";let Et;const Vv=()=>{if(Et)return Et;Et=$e.generateUUID();try{const e=sessionStorage.getItem(Ia);e&&/^[\w-]{1,64}$/.test(e)?Et=e:sessionStorage.setItem(Ia,Et)}catch{}return Et},Hv=e=>({mapbox_id:`${e.kind}:${e.label}`,feature_type:e.kind,name_preferred:e.name,place_formatted:e.label.startsWith(`${e.name}, `)?e.label.slice(e.name.length+2):e.label,coordinates:{lat:e.lat,lng:e.lng}}),Ma=async([e,t],n,r)=>{if(e.trim().length<Eo)return{results:[],lookup:null};const{results:o,arm:i,source:a}=await Cl({query:e,country:t.join(","),seed:Vv(),surface:"job-search",signal:n},Hv,async()=>{r==null||r();const c=await fetch(Nv(e,t),{signal:n});if(!c.ok)throw new Error("Failed to get address details");return Mv(await c.json())}),s=Fv(o,c=>c.name_preferred+c.place_formatted);return{results:jv(e,s),lookup:{arm:i,source:a}}},Uv=1e4;class rl extends Error{constructor(){super("Timed out waiting for the browser location"),this.name="LocateTimeoutError"}}const Wv=({signal:e,timeoutMs:t})=>new Promise((n,r)=>{if(e.aborted){r(new DOMException("Aborted","AbortError"));return}const o=setTimeout(()=>r(new rl),t);e.addEventListener("abort",()=>{clearTimeout(o),r(new DOMException("Aborted","AbortError"))},{once:!0}),navigator.geolocation.getCurrentPosition(i=>{clearTimeout(o),n(i.coords)},i=>{clearTimeout(o),r(i)},{timeout:t})}),zv=1,qv=3,Bv=e=>{if(e instanceof DOMException&&e.name==="AbortError")return null;if(e instanceof rl)return"geo_error_timeout";const t=typeof e=="object"&&e!==null&&"code"in e?e.code:void 0;return t===zv?"geo_error_permission_denied":t===qv?"geo_error_timeout":"geo_error_position_unavailable"},Kv=()=>typeof window<"u"&&"geolocation"in navigator&&window.isSecureContext,Gv=({onLocate:e,onError:t,signal:n})=>{const[r,o]=D("idle"),[i,a]=D(null),{t:s}=re(),c=f=>{o("idle"),a(f),e(f)},d=f=>{const l=Bv(f);if(!l)return o("idle");o("error"),t(s(l))};return u("button",{"aria-label":s(r==="loading"?"geo_locating":"geo_my_location"),type:"button",onClick:()=>{if(r!=="loading"){if(i)return c(i);if(!Kv())return d(void 0);o("loading"),Wv({signal:n,timeoutMs:Uv}).then(f=>c({lat:f.latitude,lng:f.longitude})).catch(d)}},"data-state":r,class:ge({variant:"accent",size:"lg",icon:"only",className:"data-[state=loading]:animate-pulse"}),children:u(oe,{name:"target-location"})})},Lt=Se({base:"block fr font-style-tag font-family-tag font-weight-tag",variants:{variant:{neutralWeak:"text-tag-neutral-weak-copy bg-tag-neutral-weak-bg border-solid border-px border-tag-neutral-weak-stroke",neutralStrong:"text-tag-neutral-strong-copy bg-tag-neutral-strong-bg border-solid border-px border-tag-neutral-strong-stroke",accentStrong:"text-tag-accent-strong-copy bg-tag-accent-strong-bg border-solid border-px border-tag-accent-strong-stroke",monetaryWeak:"text-tag-monetary-weak-copy bg-tag-monetary-weak-bg border-solid border-px border-tag-monetary-weak-stroke"},interactive:{true:"ease-expo-out rounded-interactive transition-all duration-snappy",false:"rounded-tag"},size:{xs:"px-2 py-0.5 text-style-tag",sm:"px-3 py-1.5 text-style-tag",lg:"px-5 py-2.5 text-style-tag",unsized:""},disabled:{true:"opacity-25 pointer-events-none",false:""}},compoundVariants:[{disabled:!1,interactive:!0,class:"cursor-pointer active:scale-[0.975]"}],defaultVariants:{variant:"neutralWeak",size:"sm",disabled:!1,interactive:!1}}),Jv=({onSelect:e,onValueChange:t,coords:n,radius:r,countries:o,onError:i})=>{const{t:a}=re(),[s,c]=D(""),[d,f]=D(),l=nl(s,500),[h,p]=D(new AbortController),g=Ft(l.trim().length>=Eo?[l,o]:null,Ma,{keepPreviousData:!1,revalidateIfStale:!1,revalidateOnFocus:!1}),{data:v,queryState:y,error:m}=pn(g),_=R(0),[b,w]=D("view"),$=R(null),x=R(null),C=R(null),S=R(!1);j(()=>{var P,M;b==="edit"&&((P=$.current)==null||P.focus()),b==="view"&&n&&S.current&&(S.current=!1,(M=C.current)==null||M.focus())},[b,n]);const E=(P,M)=>{var L;_.current++,S.current=((L=x.current)==null?void 0:L.contains(document.activeElement))??!1,e(P,M),f(M),c(""),w("view")},A=(P,M)=>{P&&El({kind:"places",surface:"job-search",...P,picked:M})};return u("div",{ref:x,class:"relative flex-1",children:[b==="view"&&n?u("button",{ref:C,"aria-label":`${a("geo_search_placeholder")}: ${d??a("location_provided")}`,type:"button",class:yn({size:"unsized",className:"flex h-10 w-full cursor-text items-stretch px-1 py-1"}),onClick:()=>{w("edit")},children:u("div",{class:Lt({size:"sm",variant:"accentStrong",interactive:!0,class:"truncate"}),children:d??a("location_provided")})}):u(Tv,{ref:$,error:m,query:s,name:"location-search",onQueryChange:P=>{_.current++,c(P),i(void 0)},onFocus:()=>{h.abort(),p(new AbortController)},onBlur:()=>{const P=$.current;if(!(!P||document.activeElement===P)){if(w("view"),n)return c("");P.value.trim()&&i(a("geo_choose_location"))}},onItemSelect:P=>{if(y!=="loaded")return;const M=v.results.find(L=>L.mapbox_id===P);M&&(A(v.lookup,!0),E(M.coordinates,M.name_preferred))},onEnter:async(P,M)=>{const L=s.trim();if(!L)return;if(L.length<Eo)return i(a("geo_query_too_short"));const z=++_.current;let B=null;try{const N=l===s&&y==="loaded"?v:await Ma([L,o],void 0,()=>{B={arm:"direct",source:"direct"}});if(z!==_.current)return;const K=N.results.find(le=>le.mapbox_id===P),q=K??N.results[0];if(A(N.lookup,M&&!!K),q)return E(q.coordinates,q.name_preferred);i(a("geo_no_match"))}catch{if(z!==_.current)return;A(B,!1),i(a("geo_suggestions_error"))}},inputPlaceholder:a("geo_search_placeholder"),inputProps:{enterkeyhint:"search"},items:(v==null?void 0:v.results.map(P=>({id:P.mapbox_id,label:u("div",{class:"flex min-w-0 max-w-full gap-2 overflow-hidden",children:[u("strong",{class:"truncate",children:P.name_preferred})," ",u("span",{class:"flex-1 truncate opacity-50",children:P.place_formatted})]})})))??[]}),u("div",{class:"absolute bottom-0 right-0 top-0 flex items-center",children:!s&&!n?u(Gv,{onLocate:P=>E(P,a("geo_my_location")),onError:i,signal:h.signal}):u("button",{type:"button","aria-label":a("geo_clear_search"),onClick:()=>{_.current++,c(""),i(void 0),f(void 0),t({radius:r,type:"provided"}),w("edit"),$.current&&($.current.value="",$.current.focus())},class:ge({variant:"neutral",size:"lg",icon:"only"}),children:u(oe,{name:"x"})})})]})},Yv=[.25,.5,1,3,5,10,15,20,30,40],Zv=[.5,1,3,5,10,15,25,50,100],Oo=20,Xv=25,Qv=({rpcClient:e,value:t,onValueChange:n,distanceUnit:r="miles"})=>{const{t:o,locale:i}=re(),a=sr(),[s,c]=D(),d=Ft("job-countries",()=>$e.getJobCountries(e),{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}),f=J(()=>d.data?Oh(d.data):Gc,[d.data]),l=J(()=>Jc(i,r,2),[i,r]),h=r==="miles"?cn(Oo):So(Xv),p=(t==null?void 0:t.type)==="provided"?t.radius:h,g=(t==null?void 0:t.type)==="provided"?t.coords:void 0,v=(t==null?void 0:t.type)==="provided"?t.label:void 0,y=r==="miles"?Yv.map(m=>({value:cn(m),label:l.format(m)})):Zv.map(m=>({value:So(m),label:l.format(m)}));return u("div",{class:"flex flex-col gap-2",children:[u("div",{class:"flex flex-col gap-2 md:flex-row",children:[u(Jv,{coords:g,radius:p,countries:f,onValueChange:n,onSelect:(m,_)=>{c(void 0),n({type:"provided",radius:p,coords:m,label:_})},onError:c}),u("div",{class:"relative",children:[u("label",{class:"sr-only",for:a,children:o("geo_range_label")}),u("select",{id:a,name:"radius",class:yn({size:"unsized",className:"w-full appearance-none truncate py-2 pl-3 pr-10"}),disabled:!g,value:g?p:"",onChange:m=>{c(void 0),n({type:"provided",coords:g,label:v,radius:Number(m.currentTarget.value)})},children:[g?null:u("option",{value:"",children:o("geo_any_distance")}),y.map(m=>u("option",{value:m.value,class:"truncate",children:m.label},m.value))]}),u("div",{class:"text-copy-neutral-lowcontrast pointer-events-none absolute bottom-0 right-0 top-0 flex w-10 items-center justify-center",children:u(oe,{name:"chevron-right",class:"h-6 w-6 rotate-90"})})]})]}),s?u("div",{role:"alert",class:"text-pretty text-copy-neutral font-style-tag font-weight-tag text-style-tag flex gap-1",children:[u(oe,{name:"warning",class:"animate-appear-tag size-[1lh] flex-none"}),s]}):null]})},ol=(e,t,n,r)=>{const[o,i]=D(e??""),a=R(),s=R(t);s.current=t;const c=H(()=>clearTimeout(a.current),[]);return se(()=>(i(e??""),c(),c),[e,c]),{input:o,changeInput:f=>{i(f),c();const l=f.trim();if(l.length<=n){s.current("");return}a.current=setTimeout(()=>s.current(l),r)},cancelPending:c}},eg=2,tg=({value:e,onValueChange:t,onSearch:n})=>{const{input:r,changeInput:o,cancelPending:i}=ol(e,t,eg,300),a=r!==""&&r===e,{t:s}=re();return u("div",{class:"flex flex-col gap-3",children:u("div",{class:"relative",children:[u("label",{class:"absolute left-0 flex h-full items-center px-2",for:"ijs-keyword",children:[u(oe,{"aria-hidden":!0,title:"Search by keyword",name:"magnifierSimple",class:Nt({"text-copy-neutral-icon":!a,"text-copy-accent-icon":a})}),u("span",{class:"sr-only",children:"Keyword"})]}),u("input",{autoComplete:"off",autocomplete:"off",name:"keyword",id:"ijs-keyword",type:"search",class:yn({hasValue:a,size:"unsized",class:"peer py-2 pl-10 pr-4"}),placeholder:s("type_to_search_jobs"),value:r,onKeyDown:c=>{if(n&&c.key==="Enter"){c.preventDefault(),i();const d=c.currentTarget.value.trim();t(d),n(d)}},onChange:c=>{o(c.currentTarget.value)}}),u("button",{type:"button",class:ge({variant:"neutral",size:"lg",position:"absolute",class:"bottom-0 right-0 top-0 h-full peer-placeholder-shown:hidden",icon:"only"}),onClick:()=>{o("")},children:u(oe,{name:"x"})})]})})},ng=({intervalMs:e,strings:t,class:n})=>{const[r,o]=D(0),[i,a]=D(!0),s=[...t,t[0]];return j(()=>{r===s.length&&(a(!1),o(0));const c=setTimeout(()=>{a(!0),o(d=>d+1)},e);return()=>clearTimeout(c)},[r,s.length,e]),u("div",{className:Nt("relative h-full w-full overflow-hidden",n),children:u("div",{className:Nt("absolute w-full",{"transition-transform duration-500 ease-in-out":i}),style:{height:`${100*s.length}%`,transform:`translateY(-${r*(100/s.length)}%)`},children:s.map((c,d)=>u("div",{className:"flex items-center whitespace-nowrap",style:{height:`${100/s.length}%`},children:c},d))})})},rg=(e,t)=>{j(()=>{const n=r=>{document.activeElement===e.current&&t(r)};return document.addEventListener("selectionchange",n),()=>document.removeEventListener("selectionchange",n)},[e,t])},Na=3,og=({value:e,onValueChange:t,options:n,onSearch:r})=>{const{input:o,changeInput:i,cancelPending:a}=ol(e,t,Na,1e3),s=o.trim(),c=s!==""&&s===e,{t:d}=re(),f=s.split(""),[l,h]=D(0),p=R(null);return rg(p,g=>{g.target instanceof HTMLInputElement&&h(g.target.scrollLeft)}),u("div",{class:"mb-2 flex flex-col gap-2",children:[u("div",{class:"relative",children:[u("label",{class:"absolute left-0 flex h-full items-center px-2",for:"ijs-keyword",children:[u(oe,{"aria-hidden":!0,title:"Search by keyword",name:"ai",class:Nt("duration-snappy transition-transform",{"text-copy-neutral-icon scale-90":!c,"text-copy-accent-icon":c})}),u("span",{class:"sr-only",children:"Keyword"})]}),u("input",{ref:p,autoComplete:"off",autocomplete:"off",name:"keyword",id:"ijs-keyword",type:"text",placeholder:n!=null&&n.suggestions?n.suggestions.join(", "):" ",class:yn({hasValue:c,size:"unsized",class:"peer px-10 py-2 tracking-tight !text-transparent placeholder:!text-transparent"}),style:{fontKerning:"none"},value:o,onChange:g=>{const v=g.currentTarget.value.trim();i(v)},onKeyDown:g=>{if(g.key==="Enter"){const v=g.currentTarget.value.trim();if(r){g.preventDefault(),a(),t(v),r(v);return}if(v.length<=Na)return;g.preventDefault(),a(),t(v)}}}),u("div",{"data-synced":c,class:"font-weight-input text-copy-neutral group pointer-events-none absolute inset-x-10 inset-y-0 flex overflow-hidden tracking-tight peer-placeholder-shown:right-0",children:s.length>0?u("div",{"aria-hidden":!0,class:"flex items-center whitespace-nowrap",style:{transform:`translateX(${-l}px)`},children:f.map((g,v)=>u("span",{style:{animationDelay:`${v*300/f.length}ms`},class:"group-data-[synced=true]:animate-ai-letter inline-block",children:g===" "?" ":g},s+v))}):n!=null&&n.suggestions?u(ng,{intervalMs:2e3,strings:n.suggestions,class:"opacity-30","aria-hidden":!0}):null}),u("button",{type:"button",class:ge({variant:"neutral",size:"lg",position:"absolute",class:"bottom-0 right-0 top-0 h-full peer-placeholder-shown:hidden",icon:"only"}),onClick:()=>{i("")},children:u(oe,{name:"x"})})]}),u("p",{class:"font-family-default font-style-default text-style-job-card-info text-copy-neutral-lowcontrast text-balance",children:d("ai_disclaimer")})]})},nr=Se({base:"fr flex min-h-8 min-w-0 items-center justify-center cursor-pointer text-style-tag rounded-interactive active:scale-95 transition-all duration-snappy pl-2 pr-2.5 py-1.5 gap-1",variants:{active:{true:"bg-lowest text-neutral-12 shadow-sm animate-appear-tag",false:"text-neutral-10 hover:text-neutral-12"}},defaultVariants:{active:!1}}),il="bg-neutral-3 rounded-interactive ring-neutral-3 mr-[3px] inline-flex min-w-0 max-w-full ring-[3px]",ig=({value:e,onValueChange:t})=>{const{t:n}=re();return u("div",{class:il,children:[u("button",{type:"button","aria-pressed":e==="list",class:nr({active:e==="list"}),onClick:()=>t("list"),children:[u(oe,{name:"list",class:"size-5 shrink-0"}),u("span",{children:n("list")})]}),u("button",{type:"button","aria-pressed":e==="map",class:nr({active:e==="map"}),onClick:()=>t("map"),children:[u(oe,{name:"map",class:"size-5 shrink-0"}),u("span",{children:n("map")})]})]})},ag=({state:e,onValueChange:t})=>{var o;const{t:n}=re(),r=e.query.trim()?"sort_most_relevant":((o=e.geo)==null?void 0:o.type)==="provided"&&e.geo.coords?"sort_closest":void 0;return r?u("div",{role:"group","aria-label":n("sort_by"),class:il,children:[u("button",{type:"button","aria-pressed":!e.resultOrder,class:nr({active:!e.resultOrder}),onClick:()=>t(void 0),children:n(r)}),u("button",{type:"button","aria-pressed":e.resultOrder==="newest",class:nr({active:e.resultOrder==="newest"}),onClick:()=>t("newest"),children:n("sort_newest")})]}):null};var sg=Array.isArray,si=sg,cg=si,lg=gr,ug=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dg=/^\w*$/;function fg(e,t){if(cg(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||lg(e)?!0:dg.test(e)||!ug.test(e)||t!=null&&e in Object(t)}var pg=fg,hg=Zc,vg=hr,gg="[object AsyncFunction]",mg="[object Function]",_g="[object GeneratorFunction]",yg="[object Proxy]";function bg(e){if(!vg(e))return!1;var t=hg(e);return t==mg||t==_g||t==gg||t==yg}var wg=bg,xg=vr,$g=xg["__core-js_shared__"],Sg=$g,Gr=Sg,ja=(function(){var e=/[^.]+$/.exec(Gr&&Gr.keys&&Gr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Cg(e){return!!ja&&ja in e}var Eg=Cg,Og=Function.prototype,kg=Og.toString;function Ag(e){if(e!=null){try{return kg.call(e)}catch{}try{return e+""}catch{}}return""}var Tg=Ag,Pg=wg,Rg=Eg,Dg=hr,Lg=Tg,Ig=/[\\^$.*+?()[\]{}|]/g,Mg=/^\[object .+?Constructor\]$/,Ng=Function.prototype,jg=Object.prototype,Fg=Ng.toString,Vg=jg.hasOwnProperty,Hg=RegExp("^"+Fg.call(Vg).replace(Ig,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ug(e){if(!Dg(e)||Rg(e))return!1;var t=Pg(e)?Hg:Mg;return t.test(Lg(e))}var Wg=Ug;function zg(e,t){return e==null?void 0:e[t]}var qg=zg,Bg=Wg,Kg=qg;function Gg(e,t){var n=Kg(e,t);return Bg(n)?n:void 0}var al=Gg,Jg=al,Yg=Jg(Object,"create"),mr=Yg,Fa=mr;function Zg(){this.__data__=Fa?Fa(null):{},this.size=0}var Xg=Zg;function Qg(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var em=Qg,tm=mr,nm="__lodash_hash_undefined__",rm=Object.prototype,om=rm.hasOwnProperty;function im(e){var t=this.__data__;if(tm){var n=t[e];return n===nm?void 0:n}return om.call(t,e)?t[e]:void 0}var am=im,sm=mr,cm=Object.prototype,lm=cm.hasOwnProperty;function um(e){var t=this.__data__;return sm?t[e]!==void 0:lm.call(t,e)}var dm=um,fm=mr,pm="__lodash_hash_undefined__";function hm(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=fm&&t===void 0?pm:t,this}var vm=hm,gm=Xg,mm=em,_m=am,ym=dm,bm=vm;function Jt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Jt.prototype.clear=gm;Jt.prototype.delete=mm;Jt.prototype.get=_m;Jt.prototype.has=ym;Jt.prototype.set=bm;var wm=Jt;function xm(){this.__data__=[],this.size=0}var $m=xm;function Sm(e,t){return e===t||e!==e&&t!==t}var Cm=Sm,Em=Cm;function Om(e,t){for(var n=e.length;n--;)if(Em(e[n][0],t))return n;return-1}var _r=Om,km=_r,Am=Array.prototype,Tm=Am.splice;function Pm(e){var t=this.__data__,n=km(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Tm.call(t,n,1),--this.size,!0}var Rm=Pm,Dm=_r;function Lm(e){var t=this.__data__,n=Dm(t,e);return n<0?void 0:t[n][1]}var Im=Lm,Mm=_r;function Nm(e){return Mm(this.__data__,e)>-1}var jm=Nm,Fm=_r;function Vm(e,t){var n=this.__data__,r=Fm(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Hm=Vm,Um=$m,Wm=Rm,zm=Im,qm=jm,Bm=Hm;function Yt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Yt.prototype.clear=Um;Yt.prototype.delete=Wm;Yt.prototype.get=zm;Yt.prototype.has=qm;Yt.prototype.set=Bm;var Km=Yt,Gm=al,Jm=vr,Ym=Gm(Jm,"Map"),Zm=Ym,Va=wm,Xm=Km,Qm=Zm;function e_(){this.size=0,this.__data__={hash:new Va,map:new(Qm||Xm),string:new Va}}var t_=e_;function n_(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var r_=n_,o_=r_;function i_(e,t){var n=e.__data__;return o_(t)?n[typeof t=="string"?"string":"hash"]:n.map}var yr=i_,a_=yr;function s_(e){var t=a_(this,e).delete(e);return this.size-=t?1:0,t}var c_=s_,l_=yr;function u_(e){return l_(this,e).get(e)}var d_=u_,f_=yr;function p_(e){return f_(this,e).has(e)}var h_=p_,v_=yr;function g_(e,t){var n=v_(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var m_=g_,__=t_,y_=c_,b_=d_,w_=h_,x_=m_;function Zt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Zt.prototype.clear=__;Zt.prototype.delete=y_;Zt.prototype.get=b_;Zt.prototype.has=w_;Zt.prototype.set=x_;var $_=Zt,sl=$_,S_="Expected a function";function ci(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(S_);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(ci.Cache||sl),n}ci.Cache=sl;var C_=ci,E_=C_,O_=500;function k_(e){var t=E_(e,function(r){return n.size===O_&&n.clear(),r}),n=t.cache;return t}var A_=k_,T_=A_,P_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,R_=/\\(\\)?/g,D_=T_(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(P_,function(n,r,o,i){t.push(o?i.replace(R_,"$1"):r||n)}),t}),L_=D_;function I_(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var M_=I_,Ha=ai,N_=M_,j_=si,F_=gr,Ua=Ha?Ha.prototype:void 0,Wa=Ua?Ua.toString:void 0;function cl(e){if(typeof e=="string")return e;if(j_(e))return N_(e,cl)+"";if(F_(e))return Wa?Wa.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var V_=cl,H_=V_;function U_(e){return e==null?"":H_(e)}var W_=U_,z_=si,q_=pg,B_=L_,K_=W_;function G_(e,t){return z_(e)?e:q_(e,t)?[e]:B_(K_(e))}var J_=G_,Y_=gr;function Z_(e){if(typeof e=="string"||Y_(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var X_=Z_,Q_=J_,ey=X_;function ty(e,t){t=Q_(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[ey(t[n++])];return n&&n==r?e:void 0}var ny=ty,ry=ny;function oy(e,t,n){var r=e==null?void 0:ry(e,t);return r===void 0?n:r}var iy=oy;const ll=Bo(iy),Un=new Map,ln=new Set,ko="isdk-saved-jobs-change",rr=e=>`${Hl}:${e}`,ul=e=>typeof e=="number"&&Number.isSafeInteger(e)&&e>0;function Wt(e){if(typeof window>"u")return[];if(ln.has(e))return[...Un.get(e)??[]];let t;try{t=window.localStorage.getItem(rr(e))}catch{return ln.add(e),[...Un.get(e)??[]]}let n;try{n=t===null?[]:JSON.parse(t)}catch{n=[]}const r=Array.isArray(n)?[...new Set(n.filter(ul))]:[];return Un.set(e,r),[...r]}function ay(e,t){return Wt(e).includes(t)}function sy(e,t){if(Un.set(e,t),!ln.has(e))try{t.length?window.localStorage.setItem(rr(e),JSON.stringify(t)):window.localStorage.removeItem(rr(e))}catch{ln.add(e)}window.dispatchEvent(new CustomEvent(ko,{detail:e}))}function dl(e,t){if(!ul(t))throw new TypeError("Job id must be a positive safe integer");if(typeof window>"u")return!1;const n=Wt(e),r=!n.includes(t);return sy(e,r?[...n,t]:n.filter(o=>o!==t)),r}function li(e,t){if(typeof window>"u")return()=>{};const n=o=>{o instanceof CustomEvent&&o.detail===e&&t(Wt(e))},r=o=>{if(!ln.has(e)){try{if(o.storageArea&&o.storageArea!==window.localStorage)return}catch{return}(o.key===null||o.key===rr(e))&&t(Wt(e))}};return window.addEventListener(ko,n),window.addEventListener("storage",r),()=>{window.removeEventListener(ko,n),window.removeEventListener("storage",r)}}function cy(e){const t=new URL(e);return t.searchParams.set("saved",""),t.href}const bn=Ye(void 0);function ui(e){const[t,n]=D();return se(()=>{const r=li(e,n);return n(Wt(e)),r},[e]),t}function ly({buttonRef:e,onClick:t}){const n=me(bn);if(!n)throw new Error("Saved jobs context is required");const r=ui(n.scope),{t:o}=re(),i=(r==null?void 0:r.length)??0;return u("button",{ref:e,type:"button",class:ge({variant:"neutral",size:"lg",class:"ring-neutral-7 focus-visible:outline-highest ring-px self-start focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2"}),onClick:t,children:i?o("view_saved_jobs_count",{count:i}):o("view_saved_jobs")})}function fl({id:e,title:t,unavailable:n=!1}){const r=me(bn);if(!r)throw new Error("Saved jobs context is required");const o=ui(r.scope),{t:i}=re(),a=(o==null?void 0:o.includes(e))??!1;return u("button",{type:"button","data-save-job":e,"aria-pressed":a,"aria-label":n?i("remove_unavailable_saved_job",{id:e}):i(a?"remove_saved_job":"save_job",{title:t}),class:ge({variant:n?"accent":a?"primary":"neutral",position:n?"relative":"absolute",size:n?"sm":"unsized",class:`${n?"shrink-0 underline underline-offset-4":`rounded-interactive right-4 top-4 p-2 transition-transform ${a?"":"bg-job-card-bg ring-job-card-stroke ring-px"}`} focus-visible:outline-highest focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2`}),onClick:s=>{s.preventDefault(),s.stopPropagation();const c=dl(r.scope,e);r.analytics.log({event:"SAVE_JOB",properties:{job_id:e,saved:c}})},children:n?i("remove"):u(oe,{"aria-hidden":!0,name:a?"bookmark-filled":"bookmark"})})}const nn=({chars:e})=>u("span",{style:{width:e+"ch"},class:"rounded-job-tag block h-[1lh] min-h-[1em] bg-[currentColor] opacity-25"}),pl=Se({base:"ijs-job relative rounded-job-card bg-job-card-bg ring-width-job-card ring-job-card-stroke flex gap-4 fr ease-expo-out min-w-0 p-4 transition-all duration-medium",variants:{interactive:{true:"active:bg-job-card-bg-active active:ring-job-card-stroke-active hover:bg-job-card-bg-active hover:ring-job-card-stroke-active active:scale-[0.975]",false:"animate-skeleton"}},defaultVariants:{interactive:!0}}),hl=Se({base:"font-style-job-heading font-weight-job-heading text-copy-neutral font-family-job-heading text-pretty",variants:{size:{sm:"text-style-filter",default:"text-style-job-heading"}},defaultVariants:{size:"default"}}),Ln=({job:e,property:t})=>{if(!t)return null;const n=ll(e.raw,t.key);return t.transform?t.transform(n):n},uy=({job:e,config:t="hidden"})=>t==="hidden"?null:u("div",{class:"rounded-logo h-12 flex-none overflow-hidden",style:{aspectRatio:t.replace(":","/")},children:e.company.logo?u("img",{src:e.company.logo,alt:e.company.name,class:"h-full w-full select-none object-contain [-webkit-user-drag:none]"}):null}),Jr=e=>Array.isArray(e)?e:[e],lt="[+-]?(?:\\d*\\.\\d+|\\d+)(?:[eE][+-]?\\d+)?",rn=`${lt}%`,Je=`${lt}%?`,di=`(?:\\s*\\/\\s*${Je})?`,vl=`(?:\\s*,\\s*${Je})?`,dy=`${Je}\\s+${Je}\\s+${Je}${di}`,fy=`(?:${lt}\\s*,\\s*${lt}\\s*,\\s*${lt}|${rn}\\s*,\\s*${rn}\\s*,\\s*${rn})${vl}`,py=`${lt}\\s+${Je}\\s+${Je}${di}`,hy=`${lt}\\s*,\\s*${rn}\\s*,\\s*${rn}${vl}`,vy=`${Je}\\s+${Je}\\s+${lt}${di}`,gy=new RegExp(`^(?:#(?:[a-fA-F0-9]{3}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})|var\\(--[a-z0-9-]+\\)|(?:rgb|rgba)\\(\\s*(?:${dy}|${fy})\\s*\\)|(?:hsl|hsla)\\(\\s*(?:${py}|${hy})\\s*\\)|oklch\\(\\s*${vy}\\s*\\))$`),my=1e3*60*60*24,fi=({job:e,config:t,onJobClick:n,size:r,distanceUnit:o})=>{var $,x,C,S,E,A;const{t:i,locale:a}=re(),s=me(bn),c=e.distanceMeters===null?null:i("distance_away",{distance:Ah(e.distanceMeters,o??"miles",a)}),d=Ln({job:e,property:t.eyebrow}),f=($=t.accent)==null?void 0:$.rules.find(I=>Jr(ll(e.raw,I.key)).includes(I.value)),l=f&&gy.test(f.color)?f:void 0,h=t.subheading?Ln({job:e,property:t.subheading}):null,p=t.infoTags.flatMap(I=>Jr(Ln({job:e,property:I}))).filter(Boolean),g=Jr((x=t.overrides)!=null&&x.salary?Ln({job:e,property:t.overrides.salary}):e.pay).filter(Boolean),v=t.postedDate??"show",y=(C=t.overrides)!=null&&C.baseUrl?t.overrides.baseUrl(e.id.toString()):e.href,m=t.newUnderDays??7,_=e.createdAt?new Date(e.createdAt).getTime()>Date.now()-m*my:!1,b=I=>{var P,M;n==null||n(e),(M=(P=t.overrides)==null?void 0:P.onClick)==null||M.call(P,I)},w=u("a",{onMouseEnter:(S=t.overrides)==null?void 0:S.onMouseEnter,onClick:b,href:y,"data-accent":l==null?void 0:l.value,style:l?{"--ijs-card-accent":l.color}:void 0,target:t.openJob==="redirect-new-tab"?"_blank":void 0,class:pl({class:s?"min-h-28":void 0}),children:[l&&u("span",{"aria-hidden":"true",class:"pointer-events-none absolute inset-0 overflow-hidden [border-radius:inherit]",children:u("span",{"data-accent-style":((E=t.accent)==null?void 0:E.style)??"band",class:((A=t.accent)==null?void 0:A.style)==="edge"?"absolute inset-y-0 left-0 w-[4px]":"absolute inset-x-0 top-0 h-[4px]",style:{backgroundColor:"var(--ijs-card-accent)"}})}),u("div",{class:"flex min-w-0 flex-1 flex-col gap-4",children:[u("div",{class:`gap-logo flex items-center${s?" min-w-0 pr-12":""}`,children:[u(uy,{job:e,config:r!=="sm"?t.logo:void 0}),u("div",{class:`flex flex-col items-start gap-1${s?" min-w-0":""}`,children:[u("div",{class:"order-2 flex flex-col gap-1",children:[e.match?u("p",{class:"text-style-job-card text-tag-accent-strong-bg flex items-center ",children:[u(oe,{name:"ai",class:"size-4 inline-block"}),u("span",{children:e.match})]}):null,d?u("p",{class:"text-style-job-card-info text-copy-job-info",children:d}):null,u("p",{class:hl({size:r}),children:[e.title.trim(),_&&v!=="hide"&&u(V,{children:[" ",u("span",{"aria-hidden":!0,class:"ring-px ring-tag-accent-strong-bg rounded-job-card text-tag-accent-strong-bg font-weight-tag not-sr-only order-1 inline-block px-2 py-1 align-middle text-[10px] leading-none",children:i("new")})]})]}),h?u("p",{class:"text-style-job-card text-copy-neutral-lowcontrast",children:h}):null]}),v==="show"?u("p",{class:"text-style-job-card-info text-copy-job-info order-1",children:[i("posted")," ",e.relativePostedDate]}):null]})]}),u("div",{class:"flex min-w-0 flex-col items-start gap-2",children:[c?u("p",{class:"text-style-job-card-info text-copy-job-info flex items-center gap-1",children:[u(oe,{name:"target-location",class:"size-4 flex-none","aria-hidden":!0}),c]}):null,u("div",{class:"flex min-w-0 max-w-full flex-wrap items-center gap-2",children:g.map((I,P)=>u("span",{class:Lt({variant:"monetaryWeak",size:"xs"}),children:I},P))}),p.length>0&&u("ul",{class:"flex min-w-0 max-w-full flex-wrap items-center gap-2",children:p.map(I=>u("li",{class:Lt({size:"xs",class:"max-w-full truncate"}),children:I},I))})]})]}),r==="sm"?u("div",{"aria-hidden":!0,class:`absolute right-1 ${s?"bottom-4":"top-1/2 -translate-y-1/2 transform"}`,children:u(oe,{name:"chevron-right",class:"size-5 text-copy-neutral-icon"})}):u("div",{"aria-hidden":!0,class:`flex ${s?"items-end":"items-center"}`,children:u(oe,{name:"chevron-right",class:"text-copy-neutral-icon"})})]});return s?u("div",{class:"relative",children:[w,u(fl,{id:e.id,title:e.title})]}):w},pi=({config:e,animationDelay:t,seed:n})=>{const r=e.logo??"hidden",o=e.postedDate??"show";return u("div",{"aria-hidden":!0,style:{animationDelay:t+"s"},class:pl({interactive:!1}),children:[u("div",{class:"flex flex-1 flex-col gap-4",children:[u("div",{class:"flex items-center gap-4",children:[r==="hidden"?null:u("div",{class:"rounded-logo bg-copy-neutral h-12 opacity-25",style:{aspectRatio:r.replace(":","/")}}),u("div",{class:"flex flex-col items-start gap-1",children:[o==="show"?u("p",{class:"text-style-job-card-info text-copy-job-info",children:u(nn,{chars:12})}):null,u("div",{class:"flex flex-col gap-1",children:[u("p",{class:"text-style-job-heading font-style-job-heading font-weight-job-heading text-copy-neutral font-family-job-heading",children:u(nn,{chars:13+(n+5)*n%7})}),e.subheading!==null?u("p",{class:"text-style-job-card text-copy-neutral-lowcontrast",children:u(nn,{chars:7+n*n%3})}):null]})]})]}),u("div",{class:"flex flex-col items-start gap-2",children:[n%2===0&&u("span",{class:Lt({variant:"neutralWeak",size:"xs",class:"h-[1lh] min-h-[1em] w-[10ch]"})}),u("div",{class:"flex items-center gap-2",children:[u("span",{class:Lt({variant:"neutralWeak",size:"xs",class:"h-[1lh] min-h-[1em] w-[6ch]"})}),u("span",{class:Lt({variant:"neutralWeak",size:"xs",class:"h-[1lh] min-h-[1em] w-[8ch]"})})]})]})]}),u("div",{"aria-hidden":!0,class:"flex items-center",children:u(oe,{name:"chevron-right",class:"text-copy-neutral-icon"})})]})},_y=({state:e,fetchNextPage:t,config:n,remainingItems:r})=>{const{t:o}=re(),i=Math.min(_t,r);return e==="revalidating"?u("ul",{class:"flex flex-col gap-3","aria-hidden":!0,children:Array.from({length:_t}).map((a,s)=>u("li",{children:u(pi,{seed:s,animationDelay:(s-4)*.1,config:n})},s))}):u("button",{type:"button",class:ge({variant:"neutral",class:"w-full max-w-[45rem] self-center py-2"}),onClick:t,children:[o("load_more_count",{count:i})," ",o("of_remaining_count",{count:r})]})},yy=({state:e,rpcClient:t,jobCardConfig:n,initialData:r,onResultsUpdate:o,onJobClick:i,onPaginate:a,mode:s,afterResults:c,prioritySegment:d,i18n:f,distanceUnit:l})=>{const{t:h}=re(),p=R(),[g,v]=D();return u(V,{children:[u("p",{class:"sr-only",role:"status",children:g===void 0?"":g===0?h("no_jobs_found"):h("jobs_found",{count:g})}),Array.from({length:e.page}).map((y,m)=>{const _=m===e.page-1;return u(on,{Fallback:et,children:u(by,{state:e,rpcClient:t,page:m+1,isFirst:m===0,isLast:_,fetchNextPage:()=>{p.current=e.page+1,a(e.page+1)},focusPage:p,jobCardConfig:n,initialData:r,onResultsUpdate:b=>{v(b.totalCount),o==null||o(b)},onJobClick:i,mode:s,afterResults:c,prioritySegment:d,i18n:f,distanceUnit:l},m)},m)})]})},za=({page:e})=>{const{t}=re();return u("div",{"aria-hidden":!0,class:"text-copy-neutral-lowcontrast mx-auto flex w-full max-w-[45rem] gap-2 py-4",onClick:n=>{n.preventDefault()},children:[u("span",{class:"bg-wavy bg-neutral-3 flex-1 opacity-10"}),u("span",{class:"text-style-tag justify-center text-center",children:[t("page")," ",e]}),u("span",{class:"bg-wavy bg-neutral-3 flex-1 opacity-10"})]})},by=({state:e,rpcClient:t,page:n,isFirst:r,isLast:o,fetchNextPage:i,focusPage:a,jobCardConfig:s,initialData:c,onResultsUpdate:d,onJobClick:f,afterResults:l,prioritySegment:h,i18n:p,distanceUnit:g})=>{const{t:v}=re(),y=n===1?c:void 0,{data:m,error:_,queryState:b,swr:w}=pn(Ft(Zn({state:e,baseKey:n.toString()}),()=>ms({rpcClient:t,state:e,page:n,t:v,prioritySegment:h,locale:p?p.locale:void 0,fallbackLocale:p?p.fallbackLocale:void 0}),{...Gn,fallbackData:y}));j(()=>{m&&r&&d({totalCount:m.pagination.total})},[m,r,d]);const $=R(null);switch(j(()=>{var x,C;!m||a.current!==n||(a.current=void 0,(!document.activeElement||document.activeElement===document.body)&&((C=(x=$.current)==null?void 0:x.querySelector("a"))==null||C.focus({preventScroll:!0})))},[m,a,n]),b){case"idle":return null;case"loading":return u(V,{children:[r?u("div",{class:"flex w-full max-w-[45rem] items-center justify-between gap-3 self-center",children:[u("p",{class:"animate-skeleton text-copy-neutral-lowcontrast text-style-tag m-0 min-w-0 max-w-[25%] flex-none p-0 text-left [overflow-wrap:anywhere]",children:u(nn,{chars:8})}),u("div",{class:"flex min-w-0 flex-1 justify-end",children:l})]}):u(za,{page:n}),u("ul",{class:"flex w-full max-w-[45rem] flex-col gap-3 self-center","aria-hidden":!0,children:Array.from({length:_t}).map((x,C)=>u("li",{children:u(pi,{seed:C,animationDelay:(C-_t)*.1,config:s})},C))})]});case"error":return u(et,{error:new Error(v("jobs_loading_error"),{cause:_}),resetError:()=>w.mutate()});case"revalidating":case"loaded":{if(qa(m.pagination.current_page===n,"Received wrong page from server"),m.pagination.total===0)return u("div",{class:"mx-auto flex flex-col items-center gap-2 px-2 py-4 text-center",children:[u(oe,{"aria-hidden":!0,name:"magnifier",class:"text-copy-neutral-lowcontrast"}),u("div",{class:"flex flex-col items-center gap-1",children:[u("p",{class:"text-copy-neutral text-style-job-heading",children:v("no_jobs_found")}),u("p",{class:"text-copy-neutral-lowcontrast text-style-tag [text-wrap:pretty]",children:v("no_jobs_found_description")})]})]});const x=m.pagination.last_page!==m.pagination.current_page,C=n*_t,S=Math.max(m.pagination.total-C,0),E=A=>{f(A,n)};return u(V,{children:[r?u("div",{class:"flex w-full max-w-[45rem] items-center justify-between gap-3 self-center",children:[u("p",{class:"text-copy-neutral-lowcontrast text-style-tag m-0 min-w-0 max-w-[25%] flex-none p-0 text-left [overflow-wrap:anywhere]",children:v("jobs_found",{count:m.pagination.total})}),u("div",{class:"flex min-w-0 flex-1 justify-end",children:l})]}):u(za,{page:n}),u("ul",{ref:$,"aria-label":`Page ${n}`,class:"flex w-full max-w-[45rem] flex-col gap-3 self-center",children:m.results.map(A=>u("li",{class:"ease-expo-out duration-slow transition-opacity",style:{opacity:b==="revalidating"?.33:1},children:u(fi,{job:A,onJobClick:E,config:s,distanceUnit:g})},A.id))}),x&&o&&u(_y,{state:b,fetchNextPage:i,config:s,remainingItems:S})]})}default:At(b)}},wy=zo(()=>Promise.resolve().then(()=>require("./map-f6ktiM4h.cjs")).then(e=>e.Map)),xy=({state:e,rpcClient:t,mapConfig:n,onGeoChange:r,afterResults:o,onJobClick:i,jobCardConfig:a,prioritySegment:s,i18n:c,distanceUnit:d})=>{var m,_;const{t:f}=re(),[l,h]=D(new AbortController),p=Xs("(max-width: 767px)"),g=H(b=>{r(b),l.abort(),h(new AbortController)},[r,l]),v=pn(Ft(Zn({state:e,baseKey:"map",mode:e.mode}),()=>Jl({rpcClient:t,state:e,t:f,signal:l.signal,prioritySegment:s,locale:c?c.locale:void 0,fallbackLocale:c?c.fallbackLocale:void 0}),Gn));if(v.queryState==="error")return u(et,{error:new Error(f("jobs_loading_error"),{cause:v.error}),resetError:()=>v.swr.mutate()});const y=v.queryState==="loaded"||v.queryState==="revalidating";return u(V,{children:[u("div",{class:"flex items-center justify-between gap-3",children:[u("p",{class:"text-copy-neutral-lowcontrast text-style-tag m-0 min-w-0 max-w-[25%] flex-none p-0 text-left [overflow-wrap:anywhere]",children:y?v.data.results.length!==0&&f("map_jobs_showing",{count:v.data.results.length}):u("div",{class:"animate-skeleton",children:u(nn,{chars:8})})}),u("div",{class:"flex min-w-0 flex-1 justify-end",children:o})]}),u("div",{class:"theme-fill:bg-neutral-2 theme-stroke:bg-lowest ring-px theme-fill:ring-neutral-3 theme-stroke:ring-neutral-3 theme-soft:rounded-lg theme-rounded:rounded-xl relative flex h-auto flex-col items-stretch overflow-hidden md:h-[70svh] md:flex-row",children:[u("div",{class:"aspect-square flex-1 md:order-2 md:aspect-auto md:min-w-80",children:y?u(Tt,{fallback:u("div",{class:"animate-skeleton bg-neutral-6 h-full w-full"}),children:u(wy,{config:n,mapData:v,autoFit:((m=e.geo)==null?void 0:m.type)!=="bounds",onBoundsChange:g})}):u("div",{class:"animate-skeleton bg-neutral-6 h-full w-full"})}),u("ul",{class:"flex h-full w-full snap-x snap-proximity scroll-px-4 gap-3 overflow-auto p-4 md:order-1 md:max-w-xl md:flex-col",children:[((_=v.data)==null?void 0:_.results.length)===0?u("div",{class:"mx-auto flex h-full w-full flex-col items-center justify-center gap-2 text-center",children:[u(oe,{"aria-hidden":!0,name:"magnifier",class:"text-copy-neutral-lowcontrast"}),u("div",{class:"flex flex-col items-center gap-1",children:[u("p",{class:"text-copy-neutral text-style-job-heading",children:f("no_jobs_found")}),u("p",{class:"text-copy-neutral-lowcontrast text-style-tag [text-wrap:pretty]",children:f("no_jobs_found_description")})]})]}):null,y?v.data.results.map(b=>u("li",{class:"ease-expo-out duration-slow min-w-[calc(100%-1rem)] snap-start transition-opacity",style:{opacity:v.queryState==="revalidating"?.33:1},children:u(fi,{job:b,onJobClick:w=>i(w,1),config:a,size:p?"sm":void 0,distanceUnit:d})},b.id)):Array.from({length:6}).map((b,w)=>u("li",{children:u(pi,{seed:w,animationDelay:(w-6)*.1,config:a})},w))]})]})]})},$y=e=>{var r;const t=e.state.view,n=u("div",{class:"flex min-w-0 max-w-full flex-wrap items-center justify-end gap-3",children:[(r=e.mapConfig)!=null&&r.enabled?u(ig,{value:t,onValueChange:e.onViewChange}):null,u(ag,{state:e.state,onValueChange:e.onResultOrderChange})]});return t==="list"?u(yy,{afterResults:n,...e}):u(xy,{...e,afterResults:n})};function Sy({rpcClient:e,filters:t,config:n,distanceUnit:r,onJobClick:o,onSearch:i}){const a=me(bn);if(!a)throw new Error("Saved jobs context is required");const{scope:s}=a,c=ui(s),{t:d,locale:f}=re(),[l,h]=D(null),[p,g]=D(),[v,y]=D(0),m=R(null),_=R(),b=R(!1);se(()=>{(l==null?void 0:l.filters)===t&&l.ids.some(S=>c==null?void 0:c.includes(S))?b.current=!0:(c==null?void 0:c.length)===0&&b.current&&i()},[c,l,t,i]),j(()=>{if(!c)return;const S=new AbortController,E=li(s,()=>S.abort());return g(void 0),Yl({rpcClient:e,ids:c,filters:t,t:d,locale:f,signal:S.signal}).then(A=>{S.signal.aborted||h({jobs:A,ids:c,filters:t})}).catch(A=>{S.signal.aborted||g(A)}),()=>{E(),S.abort()}},[e,s,c,t,d,f,v]);const w=(l==null?void 0:l.filters)===t?l.jobs.filter(S=>c==null?void 0:c.includes(S.id)):void 0,$=b.current&&(c==null?void 0:c.length)===0||c===void 0||l===null||l.filters!==t||c.some(S=>!l.ids.includes(S)),x=!p&&!$?c.filter(S=>!(w!=null&&w.some(E=>E.id===S))):[],C=[...(w==null?void 0:w.map(S=>S.id))??[],...x];return se(()=>{var E,A,I;if(_.current===void 0)return;(I=(_.current==="heading"?null:(E=m.current)==null?void 0:E.querySelector(`[data-save-job="${_.current}"]`))??((A=m.current)==null?void 0:A.querySelector("h2")))==null||I.focus(),_.current=void 0},[c,l]),u("div",{ref:m,class:"flex flex-col gap-4",onClickCapture:S=>{if(!(S.target instanceof Element))return;const E=S.target.closest("button[data-save-job]");if(!E||E.getAttribute("aria-pressed")!=="true")return;const A=C.indexOf(Number(E.dataset.saveJob));_.current=C[A+1]??C[A-1]??"heading"},children:[u("h2",{tabIndex:-1,class:"text-style-job-heading text-copy-neutral",children:!$&&c.length===0?d("no_saved_jobs"):d("saved_jobs_title")}),u("p",{role:"status",class:"sr-only",children:$||p?"":d("jobs_found",{count:c.length})}),p?u(et,{error:new Error(d("jobs_loading_error"),{cause:p}),resetError:()=>y(v+1)}):$&&!(w!=null&&w.length)?u("p",{class:"text-copy-neutral",children:d("loading_jobs")}):C.length?u("ul",{class:"flex w-full max-w-[45rem] flex-col gap-3 self-center",children:[w==null?void 0:w.map(S=>u("li",{children:u(fi,{job:S,config:n,distanceUnit:r,onJobClick:E=>o(E,1)})},S.id)),x.map(S=>u("li",{class:"rounded-job-card bg-job-card-bg ring-width-job-card ring-job-card-stroke flex items-center justify-between gap-4 p-4",children:[u("p",{class:hl(),children:d("saved_job_unavailable")}),u(fl,{id:S,title:d("saved_job_unavailable"),unavailable:!0})]},S))]}):null,u("button",{type:"button",class:ge({variant:"primary",size:"lg",class:"focus-visible:outline-highest self-start focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2"}),onClick:i,children:d("search_jobs")})]})}const or=(e,t="value")=>e.reduce((n,r)=>{switch(r.select){case"one":{const o=r.value??r[t],i=typeof o=="string"?o:o==null?void 0:o[0];n[r.key]={select:r.select,value:i};break}case"many":{const o=r.value??r[t],i=typeof o=="string"?[o]:Array.isArray(o)?o:[];n[r.key]={select:r.select,value:i};break}default:At(r.select)}return n},{}),Wn=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>{const r=n==null?void 0:n.value;return[t,Array.isArray(r)?r:r?[r]:[]]}).filter(([,t])=>t!==void 0&&t.length>0)),Yr=e=>(e==null?void 0:e.type)==="bounds"?void 0:e,Cy=(e,t,n)=>{var o;const r=Wn(e.filters);return n&&(r._locale=n),((o=e.geo)==null?void 0:o.type)==="provided"&&e.geo.coords&&(r.geolocation={type:"provided",lat:e.geo.coords.lat,lng:e.geo.coords.lng,radius:e.geo.radius,unit:t,...e.geo.label?{label:e.geo.label}:{}}),r},Ey=({rpcClient:e,properties:t,analytics:n,initialData:r,onStateChange:o,params:i})=>{var He,Ce,ue,fe,Pe,Ue,st,wt,xt,Re,vt,We,W,Y,Z,X,ce;const{t:a}=re(),s=R(null),c=J(()=>or(t,"defaultValue"),[t]),[d,f]=D(!0),[l,h]=D(()=>typeof i.initialState=="function"?i.initialState(i):i.initialState),p=i.applyFiltersOn==="submit",[g,v]=D(l),y=p?g:l,m=p?"form":"div",[_,b]=D(0),[w,$]=D((He=i.savedJobs)!=null&&He.enabled?void 0:!1),x=H(T=>{const O=new URL(window.location.href);T?O.searchParams.set("saved",""):O.searchParams.delete("saved"),window.history.replaceState(window.history.state,"",O),$(T)},[]);se(()=>{var O;if(!((O=i.savedJobs)!=null&&O.enabled))return;const T=()=>$(new URLSearchParams(window.location.search).has("saved"));return T(),window.addEventListener("popstate",T),()=>window.removeEventListener("popstate",T)},[(Ce=i.savedJobs)==null?void 0:Ce.enabled]);const C=H(()=>{var T;(T=i.savedJobs)!=null&&T.enabled&&x(!1)},[(ue=i.savedJobs)==null?void 0:ue.enabled,x]),S=R(null),E=R(),A=H(()=>{E.current="toggle",C()},[C]);se(()=>{var T,O,F;w===!0&&E.current==="heading"?((O=(T=s.current)==null?void 0:T.querySelector("h2"))==null||O.focus(),E.current=void 0):w===!1&&E.current==="toggle"&&((F=S.current??s.current)==null||F.focus(),E.current=void 0)},[w]);const[I,P]=D(0),{onJobClick:M,analyticsPaginate:L}=Oy({appRef:s,analytics:n,state:l,hasInteracted:!d,totalCount:I,defaultFilters:c}),z=H(T=>{h(O=>{if(O.page===T)return O;const F={...O,page:T};return o==null||o(F),F}),L(T)},[L,o]),B=H(T=>{h(O=>{const F={...O,view:T};return o==null||o(F),F})},[o]),N=H(T=>{if(p){v(T);return}h(O=>{const F=T(O);return F===O?O:(C(),f(!1),o==null||o(F),F)})},[p,C,o]),K=H(T=>{N(O=>{var F;return O.query===T?O:{...O,query:T,geo:Yr(O.geo),page:1,mode:(F=i.naturalLanguageSearch)!=null&&F.enabled?"vector":"query"}})},[N,(fe=i.naturalLanguageSearch)==null?void 0:fe.enabled]),q=(T=g.query)=>{var F;const O={...g,view:l.view,resultOrder:l.resultOrder,query:T,geo:T===g.query?g.geo:Yr(g.geo),page:1,mode:(F=i.naturalLanguageSearch)!=null&&F.enabled?"vector":"query"};C(),f(!1),v(O),h(O),o==null||o(O)},le=H(T=>{v(O=>({...O,geo:T})),f(!1),h(O=>{const F={...O,geo:T,page:1};return o==null||o(F),F})},[o]),at=H(()=>{C(),p&&b(T=>T+1),f(!1),h(T=>{const O={...T,filters:or(t,"defaultValue"),query:"",geo:void 0,page:1,resultOrder:void 0};return v(O),o==null||o(O),O})},[o,t,C,p]),Te=H(T=>{h(O=>{if(O.resultOrder===T)return O;f(!1);const F={...O,resultOrder:T,page:1};return o==null||o(F),F})},[o]),_e=J(()=>(e.environment,new Map),[e.environment]);return u(td,{value:{provider:()=>_e},children:u("div",{ref:s,tabIndex:(Pe=i.savedJobs)!=null&&Pe.enabled?-1:void 0,class:Nt("ijs-app font-family-default font-weight-default font-style-default flex min-h-screen flex-col gap-4",{"reduce-motion":(Ue=i.theme.accessibility)==null?void 0:Ue.reducedMotion},go(i.theme)),children:[u(on,{Fallback:et,children:u(m,{class:"flex flex-col gap-2",onSubmit:p?T=>{T.preventDefault();const O=T.currentTarget.querySelector('input[name="keyword"]');q(O==null?void 0:O.value.trim())}:void 0,children:[u("div",{class:"px-4",children:u("div",{class:"bg-section-strong-bg ring-section-weak-stroke rounded-section ring-px lg:ring-width-section flex flex-col gap-4 p-4 md:flex-row",children:[u("section",{class:"flex flex-1 flex-col gap-1",children:[u("p",{class:"text-style-filter text-copy-neutral font-style-filter font-weight-filter",children:a("search_label")}),(st=i.naturalLanguageSearch)!=null&&st.enabled?u(og,{value:y.query,onValueChange:K,options:i.naturalLanguageSearch,onSearch:p?q:(wt=i.savedJobs)!=null&&wt.enabled?C:void 0},_):i.enableKeywordSearch?u(tg,{value:y.query,onValueChange:K,onSearch:p?q:(xt=i.savedJobs)!=null&&xt.enabled?C:void 0},_):null]}),(Re=i.geolocation)!=null&&Re.enabled?u("section",{class:"flex flex-1 flex-col gap-1",children:[u("p",{class:"text-style-filter text-copy-neutral font-style-filter font-weight-filter",children:a("geo_label")}),u(Qv,{rpcClient:e,value:y.geo,distanceUnit:i.geolocation.distanceUnit,onValueChange:T=>{N(O=>({...O,geo:T,page:1})),p||L(1)}})]}):null]})}),u(Ch,{state:y,staged:p,onFilterValueChange:(T,O)=>{N(F=>({...F,filters:{...F.filters,[T]:O},geo:Yr(F.geo),page:1})),p||L(1)},onResetFilters:at,properties:t,rpcClient:e,alerts:i.alerts,theme:i.theme,widgetId:i.widgetId,i18n:i.i18n}),p?u("button",{type:"submit",class:ge({variant:"accent",class:"self-center"}),children:a("search")}):null]})}),u("section",{class:"flex flex-col gap-4 overflow-hidden px-4 py-4",children:[u(on,{Fallback:et,children:u(V,{children:[(vt=i.savedJobs)!=null&&vt.enabled&&i.savedJobs.showEntry!==!1&&!w?u(ly,{buttonRef:S,onClick:()=>{E.current="heading",b(T=>T+1),x(!0)}}):null,(We=i.savedJobs)!=null&&We.enabled&&w===void 0?u("p",{class:"text-copy-neutral",children:a("loading_jobs")}):(W=i.savedJobs)!=null&&W.enabled&&w?u(Sy,{rpcClient:e,filters:l.filters,config:i.jobCard,distanceUnit:(Y=i.geolocation)==null?void 0:Y.distanceUnit,onJobClick:M,onSearch:A}):u($y,{state:l,rpcClient:e,jobCardConfig:i.jobCard,mapConfig:i.map,initialData:d?r==null?void 0:r.jobs:void 0,onResultsUpdate:T=>{P(T.totalCount)},onJobClick:M,onPaginate:z,mode:(Z=i.naturalLanguageSearch)!=null&&Z.enabled?"vector":"query",onGeoChange:le,onViewChange:B,onResultOrderChange:Te,prioritySegment:(X=i.results)==null?void 0:X.prioritySegment,distanceUnit:(ce=i.geolocation)==null?void 0:ce.distanceUnit,i18n:i.i18n})]})}),i.feedback?u("div",{class:"flex flex-wrap items-center justify-center gap-2",children:[u("p",{class:"font-family-default font-style-default text-style-job-card-info text-copy-neutral-lowcontrast text-balance",children:a("feedback")}),u("div",{"data-widget":"inploi-feedback","data-key":"job-search",children:u("div",{class:"rounded-job-card bg-neutral-2 h-8 w-[72px] animate-pulse"})})]}):null]})]})})},Oy=({appRef:e,analytics:t,state:n,defaultFilters:r,totalCount:o,hasInteracted:i})=>{const a=H((d=1)=>({query:n.query,mode:n.mode,filters:Wn(n.filters),default_filters:Wn(r),total_count:o,page_size:_t,page:d}),[n.query,n.mode,n.filters,r,o]);return nd(e,{minViewTime:2e3,onView:()=>{t.log({event:"VIEW_SEARCH",properties:a()})}}),j(()=>{const d=window.setTimeout(()=>{i&&(!n.query&&!Object.keys(Wn(n.filters)).length||o!==0&&t.log({event:"SEARCH_SETTLE",properties:a()}))},5e3);return()=>{clearTimeout(d)}},[t,i,a,o,n.query,n.filters]),{onJobClick:(d,f)=>{t.log({event:"SEARCH_JOB_CLICK",properties:{job_id:d.id,...a(f)}})},analyticsPaginate:d=>{t.log({event:"SEARCH_PAGINATE",properties:a(d)})}}};exports.A=R;exports.ErrorBoundary=on;exports.IconSpritesheet=uu;exports.J=Mt;exports.JOB_SEARCH_WIDGET_ID=Ul;exports.JobSearch=Ey;exports.K=Do;exports.SavedJobsContext=bn;exports.TranslationProvider=ru;exports.UnstyledErrorView=cu;exports._=k;exports.alertsPayload=Cy;exports.createTFunction=ou;exports.d=D;exports.defaultTerms=iu;exports.generateColorThemeCss=dd;exports.getDefaultExportFromCjs=Bo;exports.getGeolocationFromSearchParams=tl;exports.getJobSearchResults=ms;exports.getModeFromSearchParams=Qc;exports.getSavedJobIds=Wt;exports.getSavedJobsUrl=cy;exports.getStatefulPropertiesFromSearchParams=Xc;exports.getViewFromSearchParams=el;exports.getWidgetStateFromSearchParams=kv;exports.invariant=qa;exports.isJobSaved=ay;exports.k=V;exports.setWidgetStateToSearchParams=Av;exports.subscribeSavedJobs=li;exports.toggleSavedJob=dl;exports.u=u;exports.useDebouncedValue=nl;exports.useTranslation=re;exports.y=j;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { x as Y, A as M, y as V, u as t1, z as j, B as b } from "./job-search-
|
|
1
|
+
import { x as Y, A as M, y as V, u as t1, z as j, B as b } from "./job-search-B1b-rnEA.js";
|
|
2
2
|
import { r as e1, c as l1 } from "./map-attribution-By9wrlPf.js";
|
|
3
3
|
const J = typeof document < "u" ? document.currentScript : null, z = typeof HTMLScriptElement < "u" && J instanceof HTMLScriptElement ? J : null, a1 = (z == null ? void 0 : z.src) || "https://sdk.inploi.com/@inploi/plugin-job-search/cdn/", W = z == null ? void 0 : z.nonce, r1 = 1e4;
|
|
4
4
|
function $(t, m) {
|
|
@@ -22,7 +22,7 @@ function $(t, m) {
|
|
|
22
22
|
$("maplibre-gl.js", () => window.__inploiMaplibre);
|
|
23
23
|
$("mapbox-gl.js", () => window.__inploiMapbox);
|
|
24
24
|
async function o1(t) {
|
|
25
|
-
const m = await import("./mapbox-gl-
|
|
25
|
+
const m = await import("./mapbox-gl-CWJ5zGOw.js").then((o) => o.m).then((o) => o.default);
|
|
26
26
|
return {
|
|
27
27
|
css: void 0,
|
|
28
28
|
createMap(o) {
|