PageSourceSearch

https://animals.smallbreedrescue.org/_next/static/chunks/2192.09fe59776eb864b1.js

js smallbreedrescue.org collected 2026-10-04 07:23:05 UTC 39,789 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2192],{1640:(e,a,n)=>{"use strict";n.d(a,{A:()=>y});var t=n(95155),l=n(12115),i=n(37772),s=n(18154);let r=(0,n(19904).A)("calendar-plus",[["path",{d:"M16 19h6",key:"xwg31i"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M19 16v6",key:"tddt3s"}],["path",{d:"M21 12.598V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8.5",key:"1glfrc"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}]]);var d=n(6191),c=n(2122),o=n(13579),u=n.n(o);function m(e){let{doses:a,onOpen:n}=e;return 0===a.length?(0,t.jsx)("div",{className:u().strip,"aria-hidden":"true"}):(0,t.jsx)("ol",{className:u().strip,children:a.map(e=>{var a;let l=[e.seriesLabel,e.dateLabel,h[e.state]].filter(Boolean).join(" \xb7 ");return(0,t.jsxs)("li",{className:u().dose,"data-anchor":"medical-record-".concat(e.recordId),children:[(0,t.jsx)("button",{type:"button",className:"".concat(u().pip," ").concat(u()["pip_".concat(e.state)]),onClick:()=>null==n?void 0:n(e.recordId),disabled:!n,"aria-label":l,title:l}),(0,t.jsx)("span",{className:u().pipDate,children:null!=(a=e.dateLabel)?a:"—"})]},e.recordId)})})}let h={given:"given",due:"due now",future:"not yet due",skipped:"skipped"};function _(e){var a,n;let{row:s,actions:r}=e,[d,o]=(0,l.useState)(!1),[m,h]=(0,l.useState)(null),_=(0,l.useRef)(null),p=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(!d)return;let e=e=>{var a,n;let t=e.target;(null==(a=_.current)?void 0:a.contains(t))||(null==(n=p.current)?void 0:n.contains(t))||o(!1)},a=e=>{"Escape"===e.key&&o(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",a),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",a)}},[d]),(0,l.useLayoutEffect)(()=>{if(!d)return void h(null);let e=()=>{var e,a,n;let t=null==(e=_.current)?void 0:e.getBoundingClientRect();if(!t)return;if(t.bottom<0||t.top>window.innerHeight)return void o(!1);let l=null!=(n=null==(a=p.current)?void 0:a.offsetHeight)?n:0,i=Math.max(4,window.innerWidth-t.right),s=window.innerHeight-t.bottom-4;h(l>s&&t.top-4>s?{right:i,bottom:window.innerHeight-t.top+4}:{right:i,top:t.bottom+4})};return e(),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[d]);let y=null!=(n=null!=(a=s.actionRecordId)?a:s.recordIds[0])?n:null;if(null==y)return null;let g=r.filter(e=>!e.appliesTo||e.appliesTo(s));return 0===g.length?null:(0,t.jsxs)("div",{className:u().menuWrap,ref:_,children:[(0,t.jsx)("button",{type:"button",className:u().menuButton,"aria-label":"More actions — ".concat(s.heading),"aria-expanded":d,"aria-haspopup":"menu",onClick:()=>o(e=>!e),children:(0,t.jsx)(i.A,{size:16,"aria-hidden":"true"})}),d&&(0,t.jsx)(c.A,{children:(0,t.jsx)("div",{ref:p,className:u().menu,role:"menu",style:m?{top:m.top,bottom:m.bottom,right:m.right}:{visibility:"hidden",top:0,right:0},children:g.map(e=>(0,t.jsx)("button",{type:"button",role:"menuitem",className:e.danger?"".concat(u().menuItem," ").concat(u().menuItemDanger):u().menuItem,onClick:()=>{o(!1),e.onSelect(y,s)},children:e.label},e.key))})})]})}function p(e){var a;let{row:n,nested:l,onRecord:i,savingRecordIds:c,onBook:o,onAddItems:h,onRecordVisit:p,onOpen:y,rowActions:g,rowNotes:b}=e,v=n.categoryTone?u()["rail".concat(n.categoryTone)]:u().railNone,x=i&&null!=n.actionRecordId&&!n.complete,f=null!=n.actionRecordId&&!!(null==c?void 0:c.includes(n.actionRecordId)),k=o&&n.bookableRecordIds.length>0,j=h&&"visit"===n.kind&&null!=n.bookingId,N=p&&null!=n.bookingId&&n.outcomeUnrecorded,w=b?[...new Set(n.recordIds.map(e=>b[e]).filter(e=>!!e))]:[];return(0,t.jsxs)("li",{id:n.anchorId,className:"".concat(u().row," ").concat(l?u().rowNested:""," ").concat(v),"data-anchor":1===n.recordIds.length?"medical-record-".concat(n.recordIds[0]):void 0,children:[(0,t.jsxs)("div",{className:u().name,children:[n.startsCategoryRun&&!l&&(0,t.jsx)("span",{className:u().category,children:n.categoryLabel}),(0,t.jsxs)("span",{className:u().headingLine,children:[(0,t.jsx)("button",{type:"button",className:u().heading,onClick:()=>{var e;return null==y?void 0:y(null!=(e=n.actionRecordId)?e:n.recordIds[0])},disabled:!y||0===n.recordIds.length,children:n.heading}),n.lifeSustaining&&(0,t.jsx)("span",{className:u().critical,children:"life-sustaining"})]}),n.subheading&&(0,t.jsx)("span",{className:u().sub,title:n.subheading,children:n.subheading}),(n.progressLabel||n.finishedLabel)&&(0,t.jsx)("span",{className:u().progress,children:null!=(a=n.progressLabel)?a:n.finishedLabel}),n.caveats.map(e=>(0,t.jsx)("span",{className:u().caveat,children:e},e)),w.map(e=>(0,t.jsx)("span",{className:u().caveat,children:e},e))]}),(0,t.jsx)(m,{doses:n.doseStrip,onOpen:y}),(0,t.jsxs)("div",{className:u().tail,children:[n.statusLabel&&(0,t.jsx)("span",{className:"".concat(u().status," ").concat(u()["status_".concat(n.tone)]),children:n.statusLabel}),N&&(0,t.jsxs)("button",{type:"button",className:"btn btn-primary btn-sm ".concat(u().action),onClick:()=>p(n.bookingId),children:[(0,t.jsx)(s.A,{size:14,"aria-hidden":"true"})," Record what happened"]}),k&&(0,t.jsxs)("button",{type:"button",className:"btn btn-primary btn-sm ".concat(u().action),onClick:()=>o(n.bookableRecordIds),children:[(0,t.jsx)(r,{size:14,"aria-hidden":"true"})," Book"]}),j&&(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary btn-sm ".concat(u().action),onClick:()=>h(n.bookingId),children:[(0,t.jsx)(d.A,{size:14,"aria-hidden":"true"})," Add items"]}),x&&(0,t.jsx)("button",{type:"button",className:"btn btn-secondary btn-sm ".concat(u().action),onClick:()=>i(n.actionRecordId),disabled:f,"aria-busy":f,children:f?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"spinner","aria-hidden":"true"})," Saving…"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.A,{size:14,"aria-hidden":"true"})," Record"]})}),g&&g.length>0&&(0,t.jsx)(_,{row:n,actions:g})]})]})}function y(e){let{title:a,rows:n,countLabel:l,emptyText:i,onRecord:s,savingRecordIds:r,onBook:d,onAddItems:c,onRecordVisit:o,onOpen:m,rowActions:h,rowNotes:_}=e;return 0!==n.length||i?(0,t.jsxs)("section",{className:"card ".concat(u().card),"aria-label":a,children:[(0,t.jsxs)("div",{className:"card-header",children:[(0,t.jsx)("h3",{className:"card-title",children:a}),l&&(0,t.jsx)("span",{className:u().count,children:l})]}),(0,t.jsx)("div",{className:"card-body ".concat(u().body),children:0===n.length?(0,t.jsx)("p",{className:u().emptyLine,children:i}):(0,t.jsx)("ul",{className:u().rows,children:n.map(e=>(0,t.jsxs)("li",{className:u().group,children:[(0,t.jsxs)("ul",{className:u().groupRows,children:[(0,t.jsx)(p,{row:e,onRecord:s,savingRecordIds:r,onBook:d,onAddItems:c,onRecordVisit:o,onOpen:m,rowActions:h,rowNotes:_}),e.members.map(e=>(0,t.jsx)(p,{row:e,nested:!0,onRecord:s,savingRecordIds:r,onBook:d,onOpen:m,rowActions:h,rowNotes:_},e.key))]}),e.relatedLines.map(e=>(0,t.jsxs)("p",{className:u().related,children:[m?(0,t.jsx)("button",{type:"button",className:u().relatedLink,onClick:()=>m(e.recordId),children:e.label}):e.label," — ",e.note]},e.recordId))]},e.key))})})]}):null}},6715:(e,a,n)=>{"use strict";n.d(a,{A:()=>_});var t=n(95155),l=n(12115),i=n(24033),s=n(38730),r=n.n(s);let d={solid:"done",firm:"booked",hollow:"projected",due:"due today"},c=[{key:"solid",weight:"solid",overdue:!1,label:"Done"},{key:"firm",weight:"firm",overdue:!1,label:"Booked"},{key:"hollow",weight:"hollow",overdue:!1,label:"Projected"},{key:"due",weight:"due",overdue:!1,label:"Due today"},{key:"overdue",weight:"due",overdue:!0,label:"Overdue"},{key:"observation",weight:"solid",kind:"observation",overdue:!1,label:"Observed"},{key:"incident",weight:"solid",kind:"incident",overdue:!1,label:"Incident"}];function o(e){let{view:a}=e,n=function(e){let a=new Set,n=!1;for(let l of e.lanes)for(let e of l.marks){var t;let l="due"===e.weight&&null!=e.overdueDays&&e.overdueDays>0;a.add(null!=(t=e.kind)?t:l?"overdue":e.weight),e.lifeSustaining&&(n=!0)}return{marks:c.filter(e=>a.has(e.key)),vital:n,needsDate:null!=e.needsDate}}(a);return 0!==n.marks.length||n.vital||n.needsDate?(0,t.jsxs)("div",{className:r().legend,role:"list","aria-label":"What the marks mean",children:[n.marks.map(e=>(0,t.jsxs)("span",{className:r().legendItem,role:"listitem",children:[(0,t.jsx)("span",{className:r().legendSwatch,children:(0,t.jsx)(h,{weight:e.weight,kind:e.kind,overdue:e.overdue,lifeSustaining:!1,
1crossOnGlyph:!1})}),e.label]},e.key)),n.vital&&(0,t.jsxs)("span",{className:r().legendItem,role:"listitem",children:[(0,t.jsx)("span",{className:r().legendSwatch,children:(0,t.jsx)(h,{weight:"solid",overdue:!1,lifeSustaining:!0,crossOnGlyph:!0})}),"Life-sustaining"]}),n.needsDate&&(0,t.jsxs)("span",{className:r().legendItem,role:"listitem",children:[(0,t.jsx)("span",{className:r().legendSwatch,children:(0,t.jsx)("span",{className:r().legendNeedsDate,"aria-hidden":"true"})}),"Needs a date"]})]}):null}function u(e){var a;if(!e)return;let n=null!=(a=document.getElementById(e))?a:document.querySelector('[data-anchor="'.concat(e.replace(/["\\]/g,"\\$&"),'"]'));n&&(n.scrollIntoView({behavior:"auto",block:"center"}),n instanceof HTMLElement&&(n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0})))}function m(e){let{mark:a,crossOnGlyph:n}=e,l="due"===a.weight&&null!=a.overdueDays&&a.overdueDays>0;return(0,t.jsx)(h,{weight:a.weight,kind:a.kind,overdue:l,lifeSustaining:a.lifeSustaining,crossOnGlyph:n})}function h(e){let{weight:a,kind:n,overdue:l,lifeSustaining:i,crossOnGlyph:s}=e,d=i?r().glyphUpsized:"",c=i&&s;return n?(0,t.jsx)("span",{className:"".concat(r().glyphObservation," ").concat("incident"===n?r().glyphIncident:""," ").concat(d),"aria-hidden":"true"}):"due"===a?(0,t.jsx)("span",{className:"".concat(r().glyphDue," ").concat(l?r().glyphOverdue:""," ").concat(d),"aria-hidden":"true",children:c&&(0,t.jsx)("span",{className:r().vitalCrossOnGlyph})}):"firm"===a?(0,t.jsxs)("span",{className:"".concat(r().glyphFirmRing," ").concat(d),"aria-hidden":"true",children:[(0,t.jsx)("span",{className:r().glyphFirmDot}),c&&(0,t.jsx)("span",{className:r().vitalCrossOnGlyph})]}):"hollow"===a?(0,t.jsx)("span",{className:"".concat(r().glyphHollow," ").concat(d),"aria-hidden":"true",children:c&&(0,t.jsx)("span",{className:r().vitalCrossOnGlyphHollow})}):(0,t.jsx)("span",{className:"".concat(r().glyphSolid," ").concat(d),"aria-hidden":"true",children:c&&(0,t.jsx)("span",{className:r().vitalCrossOnGlyph})})}function _(e){var a;let{view:n,onSelect:s,onSelectNeedsDate:c,onExpandCollapsed:h,onWidenLane:_,className:v,orientation:x="auto"}=e,[f,k]=(0,l.useState)(!1),[j,N]=(0,l.useState)(0),[w,T]=(0,l.useState)(null),[C,D]=(0,l.useState)(0),[L,S]=(0,l.useState)(0),B=(0,l.useRef)([]),R=(0,l.useRef)(null);(0,l.useEffect)(()=>{if("auto"!==x||!window.matchMedia)return;let e=window.matchMedia("(max-width: 720px)");k(e.matches);let a=e=>k(e.matches);return e.addEventListener("change",a),()=>e.removeEventListener("change",a)},[x]);let M="auto"===x?f:"vertical"===x;(0,l.useEffect)(()=>{let e=R.current;if(!e||"undefined"==typeof ResizeObserver)return;let a=new ResizeObserver(e=>{var a;let n=null==(a=e[0])?void 0:a.contentRect;null!=n&&(D(n.width),S(n.height))});return a.observe(e),()=>a.disconnect()},[M]);let A=(0,l.useCallback)(e=>!!M&&!(L<=0)&&Math.abs(e-n.todayT)*L<34,[M,L,n.todayT]),I=(0,l.useCallback)(e=>{null==s||s(e),u(e.targetAnchor)},[s]),O=(0,l.useCallback)(()=>{n.needsDate&&(null==c||c(n.needsDate),u(n.needsDate.targetAnchor))},[n.needsDate,c]),E=(0,l.useMemo)(()=>{let e=[];
1if(n.needsDate){let a=n.needsDate;e.push({id:"needs-date",render:e=>{let{tabIndex:n,onFocus:l,refCb:i}=e;return(0,t.jsx)("button",{ref:i,type:"button",className:r().needsDateHit,tabIndex:n,onFocus:l,onClick:O,"aria-label":function(e){let a=e.items.map(e=>e.label),n=a.length>2?"".concat(a[0]," + ").concat(a.length-1," more"):a.join(" + "),t=null!=e.waitingDays?", waiting ".concat(e.waitingDays,"d"):"";return"".concat(n,", needs a date").concat(t)}(a)},"needs-date")}})}for(let a of n.visitBands)e.push({id:a.id,render:e=>{let{tabIndex:n,onFocus:l,refCb:i}=e;return(0,t.jsxs)("button",{ref:i,type:"button",className:r().visitBandChip,style:M?{top:"".concat(100*a.t,"%")}:{left:"".concat(100*a.t,"%")},tabIndex:n,onFocus:l,onClick:()=>u(a.targetAnchor),"aria-label":function(e){let a=e.riderCount>0?", ".concat(e.riderCount," ").concat(1===e.riderCount?"thing":"things"," on the list"):"";return"".concat(e.label," ").concat(e.dateLabel).concat(a)}(a),children:[(0,t.jsx)("span",{className:r().visitBandChipLabel,children:a.label}),(0,t.jsx)("span",{className:r().visitBandChipDate,children:a.dateLabel})]},a.id)}});for(let a of n.lanes){for(let n of(a.earlierCount>0&&e.push({id:"".concat(a.key,":earlier"),render:e=>{let{tabIndex:n,onFocus:l,refCb:i}=e;return(0,t.jsxs)("button",{ref:i,type:"button",className:r().edgeChip,style:M?{top:0}:{left:0},tabIndex:n,onFocus:l,onClick:()=>null==_?void 0:_(a.key,"earlier"),children:["+",a.earlierCount," earlier"]},"".concat(a.key,":earlier"))}}),a.marks)){let l=M?"C":function(e,a,n){if("due"===e.weight||n<=0)return"A";let t=a.filter(a=>a.id!==e.id);if(0===t.length)return"A";let l=Math.min(...t.map(a=>Math.abs(a.t-e.t)))*n;return l>=128?"A":l>=64?"B":"C"}(n,a.marks,C),i=!M&&"C"!==l,s="A"===l&&a.marks.length>1,c=!(s&&!M),o=function(e,a,n){if(n<=0)return 200;let t=1/0;for(let l of a)l.id!==e.id&&(t=Math.min(t,Math.abs(l.t-e.t)*n));if(t===1/0)return 200;let l=Math.max(0,t-10);return Math.round(Math.min(200,l*n/(n+l)))}(n,a.marks,C);e.push({id:n.id,render:e=>{let{tabIndex:a,onFocus:l,refCb:u}=e;return(0,t.jsxs)("span",{className:r().markWrap,children:[(0,t.jsxs)("button",{ref:u,type:"button",className:r().markButton,style:M?{top:"".concat(100*n.t,"%")}:{left:"".concat(100*n.t,"%")},tabIndex:a,onFocus:l,onClick:()=>I(n),"aria-label":function(e){let a="due"===e.weight&&null!=e.overdueDays&&e.overdueDays>0,n=e.kind?"incident"===e.kind?"incident":"observed":a?"overdue ".concat(e.overdueDays," ").concat(1===e.overdueDays?"day":"days"):d[e.weight],t="".concat(e.label,", ").concat(e.dateLabel,", ").concat(n);return e.lifeSustaining&&(t+=", life-sustaining"),null!=e.riderCount&&e.riderCount>0&&(t+=e.kind?", ".concat(e.riderCount," ").concat(1===e.riderCount?"record":"records"):", ".concat(e.riderCount," ").concat(1===e.riderCount?"item":"items"," riding")),t}(n),"aria-describedby":n.detail?"".concat(n.id,"-detail"):void 0,"data-weight":n.weight,children:[(0,t.jsx)(m,{mark:n,crossOnGlyph:c}
1),null!=n.riderCount&&n.riderCount>0&&(0,t.jsxs)("span",{className:r().riderBadge,"aria-hidden":"true",children:["+",n.riderCount]}),"due"===n.weight&&null!=n.overdueDays&&n.overdueDays>0&&(0,t.jsxs)("span",{className:r().overdueFigure,"aria-hidden":"true",children:[n.overdueDays,"d"]}),n.detail&&(0,t.jsx)("span",{id:"".concat(n.id,"-detail"),className:r().visuallyHidden,children:n.detail})]}),i&&(0,t.jsxs)("span",{className:r().markLabel,style:{left:"".concat(100*n.t,"%"),transform:"translateX(-".concat(100*Math.min(Math.max(n.t,0),1),"%)"),maxWidth:"".concat(o,"px")},"aria-hidden":"true",children:[s&&(0,t.jsxs)("span",{className:r().markLabelNameRow,children:[n.lifeSustaining&&(0,t.jsx)("span",{className:r().vitalCrossInline}),(0,t.jsx)("span",{className:r().markLabelName,children:n.label})]}),(0,t.jsx)("span",{className:r().markLabelDate,children:function(e){let a="due"===e.weight&&null!=e.overdueDays&&e.overdueDays>0;return"due"!==e.weight||a?e.dateLabel:"Due today"}(n)})]})]},n.id)}})}a.laterCount>0&&e.push({id:"".concat(a.key,":later"),render:e=>{let{tabIndex:n,onFocus:l,refCb:i}=e;return(0,t.jsxs)("button",{ref:i,type:"button",className:r().edgeChip,style:M?{bottom:0}:{right:0,left:"auto"},tabIndex:n,onFocus:l,onClick:()=>null==_?void 0:_(a.key,"later"),children:["+",a.laterCount," later"]},"".concat(a.key,":later"))}})}return n.collapsedLaneCount>0&&e.push({id:"collapsed",render:e=>{let{tabIndex:a,onFocus:l,refCb:s}=e;return(0,t.jsxs)("button",{ref:s,type:"button",className:r().collapsedRow,tabIndex:a,onFocus:l,onClick:h,children:[(0,t.jsx)(i.A,{size:16,"aria-hidden":"true"}),"+",n.collapsedLaneCount," more streams"]},"collapsed")}}),e},[n,M,C,I,O,_,h]),H=(0,l.useMemo)(()=>{let e=new Map;return E.forEach((a,n)=>e.set(a.id,n)),e},[E]);(0,l.useEffect)(()=>{B.current=B.current.slice(0,E.length),j>=E.length&&N(Math.max(0,E.length-1))},[E.length,j]);let F=(0,l.useCallback)(e=>{var a;let n=Math.max(0,Math.min(E.length-1,e));N(n),null==(a=B.current[n])||a.focus()},[E.length]),G=(0,l.useCallback)(e=>{let a=M?"ArrowDown":"ArrowRight",n=M?"ArrowUp":"ArrowLeft";e.key===a?(e.preventDefault(),F(j+1)):e.key===n?(e.preventDefault(),F(j-1)):"ArrowDown"===e.key||"ArrowRight"===e.key?(e.preventDefault(),F(j+1)):"ArrowUp"===e.key||"ArrowLeft"===e.key?(e.preventDefault(),F(j-1)):"Home"===e.key?(e.preventDefault(),F(0)):"End"===e.key&&(e.preventDefault(),F(E.length-1))},[M,j,F,E.length]),W=[r().root,M?r().vertical:r().horizontal,v].filter(Boolean).join(" ");if(n.empty)return(0,t.jsx)("div",{className:W,role:"group","aria-label":"Care cadence timeline",children:(0,t.jsx)("div",{className:r().emptyState,children:"No care cadence yet — items appear here as care is recorded and booked."})});let z=e=>{let a=H.get(e);return null==a?null:E[a].render({tabIndex:a===j?0:-1,onFocus:()=>{N(a),T(e)},refCb:e=>{B.current[a]=e}})};return(0,t.jsxs)("div",{className:W,role:"group","aria-label":"Care cadence timeline",onKeyDown:G,children:[M&&(0,t.jsx)("div",{className:r().laneHeaderRow,lang:"en","aria-hidden":"true",children:n.lanes.map(e=>(0,t.jsx)("span",{className:r().laneHeaderCell,children:e.label},e.key))}),(0,t.jsxs)("div",{className:r().tGroup,children:[(0,t.jsxs)("div",{className:r().chipRow,children:[(0,t.jsxs)("div",{className:r().todayChip,style:M?{top:"".concat(100*n.todayT,"%")}:{left:"".concat(100*n.todayT,"%")},children:[(0,t.jsx)("span",{className:r().todayChipLabel,children:"Today"}),(0,t.jsx)("span",{className:r().todayChipSep,"aria-hidden":"true",children:"\xb7"}),(0,t.jsx)("span",{className:r().todayChipDate,children:n.todayLabel})]}),!M&&n.visitBands.map(e=>z(e.id))]}),(0,t.jsxs)("div",{className:r().plot,ref:R,children:[(0,t.jsx)("div",{className:r().todayLine,style:M?{top:"".concat(100*n.todayT,"%")}:{left:"".concat(100*n.todayT,"%")}}),n.axis.ticks.map(e=>(0,t.jsx)("div",{className:r().gridline,style:M?{top:"".concat(100*e.t,"%")}:{left:"".concat(100*e.t,"%")}},e.t)),n.visitBands.map(e=>(0,t.jsx)("div",{className:r().visitBand,style:M?{top:"".concat(100*e.t,"%")}:{left:"".concat(100*e.t,"%")},"aria-hidden":"true"},e.id)),M&&n.visitBands.map(e=>z(e.id)),n.needsDate&&(0,t.jsxs)("div",{className:r().needsDateBand,children:[!M&&(0,t.jsx)("span",{className:r().laneLabel,children:"Needs a date"}),(0,t.jsx)("div",{className:r().needsDateBar,style:M?void 0:{right:"auto",left:"calc(".concat(100*n.todayT,"% - ").concat(p(n,C),"px)"),width:"".concat(p(n,C),"px")}}),(0,t.jsx)("div",{className:r().needsDateLabelRow,style:M?void 0:{left:"calc(".concat(100*n.todayT,"% + var(--space-sm))")},children:M?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:r().needsDateLabel,children:"Needs date"}),null!=n.needsDate.waitingDays&&(0,t.jsxs)("span",{className:r().needsDateWait,children:[n.needsDate.waitingDays,"d"]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:r().needsDateLabel,children:y(n.needsDate)}),null!=n.needsDate.waitingDays&&(0,t.jsxs)("span",{className:r().needsDateWait,children:["\xb7 waiting ",n.needsDate.waitingDays,"d"]})]})}),z("needs-date")]}),n.lanes.map(e=>(0,t.jsx)(b,{lane:e,vertical:M,renderStopFor:z},e.key))]}),n.collapsedLaneCount>0&&z("collapsed"),(0,t.jsxs)("div",{className:r().axisRow,children:[n.undatedPastCount>0&&(0,t.jsxs)("span",{className:r().undatedChip,children:[n.undatedPastCount," undated"]}),n.axis.ticks.map(e=>!A(e.t)&&(0,t.jsx)("div",{className:r().tickLabel,style:M?{top:"".concat(100*e.t,"%")}:{left:"".concat(100*e.t,"%")},children:e.label},e.t))]})]}),(0,t.jsx)(o,{view:n}),M&&(0,t.jsx)(g,{entity:null!=(a=function(e,a){if(!a)return null;if("needs-date"===a&&e.needsDate)return{kind:"needsDate",needsDate:e.needsDate};for(let n of e.lanes){let e=n.marks.find(e=>e.id===a);if(e)return{kind:"mark",mark:e}}return null}(n,w))?a:function(e){let a=e.lanes.flatMap(e=>e.marks),n=null;for(let e of a){var t,l;"due"===e.weight&&(!n||(null!=(t=e.overdueDays)?t:0)>(null!=(l=n.overdueDays)?l:0))&&(n=e)}if(n)return{kind:"mark",mark:n};if(e.needsDate)return{kind:"needsDate",needsDate:e.needsDate};let i=null;for(let e of a)("firm"===e.weight||"hollow"===e.weight)&&(!i||e.t<i.t)&&(i=e);if(i)return{kind:"mark",mark:i};let s=null;for(let e of a)"solid"===e.weight&&(!s||e.t>s.t)&&(s=e);return s?{kind:"mark",mark:s}:null}(n)})]})}function p(e,a){var n;if(a<=0)return 0;let t=.25*a;if((null==(n=e.needsDate)?void 0:n.waitingDays)==null)return t;let l=(e.axis.endAt.getTime()-e.axis.startAt.getTime())/864e5;return l<=0?t:Math.min(e.needsDate.waitingDays*(a/l),t)}function y(e){let a=e.items.map(e=>e.label);return 0===a.length?"Needs a date":a.length>2?"".concat(a[0]," + ").concat(a.length-1," more"):a.join(" + ")}function g(e){let{entity:a}=e;if(!a)return null;if("needsDate"===a.kind){let{needsDate:e}=a;return(0,t.jsxs)("div",{className:r().readout,children:[(0,t.jsx)("span",{className:"".concat(r().readoutGlyph," ").concat(r().readoutGlyphNeedsDate),"aria-hidden":"true"}),(0,t.jsxs)("div",{className:r().readoutBody,children:[(0,t.jsx)("div",{className:r().readoutName,children:y(e)}),(0,t.jsxs)("div",{className:r().readoutMeta,children:["needs a date",null!=e.waitingDays?" \xb7 waiting ".concat(e.waitingDays,"d"):"",e.lifeSustaining?" \xb7 life-sustaining":""]})]}),(0,t.jsx)("button",{type:"button",className:r().readoutOpen,onClick:()=>u(e.targetAnchor),children:"Open"})]})}let{mark:n}=a;return(0,t.jsxs)("div",{className:r().readout,children:[(0,t.jsx)("span",{className:r().readoutGlyph,"aria-hidden":"true",children:(0,t.jsx)(m,{mark:n,crossOnGlyph:!0})}),(0,t.jsxs)("div",{className:r().readoutBody,children:[(0,t.jsx)("div",{className:r().readoutName,children:n.label}),(0,t.jsx)("div",{className:r().readoutMeta,children:function(e){let a="due"===e.weight&&null!=e.overdueDays&&e.overdueDays>0,n=a?"overdue ".concat(e.overdueDays,"d"):d[e.weight],t=e.lifeSustaining?" \xb7 life-sustaining":"";return"due"!==e.weight||a?"".concat(e.dateLabel," \xb7 ").concat(n).concat(t):"".concat(n).concat(t)}(n)})]}),(0,t.jsx)("button",{type:"button",className:r().readoutOpen,onClick:()=>u(n.targetAnchor),children:"Open"})]})}function b(e){let{lane:a,vertical:n,renderStopFor:l}=e,i=[n?r().laneColumn:r().laneBand,a.categoryTone?r()["laneBandTone".concat(a.categoryTone)]:"",a.startsCategoryRun?r().laneBandRunStart:""].filter(
1Boolean).join(" "),s=a.categoryLabel?"".concat(a.categoryLabel,": ").concat(a.label):a.label,d="".concat(a.marks.length," ").concat(1===a.marks.length?"item":"items");return(0,t.jsxs)("div",{className:i,role:"group","aria-label":"".concat(s,", ").concat(d),children:[!n&&a.startsCategoryRun&&a.categoryLabel&&(0,t.jsx)("span",{className:r().laneCategory,"aria-hidden":"true",children:a.categoryLabel}),!n&&(0,t.jsx)("span",{className:r().laneLabel,title:a.label,children:a.label}),(0,t.jsx)("span",{className:r().rail}),a.earlierCount>0&&l("".concat(a.key,":earlier")),a.marks.map(e=>l(e.id)),a.laterCount>0&&l("".concat(a.key,":later"))]})}},13579:e=>{e.exports={card:"careTile_card__D_kvC",count:"careTile_count__nMPsL",body:"careTile_body__tBYsy",rows:"careTile_rows__OeMGh",groupRows:"careTile_groupRows__3_WJp",group:"careTile_group__TJZB5",row:"careTile_row__m27RX",rail1:"careTile_rail1__scLYR",rail2:"careTile_rail2__LNNy0",rail3:"careTile_rail3__uFlRs",rail4:"careTile_rail4__tKSNJ",railNone:"careTile_railNone__tQT9A",category:"careTile_category__bv0fW",rowNested:"careTile_rowNested__aHgv9",name:"careTile_name__GBlol",headingLine:"careTile_headingLine__NMRts",heading:"careTile_heading__rZtkr",sub:"careTile_sub__PaSKY",progress:"careTile_progress__aKoS8",caveat:"careTile_caveat__Nstqj",critical:"careTile_critical__7_Yg8",strip:"careTile_strip__GSfqO",dose:"careTile_dose__nt4vy",pip:"careTile_pip__vQesZ",pip_given:"careTile_pip_given__4INQ7",pip_due:"careTile_pip_due__BWM_L",pip_future:"careTile_pip_future__Ju6P2",pip_skipped:"careTile_pip_skipped__Ct3yE",pipDate:"careTile_pipDate__cnEnU",tail:"careTile_tail__tYOdw",status:"careTile_status___wK0v",status_warn:"careTile_status_warn__oFnSA",status_ok:"careTile_status_ok__ad6Re",status_neutral:"careTile_status_neutral__N52CX",action:"careTile_action__a181D",menuWrap:"careTile_menuWrap__V5gIo",menuButton:"careTile_menuButton__SKkNw",menu:"careTile_menu__fnm6m",menuItem:"careTile_menuItem__3aRF_",menuItemDanger:"careTile_menuItemDanger__JfWDY",related:"careTile_related__xMmvz",relatedLink:"careTile_relatedLink__R_TmV",emptyLine:"careTile_emptyLine__pykBY"}},16485:(e,a,n)=>{"use strict";n.d(a,{A:()=>t});let t=(0,n(19904).A)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]])},18154:(e,a,n)=>{"use strict";n.d(a,{A:()=>t});let t=(0,n(19904).A)("clipboard-check",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]])},24033:(e,a,n)=>{"use strict";n.d(a,{A:()=>t});let t=(0,n(19904).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},34750:e=>{e.exports={summaryRow:"MedicalSection_summaryRow__Al5h2",summaryItem:"MedicalSection_summaryItem__WPgou",summaryLabel:"MedicalSection_summaryLabel__SKUsW",dueText:"MedicalSection_dueText__nesIO",overdueText:"MedicalSection_overdueText__X1661",typeLabel:"MedicalSection_typeLabel__m1rhH",subLine:"MedicalSection_subLine__dzwAd",tableDesktop:"MedicalSection_tableDesktop__GEAKK",cardList:"MedicalSection_cardList__RHMb2",recordCard:"MedicalSection_recordCard__P314L",recordCardHeader:"MedicalSection_recordCardHeader__qpThH",recordCardFoot:"MedicalSection_recordCardFoot__SlwGG",modalActions:"MedicalSection_modalActions__YcEWh",pickList:"MedicalSection_pickList__G9WGV",pickRow:"MedicalSection_pickRow__9_sAE",pickRowBlocked:"MedicalSection_pickRowBlocked__dWuVM",pickBody:"MedicalSection_pickBody__UzteQ",pickTitle:"MedicalSection_pickTitle__JSCnC",fitLine:"MedicalSection_fitLine__109HW",fitCaution:"MedicalSection_fitCaution__DlNm5",fitBlocked:"MedicalSection_fitBlocked__VW03M",modeTabs:"MedicalSection_modeTabs__nEcUN",modeTab:"MedicalSection_modeTab__bg7vl",modeTabActive:"MedicalSection_modeTabActive__59gWg",modePanel:"MedicalSection_modePanel__JuEIM",flatCard:"MedicalSection_flatCard__aFJBb"}},37772:(e,a,n)=>{"use strict";n.d(a,{A:()=>t});let t=(0,n(19904).A)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]])},38268:(e,a,n)=>{"use strict";n.d(a,{A:()=>s});var t=n(95155),l=n(53406),i=n.n(l);function s(e){let{title:a,pills:n,action:l,children:s}=e;return(0,t.jsxs)("header",{className:i().header,children:[(0,t.jsxs)("div",{className:i().headerTop,children:[(0,t.jsxs)("div",{className:i().headerTitleRow,children:[(0,t.jsx)("h2",{className:i().headerTitle,children:a}),n&&n.length>0?(0,t.jsx)("span",{className:i().pills,children:n.map((e,a)=>(0,t.jsx)("span",{className:"".concat(i().pill," ").concat(i()["pill_".concat(e.tone)]),children:e.label},"".concat(e.label,"-").concat(a)))}):null]}),l?(0,t.jsx)("div",{className:i().headerAction,children:l}):null]}),s?(0,t.jsx)("div",{className:i().headerExtra,children:s}):null]})}},38730:e=>{e.exports={root:"cadenceTimeline_root__RxU3y",emptyState:"cadenceTimeline_emptyState__QVeKZ",chipRow:"cadenceTimeline_chipRow__y4fcq",todayChip:"cadenceTimeline_todayChip___mXp5",todayChipLabel:"cadenceTimeline_todayChipLabel__YI0yP",todayChipSep:"cadenceTimeline_todayChipSep__rBDKQ",todayChipDate:"cadenceTimeline_todayChipDate__DG7vq",tGroup:"cadenceTimeline_tGroup__vr1yW",plot:"cadenceTimeline_plot__c0zWl",todayLine:"cadenceTimeline_todayLine__bS_Qm",vertical:"ca
1denceTimeline_vertical__aEt74",gridline:"cadenceTimeline_gridline__aHI2k",visitBand:"cadenceTimeline_visitBand___iVWe",visitBandChip:"cadenceTimeline_visitBandChip__SvAFY",visitBandChipLabel:"cadenceTimeline_visitBandChipLabel__2Azdk",visitBandChipDate:"cadenceTimeline_visitBandChipDate__jxVkf",needsDateBand:"cadenceTimeline_needsDateBand__Oxe6A",needsDateBar:"cadenceTimeline_needsDateBar__w3k5S",needsDateLabelRow:"cadenceTimeline_needsDateLabelRow__ZLtpU",needsDateLabel:"cadenceTimeline_needsDateLabel__oeDnz",needsDateWait:"cadenceTimeline_needsDateWait__Dmr3Z",needsDateHit:"cadenceTimeline_needsDateHit__2C3vK",laneBand:"cadenceTimeline_laneBand__Nz3QD",laneBandRunStart:"cadenceTimeline_laneBandRunStart__nieZg",laneCategory:"cadenceTimeline_laneCategory__tPFYm",laneBandTone1:"cadenceTimeline_laneBandTone1__VX_Bx",laneBandTone2:"cadenceTimeline_laneBandTone2__XYeHt",laneBandTone3:"cadenceTimeline_laneBandTone3__Wqa8r",laneBandTone4:"cadenceTimeline_laneBandTone4__Ca2b_",laneLabel:"cadenceTimeline_laneLabel__YAvrC",rail:"cadenceTimeline_rail__c6fzT",laneColumn:"cadenceTimeline_laneColumn__F59RO",markButton:"cadenceTimeline_markButton__lBIAG",glyphSolid:"cadenceTimeline_glyphSolid__gMnPh",glyphFirmRing:"cadenceTimeline_glyphFirmRing__S_0aD",glyphHollow:"cadenceTimeline_glyphHollow__60P0k",glyphDue:"cadenceTimeline_glyphDue__ysIjc",glyphFirmDot:"cadenceTimeline_glyphFirmDot__ADT06",glyphOverdue:"cadenceTimeline_glyphOverdue__l85I7",glyphUpsized:"cadenceTimeline_glyphUpsized__dgg__",vitalCrossOnGlyph:"cadenceTimeline_vitalCrossOnGlyph__2wpit",vitalCrossOnGlyphHollow:"cadenceTimeline_vitalCrossOnGlyphHollow__3_6B7",markWrap:"cadenceTimeline_markWrap__bLtav",markLabel:"cadenceTimeline_markLabel__8HDeh",markLabelNameRow:"cadenceTimeline_markLabelNameRow__yuIA6",markLabelName:"cadenceTimeline_markLabelName__2ZJsz",markLabelDate:"cadenceTimeline_markLabelDate___s_SL",vitalCrossInline:"cadenceTimeline_vitalCrossInline__I04CY",riderBadge:"cadenceTimeline_riderBadge__HVXNG",overdueFigure:"cadenceTimeline_overdueFigure__UULg7",edgeChip:"cadenceTimeline_edgeChip__Eql9f",collapsedRow:"cadenceTimeline_collapsedRow__U36B7",axisRow:"cadenceTimeline_axisRow__fzAt_",legend:"cadenceTimeline_legend__Kh3ed",legendItem:"cadenceTimeline_legendItem__LkCEO",legendSwatch:"cadenceTimeline_legendSwatch__T_LL4",legendNeedsDate:"cadenceTimeline_legendNeedsDate__Qrl65",tickLabel:"cadenceTimeline_tickLabel__6WRbc",undatedChip:"cadenceTimeline_undatedChip__1iG8S",readout:"cadenceTimeline_readout__JDu0i",readoutGlyph:"cadenceTimeline_readoutGlyph__LbGoB",readoutGlyphNeedsDate:"cadenceTimeline_readoutGlyphNeedsDate__9uAtM",readoutBody:"cadenceTimeline_readoutBody__XB3Uf",readoutName:"cadenceTimeline_readoutName__3jKWH",readoutMeta:"cadenceTimeline_readoutMeta__94fB9",readoutOpen:"cadenceTimeline_readoutOpen__AQBPV",visuallyHidden:"cadenceTimeline_visuallyHidden__ga9qf",laneHeaderRow:"cadenceTimeline_laneHeaderRow__9M4KN",laneHeaderCell:"cadenceTimeline_laneHeaderCell__F0Cm0",glyphObservation:"cadenceTimeline_glyphObservation__Esqog",glyphIncident:"cadenceTimeline_glyphIncident__BY_hx"}},53406:e=>{e.exports={page:"domains_page__cojwP",header:"domains_header__fowyE",headerTop:"domains_headerTop__ipO7o",headerTitleRow:"domains_headerTitleRow__EVOOO",headerTitle:"domains_headerTitle__7a8MR",headerAction:"domains_headerAction__oBpJw",headerExtra:"domains_headerExtra__HDhqq",pills:"domains_pills__PphIF",pill:"domains_pill__dVesl",pill_neutral:"domains_pill_neutral__x2_VU",pill_ok:"domains_pill_ok__T1mp5",pill_warn:"domains_pill_warn__kzsbz",pill_block:"domains_pill_block__0TyyH",dispCtl:"domains_dispCtl__muIAx",dispCtlLabel:"domains_dispCtlLabel__RIIMn",dispCtlReadOnly:"domains_dispCtlReadOnly__xORkU",glance:"domains_glance__mY7yp"}},83747:(e,a,n)=>{"use strict";n.d(a,{A:()=>p});var t=n(95155),l=n(12115),i=n(2122),s=n(22463),r=n(86037),d=n(30926);let c=(0,d.createServerReference)("40bea478851650cd32a554ea09ad66007165c541f3",d.callServer,void 0,d.findSourceMapURL,"addCareItemsToVisit");var o=n(91079),u=n(34750),m=n.n(u);function h(e){let{fit:a}=e;if(!a)return null;let n="blocked"===a.verdict?m().fitBlocked:"caution"===a.verdict?m().fitCaution:"";return(0,t.jsx)("span",{className:"".concat(m().fitLine," ").concat(n),children:a.line})}function _(e){let{items:a,chosen:n,onToggle:l}=e;return(0,t.jsx)("ul",{className:m().pickList,children:a.map(e=>{var a;let i=(null==(a=e.fit)?void 0:a.verdict)==="blocked",s=(0,o.f_)(e.subject);return(0,t.jsx)("li",{children:(0,t.jsxs)("label",{className:"".concat(m().pickRow," ").concat(i?m().pickRowBlocked:""),children:[(0,t.jsx)("input",{type:"checkbox",checked:n.includes(s),disabled:i,onChange:()=>l(e.subject)}),(0,t.jsxs)("span",{className:m().pickBody,children:[(0,t.jsxs)("span",{className:m().pickTitle,children:[e.title,e.isLifeSustaining&&" \xb7 life-sustaining"]}),(0,t.jsx)(h,{fit:e.fit})]})]})},s)})})}function p(e){let{animalId:a,domain:n="medical",bookingId:d,recordIds:u,onBookNew:p,onClose:y,onSaved:g}=e,b=o.ON[n],v="behavioral"===n,x=null!=d,[f,k]=(0,l.useState)(!0),[j,N]=(0,l.useState)(null),[w,T]=(0,l.useState)([]),[C,D]=(0,l.useState)([]),[L,S]=(0,l.useState)(u?u.map(e=>
1(0,o.f_)({kind:b,id:e})):[]),[B,R]=(0,l.useState)(null!=d?d:null),[M,A]=(0,l.useState)(null),[I,O]=(0,l.useTransition)();(0,l.useEffect)(()=>{let e=!0;return k(!0),N(null),(x?(0,s.Q)({animalId:a,forBookingId:d,domains:[n]}).then(e=>{var a;if(null==e?void 0:e.error)throw Error(e.error);T((null!=(a=null==e?void 0:e.candidates)?a:[]).map(e=>{var a;return{subject:e.subject,title:e.title,isLifeSustaining:!!e.isLifeSustaining,fit:null!=(a=e.fit)?a:null,alreadyDone:!!e.alreadyDone}}))}):(0,r.D)(a,{forRecordIds:v?[]:null!=u?u:[],subjectKinds:v?["animal_medical","animal_behavioral"]:["animal_medical"]}).then(e=>{var a,n;if(null==e?void 0:e.error)throw Error(e.error);let t=(null!=(n=null==e?void 0:e.visits)?n:[]).map(e=>{var a;return{id:e.id,label:e.label,fit:null!=(a=e.fit)?a:null}});D(t),1===t.length&&(null==(a=t[0].fit)?void 0:a.verdict)!=="blocked"&&R(t[0].id)})).catch(a=>{e&&(console.error("[AddToVisitModal] could not load the picker:",a),N((null==a?void 0:a.message)||"That list could not be loaded. Close this and try again."))}).finally(()=>{e&&k(!1)}),()=>{e=!1}},[a,n,x,d,(null!=u?u:[]).join(",")]);let E=w.filter(e=>!e.alreadyDone),H=w.filter(e=>e.alreadyDone),F=e=>{let a=(0,o.f_)(e);S(e=>e.includes(a)?e.filter(e=>e!==a):[...e,a])},G=null!=B&&L.length>0,W=x?"Add to this visit":"Which visit?";return(0,t.jsx)(i.A,{children:(0,t.jsx)("div",{className:"modal-overlay",children:(0,t.jsxs)("div",{className:"modal",onClick:e=>e.stopPropagation(),style:{maxWidth:"520px"},children:[(0,t.jsxs)("div",{className:"modal-header",children:[(0,t.jsx)("h3",{className:"modal-title",children:W}),(0,t.jsx)("button",{type:"button",className:"modal-close","aria-label":"Close",onClick:y,children:"\xd7"})]}),f&&(0,t.jsx)("p",{className:"text-muted",style:{fontSize:"var(--font-sm)"},children:"Loading…"}),j&&(0,t.jsx)("div",{className:"form-error",children:j}),!f&&!j&&x&&(0===w.length?(0,t.jsx)("p",{className:"text-muted",style:{fontSize:"var(--font-sm)"},children:"There is nothing left to add — everything open is already on a visit."}):(0,t.jsxs)(t.Fragment,{children:[E.length>0&&(0,t.jsxs)("fieldset",{style:{border:0,padding:0,margin:0},children:[(0,t.jsx)("legend",{className:m().subLine,style:{marginTop:0},children:"What else should happen at this visit?"}),(0,t.jsx)(_,{items:E,chosen:L,onToggle:F})]}),H.length>0&&(0,t.jsxs)("fieldset",{style:{border:0,padding:0,margin:0},children:[(0,t.jsx)("legend",{className:m().subLine,children:"Already recorded — was any of this done at this visit?"}),(0,t.jsx)(_,{items:H,chosen:L,onToggle:F})]})]})),!f&&!j&&!x&&(0===C.length?(0,t.jsx)("p",{className:"text-muted",style:{fontSize:"var(--font-sm)"},children:p?v?"This animal has no visit or session booked yet.":"This animal has no vet visit booked yet.":v?(0,t.jsxs)(t.Fragment,{children:["Nothing is booked for this animal yet. Use ",(0,t.jsx)("strong",{children:"Book"})," on the row to set up a session."]}):(0,t.jsxs)(t.Fragment,{children:["No vet visit is booked for this animal yet. Use ",(0,t.jsx)("strong",{children:"Book"})," on the row to set one up."]})}):(0,t.jsxs)("fieldset",{style:{border:0,padding:0,margin:0},children:[(0,t.jsx)("legend",{className:m().subLine,style:{marginTop:0},children:"This animal is already booked in. Add it to one of these?"}),(0,t.jsx)("ul",{className:m().pickList,children:C.map(e=>{var a;let n=(null==(a=e.fit)?void 0:a.verdict)==="blocked";return(0,t.jsx)("li",{children:(0,t.jsxs)("label",{className:"".concat(m().pickRow," ").concat(n?m().pickRowBlocked:""),children:[(0,t.jsx)("input",{type:"radio",name:"add-to-visit-choice",value:e.id,checked:B===e.id,disabled:n,onChange:()=>R(e.id)}),(0,t.jsxs)("span",{className:m().pickBody,children:[(0,t.jsx)("span",{className:m().pickTitle,children:e.label}),(0,t.jsx)(h,{fit:e.fit})]})]})},e.id)})})]})),M&&(0,t.jsx)("div",{className:"form-error",children:M}),(0,t.jsxs)("div",{className:m().modalActions,style:{justifyContent:"space-between"},children:[!p||x||f?(0,t.jsx)("span",{}):(0,t.jsx)("button",{type:"button",className:0===C.length?"btn btn-primary":"btn btn-ghost",onClick:p,disabled:I,children:v?"Book a new session":"Book a new visit"}),(0,t.jsxs)("span",{style:{display:"flex",gap:"var(--space-sm)"},children:[(0,t.jsx)("button",{type:"button",className:"btn btn-ghost",onClick:y,disabled:I,children:"Cancel"}),(x||C.length>0)&&(0,t.jsx)("button",{type:"button",className:"btn btn-primary",onClick:()=>{G&&(A(null),O(async()=>{let e=await c({bookingId:B,subjects:L.map(e=>{let[a,n]=[e.slice(0,e.indexOf(":")),e.slice(e.indexOf(":")+1)];return{kind:a,id:Number(n)}})});if(null==e?void 0:e.error){var a;A((null==(a=e.ineligible)?void 0:a.length)?"".concat(e.error," — ").concat(e.ineligible.map(e=>e.reason).join("; ")):e.error);return}g()}
1))},disabled:!G||I,children:I?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"spinner"})," Adding..."]}):v?"Add to this booking":"Add to visit"})]})]})]})})})}},85979:(e,a,n)=>{"use strict";n.d(a,{A:()=>r});var t=n(95155),l=n(94412),i=n(53406),s=n.n(i);function r(e){var a;let{label:n,column:i,value:r,saving:d,readOnly:c,onChange:o}=e,u=Object.entries(l.yB[i]),m=(null!=r?r:"").toString().trim().toLowerCase();return c?(0,t.jsxs)("div",{className:s().dispCtl,children:[(0,t.jsx)("span",{className:s().dispCtlLabel,children:n}),(0,t.jsx)("span",{className:s().dispCtlReadOnly,children:null!=(a=l.yB[i][m])?a:"Not set"})]}):(0,t.jsxs)("div",{className:s().dispCtl,children:[(0,t.jsxs)("label",{className:s().dispCtlLabel,children:[n,(0,t.jsxs)("select",{className:"form-select",value:m,disabled:d,onChange:e=>o(e.target.value),children:[u.some(e=>{let[a]=e;return a===m})?null:(0,t.jsx)("option",{value:m,children:"Not set"}),u.map(e=>{let[a,n]=e;return(0,t.jsx)("option",{value:a,children:n},a)})]})]}),d?(0,t.jsx)("span",{className:"spinner","aria-label":"Saving"}):null]})}},86037:(e,a,n)=>{"use strict";n.d(a,{D:()=>l});var t=n(30926);let l=(0,t.createServerReference)("60bbbffa1a91e8f8eea55fab4693ce8f23a520ddcc",t.callServer,void 0,t.findSourceMapURL,"listUpcomingVetVisitsForAnimal")},89652:(e,a,n)=>{"use strict";n.d(a,{A:()=>t});let t=(0,n(19904).A)("repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]])}}]);

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.