PageSourceSearch

https://www.phone2fork.com/spa/js/common-fb6b2f89.e1d3be13.js

js phone2fork.com collected 2026-10-02 01:41:50 UTC 102,521 bytes, 1 lines download raw bytes

1(self["webpackChunkPhone2Fork"]=self["webpackChunkPhone2Fork"]||[]).push([[3214],{13208:function(t,e,s){"use strict";s.d(e,{K:function(){return r},n:function(){return a}});s(74916),s(73210);function r(t){if(null==t)return null;const e=String(t).trim().split(/\s+/)[0];return e||null}function a({memberName:t=null,about:e=null,label:s=null}={}){const a=null==s?"":String(s).trim();if(a)return a;const i=null==e?"":String(e).trim(),n=i||r(t);return n?`Ask AI about ${n}`:"Ask AI"}},11459:function(t,e,s){function r(t){return String(t||"").trim().toLowerCase().replace(/\s+/g," ")}function a(t){const e=t&&t.type;if("warm"===e)return"warm";let s=String(t&&t.heading||"").trim();return""===s?"":(s=s.replace(/^last completed period\s*[·•.\-–—]\s*/i,""),s=s.replace(/\s+rag trend$/i,""),s=s.replace(/\s+score$/i,""),s=s.replace(/\s+trend$/i,""),r(s))}function i(t){return String(t).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function n(t,e){const s=r(t);if(!s||!e)return!1;if("warm"===e)return/\bwarm\b/.test(s)||/\bshift[- ]?feedback\b/.test(s)||/\bcheck[- ]?in\b/.test(s);if(s===e)return!0;if(s.startsWith(e+" ")||s.startsWith(e+":"))return!0;const a=i(e);return new RegExp("(?:^|[^a-z0-9])"+a+"(?:$|[^a-z0-9])").test(s)}function o(t,e){return n(t,e)}function l(t){const e=String(t||"").replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(""===e.trim())return[{heading:"",markdown:e}];const s=/^(#{2,4})\s+(.+?)\s*$/gm,r=[];let a;while(null!==(a=s.exec(e)))r.push({index:a.index,heading:String(a[2]||"").trim()});if(0===r.length)return[{heading:"",markdown:e}];const i=[];if(r[0].index>0){const t=e.slice(0,r[0].index);""!==t.trim()&&i.push({heading:"",markdown:t.replace(/\n+$/,"\n")})}for(let n=0;n<r.length;n++){const t=r[n].index,s=n+1<r.length?r[n+1].index:e.length;i.push({heading:r[n].heading,markdown:e.slice(t,s).replace(/\n+$/,"\n")})}return i}function c(t){return String(t&&t.type||"")+"|"+a(t)}function d(t){const e={};return t.filter((t=>{const s=c(t);return!e[s]&&(e[s]=!0,!0)}))}function u(t,e){const s=d(Array.isArray(e)?e.filter((t=>t&&""!==String(t.id||"").trim())):[]),r=l(t),i=r.map((t=>({heading:t.heading,markdown:t.markdown,charts:[]}))),c={};s.forEach((t=>{const e=a(t);if(!e)return;let s=i.findIndex((t=>o(t.heading,e)));s<0&&(s=i.findIndex((t=>""!==t.heading&&n(t.markdown,e)))),s<0||(i[s].charts.push(t),c[t.id]=!0)}));const u=s.filter((t=>!c[t.id]));if(u.length){const t=i[i.length-1],e=1===i.length&&!t.heading;e?t.charts.push(...u):i.push({heading:"",markdown:"",charts:u})}return i.filter((t=>""!==String(t.markdown||"").trim()||t.charts.length>0))}s(74916),s(15306),s(73210),s(24603),s(28450),s(57658),s(33948),t.exports={chartAnchor:a,layoutPackChatCharts:u,splitMarkdownSections:l}},87304:function(t,e,s){var r=s(28053)["default"];s(2707),s(57658),s(85827);const a=16,i=5.6,n=10,o=4,l=320;function c(t){return Math.ceil(String(t).length*i+n)}function d(t,e,s,r,a){return t<r+a&&s<e+a}function u(t,e,s){const r=e/2;return t-r<0?r-t:t+r>s?s-r-t:0}function h(t,e){const s=Math.max(Number(e)||0,1),a=(t||[]).map(((t,e)=>{const a=`${t.shortLabel} ${t.display}`,i=c(a),n=Number(t.leftPercent)/100*s;return r(r({},t),{},{index:e,text:a,labelWidth:i,center:n,offsetX:u(n,i,s),row:0})})),i=[];return a.slice().sort(((t,e)=>t.leftPercent-e.leftPercent||t.index-e.index)).forEach((t=>{const e=t.center+t.offsetX-t.labelWidth/2,s=t.center+t.offsetX+t.labelWidth/2;let r=0;while(i.some((t=>{if(t.row!==r)return!1;const a=t.center+t.offsetX-t.labelWidth/2,i=t.center+t.offsetX+t.labelWidth/2;return d(e,s,a,i,o)})))r+=1;t.row=r,i.push(t)})),a}function p(t){if(!t||!t.length)return 0;const e=t.reduce(((t,e)=>Math.max(t,e.row||0)),0);return(e+1)*a}t.exports={FLAG_ROW_HEIGHT:a,FALLBACK_TRACK_WIDTH:l,estimateLabelWidth:c,assignFlagRows:h,flagStackHeight:p}},64183:function(t,e,s){"use strict";s.d(e,{Z:function(){return T}});var r=function(){var t=this,e=t._self._c;return t.markers.length?e("div",{staticClass:"gst-average-range"},[t.heading?e("p",{staticClass:"f-cta2 m-0 mb-1 font-bold text-black"},[t._v(t._s(t.heading))]):t._e(),e("div",{ref:"track",staticClass:"relative w-full overflow-visible",style:{paddingTop:t.flagStackPx+"px"}},[e("div",{staticClass:"relative h-2 w-full overflow-visible rounded border border-primary/40",style:t.trackFillStyle},t._l(t.placedMarkers,(function(t){return e("div",{key:t.key+"-tick",staticClass:"absolute top-0 bottom-0 z-10 w-0.5 -translate-x-1/2",style:{left:t.leftPercent+"%",backgroundColor:t.colour},attrs:{"aria-hidden":"true"}})})),0),t._l(t.placedMarkers,(function(s){return e("div",{key:s.key,staticClass:"absolute z-20 flex w-0 flex-col items-center",style:t.flagStyle(s)},[e("span",{staticClass:"pointer-events-none whitespace-nowrap rounded px-1 py-px text-[9px] font-semibold leading-none text-white shadow-sm",style:t.flagLabelStyle(s)},[t._v(t._s(s.shortLabel)+" "+t._s(s.display))]),e("span",{staticClass:"w-0.5 flex-1",style:{backgroundColor:s.colour},attrs:{"aria-hidden":"true"}})])}))],2),e("ul",{staticClass:"sr-only"},t._l(t.placedMarkers,(function(s){return e("li",{key:s.key+"-sr"},[t._v(" "+t._s(s.shortLabel)+" "+t._s(s.display)+" ")])})),0),t._m(0)]):t._e()},a=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"mt-1 flex flex-wrap items-center justify-between gap-x-2 gap-y-0.5"},[e("span",{staticClass:"f-cta2 text-red"},[t._v("Below expected")]),e("span",{staticClass:"f-cta2 text-[#d97706]"},[t._v("Expected")]),e("span",{staticClass:"f-cta2 text-green"},[t._v("Above expected")])])}],i=s(60091),n=(s(57658),s(87304)),o=s.n(n);const{FALLBACK_TRACK_WIDTH:l,FLAG_ROW_HEIGHT:c,assignFlagRows:d,flagStackHeight:u}=o(),h=-1/3,p=1/3,m=-1,g=1,f=8,b=5,v={red:"#A70000",amber:"#d97706",green:"#3e9d37"};function y(t,e,s){return Math.min(s,Math.max(e,t))}function x(t){return(y(t,m,g)-m)/(g-m)*100}function k(t){return t<h?v.red:t>p?v.green:v.amber}var w={name:"GstAverageRangeChart",props:{averages:{type:Object,default:null},heading:{type:String,default:""}},data(){return{containerWidth:l}},computed:{markers(){if(!this.averages)return[];const t=[];return null!==this.averages.period&&void 0!==this.averages.period&&t.pu
1sh({key:"period",shortLabel:this.averages.period_label?String(this.averages.period_label):"Period",value:Number(this.averages.period)}),null!==this.averages.ytd&&void 0!==this.averages.ytd&&t.push({key:"ytd",shortLabel:"YTD",value:Number(this.averages.ytd)}),t.filter((t=>!Number.isNaN(t.value))).map((t=>(0,i.Z)((0,i.Z)({},t),{},{leftPercent:x(t.value),colour:k(t.value),display:t.value.toFixed(1)})))},placedMarkers(){return d(this.markers,this.containerWidth)},flagStackPx(){return u(this.placedMarkers)},trackFillStyle(){const t=x(h),e=x(p),s=b;return{backgroundImage:["linear-gradient(to right,",`${v.red} 0%,`,`${v.red} ${t-s}%,`,`${v.amber} ${t+s}%,`,`${v.amber} ${e-s}%,`,`${v.green} ${e+s}%,`,`${v.green} 100%)`].join(" ")}}},watch:{averages:{deep:!0,handler(){this.$nextTick((()=>this.measureTrack()))}}},mounted(){this.measureTrack(),"undefined"!==typeof ResizeObserver&&(this._trackObserver=new ResizeObserver((()=>this.measureTrack())),this.$refs.track&&this._trackObserver.observe(this.$refs.track))},beforeDestroy(){this._trackObserver&&(this._trackObserver.disconnect(),this._trackObserver=null)},methods:{measureTrack(){const t=this.$refs.track;t&&t.clientWidth&&t.clientWidth!==this.containerWidth&&(this.containerWidth=t.clientWidth)},flagStyle(t){return{left:t.leftPercent+"%",bottom:f+"px",height:(t.row+1)*c+"px",transform:"translateX(-50%)"}},flagLabelStyle(t){return{backgroundColor:t.colour,transform:t.offsetX?`translateX(${t.offsetX}px)`:null}}}},_=w,C=s(1001),S=(0,C.Z)(_,r,a,!1,null,null,null),T=S.exports},95926:function(t,e,s){"use strict";s.d(e,{Z:function(){return x}});var r=function(){var t=this,e=t._self._c;return t.hasPoints?e("div",{staticClass:"okr-rag-trend-chart relative overflow-visible"},[t.hideXTickLabels?t._e():e("hr",{staticClass:"o-hr o-hr--full mt-2 mb-2"}),e("div",{staticClass:"flex items-baseline justify-between gap-2"},[e("p",{staticClass:"f-cta2 m-0 font-bold",class:t.headingPrimary?"text-primary":"text-black"},[t._v(t._s(t.heading))]),t.assignedOn?e("p",{staticClass:"f-cta2 m-0 text-primary"},[t._v("Since "+t._s(t.formatAssignedOn))]):t._e()]),!t.hideAverages&&t.averagesParts.length?e("p",{staticClass:"f-cta2 m-0 mt-0.5"},t._l(t.averagesParts,(function(s,r){return e("span",{key:s.label},[r>0?e("span",{staticClass:"text-primary"},[t._v(" · ")]):t._e(),e("span",{staticClass:"text-primary"},[t._v(t._s(s.label))]),e("span",{class:s.valueClass},[t._v(" "+t._s(s.value))])])})),0):t._e(),e("div",{ref:"chartBox",staticClass:"relative mt-0.5 overflow-visible"},[e("bar-chart",{attrs:{"chart-data":t.chartData,options:t.chartOptions,height:t.canvasHeight}}),t.hoverTooltip?e("div",{staticClass:"pointer-events-none absolute z-20 min-w-[9rem] max-w-[16rem] rounded bg-black/80 px-2 py-1.5 text-left shadow-md",style:t.tooltipStyle},[e("p",{staticClass:"m-0 text-[11px] font-semibold leading-snug text-white"},[t._v(t._s(t.tooltipDate))]),e("p",{staticClass:"m-0 mt-0.5 flex items-center gap-1 text-[11px] leading-snug text-white"},[e("span",{staticClass:"inline-block h-2 w-2 flex-none rounded-[1px]",style:{backgroundColor:t.tooltipColour}}),e("span",[t._v(t._s(t.tooltipRagLabel))])]),t.tooltipAverage?e("p",{staticClass:"m-0 mt-0.5 text-[11px] leading-snug text-white/80"},[t._v("Average "+t._s(t.tooltipAverage))]):t._e(),t.tooltipQuarter?e("p",{staticClass:"m-0 mt-0.5 text-[11px] leading-snug text-white/80"},[t._v(t._s(t.tooltipQuarter))]):t._e(),t.tooltipNote?e("p",{staticClass:"m-0 mt-1 whitespace-pre-wrap break-words text-[11px] leading-snug text-white"},[t._v(t._s(t.tooltipNote))]):t._e()]):t._e()],1),t.hideXTickLabels?t._e():e("div",{staticClass:"mt-0.5 flex items-baseline justify-between"},[e("span",{staticClass:"f-b6 m-0 leading-none text-gray-600"},[t._v(t._s(t.firstTickLabel))]),e("span",{staticClass:"f-b6 m-0 leading-none text-gray-600"},[t._v(t._s(t.lastTickLabel))])]),e("hr",{staticClass:"o-hr o-hr--full mt-2 mb-2"})]):t._e()},a=[],i=(s(26699),s(57658),s(73210),s(56663));const n={red:"#A70000",amber:"#d97706",green:"#3e9d37"},o={red:"Red — will miss",amber:"Amber — at risk",green:"Green — on target",na:"N/A"},l="#ca8827",c=24,d=1e3;function u(t){const e=t.data&&t.data.datasets&&t.data.datasets[0],s=e&&(e.ragColours||e.backgroundColor),r=t.chartArea,a=t.ctx||t.chart&&t.chart.ctx;
1if(!a||!r||!Array.isArray(s)||!s.length)return;const i=r.right-r.left,n=r.bottom-r.top,o=s.length;if(!(i<=0||n<=0)){a.save();for(let t=0;t<o;t++){const e=r.left+Math.round(t/o*i),l=r.left+Math.round((t+1)/o*i),c=l-e;c<=0||(a.fillStyle=s[t],a.fillRect(e,r.top,c,n))}a.restore()}}const h={id:"gaplessRagColumns",afterDatasetsDraw:u};function p(t){return n[t]||l}function m(t){if(!t)return"";const e=String(t),s=e.includes("T")?e.split("T")[0]:e,r=s.split("-");return 3===r.length?`${r[2]}/${r[1]}/${r[0].slice(-2)}`:e}function g(t){if(!t)return"";const e=String(t),s=e.includes("T")?e.split("T")[0]:e,r=s.split("-");return 3===r.length?`${r[2]}/${r[1]}`:e}var f={name:"OkrRagTrendChart",components:{BarChart:{extends:i.$Q,props:{chartData:{type:Object,required:!0},options:{type:Object,required:!0},height:{type:Number,default:c}},created(){this.addPlugin(h)},mounted(){this.renderChart(this.chartData,this.options),this._okrRagResizeTimer=window.setTimeout((()=>{this._okrRagResizeTimer=null,this.bindResize()}),d)},beforeDestroy(){this._okrRagResizeTimer&&(window.clearTimeout(this._okrRagResizeTimer),this._okrRagResizeTimer=null),this._okrRagResizeObserver&&(this._okrRagResizeObserver.disconnect(),this._okrRagResizeObserver=null)},watch:{chartData:{deep:!0,handler(t){this.renderChart(t,this.options)}}},methods:{bindResize(){"undefined"!==typeof ResizeObserver&&(this._okrRagResizeObserver=new ResizeObserver((()=>{const t=this.$data._chart;t&&"function"===typeof t.resize&&!t.animating&&t.resize()})),this._okrRagResizeObserver.observe(this.$el))}}}},props:{points:{type:Array,default:()=>[]},assignedOn:{type:String,default:null},heading:{type:String,default:"RAG trend"},ragLabels:{type:Object,default:null},averages:{type:Object,default:null},hideXTickLabels:{type:Boolean,default:!1},hideTooltip:{type:Boolean,default:!1},hideAverages:{type:Boolean,default:!1},headingPrimary:{type:Boolean,default:!1},height:{type:Number,default:c}},data(){return{hoverTooltip:null}},computed:{hasPoints(){return Array.isArray(this.points)&&this.points.length>0},formatAssignedOn(){return m(this.assignedOn)},tooltipDate(){return this.hoverTooltip?m(this.hoverTooltip.point.date):""},tooltipRagLabel(){if(!this.hoverTooltip)return"";const t=this.hoverTooltip.point.rag,e=this.ragLabels||o;return e[t]||o[t]||t||""},tooltipAverage(){return this.hoverTooltip&&null!==this.hoverTooltip.point.average&&void 0!==this.hoverTooltip.point.average?this.formatAverage(this.hoverTooltip.point.average):""},averagesParts(){if(!this.averages)return[];const t=[];return null!==this.averages.period&&void 0!==this.averages.period&&t.push({label:this.averages.period_label?String(this.averages.period_label):"Period",value:this.formatAverage(this.averages.period),valueClass:this.averageValueClass(this.averages.period)}),null!==this.averages.ytd&&void 0!==this.averages.ytd&&t.push({label:"YTD",value:this.formatAverage(this.averages.ytd),valueClass:this.averageValueClass(this.averages.ytd)}),null!==this.averages.overtime&&void 0!==this.averages.overtime&&t.push({label:"Over time",value:this.formatAverage(this.averages.overtime),valueClass:this.averageValueClass(this.averages.overtime)}),t},tooltipColour(){return this.hoverTooltip?p(this.hoverTooltip.point.rag):l},tooltipQuarter(){return this.hoverTooltip?this.hoverTooltip.point.period_key?String(this.hoverTooltip.point.period_key):this.hoverTooltip.point.quarter_key?String(this.hoverTooltip.point.quarter_key):"":""},tooltipNote(){return this.hoverTooltip&&this.hoverTooltip.point.notes?String(this.hoverTooltip.point.notes).trim():""},tooltipStyle(){if(!this.hoverTooltip)return{};const t=this.$refs.chartBox&&this.$refs.chartBox.clientWidth||0,e=72,s=t?Math.max(e,Math.min(t-e,this.hoverTooltip.x)):this.hoverTooltip.x;return{left:`${s}px`,top:`${this.hoverTooltip.y}px`,transform:"translate(-50%, calc(-100% - 8px))"}},firstTickLabel(){return this.hasPoints?g(this.points[0].date):""},lastTickLabel(){return this.hasPoints?g(this.points[this.points.length-1].date):""},canvasHeight(){return this.height},pointColours(){return this.points.map((t=>p(t.rag)))},chartData(){const t=this.points.map((t=>t.date)),e=this.pointColours;return{labels:t,datasets:[{label:"RAG",data:this.points.map((()=>1)),ragColours:e,backgroundColor:e.map((()=>
1"rgba(0, 0, 0, 0)")),hoverBackgroundColor:e.map((()=>"rgba(0, 0, 0, 0)")),borderColor:e.map((()=>"rgba(0, 0, 0, 0)")),hoverBorderColor:e.map((()=>"rgba(0, 0, 0, 0)")),borderWidth:0}]}},chartOptions(){return{responsive:!0,maintainAspectRatio:!1,legend:{display:!1},animation:{duration:d},layout:{padding:0},scales:{yAxes:[{display:!1,ticks:{min:0,max:1},gridLines:{display:!1}}],xAxes:[{offset:!1,barPercentage:1,categoryPercentage:1,gridLines:{display:!1,drawBorder:!1,drawTicks:!1,tickMarkLength:0},afterFit:t=>{t.height=0,t.paddingLeft=0,t.paddingRight=0},ticks:{display:!1,padding:0}}]},tooltips:{enabled:!1,mode:"index",intersect:!1,custom:t=>{this.hideTooltip||this.syncHoverTooltip(t)}}}}},watch:{points(){this.hoverTooltip=null}},methods:{formatAverage(t){const e=Number(t);return Number.isNaN(e)?"":e.toFixed(1)},averageValueClass(t){const e=Number(t);if(Number.isNaN(e))return"text-primary";const s=Number(e.toFixed(1));return s>0?"text-green":s<0?"text-red":"text-[#d97706]"},syncHoverTooltip(t){if(!t||0===t.opacity||!t.dataPoints||!t.dataPoints.length)return void(this.hoverTooltip&&(this.hoverTooltip=null));const e=t.dataPoints[0].index,s=this.points[e];if(!s)return void(this.hoverTooltip=null);const r={index:e,point:s,x:t.caretX,y:t.caretY},a=this.hoverTooltip;a&&a.index===r.index&&a.x===r.x&&a.y===r.y||(this.hoverTooltip=r)}}},b=f,v=s(1001),y=(0,v.Z)(b,r,a,!1,null,null,null),x=y.exports},41128:function(t,e,s){"use strict";s.d(e,{Z:function(){return R}});var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"warm-check-in-chart mt-2"},[e("p",{staticClass:"f-b3 font-bold"},[t._v("Shift feedback trend"+t._s(t.toDate?" — period to date":""))]),t.caption?e("p",{staticClass:"f-b5 m-0 mt-0.5 text-gray-600"},[t._v(t._s(t.caption))]):t._e(),t.hasPoints?e("div",{staticClass:"mt-2 rounded-[10px] border border-primary bg-offcream p-2"},[e("line-chart",{attrs:{"chart-data":t.chartData,options:t.chartOptions,height:180}})],1):e("one-to-one-empty-state",{attrs:{message:"No chart points for this period."}})],1)},a=[],i=(s(26699),s(85827),s(73210),s(57658),s(74916),s(56663)),n=s(68983);const o={1:"#b91c1c",2:"#ef4444",3:"#eab308",4:"#84cc16",5:"#22c55e"},l="#ca8827",c=18,d=1,u=5,h=.4;function p(t){return null===t||void 0===t?l:t<=1.5?o[1]:t<=2.5?o[2]:t<=3.5?o[3]:t<=4.5?o[4]:o[5]}function m(t){return 3===t||4===t?"#422006":"#ffffff"}function g(t,e){const s={1:"M8 16.6 Q12 13.4 16 16.6",2:"M8.4 16.2 Q12 14.2 15.6 16.2",3:"M8.4 15.5 H15.6",4:"M8.4 14.4 Q12 16.8 15.6 14.4",5:"M8 14 Q12 18.2 16 14"};return`<path d="${s[t]}" fill="none" stroke="${e}" stroke-width="1.6" stroke-linecap="round"/>`}function f(t,e){return 1!==t?"":[`<path d="M6.6 8.1 L9.6 9.4" fill="none" stroke="${e}" stroke-width="1.4" stroke-linecap="round"/>`,`<path d="M17.4 8.1 L14.4 9.4" fill="none" stroke="${e}" stroke-width="1.4" stroke-linecap="round"/>`].join("")}function b(t){const e=o[t],s=m(t);return`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n    <circle cx="12" cy="12" r="11" fill="${e}"/>\n    <circle cx="8.5" cy="10.2" r="1.35" fill="${s}"/>\n    <circle cx="15.5" cy="10.2" r="1.35" fill="${s}"/>\n    ${f(t,s)}\n    ${g(t,s)}\n  </svg>`}function v(t){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(b(t))}`}const y={};for(let D=1;D<=5;D++){const t=new Image;t.src=v(D),y[D]=t}function x(){return[1,2,3,4,5].every((t=>y[t].complete&&y[t].naturalWidth>0))}function k(t){if(!t)return"";const e=String(t),s=e.includes("T")?e.split("T")[0]:e,r=s.split("-");return 3===r.length?`${r[2]}/${r[1]}/${r[0].slice(-2)}`:e}function w(t){if(!t)return"";const e=String(t),s=e.includes("T")?e.split("T")[0]:e,r=s.split("-");return 3===r.length?`${r[2]}/${r[1]}`:e}function _(t,e){if(!t||!e)return null;const s=Date.parse(`${t}T00:00:00`),r=Date.parse(`${e}T00:00:00`);return Number.isNaN(s)||Number.isNaN(r)||r<s?null:Math.round((r-s)/864e5)+1}function C(t){return t._view||t._model}function S(t){const e=t.getDatasetMeta(0);return e&&Array.isArray(e.data)?e.data.map(((t,e)=>({point:t,index:e}))).filter((({point:t})=>{const e=C(t);return e&&!e.skip})):[]}function T(t){return t.ctx||t.chart&&t.chart.ctx}function $(t,e,s,r=!0){r&&t.moveTo(e.x,e.y),null!=e.controlPointNextX&&null!=s.controlPointPreviousX?t.bezierCurveTo(e.controlPointNextX,e.controlPointNextY,s.controlPointPreviousX,s.controlPointPreviousY,s.x,s.y):t.lineTo(s.x,s.y)}function O(t){const e=S(t);if(e.length<2)return;
1const s=t.data.datasets[0],r=s.pointBackgroundColor||[],a=T(t);if(a){a.save(),a.lineWidth=s.borderWidth||2,a.lineJoin="round",a.lineCap="round";for(let t=0;t<e.length-1;t++){const s=C(e[t].point),i=C(e[t+1].point),n=Array.isArray(r)?r[e[t].index]:l,o=Array.isArray(r)?r[e[t+1].index]:l,c=a.createLinearGradient(s.x,s.y,i.x,i.y);c.addColorStop(0,n||l),c.addColorStop(1,o||l),a.beginPath(),a.strokeStyle=c,$(a,s,i),a.stroke()}a.restore()}}function A(t){const e=t.getDatasetMeta(0),s=t.data.datasets[0];if(!e||!Array.isArray(e.data))return;const r=s.pointBackgroundColor||[],a=T(t);a&&e.data.forEach(((t,e)=>{const s=C(t);if(!s||s.skip)return;const i=Array.isArray(r)?r[e]:r;a.beginPath(),a.arc(s.x,s.y,s.radius||5,0,2*Math.PI),a.fillStyle=i||l,a.strokeStyle=i||l,a.lineWidth=1,a.fill(),a.stroke()}))}function M(t){const e=t.getDatasetMeta(0),s=t.scales[e&&e.yAxisID||"y-axis-0"];if(!s)return;const r=T(t);if(!r)return;const a=s.left+(s.width-c)/2;r.save();for(let i=1;i<=5;i++){const t=s.getPixelForValue(i)-c/2;r.drawImage(y[i],a,t,c,c)}r.restore()}function L(t){const e=t.getDatasetMeta(0),s=t.scales[e&&e.yAxisID||"y-axis-0"],r=T(t),a=t.chartArea;if(s&&r&&a){r.save(),r.strokeStyle="rgba(202, 136, 39, 0.15)",r.lineWidth=1;for(let t=1;t<=5;t++){const e=Math.round(s.getPixelForValue(t))+.5;e<a.top-1||e>a.bottom+1||(r.beginPath(),r.moveTo(a.left,e),r.lineTo(a.right,e),r.stroke())}r.restore()}}const I=[{id:"shiftFeedbackScoreGrid",beforeDatasetsDraw(t){L(t)}},{id:"shiftFeedbackGradientLine",afterDatasetsDraw(t){O(t),A(t)}},{id:"shiftFeedbackFaceAxis",afterDraw(t){if(x())M(t);else if(!t._shiftFeedbackFacesBound){t._shiftFeedbackFacesBound=!0;const e=()=>{x()&&"function"===typeof t.render&&t.render()};Object.keys(y).forEach((t=>{y[t].addEventListener("load",e)}))}}}];var N={name:"WarmCheckInShiftFeedbackChart",components:{"one-to-one-empty-state":n.Z,LineChart:{extends:i.x1,props:{chartData:{type:Object,required:!0},options:{type:Object,required:!0},height:{type:Number,default:180}},created(){I.forEach((t=>this.addPlugin(t)))},mounted(){this.renderChart(this.chartData,this.options)}}},props:{points:{type:Array,default:()=>[]},toDate:{type:Boolean,default:!1},periodStart:{type:String,default:""},periodEnd:{type:String,default:""}},methods:{scoreColour:p},computed:{hasPoints(){return Array.isArray(this.points)&&this.points.length>0},periodDays(){return _(this.periodStart,this.periodEnd)||28},entryCount(){return Array.isArray(this.points)?this.points.reduce(((t,e)=>t+(Number(e&&e.review_count)||0)),0):0},caption(){const t=this.periodStart&&this.periodEnd?` · ${w(this.periodStart)}–${w(this.periodEnd)}`:"",e=1===this.entryCount?"entry":"entries";return`Last ${this.periodDays} days${t} · ${this.entryCount} ${e}`},pointColours(){return this.points.map((t=>this.scoreColour(null===t.average_score||void 0===t.average_score?null:Number(t.average_score))))},chartData(){const t=this.points.map((t=>t.date)),e=this.points.map((t=>null===t.average_score||void 0===t.average_score?null:Number(t.average_score))),s=this.pointColours;return{labels:t,datasets:[{label:"Average score",data:e,borderColor:"rgba(0, 0, 0, 0)",backgroundColor:"rgba(0, 0, 0, 0)",fill:!1,borderWidth:2,pointBackgroun
1dColor:s,pointBorderColor:s,pointHoverBackgroundColor:s,pointHoverBorderColor:s,pointRadius:5,lineTension:.25,spanGaps:!0}]}},chartOptions(){return{responsive:!0,maintainAspectRatio:!1,legend:{display:!1},scales:{yAxes:[{afterFit(t){t.width=40},ticks:{min:d-h,max:u+h,stepSize:1,padding:4,autoSkip:!1,display:!1},gridLines:{display:!1}}],xAxes:[{gridLines:{display:!1},ticks:{maxRotation:45,minRotation:0,callback(t){if(!t)return"";const e=String(t).split("-");return 3===e.length?`${e[2]}/${e[1]}`:t}}}]},tooltips:{callbacks:{title(t){return t.length?k(t[0].xLabel||t[0].label):""},afterLabel:t=>{const e=this.points[t.index];if(!e)return"";const s=[`${e.review_count||0} review(s)`],r=Array.isArray(e.comments)?e.comments.map((t=>String(t).trim())).filter(Boolean):[];return r.length&&(s.push(""),r.forEach((t=>{String(t).split(/\r?\n/).forEach((t=>{t.trim()&&s.push(t)}))}))),s}}}}}}},P=N,B=s(1001),j=(0,B.Z)(P,r,a,!1,null,null,null),R=j.exports},2426:function(t,e,s){"use strict";s.d(e,{Z:function(){return c}});var r=function(){var t=this,e=t._self._c;return e("span",{staticClass:"inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-full border px-1.5 py-1 f-cta2",class:t.badgeClass},[e("svg",{staticClass:"h-2.5 w-2.5 flex-none",attrs:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}},["overdue"===t.resolvedStatus?e("g",[e("path",{attrs:{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}}),e("line",{attrs:{x1:"12",y1:"9",x2:"12",y2:"13"}}),e("line",{attrs:{x1:"12",y1:"17",x2:"12.01",y2:"17"}})]):"resolved"===t.resolvedStatus?e("g",[e("circle",{attrs:{cx:"12",cy:"12",r:"10"}}),e("path",{attrs:{d:"m9 12 2 2 4-4"}})]):"completed"===t.resolvedStatus?e("g",[e("circle",{attrs:{cx:"12",cy:"12",r:"10"}}),e("path",{attrs:{d:"M12 6v6l3 2"}})]):e("g",[e("circle",{attrs:{cx:"12",cy:"12",r:"10"}}),e("path",{attrs:{d:"M12 6v6l4 2"}})])]),t._v(" "+t._s(t.label)+" ")])},a=[],i={name:"OneToOneActionStatusBadge",props:{status:{type:String,default:"open"},overdue:{type:Boolean,default:!1},coachConfirmOnly:{type:Boolean,default:!1},confirmed:{type:Boolean,default:!0},openLabel:{type:String,default:"To complete"}},computed:{resolvedStatus(){return this.overdue&&"open"===this.status?"overdue":"resolved"===this.status||"completed"===this.status?this.status:this.coachConfirmOnly&&"open"===this.status?"completed":"open"},label(){const t={overdue:"Overdue",resolved:this.confirmed?"Confirmed":"Completed",completed:"To confirm",open:this.openLabel};return t[this.resolvedStatus]},badgeClass(){return"overdue"===this.resolvedStatus?"border-white bg-red2 text-white":"resolved"===this.resolvedStatus?"border-white bg-green text-white":"completed"===this.resolvedStatus?"border-green bg-green/10 text-green":"border-blue bg-blue/10 text-blue"}}},n=i,o=s(1001),l=(0,o.Z)(n,r,a,!1,null,null,null),c=l.exports},53669:function(t,e,s){"use strict";s.d(e,{Z:function(){return u}});var r=function(){var t=this,e=t._self._c;return t.hasAttachments?e("div",{staticClass:"one-to-one-comment-attachments"},[e("ul",{staticClass:"one-to-one-comment-attachments__list"},t._l(t.attachments,(function(s,r){return e("li",{key:s.id||s.uuid||r,staticClass:"one-to-one-comment-attachments__item"},[e("button",{staticClass:"one-to-one-comment-attachments__thumb",attrs:{type:"button","aria-label":"Open "+(s.original_filename||"image"),disabled:!!t.busy[t.fileKey(s)]},on:{click:function(e){return t.openAt(r)}}},[t.thumbFor(s)?e("img",{attrs:{src:t.thumbFor(s),alt:s.original_filename||"Attached image"}}):e("span",{staticClass:"one-to-one-comment-attachments__placeholder"},[t._v("…")])])])})),0),t.error?e("p",{staticClass:"one-to-one-comment-attachments__error"},[t._v(t._s(t.error))]):t._e()]):t._e()},a=[],i=(s(33948),s(60285),s(41637),s(57658),s(9669)),n=s.n(i),o={name:"OneToOneCommentAttachments",props:{attachments:{type:Array,default:()=>[]},downloadUrlFor:{type:Function,required:!0}},data(){return{thumbs:{},busy:{},error:null,objectUrls:[]}},computed:{hasAttachments(){return Array.isArray(this.attachments)&&this.attachments.length>0}},watch:{attachments:{immediate:!0,handler(){this.warmThumbs()}}},beforeDestroy(){this.revokeAll()},methods:{fileKey(t){return String(t.id||t.uuid||t.original_filename||"")},thumbFor(t){return this.thumbs[this.fileKey(t)]||null}
1,revokeAll(){this.objectUrls.forEach((t=>{try{window.URL.revokeObjectURL(t)}catch(e){}})),this.objectUrls=[],this.thumbs={}},async warmThumbs(){if(this.hasAttachments)for(let e=0;e<this.attachments.length;e+=1){const s=this.attachments[e],r=this.fileKey(s);if(!this.thumbs[r]&&!this.busy[r]){this.$set(this.busy,r,!0);try{const t=await this.fetchBlob(s);if(!t)continue;const e=window.URL.createObjectURL(t);this.objectUrls.push(e),this.$set(this.thumbs,r,e)}catch(t){}finally{this.$set(this.busy,r,!1)}}}else this.revokeAll()},async fetchBlob(t){const e=this.downloadUrlFor(t);if(!e)return null;const s=await n().get(e,{responseType:"blob",skipInactiveAccount403:!0});return s&&s.data?s.data:null},async openAt(t){this.error=null;const e=this.attachments[t];if(!e)return;const s=this.fileKey(e);let r=this.thumbs[s];if(!r){this.$set(this.busy,s,!0);try{const t=await this.fetchBlob(e);if(!t)return void(this.error="Could not open that image.");r=window.URL.createObjectURL(t),this.objectUrls.push(r),this.$set(this.thumbs,s,r)}catch(a){return void(this.error="Could not open that image.")}finally{this.$set(this.busy,s,!1)}}this.$store.commit("imageSrc",r)}}},l=o,c=s(1001),d=(0,c.Z)(l,r,a,!1,null,"3130c118",null),u=d.exports},68983:function(t,e,s){"use strict";s.d(e,{Z:function(){return c}});var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"mt-2 flex items-start gap-2.5 rounded-lg border px-3 py-2.5",class:t.toneClass,attrs:{role:"status"}},["success"===t.tone?e("svg",{staticClass:"mt-0.5 h-4 w-4 flex-shrink-0",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}},[e("circle",{attrs:{cx:"12",cy:"12",r:"10"}}),e("path",{attrs:{d:"M9 12l2 2 4-4"}})]):"pending"===t.tone?e("svg",{staticClass:"mt-0.5 h-4 w-4 flex-shrink-0",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}},[e("circle",{attrs:{cx:"12",cy:"12",r:"10"}}),e("path",{attrs:{d:"M12 6v6l4 2"}})]):"unavailable"===t.tone?e("svg",{staticClass:"mt-0.5 h-4 w-4 flex-shrink-0",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}},[e("circle",{attrs:{cx:"12",cy:"12",r:"10"}}),e("path",{attrs:{d:"M8 12h8"}})]):e("svg",{staticClass:"mt-0.5 h-4 w-4 flex-shrink-0",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}},[e("circle",{attrs:{cx:"12",cy:"12",r:"10"}}),e("path",{attrs:{d:"M12 16v-4"}}),e("path",{attrs:{d:"M12 8h.01"}})]),e("p",{staticClass:"f-b3 m-0 min-w-0 flex-1 leading-snug"},[t._t("default",(function(){return[t._v(t._s(t.message))]}))],2)])},a=[],i={name:"OneToOneEmptyState",props:{message:{type:String,default:""},tone:{type:String,default:"info",validator(t){return-1!==["info","pending","unavailable","success"].indexOf(t)}}},computed:{toneClass(){return"success"===this.tone?"border-green bg-green/10 text-green":"pending"===this.tone?"border-[#d97706] bg-amber-50 text-[#b45309]":"unavailable"===this.tone?"border-grey bg-lightestgrey text-darkgrey":"border-blue bg-blue/10 text-blue"}}},n=i,o=s(1001),l=(0,o.Z)(n,r,a,!1,null,null,null),c=l.exports},32933:function(t,e,s){"use strict";s.d(e,{Z:function(){return u}});var r=function(){var t=this,e=t._self._c;return t.summaries.length?e("button",{staticClass:"group/aud inline-flex max-w-full flex-wrap items-center gap-1.5 rounded-full bg-primary px-2.5 py-1 text-[11px] font-semibold text-white shadow-sm outline-none transition-[background-color,box-shadow,transform] duration-[180ms] ease-in-out hover:bg-primary/80 hover:shadow-[0_6px_14px_rgba(202,136,39,0.30)] focus-visible:bg-primary/80 motion-reduce:transition-none",attrs:{type:"button","aria-label":t.ariaLabel},on:{click:function(e){return e.stopPropagation(),t.$emit("click",e)}}},[t._l(t.summaries,(function(s,r){return e("span",{key:s.key,staticClass:"inline-flex min-w-0 items-center gap-1"},[r>0?e("span",{staticClass:"mx-0.5 h-3 w-px flex-none bg-white/40",attrs:{"aria-hidden":"true"}}):t._e(),e("OneToOneSectionIcon",{attrs:{type:t.iconType(s.key),"size-class":"h-3 w-3"}}),e("span",{staticClass:"min-w-0 truncate"},[t._v(t._s(s.label))])],1)})),e("svg",{staticClass:"h-3.5 w-3.5 flex-none transition-transform duration-[180ms] ease-in-out group-hover/aud:translate-x-[2px] motion-reduce:transition-none",attrs:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}},[e("path",{attrs:{d:"M5 12h14M13 5l7 7-7 7"}})])],2):t._e()},a=[],i=s(60792);const n={sites:"pub",departments:"department",job_titles:"job_title"};var o={name:"OneToOneJournalAudienceBadge",components:{OneToOneSectionIcon:i.Z},props:{summaries:{type:Array,default:()=>[]}},computed:{ariaLabel(){const t=this.summaries.map((t=>
1t&&t.label)).filter(Boolean);return t.length?"View "+t.join(", "):"View audience"}},methods:{iconType(t){return n[t]||t}}},l=o,c=s(1001),d=(0,c.Z)(l,r,a,!1,null,null,null),u=d.exports},7954:function(t,e,s){"use strict";s.d(e,{Z:function(){return u}});var r=function(){var t=this,e=t._self._c;return e("transition",{attrs:{name:"o2o-suggest-fade"}},[t.open?e("div",{staticClass:"one-to-one-meeting-form fixed inset-0 z-[1100] flex items-center justify-center bg-black/40 px-4 py-6",attrs:{role:"presentation"},on:{click:function(e){return e.target!==e.currentTarget?null:t.close.apply(null,arguments)}}},[e("div",{staticClass:"flex max-h-full w-full max-w-lg flex-col overflow-hidden rounded-xl border-2 border-primary bg-white p-4 shadow-lg",attrs:{role:"dialog","aria-modal":"true","aria-labelledby":"o2o-journal-audience-title"},on:{click:function(t){t.stopPropagation()}}},[e("div",{staticClass:"mb-3 flex items-start justify-between gap-2"},[e("h2",{staticClass:"f-cta1 m-0 text-primary",attrs:{id:"o2o-journal-audience-title"}},[t._v(t._s(t.heading))]),e("button",{staticClass:"font-bold text-primary",attrs:{type:"button","aria-label":"Close"},on:{click:t.close}},[t._v("✕")])]),e("div",{staticClass:"flex flex-col gap-3 overflow-y-auto"},t._l(t.sections,(function(s){return e("section",{key:s.key},[e("p",{staticClass:"f-cta2 m-0 mb-1 text-black"},[t._v(t._s(s.heading))]),e("div",{staticClass:"flex flex-wrap gap-1"},t._l(s.items,(function(r,a){return e("span",{key:s.key+"-"+a,staticClass:"inline-flex max-w-full items-center rounded-full border border-primary bg-primary/10 px-2 py-0.5 text-[11px] font-semibold text-primary"},[t._v(t._s(r.label))])})),0)])})),0)])]):t._e()])},a=[],i=s(60091);s(73210),s(74916),s(15306);const n=[{key:"sites",heading:"Sites"},{key:"departments",heading:"Departments"},{key:"job_titles",heading:"Job Titles"}];var o={name:"OneToOneJournalAudienceModal",props:{open:{type:Boolean,default:!1},title:{type:String,default:"Created For"},badges:{type:Object,default:null}},computed:{heading(){return String(this.title||"Created For").replace(/:+\s*$/,"").trim()},sections(){const t=this.badges||{};return n.map((e=>{const s=Array.isArray(t[e.key])?t[e.key].filter((t=>t&&t.label)):[];return(0,i.Z)((0,i.Z)({},e),{},{items:s})})).filter((t=>t.items.length))}},methods:{close(){this.$emit("close")}}},l=o,c=s(1001),d=(0,c.Z)(l,r,a,!1,null,"4ec69abc",null),u=d.exports},23039:function(t,e,s){"use strict";s.d(e,{Z:function(){return m}});var r=function(){var t=this,e=t._self._c;return t.label?e("span",{staticClass:"flex w-max flex-shrink-0 items-center gap-1 rounded-full border px-2.5 py-0.5 text-[11px] font-semibold uppercase tracking-wide",class:t.badgeClass},[e("OneToOneSectionIcon",{attrs:{type:t.resolvedType,"size-class":"h-3 w-3"}}),t._v(" "+t._s(t.label)+" ")],1):t._e()},a=[],i=(s(73210),s(74916),s(15306),s(26699),s(60792));const n="!border-primary !bg-primary/10 !text-primary",o="!border-[#3b82f6] !bg-[#eff6ff] !text-[#2563eb]",l="!border-[#0d9488] !bg-[#ccfbf1] !text-[#0f766e]",c="!border-[#d97706] !bg-[#fef3c7] !text-[#b45309]";var d={name:"OneToOneJournalCategoryBadge",components:{OneToOneSectionIcon:i.Z},props:{category:{type:String,default:""},kind:{type:String,default:""}},computed:{resolvedType(){const t=this.normalizedKey;return"agenda"===t?"agenda":"group"===t?"group":"individual"===t?"individual":"journal"},label(){const t=this.normalizedKey;return t?"agenda"===t?"Agenda":"group"===t?"Group":"individual"===t?"Individual":"journal"===t||"leave_comment"===t?"Journal":this.category.replace(/^\[|\]$/g,"").trim():""},badgeClass(){return"agenda"===this.resolvedType?o:"individual"===this.resolvedType?l:"group"===this.resolvedType?c:n},normalizedKey(){const t=String(this.kind||"").replace(/^\[|\]$/g,"").trim().toLowerCase();if("individual"===t||"individuals"===t)return"individual";if("group"===t||"groups"===t)return"group";const e=String(this.category||"").replace(/^\[|\]$/g,"").trim().toLowerCase();return e?e.includes("agenda")?"agenda":"individual"===e||e.includes("individual")?"individual":e.includes("group")?"group":e.includes("journal")||e.includes("leave_comment")?"journal":e.replace(/\s+/g,"_"):""}}},u=d,h=s(1001),p=(0,h.Z)(u,r,a,!1,null,null,null),m=p.exports},27635:function(t,e,s){"use strict";s.d(e,{Z:function(){return p}});var r=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"mb-2 flex items-start justify-between gap-2"},[e("div",{staticClass:"min-w-0 flex-1"},[t.meetingLabel?[e("p",{staticClass:"f-cta2 m-0 uppercase tracking-wide text-gray-500"},[t._v("Meeting")]),e("div",{staticClass:"flex min-w-0 flex-nowrap items-center gap-2"},[e("p",{staticClass:"f-cta1 m-0 whitespace-nowrap !text-base !leading-snug text-primary"},[t._v(t._s(t.meetingLabel))]),t._t("calendar")],2)]:t._e(),t.openedLabel?[e("p",{staticClass:"f-cta2 m-0 mt-1 text-gray-500"},[t._v("Opened")]),e("p",{staticClass:"f-cta1 m-0 !text-base !leading-snug text-primary"},[t._v(t._s(t.openedLabel))])]:t._e(),t.finalisedLabel?[e("p",{staticClass:"f-cta2 m-0 mt-1 text-gray-500"},[t._v("Finalised")]),e("p",{staticClass:"f-cta1 m-0 !text-base !leading-snug text-primary"},[t._v(t._s(t.finalisedLabel))])]:t._e(),t.coachName?[e("p",{staticClass:"f-cta2 m-0 mt-1 text-gray-500"},[t._v("Team Coach")]),e("p",{staticClass:"f-cta1 m-0 break-words !text-base !leading-snug text-primary"},[t._v(t._s(t.coachName))])]:t._e(),t.location?[e("p",{staticClass:"f-cta2 m-0 mt-1 text-gray-500"},[t._v("Location")]),e("p",{staticClass:"f-cta1 m-0 break-words !text-base !leading-snug text-primary"},[t._v(t._s(t.location))])]:t._e()],2),t.status?e("OneToOneMeetingStatusBadge",{attrs:{status:t.status}}):t._e()],1),t._t("default")],2)},a=[],i=s(30381),n=s.n(i),o=s(30994);function l(t){return t?n()(t).format("ddd DD/MM/YY HH:mm"):""}var c={name:"OneToOneMeetingHeaderMeta",components:{OneToOneMeetingStatusBadge:o.Z},props:{meetingAt:{type:[String,Object],default:null},openedAt:{type:[String,Object],default:null},finalisedAt:{type:[String,Object],default:null},coachName:{type:String,default:""},location:{type:String,default:""},status:{type:String,default:null}},computed:{meetingLabel(){return l(this.meetingAt)},openedLabel(){return l(this.openedAt)},finalisedLabel(){return l(this.finalisedAt)}}},d=c,u=s(1001),h=(0,u.Z)(d,r,a,!1,null,null,null),p=h.exports},83e3:function(t,e,s){"use strict";s.d(e,{Z:function(){return d}});var r=function(){var t=this,e=t._self._c;return e("router-link",{staticClass:"group/row relative flex flex-col gap-3 rounded-[10px] border-2 border-primary bg-offcream px-4 py-3.5 no-underline outline-none transition-[transform,box-shadow,border-color] duration-[180ms,220ms,220ms] ease-in-out hover:-translate-y-
1px hover:shadow-[0_6px_18px_rgba(202,136,39,0.18)] focus-visible:outline-none motion-reduce:transition-none md:flex-row md:items-center",attrs:{to:t.meetingUrl}},[e("div",{staticClass:"flex-1 text-left"},[e("OneToOneMeetingHeaderMeta",{attrs:{"meeting-at":t.meeting.meeting_at,"opened-at":t.meeting.started_at,"finalised-at":t.meeting.completed_at,"coach-name":t.coachName,location:t.meeting.location||"",status:t.meeting.status}})],1),e("div",{staticClass:"flex flex-row flex-nowrap gap-2 md:flex-none"},[e("span",{staticClass:"group/btn inline-flex min-w-0 flex-1 items-center justify-center gap-1.5 rounded-lg border border-primary bg-primary px-4 py-[9px] text-sm font-semibold text-white shadow-sm transition-[background-color,border-color,color,transform,box-shadow,opacity] duration-[180ms,180ms,180ms,140ms,220ms,180ms] ease-in-out group-hover/row:-translate-y-px group-hover/row:border-primary/80 group-hover/row:bg-primary/80 group-focus-visible/row:border-primary/80 group-focus-visible/row:bg-primary/80 motion-reduce:transition-none"},[e("span",[t._v(t._s(t.actionLabel))]),e("svg",{staticClass:"!inline-block !h-4 !w-4 flex-none transition-transform duration-[180ms] ease-in-out group-hover/row:translate-x-[3px] ml-auto motion-reduce:transition-none",attrs:{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}},[e("path",{attrs:{d:"M5 12h14M13 5l7 7-7 7"}})])])])])},a=[],i=(s(73210),s(27635)),n={name:"OneToOneMeetingHistoryRow",components:{OneToOneMeetingHeaderMeta:i.Z},props:{meeting:{type:Object,required:!0}},computed:{siteId(){return this.$route.params.siteId},meetingUrl(){return`/site/${this.siteId}/management/one-to-one/meetings/${this.meeting.id}`},coachName(){return(this.meeting.coach_name||"").trim()},actionLabel(){return this.meeting.action_label?this.meeting.action_label:"in_progress"===this.meeting.status||"scheduled"===this.meeting.status||"not_finalised"===this.meeting.status?"Open":"Review"}}},o=n,l=s(1001),c=(0,l.Z)(o,r,a,!1,null,null,null),d=c.exports},30994:function(t,e,s){"use strict";s.d(e,{Z:function(){return c}});var r=function(){var t=this,e=t._self._c;return e("span",{staticClass:"inline-flex flex-shrink-0 items-center gap-1 rounded-full border px-2.5 py-0.5 text-[11px] font-semibold uppercase tracking-wide",class:t.badgeClass},["completed"===t.resolvedStatus?e("svg",{staticClass:"h-3.5 w-3.5",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}},[e("path",{attrs:{d:"M20 6 9 17l-5-5"}})]):"in_progress"===t.resolvedStatus?e("svg",{staticClass:"h-3.5 w-3.5",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}},[e("circle",{attrs:{cx:"12",cy:"12",r:"10"}}),e("path",{attrs:{d:"M12 6v6l4 2"}})]):"scheduled"===t.resolvedStatus?e("svg",{staticClass:"h-3.5 w-3.5",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}},[e("rect",{attrs:{x:"3",y:"4",width:"18",height:"18",rx:"2"}}),e("path",{attrs:{d:"M16 2v4"}}),e("path",{attrs:{d:"M8 2v4"}}),e("path",{attrs:{d:"M3 10h18"}})]):"not_finalised"===t.resolvedStatus?e("svg",{staticClass:"h-3.5 w-3.5",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}},[e("circle",{attrs:{cx:"12",cy:"12",r:"10"}}),e("path",{attrs:{d:"M12 8v4"}}),e("path",{attrs:{d:"M12 16h.01"}})]):"cancelled"===t.resolvedStatus?e("svg",{staticClass:"h-3.5 w-3.5",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}},[e("circle",{attrs:{cx:"12",cy:"12",r:"10"}}),e("path",{attrs:{d:"m15 9-6 6"}}),e("path",{attrs:{d:"m9 9 6 6"}})]):e("svg",{staticClass:"h-3.5 w-3.5",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}},[e("circle",{attrs:{cx:"12",cy:"12",r:"10"}}),e("path",{attrs:{d:"M8 12h8"}})]),t._v(" "+t._s(t.label)+" ")])},a=[],i=(s(74916),s(15306),{name:"OneToOneMeetingStatusBadge",props:{status:{type:String,default:null}},computed:{resolvedStatus(){return this.status||"unknown"},label(){const t={scheduled:"Opened",in_progress:"Opened",completed:"Finalised",not_finalised:"Opened",cancelled:"Cancelled"};return t[this.resolvedStatus]||String(this.status||"").replace(/_/g," ")},badgeClass(){return"completed"===this.resolvedStatus?"!border-red !bg-red/10 !text-red":"in_progress"===this.resolvedStatus||"scheduled"===this.resolvedStatus||"not_finalised"===this.resolvedStatus?"!border-green !bg-green/10 !text-green":"cancelled"===this.resolvedStatus?"!border-red !bg-red/10 !text-red":"!border-grey !bg-lightestgrey !text-darkgrey"}}}),n=i,o=s(1001),l=(0,o.Z)(n,r,a,!1,null,null,null),c=l.exports},65020:function(t,e,s){"use strict";s.d(e,{Z:function(){return c}});var r=function(){var t=this,e=t._self._c;return t.name||t.date||t.site?e("div",[e("hr",{staticClass:"o-hr o-hr--full mt-2 mb-2",class:t.ruleClass}),e("div",{staticClass:"flex items-center justify-between gap-2"},[e("p",{staticClass:"f-cta2 m-0 min-w-0"},[t.displayLabel?e("span",{staticClass:"text-black"},[t._v(t._s(t.displayLabel)+" ")]):t._e(),t._t("before-name"),t.name?e("span",{class:t.nameClass},[t._v(t._s(t.name))]):t._e(),t.name&&t.site?[t._v(" · ")]:t._e(),t.site?e("span",{class:t.siteClass},[t._v(t._s(t.site))]):t._e(),(t.name||t.site)&&t.date?[t._v(" · ")]:t._e(),t.date?e("span",{class:t.dateClass},[t._v(t._s(t.date))]):t._e()],2),t.$slots.action?e("div",{staticClass:"flex shrink-0 items-center"},[t._t("action")],2):t._e()])]):t._e()},a=[],i=(s(73210),s(74916),s(15306),{name:"OneToOneNameDateRow",props:{name:{type:String,default:""},date:{type:String,default:""},site:{type:String,default:""},label:{type:String,default:""},nameClass:{type:String,default:"text-primary"},dateClass:{type:String,default:"text-gray-500"},siteClass:{type:String,default:"text-gray-500"},ruleClass:{type:String,default:""}},computed:{displayLabel(){return String(this.label||"").replace(/:+\s*$/,"").trim()}}}),n=i,o=s(1001),l=(0,o.Z)(n,r,a,!1,null,null,null),c=l.exports},8627:function(t,e,s){"use strict";s.d(e,{Z:function(){return Xt}});var r=function(){var t=this,e=t._self._c;return t.packChatAvailable?e("div",[e("div",{staticClass:"h-9",attrs:{"aria-hidden":"true"}}),e("button",{staticClass:"fixed inset-x-0 z-[90] flex h-9 items-center justify-center border-t border-primary/80 bg-primary text-white outline-none transition-[transform,background-color] duration-[220ms] ease-[cubic-bezier(0.22,1,0.36,1)] hover:bg-primary/80 focus-visible:bg-primary/80 motion-reduce:transition-none",class:t.open?"pointer-events-none translate-y-full":"translate-y-0",style:{bottom:t.navOffset+"px"},attrs:{type:"button","aria-hidden":t.open?"true":"false",tabindex:t.open?-1:0,"aria-label":t.askLabel},on:{click:function(e){t.open=!0}}},[e("span",{staticClass:"inline-flex max-w-full items-center justify-center gap-1.5 px-3"},[e("svg",{staticClass:"shrink-0",staticStyle:{width:"16px",height:"16px"},attrs:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}},[e("path",{attrs:{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"}}),e("path",{attrs:{d:"M20 3v4M22 5h-4M4 17v2M5 18H3"}})]),e("span",{staticClass:"f-cta1 min-w-0 truncate whitespace-nowrap text-white"},[t._v(t._s(t.askLabel))]),e("svg",{staticClass:"shrink-0",staticStyle:{width:"16px",height:"16px"},attrs:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}},[e("path",{attrs:{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"}}),e("path",{attrs:{d:"M20 3v4M22 5h-4M4 17v2M5 18H3"}})])])]),e("transition",{attrs:{name:"pack-chat-sheet"}},[t.open?e("OneToOnePackChatPanel",{key:"panel",attrs:{mode:t.mode,docked:t.docked,"member-guest-id":t.memberGuestId,"meeting-id":t.meetingId,"member-name":t.memberName,"chat-window":t.chatWindow,"footer-offset":t.navOffset},on:{"set-mode":function(e){t.mode=e},"set-docked":function(e){t.docked=e},close:t.close,navigate:t.onNavigate}}):t._e()],1)],1):t._e()},a=[],i=(s(73210),s(74916),s(15306),s(9669)),n=s.n(i),o=s(13208),l=function(){var t=this,e=t._self._c;return e("div",{staticClass:"fixed inset-x-0 bottom-[var(--pack-chat-footer-offset)] flex flex-col overflow-hidden rounded-t-2xl border border-b-0 border-gray-200 bg-[#faf9f7] shadow-none transition-[height] duration-[260ms] ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none sm:inset-x-auto sm:bottom-4 sm:right-4 sm:w-[420px] sm:rou
1nded-2xl sm:border",class:["full"===t.mode?"sm:bottom-4":"h-[60vh] sm:bottom-4 sm:h-[700px] sm:max-h-[85vh]",t.slidingBehindFooter?"z-[90]":"z-[120]"],style:t.sheetStyle,attrs:{role:"dialog","aria-label":"1-1 assistant"}},[e("div",{ref:"chrome",staticClass:"flex flex-none cursor-grab touch-none select-none flex-col active:cursor-grabbing",on:{pointerdown:t.onSheetPointerDown,pointermove:t.onSheetPointerMove,pointerup:t.onSheetPointerUp,pointercancel:t.onSheetPointerCancel}},[t._m(0),e("header",{staticClass:"flex items-center gap-2 border-b-0 bg-primary px-3.5 pb-2.5 pt-1.5 text-white"},[e("span",{staticClass:"flex h-8 w-8 flex-none items-center justify-center rounded-full bg-white/15 text-white"},[e("svg",{attrs:{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}},[e("path",{attrs:{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"}}),e("path",{attrs:{d:"M20 3v4M22 5h-4M4 17v2M5 18H3"}})])]),e("div",{staticClass:"min-w-0 flex-1 text-left"},[e("p",{staticClass:"f-cta2 m-0 truncate text-white"},[t._v("1-1 Assistant")]),e("div",{ref:"scopeBadgeWrap",staticClass:"relative mt-1.5 min-w-0"},[e("button",{class:t.scopeBadge.className,attrs:{type:"button","aria-label":"Scoped to "+t.scopeBadge.label+". Tap for more about this access.","aria-expanded":t.scopeTipOpen?"true":"false","aria-describedby":t.scopeTipOpen?"pack-chat-scope-tip":null},on:{click:function(e){return e.stopPropagation(),t.toggleScopeTip.apply(null,arguments)}}},[e("OneToOneSectionIcon",{attrs:{type:t.scopeBadge.icon,"size-class":"h-3 w-3"}}),e("span",{staticClass:"min-w-0 truncate"},[t._v(t._s(t.scopeBadge.label))])],1),e("div",{directives:[{name:"show",rawName:"v-show",value:t.scopeTipOpen,expression:"scopeTipOpen"}],staticClass:"absolute left-0 top-full z-20 mt-1.5 max-w-[min(16rem,calc(100vw-3rem))] rounded-lg bg-black/80 px-2.5 py-2 text-left shadow-md",attrs:{id:"pack-chat-scope-tip",role:"tooltip"}},[e("span",{staticClass:"absolute -top-1 left-3 h-2 w-2 rotate-45 bg-black/80",attrs:{"aria-hidden":"true"}}),e("p",{staticClass:"m-0 whitespace-normal text-[11px] font-semibold leading-snug text-white"},[t._v(t._s(t.scopeBadge.tooltip))])])])]),t.messages.length?e("button",{staticClass:"flex h-6 w-6 flex-none items-center justify-center rounded-md text-white outline-none transition-colors hover:bg-white/15 hover:text-white focus-visible:bg-white/15 disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-none",attrs:{type:"button",disabled:t.sending||t.clearing,"aria-label":"Clear this chat"},on:{click:t.clearChat}},[e("svg",{attrs:{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}},[e("path",{attrs:{d:"M7 19H4.815a1.83 1.83 0 0 1-1.57-.881 1.785 1.785 0 0 1-.004-1.784L7.196 9.5"}}),e("path",{attrs:{d:"M11 19h8.203a1.83 1.83 0 0 0 1.556-.89 1.784 1.784 0 0 0 0-1.775l-1.226-2.12"}}),e("path",{attrs:{d:"m14 16-3 3 3 3"}}),e("path",{attrs:{d:"M8.293 13.596 7.196 9.5 3.1 10.598"}}),e("path",{attrs:{d:"m9.344 5.811 1.093-1.892A1.83 1.83 0 0 1 11.985 3a1.784 1.784 0 0 1 1.546.888l3.943 6.843"}}),e("path",{attrs:{d:"m13.378 9.633 4.096 1.098 1.097-4.096"}})])]):t._e(),e("button",{staticClass:"flex h-6 w-6 flex-none items-center justify-center rounded-md text-white outline-none transition-colors hover:bg-white/15 hover:text-white focus-visible:bg-white/15 motion-reduce:transition-none",attrs:{type:"button","aria-label":"Close assistant"},on:{click:function(e){return t.$emit("close")}}},[e("svg",{attrs:{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}},[e("path",{attrs:{d:"M18 6 6 18M6 6l12 12"}})])])])]),e("OneToOnePackChatThread",{attrs:{messages:t.messages,"status-text":t.statusText,"chat-window":t.chatWindow,"member-name":t.memberName,sending:t.sending,starters:t.starters,"meeting-id":t.resolvedMeetingId},on:{"send-prompt":t.sendSuggestedPrompt,navigate:function(e){return t.$emit("navigate",e)}}}),t.errorText?e("p",{staticClass:"f-b3 mx-3 mb-1 mt-0 text-left text-red-600"},[t._v(t._s(t.errorText))]):t._e(),e("footer",{staticClass:"flex-none border-0 bg-primary p-2.5 shadow-none"},[e("form",{staticClass:"flex items-stretch gap-2",on:{submit:function(e){return e.preventDefault(),t.send.apply(null,arguments)}}},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.draft,expression:"draft"}],ref:"composer",staticClass:"pack-chat-composer !mb-0 h-11 min-w-0 flex-1 appearance-none rounded-lg border !border-white !bg-white px-3.5 text-left f-b3 text-[#1e201d] shadow-none outline-none ring-0 transition-colors duration-[180ms] ease-in-out placeholder:text-gray-400 hover:!bg-white focus:!bg-white focus:border-white focus:shadow-none focus:outline-none focus:ring-0 active:!bg-white disabled:!border-lightestgrey disabled:!bg-lightestgrey disabled:text-darkgrey disabled:placeholder:text-grey disabled:opacity-100 motion-reduce:transition-none",attrs:{type:"text",maxlength:2e3,disabled:t.sending,placeholder:t.composerPlaceholder},domProps:{value:t.draft},on:{input:function(e){e.target.composing||(t.draft=e.target.value)}}}),e("button",{staticClass:"inline-flex !mb-0 h-11 w-11 flex-none items-center justify-center rounded-lg bg-white p-2.5 text-primary shadow-none outline-none ring-0 transition-colors duration-[180ms] ease-in-out hover:bg-white/90 focus-visible:bg-white/90 focus-visible:outline-none focus-visible:ring-0 disabled:cursor-not-allowed disabled:!bg-lightestgrey disabled:text-grey disabled:opacity-100 motion-reduce:transition-none",attrs:{type:"submit",disabled:t.sending||t.draft.trim().length<2,"aria-label":"Send"}},[e("svg",{staticClass:"h-full w-full",attrs:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}},[e("path",{attrs:{d:"M6 12 3.269 3.125A59.769 59.769 0 0 1 21.485 12 59.768 59.768 0 0 1 3.27 20.875L5.999 12Zm0 0h7.5"}}
1)])])])])],1)},c=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"flex justify-center bg-primary pt-2",attrs:{"aria-hidden":"true"}},[e("span",{staticClass:"h-1 w-10 rounded-full bg-white/50"})])}],d=(s(57658),function(){var t=this,e=t._self._c;return e("div",{staticClass:"relative min-h-0 flex-1"},[e("div",{ref:"scroller",staticClass:"absolute inset-0 overflow-x-hidden overflow-y-auto px-3 py-3"},[0===t.messages.length?e("div",{staticClass:"mt-6 flex flex-col items-center px-1"},[e("p",{staticClass:"f-b3 m-0 text-center text-gray-500"},[t._v(" "+t._s(t.emptyHint)+" ")]),t.starters.length?e("div",{staticClass:"mt-4 flex flex-wrap justify-center gap-1.5"},t._l(t.starters,(function(s){return e("button",{key:s.key,class:t.starterChipClass,attrs:{type:"button",title:s.prompt,"aria-label":s.prompt,disabled:t.sending},on:{click:function(e){return t.$emit("send-prompt",{prompt:s.prompt,key:s.key})}}},[t._v(t._s(s.label))])})),0):t._e()]):e("transition-group",{staticClass:"flex flex-col gap-2.5",attrs:{name:"pack-chat-msg",tag:"div"}},t._l(t.visibleMessages,(function(s){return e("OneToOnePackChatMessage",{key:s.id,attrs:{message:s,"meeting-id":t.meetingId},on:{"send-prompt":function(e){return t.$emit("send-prompt",e)},navigate:function(e){return t.$emit("navigate",e)}}})})),1),e("transition",{attrs:{name:"pack-chat-msg"}},[t.statusText?e("div",{key:"status",staticClass:"pack-chat-msg--from-start mt-2.5 flex items-center gap-2 pl-1 text-left"},[e("span",{staticClass:"h-3.5 w-3.5 flex-none animate-spin rounded-full border-2 border-gray-300 border-t-primary motion-reduce:animate-none"}),e("span",{staticClass:"f-b3 text-gray-500"},[t._v(t._s(t.statusText))])]):t._e()])],1),e("div",{staticClass:"pointer-events-none absolute inset-0 shadow-[inset_0_10px_16px_-4px_rgba(30,32,29,0.28),inset_0_-10px_16px_-4px_rgba(30,32,29,0.28)]",attrs:{"aria-hidden":"true"}})])}),u=[],h=function(){var t=this,e=t._self._c;return e("div",{staticClass:"flex min-w-0 w-full",class:t.isUser?"justify-end pack-chat-msg--from-end":"justify-start pack-chat-msg--from-start"},[e("div",{staticClass:"min-w-0 shadow-[0_2px_6px_rgba(30,32,29,0.16)]",class:t.bubbleMaxClass},[e("div",{staticClass:"min-w-0 w-full rounded-2xl px-3.5 py-2.5 text-left f-b3",class:t.bubbleClass},[t.isUser?e("p",{staticClass:"m-0 whitespace-pre-wrap break-words"},[t._v(t._s(t.message.text))]):[t.message.streaming?[t.html?e("div",{staticClass:"pack-chat-prose",domProps:{innerHTML:t._s(t.html)},on:{click:t.onProseClick}}):t._e(),t.html?e("span",{staticClass:"ml-0.5 inline-block h-3.5 w-[2px] animate-pulse bg-primary align-middle motion-reduce:animate-none",attrs:{"aria-hidden":"true"}}):t._e()]:[t._l(t.chartBlocks,(function(s,r){return e("div",{key:"pack-chat-block-"+r,class:r>0?"mt-3":""},[s.html?e("div",{staticClass:"pack-chat-prose",domProps:{innerHTML:t._s(s.html)},on:{click:t.onProseClick}}):t._e(),s.charts.length?e("OneToOnePackChatCharts",{attrs:{charts:s.charts}}):t._e()],1)})),t.chartBlocks.length?t._e():e("p",{staticClass:"m-0 text-gray-500"},[t._v("No answer.")])],!t.message.streaming&&t.hasSuggestions?e("div",{staticClass:"mt-2 flex flex-wrap gap-1.5"},t._l(t.message.suggestions,(function(s){return e("button",{key:s.key,class:t.suggestionChipClass,attrs:{type:"button",title:s.prompt,"aria-label":s.prompt},on:{click:function(e){return t.$emit("send-prompt",{prompt:s.prompt,key:s.key})}}},[t._v(t._s(s.label))])})),0):t._e()]],2)])])},p=[],m=s(59050),g=s(61641);const f="#pack-chat-prompt:",b=["inline-flex max-w-full cursor-pointer items-center rounded-md border-2 border-primary","bg-white px-2 py-1 text-left text-[11px] font-semibold leading-tight text-primary no-underline","hover:bg-primary hover:text-white hover:no-underline","focus-visible:bg-primary focus-visible:text-white focus-visible:no-underline","active:bg-primary/90"].join(" "),v=["pack-chat-prompt",b].join(" "),y="pack-chat-prompts mt-2 flex flex-wrap gap-1.5";function x(t){const e=String(t||"").trim();return e===f||"#pack-chat-prompt"===e}function k(t){const e=String(t||"").trim(),s=e.indexOf("|");if(s>
10&&s<e.length-1){const t=e.slice(0,s).trim(),r=e.slice(s+1).trim();if(""!==t&&""!==r)return{label:t,prompt:r}}return{label:e,prompt:e}}function w(t){return String(t).replace(/<p>([\s\S]*?)<\/p>/g,((t,e)=>{const s=e.match(/<a\b[^>]*\bpack-chat-prompt\b[^>]*>[\s\S]*?<\/a>/gi);if(!s||0===s.length)return t;const r=e.replace(/<a\b[^>]*\bpack-chat-prompt\b[^>]*>[\s\S]*?<\/a>/gi,"").replace(/<br\s*\/?>/gi,"").replace(/&nbsp;/gi," ").trim();return""!==r?t:`<p class="${y}">${s.join("")}</p>`}))}s(33948),s(41637);const _=["pack-chat-nav inline-block w-max max-w-full justify-self-end",b].join(" "),C="pack-chat-table-wrap min-w-0 w-full max-w-full",S={journal:{source:"journal",idQuery:"parent"},thread:{source:"discussion",idQuery:"parent"},discussion:{source:"discussion",idQuery:"parent"},feedback:{source:"feedback_for_coach",idQuery:"parent"},okr:{source:"okr",idQuery:"parent"},gst:{source:"gst",idQuery:"parentKey"}},T=/^member:(\d+)$/,$=/^meeting:(\d+)$/,O=/^action:(\d+)(?:@(\d+))?$/,A=/^(journal|thread|discussion|feedback|okr):(\d+)(?:@(\d+))?$/,M=/^gst:(.+?)(?:@(\d+))?$/,L=/^(view|open 1-1|open pack)$/i;function I(t,e,s=null){if(!e)return null;const r=String(t||"").trim(),a=String(e),i=T.exec(r);if(i)return{href:`/site/${a}/management/one-to-one/team/${i[1]}`,chip:!1};const n=$.exec(r);if(n)return{href:W(a,n[1],{}),chip:!1};const o=O.exec(r);if(o){const t=o[2]||s;return t?{href:W(a,t,{action:o[1]}),chip:!0}:null}const l=A.exec(r);if(l){const t=l[3]||s;if(!t)return null;const e=S[l[1]];return{href:W(a,t,{source:e.source,[e.idQuery]:l[2]}),chip:!0}}const c=M.exec(r);if(c){const t=c[2]||s;return t?{href:W(a,t,{source:"gst",parentKey:c[1]}),chip:!0}:null}return null}function N(t){return L.test(String(t||"").trim())}function P(t){return String(t).replace(/<table\b[\s\S]*?<\/table>/gi,(t=>`<div class="${C}">${B(t)}</div>`))}function B(t){const e=[],s=/<th\b[^>]*>([\s\S]*?)<\/th>/gi;let r;while(null!==(r=s.exec(t)))e.push(j(r[1]));const a=t.replace(/<th\b([^>]*)>/gi,((t,e)=>/\bscope\s*=/.test(e)?t:`<th${e} scope="col">`)),i=0===e.length?a:a.replace(/<tr\b[^>]*>[\s\S]*?<\/tr>/gi,(t=>{if(/<th\b/i.test(t))return t;let s=0;return t.replace(/<td\b([^>]*)>/gi,((t,r)=>{const a=[];0!==s||/\bscope\s*=/.test(r)||a.push('scope="row"');const i=e[s]||"";return i&&!/\bdata-label\s*=/.test(r)&&a.push(`data-label="${D(i)}"`),s+=1,0===a.length?t:`<td${r} ${a.join(" ")}>`}))}));return i.replace(/<table\b([^>]*)>/i,((t,e)=>/\bclass\s*=/.test(e)?`<table${e.replace(/class=(["'])([^"']*)\1/i,((t,e,s)=>`class=${e}${s} pack-chat-table${e}`))}`:`<table class="pack-chat-table"${e}>`))}function j(t){return R(String(t).replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim())}function R(t){return String(t).replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#39;/g,"'")}function D(t){return String(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function W(t,e,s){const r=`/site/${t}/management/one-to-one/meetings/${e}`,a=new URLSearchParams;Object.keys(s).forEach((t=>{const e=s[t];null!=e&&""!==e&&a.set(t,String(e))}));const i=a.toString();return i?`${r}?${i}`:r}const F=/\/site\/(\d+)\/management\/one-to-one\/meetings\/(\d+)/,H=/\/site\/(\d+)\/management\/one-to-one\/team\/(\d+)/,z=/\/site\/(\d+)\/management\/one-to-one\/team\/?$/;let Z=null;function E(t){const e=String(t||"").replace(/&amp;/gi,"&"),s=e.indexOf("?");if(s<0)return{};const r=new URLSearchParams(e.slice(s+1)),a={};return r.forEach(((t,e)=>{""!==t&&(a[e]=t)})),a}function G(t,e,s){if(!t||"function"!==typeof t.getAttribute)return"";const r=String(t.getAttribute("data-pack-nav")||"").trim();if(r){const t=I(r,e,s);if(t&&t.href)return t.href}return String(t.getAttribute("href")||"").trim()}function Y(t,e){const s=String(t||"").split("?")[0],r=String(e||"").split("?")[0];return""!==s&&s===r}function U(t){const e=String(t||"").split("?")[0],s=F.exec(e);if(s)return{kind:"meeting",meetingId:Number(s[2]),memberGuestId:null,chatWindow:null};const r=H.exec(e);return r?{kind:"member",meetingId:null,memberGuestId:Number(r[2]),chatWindow:null}:z.test(e)?{kind:"team",meetingId:null,memberGuestId:null,chatWindow:null}:{kind:"other",meetingId:null,memberGuestId:null,chatWindow:null}}function q(t){const e=Number(t);return Number.isFinite(e)&&e>0?e:null}function K(t,e){const s=t&&t.chatWindow?String(t.chatWindow):null,r=e&&e.chatWindow?String(e.chatWindow):null;if(s)return Boolean(r)&&s===r;if(r||e&&"team"===e.kind||e&&"other"===e.kind)return!1;const a=q(t&&t.meetingId),i=q(e&&e.meetingId);if(a&&i)return a===i;const n=q(t&&t.memberGuestId),o=q(e&&e.memberGuestId);return!(!n||!o||i)&&n===o}function X(t){Z=t}function Q(){return Z}function V(){const t=Z;return Z=null,t}const J={red:"!border-red !bg-red/10 !text-red",amber:"!border-[#d97706] !bg
1-amber-50 !text-[#b45309]",green:"!border-green !bg-green/10 !text-green",blue:"!border-blue !bg-blue/10 !text-blue"},tt="pack-chat-badge inline-block w-max max-w-full shrink-0 justify-self-end whitespace-nowrap rounded-full border px-1.5 py-px text-[11px] font-semibold leading-tight align-middle",et=[{pattern:/^to complete$/i,tone:"blue"},{pattern:/^to confirm$/i,tone:"green"},{pattern:/^carried forward$/i,tone:"amber"},{pattern:/^in progress$/i,tone:"green"},{pattern:/^(finalised|finalized)$/i,tone:"red"},{pattern:/^outstanding$/i,tone:"blue"},{pattern:/^(confirmed|resolved)$/i,tone:"green"},{pattern:/^overdue$/i,tone:"red"},{pattern:/^(opened|scheduled)$/i,tone:"green"},{pattern:/^(cancelled|canceled)$/i,tone:"red"},{pattern:/^red$/i,tone:"red"},{pattern:/^amber$/i,tone:"amber"},{pattern:/^green$/i,tone:"green"}],st=/to complete|to confirm|carried forward|in progress|finalised|finalized|outstanding|confirmed|resolved|overdue|opened|scheduled|cancelled|canceled|red|amber|green/i,rt=/\b(red|amber|green)\b/gi,at=/^<(code|a|span)\b/i,it=/^<\/(code|a|span)>/i,nt=/^<span\b[^>]*\bpack-chat-badge\b/i;function ot(t,e){const s=J[e];return s?`<span class="${tt} ${s}">${t}</span>`:t}function lt(t){const e=String(t||"").trim();if(!e)return null;for(const{pattern:s,tone:r}of et)if(s.test(e))return r;return null}function ct(t){if(!t)return t;const e=String(t).replace(/<strong>([^<]*)<\/strong>/gi,((t,e)=>{const s=e.trim();if(!st.test(s))return t;const r=lt(s);if(!r)return t;const a=e.match(/^\s*/)[0],i=e.match(/\s*$/)[0];return`${a}${ot(s,r)}${i}`}));return dt(e)}function dt(t){let e=0;return t.replace(/(<[^>]+>)|([^<]+)/g,((t,s,r)=>s?(nt.test(s)||0===e&&at.test(s)?e+=1:e>0&&it.test(s)&&(e-=1),s):e>0?r:r.replace(rt,(t=>{const e=lt(t);return e?ot(t,e):t}))))}const ut=new g.Z({html:!1,linkify:!1,breaks:!0});ut.renderer.rules.link_open=function(t,e,s,r,a){const i=t[e].attrGet("href")||"";if(x(i)){const r=t[e+1],i=r&&"text"===r.type?r.content:"",n=k(i);return r&&"text"===r.type&&(r.content=n.label),t[e].attrSet("href",f),t[e].attrSet("class",v),t[e].attrSet("data-prompt",n.prompt),t[e].attrSet("role","button"),a.renderToken(t,e,s)}const n=I(i,r&&r.siteId,r&&r.meetingId);if(null===n)return r.droppedLinks=(r.droppedLinks||0)+1,"";const o=t[e+1],l=o&&"text"===o.type?o.content:"",c=n.chip||N(l)&&/^\/site\/\d+\/management\/one-to-one\/meetings\//.test(n.href);return t[e].attrSet("href",n.href),t[e].attrSet("data-pack-nav",i),t[e].attrSet("class",c?_:"pack-chat-link"),c&&t[e].attrSet("role","button"),a.renderToken(t,e,s)},ut.renderer.rules.link_close=function(t,e,s,r,a){return r.droppedLinks>0?(r.droppedLinks-=1,""):a.renderToken(t,e,s)};const ht={ALLOWED_TAGS:["p","br","strong","em","ul","ol","li","h2","h3","h4","code","hr","blockquote","table","thead","tbody","tr","th","td","caption","a","span","div"],ALLOWED_ATTR:["href","class","data-prompt","data-pack-nav","data-label","role","scope"]};function pt(t,e=null,s=null){if(null==t||""===String(t).trim())return"";const r=String(t).replace(/\r\n/g,"\n").replace(/\r/g,"\n"),a=P(w(ct(ut.render(r,{siteId:e,meetingId:s}))));return m.Z.sanitize(a,ht)}var mt=s(11459),gt=s.n(mt),ft=function(){var t=this,e=t._self._c;return t.charts.length?e("div",{staticClass:"pack-chat-charts mt-3 flex flex-col gap-3"},t._l(t.charts,(function(s){return e("div",{key:s.id,staticClass:"min-w-0"},["gst_range"===s.type?e("GstAverageRangeChart",{attrs:{averages:s.averages,heading:s.heading||""}}):"gst_rag"===s.type?e("OkrRagTrendChart",{attrs:{heading:s.heading||"GST trend",points:s.points||[],"hide-averages":!0,"rag-labels":t.gstRagLabels,"hide-x-tick-labels":!0,"hide-tooltip":!1}}):"okr_rag"===s.type?e("OkrRagTrendChart",{attrs:{heading:s.heading||"RAG trend",points:s.points||[],"assigned-on":s.assigned_on||null}}):"warm"===s.type?e("WarmCheckInShiftFeedbackChart",{attrs:{points:s.points||[],"to-date":!!s.to_date,"period-start":s.period_start||"","period-end":s.period_end||""}}):t._e()],1)})),0):t._e()},bt=[],vt=s(64183),yt=s(95926),xt=s(41128);const kt={red:"Below expected",amber:"Expected",green:"Above expected"};var wt={name:"OneToOnePackChatCharts",components:{GstAverageRangeChart:vt.Z,OkrRagTrendChart:yt.Z,WarmCheckInShiftFeedbackChart:xt.Z},props:{charts:{type:Array,default:()=>[]}},data(){return{gstRagLabels:kt}}},_t=wt,Ct=s(1001),St=(0,Ct.Z)(_t,ft,bt,!1,null,null,null),Tt=St.exports,$t={name:"OneToOnePackChatMessage",components:{OneToOnePackChatCharts:Tt},props:{message:{type:Object,required:!0},meetingId:{type:Number,default:null}},computed:{isUser(){return"user"===this.message.role},html(){return this.isUser?"":pt(this.message.text,this.$route.params.siteId,this.meetingId||this.$route.params.meetingId||null)},hasCharts(){return Array.isArray(this.message.charts)&&this.message.charts.length>0},hasSuggestions(){return!this.isUser&&Array.isArray(this.message.suggestions)&&this.message.suggestions.length>0},chartBlocks(){if(this.isUser||this.message.streaming)return[];const t=this.$route.params.siteId,e=this.meetingId||this.$route.params.meetingId||null,s=this.hasCharts?this.message.charts:[];return gt().layoutPackChatCharts(this.message.text,s).map((s=>({html:s.markdown?pt(s.markdown,t,e):"",charts:s.charts})))},suggestionChipClass(){return b},bubbleMaxClass(){return this.hasCharts&&!this.isUser?"max-w-full":"max-w-[85%]"},bubbleClass(){return this.isUser?"overflow-hidden rounded-br-md bg-primary/[.85] text-white":this.hasCharts?"overflow-visible rounded-bl-md border border-gray-200 bg-white text-[#1e201d]":"overflow-hidden rounded-bl-md border border-gray-200 bg-white text-[#1e201d]"}},methods:{onProseClick(t){const e=t.target.closest?t.target.closest("a.pack-chat-prompt"):null;if(e){t.preventDefault();const s=(e.getAttribute("data-prompt")||e.textContent||"").trim();return void(s.length>=2&&this.$emit("send-prompt",s))}const s=t.target.closest?t.target.closest('a.pack-chat-nav, a.pack-chat-link, a[href^="/site/"]'):null;if(!s)return;t.preventDefault();const r=G(s,this.$route.params.siteId,this.meetingId||this.$route.params.meetingId||null);r&&this.$emit("navigate",r)}}},Ot=$t,At=(0,Ct.Z)(Ot,h,p,!1,null,"5e956648",null),Mt=At.exports,Lt={name:"OneToOnePackChatThread",components:{OneToOnePackChatMessage:Mt},props:{messages:{type:Array,required:!0},statusText:{type:String,default:""},chatWindow:{type:String,default:null},memberName:{type:String,default:null},sending:{type:Boolean,default:!1},starters:{type:Array,default:()=>[]},meetingId:{type:Number,default:null}},computed:{emptyHint(){if("chilled_team"===this.chatWindow)return"Ask anything about the full Chilled Team — name who you mean, and ask about their packs, actions, check-ins, or trends.";if("direct_team"===this.chatWindow)return"Ask anything about your direct team — whose 1-1 is next, who still needs a meeting time, open actions, or check-ins.";const t=(0,o.K)(this.memberName);return t?`Ask anything about ${t}
1's 1-1 pack — topics discussed, action items, OKRs, or check-ins.`:"Ask anything about this team member's 1-1 pack — topics discussed, action items, OKRs, or check-ins."},visibleMessages(){return this.messages.filter((t=>this.shouldRenderMessage(t)))},starterChipClass(){return`${b} disabled:cursor-not-allowed disabled:opacity-50`}},watch:{messages:{deep:!0,handler(){this.scrollToLatest()}},statusText(){this.scrollToLatest()}},mounted(){this.scrollToLatest(!1)},methods:{shouldRenderMessage(t){return!t||"assistant"!==t.role||(""!==String(t.text||"").trim()||Array.isArray(t.charts)&&t.charts.length>0)},scrollToLatest(t=!0){this.$nextTick((()=>{const e=this.$refs.scroller;e&&e.scrollTo({top:e.scrollHeight,behavior:t&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches?"smooth":"auto"})}))}}},It=Lt,Nt=(0,Ct.Z)(It,d,u,!1,null,"032ccf56",null),Pt=Nt.exports,Bt=s(60792),jt=s(60091);const Rt="inline-flex max-w-full cursor-pointer appearance-none items-center gap-1 rounded-full border-0 px-2 py-0.5 f-cta2 leading-tight outline-none focus-visible:ring-2 focus-visible:ring-white/70",Dt={pack:{key:"pack",icon:"individual",className:`${Rt} bg-white text-primary`,tooltip:"This chat is only about this team member's 1-1 pack. Open someone else's pack, or the team assistant, to ask about them."},direct_team:{key:"direct_team",label:"My Direct Team",icon:"group",className:`${Rt} bg-green text-white`,tooltip:"This chat only covers people who report to you today. Skip-level reports and the rest of the team stay out of scope — open their pack to ask there."},chilled_team:{key:"chilled_team",label:"Owner - Full Team Access",icon:"pub",className:`${Rt} bg-blue text-white`,tooltip:"As Owner, you can ask about every active team member's 1-1 packs from this chat — not only your direct reports. Who coaches whom is unchanged."}};function Wt(t){return t?`This chat is only about ${t}'s 1-1 pack. Open someone else's pack, or the team assistant, to ask about them.`:Dt.pack.tooltip}function Ft({chatWindow:t=null,memberName:e=null}={}){if("chilled_team"===t)return(0,jt.Z)({},Dt.chilled_team);if("direct_team"===t)return(0,jt.Z)({},Dt.direct_team);const s=(0,o.K)(e)||String(e||"").trim();return(0,jt.Z)((0,jt.Z)({},Dt.pack),{},{label:s||"This pack",tooltip:Wt(s)})}s(38862);function Ht({url:t,body:e,token:s,handlers:r}){const a=new AbortController,i=String(n().defaults.baseURL||"").replace(/\/$/,""),o=n().defaults.headers.common||{},l={Accept:"text/event-stream","Content-Type":"application/json",Authorization:`Bearer ${s}`};return o["X-P2F"]&&(l["X-P2F"]=o["X-P2F"]),fetch(`${i}${t}`,{method:"POST",headers:l,body:JSON.stringify(e),signal:a.signal}).then((async t=>{if(!t.ok||!t.body){var e;const s=t.status;let a=null;try{a=(await t.json()).code||null}catch(c){}let i="The assistant is unavailable right now.";return 404===s?i="not_available"===a?"This assistant only covers your own 1-1s and your current direct team.":"session_closed"===a?"That chat session has ended — ask again to start a fresh one.":"Pack chat is not enabled for this account.":429===s&&(i="Too many questions in a row — give it a minute and try again."),void(null===(e=r.onError)||void 0===e||e.call(r,{message:i,status:s}))}const s=t.body.getReader(),a=new TextDecoder;let i="",n=!1;const o=(0,jt.Z)((0,jt.Z)({},r),{},{onDone:t=>{var e;n||(n=!0,null===(e=r.onDone)||void 0===e||e.call(r,t))},onError:t=>{var e;n||(n=!0,null===(e=r.onError)||void 0===e||e.call(r,t))}});while(1){const{done:t,value:e}=await s.read();if(t)break;i+=a.decode(e,{stream:!0});let r=i.indexOf("\n\n");while(-1!==r)zt(i.slice(0,r),o),i=i.slice(r+2),r=i.indexOf("\n\n")}var l;(i+=a.decode(),""!==i.trim()&&zt(i,o),n)||(null===(l=o.onDone)||void 0===l||l.call(o,{}))})).catch((t=>{var e;t&&"AbortError"===t.name||null===(e=r.onError)||void 0===e||e.call(r,{message:"Connection lost — please try again."})})),{abort:()=>a.abort()}}function zt(t,e){let s="message";const r=[];t.split("\n").forEach((t=>{t.startsWith("event:")?s=t.slice(6).trim():t.startsWith("data:")&&r.push(t.slice(5).trim())}));let a={};try{a=r.length?JSON.parse(r.join("\n")):{}}catch(h){return}var i;if("meta"===s)null===(i=e.onMeta)||void 0===i||i.call(e,a);else if("status"===s){var n;null===(n=e.onStatus)||void 0===n||n.call(e,a)}else if("delta"===s){var o;null===(o=e.onDelta)||void 0===o||o.call(e,a)}else if("charts"===s){var l;null===(l=e.onCharts)||void 0===l||l.call(e,a)}else if("suggestions"===s){var c;null===(c=e.onSuggestions)||void 0===c||c.call(e,a)}else if("done"===s){var d;null===(d=e.onDone)||void 0===d||d.call(e,a)}else if("error"===s){var u;null===(u=e.onError)||void 0===u||u.call(e,a)}}var Zt={name:"OneToOnePackChatPanel",components:{OneToOnePackChatThread:Pt,OneToOneSectionIcon:Bt.Z},props:{mode:{type:String,default:"lite"},docked:{type:Boolean,default:!1},memberGuestId:{type:Number,default:null},meetingId:{type:Number,default:null},memberName:{type:String,default:null},chatWindow:{type:String,default:null},footerOffset:{type:Number,default:0}}
1,data(){return{draft:"",messages:[],conversationId:null,starters:[],sending:!1,clearing:!1,statusText:"",errorText:"",historyLoaded:!1,activeStream:null,localId:0,dragging:!1,sheetSnapping:!1,dragY:0,dragStartY:0,dragPointerId:null,sheetWidth:0,snapTimer:null,expandOffset:0,startExpandOffset:0,maxSheetHeight:0,packMeetingId:null,liteSheetHeight:0,peekSheetHeight:56,scopeTipOpen:!1}},computed:{isDirectTeam(){return"direct_team"===this.chatWindow},isChilledTeam(){return"chilled_team"===this.chatWindow},isTeamWindow(){return this.isDirectTeam||this.isChilledTeam},scopeBadge(){return Ft({chatWindow:this.chatWindow,memberName:this.memberName})},composerPlaceholder(){return this.isChilledTeam?"Ask about the Chilled Team…":this.isDirectTeam?"Ask about your team…":"Ask about this pack…"},endpoint(){return`/site/${this.$route.params.siteId}/management/one-to-one/pack-chat`},resolvedMeetingId(){return this.packMeetingId||this.meetingId||null},maxTravel(){return Math.max(0,this.maxSheetHeight-this.liteSheetHeight)},slidingBehindFooter(){return this.dragY>0},sheetStyle(){const t={"--pack-chat-footer-offset":`${this.footerOffset}px`},e=this.dragging||this.sheetSnapping||this.dragY>0;return this.docked&&!e?(t.height=`${this.peekSheetHeight}px`,t):("full"!==this.mode||e||(t.height=`${this.maxSheetHeight}px`),e?(t.height=`${this.liteSheetHeight+this.expandOffset}px`,t.maxHeight=`${this.maxSheetHeight}px`,this.dragY>0&&(t.transform=`translateY(${this.dragY}px)`),this.dragging?t.transition="none":t.transition="height 180ms ease, transform 180ms ease, opacity 180ms ease",this.sheetWidth>0&&this.dragY>0&&(t.opacity=String(Math.max(.4,1-this.dragY/this.sheetWidth*.5))),t):t)}},watch:{meetingId(){this.resetForNewPack()},memberGuestId(){this.resetForNewPack()},footerOffset(){this.measureSheetBounds()},docked(){this.$nextTick((()=>this.measurePeekHeight())),this.docked&&this.hideScopeTip()},chatWindow(){this.hideScopeTip()}},mounted(){this.measureSheetBounds(),window.addEventListener("resize",this.measureSheetBounds),this._onScopeTipDocumentClick=t=>{if(!this.scopeTipOpen)return;const e=this.$refs.scopeBadgeWrap;e&&e.contains(t.target)||this.hideScopeTip()},this._onScopeTipKeydown=t=>{"Escape"===t.key&&this.hideScopeTip()},document.addEventListener("click",this._onScopeTipDocumentClick),document.addEventListener("keydown",this._onScopeTipKeydown),this.loadHistory(),this.$nextTick((()=>{!this.docked&&this.$refs.composer&&this.$refs.composer.focus()}))},beforeDestroy(){window.removeEventListener("resize",this.measureSheetBounds),document.removeEventListener("click",this._onScopeTipDocumentClick),document.removeEventListener("keydown",this._onScopeTipKeydown),this.activeStream&&this.activeStream.abort(),this.snapTimer&&window.clearTimeout(this.snapTimer)},methods:{toggleScopeTip(){this.docked&&this.$emit("set-docked",!1),this.scopeTipOpen=!this.scopeTipOpen},hideScopeTip(){this.scopeTipOpen=!1},measureSheetBounds(){const t=document.querySelector(".c-header"),e=t?t.getBoundingClientRect().bottom:0,s=window.matchMedia("(min-width: 640px)").matches,r=s?16:this.footerOffset;this.maxSheetHeight=Math.max(240,window.innerHeight-e-r),this.liteSheetHeight=s?Math.min(700,.85*window.innerHeight,this.maxSheetHeight):Math.min(.6*window.innerHeight,this.maxSheetHeight),this.measurePeekHeight()},measurePeekHeight(){const t=this.$refs.chrome,e=t?t.offsetHeight:0;this.peekSheetHeight=Math.max(52,e||56)},onSheetPointerDown(t){"mouse"===t.pointerType&&0!==t.button||t.target&&t.target.closest&&t.target.closest("button, textarea, input, a")||(this.clearSnapTimer(),this.measureSheetBounds(),this.sheetSnapping=!1,this.dragging=!1,this.dragY=0,this.dragStartY=t.clientY,this.dragPointerId=t.pointerId,this.sheetWidth=this.$el?this.$el.offsetWidth:0,this.startExpandOffset="full"===this.mode?this.maxTravel:0,this.expandOffset=this.startExpandOffset,t.currentTarget.setPointerCapture&&t.currentTarget.setPointerCapture(t.pointerId),t.preventDefault())},onSheetPointerMove(t){if(this.dragPointerId!==t.pointerId)return;const e=t.clientY-this.dragStartY;if(!this.dragging){if(Math.abs(e)<8)return;this.dragging=!0,this.hideScopeTip(),this.docked&&e<0&&this.$emit("set-docked",!1)}const s=this.startExpandOffset-e;return s>this.maxTravel?(this.expandOffset=this.maxTravel,void(this.dragY=0)):s<0?(this.expandOffset=0,void(this.dragY=-s)):(this.expandOffset=s,void(this.dragY=0))},onSheetPointerUp(t){if(this.dragPointerId===t.pointerId){if(this.releaseSheetPointer(t),!this.dragging)return this.dragY=0,void(this.expandOffset=0);if(this.dragging=!1,!this.shouldDismissSheet())return this.shouldExpandSheet()?(this.$emit("set-mode","full"),this.expandOffset=0,void(this.dragY=0)):this.shouldCollapseSheet()?(this.$emit("set-mode","lite"),this.expandOffset=0,void(this.dragY=0)):void this.snapSheetBack();this.$emit("close")}},onSheetPointerCancel(t){this.dragPointerId===t.pointerId&&(this.releaseSheetPointer(t),this.dragging=!1,this.snapSheetBack())},releaseSheetPointer(t){const e=t.currentTarget;e&&e.hasPointerCapture&&e.hasPointerCapture(t.pointerId)&&e.releasePointerCapture(t.pointerId),this.dragPointerId=null},shouldDismissSheet(){return this.sheetWidth>0&&this.dragY>this.sheetWidth/2},shouldExpandSheet(){return"lite"===this.mode&&this.maxTravel>0&&this.expandOffset>=this.maxTravel/2},shouldCollapseSheet(){return"full"===this.mode&&this.maxTravel>0&&this.expandOffset<=this.maxTravel/2},snapSheetBack(){const t="full"===this.mode?this.maxTravel:0;return 0===this.dragY&&this.expandOffset===t?(this.sheetSnapping=!1,void(this.expandOffset=0)):window.matchMedia("(prefers-reduced-motion: reduce)").matches?(this.dragY=0,this.expandOffset=0,void(this.sheetSnapping=!1)):(this.sheetSnapping=!0,this.$nextTick((()=>{this.dragY=0,this.expandOffset=t})),this.clearSnapTimer(),void(this.snapTimer=window.setTimeout((()=>{this.sheetSnapping=!1,this.expandOffset=0,this.snapTimer=null}),200)))},clearSnapTimer(){this.snapTimer&&(window.clearTimeout(this.snapTimer),this.snapTimer=null)},resetForNewPack(){this.activeStream&&(this.activeStream.abort(),this.activeStream=null),this.messages=[],this.conversationId=null,this.starters=[],this.draft="",this.sending=!1,this.statusText="",this.errorText="",this.historyLoaded=!1,this.packMeetingId=null,this.hideScopeTip(),this.loadHistory()},loadHistory(){if(this.historyLoaded)return;if(!this.meetingId&&!this.memberGuestId&&!this.isTeamWindow)return void(this.historyLoaded=!0);const t={};this.meetingId&&(t.meeting_id=this.meetingId),this.memberGuestId&&(t.member_guest_id=this.memberGuestId),this.isTeamWindow&&(t.window=this.chatWindow),n().get(`${this.endpoint}/conversation`,{params:t,skipInactiveAccount403:!0}).then((t=>{this.conversationId=t.data.conversation_id||null,this.starters=Array.isArray(t.data.starters)?t.data.starters:[];const e=Number(t.data.meeting_id);this.packMeetingId=Number.isFinite(e)&&e>0?e:null;const s=t.data.turns||[];
1s.forEach((t=>{this.messages.push({id:`h-${t.id}-u`,role:"user",text:t.prompt}),this.messages.push({id:`h-${t.id}-a`,role:"assistant",text:t.response,streaming:!1,charts:Array.isArray(t.charts)?t.charts:[]})}))})).catch((()=>{})).finally((()=>{this.historyLoaded=!0}))},send(){const t=this.draft.trim();this.sending||t.length<2||(this.draft="",this.dispatchPrompt(t))},sendSuggestedPrompt(t){const e=t&&"object"===typeof t?t:{prompt:t},s=String(e.prompt||"").trim().slice(0,2e3);s.length<2||(this.sending&&this.abandonInFlightTurn(),this.dispatchPrompt(s,e.key||null))},abandonInFlightTurn(){const t=this.activeStream;this.activeStream=null,t&&t.abort&&t.abort();const e=this.messages[this.messages.length-1];e&&"assistant"===e.role?this.finishTurn(e):(this.sending=!1,this.statusText="")},dispatchPrompt(t,e=null){this.errorText="",this.sending=!0,this.messages.push({id:"u-"+ ++this.localId,role:"user",text:t});const s={id:"a-"+ ++this.localId,role:"assistant",text:"",streaming:!0,charts:[],suggestions:[]};this.messages.push(s),this.statusText="Thinking…";const r=Ht({url:`${this.endpoint}/turns`,token:this.$store.getters.access_token,body:{prompt:t,conversation_id:this.conversationId,member_guest_id:this.memberGuestId,meeting_id:this.meetingId,window:this.isTeamWindow?this.chatWindow:null,suggestion_key:e},handlers:{onMeta:t=>{this.conversationId=t.conversation_id||this.conversationId},onStatus:t=>{this.statusText=t.text||""},onDelta:t=>{this.statusText="",s.text+=t.text||""},onCharts:t=>{s.charts=Array.isArray(t.charts)?t.charts:[]},onSuggestions:t=>{s.suggestions=Array.isArray(t.suggestions)?t.suggestions:[]},onDone:()=>{this.activeStream===r&&this.finishTurn(s)},onError:t=>{this.activeStream===r&&(this.finishTurn(s),this.errorText=t&&t.message||"Something went wrong — please try again.")}}});this.activeStream=r},clearChat(){this.sending||this.clearing||(this.clearing=!0,this.errorText="",n()["delete"](`${this.endpoint}/conversation`,{skipInactiveAccount403:!0}).then((()=>{this.messages=[],this.conversationId=null,this.statusText="",this.$nextTick((()=>this.$refs.composer&&this.$refs.composer.focus()))})).catch((()=>{this.errorText="Could not clear the chat — please try again."})).finally((()=>{this.clearing=!1})))},finishTurn(t){t.streaming=!1,this.statusText="",this.sending=!1,this.activeStream=null;const e=Array.isArray(t.charts)&&t.charts.length>0;if(""===t.text&&!e){const e=this.messages.indexOf(t);-1!==e&&this.messages.splice(e,1)}this.$nextTick((()=>this.$refs.composer&&this.$refs.composer.focus()))}}},Et=Zt,Gt=(0,Ct.Z)(Et,l,c,!1,null,null,null),Yt=Gt.exports,Ut={name:"OneToOnePackChatFab",components:{OneToOnePackChatPanel:Yt},props:{memberGuestId:{type:Number,default:null},meetingId:{type:Number,default:null},memberName:{type:String,default:null},about:{type:String,default:null},label:{type:String,default:null},chatWindow:{type:String,default:null}},watch:{meetingId(t,e){t!==e&&(null!=e||null==t?this.endSession():this.tryRestoreCarry())},memberGuestId(t,e){t!==e&&(null!=e||null==t?this.endSession():this.tryRestoreCarry())}},data(){return{open:!1,docked:!1,mode:"lite",keepSessionOnDestroy:!1,navOffset:66,navObserver:null,navFinder:null}},computed:{askLabel(){return(0,o.n)({memberName:this.memberName,about:this.about,label:this.label})},packChatAvailable(){return!0===this.$store.getters.showLab||!0===this.$store.getters.moduleActive("app.management.oneToOneMeetings.packChat")}},mounted(){this.syncNavOffset(),this.observeNav(),this.tryRestoreCarry()},beforeDestroy(){this.teardownNavObserver(),this.keepSessionOnDestroy||(this.meetingId||this.memberGuestId||this.chatWindow)&&this.endSession()},methods:{pageScope(){return{meetingId:this.meetingId,memberGuestId:this.memberGuestId,chatWindow:this.chatWindow}},close(){this.open=!1,this.docked=!1,this.mode="lite"},dockSheet(){this.open=!0,this.docked=!0,this.mode="lite"},onNavigate(t){const e=String(t||"").trim();if(!e)return;const s=U(e),r=this.$route&&this.$route.path;return Y(r,e)?(this.dockSheet(),void this.$nextTick((()=>{this.$emit("focus-replay",E(e))}))):K(this.pageScope(),s)?(this.keepSessionOnDestroy=!0,X({destination:s,from:this.pageScope()}),this.dockSheet(),void this.$nextTick((()=>{this.$router.replace(e).catch((()=>{V(),this.keepSessionOnDestroy=!1}))}
1))):(this.close(),void this.$nextTick((()=>{this.$router.replace(e).catch((()=>{}))})))},tryRestoreCarry(){const t=Q();if(t)if(K(this.pageScope(),t.destination)){if(t.destination&&"member"===t.destination.kind&&t.from){const e=Number(t.from.meetingId),s=Number(this.meetingId);if(!s)return;if(e&&e!==s)return V(),void this.endSession()}V(),this.keepSessionOnDestroy=!1,this.dockSheet()}else this.canRejectCarry(t)&&V()},canRejectCarry(t){const e=t&&t.destination;return!e||(!("meeting"!==e.kind||!this.meetingId)||(!("member"!==e.kind||!this.memberGuestId||!this.meetingId)||!("team"!==e.kind&&!e.chatWindow)&&Boolean(this.chatWindow)))},endSession(){this.open=!1,this.docked=!1,this.mode="lite";const t=this.$route&&this.$route.params?this.$route.params.siteId:null;t&&n()["delete"](`/site/${t}/management/one-to-one/pack-chat/conversation`,{skipInactiveAccount403:!0}).catch((()=>{}))},syncNavOffset(){const t=document.querySelector(".c-nav");this.navOffset=t?t.offsetHeight:66},observeNav(){this.bindNav()||("undefined"!==typeof MutationObserver?(this.navFinder=new MutationObserver((()=>{this.bindNav()&&this.navFinder&&(this.navFinder.disconnect(),this.navFinder=null)})),this.navFinder.observe(document.body,{childList:!0,subtree:!0})):this.$nextTick(this.bindNav))},bindNav(){const t=document.querySelector(".c-nav");return!!t&&(this.syncNavOffset(),!!this.navObserver||("undefined"===typeof ResizeObserver?(window.addEventListener("resize",this.syncNavOffset),!0):(this.navObserver=new ResizeObserver((()=>this.syncNavOffset())),this.navObserver.observe(t),!0)))},teardownNavObserver(){this.navFinder&&(this.navFinder.disconnect(),this.navFinder=null),this.navObserver&&(this.navObserver.disconnect(),this.navObserver=null),window.removeEventListener("resize",this.syncNavOffset)}}},qt=Ut,Kt=(0,Ct.Z)(qt,r,a,!1,null,"667406b8",null),Xt=Kt.exports},60792:function(t,e,s){"use strict";s.d(e,{Z:function(){return c}});var r=function(){var t=this,e=t._self._c;return e("svg",{class:[t.sizeClass,"flex-none"],attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}},["warm_check_in"===t.resolvedType?e("g",[e("circle",{attrs:{cx:"12",cy:"12",r:"4"}}),e("path",{attrs:{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"}})]):"journal"===t.resolvedType?e("g",[e("path",{attrs:{d:"M4 19.5A2.5 2.5 0 0 1 6.5 17H20"}}),e("path",{attrs:{d:"M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"}}),e("path",{attrs:{d:"M8 7h8M8 11h8"}})]):"okr_review"===t.resolvedType?e("g",[e("circle",{attrs:{cx:"12",cy:"12",r:"10"}}),e("circle",{attrs:{cx:"12",cy:"12",r:"6"}}),e("circle",{attrs:{cx:"12",cy:"12",r:"2"}})]):"gst"===t.resolvedType?e("g",[e("path",{attrs:{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"}})]):"discussion"===t.resolvedType?e("g",[e("path",{attrs:{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"}})]):"feedback_for_coach"===t.resolvedType?e("g",[e("path",{attrs:{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"}})]):"action_items"===t.resolvedType?e("g",[e("path",{attrs:{d:"M9 11l3 3L22 4"}}),e("path",{attrs:{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"}})]):"next_meeting"===t.resolvedType?e("g",[e("rect",{attrs:{x:"3",y:"4",width:"18",height:"18",rx:"2"}}),e("path",{attrs:{d:"M16 2v4M8 2v4M3 10h18"}})]):"agenda"===t.resolvedType?e("g",[e("rect",{attrs:{x:"8",y:"2",width:"8",height:"4",rx:"1"}}),e("path",{attrs:{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-2"}}),e("path",{attrs:{d:"M9 12h6M9 16h4"}})]):"individual"===t.resolvedType?e("g",[e("path",{attrs:{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}}),e("circle",{attrs:{cx:"12",cy:"7",r:"4"}})]):"group"===t.resolvedType?e("g",[e("path",{attrs:{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}}),e("circle",{attrs:{cx:"9",cy:"7",r:"4"}}),e("path",{attrs:{d:"M22 21v-2a4 4 0 0 0-3-3.87"}}),e("path",{attrs:{d:"M16 3.13a4 4 0 0 1 0 7.75"}})]):"pub"===t.resolvedType||"sites"===t.resolvedType?e("g",[e("path",{attrs:{d:"M3 21h18"}}),e("path",{attrs:{d:"M5 21V8l7-5 7 5v13"}}),e("path",{attrs:{d:"M9 21v-6h6v6"}}),e("path",{attrs:{d:"M9 10h.01M15 10h.01"}})]):"department"===t.resolvedType||"departments"===t.resolvedType?e("g",[e("path",{attrs:{d:"M12 2L2 7l10 5 10-5-10-5z"}}),e("path",{attrs:{d:"M2 12l10 5 10-5"}}),e("path",{attrs:{d:"M2 17l10 5 10-5"}})]):"job_title"===t.resolvedType||"job_titles"===t.resolvedType?e("g",[e("rect",{attrs:{x:"2",y:"7",width:"20",height:"14",rx:"2"}}),e("path",{attrs:{d:"M16 7V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2"}}),e("path",{attrs:{d:"M2 13h20"}})]):e("g",[e("circle",{attrs:{cx:"12",cy:"12",r:"10"}})])])},a=[],i=(s(73210),{name:"OneToOneSectionIcon",props:{type:{type:String,default:""},sectionKey:{type:String,default:""},sizeClass:{type:String,default:"h-4 w-4"}},computed:{resolvedType(){return(this.type||this.sectionKey||"").trim()}}}),n=i,o=s(1001),l=(0,o.Z)(n,r,a,!1,null,null,null),c=l.exports},71206:function(t,e,s){"use strict";s.d(e,{Z:function(){return d}});var r=function(){var t=this,e=t._self._c;return e("div",[e("transition",{attrs:{name:"ti-detail-fade"}},[t.open?e("div",{staticClass:"ti-detail-overlay fixed inset-x-0 z-[1100] flex items-center justify-center bg-black/40 px-4",style:t.overlayStyle,attrs:{role:"presentation"},on:{click:function(e){return e.target!==e.currentTarget?null:t.close.apply(null,arguments)}}},[e("transition",{attrs:{name:"ti-detail-panel",appear:""}},[t.open?e("div",{staticClass:"ti-detail-panel flex max-h-full w-full max-w-md flex-col gap-2 rounded-xl border-2 border-primary bg-offcream p-3 shadow-lg",attrs:{role:"dialog","aria-modal":"true","aria-label":"Assess "+t.stageName},on:{click:function(t){t.stopPropagation()}}},[e("div",{staticClass:"flex items-start justify-between gap-2"},[e("h2",{staticClass:"f-cta1 text-primary m-0"},[t._v("Assess: "+t._s(t.stageName))]),e("button",{staticClass:"font-bold text-primary",attrs:{type:"button","aria-label":"Close"},on:{click:t.close}},[t._v("✕")])]),e("div",{staticClass:"flex flex-col gap-1"},[t.assessmentTypeLabel?e("div",[e("p",{staticClass:"f-b3 m-0 mb-1"},[t._v("Assessment type")]),e("p",{staticClass:"f-cta2 m-0 text-primary"}
1,[t._v(t._s(t.assessmentTypeLabel))])]):t._e(),e("div",[e("p",{staticClass:"f-b3 m-0 mb-1"},[t._v("Outcome")]),e("div",{staticClass:"ti-outcome-choices",attrs:{role:"radiogroup","aria-label":"Outcome"}},[e("div",{staticClass:"ti-outcome-choices__list"},[e("label",{staticClass:"ti-outcome-choices__lozenge ti-outcome-choices__lozenge--pass"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.outcome,expression:"form.outcome"}],staticClass:"ti-outcome-choices__input",attrs:{type:"radio",name:"ti-assess-outcome",value:"passed"},domProps:{checked:t._q(t.form.outcome,"passed")},on:{change:function(e){return t.$set(t.form,"outcome","passed")}}}),e("span",{staticClass:"f-cta2"},[t._v("Pass")])]),e("label",{staticClass:"ti-outcome-choices__lozenge ti-outcome-choices__lozenge--fail"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.outcome,expression:"form.outcome"}],staticClass:"ti-outcome-choices__input",attrs:{type:"radio",name:"ti-assess-outcome",value:"failed"},domProps:{checked:t._q(t.form.outcome,"failed")},on:{change:function(e){return t.$set(t.form,"outcome","failed")}}}),e("span",{staticClass:"f-cta2"},[t._v("Fail")])])])])]),e("div",[e("p",{staticClass:"f-b3 m-0 mb-1"},[t._v("Notes "+t._s(t.notesRequired?"(required)":"(optional)"))]),e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.form.notes,expression:"form.notes"}],staticClass:"w-full rounded-lg border border-primary px-3 py-1.5",attrs:{rows:"2"},domProps:{value:t.form.notes},on:{input:function(e){e.target.composing||t.$set(t.form,"notes",e.target.value)}}})])]),e("div",{staticClass:"flex gap-2"},[e("button",{staticClass:"flex-1 rounded-lg border border-gray-300 px-3 py-2",attrs:{type:"button"},on:{click:t.close}},[t._v("Cancel")]),e("button",{staticClass:"flex-1 rounded-lg border border-primary bg-primary px-3 py-2 text-white font-semibold disabled:cursor-not-allowed disabled:opacity-60",attrs:{type:"button",disabled:!t.canSubmit},on:{click:t.submit}},[t._v(" "+t._s(t.saving?"Saving…":"Submit")+" ")])])]):t._e()])],1):t._e()])],1)},a=[],i=s(60091),n=(s(73210),{name:"TeamInductionAssessModal",props:{open:{type:Boolean,default:!1},stageName:{type:String,default:""},assessmentType:{type:String,default:""},assessmentLabel:{type:String,default:""},criteria:{type:Array,default:()=>[]},assessorGuestId:{type:[Number,String],default:null},assessorName:{type:String,default:""},saving:{type:Boolean,default:!1}},data(){return{form:{type:"",outcome:"",notes:"",assessor_guest_id:null}}},computed:{assessmentTypeLabel(){return this.assessmentLabel?this.assessmentLabel:this.assessmentType?this.assessmentType.charAt(0).toUpperCase()+this.assessmentType.slice(1)+" Assessment":""},notesRequired(){return"failed"===this.form.outcome},canSubmit(){return!(this.saving||!this.form.type||!this.form.outcome||!this.form.assessor_guest_id)&&!(this.notesRequired&&!this.form.notes.trim())},overlayStyle(){return{top:"calc(61px + env(safe-area-inset-top, 0px))",bottom:"calc(66px + env(safe-area-inset-bottom, 0px))"}}},watch:{open(t){this.setBodyScroll(t),t&&this.resetForm()},assessmentType(){this.open&&this.resetForm()},assessorGuestId(){this.open&&this.resetForm()}},mounted(){document.body.appendChild(this.$el),this.open&&this.setBodyScroll(!0)},beforeDestroy(){this.setBodyScroll(!1),this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)},methods:{setBodyScroll(t){document.body.style.overflow=t?"hidden":""},resetForm(){this.form={type:this.assessmentType||"",outcome:"",notes:"",assessor_guest_id:this.assessorGuestId?Number(this.assessorGuestId):null}},close(){this.resetForm(),this.$emit("close")},submit(){this.canSubmit&&this.$emit("submit",(0,i.Z)({},this.form))}}}),o=n,l=s(1001),c=(0,l.Z)(o,r,a,!1,null,"7ac084b0",null),d=c.exports},98386:function(t,e,s){"use strict";s.d(e,{Z:function(){return u}});s(33948);var r=function(){var t=this,e=t._self._c;return e("div",[e("transition",{attrs:{name:"ti-detail-fade"}},[t.open?e("div",{staticClass:"ti-detail-overlay fixed inset-x-0 z-[1100] flex items-center justify-center bg-black/40 px-4",style:t.overlayStyle,attrs:{role:"presentation"},on:{click:function(e){return e.target!==e.currentTarget?null:t.$emit("close")}}},[e("transition",{attrs:{name:"ti-detail-panel",appear:""}},[t.open?e("div",{staticClass:"ti-detail-panel flex max-h-full w-full max-w-md flex-col rounded-xl border-2 border-primary bg-offcream p-4 shadow-lg",attrs:{role:"dialog","aria-modal":"true","aria-label":t.criterionLabel+" history"},on:{click:function(t){t.stopPropagation()}}},[e("div",{staticClass:"mb-3 flex items-start justify-between gap-3"},[e("div",{staticClass:"min-w-0"},[e("h2",{staticClass:"f-h1 m-0 text-lg text-primary"},[t._v(t._s(t.criterionLabel)+" History")]),t.stageName?e("p",{staticClass:"f-cta2 m-0 mt-0.5 text-primary"},[t._v(t._s(t.stageName))]):t._e()]),e("button",{staticClass:"font-bold text-primary",attrs:{type:"button","aria-label":"Close"},on:{click:function(e){return t.$emit("close")}}},[t._v("✕")])]),t.entries.length?e("ul",{staticClass:"m-0 flex list-none flex-col gap-2 overflow-y-auto p-0"},t._l(t.entries,(function(s,r){return e("li",{key:r,staticClass:"rounded-lg border px-3 py-2",class:t.entryRowClass(s.outcome)},[e("div",{staticClass:"flex flex-col gap-0.5 leading-tight"},[e("p",{staticClass:"m-0 flex flex-wrap items-center gap-x-1.5 gap-y-0.5 text-[11px]"},[e("span",{staticClass:"text-[10px] font-bold uppercase tracking-wide opacity-75"},[t._v("Outcome")]),e("span",{staticClass:"inline-flex rounded-full border px-2 py-0.5 text-[10px] font-normal uppercase tracking-wide",class:t.outcomeBadgeClass(s.outcome)},[t._v(" "+t._s(t.outcomeLabel(s.outcome))+" ")])]),t.assessedAtLabel(s.assessed_at)?e("p",{staticClass:"m-0 text-[11px]"},[e("span",{staticClass:"text-[10px] font-bold uppercase tracking-wide opacity-75"},[t._v("Date ")]),e("span",{staticClass:"font-normal"}
1,[t._v(t._s(t.assessedAtLabel(s.assessed_at)))])]):t._e(),s.assessed_by_name&&!t.isSelfAssessment?e("p",{staticClass:"m-0 text-[11px]"},[e("span",{staticClass:"text-[10px] font-bold uppercase tracking-wide opacity-75"},[t._v("Assessor ")]),e("span",{staticClass:"font-normal"},[t._v(t._s(s.assessed_by_name))])]):t._e(),t.isSelfAssessment?e("p",{staticClass:"m-0 text-[11px]"},[e("span",{staticClass:"text-[10px] font-bold uppercase tracking-wide opacity-75"},[t._v("Self Assessed ")]),e("span",{staticClass:"font-normal"},[t._v(t._s(t.memberName||s.assessed_by_name))])]):t._e(),t.scoreLabel(s)?e("p",{staticClass:"m-0 text-[11px]"},[e("span",{staticClass:"text-[10px] font-bold uppercase tracking-wide opacity-75"},[t._v("Score ")]),e("span",{staticClass:"font-normal"},[t._v(t._s(t.scoreLabel(s)))])]):t._e(),t.masteryLabel(s)?e("p",{staticClass:"m-0 text-[11px]"},[e("span",{staticClass:"text-[10px] font-bold uppercase tracking-wide opacity-75"},[t._v("Pass mark ")]),e("span",{staticClass:"font-normal"},[t._v(t._s(t.masteryLabel(s)))])]):t._e(),s.lesson_status?e("p",{staticClass:"m-0 text-[11px]"},[e("span",{staticClass:"text-[10px] font-bold uppercase tracking-wide opacity-75"},[t._v("SCORM status ")]),e("span",{staticClass:"font-normal"},[t._v(t._s(s.lesson_status))])]):t._e(),s.notes?e("div",{staticClass:"text-[11px]"},[e("p",{staticClass:"m-0 text-[10px] font-bold uppercase tracking-wide opacity-75"},[t._v("Notes")]),e("p",{staticClass:"m-0 mt-0.5 font-normal"},[t._v(t._s(s.notes))])]):t._e()])])})),0):e("p",{staticClass:"f-b3 m-0 text-gray-600"},[t._v("No assessment attempts recorded yet.")])]):t._e()])],1):t._e()])],1)},a=[],i=s(30381),n=s.n(i),o={name:"TeamInductionAssessmentHistoryModal",props:{open:{type:Boolean,default:!1},criterionLabel:{type:String,default:""},criterionType:{type:String,default:""},stageName:{type:String,default:""},memberName:{type:String,default:""},history:{type:Array,default:()=>[]}},computed:{entries(){return this.history||[]},isSelfAssessment(){return"declaration"===this.criterionType||"scorm"===this.criterionType||"quiz"===this.criterionType},overlayStyle(){return{top:"calc(61px + env(safe-area-inset-top, 0px))",bottom:"calc(66px + env(safe-area-inset-bottom, 0px))"}}},watch:{open(t){this.setBodyScroll(t)}},mounted(){document.body.appendChild(this.$el),this.open&&this.setBodyScroll(!0)},beforeDestroy(){this.setBodyScroll(!1),this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)},methods:{setBodyScroll(t){document.body.style.overflow=t?"hidden":""},assessedAtLabel(t){return t?n()(t).format("DD/MM/YY HH:mm"):""},formatNumber(t){if(null===t||void 0===t||""===t)return"";const e=Number(t);return Number.isNaN(e)?String(t):String(e)},scoreLabel(t){return t?null!==t.score_percentage&&void 0!==t.score_percentage?`${this.formatNumber(t.score_percentage)}%`:null!==t.score_raw&&void 0!==t.score_raw?this.formatNumber(t.score_raw):"":""},masteryLabel(t){return t&&null!==t.mastery_score&&void 0!==t.mastery_score?null!==t.score_percentage&&void 0!==t.score_percentage?`${this.formatNumber(t.mastery_score)}%`:this.formatNumber(t.mastery_score):""},outcomeLabel(t){return"passed"===t?"Passed":"Failed"},entryRowClass(t){return"passed"===t?"border-green bg-green/10 text-green":"border-red bg-red/10 text-red"},outcomeBadgeClass(t){return"passed"===t?"border-green bg-green/10 text-green":"border-red bg-red/10 text-red"}}},l=o,c=s(1001),d=(0,c.Z)(l,r,a,!1,null,"63bb270c",null),u=d.exports}}]);

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.