PageSourceSearch

https://www.presencing.org/_next/static/chunks/63126-b4c4724441695f10.js

js presencing.org collected 2026-10-02 03:58:17 UTC 32,678 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[63126,65011],{27993:e=>{e.exports={grid:"AvailabilityGrid_grid__EWsR1",corner:"AvailabilityGrid_corner__3Wq2L",head:"AvailabilityGrid_head__Y3I12",headToggle:"AvailabilityGrid_headToggle__a0_qi",slot:"AvailabilityGrid_slot__UXpgS",cell:"AvailabilityGrid_cell__LUgB_",swatch:"AvailabilityGrid_swatch__VI3Qu",filled:"AvailabilityGrid_filled__SQtSL",selected:"AvailabilityGrid_selected__dTad1",action:"AvailabilityGrid_action__l4wfl",legend:"AvailabilityGrid_legend__3Rdn8"}},32077:e=>{e.exports={badge:"ScheduleBadge_badge__A4JkT",forming:"ScheduleBadge_forming__QwYpB",dormant:"ScheduleBadge_dormant__Tx7Ho",paused:"ScheduleBadge_paused__dSgpe"}},63126:(e,l,a)=>{"use strict";a.r(l),a.d(l,{default:()=>ev,propDefaults:()=>eb});var t=a(95155),s=a(12115),n=a(52619),i=a.n(n),r=a(20063),c=a(28613),o=a(65011),d=a(65117),u=a(22544),h=a(4288);let m=e=>"circle-finder:".concat(e),f=(e,l)=>{var a;return{timezone:e,language:null==l||null==(a=l.lang_primary)?void 0:a.id,vacancies:!0}},p=e=>{let l=(0,h.Uy)(m(e));if(!l||"object"!=typeof l)return;let a={};return"string"==typeof l.q&&(a.q=l.q),(e=>"string"==typeof e||"number"==typeof e)(l.language)&&(a.language=l.language),"string"==typeof l.timezone&&(a.timezone=l.timezone),"boolean"==typeof l.vacancies&&(a.vacancies=l.vacancies),"string"==typeof l.slots&&(a.slots=l.slots),a},g=(e,l)=>{let a=e=>String(null!=e?e:"");return!!e.q||!!e.slots||void 0!==e.vacancies&&e.vacancies!==l.vacancies||void 0!==e.language&&a(e.language)!==a(l.language)};var x=a(78542),y=a(27993),j=a.n(y);let b=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],v=b.map((e,l)=>l),_=Array.from({length:24},(e,l)=>l),C=(e,l)=>"".concat(e,"-").concat(l),N=e=>new Set((null!=e?e:"").split(",").map(e=>/^([0-6])-(\d{1,2})$/.exec(e.trim())).filter(e=>e&&23>=Number(e[2])).map(e=>C(Number(e[1]),Number(e[2])))),w=e=>e%12==0?12:e%12,k=e=>e%24<12?"am":"pm",S=(e,l)=>{if(1===l)return"".concat(w(e)," ").concat(k(e));let a=e+l,t=k(e)===k(a)?"".concat(w(e)):"".concat(w(e)," ").concat(k(e));return"".concat(t," – ").concat(w(a)," ").concat(k(a))},M=(e,l)=>1===l?(0,x.fU)(60*e,!1):"".concat((0,x.fU)(60*e,!1)," to ").concat((0,x.fU)((e+l)%24*60,!1)),A=e=>{let{value:l,onChange:a,timeZone:n,blockHours:i=1,counts:r,hint:c,legend:o,actions:d,className:u}=e,h=(0,s.useRef)(null),m=(0,s.useRef)(null),[f,p]=(0,s.useState)({day:0,block:0}),g=(0,s.useId)(),x=(0,s.useId)(),y=Math.max(1,Math.min(24,Math.floor(i))),N=Array.from({length:Math.ceil(24/y)},(e,l)=>l*y),w=N[N.length-1],k=(e,l)=>Array.from({length:Math.min(y,24-l)},(a,t)=>C(e,l+t)),A=(e,l,a)=>k(e,l).every(e=>a.has(e));(0,s.useEffect)(()=>{let e=()=>{h.current=null};return window.addEventListener("mouseup",e),()=>window.removeEventListener("mouseup",e)},[]);let T=e=>a(e),E=(e,l,a)=>
1{A(l,a,e.cells)!==("paint"===e.mode)&&(k(l,a).forEach(l=>"paint"===e.mode?e.cells.add(l):e.cells.delete(l)),T(new Set(e.cells)))},F=(e,l,a)=>{let t=h.current;t&&(e.clientX!==t.x||e.clientY!==t.y)&&(t.x=e.clientX,t.y=e.clientY,E(t,l,a))},I=e=>{let a=!e.every(e=>l.has(e)),t=new Set(l);e.forEach(e=>a?t.add(e):t.delete(e)),T(t)},z=e=>_.map(l=>C(e,l)),B=e=>v.flatMap(l=>k(l,e));return(0,t.jsxs)("div",{className:u,children:[(0,t.jsxs)("div",{className:"d-flex justify-content-between align-items-start gap-3 mb-2",children:[(0,t.jsxs)("span",{className:"small pi-fnt-stone",id:g,children:[null!=c?c:"Drag across the grid to mark when you are free."," Times in ",n,"."]}),(0,t.jsxs)("div",{className:"d-flex align-items-center gap-3 flex-shrink-0",children:[(0,t.jsx)("button",{type:"button",className:j().action,disabled:0===l.size,onClick:()=>T(new Set),children:"Clear"}),d]})]}),(0,t.jsx)("span",{className:"visually-hidden",id:x,children:"Arrow keys move between cells, space toggles the one you are on."}),(0,t.jsxs)("table",{ref:m,className:j().grid,"aria-label":"Weekly availability","aria-describedby":"".concat(g," ").concat(x),children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{className:j().corner,children:(0,t.jsx)("span",{className:"visually-hidden",children:"Time"})}),v.map(e=>(0,t.jsx)("th",{scope:"col",className:j().head,children:(0,t.jsx)("button",{type:"button",className:j().headToggle,"aria-label":"Toggle all of ".concat(b[e]),"aria-pressed":z(e).every(e=>l.has(e)),onClick:()=>I(z(e)),children:b[e].slice(0,3)})},e))]})}),(0,t.jsx)("tbody",{children:N.map(e=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{scope:"row",className:j().head,children:(0,t.jsx)("button",{type:"button",className:j().headToggle,"aria-label":"Toggle ".concat(M(e,y)," on every day"),"aria-pressed":B(e).every(e=>l.has(e)),onClick:()=>I(B(e)),children:S(e,y)})}),v.map(a=>{var s;let n=C(a,e),i=A(a,e,l),c=null!=(s=null==r?void 0:r.get(n))?s:0,o="".concat(b[a]," ").concat(M(e,y));return(0,t.jsx)("td",{className:j().slot,children:(0,t.jsx)("button",{type:"button","data-cell":n,className:"".concat(j().cell," ").concat(c>0?j().filled:""," ").concat(i?j().selected:""),"aria-label":r?"".concat(o,", ").concat(1===c?"1 result":"".concat(c," results")):o,"aria-pressed":i,tabIndex:f.day===a&&f.block===e?0:-1,onMouseDown:t=>((e,a,t)=>{let s={mode:A(a,t,l)?"erase":"paint",cells:new Set(l),x:e.clientX,y:e.clientY};h.current=s,p({day:a,block:t}),E(s,a,t)})(t,a,e),onMouseEnter:l=>F(l,a,e),onMouseMove:l=>F(l,a,e),onKeyDown:t=>((e,a,t)=>{if(" "===e.key||"Enter"===e.key){e.preventDefault(),((e,a)=>{let t=new Set(l),s=!A(e,a,l);
1k(e,a).forEach(e=>s?t.add(e):t.delete(e)),T(t)})(a,t);return}let s={ArrowLeft:[a-1,t],ArrowRight:[a+1,t],ArrowUp:[a,t-y],ArrowDown:[a,t+y]}[e.key];s&&(e.preventDefault(),((e,l)=>{var a,t;let s={day:Math.min(6,Math.max(0,e)),block:Math.min(w,Math.max(0,l))};p(s),null==(t=m.current)||null==(a=t.querySelector('[data-cell="'.concat(C(s.day,s.block),'"]')))||a.focus()})(s[0],s[1]))})(t,a,e),children:c>0?c:""})},a)})]},e))})]}),o&&(0,t.jsxs)("ul",{className:j().legend,children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("span",{className:"".concat(j().swatch," ").concat(j().selected),"aria-hidden":"true"}),o.selected]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("span",{className:"".concat(j().swatch," ").concat(j().filled),"aria-hidden":"true"}),o.filled]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("span",{className:j().swatch,"aria-hidden":"true"}),o.empty]})]})]})};var T=a(61633),E=a(20690),F=a(98825),I=a.n(F);let z=e=>{let{slots:l,onChange:a}=e,t=JSON.stringify({...(0,u.FH)(),slots:l}),n=(0,s.useRef)(null),i=(0,s.useRef)(a);return i.current=a,(0,s.useEffect)(()=>{if(n.current===t)return;let e=setTimeout(()=>{n.current=t,i.current(JSON.parse(t))},400*(null!==n.current));return()=>clearTimeout(e)},[t]),null},B=e=>{let{blocks:l,slots:a,defaults:s,onClearAvailability:n}=e,{setValue:i}=(0,u.xW)(),r=(0,u.FH)(),{languages:c}=(0,E.A)(),o=[];if(r.q&&o.push({key:"q",label:"“".concat(r.q,"”"),clear:()=>i("q","",{shouldDirty:!0})}),l>0&&o.push({key:"slots",label:"".concat(l," time block").concat(1===l?"":"s"),clear:n}),r.language){var d;let e=null==c?void 0:c.find(e=>String(e.id)===String(r.language));o.push({key:"language",label:null!=(d=null==e?void 0:e.name)?d:"Language",clear:()=>i("language","",{shouldDirty:!0})})}return r.vacancies&&o.push({key:"vacancies",label:"Has vacancies",clear:()=>i("vacancies",!1,{shouldDirty:!0})}),(0,t.jsxs)(t.Fragment,{children:[o.map(e=>(0,t.jsxs)("button",{type:"button",className:I().chip,"aria-label":"Remove the ".concat(e.label," filter"),onClick:e.clear,children:[e.label,(0,t.jsx)("i",{className:"fal fa-times","aria-hidden":"true"})]},e.key)),g({...r,slots:a},s)&&(0,t.jsx)("button",{type:"button",className:I().reset,onClick:()=>{var e,l;i("q","",{shouldDirty:!0}),i("language",null!=(e=s.language)?e:"",{shouldDirty:!0}),i("vacancies",null!=(l=s.vacancies)&&l,{shouldDirty:!0}),n()},children:"Reset all"})]})},R=e=>{let{value:l,onChange:a,fallbackTimeZone:s,counts:n,actions:i}=e,r=(0,u.FH)({name:"timezone"});return(0,t.jsx)(A,{value:l,onChange:a,timeZone:r||s,blockHours:4,counts:n,hint:"Drag to mark when you are free. Shading shows how many circles meet in each block.",legend:{selected:"You are free",filled:"Circles meet here",empty:"No circles"},actions:i})},D=e=>{let{initialFilters:l,defaults:a,fallbackTimeZone:n,matchCount:i,slotCounts:r,unscheduledCount:c=0,onSearch:o}
1=e,[d]=(0,s.useState)(()=>{let e={...l};return delete e.slots,e}),[u,h]=(0,s.useState)(()=>N(l.slots)),[m,f]=(0,s.useState)(!1),p=(0,s.useId)(),g=Math.round(u.size/4),x=g?"".concat(g," time block").concat(1===g?"":"s"," free"):"Any time",y=[...u].map(e=>e.split("-").map(Number)).sort((e,l)=>{let[a,t]=e,[s,n]=l;return a-s||t-n}).map(e=>{let[l,a]=e;return C(l,a)}).join(","),j=(0,s.useCallback)(()=>h(new Set),[]),[b,v]=(0,s.useState)(null);return(0,s.useEffect)(()=>{r&&v(new Map(Object.entries(r)))},[r]),(0,t.jsxs)(T.lV,{className:"pt-0",defaultValues:d,showValidationFailedMsg:!1,children:[(0,t.jsx)(z,{slots:y,onChange:o}),(0,t.jsx)("h3",{className:"fw-bold fs-3 mb-3",children:"Find your Circle"}),(0,t.jsxs)("div",{className:I().filterRow,children:[(0,t.jsx)("div",{className:I().search,children:(0,t.jsx)(T.pd,{name:"q",placeholder:"Circle number or title"})}),(0,t.jsxs)("button",{type:"button",className:"".concat(I().availabilityToggle," ").concat(g?I().active:""),"aria-expanded":m,"aria-controls":p,onClick:()=>f(e=>!e),children:[(0,t.jsx)("i",{className:"fal fa-clock","aria-hidden":"true"}),x,(0,t.jsx)("i",{className:"fal fa-chevron-".concat(m?"up":"down"),"aria-hidden":"true"})]}),(0,t.jsx)("div",{className:I().filter,children:(0,t.jsx)(T.pZ,{name:"language",blankLabel:"Any language"})}),(0,t.jsx)("div",{className:I().filter,children:(0,t.jsx)(T.dj,{name:"timezone",ariaLabel:"Timezone",fetchUrl:"/timezones",asNumber:!1,getOptions:e=>(0,t.jsx)("option",{children:e},e)})}),(0,t.jsx)("div",{className:I().toggleBox,children:(0,t.jsx)(T.lM,{name:"vacancies",label:"Has vacancies"})})]}),m&&(0,t.jsx)("div",{id:p,className:I().availabilityPanel,children:(0,t.jsx)(R,{value:u,onChange:h,fallbackTimeZone:n,counts:b,actions:(0,t.jsxs)("button",{type:"button",className:I().collapse,onClick:()=>f(!1),"aria-controls":p,children:["Collapse",(0,t.jsx)("i",{className:"fal fa-chevron-up","aria-hidden":"true"})]})})}),(0,t.jsxs)("div",{className:I().summary,children:[(0,t.jsxs)("span",{children:[(0,t.jsx)("strong",{children:i})," circle",1===i?"":"s"," match",1===i?"es":"",g>0&&c>0&&(0,t.jsxs)("span",{className:"pi-fnt-stone",children:[" \xb7 ",c," open to any time"]})]}),(0,t.jsx)(B,{blocks:g,slots:y,defaults:a,onClearAvailability:j})]})]})};var L=a(63365),O=a(87606),U=a(40274),P=a(23878),W=a(41661),Z=a(32077),q=a.n(Z);let Y={forming:{label:"Schedule still flexible",tooltip:"This circle hasn't settled on a meeting time yet",className:q().forming},dormant:{label:"No next meeting scheduled yet",tooltip:"This circle has met before, but has nothing coming up",className:q().dormant},paused:{label:"Meetings resume later",tooltip:"This circle has paused its meetings and means to start again",className:q().paused}},H=e=>{let{item:l}=e,a=l.schedule_state,s=a&&"scheduled"!==a?a:null;if(!s)return null;let{label:n,tooltip:i,className:r}=Y[s];return(0,t.jsx)(P.A,{id:"schedule-".concat(s,"-").concat(l.id),text:i,children:(0,t.jsx)("span",{className:"".concat(q().badge," ").concat(r," d-inline-block rounded-pill text-uppercase text-nowrap"),children:n})})};var G=a(7626),K=a(96756),V=a(93023),X=a.n(V);let J=e=>{var l;let{item:a,offering:n,currentUserId:r,clientTimeZone:c,className:o="col-md-6 col-lg-4 mb-3"}=e,[d,u]=(()=>{let[e,l]=(0,s.useState)(!1),a=(0,s.useRef)(null),t=(0,s.useCallback)(e=>{a.current=e},[]);return(0,s.useEffect)(()=>{let e=a.current;if(!e)return;let t=()=>l(e.scrollWidth>e.clientWidth+1);if(t(),"undefined"==typeof ResizeObserver)return;let s=new ResizeObserver(t);return s.observe(e),()=>s.disconnect()}),[t,e]})(),[h,m]=(0,s.useMemo)(()=>{let e=(0,G.Q3)(a),l=e.map(e=>(0,t.jsx)("li",{className:X().takenSeat,children:(0,t.jsx)(U.A,{user:e,size:32,includePopover:!1,enableInitials:"muted"})},e.id));for(let a=e.length;a<G.dw;a++)l.push((0,t.jsx)("li",{className:X().openSeat},"open-".concat(a)));return[e.length,l]},[a]);if(h<1)return null;let f=null==(l=a.members)?void 0:l.find(e=>e.id===r),p=a.title=="#"+a.id?"Circle ".concat(n.title):a.title;return(0,t.jsx)("div",{className:o,children:(0,t.jsxs)("article",{className:X().card,children:[(0,t.jsx)("div",{className:X().tagStrip,children:(0,t.jsxs)("span",{className:X().tag,children:["#",a.id]})}),(0,t.jsxs)("div",{className:"".concat(X().surface," ").concat(f?X().isMember:""),children:[(0,t.jsx)("h5",{className:X().title,children:(0,t.jsx)(P.A,{id:"circle-title-".concat(a.id),text:u?p:void 0,children:(0,t.jsx)(i(),{ref:d,href:(0,K.c3)("/offerings/".concat(n.slug,"/coaching-circles/").concat(a.slug)),className:"".concat(X().titleLink," stretched-link no-arrow"),prefetch:!1,children:p})})}),(0,t.jsxs)("div",{className:X().body,children:[(0,t.jsx)(W.Ay,{item:a,timeZone:c}),(0,t.jsx)(H,{item:a}),(0,t.jsx)("ul",{className:X().members,children:m}),(0,t.jsx)("p",{className:X().slots,children:(0,G.wN)(h)})]})]})]})})},Q=e=>Object.entries(e).filter(e=>{let[,l]=e;return null!=l&&""!==l&&!1!==l}).map(e=>{let[l,a]=e;return"".concat(l,"=").concat(encodeURIComponent(String(a)))}).join("&"),$=e=>({key:"flat",kind:"flat",label:null,slots:e,unscheduled:"include",isEmpty:!1,emptyLabel:"There are no search results. Please redefine your search criteria"});var ee=a(60444),el=a(76144),ea=a(76282),et=a(67360),es=a.n(et);let en=e=>{var l;let{section:a,offering:n,shared:i,eager:r,currentUser:c,clientTimeZone:o}
1=e,[d,u]=(0,s.useState)([]),[h,m]=(0,s.useState)(null),[f,p]=(0,s.useState)(0),[g,x]=(0,s.useState)(!1),[y,j]=(0,s.useState)(),[b,v]=(0,s.useState)(r||a.isEmpty),_=(0,s.useRef)(null),C=(0,s.useId)(),N="flat"===a.kind?30:12,w=(0,s.useMemo)(()=>((e,l,a,t,s)=>"/offerings/".concat(e,"/coaching-circles?")+[l,Q({slots:a.slots,unscheduled:a.unscheduled,counts:0,_start:t,_limit:s})].filter(Boolean).join("&"))(n.slug,i,a,f,N),[n.slug,i,a,f,N]);(0,s.useEffect)(()=>{if(b||!_.current)return;if("undefined"==typeof IntersectionObserver)return void v(!0);let e=new IntersectionObserver(e=>e.some(e=>e.isIntersecting)&&v(!0),{rootMargin:"300px"});return e.observe(_.current),()=>e.disconnect()},[b]),(0,s.useEffect)(()=>{if(!b||a.isEmpty)return;let e=!1;return x(!0),(0,ea.Em)(w).then(l=>{e||(u(e=>0===f?l.data:e.concat(l.data)),m(Number(l.totalCount)))}).catch(l=>!e&&j(l)).finally(()=>!e&&x(!1)),()=>{e=!0}},[w,f,b,a.isEmpty]);let k=null!=(l=null!=h?h:a.knownCount)?l:null,S=!a.isEmpty&&null===h&&!y;return(0,t.jsxs)("section",{className:"mb-5","aria-labelledby":a.label?C:void 0,children:[a.label&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("h4",{id:C,className:"fw-bold fs-5 mb-3 d-flex flex-wrap align-items-baseline gap-2",children:[a.label,null!==k&&(0,t.jsxs)("span",{className:"fw-normal fs-6 pi-fnt-stone",children:[k," circle",1===k?"":"s"]})]}),(0,t.jsx)("div",{className:"pi-head-line ".concat(es().flush)})]}),(0,t.jsx)("div",{ref:_,children:y?(0,t.jsx)(ee.default,{error:y,showMinimal:!0}):!a.isEmpty&&(S||g||d.length)?(0,t.jsxs)(t.Fragment,{children:[!!d.length&&(0,t.jsx)("div",{className:"flex-row row",children:d.map(e=>(0,t.jsx)(J,{item:e,offering:n,currentUserId:null==c?void 0:c.id,clientTimeZone:o},e.id))}),(S||g)&&(0,t.jsx)(el.A,{}),null!==h&&d.length<h&&(0,t.jsx)("div",{className:"text-center mt-3",children:(0,t.jsx)("button",{type:"button",className:"btn btn-outline-dark rounded-0 px-5",onClick:()=>p(f+N),children:"SHOW MORE"})})]}):"flat"===a.kind?(0,t.jsx)("div",{className:"flex-row row",children:(0,t.jsx)(L.default,{children:(0,t.jsx)(O.default,{variant:"light",className:"text-center",children:a.emptyLabel})})}):(0,t.jsx)("p",{className:"pi-fnt-stone mb-0",children:a.emptyLabel})})]})},ei=e=>{let{offering:l,clientTimeZone:a,currentUser:n,onTriggerCreate:i}=e,[r,c]=(0,s.useState)(),[o,u]=(0,s.useState)(0),[g,x]=(0,s.use
1State)(null),[y,j]=(0,s.useState)(0),[v]=(0,s.useState)(()=>f(a,n)),[_]=(0,s.useState)(()=>({...v,...p(l.slug)})),[w,k]=(0,s.useState)(null),M=(0,s.useMemo)(()=>w?(e=>Q({q:e.q,language:e.language,timezone:e.timezone,vacancies:e.vacancies,slotBlock:4}))(w):null,[w]);(0,s.useEffect)(()=>{let e,a;if(null===M)return;let t=!1;return(0,ea.Em)((e=l.slug,a=null==w?void 0:w.slots,"/offerings/".concat(e,"/coaching-circles?")+[M,Q({slots:a,_start:0,_limit:0})].filter(Boolean).join("&"))).then(e=>{var l,a;t||(u(Number(e.totalCount)),x(null!=(l=e.slotCounts)?l:null),j(null!=(a=e.unscheduledCount)?a:0))}).catch(e=>!t&&c(e)),()=>{t=!0}},[l.slug,M,null==w?void 0:w.slots]);let A=(0,s.useMemo)(()=>w?((e,l,a)=>{let t=(e=>{let l=new Map;N(e).forEach(e=>{var a;let[t,s]=e.split("-").map(Number);l.set(t,(null!=(a=l.get(t))?a:new Set).add(s))});let a=[];return[...l.keys()].sort((e,l)=>e-l).forEach(e=>{[...l.get(e)].sort((e,l)=>e-l).forEach(l=>{let t=a[a.length-1];t&&t.day===e&&t.start+t.span===l?t.span+=1:a.push({day:e,start:l,span:1,cells:""})})}),a.map(e=>({...e,cells:Array.from({length:e.span},(l,a)=>C(e.day,e.start+a)).join(",")}))})(e);if(!t.length)return[$("")];let s=t.map(e=>({key:e.cells,kind:"run",label:(e=>{let{day:l,start:a,span:t}=e;return"".concat(b[l],", ").concat(t>=24?"all day":S(a,t))})(e),slots:e.cells,unscheduled:"exclude",knownCount:((e,l)=>4===e.span&&e.start%4==0?null==l?void 0:l["".concat(e.day,"-").concat(e.start)]:void 0)(e,l),isEmpty:!!l&&!(e=>{let l=4*Math.floor(e.start/4),a=4*Math.floor((e.start+e.span-1)/4),t=[];for(let s=l;s<=a;s+=4)t.push("".concat(e.day,"-").concat(s));return t})(e).some(e=>{var a;return(null!=(a=null==l?void 0:l[e])?a:0)>0}),emptyLabel:"No circles meet then."}));return s.filter(e=>!e.isEmpty).length>8?[$(null!=e?e:"")]:(a>0&&s.push({key:"unscheduled",kind:"unscheduled",label:"Open to any time",slots:"",unscheduled:"only",knownCount:a,isEmpty:!1,emptyLabel:"No circles are open to any time."}),s)})(w.slots,g,y):[],[w,g,y]),T=(0,s.useMemo)(()=>new Set(A.filter(e=>!e.isEmpty).slice(0,3).map(e=>e.key)),[A]),E=(0,s.useCallback)(e=>{let a;a=l.slug,(0,h.Us)(m(a),e),k(e)},[l.slug]);if(r)return(0,t.jsx)(ee.default,{error:r,showMinimal:!0});let F=A.some(e=>e.label);return(0,t.jsxs)("div",{children:[(0,t.jsx)(D,{initialFilters:_,defaults:v,fallbackTimeZone:a,matchCount:o,slotCounts:g,unscheduledCount:y,onSearch:E}),(0,t.jsxs)("div",{className:"mt-3 mb-3",children:[(0,t.jsxs)("div",{className:"d-flex flex-wrap justify-content-end align-items-center gap-3 mb-3",children:[(0,t.jsx)("p",{className:"m-0 pi-fnt-stone",children:"Try joining a circle before starting one."}),(0,t.jsx)(d.default,{variant:"primary",size:"sm",onClick:i,children:"Start a circle"})]}),F&&(0,t.jsxs)("p",{className:"small pi-fnt-stone",children:["Times in ",(null==w?void 0:w.timezone)||a,"."]}),null===M?(0,t.jsx)(el.A,{}):A.map(e=>(0,t.jsx)(en,{section:e,offering:l,shared:M,eager:T.has(e.key),currentUser:n,clientTimeZone:a},"".concat(M,"|").concat(e.key)))]})]})};var er=a(67483),ec=a.n(er),eo=a(81673),ed=a.n(eo);let eu={0:{items:1},768:{items:2},992:{items:3}},eh=e=>{let{items:l,responsive:a=eu,label:n,infinite:i=!1,autoPlay:r=!1,autoPlayInterval:c,showDots:o=!0,className:d}=e,u=(0,s.useRef)(null),[h,m]=(0,s.useState)(!0),[f,p]=(0,s.useState)(!0),g=(0,s.useRef)({prev:!0,next:!0}),x=(0,s.useRef)(!1),y=(0,s.useRef)(0),[j,b]=(0,s.useState)(!1),v=j?160:320,_=(0,s.useCallback)(e=>{let l=u.current,a=e>0?g.current.next:g.current.prev;if(!l||a){y.current=0,b(!1);return}x.current=!0,e>0?l.slideNext():l.slidePrev()},[]),C=(0,s.useCallback)(e=>{if(x.current){y.current+=e,b(!0);return}_(e)},[_]),N=(0,s.useCallback)(e=>{g.current={prev:e.isPrevSlideDisabled,next:e.isNextSlideDisabled},m(e.isPrevSlideDisabled),p(e.isNextSlideDisabled),x.current=!1},[]),w=(0,s.useCallback)(e=>{N(e);let l=y.current;if(!l)return void b(!1);let a=l>0?1:-1;y.current=l-a,_(a)},[N,_]);return(0,t.jsxs)("div",{className:[ed().root,d].filter(Boolean).join(" "),style:{"--pi-carousel-slide-duration":"".concat(v,"ms")},role:"region","aria-roledescription":"carousel","aria-label":n,children:[(0,t.jsx)(ec(),{ref:u,items:l,responsive:a,infinite:i,autoPlay:r,autoPlayInterval:c,animationDuration:v,autoHeight:!1,autoWidth:!1,mouseTracking:!0,controlsStrategy:"responsive",disableButtonsControls:!0,disableDotsControl
1s:!o,onInitialized:N,onSlideChanged:w,onResized:N,onUpdated:N}),(!h||!f)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:"".concat(ed().nav," ").concat(ed().prev),"aria-label":"Previous",disabled:h,onClick:()=>C(-1),children:(0,t.jsx)("i",{className:"fal fa-chevron-left","aria-hidden":"true"})}),(0,t.jsx)("button",{type:"button",className:"".concat(ed().nav," ").concat(ed().next),"aria-label":"Next",disabled:f,onClick:()=>C(1),children:(0,t.jsx)("i",{className:"fal fa-chevron-right","aria-hidden":"true"})})]})]})},em=e=>{let{circles:l=[],offering:a,currentUserId:n,clientTimeZone:r}=e,c=(0,s.useMemo)(()=>l.map(e=>(0,t.jsx)(J,{item:e,offering:a,currentUserId:n,clientTimeZone:r,className:"alice-carousel-item h-100 pb-2"},"mycc-".concat(e.id))),[l,a,n,r]);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("h3",{className:"mt-4 mb-3",children:["My Coaching Circle",l.length>1?"s":""," in ",a.title]}),(0,t.jsx)("div",{className:"pi-head-line "}),(0,t.jsx)("div",{className:"row",children:(0,t.jsx)("div",{className:"col-12",children:(0,t.jsxs)("p",{children:["You are a member of ",l.length," coaching circle",l.length>1?"s":""," for ",a.title,":"]})})}),(0,t.jsx)(eh,{items:c,label:"My coaching circles in ".concat(a.title),infinite:!1}),(0,t.jsx)("div",{className:"row",children:(0,t.jsx)("div",{className:"col-12",children:(0,t.jsxs)("p",{className:"text-muted",children:[(0,t.jsx)("strong",{children:"Note:"})," you can always find all your coaching circles of all programs on"," ",(0,t.jsx)(i(),{href:"/user/profile",children:"your profile page"})]})})})]})},ef=e=>{let{offering:l,currentUserId:a,clientTimeZone:n}=e,{data:i}=(0,ea.st)(l?"/offerings/".concat(l.slug,"/coaching-circles/recommended"):null,{timezone:n}),r=null==i?void 0:i.data,c=(0,s.useMemo)(()=>(null!=r?r:[]).map(e=>(0,t.jsx)(J,{item:e,offering:l,currentUserId:a,clientTimeZone:n,className:"alice-carousel-item h-100 pb-2"},"rec-".concat(e.id))),[r,l,a,n]);return c.length?(0,t.jsxs)("div",{className:"mb-5",children:[(0,t.jsxs)("h3",{className:"mt-4 mb-3",children:["Recommended for you in ",l.title]}),(0,t.jsx)("div",{className:"pi-head-line"}),(0,t.jsx)("div",{className:"row",children:(0,t.jsx)("div",{className:"col-12",children:(0,t.jsxs)("p",{children:["Circles with a place free that meet at a reasonable hour in your timezone (",n,"), in a language you read. The fuller ones come first — they need one more person to be complete."]})})}),(0,t.jsx)(eh,{items:c,label:"Circles recommended for you in ".concat(l.title),infinite:!1})]}):null};var ep=a(51458),eg=a(71269),ex=a(82722),ey=a(25383),ej=a(75913);let eb={showTitle:!0,showDescription:!0,showMyCircles:!0,marginTop:0,marginBottom:2},ev=e=>{let l=(0,ej.A)(e,eb),[a,n]=(0,s.useState)(!1),d=(0,ex.A)(),u=(0,r.useRouter)(),{isAuthenticated:h,isAuthChecked:m,currentUser:y,isConfirmed:j}=(0,eg.Ay)(),b=(0,ey.A)(e=>e.offering.item),v=(0,x.RP)();v||(v="America/New_York");let{data:_,isLoading:C,isError:N}=(0,ea.st)(b&&y&&l.showMyCircles?"/me/coaching-circles":null,{offering:null==b?void 0:b.id,timezone:v}),w=!!(null==_?void 0:_.length),{data:k}=(0,ea.st)(a&&b?"/offerings/".concat(b.slug,"/coaching-circles/settings"):null),S=(0,s.useMemo)(()=>!!b&&((e,l)=>{let a=p(e);return!!a&&g(a,l)})(b.slug,f(v,null!=y?y:void 0)),[b,v,y]),M=(0,s.useMemo)(()=>!!b&&!!b.end_date&&b.end_date<(0,x.Yq)(new Date,"yyyy-MM-dd"),[b]),A=async e=>{if(b)try{let l=await (0,ea.Em)("/offerings/".concat(b.slug,"/coaching-circles"),e,{method:"POST"});d({type:"success",message:"Coaching Circle created successfully"}),u.push((0,K.c3)("/offerings/".concat(b.slug,"/coaching-circles/").concat(l.slug)))}catch(e){d({type:"error",message:"Failed to create the coaching circle"})}finally{n(!1)}},T=(0,t.jsxs)("div",{className:"row mb-3",children:[(0,t.jsx)("div",{className:"col-12 col-md-6",children:(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:"Coaching Circles"}),' are dedicated spaces for doing a specific exercise called Case Clinic. These can be either virtual (we provide a "find your peers" functionality below) or place-based, often through in-person hubs. You can find an existing Coaching Circle below and ask to join it or create your own. 
1Coaching Circles are limited to six people in each.']})}),(0,t.jsx)("div",{className:"col-12 col-md-6",children:(0,t.jsxs)("p",{children:["When you join a Coaching Circle, you can return to it by clicking on the ",(0,t.jsx)("i",{className:"fal fa-user"})," - icon (",(0,t.jsx)("span",{style:{fontSize:"12px",letterSpacing:"0.5px"},children:"“ACCOUNT”"}),") on the floating menu on the right hand side of every u-school page, and then select “Your dashboard”. You’ll see a section called “My Coaching Circles”. Just click on it to open one."]})})]}),E=(0,t.jsxs)(t.Fragment,{children:[l.showMyCircles&&b&&y&&w&&(0,t.jsx)(em,{circles:_,offering:b,currentUserId:y.id,clientTimeZone:v}),l.showMyCircles&&b&&y&&!w&&(0,t.jsx)(ef,{offering:b,currentUserId:y.id,clientTimeZone:v}),l.showMyCircles&&h&&b&&w&&(0,t.jsx)("div",{className:"row px-0 ms-1 my-3",children:(0,t.jsx)(c.default,{className:"pi-accordion ps-1 mt-0 mx-n3 pt-n4 date-list mb-5",defaultActiveKey:S?"1":void 0,flush:!0,children:(0,t.jsxs)(c.default.Item,{eventKey:"1",children:[(0,t.jsx)(c.default.Header,{className:"pb-0 mb-n3 mt-0",children:(0,t.jsxs)("h3",{className:" fw-bold fs-5 mt-0 mb-3",children:["Find another Coaching Circle for ",b.title]})}),(0,t.jsx)(c.default.Body,{className:"mt-0 nof-line",children:(0,t.jsx)(ei,{offering:b,clientTimeZone:v,currentUser:y,onTriggerCreate:()=>n({})})}),(0,t.jsx)("div",{className:"line"})]})})}),h&&b&&(!l.showMyCircles||!w)&&(0,t.jsx)(ei,{offering:b,clientTimeZone:v,currentUser:y,onTriggerCreate:()=>n({})})]});return(0,t.jsxs)("div",{className:"pi-widget pi-coaching-circles "+(0,x.oc)(l),children:[l.showTitle&&(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)("h1",{children:"Coaching Circles"}),(0,t.jsx)("div",{className:"pi-head-line mb-3"})]}),m&&b?M?(0,t.jsxs)("div",{className:"row my-5",children:[(0,t.jsx)("p",{className:"fs-4",children:"This offering has ended and coaching circles are now deactivated. Members can still access existing coaching circles through their profile page."}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:"You want to learn more about Coaching Circles?"}),(0,t.jsx)("br",{}),(0,t.jsx)(i(),{href:"/case-clinic",children:"Click here"})," to read and watch more about this tool."]})]}):h&&!j?(0,t.jsx)("div",{className:"row my-5",children:(0,t.jsx)(ep.A,{msg:"Your email must be confirmed before accessing coaching circles."})}):N?(0,t.jsx)(ee.default,{error:N,showMinimal:!0}):(0,t.jsxs)(t.Fragment,{children:[l.showDescription&&T,C?(0,t.jsx)(el.A,{}):E]}):(0,t.jsx)(el.A,{}),a&&(0,t.jsx)(o.default,{isOpen:!!a,onToggle:()=>n(!1),data:"object"==typeof a?a:void 0,onSave:A,recurringStartDate:null==k?void 0:k.recurring_start_date})]})}},65011:(e,l,a)=>{"use strict";a.r(l),a.d(l,{default:()=>v});var t=a(95155),s=a(12115),n=a(85937),i=a(63365),r=a(33599),c=a(65117),o=a(61633),d=a(27919),u=a(54438),h=a(744),m=a(71269),f=a(11583),p=a(26549),g=a(96352),x=a.n(g);let y="date_recurring",j="cc_poll_note",b="cc_propose_times",v=e=>{let{isOpen:l,onToggle:a,data:g={},onSave:v,recurringStartDate:_}=e,{currentUser:C}=(0,m.Ay)(),[N,w]=(0,s.useState)(!1),k=!g.id,[S,M]=(0,s.useState)(!1),[A,T]=(0,s.useState)([]),E=(0,s.useCallback)(e=>M(!!e),[]),F=(0,f.A)(),[I,z]=(0,s.useState)(),B=I||F||"UTC",R=async e=>{if(delete e.day,delete e.time,delete e.time_hour,delete e.time_min,delete e.timezone,k){let l=e[j];delete e[j],delete e[b],delete e[h.CX],delete e[h.Os],delete e[h.Ao],S&&A.length&&(e.poll={poll_type:y,options:A,description:l})}w(!0),await v(e),w(!1)},D=(0,s.useMemo)(()=>{var e;return{language:(null==C||null==(e=C.lang_primary)?void 0:e.id)||p.ti,[b]:!1,[j]:"Please mark which of these times work for you so we can settle on a weekly time. If none of them suit you, propose a time of your own.",...(0,h.uj)()}},[C]);return(0,t.jsx)(n.A,{show:l,onHide:a,size:"lg",backdrop:"static",children:(0,t.jsxs)(o.lV,{defaultValues:k?D:g,onSubmit:R,children:[(0,t.jsx)(n.A.Header,{closeButton:!0,className:"bg-dark",children:(0,t.jsx)(n.A.Title,{children:k?"Create a Coaching Circle":"Edit Coaching Circle"})}),(0,t.jsxs)(n.A.Body,{children:[(0,t.jsxs)("section",{className:x().card,children:[(0,t.jsx)("h2",{className:x().cardHead,children:"About the circle"}),(0,t.jsxs)("div",{className:x().cardBody,children:[(0,t.jsx)(o.gE,{as:i.default,controlId:"cc_title",children:(0,t.jsx)(o.pd,{name:"title",label:"Title",placeholder:"Optional",hint:"Specify an optional title. If left empty, a numeric title will be auto-generated. Coaching Circles are not thematic, the title is about the meeting details (e.g. Every Wed 7pm in Portugese)"})}),(0,t.jsx)(r.default,{children:(0,t.jsx)(o.gE,{as:i.default,sm:12,md:6,controlId:"cc_language",children:(0,t.jsx)(o.pZ,{name:"language",label:"Language",hint:"The circle meets in this language.",config:{required:!0}})})}),(0,t.jsx)("hr",{className:x().rule}),(0,t.jsx)(o.gE,{as:i.default,controlId:"is_private",className:x().switch,children:(0,t.jsx)(o.lM,{name:"is_private",label:"Private circle",hint:"Keeps the circle out of the finder. People can only join by invitation."})}),(0,t.jsx)(o.gE,{as:i.default,controlId:"video_url",children:(0,t.jsx)(o.pd,{name:"props.video_url",label:"Custom Meeting URL",placeholder:"https://",hint:"If you want to use a custom link for video meetings, enter it here. Leave this blank to use our default video tool (Jitsi)."})})]})]}
1),k&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("section",{className:x().card,children:(0,t.jsx)(o.gE,{className:"".concat(x().switch," ").concat(x().proposeSwitch),controlId:b,children:(0,t.jsx)(o.lM,{name:b,onChange:E,hint:"Starts a Meeting Finder: everyone who joins marks which of your proposed times work for them, and you confirm the one they settle on. Leave this off to find a meeting time later, from the circle’s own page.",label:(0,t.jsxs)(t.Fragment,{children:["Propose a weekly meeting time now"," ",(0,t.jsx)("span",{className:x().optional,children:"Optional"})]})})})}),S&&(0,t.jsx)("div",{className:x().proposal,children:(0,t.jsx)(d.A,{noteName:j,pollType:y,timeZone:B,recurringStartDate:_,options:A,onChange:T,zoneNote:(0,t.jsx)(u.A,{timeZone:B,isKnown:!!F,onChange:z})})})]})]}),(0,t.jsxs)(n.A.Footer,{children:[k&&(0,t.jsx)("p",{className:x().footerNote,children:(e=>e?"Creates the circle and asks everyone who joins about ".concat(e," weekly time").concat(1===e?"":"s","."):"Creates the circle. A time can be agreed later, from the circle’s own page.")(S?A.length:0)}),(0,t.jsx)(c.default,{variant:"secondary",onClick:a,disabled:N,children:"Cancel"}),(0,t.jsx)(c.default,{type:"submit",variant:"primary",disabled:N,children:k?"Create circle":"Save"})]})]})})}},67360:e=>{e.exports={flush:"CircleSection_flush___uCuk"}},81673:e=>{e.exports={root:"CardCarousel_root__IjyOX",nav:"CardCarousel_nav___nkkQ",prev:"CardCarousel_prev__0BfN4",next:"CardCarousel_next__pLP8M"}},93023:e=>{e.exports={card:"CircleCard_card__YfGK7",tagStrip:"CircleCard_tagStrip__1lzJt",tag:"CircleCard_tag___2Is3",surface:"CircleCard_surface__SoCbf",isMember:"CircleCard_isMember__VWueV",title:"CircleCard_title__U1NWB",titleLink:"CircleCard_titleLink__uunx3",body:"CircleCard_body__uh4Wz",members:"CircleCard_members__2BjDb",takenSeat:"CircleCard_takenSeat__we7NC",openSeat:"CircleCard_openSeat__aO4Gm",slots:"CircleCard_slots__EKOPb"}},96352:e=>{e.exports={card:"CircleFormModal_card__Nm0_j",cardHead:"CircleFormModal_cardHead__W26QW",cardBody:"CircleFormModal_cardBody__Imxh2",rule:"CircleFormModal_rule___2sHB",switch:"CircleFormModal_switch__SEWBw",proposeSwitch:"CircleFormModal_proposeSwitch__oryKJ",proposal:"CircleFormModal_proposal__1_BMj",optional:"CircleFormModal_optional__8v0wZ",footerNote:"CircleFormModal_footerNote__866YC"}},98825:e=>{e.exports={filterRow:"CircleFinder_filterRow__f5iOt",search:"CircleFinder_search__gOLWX",filter:"CircleFinder_filter__Nzaek",availabilityToggle:"CircleFinder_availabilityToggle__WXWmJ",active:"CircleFinder_active__hYB4u",availabilityPanel:"CircleFinder_availabilityPanel__lVjsp",collapse:"CircleFinder_collapse__pagZh",summary:"CircleFinder_summary__2G92S",chip:"CircleFinder_chip__tQKdE",reset:"CircleFinder_reset__XNr4N",toggleBox:"CircleFinder_toggleBox__Ql2lm"}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.