@xapp/form-widget 1.105.1 → 1.105.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -317,6 +317,6 @@ function(e){var t=Lb.default,n=$b.default;Object.defineProperty(e,"__esModule",{
317
317
  &::after {
318
318
  animation: ${zJ} 2s linear 0.5s infinite;
319
319
  }
320
- `:null,WJ=(0,RJ.styled)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!1!==n.animation&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})((0,$J.default)(({theme:e})=>{const t=(0,NJ.unstable_getUnit)(e.shape.borderRadius)||"px",n=(0,NJ.unstable_toUnitless)(e.shape.borderRadius);return{display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:e.alpha(e.palette.text.primary,"light"===e.palette.mode?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${n}${t}/${Math.round(n/.6*10)/10}${t}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:({ownerState:e})=>e.hasChildren,style:{"& > *":{visibility:"hidden"}}},{props:({ownerState:e})=>e.hasChildren&&!e.width,style:{maxWidth:"fit-content"}},{props:({ownerState:e})=>e.hasChildren&&!e.height,style:{height:"auto"}},{props:{animation:"pulse"},style:VJ||{animation:`${LJ} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient(\n 90deg,\n transparent,\n ${(e.vars||e).palette.action.hover},\n transparent\n )`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:BJ||{"&::after":{animation:`${zJ} 2s linear 0.5s infinite`}}}]}})),UJ=CJ.forwardRef(function(e,t){const n=(0,IJ.useDefaultProps)({props:e,name:"MuiSkeleton"}),{animation:r="pulse",className:o,component:a="span",height:i,style:s,variant:l="text",width:u,...c}=n,d={...n,animation:r,component:a,variant:l,hasChildren:Boolean(c.children)},p=(e=>{const{classes:t,variant:n,animation:r,hasChildren:o,width:a,height:i}=e,s={root:["root",n,r,o&&"withChildren",o&&!a&&"fitContent",o&&!i&&"heightAuto"]};return(0,DJ.default)(s,FJ.getSkeletonUtilityClass,t)})(d);return(0,AJ.jsx)(WJ,{as:a,ref:t,className:(0,MJ.default)(p.root,o),ownerState:d,...c,style:{width:u,height:i,...s}})});"production"!==process.env.NODE_ENV&&(UJ.propTypes={animation:EJ.default.oneOf(["pulse","wave",!1]),children:EJ.default.node,classes:EJ.default.object,className:EJ.default.string,component:EJ.default.elementType,height:EJ.default.oneOfType([EJ.default.number,EJ.default.string]),style:EJ.default.object,sx:EJ.default.oneOfType([EJ.default.arrayOf(EJ.default.oneOfType([EJ.default.func,EJ.default.object,EJ.default.bool])),EJ.default.func,EJ.default.object]),variant:EJ.default.oneOfType([EJ.default.oneOf(["circular","rectangular","rounded","text"]),EJ.default.string]),width:EJ.default.oneOfType([EJ.default.number,EJ.default.string])}),_J.default=UJ,function(e){var t=Gb.default,n=Xb.default;Object.defineProperty(e,"__esModule",{value:!0});var r={skeletonClasses:!0};Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"skeletonClasses",{enumerable:!0,get:function(){return a.default}});var o=n(_J),a=t(wJ);Object.keys(a).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(r,t)||t in e&&e[t]===a[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}}))})}(xJ);var HJ={};Object.defineProperty(HJ,"__esModule",{value:!0}),HJ.getDayCalendarSkeletonUtilityClass=HJ.dayCalendarSkeletonClasses=void 0;var YJ=q$;HJ.getDayCalendarSkeletonUtilityClass=e=>(0,YJ.unstable_generateUtilityClass)("MuiDayCalendarSkeleton",e),HJ.dayCalendarSkeletonClasses=(0,YJ.unstable_generateUtilityClasses)("MuiDayCalendarSkeleton",["root","week","daySkeleton"]);var qJ=$b.default,GJ=Lb.default;Object.defineProperty(vJ,"__esModule",{value:!0}),vJ.DayCalendarSkeleton=d0;var KJ=qJ(Vb),XJ=qJ(Wb);GJ(t);var ZJ=qJ(St),QJ=qJ(lk),JJ=qJ(xJ),e0=Ub,t0=qJ(EA),n0=MU,r0=HJ,o0=e;const a0=["className"],i0=e=>{const{classes:t}=e;return(0,t0.default)({root:["root"],week:["week"],daySkeleton:["daySkeleton"]},r0.getDayCalendarSkeletonUtilityClass,t)},s0=(0,e0.styled)("div",{name:"MuiDayCalendarSkeleton",slot:"Root",overridesResolver:(e,t)=>t.root})({alignSelf:"start"}),l0=(0,e0.styled)("div",{name:"MuiDayCalendarSkeleton",slot:"Week",overridesResolver:(e,t)=>t.week})({margin:`${n0.DAY_MARGIN}px 0`,display:"flex",justifyContent:"center"}),u0=(0,e0.styled)(JJ.default,{name:"MuiDayCalendarSkeleton",slot:"DaySkeleton",overridesResolver:(e,t)=>t.daySkeleton})({margin:`0 ${n0.DAY_MARGIN}px`,variants:[{props:{day:0},style:{visibility:"hidden"}}]}),c0=[[0,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,0,0,0]];function d0(e){const t=(0,e0.useThemeProps)({props:e,name:"MuiDayCalendarSkeleton"}),{className:n}=t,r=(0,XJ.default)(t,a0),o=i0(r);return(0,o0.jsx)(s0,(0,KJ.default)({className:(0,QJ.default)(o.root,n)},r,{children:c0.map((e,t)=>(0,o0.jsx)(l0,{className:o.week,children:e.map((e,t)=>(0,o0.jsx)(u0,{variant:"circular",width:n0.DAY_SIZE,height:n0.DAY_SIZE,className:o.daySkeleton,ownerState:{day:e}},t))},t))}))}function p0(e){if(e){var t=e.split(",").map(function(e){return e.trim()}).filter(function(e){return!!e});return t.length>0?t:void 0}}function f0(e,t){if(!t||0===t.length)return!1;var n=e.format("YYYY-MM-DD"),r=e.format("dddd");return t.some(function(e){return m0(n,e)||m0(r,e)})}function m0(e,t){var n=t.split("*").map(h0).join(".*");return new RegExp("^".concat(n,"$")).test(e)}function h0(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function y0(e,t){return Array.isArray(t.availableDays)&&t.availableDays.length>0?t.availableDays.map(function(e){return e.toLowerCase()}).includes(e.format("dddd").toLowerCase()):0!==e.day()&&6!==e.day()}"production"!==process.env.NODE_ENV&&(d0.propTypes={classes:ZJ.default.object,sx:ZJ.default.oneOfType([ZJ.default.arrayOf(ZJ.default.oneOfType([ZJ.default.func,ZJ.default.object,ZJ.default.bool])),ZJ.default.func,ZJ.default.object])}),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DayCalendarSkeleton",{enumerable:!0,get:function(){return t.DayCalendarSkeleton}}),Object.defineProperty(e,"dayCalendarSkeletonClasses",{enumerable:!0,get:function(){return n.dayCalendarSkeletonClasses}}),Object.defineProperty(e,"getDayCalendarSkeletonUtilityClass",{enumerable:!0,get:function(){return n.getDayCalendarSkeletonUtilityClass}});var t=vJ,n=HJ}(bJ);var g0="FormFieldDate-module_xapp_date_picker_container__d8LYB",b0="FormFieldDate-module_xapp_date_picker__Rvtj1",v0="FormFieldDate-module_xapp_date_picker_past__ECo-S",x0="FormFieldDate-module_xapp_date_picker_available__2Xtlu";te("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n.FormFieldDate-module_xapp_date_picker_container__d8LYB {\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n font-family: var(--xapp-form-widget-date-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n}\n\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiDayCalendar-weekDayLabel {\n width: 30px !important;\n height: 32px !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersCalendarHeader-root {\n margin-top: 10px !important;\n margin-bottom: 4px !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiDayCalendar-slideTransition {\n min-height: 200px !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersArrowSwitcher-button {\n color: rgba(0, 0, 0, 0.54) !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersArrowSwitcher-button:hover {\n background-image: unset !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersArrowSwitcher-button:focus {\n background-image: unset !important;\n outline: unset !important;\n border: 0 !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersDay-root.MuiButtonBase-root:hover {\n background-image: unset !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersDay-root.MuiButtonBase-root:focus {\n background-image: unset !important;\n outline: unset !important;\n border: 0 !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersDay-root {\n padding: 0px !important;\n font-family: inherit !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersDay-root.Mui-selected {\n color: #fff !important;\n background-color: #1976d2 !important;\n font-weight: 600 !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersDay-today {\n font-weight: bold !important;\n color: #321aa3 !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersDay-dayWithMargin {\n width: 30px !important;\n height: 30px !important;\n font-weight: 600 !important;\n font-size: 0.75rem !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersDay-dayWithMargin:hover {\n background-image: unset !important;\n background-color: #cfd8da !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersDay-dayWithMargin:focus {\n background-image: unset !important;\n background-color: #1976d2 !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersDay-dayWithMargin.Mui-disabled {\n font-weight: 300 !important;\n text-decoration: line-through !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_past__ECo-S {\n background-color: rgba(48, 49, 53, 0.2392156863) !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_available__2Xtlu {\n background-color: rgba(0, 255, 21, 0.1607843137) !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_blocked__e-aNY {\n background-color: rgba(175, 177, 182, 0.2392156863) !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiDayCalendar-weekDayLabel {\n font-weight: 600 !important;\n font-size: 0.75rem !important;\n}\n\n/* Mobile: 44x44 tappable day cells.\n *\n * Date selection is the most expensive mis-tap in this funnel - the visitor either books the\n * wrong day or gives up - and MUI ships 36x36 cells (30x30 once the rules above apply). Both\n * are under the 44x44 that Apple's HIG and WCAG 2.5.8 ask for.\n *\n * `:global(...)` rather than the bare MUI class names used above, and that difference is not\n * cosmetic. The two builds treat this file differently: rollup's postcss-modules is\n * configured with a `generateScopedName` that returns every name unchanged, so the plain\n * selectors above do match MUI's classes in the published bundle - but Storybook's css-loader\n * hashes them, so up there they match nothing and the calendar renders at MUI's own defaults.\n * `:global` is honoured by both, so these rules land either way. (The rules above are left as\n * they are: making them global too would change the shipped calendar, which is not what this\n * issue is about.)\n *\n * The seven columns have to keep fitting inside MUI's 320px-wide calendar, and 7 x 44 = 308\n * only fits once the 2px side margins on each cell go - hence dropping the gap rather than\n * the cell, per the issue.\n */\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersDay-root,\n .FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersDay-dayWithMargin {\n width: 44px !important;\n height: 44px !important;\n margin: 0 !important;\n font-size: 0.875rem !important;\n }\n .FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiDayCalendar-weekDayLabel {\n width: 44px !important;\n height: 44px !important;\n margin: 0 !important;\n }\n .FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiDayCalendar-slideTransition {\n min-height: 264px !important;\n }\n .FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersArrowSwitcher-button {\n width: 44px !important;\n height: 44px !important;\n }\n}");var _0={blockWeekends:!0,blockCurrentDay:!0,blockNextBusinessDays:2},w0=function(n){var r=zc().add(2,"month"),o=zc(),a=n.field,s=n.onFieldChange,l=n.errorMessage,u=n.busyDays,c=n.loading,d=function(){return e.jsx(bJ.DayCalendarSkeleton,{})},p=t.useState(),f=p[0],m=p[1];t.useEffect(function(){s(a.name,f)},[f,a.name,s]);var h=p0(u),y=t.useCallback(function(e){if(!h)return function(e,t,n){if(t.blockWeekends&&(0===e.day()||6===e.day()))return!0;if(t.blockCurrentDay&&e.isSame(n,"day"))return!0;if(t.blockNextBusinessDays){for(var r=n,o=0,a=0;o<t.blockNextBusinessDays&&a<366;)a++,y0(r=r.add(1,"day"),t)&&o++;if(e.isBefore(r,"day"))return!0}return!!(t.currentDayAvailableUntil&&e.isSame(n,"day")&&n.format("HH:mm")>t.currentDayAvailableUntil)||!(!(Array.isArray(t.availableDays)&&t.availableDays.length>0)||t.availableDays.map(function(e){return e.toLowerCase()}).includes(e.format("dddd").toLowerCase()))}(e,Object.keys((null==a?void 0:a.defaultBusyDays)||{}).length>0?a.defaultBusyDays||{}:_0,o);try{return f0(e,h)}catch(e){console.error("shouldDisableDate: ".concat(e))}return!1},[o,h,a.defaultBusyDays]);return e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignContent:"center",alignItems:"center"},children:[e.jsx("div",{className:g0,children:e.jsx(Db.LocalizationProvider,{dateAdapter:UQ.AdapterDayjs,children:e.jsx(y$.DateCalendar,{className:b0,disableHighlightToday:!1,disablePast:!0,fixedWeekNumber:6,loading:c,maxDate:r,onChange:function(e){m(e)},renderLoading:function(){return e.jsx(d,{})},shouldDisableDate:y,showDaysOutsideCurrentMonth:!0,slots:{day:function(t){var n=t.day,a=t.disabled,s=n.isBefore(o,"day"),l=n.isAfter(r,"day");return s||l?e.jsx(WQ.PickersDay,i({},t,{className:v0})):a?e.jsx(WQ.PickersDay,i({},t)):e.jsx(WQ.PickersDay,i({},t,{className:x0}))}},value:f,views:["day"]})})}),c&&e.jsx(Sp,{error:!0,style:{color:"inherit",marginLeft:"98px",marginTop:"14px",marginBottom:"-14px"},children:"Getting latest availability..."}),!c&&l&&e.jsx(Sp,{error:!0,style:{marginLeft:"14px",marginTop:"14px",marginBottom:"-14px"},children:l})]})},O0=/^\d{4}-\d{2}-\d{2}/;function S0(e){if(!e)return"";if("string"==typeof e&&O0.test(e))return e.slice(0,10);var t=e instanceof Date?e:new Date(e);return isNaN(t.getTime())?"":t.toISOString().slice(0,10)}var k0=function(n){var r,o,a=n.field,s=n.onFieldChange,l=n.value,u=n.errorMessage,c=n.required,d=n.isLastField,p=S0((null==l?void 0:l.from)||(null===(r=a.preselecteDates)||void 0===r?void 0:r.from)),f=S0((null==l?void 0:l.to)||(null===(o=a.preselecteDates)||void 0===o?void 0:o.to)),m=t.useState({from:p,to:f}),h=m[0],y=m[1];t.useEffect(function(){y({from:p,to:f})},[p,f]);var g=function(e){y(e),s(a.name,e.from||e.to?e:void 0)},b="".concat(a.name,"-from"),v="".concat(a.name,"-to");return e.jsxs("div",{style:a.style,children:[a.title&&e.jsx("h2",{children:a.title}),e.jsx("label",{htmlFor:b,children:"From"}),e.jsx("input",{id:b,name:b,type:"date",value:h.from,onChange:function(e){g(i(i({},h),{from:e.target.value}))},max:h.to||void 0,required:c,enterKeyHint:"next"}),e.jsx("label",{htmlFor:v,children:"To"}),e.jsx("input",{id:v,name:v,type:"date",value:h.to,onChange:function(e){g(i(i({},h),{to:e.target.value}))},min:h.from||void 0,required:c,enterKeyHint:d?"done":"next"}),u&&e.jsx("p",{children:u})]})},j0="FormFieldDateTime-module_xapp_datetime__rPNwE",P0="FormFieldDateTime-module_xapp_datetime_title__VNHwW",T0="FormFieldDateTime-module_xapp_datetime_body__ta9Ui",C0="FormFieldDateTime-module_xapp_datetime_calendar__Ge5W6",M0="FormFieldDateTime-module_xapp_datetime_times_column__UY7ho",E0="FormFieldDateTime-module_xapp_datetime_timezone__ZE56Q",D0="FormFieldDateTime-module_xapp_datetime_times__rhU-O",N0="FormFieldDateTime-module_xapp_datetime_group__CeL-E",R0="FormFieldDateTime-module_xapp_datetime_time__x5lxl",$0="FormFieldDateTime-module_xapp_datetime_time_selected__IRT84",I0="FormFieldDateTime-module_xapp_datetime_message__4rf-S",F0="FormFieldDateTime-module_xapp_datetime_error__bTyZK";te("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n.FormFieldDateTime-module_xapp_datetime__rPNwE {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n font-family: var(--xapp-form-widget-date-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n}\n\n.FormFieldDateTime-module_xapp_datetime_title__VNHwW {\n margin: 0 0 8px;\n font-family: inherit;\n font-size: 1rem;\n text-align: center;\n}\n\n/* Calendar and column side by side on a wide enough viewport.\n *\n * `flex-wrap` rather than a fixed two-column grid: the pair has to be allowed to fall\n * onto two rows rather than force the step to scroll sideways, which is the failure the\n * mobile rule below would otherwise only fix at the breakpoint. */\n.FormFieldDateTime-module_xapp_datetime_body__ta9Ui {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n align-items: flex-start;\n gap: 16px;\n width: 100%;\n}\n\n.FormFieldDateTime-module_xapp_datetime_calendar__Ge5W6 {\n flex: 0 0 auto;\n}\n\n/* The zone notice and the column travel together, so the sizing the column used to own\n * lives here now - the column itself keeps only the scrolling, which the notice must\n * stay outside of or it scrolls away from the times it describes. */\n.FormFieldDateTime-module_xapp_datetime_times_column__UY7ho {\n flex: 1 1 160px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 0;\n max-width: 240px;\n}\n\n.FormFieldDateTime-module_xapp_datetime_timezone__ZE56Q {\n margin: 0;\n padding: 0 4px;\n font-size: var(--xapp-form-widget-date-font-size, 14px);\n text-align: left;\n}\n\n/* A column of buttons rather than chips: a half-hour schedule produces 16 or more\n * offerings and chips wrap into an unreadable block past a handful. */\n.FormFieldDateTime-module_xapp_datetime_times__rhU-O {\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 0;\n max-height: 320px;\n overflow-y: auto;\n padding: 4px;\n}\n\n.FormFieldDateTime-module_xapp_datetime_group__CeL-E {\n position: sticky;\n top: 0;\n z-index: 1;\n margin: 4px 0 0;\n padding: 4px 0;\n background-color: #ffffff;\n font-family: inherit;\n font-size: var(--xapp-form-widget-date-font-size, 14px);\n font-weight: 600;\n text-align: left;\n}\n\n.FormFieldDateTime-module_xapp_datetime_time__x5lxl {\n flex: 0 0 auto;\n min-height: 44px;\n padding: 8px 12px;\n border: 1px solid var(--xapp-form-widget-chips-background-color, #c4dced);\n border-radius: var(--xapp-form-widget-border-radius-sm, 8px);\n background-color: transparent;\n /* Not $form-chips-color: that is the chips' FOREGROUND, authored to sit on the filled\n * chip background. This button is transparent, so a theme whose chips are dark with\n * white text - the common case - renders white on white and the times vanish. The\n * body text colour is the one that belongs on the form's own background. */\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87));\n font-family: var(--xapp-form-widget-chips-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n font-size: var(--xapp-form-widget-chips-font-size, 0.875em);\n font-weight: 600;\n cursor: pointer;\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out, transform 150ms ease-in-out;\n}\n.FormFieldDateTime-module_xapp_datetime_time__x5lxl:hover {\n background-color: var(--xapp-form-widget-chips-background-color, #c4dced);\n /* Background and foreground move together: whenever the chip background is\n * applied, the colour the theme paired with it applies too. */\n color: var(--xapp-form-widget-chips-color, #000000);\n box-shadow: var(--xapp-form-widget-box-shadow-subtle, 0 2px 8px rgba(0, 0, 0, 0.08));\n}\n.FormFieldDateTime-module_xapp_datetime_time__x5lxl:active {\n transform: scale(0.98);\n}\n.FormFieldDateTime-module_xapp_datetime_time__x5lxl:focus {\n outline: none;\n}\n.FormFieldDateTime-module_xapp_datetime_time__x5lxl:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormFieldDateTime-module_xapp_datetime_time__x5lxl {\n font-size: 16px;\n }\n}\n\n.FormFieldDateTime-module_xapp_datetime_time_selected__IRT84 {\n border-color: var(--xapp-form-widget-chips-background-color-selected, var(--xapp-form-widget-chips-background-color-dark, #6e7ae1));\n background-color: var(--xapp-form-widget-chips-background-color-selected, var(--xapp-form-widget-chips-background-color-dark, #6e7ae1));\n color: var(--xapp-form-widget-chips-color-selected, #ffffff);\n}\n.FormFieldDateTime-module_xapp_datetime_time_selected__IRT84:hover {\n background-color: var(--xapp-form-widget-chips-background-color-selected, var(--xapp-form-widget-chips-background-color-dark, #6e7ae1));\n}\n\n.FormFieldDateTime-module_xapp_datetime_message__4rf-S {\n margin: 8px 0;\n font-size: var(--xapp-form-widget-date-font-size, 14px);\n text-align: center;\n}\n\n.FormFieldDateTime-module_xapp_datetime_error__bTyZK {\n margin-top: 14px;\n}\n\n/* Stacked, with the column under the calendar and given room to scroll on its own. */\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormFieldDateTime-module_xapp_datetime_body__ta9Ui {\n flex-direction: column;\n align-items: center;\n }\n .FormFieldDateTime-module_xapp_datetime_times_column__UY7ho {\n width: 100%;\n max-width: 320px;\n }\n .FormFieldDateTime-module_xapp_datetime_times__rhU-O {\n max-height: 260px;\n }\n}");var A0="Appointment times",L0="Times shown in";function z0(e){return"".concat(e.start,"|").concat(e.end||"")}var V0=function(n){var r=n.field,o=n.onFieldChange,a=n.errorMessage,i=n.value,s=n.required,l=n.busyDays,u=r.schedule,c=t.useMemo(function(){return n.now||new Date},[n.now]),d=t.useState(function(){return(null==i?void 0:i.date)?zc("".concat(i.date,"T00:00:00")):void 0}),p=d[0],f=d[1],m=t.useState(function(){return i?z0(i):void 0}),h=m[0],y=m[1],g=t.useMemo(function(){return p?ud(u,p.toDate(),c):[]},[u,p,c]),b=t.useMemo(function(){return g.find(function(e){return z0(e)===h})},[g,h]),v=t.useMemo(function(){if(p&&b){var e,t,n=ed(p.toDate()),r={date:n,label:id(b),start:b.start,datetime:rd(n,b.start,null==u?void 0:u.timezone)};return b.end&&(r.end=b.end),i&&(t=r,(e=i).date===t.date&&e.start===t.start&&e.end===t.end&&e.label===t.label&&e.datetime===t.datetime)?i:r}},[p,b,u,i]);t.useEffect(function(){o(r.name,v)},[v,r.name,o]);var x=t.useMemo(function(){return p0(l)},[l]);t.useEffect(function(){p&&f0(p,x)&&(f(void 0),y(void 0))},[p,x]);var _,w=t.useCallback(function(e){return!cd(u,e.toDate(),c)||f0(e,x)},[u,c,x]),O=sd(u),S=!!u,k=null==u?void 0:u.timezone,j=function(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}),!0}catch(e){return!1}}(k),P=t.useMemo(function(){if(!S)return"";var e=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(e){return""}}();return function(e,t){var n=nd(e);if(!n)return"";var r=t&&t!==e?nd(t):"";return r&&r!==n?"".concat(L0," ").concat(n,", not your time zone (").concat(r,")."):"".concat(L0," ").concat(n,".")}(j?k:e,e)},[S,k,j]);return t.useEffect(function(){S&&!j&&console.warn('FormFieldDateTime: "'.concat(k,'" is not a usable timezone, so ')+"times are shown in the visitor's zone instead. Set the schedule's timezone to an IANA identifier such as \"America/New_York\".")},[S,k,j]),e.jsxs("div",{className:j0,style:r.style,children:[!!r.title&&e.jsx("h2",{className:P0,children:r.title}),e.jsxs("div",{className:T0,children:[e.jsx("div",{className:C0,children:e.jsx(Db.LocalizationProvider,{dateAdapter:UQ.AdapterDayjs,children:e.jsx(y$.DateCalendar,{maxDate:zc(c).add(O,"day"),onChange:function(e){f(e),y(void 0)},referenceDate:zc(c),shouldDisableDate:w,value:p||null,views:["day"]})})}),e.jsxs("div",{className:M0,children:[!!P&&e.jsx("p",{className:E0,children:P}),e.jsxs("div",{"aria-label":s?"".concat(A0," (required)"):A0,className:D0,role:"group",children:[!p&&e.jsx("p",{className:I0,children:"Select a date to see the available times."}),!!p&&0===g.length&&e.jsx("p",{className:I0,children:"No times are available on this date."}),g.map(function(n,r){var o=z0(n),a=n.group!==_?n.group:void 0;return _=n.group,e.jsxs(t.Fragment,{children:[!!a&&e.jsx("h3",{className:N0,children:a}),e.jsx("button",{"aria-pressed":o===h,className:"".concat(R0," ").concat(o===h?$0:""),onClick:function(){return y(o)},type:"button",children:id(n)})]},"".concat(o,"-").concat(r))})]})]})]}),!!a&&e.jsx(Sp,{className:F0,error:!0,children:a})]})},B0=gl(e.jsx("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7m0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5"}),"LocationOn"),W0={exports:{}};W0.exports=(()=>{return e={705:e=>{e.exports=function(e,t){const n=[];return 0===t.length?n.push({text:e,highlight:!1}):t[0][0]>0&&n.push({text:e.slice(0,t[0][0]),highlight:!1}),t.forEach((r,o)=>{const a=r[0],i=r[1];n.push({text:e.slice(a,i),highlight:!0}),o===t.length-1?i<e.length&&n.push({text:e.slice(i,e.length),highlight:!1}):i<t[o+1][0]&&n.push({text:e.slice(i,t[o+1][0]),highlight:!1})}),n}}},t={},function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}(705);var e,t})();var U0=M(W0.exports);function H0(e){return null!=e.placePrediction}function Y0(e){var t,n=e.placePrediction;return{placeId:n.placeId,description:n.text.text,structured_formatting:{main_text:n.structuredFormat.mainText.text,secondary_text:(null===(t=n.structuredFormat.secondaryText)||void 0===t?void 0:t.text)||"",main_text_matched_substrings:(n.structuredFormat.mainText.matches||[]).map(function(e){var t,n,r;return{offset:null!==(t=e.startOffset)&&void 0!==t?t:0,length:(null!==(n=e.endOffset)&&void 0!==n?n:0)-(null!==(r=e.startOffset)&&void 0!==r?r:0)}})}}}var q0=function(){function e(e){this.baseUrl=e.baseUrl||"https://api.xapp.ai",this.key=e.apiKey}return e.prototype.getPlacePredictions=function(e,t){var n,r={};if(e.params){if(e.params.components){var o=e.params.components.split("|").filter(function(e){return e.startsWith("country:")}).map(function(e){return e.replace("country:","").toLowerCase()});o.length>0&&(r.includedRegionCodes=o)}if(e.params.language&&(r.languageCode=e.params.language),e.params.location){var a=e.params.location.split(",").map(Number),i=a[0],s=a[1];isNaN(i)||isNaN(s)||(r.locationBias={circle:{center:{latitude:i,longitude:s},radius:Number(e.params.radius)||5e4}})}}r.input=e.input,(null===(n=e.componentRestrictions)||void 0===n?void 0:n.country)?r.includedRegionCodes=[e.componentRestrictions.country.toLowerCase()]:r.includedRegionCodes||(r.includedRegionCodes=["us"]);var l="".concat(this.baseUrl,"/places/autocomplete");this.key&&(l+="?key=".concat(encodeURIComponent(this.key))),fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}).then(function(e){if(!e.ok)throw new Error("getPlacePredictions: HTTP error! Status: ".concat(e.status));return e.json()}).then(function(e){t((e.suggestions||[]).filter(H0).map(Y0))}).catch(function(e){v("getPlacePredictions: Fetch error:",e),t([])})},e.prototype.getPlaceDetails=function(e,t){var n="".concat(this.baseUrl,"/places/details/").concat(encodeURIComponent(e));this.key&&(n+="?key=".concat(encodeURIComponent(this.key))),fetch(n).then(function(e){if(!e.ok)throw new Error("getPlaceDetails: HTTP error! Status: ".concat(e.status));return e.json()}).then(function(e){t(e)}).catch(function(e){v("getPlaceDetails: Fetch error:",e),t(void 0)})},e}(),G0="FormFieldTextInputAddress-module_xapp_text_input_address__-FQjM";te(".FormFieldTextInputAddress-module_xapp_text_input_address_container__title__IbovL p {\n margin: 0;\n font-family: var(--xapp-form-widget-text-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n}\n\n.FormFieldTextInputAddress-module_xapp_text_input_address__-FQjM .MuiInputBase-input {\n padding: 21px 12px 4px 12px !important;\n border: 0 !important;\n background-color: var(--xapp-form-widget-text-background-color, rgba(0, 0, 0, 0.06)) !important;\n border-radius: var(--xapp-form-widget-border-radius-sm, 8px) !important;\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out !important;\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87)) !important;\n font-size: var(--xapp-form-widget-text-font-size, 1rem) !important;\n font-family: var(--xapp-form-widget-text-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif)) !important;\n height: auto !important;\n width: 100% !important;\n max-width: 100% !important;\n margin: 0 !important;\n margin-bottom: 0 !important;\n border-width: 0 !important;\n border-style: none !important;\n -webkit-appearance: none !important;\n appearance: none !important;\n}\n.FormFieldTextInputAddress-module_xapp_text_input_address__-FQjM .MuiInputBase-input:hover {\n background-color: var(--xapp-form-widget-text-background-color-dark, rgba(0, 0, 0, 0.09)) !important;\n}\n.FormFieldTextInputAddress-module_xapp_text_input_address__-FQjM .MuiInputBase-input:focus {\n background-color: var(--xapp-form-widget-text-background-color-dark, rgba(0, 0, 0, 0.09)) !important;\n outline: none !important;\n box-shadow: inset 0 0 0 2px var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54)) !important;\n}\n.FormFieldTextInputAddress-module_xapp_text_input_address__-FQjM .MuiFilledInput-root {\n padding-top: 0 !important;\n padding-left: 0 !important;\n}\n.FormFieldTextInputAddress-module_xapp_text_input_address__-FQjM .MuiAutocomplete-root {\n padding-top: 0 !important;\n padding-left: 0 !important;\n}\n.FormFieldTextInputAddress-module_xapp_text_input_address__-FQjM .MuiPopper-root-MuiAutocomplete-popper {\n z-index: 16000;\n}\n.FormFieldTextInputAddress-module_xapp_text_input_address__-FQjM .MuiInputLabel-root {\n transform: translate(12px, 13px) scale(1) !important;\n transition: color 200ms cubic-bezier(0, 0, 0.2, 1) 0ms, transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms !important;\n}\n.FormFieldTextInputAddress-module_xapp_text_input_address__-FQjM .MuiInputLabel-root.MuiInputLabel-shrink {\n transform: translate(12px, 4px) scale(0.75) !important;\n}\n\n.MuiAutocomplete-popper {\n z-index: 16000 !important;\n}");var K0=function(t){var n=t.children,r=s(t,["children"]);return e.jsxs($p,i({},r,{children:[n,e.jsx(fy,{sx:{textAlign:"right",padding:"4px 12px 8px"},children:e.jsx("img",{src:"https://maps.gstatic.com/mapfiles/api-3/images/powered-by-google-on-white3.png",alt:"powered by Google",style:{height:14}})})]}))},X0=function(n){var r,o=n.field,a=n.onFieldChange,s=n.errorMessage,l=n.required,u=n.googleMapsApiKey,d=n.mapsBaseUrl,p=n.requireSelection,f=!(null!==(r=o.requireSelection)&&void 0!==r?r:p),m=t.useState(null),h=m[0],y=m[1],g=t.useState(""),b=g[0],v=g[1],x=t.useState([]),_=x[0],w=x[1],O=t.useRef(""),S=function(e){y(e)},k=function(e){O.current=e,v(e)},j=function(e){w(e)};t.useEffect(function(){a(o.name,b)},[o.name,a,b]);var P=o.googleMapsApiKey||u,T=o.mapsBaseUrl||d,C=t.useMemo(function(){return new q0({apiKey:P,baseUrl:T})},[P,T]),M=function(){if(!T)return!0;try{var e=new URL(T).hostname;return"xapp.ai"===e||e.endsWith(".xapp.ai")}catch(e){return!1}}(),E=t.useMemo(function(){return bl(function(e,t){C.getPlacePredictions(e,t)},400)},[C]);return t.useEffect(function(){var e=!0;if(""!==b){var t=o.mapsUrlQueryParams||void 0;return E({input:b,params:t},function(t){if(e){var n=[];h&&"string"!=typeof h&&(n=[h]),t&&(n=c(c([],n,!0),t,!0)),j(n)}}),function(){e=!1}}j(h&&"string"!=typeof h?[h]:[])},[h,b,E,o.mapsUrlQueryParams]),e.jsx(ny,i({id:"google-map-input"},M&&{PaperComponent:K0},{getOptionLabel:function(e){return"string"==typeof e?e:e.description},filterOptions:function(e){return e},options:_,autoComplete:!0,freeSolo:f,includeInputInList:!0,filterSelectedOptions:!0,value:h,inputValue:b,noOptionsText:"No locations",onChange:function(e,t){if(j("string"==typeof t?[]:t?c([t],_,!0):_),S(t),t&&"string"!=typeof t&&t.placeId){var n=t.placeId,r=t.description;k(r),C.getPlaceDetails(n,function(e){(null==e?void 0:e.formattedAddress)&&O.current===r&&(S(i(i({},t),{description:e.formattedAddress})),k(e.formattedAddress))})}},onInputChange:function(e,t){k(t)},renderInput:function(t){return e.jsx(lb,i({className:G0},t,{variant:"filled",size:"small",margin:"normal",label:o.label,error:!!s,helperText:s,name:o.name,placeholder:o.placeholder,required:l,fullWidth:!0,style:o.style,slotProps:o.maxLength?{htmlInput:i(i({},t.inputProps),{maxLength:o.maxLength})}:void 0}))},renderOption:function(t,n){if("string"==typeof n)return e.jsx("li",i({},t,{children:n}));var r=n.structured_formatting.main_text_matched_substrings||[],o=U0(n.structured_formatting.main_text,r.map(function(e){return[e.offset,e.offset+e.length]}));return e.jsx("li",i({},t,{children:e.jsxs(Vy,{container:!0,alignItems:"center",children:[e.jsx(Vy,{sx:{display:"flex",width:44},children:e.jsx(B0,{sx:{color:"text.secondary"}})}),e.jsxs(Vy,{sx:{width:"calc(100% - 44px)",wordWrap:"break-word"},children:[o.map(function(t,n){return e.jsx(fy,{component:"span",sx:{fontWeight:t.highlight?"bold":"regular"},children:t.text},n)}),e.jsx(mp,{variant:"body2",color:"text.secondary",children:n.structured_formatting.secondary_text})]})]})}))}}))},Z0=function(e){return"string"!=typeof e||0===e.trim().length},Q0=function(e){var t=e.replace(/\D/g,"");if(10===t.length||11===t.length&&t.startsWith("1")){return/^(1)?[-. ]?\(?(\d{3})\)?[-. ]?(\d{3})[-. ]?(\d{4})$/.test(t)}return!1},J0=function(e){return null==e||("string"==typeof e?0===e.trim().length:Array.isArray(e)?0===e.length:("object"==typeof e&&e.constructor===Object||"object"==typeof e)&&0===Object.keys(e).length)},e1="FormStepDisplay-module_xapp_step_iframe_wrapper__BBFRw",t1="FormStepDisplay-module_xapp_step_full_bleed__rhGGK",n1="FormStepDisplay-module_xapp_external_widget_container__ec4Hs",r1="FormStepDisplay-module_xapp_external_widget_anchor__NSXBg",o1="FormStepDisplay-module_xapp_external_widget_fallback__lkFJ-",a1="FormStepDisplay-module_xapp_external_widget_loading__aRtx6",i1="FormStepDisplay-module_xapp_external_widget_spinner__ga0X7",s1="FormStepDisplay-module_xapp_submit_error__Zbqdj",l1="FormStepDisplay-module_xapp_formfield__hRmVx",u1="FormStepDisplay-module_active__fCsMz",c1="FormStepDisplay-module_xapp_formfield_title__INjeF",d1="FormStepDisplay-module_xapp_formfield_subtitle__8VQC2",p1="FormStepDisplay-module_xapp_final_button_container__Gco-E",f1="FormStepDisplay-module_xapp_form_nav_buttons__lI4BI",m1="FormStepDisplay-module_xapp_dummy_button__Q-nE6",h1="FormStepDisplay-module_xapp_primary_button__d2wra",y1="FormStepDisplay-module_xapp_secondary_button__LuMfN",g1="FormStepDisplay-module_xapp_disabled_button__RjSfL";te('/**\n * The phone breakpoint.\n *\n * Width alone cannot express "phone". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step\'s action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n.FormStepDisplay-module_xapp_step_iframe_wrapper__BBFRw {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n overflow: scroll;\n position: relative;\n}\n\n.FormStepDisplay-module_xapp_step_full_bleed__rhGGK {\n margin-left: -56px;\n margin-right: -56px;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormStepDisplay-module_xapp_step_full_bleed__rhGGK {\n margin-left: calc(-1 * (8px + env(safe-area-inset-left, 0px)));\n margin-right: calc(-1 * (8px + env(safe-area-inset-right, 0px)));\n }\n}\n\n.FormStepDisplay-module_xapp_external_widget_container__ec4Hs {\n background-color: var(--xapp-form-widget-external-widget-background-color, transparent);\n padding: var(--xapp-form-widget-external-widget-padding, 0);\n min-height: var(--xapp-form-widget-external-widget-min-height, auto);\n box-sizing: border-box;\n}\n\n.FormStepDisplay-module_xapp_external_widget_anchor__NSXBg {\n margin: 0;\n padding: 0;\n}\n\n.FormStepDisplay-module_xapp_external_widget_fallback__lkFJ- {\n padding: 20px;\n text-align: center;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n}\n\n.FormStepDisplay-module_xapp_external_widget_loading__aRtx6 {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 14px;\n min-height: 240px;\n padding: 40px 20px;\n text-align: center;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87));\n}\n.FormStepDisplay-module_xapp_external_widget_loading__aRtx6 p {\n margin: 0;\n font-size: 0.95em;\n opacity: 0.7;\n}\n\n.FormStepDisplay-module_xapp_external_widget_spinner__ga0X7 {\n display: inline-block;\n width: 44px;\n height: 44px;\n color: var(--xapp-form-widget-primary-button-color, #ea6539);\n}\n.FormStepDisplay-module_xapp_external_widget_spinner__ga0X7 svg {\n width: 100%;\n height: 100%;\n}\n\n.FormStepDisplay-module_xapp_submit_error__Zbqdj {\n padding: 12px 20px;\n text-align: center;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n color: #b3261e;\n}\n\n.FormStepDisplay-module_xapp_formfield__hRmVx {\n display: none;\n font-family: inherit !important;\n}\n.FormStepDisplay-module_xapp_formfield__hRmVx.FormStepDisplay-module_active__fCsMz {\n display: block;\n}\n.FormStepDisplay-module_xapp_formfield_title__INjeF p {\n margin: 10px 0 20px 0;\n font-size: 1em;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n}\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-clearIndicator,\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-popupIndicator {\n color: rgba(0, 0, 0, 0.54) !important;\n background-color: transparent !important;\n transition: background-color 200ms ease-in-out !important;\n}\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-clearIndicator:hover,\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-popupIndicator:hover {\n background-image: unset !important;\n background-color: #cfd8da !important;\n}\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-clearIndicator:focus,\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-popupIndicator:focus {\n background-image: unset !important;\n}\n\n.FormStepDisplay-module_xapp_formfield_title__INjeF p {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n}\n\n.FormStepDisplay-module_xapp_formfield_subtitle__8VQC2 {\n font-size: 0.875em;\n opacity: 0.8;\n}\n\n.FormStepDisplay-module_xapp_final_button_container__Gco-E {\n display: flex;\n justify-content: center;\n padding: 20px 20px 0 20px;\n}\n.FormStepDisplay-module_xapp_final_button_container__Gco-E button {\n font-size: 1.2em !important;\n padding: 12px 32px !important;\n min-width: 200px !important;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px) !important;\n}\n\n.FormStepDisplay-module_xapp_form_nav_buttons__lI4BI {\n display: flex;\n justify-content: space-between;\n padding: 20px;\n}\n\n.FormStepDisplay-module_xapp_dummy_button__Q-nE6 {\n flex-grow: 1;\n}\n\n.FormStepDisplay-module_xapp_primary_button__d2wra {\n background-color: var(--xapp-form-widget-primary-button-color, #ea6539) !important;\n font-family: inherit !important;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px) !important;\n min-height: 44px !important;\n transition: box-shadow 200ms ease-in-out, transform 150ms ease-in-out, opacity 200ms ease-in-out !important;\n}\n.FormStepDisplay-module_xapp_primary_button__d2wra:hover {\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;\n opacity: 0.9 !important;\n}\n.FormStepDisplay-module_xapp_primary_button__d2wra:active {\n transform: scale(0.98) !important;\n}\n.FormStepDisplay-module_xapp_primary_button__d2wra:focus {\n outline: none;\n}\n.FormStepDisplay-module_xapp_primary_button__d2wra:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n\n.FormStepDisplay-module_xapp_secondary_button__LuMfN {\n background-color: var(--xapp-form-widget-secondary-button-color, #d24cc7) !important;\n font-family: inherit !important;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px) !important;\n min-height: 44px !important;\n transition: box-shadow 200ms ease-in-out, transform 150ms ease-in-out, opacity 200ms ease-in-out !important;\n}\n.FormStepDisplay-module_xapp_secondary_button__LuMfN:hover {\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;\n opacity: 0.9 !important;\n}\n.FormStepDisplay-module_xapp_secondary_button__LuMfN:active {\n transform: scale(0.98) !important;\n}\n.FormStepDisplay-module_xapp_secondary_button__LuMfN:focus {\n outline: none;\n}\n.FormStepDisplay-module_xapp_secondary_button__LuMfN:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n\n.FormStepDisplay-module_xapp_disabled_button__RjSfL {\n background-color: rgba(121, 117, 133, 0.5) !important;\n font-family: inherit !important;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px) !important;\n min-height: 44px !important;\n cursor: not-allowed !important;\n}');function b1(e){return!!e&&void 0!==e.externalWidget}function v1(e){return"value"in e&&void 0!==e.value}function x1(e){return!!e&&void 0!==e.mandatoryGroup}te("/**\n * CostGuide / Contractor Appointments booking-embed style overrides.\n *\n * The partner renders its form into #airo-anchor in the light DOM with stable, semantic\n * class names (spike: chat-widget#1514). This is a plain (non-module) stylesheet on purpose\n * so the selectors below emit literally rather than being scoped -- they target the partner's\n * own markup, not ours.\n *\n * Two hard constraints from the spike:\n * 1. Their rules are scoped `#airo-anchor #step-<name> .<class>` (two ids + a class), so a\n * plain `#airo-anchor .btn-next` measurably loses. Overrides must carry `#airo-anchor`\n * specificity AND `!important` to win.\n * 2. Most of their text inherits the container font, but `input` is explicitly Arial, so the\n * font must be re-applied to inputs directly.\n *\n * Every value maps to a `--xapp-form-widget-*` theme variable (with a fallback matching\n * `styles/_variables.scss`), so a Studio-themed widget restyles the partner's form too --\n * nothing here is a hard-coded color, font, or radius.\n *\n * Partner selectors verified: 2026-08-04. Re-verify against their markup per chat-widget#1516.\n */\n/* Primary action buttons: btn-next / btn-orange */\n#airo-anchor .btn-next,\n#airo-anchor .btn-orange {\n background-color: var(--xapp-form-widget-primary-button-color, #ea6539) !important;\n color: var(--xapp-form-widget-primary-button-text-color, #b7c5d1) !important;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px) !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n\n/* Secondary / back button: btn-back */\n#airo-anchor .btn-back {\n background-color: var(--xapp-form-widget-secondary-button-color, #d24cc7) !important;\n color: var(--xapp-form-widget-secondary-button-text-color, #b7c5d1) !important;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px) !important;\n}\n\n/* Headings and body text: stepwrap / ms-title / ms-subtitle / page-title / label-item */\n#airo-anchor .stepwrap,\n#airo-anchor .ms-title,\n#airo-anchor .ms-subtitle,\n#airo-anchor .page-title,\n#airo-anchor .label-item {\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87)) !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n\n/* Inputs are explicitly Arial in their sheet, so the inherited container font never reaches\n them -- re-apply directly (spike finding). radio-item grouped for the same reason. */\n#airo-anchor input,\n#airo-anchor .radio-item {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n\n/* Focus rings consistent with ours rather than their default orange. */\n#airo-anchor input:focus,\n#airo-anchor .btn-next:focus,\n#airo-anchor .btn-back:focus {\n outline-color: var(--xapp-form-widget-focus-ring-color, #012b54) !important;\n}");var _1=function(n){var r=t.useRef({}),o=t.useRef(new Set),a=t.useRef(!1),s=t.useRef(n.formStep.fields),c=t.useRef({}),d=t.useState({}),p=d[0],f=d[1],m=t.useState({}),h=m[0],y=m[1],g=t.useState({}),b=g[0],v=g[1],x=t.useState(!1),_=x[0],w=x[1],O=n.formStep,S=n.onNextStep,k=n.onPrevStep,j=n.onData,P=n.onDataWithLabels,T=n.getData,M=n.getDataWithLabels,E=n.loading,D=n.currentStepIndex,N=n.totalSteps,R=n.onTrackNextStep,$=n.currentStepDataRef,I=n.isActive,F=n.onTrackHandoffRendered,A=n.onTrackHandoffNoRender,L=n.onTrackHandoffScheduled,z=n.onTrackHandoffError,V=n.onExternalWidgetFallback,B=n.submitError,W=n.hideIntro,U=I&&b1(O)?O.externalWidget:void 0,H=md(U,{onRendered:function(e){return null==F?void 0:F(O.name,e)},onNoRender:function(e){return null==A?void 0:A(O.name,e)},onScheduled:function(e,t){return null==L?void 0:L(O.name,e,t)},onError:function(e){return null==z?void 0:z(O.name,e)},onFallback:function(e){return null==V?void 0:V(e)}}).outcome,Y=t.useState(!1),q=Y[0],G=Y[1];t.useLayoutEffect(function(){if(U){var e=U.anchorId,t=document.getElementById(e);if(t){if(!(t.childElementCount>0)){var n=new MutationObserver(function(){var t=document.getElementById(e);t&&t.childElementCount>0&&(G(!0),n.disconnect())});return n.observe(t,{childList:!0,subtree:!0}),function(){return n.disconnect()}}G(!0)}}else G(!1)},[U]);var K=t.useCallback(function(){var e={};Object.entries(c.current).forEach(function(t){var n=t[0],o=t[1];try{var a=i(i(i({},T()),r.current),{safeIncludes:function(e,t){return Array.isArray(e)?e.includes(t):"string"==typeof e&&e===t}});e[n]=o.call(a)}catch(t){"development"===process.env.NODE_ENV&&console.error('Condition evaluation failed for field "'.concat(n,'":'),t),e[n]=!1}}),function(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0,a=n;o<a.length;o++){var i=a[o];if(e[i]!==t[i])return!1}return!0}(e,h)||y(e)},[h,T]);t.useEffect(function(){for(var e={},t=0,n=O.fields;t<n.length;t++){var r=n[t];if(x1(r)){var o=r.mandatoryGroup;o&&(e[o]||(e[o]=[]),e[o].push(r.name))}}f(e)},[O.fields]);s.current!==O.fields&&(s.current=O.fields,o.current.clear(),a.current=!1,r.current={});for(var X=0,Z=O.fields;X<Z.length;X++){var Q=Z[X];!v1(Q)||o.current.has(Q.name)||Object.prototype.hasOwnProperty.call(r.current,Q.name)||(r.current[Q.name]=Q.value,o.current.add(Q.name))}t.useEffect(function(){for(var e=0,t=O.fields;e<t.length;e++){var n=t[e];if("CHIPS"===n.type){var i=n.items.filter(function(e){return _b(e)}).filter(function(e){return e.selected}).map(function(e){return e.id});i.length>0&&!Object.prototype.hasOwnProperty.call(r.current,n.name)&&(r.current[n.name]=i)}if(n.condition){var s=$c(n.condition);c.current[n.name]=new Function("return (".concat(s,");"))}}o.current.size>0&&!a.current&&(a.current=!0,j(r.current)),K()},[K,O.fields]);var J=t.useCallback(function(){var e={},t=!0,n={};O.fields.forEach(function(o){var a={valid:!0},i=r.current[o.name];if(!1!==h[o.name]){if(function(e){return!!e&&"DROPDOWN"===e.type}(o))if(!o.mandatory||null!=i&&"none"!==i){if(null!=i&&"none"!==i){var s=o.items.find(function(e){return e.id===i});if(s&&s.freeFormInput){var l=s.freeFormFieldName||"message",u=r.current[l];(!u||"string"==typeof u&&""===u.trim())&&(e[l]={valid:!1,message:"Please specify additional details"},a={valid:!1,message:""})}}}else a={valid:!1,message:o.mandatoryError||"Please select an option"};else if(function(e){return!!e&&"DATERANGE"===e.type}(o))o.mandatory&&!function(e){var t=e;return!!(null==t?void 0:t.from)&&!!(null==t?void 0:t.to)}(i)&&(a={valid:!1,message:o.mandatoryError||"Please select a date range"});else if(function(e){return!!e&&"DATETIME"===e.type}(o))o.mandatory&&!function(e){var t=e;return!!(null==t?void 0:t.date)&&!!(null==t?void 0:t.start)}(i)&&(a={valid:!1,message:o.mandatoryError||"Please select a date and a time"});else if(Object.prototype.hasOwnProperty.call(r.current,o.name))if(function(e){return!!e&&"TEXT"===e.type}(o))if(!0===o.mandatory&&Z0(i))a={valid:!1,message:o.mandatoryError||"This field is mandatory"};else if("EMAIL"!==o.format||Z0(i)){if("PHONE"!==o.format||Z0(i)){if("ZIP_CODE"===o.format&&!Z0(i)&&(a=function(e){if(Z0(e))return{valid:!0};var t=/^\d{5}$/.test(e)||/^\d{5}-\d{4}$/.test(e)||/^[A-Za-z]\d[A-Za-z]\s?\d[A-Za-z]\d$/.test(e);return{valid:t,message:t?void 0:"Invalid zip code or postal code"}}(i),a.valid)){var c=function(e){if(Z0(e))return e;var t=e.trim(),n=t.match(/^([A-Za-z]\d[A-Za-z])(\d[A-Za-z]\d)$/);return n?"".concat(n[1].toUpperCase()," ").concat(n[2].toUpperCase()):/^[A-Za-z]\d[A-Za-z]\s\d[A-Za-z]\d$/.test(t)?t.toUpperCase():e}(i);c!==i&&(n[o.name]=c)}}else if(a=function(e){if(Z0(e))return{valid:!0};var t=Q0(e);return{valid:t,message:t?void 0:"Invalid phone number"}}(i),a.valid){var d=function(e){if(Z0(e)||!Q0(e))return e;var t=e.replace(/\D/g,"");return 11===t.length&&t.startsWith("1")&&(t=t.slice(1)),t.replace(/(\d{3})(\d{3})(\d{4})/,"($1) $2-$3")}(i);d!==i&&(n[o.name]=d)}}else a={valid:p=/^[\w-.]+@([\w-]+\.)+[\w-]{2,4}$/.test(String(i).toLowerCase()),message:p?void 0:"Invalid email address"};else!function(e){return!!e&&"CHIPS"===e.type}(o)?function(e){return!!e&&"DATE"===e.type}(o)&&o.mandatory&&null==i?a={valid:!1,message:"Please select a day"}:function(e){return!!e&&"CHECK"===e.type}(o)&&o.mandatory&&!(null==i?void 0:i.length)&&(a={valid:!1,message:o.mandatoryError||"This field is mandatory"}):o.minRequired&&i.length<o.minRequired?a={valid:!1,message:"Please select at least ".concat(o.minRequired," option(s)")}:o.maxAllowed&&i.length>o.maxAllowed?a={valid:!1,message:"Please select no more than ".concat(o.maxAllowed," option(s)")}:o.mandatory&&1!==(null==i?void 0:i.length)&&(a={valid:!1,message:"Please select one option"});var p;t=t&&a.valid,e[o.name]=a}else e[o.name]=a});for(var o=function(n){if(!n.some(function(e){return!J0(r.current[e])})){var o=O.fields.find(function(e){return e.name===n[0]}),a=b[n[0]],i=(null==a?void 0:a.message)||(null==o?void 0:o.mandatoryError)||"At least one of these fields is required";n.forEach(function(t){e[t]={valid:!1,message:i}}),t=!1}},a=0,s=Object.entries(p);a<s.length;a++){o(s[a][1])}return J0(n)||(r.current=i(i({},r.current),n)),function(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0,a=n;o<a.length;o++){var i=a[o];if(!t.hasOwnProperty(i))return!1;var s=e[i],l=t[i];if(s.valid!==l.valid)return!1}return!0}(b,e)||v(e),t},[h,b,O.fields,p]),ee=function(){return l(void 0,void 0,void 0,function(){var e;return u(this,function(t){switch(t.label){case 0:if(!J()||_)return[2];w(!0),t.label=1;case 1:return t.trys.push([1,,4,5]),te(r.current),R&&void 0!==D&&void 0!==N&&(e=D===N-1,R(O.name,D,r.current,e)),S?[4,S("submit"===O.nextAction)]:[3,3];case 2:t.sent(),t.label=3;case 3:return[3,5];case 4:return w(!1),[7];case 5:return[2]}})})},te=function(e){for(var t=i({},e),n={},r=function(e,r,o){if(r.length>0){var a=r.join(", ");t["".concat(e,"_start")]=a,n["".concat(e,"_start")]=a}if(o.length>0){var i=o.join(", ");t["".concat(e,"_end")]=i,n["".concat(e,"_end")]=i}},o=function(o){var a,i,s,l,u,c=e[o],d=O.fields.find(function(e){return e.name===o});if("CHIPS"===(null==d?void 0:d.type)&&void 0!==c){var p=[],f=[],m=[];c.forEach(function(e){var t=d.items.find(function(t){return t.id===e});if(t){p.push(t.label);var n=t;n.startTime&&f.push(n.startTime),n.endTime&&m.push(n.endTime)}}),n[o]=function(e){if(0===e.length)return"";if(1===e.length)return e[0];if(2===e.length)return e.join(" and ");var t=e.pop();return e.join(", ")+", and "+t}(p),r(o,f,m)}else if("DATETIME"===(null==d?void 0:d.type)&&void 0!==c){var h=d,y=c;t[o]=y.label,n[o]=y.label,r(o,y.start?[y.start]:[],y.end?[y.end]:[]);var g=h.dateFieldName||Hc;t[g]=y.date,n[g]=y.date;var b=h.dateTimeFieldName||Yc;t[b]=y.datetime,n[b]=y.datetime;var v=od(h.schedule);if(v){var x=h.timeZoneFieldName||qc;t[x]=v,n[x]=v}}else if("DROPDOWN"===(null==d?void 0:d.type)&&void 0!==c){var _=d.items.find(function(e){return e.id===c});_?_.label&&_.label.trim().length>0?n[o]=_.label:n[o]=c.replace(/_/g," ").split(" ").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}).join(" "):n[o]=c}else"DATE"===(null==d?void 0:d.type)&&void 0!==c?n[o]=(a=new Date(c),i=a.getDate(),s=a.toLocaleString("default",{month:"long"}),l=a.getFullYear(),u=function(e){if(e>=11&&e<=13)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}(i),"".concat(s," ").concat(i).concat(u,", ").concat(l)):n[o]=c},a=0,s=Object.keys(e);a<s.length;a++){o(s[a])}j(t),P(n)},ne=function(){for(var e in b)if(!1!==h[e]&&!b[e].valid)return!0;return!1},re=t.useCallback(function(e,t){var n,a=!Object.prototype.hasOwnProperty.call(r.current,e);if(o.current.has(e)){if(!a&&r.current[e]===t)return void o.current.delete(e);if(!a&&r.current[e]!==t)return}(a||r.current[e]!==t)&&(Array.isArray(t)&&0===t.length&&(t=void 0),r.current=i(i({},r.current),((n={})[e]=t,n)),$&&($.current=r.current),K(),J0(b)||J())},[K,b,J,$]),oe=t.useContext(me),ae=C().context;K();var ie,se=!!O&&O.fullBleed;return e.jsxs("div",{className:se?t1:void 0,children:[!W&&!!O&&(O.title||O.subtitle)&&e.jsxs("div",{className:c1,children:[!!O.title&&e.jsx("p",{children:O.title}),!!O.subtitle&&e.jsx("p",{className:d1,children:O.subtitle})]}),!!O&&O.warnBeforeUnloadMessage&&e.jsxs("div",{style:{backgroundColor:"#fff3cd",color:"#856404",padding:"12px 16px",marginBottom:"16px",borderRadius:"4px",border:"1px solid #ffeaa7",display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx("span",{style:{fontSize:"20px"},children:"⚠️"}),e.jsx("span",{children:O.warnBeforeUnloadMessage})]}),(ie=O,!!ie&&void 0!==ie.iframe&&e.jsx("div",{className:e1,children:e.jsx("iframe",{src:O.iframe.src,title:O.title,width:O.iframe.width||"100%",height:O.iframe.height||"100%",frameBorder:"0",allowFullScreen:!0})})),b1(O)&&e.jsxs("div",{className:n1,children:[e.jsx("div",{id:O.externalWidget.anchorId,className:r1}),I&&"pending"===H&&!q&&e.jsxs("div",{className:a1,role:"status","aria-live":"polite",children:[e.jsx("span",{className:i1,children:e.jsx(we,{})}),e.jsx("p",{children:"Finding available appointments…"})]}),("no_render"===H||"error"===H)&&!O.externalWidget.fallbackStep&&e.jsx("div",{className:o1,children:e.jsx("p",{children:"We're sorry, we couldn't load the booking form. Please try again later."})})]}),e.jsx("div",{children:function(){if(!O)return[];var t=O.fields||[],n=t.map(function(n,o){var a,i,s,l,u,c,d,p,f,m,y=o===t.length-1;switch(n.type){case"TEXT":m="ADDRESS"===n.format?e.jsx(X0,{field:n,onFieldChange:re,value:r.current[n.name],errorMessage:null===(a=b[n.name])||void 0===a?void 0:a.message,required:n.mandatory,googleMapsApiKey:oe.googleMapsApiKey,mapsBaseUrl:oe.mapsBaseUrl},n.name):e.jsx(Tb,{field:n,onFieldChange:re,value:r.current[n.name],errorMessage:null===(i=b[n.name])||void 0===i?void 0:i.message,required:n.mandatory,isLastField:y},n.name);break;case"DROPDOWN":var g=n,v=r.current[g.name],x=void 0;if(v&&"none"!==v){var _=g.items.find(function(e){return e.id===v});if(_&&_.freeFormInput){var w=_.freeFormFieldName||"message";x=null===(s=b[w])||void 0===s?void 0:s.message}}m=e.jsx(Eb,{field:g,onFieldChange:re,errorMessage:null===(l=b[n.name])||void 0===l?void 0:l.message,required:n.mandatory,freeFormErrorMessage:x},n.name);break;case"CHECK":m=e.jsx(Tp,{field:n,onFieldChange:re,errorMessage:null===(u=b[n.name])||void 0===u?void 0:u.message},n.name);break;case"CHIPS":m=e.jsx(wb,{field:n,onFieldChange:re,errorMessage:null===(c=b[n.name])||void 0===c?void 0:c.message,value:r.current[n.name]},n.name);break;case"DATE":var O=null==ae?void 0:ae.busyDays;m=e.jsx(w0,{field:n,onFieldChange:re,errorMessage:null===(d=b[n.name])||void 0===d?void 0:d.message,busyDays:O,loading:E},n.name);break;case"DATETIME":m=e.jsx(V0,{field:n,onFieldChange:re,value:r.current[n.name],errorMessage:null===(p=b[n.name])||void 0===p?void 0:p.message,required:n.mandatory,busyDays:null==ae?void 0:ae.busyDays},n.name);break;case"DATERANGE":m=e.jsx(k0,{field:n,onFieldChange:re,value:r.current[n.name],errorMessage:null===(f=b[n.name])||void 0===f?void 0:f.message,required:n.mandatory,isLastField:y},n.name);break;case"CARD":m=e.jsx(mb,{field:Fc(n,M()),onFieldChange:re},n.name);break;default:m=null}return e.jsx("div",{className:"".concat(l1," ").concat(!1!==h[n.name]?u1:""),children:m},o)});return n}()}),!!B&&e.jsx("div",{className:s1,role:"alert",children:e.jsx("p",{children:B})}),!!S&&"omit"!==O.nextAction&&O.final&&e.jsx("div",{className:p1,children:e.jsx(Rc,{className:ne()||_?g1:O.nextLabel?y1:h1,disabled:_,onClick:ee,variant:"contained",children:_?"Loading...":O.nextLabel||"Next"})}),e.jsxs("div",{className:f1,children:[void 0===k&&e.jsx("div",{className:m1}),!!k&&"omit"!==O.previousAction&&e.jsx(Rc,{className:h1,onClick:function(){te(r.current),k&&k()},variant:"contained",children:O.previousLabel||"Previous"}),!!S&&"omit"!==O.nextAction&&!O.final&&e.jsx(Rc,{className:ne()||_?g1:O.nextLabel?y1:h1,disabled:_,onClick:ee,variant:"contained",children:_?"Loading...":O.nextLabel||"Next"})]})]})},w1="FormFrame-module_xapp_form_frame_root__BLTha",O1="FormFrame-module_xapp_form_frame_intro__S4kWd",S1="FormFrame-module_xapp_form_frame_title__GA8dy",k1="FormFrame-module_xapp_form_frame_subtitle__WOeJI",j1="FormFrame-module_xapp_form_frame_framed__9E311",P1="FormFrame-module_xapp_form_frame_plain__rBarK",T1="FormFrame-module_xapp_form_frame_tab_row__osSVR",C1="FormFrame-module_xapp_form_frame_tab__0O2ga";te(".FormFrame-module_xapp_form_frame_root__BLTha {\n display: block;\n}\n\n.FormFrame-module_xapp_form_frame_intro__S4kWd {\n background-color: #ffffff;\n padding: 28px 16px 18px;\n text-align: center;\n}\n\n.FormFrame-module_xapp_form_frame_title__GA8dy {\n margin: 0;\n font-family: Poppins, Arial, Verdana, sans-serif;\n font-size: 24px;\n font-weight: 700;\n line-height: 1.15;\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87));\n}\n\n.FormFrame-module_xapp_form_frame_subtitle__WOeJI {\n margin: 6px 0 0 0;\n font-family: Poppins, Arial, Verdana, sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 1.4;\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87));\n opacity: 0.75;\n}\n\n.FormFrame-module_xapp_form_frame_framed__9E311 {\n position: relative;\n border: 4px solid var(--xapp-form-widget-border-color, #d3d3df);\n border-radius: 0;\n background-color: var(--xapp-form-widget-background-color, #f3f8fb);\n margin-top: -2px;\n padding: 24px 22px 8px;\n}\n\n.FormFrame-module_xapp_form_frame_plain__rBarK {\n display: block;\n}\n\n.FormFrame-module_xapp_form_frame_tab_row__osSVR {\n background-color: #ffffff;\n text-align: center;\n}\n\n.FormFrame-module_xapp_form_frame_tab__0O2ga {\n display: inline-block;\n position: relative;\n z-index: 1;\n padding: 12px 30px;\n border-radius: 12px 12px 0 0;\n background-color: var(--xapp-form-widget-header-background-color, #012b54);\n color: var(--xapp-form-widget-header-text-color, #b7c5d1);\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n font-size: 14px;\n font-weight: 700;\n letter-spacing: 1px;\n white-space: nowrap;\n}");var M1=function(t){var n=t.framing,r=t.framed,o=t.title,a=t.subtitle,i=t.children,s=null==n?void 0:n.tabLabel,l=(null==n?void 0:n.introPlacement)||"above-tab",u=o||a?e.jsxs("div",{className:O1,"data-xapp-form-frame-intro":"",children:[!!o&&e.jsx("h2",{className:S1,"data-xapp-form-frame-title":"",children:o}),!!a&&e.jsx("p",{className:k1,"data-xapp-form-frame-subtitle":"",children:a})]}):null;return e.jsxs("div",{className:w1,children:["above-tab"===l&&u,r&&!!s&&e.jsx("div",{className:T1,children:e.jsx("span",{className:C1,"data-xapp-form-frame-tab":"",children:s})}),e.jsxs("div",{className:r?j1:P1,"data-xapp-form-frame":r?"framed":"plain",children:["inline"===l&&u,i]})]})},E1="SimpleNavigationHeader-module_xapp_navigation_header__YhCD1",D1="SimpleNavigationHeader-module_xapp_navigation_header_showcase__NhRLn",N1="SimpleNavigationHeader-module_xapp_navigation_header_container__V9y-e";te(".SimpleNavigationHeader-module_xapp_navigation_header__YhCD1 {\n background-color: inherit !important;\n}\n\n.SimpleNavigationHeader-module_xapp_navigation_header_showcase__NhRLn {\n background-color: inherit !important;\n padding: 0px !important;\n}\n\n.SimpleNavigationHeader-module_xapp_navigation_header_container__V9y-e {\n background-color: inherit !important;\n}");var R1=function(t){var n=t.items,r=t.onHeaderClick,o=t.labelHeader,a=t.stepName,i=t.isShowCase;if(o){var s=n.find(function(e){return e.step===a}),l=null==s?void 0:s.label;return void 0!==l?e.jsx(fy,{display:"flex",justifyContent:"center",gap:2,padding:2,"min-height":100,className:i?D1:N1,children:e.jsx(mp,{variant:"h4",color:"white",margin:0,children:l})}):e.jsx(fy,{display:"flex",justifyContent:"center",gap:2,padding:2,"min-height":100,className:i?D1:N1,children:e.jsx("div",{className:"empty_step_header"})})}return e.jsx(fy,{display:"flex",justifyContent:"center",gap:2,padding:2,"min-height":100,className:E1,children:e.jsx(fy,{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",width:"100%",minHeight:"50px",sx:{"&::before":{content:'""',position:"absolute",top:"50%",left:0,right:0,height:"3px",backgroundColor:"white",zIndex:1}},children:n.map(function(t,n){return e.jsxs(fy,{position:"relative",zIndex:2,display:"flex",flexDirection:"column",alignItems:"center",top:"10px",minWidth:100,children:[e.jsx(Rc,{variant:"contained",color:"primary",size:"small",style:{borderRadius:"50%",minWidth:"auto",width:"30px",height:"30px",display:"flex",alignItems:"center",justifyContent:"center",border:"3px solid white"},className:E1,onClick:function(){r("".concat(t.step))}}),e.jsx(mp,{variant:"body2",color:"white",margin:1,marginTop:1,children:t.label})]},n)})})})};
321
- /*! Copyright (c) 2025, XAPP AI */function $1(e,t){var n=e.slice(0,5);return!!t.find(function(e){if(e===n)return!0;if(e.includes("*")){var t=e.replace(/\*/g,"\\d")+"$";return new RegExp("^".concat(t)).test(n)}return!1})}function I1(e){if(e){var t=e.match(/\b\d{5}(?:-\d{4})?\b/g);if(t)for(var n=t.length-1;n>=0;n--){var r=t[n],o=e.indexOf(r),a=e.slice(0,o);if(/(,|\b[A-Z]{2})\s*$/.test(a.trim()))return r;if(o>15)return r}}}var F1="FormDisplay-module_xapp_formstep__OW1rY",A1="FormDisplay-module_active__5wTV3",L1="FormDisplay-module_xapp_header_container__Y-eFl",z1="FormDisplay-module_xapp_header_container_showcase__MWJfr";te(".FormDisplay-module_xapp_formstep__OW1rY {\n display: none;\n padding: 8px;\n}\n.FormDisplay-module_xapp_formstep__OW1rY.FormDisplay-module_active__5wTV3 {\n display: block;\n background-color: var(--xapp-form-widget-background-color, #f3f8fb) !important;\n}\n.FormDisplay-module_xapp_formstep__OW1rY.FormDisplay-module_title__-BtIw p {\n margin: 10px 0 0 0;\n}\n.FormDisplay-module_xapp_formstep__OW1rY {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n\n.FormDisplay-module_xapp_header_container__Y-eFl {\n background-color: var(--xapp-form-widget-header-background-color, #012b54) !important;\n position: absolute;\n top: 0px;\n right: 0px;\n left: 0px;\n z-index: 1000;\n min-height: 88px;\n padding-top: 16px;\n}\n.FormDisplay-module_xapp_header_container__Y-eFl .FormDisplay-module_empty_step_header__eHbBH {\n height: 42px;\n}\n.FormDisplay-module_xapp_header_container__Y-eFl {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.FormDisplay-module_xapp_header_container__Y-eFl .MuiTypography-root {\n color: var(--xapp-form-widget-header-text-color, #b7c5d1) !important;\n}\n\n.FormDisplay-module_xapp_header_container_showcase__MWJfr {\n border-top-left-radius: 12px;\n border-top-right-radius: 12px;\n background-color: var(--xapp-form-widget-header-background-color, #012b54) !important;\n padding-top: 10px;\n padding-bottom: 10px;\n margin-top: 10px;\n}\n.FormDisplay-module_xapp_header_container_showcase__MWJfr .FormDisplay-module_empty_step_header__eHbBH {\n height: 42px;\n}\n.FormDisplay-module_xapp_header_container_showcase__MWJfr {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.FormDisplay-module_xapp_header_container_showcase__MWJfr .MuiTypography-root {\n color: var(--xapp-form-widget-header-text-color, #b7c5d1) !important;\n}");var V1=function(n){var r,o=n.form,a=n.onActionResponse,s=n.isShowCase,c=n.loading,d=n.onTrackNextStep,p=n.onTrackPreviousStep,f=n.onTrackSubmit,m=n.onTrackSubmitFailure,h=n.currentStepDataRef,y=n.onFormNext,g=n.stepUpdate,b=n.onTrackHandoffRendered,x=n.onTrackHandoffNoRender,_=n.onTrackHandoffScheduled,w=n.onTrackHandoffError,O=t.useContext(me).framing,S=t.useState(0),k=S[0],j=S[1],P=t.useState({}),T=P[0],C=P[1],M=t.useState(void 0),E=M[0],D=M[1],N=function(e){var t=e.step;t&&C(function(n){var r,o,a,s=n[t],l={fields:e.fields||[]};return(null===(o=e.externalWidget)||void 0===o?void 0:o.config)?l.externalWidget={config:i(i({},null===(a=null==s?void 0:s.externalWidget)||void 0===a?void 0:a.config),e.externalWidget.config)}:(null==s?void 0:s.externalWidget)&&(l.externalWidget=s.externalWidget),i(i({},n),((r={})[t]=l,r))})};t.useEffect(function(){g&&N(g)},[g]);var R=t.useRef({});t.useEffect(function(){if(Array.isArray(o.steps)&&o.steps.length>0)for(var e=function(e){if(e.condition){var t=$c(e.condition,"context",["isInServiceArea"]);R.current[e.name]=function(e){return new Function("context","isInServiceArea","return (".concat(t,");"))(e,$1)}}},t=0,n=o.steps;t<n.length;t++){e(n[t])}},[null==o?void 0:o.steps]),t.useEffect(function(){var e;(k<0||k>=(null===(e=null==o?void 0:o.steps)||void 0===e?void 0:e.length))&&j(0)},[null==o?void 0:o.steps,k]);var $=t.useMemo(function(){var e,t,n=null===(e=o.steps)||void 0===e?void 0:e[k];return null!==(t=null==n?void 0:n.warnBeforeUnload)&&void 0!==t&&t},[k,o.steps]);t.useEffect(function(){if($){var e=function(e){return e.preventDefault(),e.returnValue="",""};return window.addEventListener("beforeunload",e),function(){window.removeEventListener("beforeunload",e)}}},[$]);var I=t.useRef({}),F=t.useRef({}),A=t.useRef({}),L=t.useRef(!1);t.useEffect(function(){L.current=!1},[k]);var z=function(e){return l(void 0,void 0,void 0,function(){var t,n,r,a,s,l,c,d,p,f,m,h,g,b;return u(this,function(u){switch(u.label){case 0:for(t=-1,n=k+1;n<o.steps.length;n++){if(r=o.steps[n],a=R.current[r.name],s=I.current.zip_code||I.current.zip||I1(I.current.address),l=i(i({},I.current),{zip:s}),!a){t=n;break}if(a(l)){t=n;break}}if(c=o.steps[k],!(t>=0&&!e&&y&&(null==c?void 0:c.serverCallback)))return[3,4];C(function(e){var n=i({},e);return delete n[o.steps[t].name],n}),u.label=1;case 1:return u.trys.push([1,3,,4]),d=new Promise(function(e){return setTimeout(function(){return e(void 0)},3e3)}),p=y({result:A.current,form:o.name,step:o.steps[k].name,nextStep:o.steps[t].name}),[4,Promise.race([p,d])];case 2:if(f=u.sent(),null==(m=f)?void 0:m.displays)for(h=0,g=m.displays;h<g.length;h++)"FORM_STEP_UPDATE"===(b=g[h]).type&&N(b);return[3,4];case 3:return u.sent(),[3,4];case 4:return t>=0&&j(t),e?[4,Y(k)]:[3,6];case 5:u.sent(),u.label=6;case 6:return[2]}})})},V=function(){for(var e,t,n=k,r=(null===(t=null===(e=o.steps)||void 0===e?void 0:e[n])||void 0===t?void 0:t.name)||"unknown",a=k-1;a>=0;a--){var s=o.steps[a],l=R.current[s.name],u=I.current.zip_code||I.current.zip||I1(I.current.address),c=i(i({},I.current),{zip:u});if(!l){p&&p(r,n,s.name,a),j(a);break}if(l(c)){p&&p(r,n,s.name,a),j(a);break}}},B=function(e){A.current=e,I.current=i(i({},I.current),e)},W=function(){return I.current},U=function(e){F.current=i(i({},F.current),e)},H=function(){return F.current},Y=function(e){return l(void 0,void 0,void 0,function(){var t,n,r,i,s;return u(this,function(l){switch(l.label){case 0:if(L.current)return[2];if(L.current=!0,n=(t=null!=e?e:k)>=0&&t<o.steps.length?t:0,f&&f(o.steps[n].name,n,I.current,o.steps.length),r={result:I.current,form:o.name,step:o.steps[n].name,final:!!o.steps[n].final},"function"!=typeof a)return[2];D(void 0),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,a(r,"FORM_SUBMIT")];case 2:return l.sent(),[3,4];case 3:return i=l.sent(),L.current=!1,D(n),s=i instanceof Error?i.message:String(i),v("FORM_SUBMIT failed on step ".concat(o.steps[n].name,": ").concat(s)),m&&m(o.steps[n].name,n,o.steps.length,s),[3,4];case 4:return[2]}})})},q=function(e){var t=o.steps.findIndex(function(t){return t.name===e});-1!==t?j(t):v("External widget fallback: Cannot find step to jump to: ".concat(e))},G=k;return(k<0||k>=(null===(r=null==o?void 0:o.steps)||void 0===r?void 0:r.length))&&(G=0),e.jsxs("div",{children:[o.header.length>0&&e.jsx("div",{className:s?z1:L1,children:e.jsx(R1,{items:o.header,onHeaderClick:function(e){var t=o.steps.findIndex(function(t){return t.name===e});-1!==t?j(t):v("Header click: Cannot find step to jump to: ".concat(e))},labelHeader:o.labelHeader,stepName:o.steps[G].name,isShowCase:s})}),e.jsx("div",{children:o.steps.map(function(t,n){var r,a=T[t.name],s=t;if((null==a?void 0:a.fields)&&(s=i(i({},s),{fields:a.fields})),null===(r=null==a?void 0:a.externalWidget)||void 0===r?void 0:r.config){var l=t.externalWidget;l&&(s=i(i({},s),{externalWidget:i(i({},l),{config:i(i({},l.config),a.externalWidget.config)})}))}var u=o.steps[G].name===t.name,p=!b1(s),f=e.jsx(_1,{formStep:s,onData:B,onDataWithLabels:U,onNextStep:G<o.steps.length?z:void 0,onPrevStep:G>0?V:void 0,getData:W,getDataWithLabels:H,loading:c,currentStepIndex:n,totalSteps:o.steps.length,onTrackNextStep:d,currentStepDataRef:h,isActive:u,onTrackHandoffRendered:b,onTrackHandoffNoRender:x,onTrackHandoffScheduled:_,onTrackHandoffError:w,onExternalWidgetFallback:q,hideIntro:!!O,submitError:E===n?"We couldn't submit your information. Please check your connection and try again.":void 0});return e.jsx("div",{className:"".concat(F1," ").concat(u?A1:""),"data-xapp-form-step-active":u?"true":"false",children:O?e.jsx(M1,{framing:O,framed:p,title:s.title,subtitle:s.subtitle,children:f}):f},n)})})]})},B1=function(t){var n=t.display,r=t.onActionResponse,o=t.loading,a=t.onTrackNextStep,i=t.onTrackPreviousStep,s=t.onTrackSubmit,l=t.onTrackSubmitFailure,u=t.currentStepDataRef,c=t.onFormNext,d=t.stepUpdate,p=t.onTrackHandoffRendered,f=t.onTrackHandoffNoRender,m=t.onTrackHandoffScheduled,h=t.onTrackHandoffError;return e.jsxs("div",{className:"xapp-search-response-display",children:[w(n)&&e.jsx(V1,{form:n,loading:o,onActionResponse:r,onTrackNextStep:a,onTrackPreviousStep:i,onTrackSubmit:s,onTrackSubmitFailure:l,currentStepDataRef:u,onFormNext:c,stepUpdate:d,onTrackHandoffRendered:p,onTrackHandoffNoRender:f,onTrackHandoffScheduled:m,onTrackHandoffError:h}),_(n)&&e.jsx(et,{list:n}),x(n)&&e.jsx(Xe,{carousel:n})]})},W1=function(t){var n=t.html;return e.jsx("div",{className:"xapp-search-response-html",dangerouslySetInnerHTML:{__html:n}})},U1=function(t){var n=t.text;return e.jsx("div",{className:"xapp-search-response-text",children:e.jsx("p",{children:n})})},H1=function(n){var r=n.audio,o=n.onAudioChange,a=t.useRef(null);return t.useEffect(function(){var e=a.current,t=function(){b("Audio finished playing"),o(!1)},n=function(){b("Audio started playing"),o(!0)};return e&&(e.addEventListener("ended",t),e.addEventListener("play",n)),function(){e&&(e.removeEventListener("ended",t),e.removeEventListener("play",n))}},[r,o]),e.jsx("audio",{ref:a,autoPlay:!0,src:r})},Y1="SearchResponseOutputSpeech-module_xapp_search_response_output_speech__DCf8F";te('/**\n * The phone breakpoint.\n *\n * Width alone cannot express "phone". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step\'s action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n.SearchResponseOutputSpeech-module_xapp_search_response_output_speech__DCf8F {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n font-weight: normal;\n font-size: 16px;\n font-style: normal;\n color: #000;\n}\n.SearchResponseOutputSpeech-module_xapp_search_response_output_speech__DCf8F p {\n margin: 0 0 1em 0;\n}\n.SearchResponseOutputSpeech-module_xapp_search_response_output_speech__DCf8F p:last-child {\n margin-bottom: 0;\n}');var q1=function(n){var r,o=n.outputSpeech,a=n.onAudioChange,i="string"==typeof o?o:null==o?void 0:o.displayText,s="string"==typeof o||null==o?void 0:o.html,l="string"==typeof o||null==o?void 0:o.ssml;if(t.useContext(me).isVoiceEnabled){var u=l?function(e){for(var t,n=/<audio\s+src\s*=\s*"(.+?)"\s*\/?>/g,r=[];null!==(t=n.exec(e));)r.push(t[1]);return r}(l):[];r=u.length>0?u[0]:void 0}return e.jsxs("div",{className:Y1,children:[!!s&&e.jsx(W1,{html:s}),!!i&&!s&&e.jsx(U1,{text:i}),!!r&&e.jsx(H1,{audio:r,onAudioChange:a})]})},G1={};Object.defineProperty(G1,"__esModule",{value:!0});var K1=G1.isLinkoutSuggestion=function(e){if(!e)return!1;return void 0!==e.url};var X1="Button-module_xapp_search_btn__cQf3T",Z1="Button-module_xapp_search_btn__expand__dUwot";te('/**\n * The phone breakpoint.\n *\n * Width alone cannot express "phone". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step\'s action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n.Button-module_xapp_search_btn__cQf3T {\n display: inline-block;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px);\n border: solid 1px var(--xapp-form-widget-border-color, #d3d3df);\n background: white;\n padding: 4px 24px;\n color: black;\n text-decoration: none;\n box-sizing: border-box;\n text-align: center;\n line-height: normal;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n font-size: 16px;\n cursor: pointer;\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out, transform 150ms ease-in-out;\n}\n.Button-module_xapp_search_btn__cQf3T:hover {\n background-color: rgba(0, 0, 0, 0.04);\n box-shadow: var(--xapp-form-widget-box-shadow-subtle, 0 2px 8px rgba(0, 0, 0, 0.08));\n}\n.Button-module_xapp_search_btn__cQf3T:active {\n transform: scale(0.98);\n}\n.Button-module_xapp_search_btn__cQf3T:focus {\n outline: none;\n}\n.Button-module_xapp_search_btn__cQf3T:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n.Button-module_xapp_search_btn__expand__dUwot {\n width: 100%;\n}');var Q1=function(t){var n=t.className,r=t.expand,o=t.onClick;return e.jsx("button",{type:"button",className:"".concat(X1," ").concat(r?Z1:""," ").concat(n||""),onClick:o,children:t.children})},J1="SuggestedAction-module_xapp_search_suggested_action__gbLCz";te('/**\n * The phone breakpoint.\n *\n * Width alone cannot express "phone". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step\'s action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n.SuggestedAction-module_xapp_search_suggested_action__gbLCz {\n display: inline-block;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px);\n border: solid 1px var(--xapp-form-widget-border-color, var(--xapp-form-accent-color, #d3d3df));\n background: white;\n padding: 4px 24px;\n color: black;\n text-decoration: none;\n box-sizing: border-box;\n text-align: center;\n line-height: normal;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n font-size: 16px;\n cursor: pointer;\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out, transform 150ms ease-in-out;\n}\n.SuggestedAction-module_xapp_search_suggested_action__gbLCz:hover {\n background-color: rgba(0, 0, 0, 0.04);\n box-shadow: var(--xapp-form-widget-box-shadow-subtle, 0 2px 8px rgba(0, 0, 0, 0.08));\n}\n.SuggestedAction-module_xapp_search_suggested_action__gbLCz:active {\n transform: scale(0.98);\n}\n.SuggestedAction-module_xapp_search_suggested_action__gbLCz:focus {\n outline: none;\n}\n.SuggestedAction-module_xapp_search_suggested_action__gbLCz:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}');var e2=function(n){var r=n.action,o=n.className,a=n.onClick,i=t.useCallback(function(){a(r)},[r,a]);return K1(r)?e.jsx("span",{className:"".concat(J1," ").concat(o||""),children:e.jsx("a",{href:r.url,children:fe(r)})}):e.jsxs(Q1,{className:"".concat(J1," ").concat(o||""),onClick:i,children:[" ",fe(r)]})},t2={xapp_search_suggested_actions__actions:"SuggestedActions-module_xapp_search_suggested_actions__actions__Apv0-",xapp_search_suggested_actions__item:"SuggestedActions-module_xapp_search_suggested_actions__item__Q7nQb"};te(".SuggestedActions-module_xapp_search_suggested_actions__actions__Apv0- {\n margin-top: 8px;\n margin-bottom: 8px;\n}\n.SuggestedActions-module_xapp_search_suggested_actions__item__Q7nQb {\n margin-right: 16px;\n}");var n2=function(t){var n=t.actions,r=t.onActionClick;return e.jsx("div",{className:t2.xapp_search_suggested_actions,children:e.jsx("div",{className:t2.xapp_search_suggested_actions__actions,children:n.map(function(t,n){return e.jsx(e2,{action:t,className:t2.xapp_search_suggested_actions__item,onClick:r},n)})})})},r2="SearchResponsePart-module_xapp_search_response_part__sF6gs";te(".SearchResponsePart-module_xapp_search_response_part__sF6gs {\n margin-bottom: 12px;\n margin-top: 86px;\n border-radius: 8px;\n}\n.SearchResponsePart-module_xapp_search_response_part__sF6gs.SearchResponsePart-module_noHeaderForm__HdlyL {\n margin-top: 12px;\n}");var o2=function(t){var n=t.extraClass;return e.jsx("div",{className:"".concat(r2," ").concat(n||""),children:t.children})},a2="FormResponse-module_xapp_search_response__r2YN1";te(".FormResponse-module_xapp_search_response__r2YN1 {\n padding: 0 10px;\n overflow: auto;\n}");var i2=function(t){var n=t.response,r=t.className,o=t.onActionClick,a=t.onActionResponse,i=t.onAudioChange,s=t.loading,l=t.onTrackNextStep,u=t.onTrackPreviousStep,c=t.onTrackSubmit,d=t.onTrackSubmitFailure,p=t.currentStepDataRef,f=t.onFormNext,m=t.stepUpdate,h=t.onTrackHandoffRendered,y=t.onTrackHandoffNoRender,g=t.onTrackHandoffScheduled,b=t.onTrackHandoffError,v=n.outputSpeech,x=n.displays,_="object"==typeof v?v.suggestions:void 0;return e.jsxs("div",{className:"".concat(a2," ").concat(r||""),children:[!!v&&e.jsx(o2,{children:e.jsx(Se,{children:e.jsx(q1,{outputSpeech:v,onAudioChange:i})})}),!!(null==_?void 0:_.length)&&(null==_?void 0:_.length)>0&&e.jsx(n2,{actions:_,onActionClick:o}),!!(null==x?void 0:x.length)&&(null==x?void 0:x.length)>0&&x.map(function(t,n){var r=w(t)&&(!t.header||0===t.header.length);return e.jsx(o2,{extraClass:r?"noHeaderForm":"",children:e.jsx(B1,{display:t,onActionResponse:a,loading:s,onTrackNextStep:l,onTrackPreviousStep:u,onTrackSubmit:c,onTrackSubmitFailure:d,currentStepDataRef:p,onFormNext:f,stepUpdate:m,onTrackHandoffRendered:h,onTrackHandoffNoRender:y,onTrackHandoffScheduled:g,onTrackHandoffError:b})},n)})]})},s2=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","gclid","fbclid","msclkid"],l2=function(){function e(e,t,n){this.api=e,this.sessionId=t,this.formId=n}return e.prototype.trackFormOpen=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"form_open",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] form_open event tracked: ".concat(e.formName)),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track form_open event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackEngaged=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"engaged",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] engaged event tracked: ".concat(e.formName," (").concat(e.trigger,")")),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track engaged event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackNextStep=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"next_step",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] next_step event tracked: ".concat(e.completedStepName)),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track next_step event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackPreviousStep=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"previous_step",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] previous_step event tracked: ".concat(e.fromStepName," -> ").concat(e.toStepName)),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track previous_step event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackStepChange=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"step_change",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] step_change event tracked: ".concat(e.fromStepName," -> ").concat(e.toStepName," (").concat(e.direction,")")),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track step_change event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackSubmit=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"submit",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] submit event tracked: ".concat(e.finalStepName)),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track submit event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackSubmitFailure=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"submit_failure",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] submit_failure event tracked: ".concat(e.finalStepName)),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track submit_failure event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackClose=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"close",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] close event tracked: ".concat(e.lastStepName)),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track close event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackPartialData=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"partial_data",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] partial_data event tracked: ".concat(e.lastStepName," (").concat(e.abandonmentReason,")")),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track partial_data event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackHandoffRendered=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"handoff_rendered",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] handoff_rendered event tracked: ".concat(e.stepName," (").concat(e.provider,")")),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track handoff_rendered event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackHandoffNoRender=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"handoff_no_render",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] handoff_no_render event tracked: ".concat(e.stepName," (").concat(e.provider,")")),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track handoff_no_render event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackHandoffScheduled=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"handoff_scheduled",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] handoff_scheduled event tracked: ".concat(e.stepName," (").concat(e.provider,")")),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track handoff_scheduled event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackHandoffError=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"handoff_error",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] handoff_error event tracked: ".concat(e.stepName," (").concat(e.provider,")")),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track handoff_error event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackPartialDataBeacon=function(e){try{var t={eventType:"partial_data",metadata:this.buildMetadata(),data:e};return this.api.trackEventBeacon(t)}catch(e){return v("[EventTracking] Failed to queue partial_data beacon: ".concat(e)),!1}},e.prototype.buildMetadata=function(){var e={timestamp:(new Date).toISOString(),sessionId:this.sessionId||"unknown",formId:this.formId||"unknown",userAgent:navigator.userAgent};try{var t=this.getUserId();t&&"unknown"!==t&&(e.userId=t)}catch(e){}try{var n=new URL(window.location.href);(null==n?void 0:n.host.toLowerCase().startsWith("localhost"))||(e.currentUrl=window.location.href)}catch(e){}try{var r=this.getTrackingParameters();Object.assign(e,r)}catch(e){}return e},e.prototype.getUserId=function(){return localStorage.getItem("__xapp_form_user_id")||void 0},e.prototype.getTrackingParameters=function(){var e={},t=Date.now();s2.forEach(function(n){var r=localStorage.getItem("xa_tracking_".concat(n));if(r)try{var o=JSON.parse(r);o.expires>t&&(e[n]=o.value)}catch(e){}});for(var n=0;n<localStorage.length;n++){var r=localStorage.key(n);if(r&&r.startsWith("xa_tracking_track_"))try{var o=JSON.parse(localStorage.getItem(r)||"{}");if(o.expires>t){var a=r.replace("xa_tracking_","");e[a]=o.value}}catch(e){}}return e},e.prototype.sendEvent=function(e){return l(this,void 0,void 0,function(){var t;return u(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.api.trackEvent(e.eventType,e)];case 1:return n.sent(),[3,3];case 2:return t=n.sent(),v("[EventTracking] API call failed: ".concat(t)),[3,3];case 3:return[2]}})})},e}(),u2="FormWidget-module_loading__aAJ-B",c2="FormWidget-module_xapp_form_widget__V-G-H",d2="FormWidget-module_xapp_form_widget__content__a9NXC",p2="FormWidget-module_xapp_form_widget__response__X8Hbz",f2="FormWidget-module_xapp_form_widget__spinner__FBxso",m2="FormWidget-module_xapp_form_widget__close__0lp0O";te('/**\n * The phone breakpoint.\n *\n * Width alone cannot express "phone". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step\'s action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n.FormWidget-module_loading__aAJ-B {\n background-color: rgba(0, 0, 0, 0) !important;\n border: 0px !important;\n}\n\n.FormWidget-module_xapp_form_widget__V-G-H {\n display: flex;\n flex-direction: column;\n border: solid 1px var(--xapp-form-widget-border-color, #d3d3df);\n background: var(--xapp-form-widget-background-color, #f3f8fb);\n border-radius: var(--xapp-form-widget-border-radius-xl, 20px);\n overflow: hidden;\n max-width: 740px;\n max-height: 100%;\n box-shadow: var(--xapp-form-widget-box-shadow, 0 4px 24px rgba(0, 0, 0, 0.12));\n box-sizing: border-box;\n position: relative;\n}\n.FormWidget-module_xapp_form_widget__content__a9NXC {\n display: flex;\n flex-direction: column;\n border-top: solid 1px var(--xapp-form-widget-border-color, #d3d3df);\n max-height: 100%;\n min-height: 128px;\n overflow: hidden;\n width: 100%;\n}\n.FormWidget-module_xapp_form_widget__response__X8Hbz {\n padding-top: 1em;\n}\n.FormWidget-module_xapp_form_widget__spinner__FBxso {\n width: 100px;\n height: 100px;\n margin: auto;\n padding: 20px;\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O {\n position: absolute;\n top: 8px;\n right: 8px;\n width: 28px;\n height: 28px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #666;\n cursor: pointer;\n font-weight: bold;\n border: none;\n background: rgba(255, 255, 255, 0.9);\n z-index: 1000;\n transition: background-color 200ms ease-in-out, transform 150ms ease-in-out, box-shadow 200ms ease-in-out;\n box-shadow: var(--xapp-form-widget-box-shadow-subtle, 0 2px 8px rgba(0, 0, 0, 0.08));\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O::before {\n content: "";\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 44px;\n height: 44px;\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O:hover {\n background-color: rgb(255, 255, 255);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n transform: scale(1.05);\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O:active {\n transform: scale(0.95);\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O:focus {\n outline: none;\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n\n@media (min-width: 1201px) {\n .FormWidget-module_xapp_form_widget__V-G-H {\n width: 740px;\n /*\n &__content {\n width: 740px;\n } */\n }\n}\n@media (min-width: 992px) and (max-width: 1200px) {\n .FormWidget-module_xapp_form_widget__V-G-H {\n width: 600px;\n /* &__content {\n width: 600px;\n } */\n }\n}\n@media (min-width: 641px) and (max-width: 991px) {\n .FormWidget-module_xapp_form_widget__V-G-H {\n width: 500px;\n /* &__content {\n width: 500px; \n } */\n }\n}\n/* Mobile */\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormWidget-module_xapp_form_widget__V-G-H {\n width: 100%;\n max-width: none;\n height: 100%;\n border-radius: 0;\n border: 0;\n }\n .FormWidget-module_xapp_form_widget__content__a9NXC {\n width: 100%;\n border-top: 0;\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n }\n}');var h2=[1e3,2e3];var y2=function(t){var n=t.config;return e.jsx(me.Provider,{value:n,children:e.jsx(g2,{docked:t.docked,openedByTrigger:t.openedByTrigger,preselectChipLabel:t.preselectChipLabel,onPreselectChipUsed:t.onPreselectChipUsed,onSubmit:t.onSubmit})})},g2=function(n){var r,o=n.docked,a=n.openedByTrigger,s=n.preselectChipLabel,c=n.onPreselectChipUsed,d=n.onSubmit,p=T(),f=p[0],m=p[1],h=he(),g=h.loading,x=h.run,_=f.query,w=f.sendRequest,O=f.active,S=t.useState(n.response),k=S[0],j=S[1],P=t.useState(void 0),C=P[0],M=P[1],E=t.useState(!1),D=E[0],N=E[1],R=t.useState(0),$=R[0],I=R[1],F=t.useContext(me),A=be(F.api.demoMode||null===(r=F.trustedForm)||void 0===r?void 0:r.scriptUrl),L=t.useMemo(function(){return pe.getApi({key:F.api.key,url:F.api.url,intentId:F.intentId,demoMode:F.api.demoMode})},[F]),z=t.useRef(null),V=t.useRef({}),B=t.useRef({}),W=t.useRef(0),U=t.useRef(!1),H=t.useRef(!1),Y=t.useRef(void 0),q=t.useCallback(function(){var e=Y.current;if(e)return e;var t=ee();return Y.current=t,t},[]),G=t.useRef(null),K=t.useRef("unknown"),X=t.useRef(!1),Z=t.useRef(!1),Q=t.useRef(!1),J=t.useCallback(function(e){var t,n,r;z.current&&!Q.current&&(Q.current=!0,z.current.trackEngaged({formName:K.current,trigger:e,firstStepName:null===(r=null===(n=null===(t=G.current)||void 0===t?void 0:t.steps)||void 0===n?void 0:n[0])||void 0===r?void 0:r.name}))},[]),te=t.useCallback(function(){j(void 0),m({type:"new-search"}),m({type:"set-modal-state",active:!1,minimized:!0,sendRequest:!1})},[m]),ne=t.useCallback(function(){var e,t,n,r,o;if(z.current&&!U.current&&!X.current){var a=G.current;if(a){var s=(null===(e=a.steps)||void 0===e?void 0:e.length)||1,l=W.current,u=i(i({},V.current),B.current),c=Object.keys(u).length>0;z.current.trackClose({lastStepName:(null===(n=null===(t=a.steps)||void 0===t?void 0:t[l])||void 0===n?void 0:n.name)||"unknown",lastStepIndex:l,totalStepsCompleted:l,totalSteps:s,formData:c?u:void 0}),z.current.trackPartialData({lastStepName:(null===(o=null===(r=a.steps)||void 0===r?void 0:r[l])||void 0===o?void 0:o.name)||"unknown",lastStepIndex:l,totalStepsCompleted:l,totalSteps:s,partialData:c?u:void 0,abandonmentReason:"widget_close"}),X.current=!0}}j(void 0),m({type:"new-search"}),m({type:"set-modal-state",active:!1,minimized:!1,sendRequest:!1}),L.channelActionRequest({data:{result:{},step:"",form:""}},"FORM_CLOSE").then(function(e){b("ACTION Request (FORM_CLOSE). Data: Response: ".concat(JSON.stringify(e))),I(0)})},[L,m]);t.useEffect(function(){var e=y(window.location.href,{persistToLocalStorage:!0,persistenceDays:30,preferUrlParameters:!0});"development"===process.env.NODE_ENV&&Object.keys(e).length>0&&b("[FormWidget] Captured tracking parameters:",e)},[]),t.useEffect(function(){var e=function(){var e,t,n,r=i(i({},V.current),B.current);if(z.current&&!U.current&&!X.current){var o=G.current;if(o){var a=(null===(e=o.steps)||void 0===e?void 0:e.length)||1,s=W.current;z.current.trackPartialDataBeacon({lastStepName:(null===(n=null===(t=o.steps)||void 0===t?void 0:t[s])||void 0===n?void 0:n.name)||"unknown",lastStepIndex:s,partialData:r,totalStepsCompleted:s,totalSteps:a,completionPercentage:Math.round(s/a*100),abandonmentReason:"close_tab"}),X.current=!0}}};return window.addEventListener("beforeunload",e),function(){return window.removeEventListener("beforeunload",e)}},[]),t.useEffect(function(){var e=null,t=function(){var e,t,n,r=i(i({},V.current),B.current);if(z.current&&!U.current&&!X.current){var o=G.current;if(o){var a=(null===(e=o.steps)||void 0===e?void 0:e.length)||1,s=W.current;z.current.trackPartialDataBeacon({lastStepName:(null===(n=null===(t=o.steps)||void 0===t?void 0:t[s])||void 0===n?void 0:n.name)||"unknown",lastStepIndex:s,partialData:r,totalStepsCompleted:s,totalSteps:a,completionPercentage:Math.round(s/a*100),abandonmentReason:"timeout"}),X.current=!0}}},n=function(){if(document.hidden){var n=(r=new Date,(o=new Date(r)).setHours(24,0,0,0),o.getTime()-r.getTime());e=setTimeout(t,n)}else e&&(clearTimeout(e),e=null);var r,o};return document.addEventListener("visibilitychange",n),function(){document.removeEventListener("visibilitychange",n),e&&clearTimeout(e)}},[]);var re=t.useCallback(function(e,t){m({query:e.query,intentId:e.intentId,type:"set-query"}),x(function(){return L.intentRequest(e).then(function(n){var r,o,a,i,s;j(n),m({type:"set-response",response:n,query:e.query,intentId:e.intentId});var l=null===(r=null==n?void 0:n.displays)||void 0===r?void 0:r.find(function(e){var t=e;return"FORM"===(null==t?void 0:t.type)});if(l){G.current=l;var u=(null===(o=L.session)||void 0===o?void 0:o.sessionId)||"unknown",c=l.name||"unknown";if(K.current=c,z.current=new l2(L,u,c),!Z.current){Z.current=!0;var d=(null===(a=l.steps)||void 0===a?void 0:a.length)||1,p=null===(s=null===(i=l.steps)||void 0===i?void 0:i[0])||void 0===s?void 0:s.name;z.current.trackFormOpen({formName:c,totalSteps:d,firstStepName:p,lastStepIndex:0})}(null==t?void 0:t.engagementTrigger)&&J(t.engagementTrigger)}})})},[L,m,x,J]),oe=t.useCallback(function(e,t){var n=function(){return L.channelActionRequest(e,t).then(function(n){var r;if(b("ACTION Request (".concat(t,"). Data: ").concat(JSON.stringify(e)," Response: ").concat(JSON.stringify(n))),function(e){return!!e&&!0===e[se]}(n)&&v("ACTION Request (".concat(t,") was suppressed: this session already sent a final submit.")),(n.outputSpeech||n.displays)&&m({type:"set-response",response:n,query:""}),"FORM_SUBMIT"===t&&n.displays){var o=n.displays.find(function(e){return"FORM_STEP_UPDATE"===(null==e?void 0:e.type)});o&&M(o)}if((null===(r=n.context)||void 0===r?void 0:r.active)&&n.context.active.length>0){var a=n.context.active[0].parameters||{};m({type:"set-context",context:a})}e.autoClose?I(1):e.autoMinimize?I(2):I(0)})};return"FORM_SUBMIT"===t?x(function(){return function(e,t){return l(this,void 0,void 0,function(){var n,r,o;return u(this,function(a){switch(a.label){case 0:r=0,a.label=1;case 1:return r<=t.length?r>0?[4,(i=t[r-1],new Promise(function(e){setTimeout(e,i)}))]:[3,3]:[3,7];case 2:a.sent(),a.label=3;case 3:return a.trys.push([3,5,,6]),[4,e()];case 4:return[2,a.sent()];case 5:return o=a.sent(),n=o,v("FORM_SUBMIT attempt ".concat(r+1," of ").concat(t.length+1," failed: ").concat(o)),[3,6];case 6:return r++,[3,1];case 7:throw n}var i})})}(n,h2)}):x(n).catch(function(e){v("ACTION Request (".concat(t,") failed: ").concat(e))})},[L,m,x]);t.useEffect(function(){if(o&&!H.current||w&&O&&(F.autoGreeting||F.intentId)){o&&(H.current=!0),L.resetSession();var e=o||a?void 0:"manual_open";re({query:F.autoGreeting,intentId:F.intentId},{engagementTrigger:e}),m({type:"set-modal-state",active:!0,minimized:!1,sendRequest:!1})}},[o,a,w,O,re,m,F.autoGreeting,L,F.intentId]),t.useEffect(function(){D||(1===$?(j(void 0),m({type:"new-search"}),m({type:"set-modal-state",active:!1,minimized:!1,sendRequest:!1}),I(0)):2===$&&(j(void 0),m({type:"new-search"}),m({type:"set-modal-state",active:!1,minimized:!0,sendRequest:!1}),I(0)))},[D,m,$]);var ae=t.useCallback(function(e){var t=fe(e);re({query:t},{engagementTrigger:"chip_click"})},[re]);t.useEffect(function(){if(s&&k){var e=k.outputSpeech,t="object"==typeof e&&null!==e?e.suggestions:void 0;if(t&&0!==t.length){var n=t.find(function(e){return fe(e).toLowerCase()===s.toLowerCase()});n&&(b("Auto-selecting chip: ".concat(fe(n))),setTimeout(function(){ae(n)},100)),c&&c()}}},[k,s,ae,c]);var ie=t.useCallback(function(e,t){if(t||(t=e.action),e.timezoneOffset=(new Date).getTimezoneOffset(),"FORM_SUBMIT"===t){var n=A();n&&e.result&&(e.result=i(i({},e.result),n)),e.extras=i(i(i({},e.extras),{eventId:q()}),(r=ve("_fbp"),o=ve("_fbc"),i(i({},r?{fbp:r}:{}),o?{fbc:o}:{})))}var r,o;return oe(e,t)},[oe,A,q]),le=t.useCallback(function(e){return L.channelActionRequest(e,"FORM_NEXT")},[L]),ue=function(e){N(e)},ce=t.useCallback(function(e,t,n,r){var o,a,s;if(V.current=i(i({},V.current),n),B.current={},W.current=t+1,J("step_transition"),z.current){var l=G.current,u=null===(a=null===(o=null==l?void 0:l.steps)||void 0===o?void 0:o[t+1])||void 0===a?void 0:a.name,c=(null===(s=null==l?void 0:l.steps)||void 0===s?void 0:s.length)||1;z.current.trackNextStep({completedStepName:e,completedStepIndex:t,nextStepName:u,stepData:n,isLastStep:r}),u&&z.current.trackStepChange({fromStepName:e,fromStepIndex:t,toStepName:u,toStepIndex:t+1,direction:"forward",lastStepIndex:t+1,totalSteps:c})}},[J]),de=t.useCallback(function(e,t,n,r){var o,a;if(B.current={},W.current=r,z.current){var i=(null===(a=null===(o=G.current)||void 0===o?void 0:o.steps)||void 0===a?void 0:a.length)||1;z.current.trackPreviousStep({fromStepName:e,fromStepIndex:t,toStepName:n,toStepIndex:r,lastStepIndex:r,totalSteps:i}),z.current.trackStepChange({fromStepName:e,fromStepIndex:t,toStepName:n,toStepIndex:r,direction:"backward",lastStepIndex:r,totalSteps:i})}},[]),ye=t.useCallback(function(e,t,n,r){if(!U.current){U.current=!0;var o=A(),a=o?i(i({},n),o):n;if(V.current=a,z.current&&z.current.trackSubmit({finalStepName:e,finalStepIndex:t,completedData:a,totalSteps:r}),d&&!F.api.demoMode)try{d(q())}catch(e){v("[FormWidget] onSubmit callback threw:",e)}}},[A,d,q,F.api.demoMode]),ge=t.useCallback(function(e,t,n,r){var o;null===(o=z.current)||void 0===o||o.trackSubmitFailure({finalStepName:e,finalStepIndex:t,totalSteps:n,reason:r})},[]),xe=t.useCallback(function(e,t){var n;null===(n=z.current)||void 0===n||n.trackHandoffRendered({stepName:e,provider:t})},[]),_e=t.useCallback(function(e,t){var n;null===(n=z.current)||void 0===n||n.trackHandoffNoRender({stepName:e,provider:t})},[]),Oe=t.useCallback(function(e,t,n){var r;null===(r=z.current)||void 0===r||r.trackHandoffScheduled({stepName:e,provider:t,payload:n})},[]),Se=t.useCallback(function(e,t){var n;null===(n=z.current)||void 0===n||n.trackHandoffError({stepName:e,provider:t})},[]),ke=!!_||!!k;return o?e.jsx("div",{className:"".concat(c2," ").concat(g?u2:""),children:e.jsx("div",{className:"".concat(d2," ").concat(g?u2:""),children:k?e.jsx(i2,{response:k,className:p2,onActionClick:ae,onActionResponse:ie,onAudioChange:ue,loading:g,onTrackNextStep:ce,onTrackPreviousStep:de,onTrackSubmit:ye,onTrackSubmitFailure:ge,currentStepDataRef:B,onFormNext:le,stepUpdate:C,onTrackHandoffRendered:xe,onTrackHandoffNoRender:_e,onTrackHandoffScheduled:Oe,onTrackHandoffError:Se}):e.jsx("div",{className:f2,children:e.jsx(we,{})})})}):e.jsxs("div",{className:"".concat(c2," ").concat(g&&!k?u2:""),children:[ke&&e.jsxs("div",{className:"".concat(d2," ").concat(g&&!k?u2:""),children:[!k&&g&&e.jsx("div",{className:f2,children:e.jsx(we,{})}),k&&e.jsx(i2,{response:k,className:p2,onActionClick:ae,onActionResponse:ie,onAudioChange:ue,loading:g,onTrackNextStep:ce,onTrackPreviousStep:de,onTrackSubmit:ye,onTrackSubmitFailure:ge,currentStepDataRef:B,onFormNext:le,stepUpdate:C,onTrackHandoffRendered:xe,onTrackHandoffNoRender:_e,onTrackHandoffScheduled:Oe,onTrackHandoffError:Se})]}),k&&!!te&&e.jsx("div",{className:m2,onClick:ne,children:"✕"})]})},b2=function(e){var n,r=e.theme;t.useEffect(function(){var e,t=null===(e=null==r?void 0:r.font)||void 0===e?void 0:e.link;return t&&function(e){try{var t=new URL(e);if("https:"!==t.protocol)return void console.warn("Only HTTPS font URLs are allowed:",e);["fonts.googleapis.com","fonts.gstatic.com","use.typekit.net","use.fontawesome.com","cdn.jsdelivr.net","unpkg.com","cdnjs.cloudflare.com"].includes(t.hostname)||console.warn("Font URL from untrusted domain:",t.hostname),"fonts.googleapis.com"!==t.hostname||t.searchParams.has("display")||(t.searchParams.set("display","swap"),e=t.toString())}catch(t){return void console.error("Invalid font URL:",e,t)}var n="xapp-form-widget-font",r=document.getElementById(n);r&&r.remove();var o=document.createElement("link");o.id=n,o.rel="stylesheet",o.href=e,o.crossOrigin="anonymous",document.head.appendChild(o)}(t),function(){if(t){var e=document.getElementById("xapp-form-widget-font");e&&e.getAttribute("href")===t&&e.remove()}}},[null===(n=null==r?void 0:r.font)||void 0===n?void 0:n.link]);var o=JSON.stringify(function(e){var t=[],n=function(e){var t=e||{};return _2("--xapp-form-widget-",w2(O2("background-color",null==t?void 0:t.backgroundColor),O2("header-background-color",null==t?void 0:t.headerBackgroundColor),O2("header-text-color",null==t?void 0:t.headerTextColor),O2("primary-button-color",null==t?void 0:t.primaryButtonColor),O2("primary-button-text-color",null==t?void 0:t.primaryButtonTextColor),O2("secondary-button-color",null==t?void 0:t.secondaryButtonColor),O2("secondary-button-text-color",null==t?void 0:t.secondaryButtonTextColor),O2("border-color",null==t?void 0:t.borderColor),O2("border-radius-md",null==t?void 0:t.borderRadius),O2("border-radius-xl",null==t?void 0:t.borderRadius),_2("font-",w2(function(e){return u(this,function(t){switch(t.label){case 0:return e?[4,["family",e.fontFamily]]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})}(null==t?void 0:t.font))),_2("text-",w2(function(e){return u(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,6];case 1:return t.sent(),[4,["background-color-dark",S2(e.backgroundColor,3)]];case 2:return t.sent(),[4,["color",e.color]];case 3:return t.sent(),[4,["font-size",e.fontSize]];case 4:return t.sent(),[4,["font-family",e.fontFamily]];case 5:t.sent(),t.label=6;case 6:return[2]}})}(null==t?void 0:t.text))),_2("dropdown-",w2(function(e){return u(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,5];case 1:return t.sent(),[4,["color",e.color]];case 2:return t.sent(),[4,["font-size",e.fontSize]];case 3:return t.sent(),[4,["font-family",e.fontFamily]];case 4:t.sent(),t.label=5;case 5:return[2]}})}(null==t?void 0:t.dropdown))),_2("checkbox-",w2(function(e){return u(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,5];case 1:return t.sent(),[4,["color",e.color]];case 2:return t.sent(),[4,["font-size",e.fontSize]];case 3:return t.sent(),[4,["font-family",e.fontFamily]];case 4:t.sent(),t.label=5;case 5:return[2]}})}(null==t?void 0:t.checkbox))),_2("chips-",w2(function(e){return u(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,8];case 1:return t.sent(),[4,["background-color-selected",e.backgroundColorSelected]];case 2:return t.sent(),[4,["background-color-dark",S2(e.backgroundColor,20)]];case 3:return t.sent(),[4,["color",e.color]];case 4:return t.sent(),[4,["color-selected",e.colorSelected]];case 5:return t.sent(),[4,["font-size",e.fontSize]];case 6:return t.sent(),[4,["font-family",e.fontFamily]];case 7:t.sent(),t.label=8;case 8:return[2]}})}(null==t?void 0:t.chips))),_2("date-",w2(function(e){return u(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,6];case 1:return t.sent(),[4,["background-color-selected",e.backgroundColorSelected]];case 2:return t.sent(),[4,["color",e.color]];case 3:return t.sent(),[4,["font-size",e.fontSize]];case 4:return t.sent(),[4,["font-family",e.fontFamily]];case 5:t.sent(),t.label=6;case 6:return[2]}})}(null==t?void 0:t.date))),_2("card-",w2(function(e){return u(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,5];case 1:return t.sent(),[4,["color",e.color]];case 2:return t.sent(),[4,["font-size",e.fontSize]];case 3:return t.sent(),[4,["font-family",e.fontFamily]];case 4:t.sent(),t.label=5;case 5:return[2]}})}(null==t?void 0:t.card))),_2("side-button-",w2(function(e){return u(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,8];case 1:return t.sent(),[4,["background-color-dark",S2(e.backgroundColor,10)]];case 2:return t.sent(),[4,["color",e.color]];case 3:return t.sent(),[4,["font-size",e.fontSize]];case 4:return t.sent(),[4,["font-family",e.fontFamily]];case 5:return t.sent(),[4,["top",e.top]];case 6:return t.sent(),[4,["min-length",e.minLength]];case 7:t.sent(),t.label=8;case 8:return[2]}})}(null==t?void 0:t.sideButton))),_2("external-widget-",w2(function(e){return u(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,4];case 1:return t.sent(),[4,["padding",e.padding]];case 2:return t.sent(),[4,["min-height",e.minHeight]];case 3:t.sent(),t.label=4;case 4:return[2]}})}(null==t?void 0:t.externalWidget)))))}(e),r=n.next();for(;!1===r.done;){var o=r.value,a=o[0],i=o[1];null!=i&&""!==i&&t.push([a,i]),r=n.next()}return t}(r));return t.useLayoutEffect(function(){var e=JSON.parse(o);return function(e){for(var t,n=document.documentElement,r=0,o=e;r<o.length;r++){var a=o[r],i=a[0],s=a[1];n.style.setProperty(i,s),x2.set(i,(null!==(t=x2.get(i))&&void 0!==t?t:0)+1)}}(e),function(){return function(e){for(var t,n=document.documentElement,r=0,o=e;r<o.length;r++){var a=o[r][0],i=(null!==(t=x2.get(a))&&void 0!==t?t:1)-1;i<=0?(x2.delete(a),n.style.removeProperty(a)):x2.set(a,i)}}(e)}},[o]),null};var v2,x2=new Map;function _2(e,t){var n;return u(this,function(r){switch(r.label){case 0:n=t.next(),r.label=1;case 1:return n.done?[3,3]:[4,["".concat(e).concat(n.value[0]),n.value[1]]];case 2:return r.sent(),n=t.next(),[3,1];case 3:return[2]}})}function w2(){var e,t,n,r,o,a=[];for(e=0;e<arguments.length;e++)a[e]=arguments[e];return u(this,function(e){switch(e.label){case 0:t=0,n=a,e.label=1;case 1:if(!(t<n.length))return[3,5];r=n[t],o=r.next(),e.label=2;case 2:return!1!==o.done?[3,4]:[4,o.value];case 3:return e.sent(),o=r.next(),[3,2];case 4:return t++,[3,1];case 5:return[2]}})}function O2(e,t){return u(this,function(n){switch(n.label){case 0:return[4,[e,t]];case 1:return n.sent(),[2]}})}function S2(e,t){var n,r,o,a,i,s;if(!e)return e;try{if(e.startsWith("#")){var l=e.match(/\w\w/g);l&&(r=(n=l.map(function(e){return parseInt(e,16)}))[0],o=n[1],a=n[2])}else if(e.startsWith("rgb")){var u=function(e){var t,n=/^rgba?\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)$/,r=/^rgb?\((\d+),\s*(\d+),\s*(\d+)\)$/;return(t=e.match(n))?{r:parseInt(t[1]),g:parseInt(t[2]),b:parseInt(t[3]),a:parseFloat(t[4])}:(t=e.match(r))?{r:parseInt(t[1]),g:parseInt(t[2]),b:parseInt(t[3])}:null}(e);u&&(r=u.r,o=u.g,a=u.b,i=u.a)}if(void 0===r||void 0===o||void 0===a)return v("Darken: Unsupported color format: ".concat(e)),e;if(void 0!==i){if(0===r&&0===o&&0===a)i+=t/100;else{var c=.3*r+.59*o+.11*a,d=c*(1-t/100)/c;r=Math.round(r*d),o=Math.round(o*d),a=Math.round(a*d)}s="rgba(".concat(r,", ").concat(o,", ").concat(a,", ").concat(i,")")}else r=Math.max(0,r-t),o=Math.max(0,o-t),a=Math.max(0,a-t),s="#".concat(r.toString(16).padStart(2,"0")).concat(o.toString(16).padStart(2,"0")).concat(a.toString(16).padStart(2,"0"))}catch(t){v("Darken: Unsupported color format: ".concat(e," - Error: ").concat(t))}return s}!function(e){e.XAPP_FORM_BUTTON="xapp-form-button"}(v2||(v2={}));var k2="SideButton-module_xapp_form_sticky_button__YqORL",j2="SideButton-module_left__GT6z8",P2="SideButton-module_right__Hy2FU";te('/**\n * The phone breakpoint.\n *\n * Width alone cannot express "phone". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step\'s action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n.SideButton-module_xapp_form_sticky_button__YqORL {\n position: fixed;\n z-index: 10000;\n cursor: pointer;\n transform: translateY(-50%);\n text-align: center;\n writing-mode: vertical-rl;\n background-color: var(--xapp-form-widget-side-button-background-color, #d8412a);\n color: var(--xapp-form-widget-side-button-color, #ffffff);\n font-size: var(--xapp-form-widget-side-button-font-size, 1.5em);\n font-family: var(--xapp-form-widget-side-button-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n top: var(--xapp-form-widget-side-button-top, 50%);\n min-height: var(--xapp-form-widget-side-button-min-length, 200px);\n box-shadow: var(--xapp-form-widget-box-shadow, 0 4px 24px rgba(0, 0, 0, 0.12));\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out, transform 150ms ease-in-out;\n}\n.SideButton-module_xapp_form_sticky_button__YqORL:hover {\n background-color: var(--xapp-form-widget-side-button-background-color-dark, darkred);\n box-shadow: var(--xapp-form-widget-box-shadow-hover, 0 6px 32px rgba(0, 0, 0, 0.16));\n}\n.SideButton-module_xapp_form_sticky_button__YqORL:active {\n transform: translateY(-50%) scale(0.98);\n}\n.SideButton-module_xapp_form_sticky_button__YqORL:focus {\n outline: none;\n}\n.SideButton-module_xapp_form_sticky_button__YqORL:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n.SideButton-module_xapp_form_sticky_button__YqORL.SideButton-module_left__GT6z8 {\n left: 0;\n border-top-right-radius: 50%;\n border-bottom-right-radius: 50%;\n padding: 20px 20px 20px 10px;\n}\n.SideButton-module_xapp_form_sticky_button__YqORL.SideButton-module_right__Hy2FU {\n right: 0;\n border-top-left-radius: 50%;\n border-bottom-left-radius: 50%;\n padding: 20px 10px 20px 20px;\n transform: translateY(-50%) rotate(180deg);\n}\n.SideButton-module_xapp_form_sticky_button__YqORL.SideButton-module_right__Hy2FU:active {\n transform: translateY(-50%) rotate(180deg) scale(0.98);\n}');var T2=function(t){var n=t.onClick,r=t.position,o=t.label,a="right"===(null==r?void 0:r.toLowerCase())?P2:j2;return e.jsx("div",{onClick:n,className:"".concat(k2," ").concat(a),"data-xapp-form-side-button":"true",children:e.jsx("span",{children:o||"Schedule Now"})})},C2="xafw-auto-open-dismissed";function M2(e){if(!("number"!=typeof e||e<0))return Math.min(e,3e5)}function E2(e){if("number"==typeof e)return Math.max(0,Math.min(e,100))}function D2(e){var n,r=e.config,o=e.isActive,a=e.onOpen,i=e.hasInteracted,s=t.useRef(new Set),l=t.useRef(!1),u=t.useRef(null),c=(null==r?void 0:r.sessionKey)||C2,d=(null==r?void 0:r.mode)||"any",p=null==r?void 0:r.triggers,f=M2(null==p?void 0:p.delay),m=E2(null==p?void 0:p.scrollPercent),h=null==p?void 0:p.exitIntent,y="number"!=typeof(n=null==p?void 0:p.exitIntentThreshold)||n<0?50:n,g=M2(null==p?void 0:p.inactivity),b=null==r?void 0:r.patterns,v=null==r?void 0:r.minimumWidth,x=t.useMemo(function(){return JSON.stringify(null!=b?b:[])},[b]),_=t.useRef([]),w=t.useCallback(function(){var e=[];return void 0!==(null==p?void 0:p.delay)&&e.push("delay"),void 0!==(null==p?void 0:p.scrollPercent)&&e.push("scrollPercent"),(null==p?void 0:p.exitIntent)&&e.push("exitIntent"),void 0!==(null==p?void 0:p.inactivity)&&e.push("inactivity"),e},[null==p?void 0:p.delay,null==p?void 0:p.scrollPercent,null==p?void 0:p.exitIntent,null==p?void 0:p.inactivity]),O=t.useCallback(function(e){if(!l.current)if(s.current.add(e),"any"===d)l.current=!0,a();else if("all"===d){_.current.every(function(e){return s.current.has(e)})&&(l.current=!0,a())}},[d,a]);t.useEffect(function(){s.current=new Set,l.current=!1,_.current=w()},[w]),t.useEffect(function(){if((void 0!==f||void 0!==m||h||void 0!==g)&&!o&&!i&&!function(e){try{return"true"===sessionStorage.getItem(e)}catch(e){return!1}}(c)&&function(e){if(!e||0===e.length)return!0;var t=window.location.href;return e.some(function(e){return t.includes(e)})}(b)&&function(e){return"number"!=typeof e||window.innerWidth>=e}(v)){var e=[],t=[],n=function(e,n,r,o){e.addEventListener(n,r,o),t.push({target:e,event:n,handler:r,options:o})};if("number"==typeof f&&f>0){var r=setTimeout(function(){O("delay")},f);e.push(r)}if("number"==typeof m){var a=m,s=!1,l=function(){var e=window.scrollY||document.documentElement.scrollTop,t=document.documentElement.scrollHeight-window.innerHeight;t<=0||(e/t*100>=a&&O("scrollPercent"),s=!1)};n(window,"scroll",function(){s||(s=!0,"function"==typeof requestAnimationFrame?requestAnimationFrame(l):l())},{passive:!0}),l()}if(h&&!("ontouchstart"in window||navigator.maxTouchPoints>0)){var d=null!=y?y:50;n(document,"mouseout",function(e){e.clientY<=d&&O("exitIntent")})}if("number"==typeof g&&g>0){var p=function(){u.current&&clearTimeout(u.current),u.current=setTimeout(function(){O("inactivity")},g)};p();["mousemove","keydown","scroll","click","touchstart"].forEach(function(e){n(document,e,p,{passive:!0})})}return function(){e.forEach(function(e){return clearTimeout(e)}),u.current&&(clearTimeout(u.current),u.current=null),t.forEach(function(e){var t=e.target,n=e.event,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})}}},[f,m,h,y,g,x,v,o,i,c,O])}
320
+ `:null,WJ=(0,RJ.styled)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!1!==n.animation&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})((0,$J.default)(({theme:e})=>{const t=(0,NJ.unstable_getUnit)(e.shape.borderRadius)||"px",n=(0,NJ.unstable_toUnitless)(e.shape.borderRadius);return{display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:e.alpha(e.palette.text.primary,"light"===e.palette.mode?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${n}${t}/${Math.round(n/.6*10)/10}${t}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:({ownerState:e})=>e.hasChildren,style:{"& > *":{visibility:"hidden"}}},{props:({ownerState:e})=>e.hasChildren&&!e.width,style:{maxWidth:"fit-content"}},{props:({ownerState:e})=>e.hasChildren&&!e.height,style:{height:"auto"}},{props:{animation:"pulse"},style:VJ||{animation:`${LJ} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient(\n 90deg,\n transparent,\n ${(e.vars||e).palette.action.hover},\n transparent\n )`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:BJ||{"&::after":{animation:`${zJ} 2s linear 0.5s infinite`}}}]}})),UJ=CJ.forwardRef(function(e,t){const n=(0,IJ.useDefaultProps)({props:e,name:"MuiSkeleton"}),{animation:r="pulse",className:o,component:a="span",height:i,style:s,variant:l="text",width:u,...c}=n,d={...n,animation:r,component:a,variant:l,hasChildren:Boolean(c.children)},p=(e=>{const{classes:t,variant:n,animation:r,hasChildren:o,width:a,height:i}=e,s={root:["root",n,r,o&&"withChildren",o&&!a&&"fitContent",o&&!i&&"heightAuto"]};return(0,DJ.default)(s,FJ.getSkeletonUtilityClass,t)})(d);return(0,AJ.jsx)(WJ,{as:a,ref:t,className:(0,MJ.default)(p.root,o),ownerState:d,...c,style:{width:u,height:i,...s}})});"production"!==process.env.NODE_ENV&&(UJ.propTypes={animation:EJ.default.oneOf(["pulse","wave",!1]),children:EJ.default.node,classes:EJ.default.object,className:EJ.default.string,component:EJ.default.elementType,height:EJ.default.oneOfType([EJ.default.number,EJ.default.string]),style:EJ.default.object,sx:EJ.default.oneOfType([EJ.default.arrayOf(EJ.default.oneOfType([EJ.default.func,EJ.default.object,EJ.default.bool])),EJ.default.func,EJ.default.object]),variant:EJ.default.oneOfType([EJ.default.oneOf(["circular","rectangular","rounded","text"]),EJ.default.string]),width:EJ.default.oneOfType([EJ.default.number,EJ.default.string])}),_J.default=UJ,function(e){var t=Gb.default,n=Xb.default;Object.defineProperty(e,"__esModule",{value:!0});var r={skeletonClasses:!0};Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"skeletonClasses",{enumerable:!0,get:function(){return a.default}});var o=n(_J),a=t(wJ);Object.keys(a).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(r,t)||t in e&&e[t]===a[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}}))})}(xJ);var HJ={};Object.defineProperty(HJ,"__esModule",{value:!0}),HJ.getDayCalendarSkeletonUtilityClass=HJ.dayCalendarSkeletonClasses=void 0;var YJ=q$;HJ.getDayCalendarSkeletonUtilityClass=e=>(0,YJ.unstable_generateUtilityClass)("MuiDayCalendarSkeleton",e),HJ.dayCalendarSkeletonClasses=(0,YJ.unstable_generateUtilityClasses)("MuiDayCalendarSkeleton",["root","week","daySkeleton"]);var qJ=$b.default,GJ=Lb.default;Object.defineProperty(vJ,"__esModule",{value:!0}),vJ.DayCalendarSkeleton=d0;var KJ=qJ(Vb),XJ=qJ(Wb);GJ(t);var ZJ=qJ(St),QJ=qJ(lk),JJ=qJ(xJ),e0=Ub,t0=qJ(EA),n0=MU,r0=HJ,o0=e;const a0=["className"],i0=e=>{const{classes:t}=e;return(0,t0.default)({root:["root"],week:["week"],daySkeleton:["daySkeleton"]},r0.getDayCalendarSkeletonUtilityClass,t)},s0=(0,e0.styled)("div",{name:"MuiDayCalendarSkeleton",slot:"Root",overridesResolver:(e,t)=>t.root})({alignSelf:"start"}),l0=(0,e0.styled)("div",{name:"MuiDayCalendarSkeleton",slot:"Week",overridesResolver:(e,t)=>t.week})({margin:`${n0.DAY_MARGIN}px 0`,display:"flex",justifyContent:"center"}),u0=(0,e0.styled)(JJ.default,{name:"MuiDayCalendarSkeleton",slot:"DaySkeleton",overridesResolver:(e,t)=>t.daySkeleton})({margin:`0 ${n0.DAY_MARGIN}px`,variants:[{props:{day:0},style:{visibility:"hidden"}}]}),c0=[[0,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,0,0,0]];function d0(e){const t=(0,e0.useThemeProps)({props:e,name:"MuiDayCalendarSkeleton"}),{className:n}=t,r=(0,XJ.default)(t,a0),o=i0(r);return(0,o0.jsx)(s0,(0,KJ.default)({className:(0,QJ.default)(o.root,n)},r,{children:c0.map((e,t)=>(0,o0.jsx)(l0,{className:o.week,children:e.map((e,t)=>(0,o0.jsx)(u0,{variant:"circular",width:n0.DAY_SIZE,height:n0.DAY_SIZE,className:o.daySkeleton,ownerState:{day:e}},t))},t))}))}function p0(e){if(e){var t=e.split(",").map(function(e){return e.trim()}).filter(function(e){return!!e});return t.length>0?t:void 0}}function f0(e,t){if(!t||0===t.length)return!1;var n=e.format("YYYY-MM-DD"),r=e.format("dddd");return t.some(function(e){return m0(n,e)||m0(r,e)})}function m0(e,t){var n=t.split("*").map(h0).join(".*");return new RegExp("^".concat(n,"$")).test(e)}function h0(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function y0(e,t){return Array.isArray(t.availableDays)&&t.availableDays.length>0?t.availableDays.map(function(e){return e.toLowerCase()}).includes(e.format("dddd").toLowerCase()):0!==e.day()&&6!==e.day()}"production"!==process.env.NODE_ENV&&(d0.propTypes={classes:ZJ.default.object,sx:ZJ.default.oneOfType([ZJ.default.arrayOf(ZJ.default.oneOfType([ZJ.default.func,ZJ.default.object,ZJ.default.bool])),ZJ.default.func,ZJ.default.object])}),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DayCalendarSkeleton",{enumerable:!0,get:function(){return t.DayCalendarSkeleton}}),Object.defineProperty(e,"dayCalendarSkeletonClasses",{enumerable:!0,get:function(){return n.dayCalendarSkeletonClasses}}),Object.defineProperty(e,"getDayCalendarSkeletonUtilityClass",{enumerable:!0,get:function(){return n.getDayCalendarSkeletonUtilityClass}});var t=vJ,n=HJ}(bJ);var g0="FormFieldDate-module_xapp_date_picker_container__d8LYB",b0="FormFieldDate-module_xapp_date_picker__Rvtj1",v0="FormFieldDate-module_xapp_date_picker_past__ECo-S",x0="FormFieldDate-module_xapp_date_picker_available__2Xtlu";te("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n.FormFieldDate-module_xapp_date_picker_container__d8LYB {\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n font-family: var(--xapp-form-widget-date-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n}\n\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiDayCalendar-weekDayLabel {\n width: 30px !important;\n height: 32px !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersCalendarHeader-root {\n margin-top: 10px !important;\n margin-bottom: 4px !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiDayCalendar-slideTransition {\n min-height: 200px !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersArrowSwitcher-button {\n color: rgba(0, 0, 0, 0.54) !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersArrowSwitcher-button:hover {\n background-image: unset !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersArrowSwitcher-button:focus {\n background-image: unset !important;\n outline: unset !important;\n border: 0 !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersDay-root.MuiButtonBase-root:hover {\n background-image: unset !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersDay-root.MuiButtonBase-root:focus {\n background-image: unset !important;\n outline: unset !important;\n border: 0 !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersDay-root {\n padding: 0px !important;\n font-family: inherit !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersDay-root.Mui-selected {\n color: #fff !important;\n background-color: #1976d2 !important;\n font-weight: 600 !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersDay-today {\n font-weight: bold !important;\n color: #321aa3 !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersDay-dayWithMargin {\n width: 30px !important;\n height: 30px !important;\n font-weight: 600 !important;\n font-size: 0.75rem !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersDay-dayWithMargin:hover {\n background-image: unset !important;\n background-color: #cfd8da !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersDay-dayWithMargin:focus {\n background-image: unset !important;\n background-color: #1976d2 !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersDay-dayWithMargin.Mui-disabled {\n font-weight: 300 !important;\n text-decoration: line-through !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_past__ECo-S {\n background-color: rgba(48, 49, 53, 0.2392156863) !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_available__2Xtlu {\n background-color: rgba(0, 255, 21, 0.1607843137) !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_blocked__e-aNY {\n background-color: rgba(175, 177, 182, 0.2392156863) !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiDayCalendar-weekDayLabel {\n font-weight: 600 !important;\n font-size: 0.75rem !important;\n}\n\n/* Mobile: 44x44 tappable day cells.\n *\n * Date selection is the most expensive mis-tap in this funnel - the visitor either books the\n * wrong day or gives up - and MUI ships 36x36 cells (30x30 once the rules above apply). Both\n * are under the 44x44 that Apple's HIG and WCAG 2.5.8 ask for.\n *\n * `:global(...)` rather than the bare MUI class names used above, and that difference is not\n * cosmetic. The two builds treat this file differently: rollup's postcss-modules is\n * configured with a `generateScopedName` that returns every name unchanged, so the plain\n * selectors above do match MUI's classes in the published bundle - but Storybook's css-loader\n * hashes them, so up there they match nothing and the calendar renders at MUI's own defaults.\n * `:global` is honoured by both, so these rules land either way. (The rules above are left as\n * they are: making them global too would change the shipped calendar, which is not what this\n * issue is about.)\n *\n * The seven columns have to keep fitting inside MUI's 320px-wide calendar, and 7 x 44 = 308\n * only fits once the 2px side margins on each cell go - hence dropping the gap rather than\n * the cell, per the issue.\n */\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersDay-root,\n .FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersDay-dayWithMargin {\n width: 44px !important;\n height: 44px !important;\n margin: 0 !important;\n font-size: 0.875rem !important;\n }\n .FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiDayCalendar-weekDayLabel {\n width: 44px !important;\n height: 44px !important;\n margin: 0 !important;\n }\n .FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiDayCalendar-slideTransition {\n min-height: 264px !important;\n }\n .FormFieldDate-module_xapp_date_picker__Rvtj1 .MuiPickersArrowSwitcher-button {\n width: 44px !important;\n height: 44px !important;\n }\n}");var _0={blockWeekends:!0,blockCurrentDay:!0,blockNextBusinessDays:2},w0=function(n){var r=zc().add(2,"month"),o=zc(),a=n.field,s=n.onFieldChange,l=n.errorMessage,u=n.busyDays,c=n.loading,d=function(){return e.jsx(bJ.DayCalendarSkeleton,{})},p=t.useState(),f=p[0],m=p[1];t.useEffect(function(){s(a.name,f)},[f,a.name,s]);var h=p0(u),y=t.useCallback(function(e){if(!h)return function(e,t,n){if(t.blockWeekends&&(0===e.day()||6===e.day()))return!0;if(t.blockCurrentDay&&e.isSame(n,"day"))return!0;if(t.blockNextBusinessDays){for(var r=n,o=0,a=0;o<t.blockNextBusinessDays&&a<366;)a++,y0(r=r.add(1,"day"),t)&&o++;if(e.isBefore(r,"day"))return!0}return!!(t.currentDayAvailableUntil&&e.isSame(n,"day")&&n.format("HH:mm")>t.currentDayAvailableUntil)||!(!(Array.isArray(t.availableDays)&&t.availableDays.length>0)||t.availableDays.map(function(e){return e.toLowerCase()}).includes(e.format("dddd").toLowerCase()))}(e,Object.keys((null==a?void 0:a.defaultBusyDays)||{}).length>0?a.defaultBusyDays||{}:_0,o);try{return f0(e,h)}catch(e){console.error("shouldDisableDate: ".concat(e))}return!1},[o,h,a.defaultBusyDays]);return e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignContent:"center",alignItems:"center"},children:[e.jsx("div",{className:g0,children:e.jsx(Db.LocalizationProvider,{dateAdapter:UQ.AdapterDayjs,children:e.jsx(y$.DateCalendar,{className:b0,disableHighlightToday:!1,disablePast:!0,fixedWeekNumber:6,loading:c,maxDate:r,onChange:function(e){m(e)},renderLoading:function(){return e.jsx(d,{})},shouldDisableDate:y,showDaysOutsideCurrentMonth:!0,slots:{day:function(t){var n=t.day,a=t.disabled,s=n.isBefore(o,"day"),l=n.isAfter(r,"day");return s||l?e.jsx(WQ.PickersDay,i({},t,{className:v0})):a?e.jsx(WQ.PickersDay,i({},t)):e.jsx(WQ.PickersDay,i({},t,{className:x0}))}},value:f,views:["day"]})})}),c&&e.jsx(Sp,{error:!0,style:{color:"inherit",marginLeft:"98px",marginTop:"14px",marginBottom:"-14px"},children:"Getting latest availability..."}),!c&&l&&e.jsx(Sp,{error:!0,style:{marginLeft:"14px",marginTop:"14px",marginBottom:"-14px"},children:l})]})},O0=/^\d{4}-\d{2}-\d{2}/;function S0(e){if(!e)return"";if("string"==typeof e&&O0.test(e))return e.slice(0,10);var t=e instanceof Date?e:new Date(e);return isNaN(t.getTime())?"":t.toISOString().slice(0,10)}var k0=function(n){var r,o,a=n.field,s=n.onFieldChange,l=n.value,u=n.errorMessage,c=n.required,d=n.isLastField,p=S0((null==l?void 0:l.from)||(null===(r=a.preselecteDates)||void 0===r?void 0:r.from)),f=S0((null==l?void 0:l.to)||(null===(o=a.preselecteDates)||void 0===o?void 0:o.to)),m=t.useState({from:p,to:f}),h=m[0],y=m[1];t.useEffect(function(){y({from:p,to:f})},[p,f]);var g=function(e){y(e),s(a.name,e.from||e.to?e:void 0)},b="".concat(a.name,"-from"),v="".concat(a.name,"-to");return e.jsxs("div",{style:a.style,children:[a.title&&e.jsx("h2",{children:a.title}),e.jsx("label",{htmlFor:b,children:"From"}),e.jsx("input",{id:b,name:b,type:"date",value:h.from,onChange:function(e){g(i(i({},h),{from:e.target.value}))},max:h.to||void 0,required:c,enterKeyHint:"next"}),e.jsx("label",{htmlFor:v,children:"To"}),e.jsx("input",{id:v,name:v,type:"date",value:h.to,onChange:function(e){g(i(i({},h),{to:e.target.value}))},min:h.from||void 0,required:c,enterKeyHint:d?"done":"next"}),u&&e.jsx("p",{children:u})]})},j0="FormFieldDateTime-module_xapp_datetime__rPNwE",P0="FormFieldDateTime-module_xapp_datetime_title__VNHwW",T0="FormFieldDateTime-module_xapp_datetime_body__ta9Ui",C0="FormFieldDateTime-module_xapp_datetime_calendar__Ge5W6",M0="FormFieldDateTime-module_xapp_datetime_times_column__UY7ho",E0="FormFieldDateTime-module_xapp_datetime_timezone__ZE56Q",D0="FormFieldDateTime-module_xapp_datetime_times__rhU-O",N0="FormFieldDateTime-module_xapp_datetime_group__CeL-E",R0="FormFieldDateTime-module_xapp_datetime_time__x5lxl",$0="FormFieldDateTime-module_xapp_datetime_time_selected__IRT84",I0="FormFieldDateTime-module_xapp_datetime_message__4rf-S",F0="FormFieldDateTime-module_xapp_datetime_error__bTyZK";te("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n.FormFieldDateTime-module_xapp_datetime__rPNwE {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n font-family: var(--xapp-form-widget-date-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n}\n\n.FormFieldDateTime-module_xapp_datetime_title__VNHwW {\n margin: 0 0 8px;\n font-family: inherit;\n font-size: 1rem;\n text-align: center;\n}\n\n/* Calendar and column side by side on a wide enough viewport.\n *\n * `flex-wrap` rather than a fixed two-column grid: the pair has to be allowed to fall\n * onto two rows rather than force the step to scroll sideways, which is the failure the\n * mobile rule below would otherwise only fix at the breakpoint. */\n.FormFieldDateTime-module_xapp_datetime_body__ta9Ui {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n align-items: flex-start;\n gap: 16px;\n width: 100%;\n}\n\n.FormFieldDateTime-module_xapp_datetime_calendar__Ge5W6 {\n flex: 0 0 auto;\n}\n\n/* The zone notice and the column travel together, so the sizing the column used to own\n * lives here now - the column itself keeps only the scrolling, which the notice must\n * stay outside of or it scrolls away from the times it describes. */\n.FormFieldDateTime-module_xapp_datetime_times_column__UY7ho {\n flex: 1 1 160px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 0;\n max-width: 240px;\n}\n\n.FormFieldDateTime-module_xapp_datetime_timezone__ZE56Q {\n margin: 0;\n padding: 0 4px;\n font-size: var(--xapp-form-widget-date-font-size, 14px);\n text-align: left;\n}\n\n/* A column of buttons rather than chips: a half-hour schedule produces 16 or more\n * offerings and chips wrap into an unreadable block past a handful. */\n.FormFieldDateTime-module_xapp_datetime_times__rhU-O {\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 0;\n max-height: 320px;\n overflow-y: auto;\n padding: 4px;\n}\n\n.FormFieldDateTime-module_xapp_datetime_group__CeL-E {\n position: sticky;\n top: 0;\n z-index: 1;\n margin: 4px 0 0;\n padding: 4px 0;\n background-color: #ffffff;\n font-family: inherit;\n font-size: var(--xapp-form-widget-date-font-size, 14px);\n font-weight: 600;\n text-align: left;\n}\n\n.FormFieldDateTime-module_xapp_datetime_time__x5lxl {\n flex: 0 0 auto;\n min-height: 44px;\n padding: 8px 12px;\n border: 1px solid var(--xapp-form-widget-chips-background-color, #c4dced);\n border-radius: var(--xapp-form-widget-border-radius-sm, 8px);\n background-color: transparent;\n /* Not $form-chips-color: that is the chips' FOREGROUND, authored to sit on the filled\n * chip background. This button is transparent, so a theme whose chips are dark with\n * white text - the common case - renders white on white and the times vanish. The\n * body text colour is the one that belongs on the form's own background. */\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87));\n font-family: var(--xapp-form-widget-chips-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n font-size: var(--xapp-form-widget-chips-font-size, 0.875em);\n font-weight: 600;\n cursor: pointer;\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out, transform 150ms ease-in-out;\n}\n.FormFieldDateTime-module_xapp_datetime_time__x5lxl:hover {\n background-color: var(--xapp-form-widget-chips-background-color, #c4dced);\n /* Background and foreground move together: whenever the chip background is\n * applied, the colour the theme paired with it applies too. */\n color: var(--xapp-form-widget-chips-color, #000000);\n box-shadow: var(--xapp-form-widget-box-shadow-subtle, 0 2px 8px rgba(0, 0, 0, 0.08));\n}\n.FormFieldDateTime-module_xapp_datetime_time__x5lxl:active {\n transform: scale(0.98);\n}\n.FormFieldDateTime-module_xapp_datetime_time__x5lxl:focus {\n outline: none;\n}\n.FormFieldDateTime-module_xapp_datetime_time__x5lxl:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormFieldDateTime-module_xapp_datetime_time__x5lxl {\n font-size: 16px;\n }\n}\n\n.FormFieldDateTime-module_xapp_datetime_time_selected__IRT84 {\n border-color: var(--xapp-form-widget-chips-background-color-selected, var(--xapp-form-widget-chips-background-color-dark, #6e7ae1));\n background-color: var(--xapp-form-widget-chips-background-color-selected, var(--xapp-form-widget-chips-background-color-dark, #6e7ae1));\n color: var(--xapp-form-widget-chips-color-selected, #ffffff);\n}\n.FormFieldDateTime-module_xapp_datetime_time_selected__IRT84:hover {\n background-color: var(--xapp-form-widget-chips-background-color-selected, var(--xapp-form-widget-chips-background-color-dark, #6e7ae1));\n}\n\n.FormFieldDateTime-module_xapp_datetime_message__4rf-S {\n margin: 8px 0;\n font-size: var(--xapp-form-widget-date-font-size, 14px);\n text-align: center;\n}\n\n.FormFieldDateTime-module_xapp_datetime_error__bTyZK {\n margin-top: 14px;\n}\n\n/* Stacked, with the column under the calendar and given room to scroll on its own. */\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormFieldDateTime-module_xapp_datetime_body__ta9Ui {\n flex-direction: column;\n align-items: center;\n }\n .FormFieldDateTime-module_xapp_datetime_times_column__UY7ho {\n width: 100%;\n max-width: 320px;\n }\n .FormFieldDateTime-module_xapp_datetime_times__rhU-O {\n max-height: 260px;\n }\n}");var A0="Appointment times",L0="Times shown in";function z0(e){return"".concat(e.start,"|").concat(e.end||"")}var V0=function(n){var r=n.field,o=n.onFieldChange,a=n.errorMessage,i=n.value,s=n.required,l=n.busyDays,u=r.schedule,c=t.useMemo(function(){return n.now||new Date},[n.now]),d=t.useState(function(){return(null==i?void 0:i.date)?zc("".concat(i.date,"T00:00:00")):void 0}),p=d[0],f=d[1],m=t.useState(function(){return i?z0(i):void 0}),h=m[0],y=m[1],g=t.useMemo(function(){return p?ud(u,p.toDate(),c):[]},[u,p,c]),b=t.useMemo(function(){return g.find(function(e){return z0(e)===h})},[g,h]),v=t.useMemo(function(){if(p&&b){var e,t,n=ed(p.toDate()),r={date:n,label:id(b),start:b.start,datetime:rd(n,b.start,null==u?void 0:u.timezone)};return b.end&&(r.end=b.end),i&&(t=r,(e=i).date===t.date&&e.start===t.start&&e.end===t.end&&e.label===t.label&&e.datetime===t.datetime)?i:r}},[p,b,u,i]);t.useEffect(function(){o(r.name,v)},[v,r.name,o]);var x=t.useMemo(function(){return p0(l)},[l]);t.useEffect(function(){p&&f0(p,x)&&(f(void 0),y(void 0))},[p,x]);var _,w=t.useCallback(function(e){return!cd(u,e.toDate(),c)||f0(e,x)},[u,c,x]),O=sd(u),S=!!u,k=null==u?void 0:u.timezone,j=function(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}),!0}catch(e){return!1}}(k),P=t.useMemo(function(){if(!S)return"";var e=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(e){return""}}();return function(e,t){var n=nd(e);if(!n)return"";var r=t&&t!==e?nd(t):"";return r&&r!==n?"".concat(L0," ").concat(n,", not your time zone (").concat(r,")."):"".concat(L0," ").concat(n,".")}(j?k:e,e)},[S,k,j]);return t.useEffect(function(){S&&!j&&console.warn('FormFieldDateTime: "'.concat(k,'" is not a usable timezone, so ')+"times are shown in the visitor's zone instead. Set the schedule's timezone to an IANA identifier such as \"America/New_York\".")},[S,k,j]),e.jsxs("div",{className:j0,style:r.style,children:[!!r.title&&e.jsx("h2",{className:P0,children:r.title}),e.jsxs("div",{className:T0,children:[e.jsx("div",{className:C0,children:e.jsx(Db.LocalizationProvider,{dateAdapter:UQ.AdapterDayjs,children:e.jsx(y$.DateCalendar,{maxDate:zc(c).add(O,"day"),onChange:function(e){f(e),y(void 0)},referenceDate:zc(c),shouldDisableDate:w,value:p||null,views:["day"]})})}),e.jsxs("div",{className:M0,children:[!!P&&e.jsx("p",{className:E0,children:P}),e.jsxs("div",{"aria-label":s?"".concat(A0," (required)"):A0,className:D0,role:"group",children:[!p&&e.jsx("p",{className:I0,children:"Select a date to see the available times."}),!!p&&0===g.length&&e.jsx("p",{className:I0,children:"No times are available on this date."}),g.map(function(n,r){var o=z0(n),a=n.group!==_?n.group:void 0;return _=n.group,e.jsxs(t.Fragment,{children:[!!a&&e.jsx("h3",{className:N0,children:a}),e.jsx("button",{"aria-pressed":o===h,className:"".concat(R0," ").concat(o===h?$0:""),onClick:function(){return y(o)},type:"button",children:id(n)})]},"".concat(o,"-").concat(r))})]})]})]}),!!a&&e.jsx(Sp,{className:F0,error:!0,children:a})]})},B0=gl(e.jsx("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7m0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5"}),"LocationOn"),W0={exports:{}};W0.exports=(()=>{return e={705:e=>{e.exports=function(e,t){const n=[];return 0===t.length?n.push({text:e,highlight:!1}):t[0][0]>0&&n.push({text:e.slice(0,t[0][0]),highlight:!1}),t.forEach((r,o)=>{const a=r[0],i=r[1];n.push({text:e.slice(a,i),highlight:!0}),o===t.length-1?i<e.length&&n.push({text:e.slice(i,e.length),highlight:!1}):i<t[o+1][0]&&n.push({text:e.slice(i,t[o+1][0]),highlight:!1})}),n}}},t={},function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}(705);var e,t})();var U0=M(W0.exports);function H0(e){return null!=e.placePrediction}function Y0(e){var t,n=e.placePrediction;return{placeId:n.placeId,description:n.text.text,structured_formatting:{main_text:n.structuredFormat.mainText.text,secondary_text:(null===(t=n.structuredFormat.secondaryText)||void 0===t?void 0:t.text)||"",main_text_matched_substrings:(n.structuredFormat.mainText.matches||[]).map(function(e){var t,n,r;return{offset:null!==(t=e.startOffset)&&void 0!==t?t:0,length:(null!==(n=e.endOffset)&&void 0!==n?n:0)-(null!==(r=e.startOffset)&&void 0!==r?r:0)}})}}}var q0=function(){function e(e){this.baseUrl=e.baseUrl||"https://api.xapp.ai",this.key=e.apiKey}return e.prototype.getPlacePredictions=function(e,t){var n,r={};if(e.params){if(e.params.components){var o=e.params.components.split("|").filter(function(e){return e.startsWith("country:")}).map(function(e){return e.replace("country:","").toLowerCase()});o.length>0&&(r.includedRegionCodes=o)}if(e.params.language&&(r.languageCode=e.params.language),e.params.location){var a=e.params.location.split(",").map(Number),i=a[0],s=a[1];isNaN(i)||isNaN(s)||(r.locationBias={circle:{center:{latitude:i,longitude:s},radius:Number(e.params.radius)||5e4}})}}r.input=e.input,(null===(n=e.componentRestrictions)||void 0===n?void 0:n.country)?r.includedRegionCodes=[e.componentRestrictions.country.toLowerCase()]:r.includedRegionCodes||(r.includedRegionCodes=["us"]);var l="".concat(this.baseUrl,"/places/autocomplete");this.key&&(l+="?key=".concat(encodeURIComponent(this.key))),fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}).then(function(e){if(!e.ok)throw new Error("getPlacePredictions: HTTP error! Status: ".concat(e.status));return e.json()}).then(function(e){t((e.suggestions||[]).filter(H0).map(Y0))}).catch(function(e){v("getPlacePredictions: Fetch error:",e),t([])})},e.prototype.getPlaceDetails=function(e,t){var n="".concat(this.baseUrl,"/places/details/").concat(encodeURIComponent(e));this.key&&(n+="?key=".concat(encodeURIComponent(this.key))),fetch(n).then(function(e){if(!e.ok)throw new Error("getPlaceDetails: HTTP error! Status: ".concat(e.status));return e.json()}).then(function(e){t(e)}).catch(function(e){v("getPlaceDetails: Fetch error:",e),t(void 0)})},e}(),G0="FormFieldTextInputAddress-module_xapp_text_input_address__-FQjM";te(".FormFieldTextInputAddress-module_xapp_text_input_address_container__title__IbovL p {\n margin: 0;\n font-family: var(--xapp-form-widget-text-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n}\n\n.FormFieldTextInputAddress-module_xapp_text_input_address__-FQjM .MuiInputBase-input {\n padding: 21px 12px 4px 12px !important;\n border: 0 !important;\n background-color: var(--xapp-form-widget-text-background-color, rgba(0, 0, 0, 0.06)) !important;\n border-radius: var(--xapp-form-widget-border-radius-sm, 8px) !important;\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out !important;\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87)) !important;\n font-size: var(--xapp-form-widget-text-font-size, 1rem) !important;\n font-family: var(--xapp-form-widget-text-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif)) !important;\n height: auto !important;\n width: 100% !important;\n max-width: 100% !important;\n margin: 0 !important;\n margin-bottom: 0 !important;\n border-width: 0 !important;\n border-style: none !important;\n -webkit-appearance: none !important;\n appearance: none !important;\n}\n.FormFieldTextInputAddress-module_xapp_text_input_address__-FQjM .MuiInputBase-input:hover {\n background-color: var(--xapp-form-widget-text-background-color-dark, rgba(0, 0, 0, 0.09)) !important;\n}\n.FormFieldTextInputAddress-module_xapp_text_input_address__-FQjM .MuiInputBase-input:focus {\n background-color: var(--xapp-form-widget-text-background-color-dark, rgba(0, 0, 0, 0.09)) !important;\n outline: none !important;\n box-shadow: inset 0 0 0 2px var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54)) !important;\n}\n.FormFieldTextInputAddress-module_xapp_text_input_address__-FQjM .MuiFilledInput-root {\n padding-top: 0 !important;\n padding-left: 0 !important;\n}\n.FormFieldTextInputAddress-module_xapp_text_input_address__-FQjM .MuiAutocomplete-root {\n padding-top: 0 !important;\n padding-left: 0 !important;\n}\n.FormFieldTextInputAddress-module_xapp_text_input_address__-FQjM .MuiPopper-root-MuiAutocomplete-popper {\n z-index: 16000;\n}\n.FormFieldTextInputAddress-module_xapp_text_input_address__-FQjM .MuiInputLabel-root {\n transform: translate(12px, 13px) scale(1) !important;\n transition: color 200ms cubic-bezier(0, 0, 0.2, 1) 0ms, transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms !important;\n}\n.FormFieldTextInputAddress-module_xapp_text_input_address__-FQjM .MuiInputLabel-root.MuiInputLabel-shrink {\n transform: translate(12px, 4px) scale(0.75) !important;\n}\n\n.MuiAutocomplete-popper {\n z-index: 16000 !important;\n}");var K0=function(t){var n=t.children,r=s(t,["children"]);return e.jsxs($p,i({},r,{children:[n,e.jsx(fy,{sx:{textAlign:"right",padding:"4px 12px 8px"},children:e.jsx("img",{src:"https://maps.gstatic.com/mapfiles/api-3/images/powered-by-google-on-white3.png",alt:"powered by Google",style:{height:14}})})]}))},X0=function(n){var r,o=n.field,a=n.onFieldChange,s=n.errorMessage,l=n.required,u=n.googleMapsApiKey,d=n.mapsBaseUrl,p=n.requireSelection,f=!(null!==(r=o.requireSelection)&&void 0!==r?r:p),m=t.useState(null),h=m[0],y=m[1],g=t.useState(""),b=g[0],v=g[1],x=t.useState([]),_=x[0],w=x[1],O=t.useRef(""),S=function(e){y(e)},k=function(e){O.current=e,v(e)},j=function(e){w(e)};t.useEffect(function(){a(o.name,b)},[o.name,a,b]);var P=o.googleMapsApiKey||u,T=o.mapsBaseUrl||d,C=t.useMemo(function(){return new q0({apiKey:P,baseUrl:T})},[P,T]),M=function(){if(!T)return!0;try{var e=new URL(T).hostname;return"xapp.ai"===e||e.endsWith(".xapp.ai")}catch(e){return!1}}(),E=t.useMemo(function(){return bl(function(e,t){C.getPlacePredictions(e,t)},400)},[C]);return t.useEffect(function(){var e=!0;if(""!==b){var t=o.mapsUrlQueryParams||void 0;return E({input:b,params:t},function(t){if(e){var n=[];h&&"string"!=typeof h&&(n=[h]),t&&(n=c(c([],n,!0),t,!0)),j(n)}}),function(){e=!1}}j(h&&"string"!=typeof h?[h]:[])},[h,b,E,o.mapsUrlQueryParams]),e.jsx(ny,i({id:"google-map-input"},M&&{PaperComponent:K0},{getOptionLabel:function(e){return"string"==typeof e?e:e.description},filterOptions:function(e){return e},options:_,autoComplete:!0,freeSolo:f,includeInputInList:!0,filterSelectedOptions:!0,value:h,inputValue:b,noOptionsText:"No locations",onChange:function(e,t){if(j("string"==typeof t?[]:t?c([t],_,!0):_),S(t),t&&"string"!=typeof t&&t.placeId){var n=t.placeId,r=t.description;k(r),C.getPlaceDetails(n,function(e){(null==e?void 0:e.formattedAddress)&&O.current===r&&(S(i(i({},t),{description:e.formattedAddress})),k(e.formattedAddress))})}},onInputChange:function(e,t){k(t)},renderInput:function(t){return e.jsx(lb,i({className:G0},t,{variant:"filled",size:"small",margin:"normal",label:o.label,error:!!s,helperText:s,name:o.name,placeholder:o.placeholder,required:l,fullWidth:!0,style:o.style,slotProps:o.maxLength?{htmlInput:i(i({},t.inputProps),{maxLength:o.maxLength})}:void 0}))},renderOption:function(t,n){if("string"==typeof n)return e.jsx("li",i({},t,{children:n}));var r=n.structured_formatting.main_text_matched_substrings||[],o=U0(n.structured_formatting.main_text,r.map(function(e){return[e.offset,e.offset+e.length]}));return e.jsx("li",i({},t,{children:e.jsxs(Vy,{container:!0,alignItems:"center",children:[e.jsx(Vy,{sx:{display:"flex",width:44},children:e.jsx(B0,{sx:{color:"text.secondary"}})}),e.jsxs(Vy,{sx:{width:"calc(100% - 44px)",wordWrap:"break-word"},children:[o.map(function(t,n){return e.jsx(fy,{component:"span",sx:{fontWeight:t.highlight?"bold":"regular"},children:t.text},n)}),e.jsx(mp,{variant:"body2",color:"text.secondary",children:n.structured_formatting.secondary_text})]})]})}))}}))},Z0=function(e){return"string"!=typeof e||0===e.trim().length},Q0=function(e){var t=e.replace(/\D/g,"");if(10===t.length||11===t.length&&t.startsWith("1")){return/^(1)?[-. ]?\(?(\d{3})\)?[-. ]?(\d{3})[-. ]?(\d{4})$/.test(t)}return!1},J0=function(e){return null==e||("string"==typeof e?0===e.trim().length:Array.isArray(e)?0===e.length:("object"==typeof e&&e.constructor===Object||"object"==typeof e)&&0===Object.keys(e).length)},e1="FormStepDisplay-module_xapp_step_iframe_wrapper__BBFRw",t1="FormStepDisplay-module_xapp_step_full_bleed__rhGGK",n1="FormStepDisplay-module_xapp_external_widget_container__ec4Hs",r1="FormStepDisplay-module_xapp_external_widget_anchor__NSXBg",o1="FormStepDisplay-module_xapp_external_widget_fallback__lkFJ-",a1="FormStepDisplay-module_xapp_external_widget_loading__aRtx6",i1="FormStepDisplay-module_xapp_external_widget_spinner__ga0X7",s1="FormStepDisplay-module_xapp_submit_error__Zbqdj",l1="FormStepDisplay-module_xapp_formfield__hRmVx",u1="FormStepDisplay-module_active__fCsMz",c1="FormStepDisplay-module_xapp_formfield_title__INjeF",d1="FormStepDisplay-module_xapp_formfield_subtitle__8VQC2",p1="FormStepDisplay-module_xapp_final_button_container__Gco-E",f1="FormStepDisplay-module_xapp_form_nav_buttons__lI4BI",m1="FormStepDisplay-module_xapp_dummy_button__Q-nE6",h1="FormStepDisplay-module_xapp_primary_button__d2wra",y1="FormStepDisplay-module_xapp_secondary_button__LuMfN",g1="FormStepDisplay-module_xapp_disabled_button__RjSfL";te('/**\n * The phone breakpoint.\n *\n * Width alone cannot express "phone". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step\'s action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n.FormStepDisplay-module_xapp_step_iframe_wrapper__BBFRw {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n overflow: scroll;\n position: relative;\n}\n\n.FormStepDisplay-module_xapp_step_full_bleed__rhGGK {\n margin-left: -56px;\n margin-right: -56px;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormStepDisplay-module_xapp_step_full_bleed__rhGGK {\n margin-left: calc(-1 * (8px + env(safe-area-inset-left, 0px)));\n margin-right: calc(-1 * (8px + env(safe-area-inset-right, 0px)));\n }\n}\n\n.FormStepDisplay-module_xapp_external_widget_container__ec4Hs {\n background-color: var(--xapp-form-widget-external-widget-background-color, transparent);\n padding: var(--xapp-form-widget-external-widget-padding, 0);\n min-height: var(--xapp-form-widget-external-widget-min-height, auto);\n box-sizing: border-box;\n}\n\n.FormStepDisplay-module_xapp_external_widget_anchor__NSXBg {\n margin: 0;\n padding: 0;\n}\n\n.FormStepDisplay-module_xapp_external_widget_fallback__lkFJ- {\n padding: 20px;\n text-align: center;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n}\n\n.FormStepDisplay-module_xapp_external_widget_loading__aRtx6 {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 14px;\n min-height: 240px;\n padding: 40px 20px;\n text-align: center;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87));\n}\n.FormStepDisplay-module_xapp_external_widget_loading__aRtx6 p {\n margin: 0;\n font-size: 0.95em;\n opacity: 0.7;\n}\n\n.FormStepDisplay-module_xapp_external_widget_spinner__ga0X7 {\n display: inline-block;\n width: 44px;\n height: 44px;\n color: var(--xapp-form-widget-primary-button-color, #ea6539);\n}\n.FormStepDisplay-module_xapp_external_widget_spinner__ga0X7 svg {\n width: 100%;\n height: 100%;\n}\n\n.FormStepDisplay-module_xapp_submit_error__Zbqdj {\n padding: 12px 20px;\n text-align: center;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n color: #b3261e;\n}\n\n.FormStepDisplay-module_xapp_formfield__hRmVx {\n display: none;\n font-family: inherit !important;\n}\n.FormStepDisplay-module_xapp_formfield__hRmVx.FormStepDisplay-module_active__fCsMz {\n display: block;\n}\n.FormStepDisplay-module_xapp_formfield_title__INjeF p {\n margin: 10px 0 20px 0;\n font-size: 1em;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n}\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-clearIndicator,\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-popupIndicator {\n color: rgba(0, 0, 0, 0.54) !important;\n background-color: transparent !important;\n transition: background-color 200ms ease-in-out !important;\n}\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-clearIndicator:hover,\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-popupIndicator:hover {\n background-image: unset !important;\n background-color: #cfd8da !important;\n}\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-clearIndicator:focus,\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-popupIndicator:focus {\n background-image: unset !important;\n}\n\n.FormStepDisplay-module_xapp_formfield_title__INjeF p {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n}\n\n.FormStepDisplay-module_xapp_formfield_subtitle__8VQC2 {\n font-size: 0.875em;\n opacity: 0.8;\n}\n\n.FormStepDisplay-module_xapp_final_button_container__Gco-E {\n display: flex;\n justify-content: center;\n padding: 20px 20px 0 20px;\n}\n.FormStepDisplay-module_xapp_final_button_container__Gco-E button {\n font-size: 1.2em !important;\n padding: 12px 32px !important;\n min-width: 200px !important;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px) !important;\n}\n\n.FormStepDisplay-module_xapp_form_nav_buttons__lI4BI {\n display: flex;\n justify-content: space-between;\n padding: 20px;\n}\n\n.FormStepDisplay-module_xapp_dummy_button__Q-nE6 {\n flex-grow: 1;\n}\n\n.FormStepDisplay-module_xapp_primary_button__d2wra {\n background-color: var(--xapp-form-widget-primary-button-color, #ea6539) !important;\n font-family: inherit !important;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px) !important;\n min-height: 44px !important;\n transition: box-shadow 200ms ease-in-out, transform 150ms ease-in-out, opacity 200ms ease-in-out !important;\n}\n.FormStepDisplay-module_xapp_primary_button__d2wra:hover {\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;\n opacity: 0.9 !important;\n}\n.FormStepDisplay-module_xapp_primary_button__d2wra:active {\n transform: scale(0.98) !important;\n}\n.FormStepDisplay-module_xapp_primary_button__d2wra:focus {\n outline: none;\n}\n.FormStepDisplay-module_xapp_primary_button__d2wra:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n\n.FormStepDisplay-module_xapp_secondary_button__LuMfN {\n background-color: var(--xapp-form-widget-secondary-button-color, #d24cc7) !important;\n font-family: inherit !important;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px) !important;\n min-height: 44px !important;\n transition: box-shadow 200ms ease-in-out, transform 150ms ease-in-out, opacity 200ms ease-in-out !important;\n}\n.FormStepDisplay-module_xapp_secondary_button__LuMfN:hover {\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;\n opacity: 0.9 !important;\n}\n.FormStepDisplay-module_xapp_secondary_button__LuMfN:active {\n transform: scale(0.98) !important;\n}\n.FormStepDisplay-module_xapp_secondary_button__LuMfN:focus {\n outline: none;\n}\n.FormStepDisplay-module_xapp_secondary_button__LuMfN:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n\n.FormStepDisplay-module_xapp_disabled_button__RjSfL {\n background-color: rgba(121, 117, 133, 0.5) !important;\n font-family: inherit !important;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px) !important;\n min-height: 44px !important;\n cursor: not-allowed !important;\n}');function b1(e){return!!e&&void 0!==e.externalWidget}function v1(e){return"value"in e&&void 0!==e.value}function x1(e){return!!e&&void 0!==e.mandatoryGroup}te("/**\n * CostGuide / Contractor Appointments booking-embed style overrides.\n *\n * The partner renders its form into #airo-anchor in the light DOM with stable, semantic\n * class names (spike: chat-widget#1514). This is a plain (non-module) stylesheet on purpose\n * so the selectors below emit literally rather than being scoped -- they target the partner's\n * own markup, not ours.\n *\n * Two hard constraints from the spike:\n * 1. Their rules are scoped `#airo-anchor #step-<name> .<class>` (two ids + a class), so a\n * plain `#airo-anchor .btn-next` measurably loses. Overrides must carry `#airo-anchor`\n * specificity AND `!important` to win.\n * 2. Most of their text inherits the container font, but `input` is explicitly Arial, so the\n * font must be re-applied to inputs directly.\n *\n * Every value maps to a `--xapp-form-widget-*` theme variable (with a fallback matching\n * `styles/_variables.scss`), so a Studio-themed widget restyles the partner's form too --\n * nothing here is a hard-coded color, font, or radius.\n *\n * Partner selectors verified: 2026-08-04. Re-verify against their markup per chat-widget#1516.\n */\n/* Primary action buttons: btn-next / btn-orange */\n#airo-anchor .btn-next,\n#airo-anchor .btn-orange {\n background-color: var(--xapp-form-widget-primary-button-color, #ea6539) !important;\n color: var(--xapp-form-widget-primary-button-text-color, #b7c5d1) !important;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px) !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n\n/* Secondary / back button: btn-back */\n#airo-anchor .btn-back {\n background-color: var(--xapp-form-widget-secondary-button-color, #d24cc7) !important;\n color: var(--xapp-form-widget-secondary-button-text-color, #b7c5d1) !important;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px) !important;\n}\n\n/* Headings and body text: stepwrap / ms-title / ms-subtitle / page-title / label-item */\n#airo-anchor .stepwrap,\n#airo-anchor .ms-title,\n#airo-anchor .ms-subtitle,\n#airo-anchor .page-title,\n#airo-anchor .label-item {\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87)) !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n\n/* Inputs are explicitly Arial in their sheet, so the inherited container font never reaches\n them -- re-apply directly (spike finding). radio-item grouped for the same reason. */\n#airo-anchor input,\n#airo-anchor .radio-item {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n\n/* Focus rings consistent with ours rather than their default orange. */\n#airo-anchor input:focus,\n#airo-anchor .btn-next:focus,\n#airo-anchor .btn-back:focus {\n outline-color: var(--xapp-form-widget-focus-ring-color, #012b54) !important;\n}");var _1=function(n){var r=t.useRef({}),o=t.useRef(new Set),a=t.useRef(!1),s=t.useRef(n.formStep.fields),c=t.useRef({}),d=t.useState({}),p=d[0],f=d[1],m=t.useState({}),h=m[0],y=m[1],g=t.useState({}),b=g[0],v=g[1],x=t.useState(!1),_=x[0],w=x[1],O=n.formStep,S=n.onNextStep,k=n.onPrevStep,j=n.onData,P=n.onDataWithLabels,T=n.getData,M=n.getDataWithLabels,E=n.loading,D=n.currentStepIndex,N=n.totalSteps,R=n.onTrackNextStep,$=n.currentStepDataRef,I=n.isActive,F=n.externalWidgetConfigPending,A=n.onTrackHandoffRendered,L=n.onTrackHandoffNoRender,z=n.onTrackHandoffScheduled,V=n.onTrackHandoffError,B=n.onExternalWidgetFallback,W=n.submitError,U=n.hideIntro,H=I&&!F&&b1(O)?O.externalWidget:void 0,Y=md(H,{onRendered:function(e){return null==A?void 0:A(O.name,e)},onNoRender:function(e){return null==L?void 0:L(O.name,e)},onScheduled:function(e,t){return null==z?void 0:z(O.name,e,t)},onError:function(e){return null==V?void 0:V(O.name,e)},onFallback:function(e){return null==B?void 0:B(e)}}).outcome,q=t.useState(!1),G=q[0],K=q[1];t.useLayoutEffect(function(){if(H){var e=H.anchorId,t=document.getElementById(e);if(t){if(!(t.childElementCount>0)){var n=new MutationObserver(function(){var t=document.getElementById(e);t&&t.childElementCount>0&&(K(!0),n.disconnect())});return n.observe(t,{childList:!0,subtree:!0}),function(){return n.disconnect()}}K(!0)}}else K(!1)},[H]);var X=t.useCallback(function(){var e={};Object.entries(c.current).forEach(function(t){var n=t[0],o=t[1];try{var a=i(i(i({},T()),r.current),{safeIncludes:function(e,t){return Array.isArray(e)?e.includes(t):"string"==typeof e&&e===t}});e[n]=o.call(a)}catch(t){"development"===process.env.NODE_ENV&&console.error('Condition evaluation failed for field "'.concat(n,'":'),t),e[n]=!1}}),function(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0,a=n;o<a.length;o++){var i=a[o];if(e[i]!==t[i])return!1}return!0}(e,h)||y(e)},[h,T]);t.useEffect(function(){for(var e={},t=0,n=O.fields;t<n.length;t++){var r=n[t];if(x1(r)){var o=r.mandatoryGroup;o&&(e[o]||(e[o]=[]),e[o].push(r.name))}}f(e)},[O.fields]);s.current!==O.fields&&(s.current=O.fields,o.current.clear(),a.current=!1,r.current={});for(var Z=0,Q=O.fields;Z<Q.length;Z++){var J=Q[Z];!v1(J)||o.current.has(J.name)||Object.prototype.hasOwnProperty.call(r.current,J.name)||(r.current[J.name]=J.value,o.current.add(J.name))}t.useEffect(function(){for(var e=0,t=O.fields;e<t.length;e++){var n=t[e];if("CHIPS"===n.type){var i=n.items.filter(function(e){return _b(e)}).filter(function(e){return e.selected}).map(function(e){return e.id});i.length>0&&!Object.prototype.hasOwnProperty.call(r.current,n.name)&&(r.current[n.name]=i)}if(n.condition){var s=$c(n.condition);c.current[n.name]=new Function("return (".concat(s,");"))}}o.current.size>0&&!a.current&&(a.current=!0,j(r.current)),X()},[X,O.fields]);var ee=t.useCallback(function(){var e={},t=!0,n={};O.fields.forEach(function(o){var a={valid:!0},i=r.current[o.name];if(!1!==h[o.name]){if(function(e){return!!e&&"DROPDOWN"===e.type}(o))if(!o.mandatory||null!=i&&"none"!==i){if(null!=i&&"none"!==i){var s=o.items.find(function(e){return e.id===i});if(s&&s.freeFormInput){var l=s.freeFormFieldName||"message",u=r.current[l];(!u||"string"==typeof u&&""===u.trim())&&(e[l]={valid:!1,message:"Please specify additional details"},a={valid:!1,message:""})}}}else a={valid:!1,message:o.mandatoryError||"Please select an option"};else if(function(e){return!!e&&"DATERANGE"===e.type}(o))o.mandatory&&!function(e){var t=e;return!!(null==t?void 0:t.from)&&!!(null==t?void 0:t.to)}(i)&&(a={valid:!1,message:o.mandatoryError||"Please select a date range"});else if(function(e){return!!e&&"DATETIME"===e.type}(o))o.mandatory&&!function(e){var t=e;return!!(null==t?void 0:t.date)&&!!(null==t?void 0:t.start)}(i)&&(a={valid:!1,message:o.mandatoryError||"Please select a date and a time"});else if(Object.prototype.hasOwnProperty.call(r.current,o.name))if(function(e){return!!e&&"TEXT"===e.type}(o))if(!0===o.mandatory&&Z0(i))a={valid:!1,message:o.mandatoryError||"This field is mandatory"};else if("EMAIL"!==o.format||Z0(i)){if("PHONE"!==o.format||Z0(i)){if("ZIP_CODE"===o.format&&!Z0(i)&&(a=function(e){if(Z0(e))return{valid:!0};var t=/^\d{5}$/.test(e)||/^\d{5}-\d{4}$/.test(e)||/^[A-Za-z]\d[A-Za-z]\s?\d[A-Za-z]\d$/.test(e);return{valid:t,message:t?void 0:"Invalid zip code or postal code"}}(i),a.valid)){var c=function(e){if(Z0(e))return e;var t=e.trim(),n=t.match(/^([A-Za-z]\d[A-Za-z])(\d[A-Za-z]\d)$/);return n?"".concat(n[1].toUpperCase()," ").concat(n[2].toUpperCase()):/^[A-Za-z]\d[A-Za-z]\s\d[A-Za-z]\d$/.test(t)?t.toUpperCase():e}(i);c!==i&&(n[o.name]=c)}}else if(a=function(e){if(Z0(e))return{valid:!0};var t=Q0(e);return{valid:t,message:t?void 0:"Invalid phone number"}}(i),a.valid){var d=function(e){if(Z0(e)||!Q0(e))return e;var t=e.replace(/\D/g,"");return 11===t.length&&t.startsWith("1")&&(t=t.slice(1)),t.replace(/(\d{3})(\d{3})(\d{4})/,"($1) $2-$3")}(i);d!==i&&(n[o.name]=d)}}else a={valid:p=/^[\w-.]+@([\w-]+\.)+[\w-]{2,4}$/.test(String(i).toLowerCase()),message:p?void 0:"Invalid email address"};else!function(e){return!!e&&"CHIPS"===e.type}(o)?function(e){return!!e&&"DATE"===e.type}(o)&&o.mandatory&&null==i?a={valid:!1,message:"Please select a day"}:function(e){return!!e&&"CHECK"===e.type}(o)&&o.mandatory&&!(null==i?void 0:i.length)&&(a={valid:!1,message:o.mandatoryError||"This field is mandatory"}):o.minRequired&&i.length<o.minRequired?a={valid:!1,message:"Please select at least ".concat(o.minRequired," option(s)")}:o.maxAllowed&&i.length>o.maxAllowed?a={valid:!1,message:"Please select no more than ".concat(o.maxAllowed," option(s)")}:o.mandatory&&1!==(null==i?void 0:i.length)&&(a={valid:!1,message:"Please select one option"});var p;t=t&&a.valid,e[o.name]=a}else e[o.name]=a});for(var o=function(n){if(!n.some(function(e){return!J0(r.current[e])})){var o=O.fields.find(function(e){return e.name===n[0]}),a=b[n[0]],i=(null==a?void 0:a.message)||(null==o?void 0:o.mandatoryError)||"At least one of these fields is required";n.forEach(function(t){e[t]={valid:!1,message:i}}),t=!1}},a=0,s=Object.entries(p);a<s.length;a++){o(s[a][1])}return J0(n)||(r.current=i(i({},r.current),n)),function(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0,a=n;o<a.length;o++){var i=a[o];if(!t.hasOwnProperty(i))return!1;var s=e[i],l=t[i];if(s.valid!==l.valid)return!1}return!0}(b,e)||v(e),t},[h,b,O.fields,p]),te=function(){return l(void 0,void 0,void 0,function(){var e;return u(this,function(t){switch(t.label){case 0:if(!ee()||_)return[2];w(!0),t.label=1;case 1:return t.trys.push([1,,4,5]),ne(r.current),R&&void 0!==D&&void 0!==N&&(e=D===N-1,R(O.name,D,r.current,e)),S?[4,S("submit"===O.nextAction)]:[3,3];case 2:t.sent(),t.label=3;case 3:return[3,5];case 4:return w(!1),[7];case 5:return[2]}})})},ne=function(e){for(var t=i({},e),n={},r=function(e,r,o){if(r.length>0){var a=r.join(", ");t["".concat(e,"_start")]=a,n["".concat(e,"_start")]=a}if(o.length>0){var i=o.join(", ");t["".concat(e,"_end")]=i,n["".concat(e,"_end")]=i}},o=function(o){var a,i,s,l,u,c=e[o],d=O.fields.find(function(e){return e.name===o});if("CHIPS"===(null==d?void 0:d.type)&&void 0!==c){var p=[],f=[],m=[];c.forEach(function(e){var t=d.items.find(function(t){return t.id===e});if(t){p.push(t.label);var n=t;n.startTime&&f.push(n.startTime),n.endTime&&m.push(n.endTime)}}),n[o]=function(e){if(0===e.length)return"";if(1===e.length)return e[0];if(2===e.length)return e.join(" and ");var t=e.pop();return e.join(", ")+", and "+t}(p),r(o,f,m)}else if("DATETIME"===(null==d?void 0:d.type)&&void 0!==c){var h=d,y=c;t[o]=y.label,n[o]=y.label,r(o,y.start?[y.start]:[],y.end?[y.end]:[]);var g=h.dateFieldName||Hc;t[g]=y.date,n[g]=y.date;var b=h.dateTimeFieldName||Yc;t[b]=y.datetime,n[b]=y.datetime;var v=od(h.schedule);if(v){var x=h.timeZoneFieldName||qc;t[x]=v,n[x]=v}}else if("DROPDOWN"===(null==d?void 0:d.type)&&void 0!==c){var _=d.items.find(function(e){return e.id===c});_?_.label&&_.label.trim().length>0?n[o]=_.label:n[o]=c.replace(/_/g," ").split(" ").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}).join(" "):n[o]=c}else"DATE"===(null==d?void 0:d.type)&&void 0!==c?n[o]=(a=new Date(c),i=a.getDate(),s=a.toLocaleString("default",{month:"long"}),l=a.getFullYear(),u=function(e){if(e>=11&&e<=13)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}(i),"".concat(s," ").concat(i).concat(u,", ").concat(l)):n[o]=c},a=0,s=Object.keys(e);a<s.length;a++){o(s[a])}j(t),P(n)},re=function(){for(var e in b)if(!1!==h[e]&&!b[e].valid)return!0;return!1},oe=t.useCallback(function(e,t){var n,a=!Object.prototype.hasOwnProperty.call(r.current,e);if(o.current.has(e)){if(!a&&r.current[e]===t)return void o.current.delete(e);if(!a&&r.current[e]!==t)return}(a||r.current[e]!==t)&&(Array.isArray(t)&&0===t.length&&(t=void 0),r.current=i(i({},r.current),((n={})[e]=t,n)),$&&($.current=r.current),X(),J0(b)||ee())},[X,b,ee,$]),ae=t.useContext(me),ie=C().context;X();var se,le=!!O&&O.fullBleed;return e.jsxs("div",{className:le?t1:void 0,children:[!U&&!!O&&(O.title||O.subtitle)&&e.jsxs("div",{className:c1,children:[!!O.title&&e.jsx("p",{children:O.title}),!!O.subtitle&&e.jsx("p",{className:d1,children:O.subtitle})]}),!!O&&O.warnBeforeUnloadMessage&&e.jsxs("div",{style:{backgroundColor:"#fff3cd",color:"#856404",padding:"12px 16px",marginBottom:"16px",borderRadius:"4px",border:"1px solid #ffeaa7",display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx("span",{style:{fontSize:"20px"},children:"⚠️"}),e.jsx("span",{children:O.warnBeforeUnloadMessage})]}),(se=O,!!se&&void 0!==se.iframe&&e.jsx("div",{className:e1,children:e.jsx("iframe",{src:O.iframe.src,title:O.title,width:O.iframe.width||"100%",height:O.iframe.height||"100%",frameBorder:"0",allowFullScreen:!0})})),b1(O)&&e.jsxs("div",{className:n1,children:[e.jsx("div",{id:O.externalWidget.anchorId,className:r1}),I&&"pending"===Y&&!G&&e.jsxs("div",{className:a1,role:"status","aria-live":"polite",children:[e.jsx("span",{className:i1,children:e.jsx(we,{})}),e.jsx("p",{children:"Finding available appointments…"})]}),("no_render"===Y||"error"===Y)&&!O.externalWidget.fallbackStep&&e.jsx("div",{className:o1,children:e.jsx("p",{children:"We're sorry, we couldn't load the booking form. Please try again later."})})]}),e.jsx("div",{children:function(){if(!O)return[];var t=O.fields||[],n=t.map(function(n,o){var a,i,s,l,u,c,d,p,f,m,y=o===t.length-1;switch(n.type){case"TEXT":m="ADDRESS"===n.format?e.jsx(X0,{field:n,onFieldChange:oe,value:r.current[n.name],errorMessage:null===(a=b[n.name])||void 0===a?void 0:a.message,required:n.mandatory,googleMapsApiKey:ae.googleMapsApiKey,mapsBaseUrl:ae.mapsBaseUrl},n.name):e.jsx(Tb,{field:n,onFieldChange:oe,value:r.current[n.name],errorMessage:null===(i=b[n.name])||void 0===i?void 0:i.message,required:n.mandatory,isLastField:y},n.name);break;case"DROPDOWN":var g=n,v=r.current[g.name],x=void 0;if(v&&"none"!==v){var _=g.items.find(function(e){return e.id===v});if(_&&_.freeFormInput){var w=_.freeFormFieldName||"message";x=null===(s=b[w])||void 0===s?void 0:s.message}}m=e.jsx(Eb,{field:g,onFieldChange:oe,errorMessage:null===(l=b[n.name])||void 0===l?void 0:l.message,required:n.mandatory,freeFormErrorMessage:x},n.name);break;case"CHECK":m=e.jsx(Tp,{field:n,onFieldChange:oe,errorMessage:null===(u=b[n.name])||void 0===u?void 0:u.message},n.name);break;case"CHIPS":m=e.jsx(wb,{field:n,onFieldChange:oe,errorMessage:null===(c=b[n.name])||void 0===c?void 0:c.message,value:r.current[n.name]},n.name);break;case"DATE":var O=null==ie?void 0:ie.busyDays;m=e.jsx(w0,{field:n,onFieldChange:oe,errorMessage:null===(d=b[n.name])||void 0===d?void 0:d.message,busyDays:O,loading:E},n.name);break;case"DATETIME":m=e.jsx(V0,{field:n,onFieldChange:oe,value:r.current[n.name],errorMessage:null===(p=b[n.name])||void 0===p?void 0:p.message,required:n.mandatory,busyDays:null==ie?void 0:ie.busyDays},n.name);break;case"DATERANGE":m=e.jsx(k0,{field:n,onFieldChange:oe,value:r.current[n.name],errorMessage:null===(f=b[n.name])||void 0===f?void 0:f.message,required:n.mandatory,isLastField:y},n.name);break;case"CARD":m=e.jsx(mb,{field:Fc(n,M()),onFieldChange:oe},n.name);break;default:m=null}return e.jsx("div",{className:"".concat(l1," ").concat(!1!==h[n.name]?u1:""),children:m},o)});return n}()}),!!W&&e.jsx("div",{className:s1,role:"alert",children:e.jsx("p",{children:W})}),!!S&&"omit"!==O.nextAction&&O.final&&e.jsx("div",{className:p1,children:e.jsx(Rc,{className:re()||_?g1:O.nextLabel?y1:h1,disabled:_,onClick:te,variant:"contained",children:_?"Loading...":O.nextLabel||"Next"})}),e.jsxs("div",{className:f1,children:[void 0===k&&e.jsx("div",{className:m1}),!!k&&"omit"!==O.previousAction&&e.jsx(Rc,{className:h1,onClick:function(){ne(r.current),k&&k()},variant:"contained",children:O.previousLabel||"Previous"}),!!S&&"omit"!==O.nextAction&&!O.final&&e.jsx(Rc,{className:re()||_?g1:O.nextLabel?y1:h1,disabled:_,onClick:te,variant:"contained",children:_?"Loading...":O.nextLabel||"Next"})]})]})},w1="FormFrame-module_xapp_form_frame_root__BLTha",O1="FormFrame-module_xapp_form_frame_intro__S4kWd",S1="FormFrame-module_xapp_form_frame_title__GA8dy",k1="FormFrame-module_xapp_form_frame_subtitle__WOeJI",j1="FormFrame-module_xapp_form_frame_framed__9E311",P1="FormFrame-module_xapp_form_frame_plain__rBarK",T1="FormFrame-module_xapp_form_frame_tab_row__osSVR",C1="FormFrame-module_xapp_form_frame_tab__0O2ga";te(".FormFrame-module_xapp_form_frame_root__BLTha {\n display: block;\n}\n\n.FormFrame-module_xapp_form_frame_intro__S4kWd {\n background-color: #ffffff;\n padding: 28px 16px 18px;\n text-align: center;\n}\n\n.FormFrame-module_xapp_form_frame_title__GA8dy {\n margin: 0;\n font-family: Poppins, Arial, Verdana, sans-serif;\n font-size: 24px;\n font-weight: 700;\n line-height: 1.15;\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87));\n}\n\n.FormFrame-module_xapp_form_frame_subtitle__WOeJI {\n margin: 6px 0 0 0;\n font-family: Poppins, Arial, Verdana, sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 1.4;\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87));\n opacity: 0.75;\n}\n\n.FormFrame-module_xapp_form_frame_framed__9E311 {\n position: relative;\n border: 4px solid var(--xapp-form-widget-border-color, #d3d3df);\n border-radius: 0;\n background-color: var(--xapp-form-widget-background-color, #f3f8fb);\n margin-top: -2px;\n padding: 24px 22px 8px;\n}\n\n.FormFrame-module_xapp_form_frame_plain__rBarK {\n display: block;\n}\n\n.FormFrame-module_xapp_form_frame_tab_row__osSVR {\n background-color: #ffffff;\n text-align: center;\n}\n\n.FormFrame-module_xapp_form_frame_tab__0O2ga {\n display: inline-block;\n position: relative;\n z-index: 1;\n padding: 12px 30px;\n border-radius: 12px 12px 0 0;\n background-color: var(--xapp-form-widget-header-background-color, #012b54);\n color: var(--xapp-form-widget-header-text-color, #b7c5d1);\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n font-size: 14px;\n font-weight: 700;\n letter-spacing: 1px;\n white-space: nowrap;\n}");var M1=function(t){var n=t.framing,r=t.framed,o=t.children,a=null==n?void 0:n.tabLabel,i=null==n?void 0:n.introTitle,s=null==n?void 0:n.introSubtitle,l=(null==n?void 0:n.introPlacement)||"above-tab",u=i||s?e.jsxs("div",{className:O1,"data-xapp-form-frame-intro":"",children:[!!i&&e.jsx("h2",{className:S1,"data-xapp-form-frame-title":"",children:i}),!!s&&e.jsx("p",{className:k1,"data-xapp-form-frame-subtitle":"",children:s})]}):null;return e.jsxs("div",{className:w1,children:["above-tab"===l&&u,r&&!!a&&e.jsx("div",{className:T1,children:e.jsx("span",{className:C1,"data-xapp-form-frame-tab":"",children:a})}),e.jsxs("div",{className:r?j1:P1,"data-xapp-form-frame":r?"framed":"plain",children:["inline"===l&&u,o]})]})},E1="SimpleNavigationHeader-module_xapp_navigation_header__YhCD1",D1="SimpleNavigationHeader-module_xapp_navigation_header_showcase__NhRLn",N1="SimpleNavigationHeader-module_xapp_navigation_header_container__V9y-e";te(".SimpleNavigationHeader-module_xapp_navigation_header__YhCD1 {\n background-color: inherit !important;\n}\n\n.SimpleNavigationHeader-module_xapp_navigation_header_showcase__NhRLn {\n background-color: inherit !important;\n padding: 0px !important;\n}\n\n.SimpleNavigationHeader-module_xapp_navigation_header_container__V9y-e {\n background-color: inherit !important;\n}");var R1=function(t){var n=t.items,r=t.onHeaderClick,o=t.labelHeader,a=t.stepName,i=t.isShowCase;if(o){var s=n.find(function(e){return e.step===a}),l=null==s?void 0:s.label;return void 0!==l?e.jsx(fy,{display:"flex",justifyContent:"center",gap:2,padding:2,"min-height":100,className:i?D1:N1,children:e.jsx(mp,{variant:"h4",color:"white",margin:0,children:l})}):e.jsx(fy,{display:"flex",justifyContent:"center",gap:2,padding:2,"min-height":100,className:i?D1:N1,children:e.jsx("div",{className:"empty_step_header"})})}return e.jsx(fy,{display:"flex",justifyContent:"center",gap:2,padding:2,"min-height":100,className:E1,children:e.jsx(fy,{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",width:"100%",minHeight:"50px",sx:{"&::before":{content:'""',position:"absolute",top:"50%",left:0,right:0,height:"3px",backgroundColor:"white",zIndex:1}},children:n.map(function(t,n){return e.jsxs(fy,{position:"relative",zIndex:2,display:"flex",flexDirection:"column",alignItems:"center",top:"10px",minWidth:100,children:[e.jsx(Rc,{variant:"contained",color:"primary",size:"small",style:{borderRadius:"50%",minWidth:"auto",width:"30px",height:"30px",display:"flex",alignItems:"center",justifyContent:"center",border:"3px solid white"},className:E1,onClick:function(){r("".concat(t.step))}}),e.jsx(mp,{variant:"body2",color:"white",margin:1,marginTop:1,children:t.label})]},n)})})})};
321
+ /*! Copyright (c) 2025, XAPP AI */function $1(e,t){var n=e.slice(0,5);return!!t.find(function(e){if(e===n)return!0;if(e.includes("*")){var t=e.replace(/\*/g,"\\d")+"$";return new RegExp("^".concat(t)).test(n)}return!1})}function I1(e){if(e){var t=e.match(/\b\d{5}(?:-\d{4})?\b/g);if(t)for(var n=t.length-1;n>=0;n--){var r=t[n],o=e.indexOf(r),a=e.slice(0,o);if(/(,|\b[A-Z]{2})\s*$/.test(a.trim()))return r;if(o>15)return r}}}var F1="FormDisplay-module_xapp_formstep__OW1rY",A1="FormDisplay-module_active__5wTV3",L1="FormDisplay-module_xapp_header_container__Y-eFl",z1="FormDisplay-module_xapp_header_container_showcase__MWJfr";te(".FormDisplay-module_xapp_formstep__OW1rY {\n display: none;\n padding: 8px;\n}\n.FormDisplay-module_xapp_formstep__OW1rY.FormDisplay-module_active__5wTV3 {\n display: block;\n background-color: var(--xapp-form-widget-background-color, #f3f8fb) !important;\n}\n.FormDisplay-module_xapp_formstep__OW1rY.FormDisplay-module_title__-BtIw p {\n margin: 10px 0 0 0;\n}\n.FormDisplay-module_xapp_formstep__OW1rY {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n\n.FormDisplay-module_xapp_header_container__Y-eFl {\n background-color: var(--xapp-form-widget-header-background-color, #012b54) !important;\n position: absolute;\n top: 0px;\n right: 0px;\n left: 0px;\n z-index: 1000;\n min-height: 88px;\n padding-top: 16px;\n}\n.FormDisplay-module_xapp_header_container__Y-eFl .FormDisplay-module_empty_step_header__eHbBH {\n height: 42px;\n}\n.FormDisplay-module_xapp_header_container__Y-eFl {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.FormDisplay-module_xapp_header_container__Y-eFl .MuiTypography-root {\n color: var(--xapp-form-widget-header-text-color, #b7c5d1) !important;\n}\n\n.FormDisplay-module_xapp_header_container_showcase__MWJfr {\n border-top-left-radius: 12px;\n border-top-right-radius: 12px;\n background-color: var(--xapp-form-widget-header-background-color, #012b54) !important;\n padding-top: 10px;\n padding-bottom: 10px;\n margin-top: 10px;\n}\n.FormDisplay-module_xapp_header_container_showcase__MWJfr .FormDisplay-module_empty_step_header__eHbBH {\n height: 42px;\n}\n.FormDisplay-module_xapp_header_container_showcase__MWJfr {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.FormDisplay-module_xapp_header_container_showcase__MWJfr .MuiTypography-root {\n color: var(--xapp-form-widget-header-text-color, #b7c5d1) !important;\n}");var V1=function(n){var r,o=n.form,a=n.onActionResponse,s=n.isShowCase,c=n.loading,d=n.onTrackNextStep,p=n.onTrackPreviousStep,f=n.onTrackSubmit,m=n.onTrackSubmitFailure,h=n.currentStepDataRef,y=n.onFormNext,g=n.stepUpdate,b=n.onTrackHandoffRendered,x=n.onTrackHandoffNoRender,_=n.onTrackHandoffScheduled,w=n.onTrackHandoffError,O=t.useContext(me).framing,S=t.useState(0),k=S[0],j=S[1],P=t.useState({}),T=P[0],C=P[1],M=t.useState(void 0),E=M[0],D=M[1],N=function(e){var t=e.step;t&&C(function(n){var r,o,a,s=n[t],l={fields:e.fields||[]};return(null===(o=e.externalWidget)||void 0===o?void 0:o.config)?l.externalWidget={config:i(i({},null===(a=null==s?void 0:s.externalWidget)||void 0===a?void 0:a.config),e.externalWidget.config)}:(null==s?void 0:s.externalWidget)&&(l.externalWidget=s.externalWidget),i(i({},n),((r={})[t]=l,r))})};t.useEffect(function(){g&&N(g)},[g]);var R=t.useState(!1),$=R[0],I=R[1],F=t.useState(!1),A=F[0],L=F[1];t.useEffect(function(){var e;L(!1);var t=null===(e=o.steps)||void 0===e?void 0:e[k];if(t&&b1(t)){var n=setTimeout(function(){return L(!0)},5e3);return function(){return clearTimeout(n)}}},[k]);var z=t.useRef({});t.useEffect(function(){if(Array.isArray(o.steps)&&o.steps.length>0)for(var e=function(e){if(e.condition){var t=$c(e.condition,"context",["isInServiceArea"]);z.current[e.name]=function(e){return new Function("context","isInServiceArea","return (".concat(t,");"))(e,$1)}}},t=0,n=o.steps;t<n.length;t++){e(n[t])}},[null==o?void 0:o.steps]),t.useEffect(function(){var e;(k<0||k>=(null===(e=null==o?void 0:o.steps)||void 0===e?void 0:e.length))&&j(0)},[null==o?void 0:o.steps,k]);var V=t.useMemo(function(){var e,t,n=null===(e=o.steps)||void 0===e?void 0:e[k];return null!==(t=null==n?void 0:n.warnBeforeUnload)&&void 0!==t&&t},[k,o.steps]);t.useEffect(function(){if(V){var e=function(e){return e.preventDefault(),e.returnValue="",""};return window.addEventListener("beforeunload",e),function(){window.removeEventListener("beforeunload",e)}}},[V]);var B=t.useRef({}),W=t.useRef({}),U=t.useRef({}),H=t.useRef(!1);t.useEffect(function(){H.current=!1},[k]);var Y=function(e){return l(void 0,void 0,void 0,function(){var t,n,r,a,s,l,c,d,p,f,m,h,g,b,v;return u(this,function(u){switch(u.label){case 0:for(t=-1,n=k+1;n<o.steps.length;n++){if(r=o.steps[n],a=z.current[r.name],s=B.current.zip_code||B.current.zip||I1(B.current.address),l=i(i({},B.current),{zip:s}),!a){t=n;break}if(a(l)){t=n;break}}if(c=o.steps[k],!(t>=0&&!e&&y&&(null==c?void 0:c.serverCallback)))return[3,4];C(function(e){var n=i({},e);return delete n[o.steps[t].name],n}),u.label=1;case 1:return u.trys.push([1,3,,4]),d=new Promise(function(e){return setTimeout(function(){return e(void 0)},3e3)}),p=y({result:U.current,form:o.name,step:o.steps[k].name,nextStep:o.steps[t].name}),[4,Promise.race([p,d])];case 2:if(f=u.sent(),null==(m=f)?void 0:m.displays)for(h=0,g=m.displays;h<g.length;h++)"FORM_STEP_UPDATE"===(b=g[h]).type&&N(b);return[3,4];case 3:return u.sent(),[3,4];case 4:if((v=t>=0&&!!e&&b1(o.steps[t]))&&I(!0),t>=0&&j(t),!e)return[3,8];u.label=5;case 5:return u.trys.push([5,,7,8]),[4,Q(k)];case 6:return u.sent(),[3,8];case 7:return v&&I(!1),[7];case 8:return[2]}})})},q=function(){for(var e,t,n=k,r=(null===(t=null===(e=o.steps)||void 0===e?void 0:e[n])||void 0===t?void 0:t.name)||"unknown",a=k-1;a>=0;a--){var s=o.steps[a],l=z.current[s.name],u=B.current.zip_code||B.current.zip||I1(B.current.address),c=i(i({},B.current),{zip:u});if(!l){p&&p(r,n,s.name,a),j(a);break}if(l(c)){p&&p(r,n,s.name,a),j(a);break}}},G=function(e){U.current=e,B.current=i(i({},B.current),e)},K=function(){return B.current},X=function(e){W.current=i(i({},W.current),e)},Z=function(){return W.current},Q=function(e){return l(void 0,void 0,void 0,function(){var t,n,r,i,s;return u(this,function(l){switch(l.label){case 0:if(H.current)return[2];if(H.current=!0,n=(t=null!=e?e:k)>=0&&t<o.steps.length?t:0,f&&f(o.steps[n].name,n,B.current,o.steps.length),r={result:B.current,form:o.name,step:o.steps[n].name,final:!!o.steps[n].final},"function"!=typeof a)return[2];D(void 0),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,a(r,"FORM_SUBMIT")];case 2:return l.sent(),[3,4];case 3:return i=l.sent(),H.current=!1,D(n),s=i instanceof Error?i.message:String(i),v("FORM_SUBMIT failed on step ".concat(o.steps[n].name,": ").concat(s)),m&&m(o.steps[n].name,n,o.steps.length,s),[3,4];case 4:return[2]}})})},J=function(e){var t=o.steps.findIndex(function(t){return t.name===e});-1!==t?j(t):v("External widget fallback: Cannot find step to jump to: ".concat(e))},ee=k;return(k<0||k>=(null===(r=null==o?void 0:o.steps)||void 0===r?void 0:r.length))&&(ee=0),e.jsxs("div",{children:[o.header.length>0&&e.jsx("div",{className:s?z1:L1,children:e.jsx(R1,{items:o.header,onHeaderClick:function(e){var t=o.steps.findIndex(function(t){return t.name===e});-1!==t?j(t):v("Header click: Cannot find step to jump to: ".concat(e))},labelHeader:o.labelHeader,stepName:o.steps[ee].name,isShowCase:s})}),e.jsx("div",{children:o.steps.map(function(t,n){var r,a,s=T[t.name],l=t;if((null==s?void 0:s.fields)&&(l=i(i({},l),{fields:s.fields})),null===(r=null==s?void 0:s.externalWidget)||void 0===r?void 0:r.config){var u=t.externalWidget;u&&(l=i(i({},l),{externalWidget:i(i({},u),{config:i(i({},u.config),s.externalWidget.config)})}))}var p=o.steps[ee].name===t.name,f=!b1(l),m=e.jsx(_1,{formStep:l,onData:G,onDataWithLabels:X,onNextStep:ee<o.steps.length?Y:void 0,onPrevStep:ee>0?q:void 0,getData:K,getDataWithLabels:Z,loading:c,currentStepIndex:n,totalSteps:o.steps.length,onTrackNextStep:d,currentStepDataRef:h,isActive:p,externalWidgetConfigPending:$&&b1(t)&&!(null===(a=null==s?void 0:s.externalWidget)||void 0===a?void 0:a.config)&&!A,onTrackHandoffRendered:b,onTrackHandoffNoRender:x,onTrackHandoffScheduled:_,onTrackHandoffError:w,onExternalWidgetFallback:J,hideIntro:!!(null==O?void 0:O.introTitle)||!!(null==O?void 0:O.introSubtitle),submitError:E===n?"We couldn't submit your information. Please check your connection and try again.":void 0});return e.jsx("div",{className:"".concat(F1," ").concat(p?A1:""),"data-xapp-form-step-active":p?"true":"false",children:O?e.jsx(M1,{framing:O,framed:f,children:m}):m},n)})})]})},B1=function(t){var n=t.display,r=t.onActionResponse,o=t.loading,a=t.onTrackNextStep,i=t.onTrackPreviousStep,s=t.onTrackSubmit,l=t.onTrackSubmitFailure,u=t.currentStepDataRef,c=t.onFormNext,d=t.stepUpdate,p=t.onTrackHandoffRendered,f=t.onTrackHandoffNoRender,m=t.onTrackHandoffScheduled,h=t.onTrackHandoffError;return e.jsxs("div",{className:"xapp-search-response-display",children:[w(n)&&e.jsx(V1,{form:n,loading:o,onActionResponse:r,onTrackNextStep:a,onTrackPreviousStep:i,onTrackSubmit:s,onTrackSubmitFailure:l,currentStepDataRef:u,onFormNext:c,stepUpdate:d,onTrackHandoffRendered:p,onTrackHandoffNoRender:f,onTrackHandoffScheduled:m,onTrackHandoffError:h}),_(n)&&e.jsx(et,{list:n}),x(n)&&e.jsx(Xe,{carousel:n})]})},W1=function(t){var n=t.html;return e.jsx("div",{className:"xapp-search-response-html",dangerouslySetInnerHTML:{__html:n}})},U1=function(t){var n=t.text;return e.jsx("div",{className:"xapp-search-response-text",children:e.jsx("p",{children:n})})},H1=function(n){var r=n.audio,o=n.onAudioChange,a=t.useRef(null);return t.useEffect(function(){var e=a.current,t=function(){b("Audio finished playing"),o(!1)},n=function(){b("Audio started playing"),o(!0)};return e&&(e.addEventListener("ended",t),e.addEventListener("play",n)),function(){e&&(e.removeEventListener("ended",t),e.removeEventListener("play",n))}},[r,o]),e.jsx("audio",{ref:a,autoPlay:!0,src:r})},Y1="SearchResponseOutputSpeech-module_xapp_search_response_output_speech__DCf8F";te('/**\n * The phone breakpoint.\n *\n * Width alone cannot express "phone". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step\'s action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n.SearchResponseOutputSpeech-module_xapp_search_response_output_speech__DCf8F {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n font-weight: normal;\n font-size: 16px;\n font-style: normal;\n color: #000;\n}\n.SearchResponseOutputSpeech-module_xapp_search_response_output_speech__DCf8F p {\n margin: 0 0 1em 0;\n}\n.SearchResponseOutputSpeech-module_xapp_search_response_output_speech__DCf8F p:last-child {\n margin-bottom: 0;\n}');var q1=function(n){var r,o=n.outputSpeech,a=n.onAudioChange,i="string"==typeof o?o:null==o?void 0:o.displayText,s="string"==typeof o||null==o?void 0:o.html,l="string"==typeof o||null==o?void 0:o.ssml;if(t.useContext(me).isVoiceEnabled){var u=l?function(e){for(var t,n=/<audio\s+src\s*=\s*"(.+?)"\s*\/?>/g,r=[];null!==(t=n.exec(e));)r.push(t[1]);return r}(l):[];r=u.length>0?u[0]:void 0}return e.jsxs("div",{className:Y1,children:[!!s&&e.jsx(W1,{html:s}),!!i&&!s&&e.jsx(U1,{text:i}),!!r&&e.jsx(H1,{audio:r,onAudioChange:a})]})},G1={};Object.defineProperty(G1,"__esModule",{value:!0});var K1=G1.isLinkoutSuggestion=function(e){if(!e)return!1;return void 0!==e.url};var X1="Button-module_xapp_search_btn__cQf3T",Z1="Button-module_xapp_search_btn__expand__dUwot";te('/**\n * The phone breakpoint.\n *\n * Width alone cannot express "phone". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step\'s action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n.Button-module_xapp_search_btn__cQf3T {\n display: inline-block;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px);\n border: solid 1px var(--xapp-form-widget-border-color, #d3d3df);\n background: white;\n padding: 4px 24px;\n color: black;\n text-decoration: none;\n box-sizing: border-box;\n text-align: center;\n line-height: normal;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n font-size: 16px;\n cursor: pointer;\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out, transform 150ms ease-in-out;\n}\n.Button-module_xapp_search_btn__cQf3T:hover {\n background-color: rgba(0, 0, 0, 0.04);\n box-shadow: var(--xapp-form-widget-box-shadow-subtle, 0 2px 8px rgba(0, 0, 0, 0.08));\n}\n.Button-module_xapp_search_btn__cQf3T:active {\n transform: scale(0.98);\n}\n.Button-module_xapp_search_btn__cQf3T:focus {\n outline: none;\n}\n.Button-module_xapp_search_btn__cQf3T:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n.Button-module_xapp_search_btn__expand__dUwot {\n width: 100%;\n}');var Q1=function(t){var n=t.className,r=t.expand,o=t.onClick;return e.jsx("button",{type:"button",className:"".concat(X1," ").concat(r?Z1:""," ").concat(n||""),onClick:o,children:t.children})},J1="SuggestedAction-module_xapp_search_suggested_action__gbLCz";te('/**\n * The phone breakpoint.\n *\n * Width alone cannot express "phone". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step\'s action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n.SuggestedAction-module_xapp_search_suggested_action__gbLCz {\n display: inline-block;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px);\n border: solid 1px var(--xapp-form-widget-border-color, var(--xapp-form-accent-color, #d3d3df));\n background: white;\n padding: 4px 24px;\n color: black;\n text-decoration: none;\n box-sizing: border-box;\n text-align: center;\n line-height: normal;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n font-size: 16px;\n cursor: pointer;\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out, transform 150ms ease-in-out;\n}\n.SuggestedAction-module_xapp_search_suggested_action__gbLCz:hover {\n background-color: rgba(0, 0, 0, 0.04);\n box-shadow: var(--xapp-form-widget-box-shadow-subtle, 0 2px 8px rgba(0, 0, 0, 0.08));\n}\n.SuggestedAction-module_xapp_search_suggested_action__gbLCz:active {\n transform: scale(0.98);\n}\n.SuggestedAction-module_xapp_search_suggested_action__gbLCz:focus {\n outline: none;\n}\n.SuggestedAction-module_xapp_search_suggested_action__gbLCz:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}');var e2=function(n){var r=n.action,o=n.className,a=n.onClick,i=t.useCallback(function(){a(r)},[r,a]);return K1(r)?e.jsx("span",{className:"".concat(J1," ").concat(o||""),children:e.jsx("a",{href:r.url,children:fe(r)})}):e.jsxs(Q1,{className:"".concat(J1," ").concat(o||""),onClick:i,children:[" ",fe(r)]})},t2={xapp_search_suggested_actions__actions:"SuggestedActions-module_xapp_search_suggested_actions__actions__Apv0-",xapp_search_suggested_actions__item:"SuggestedActions-module_xapp_search_suggested_actions__item__Q7nQb"};te(".SuggestedActions-module_xapp_search_suggested_actions__actions__Apv0- {\n margin-top: 8px;\n margin-bottom: 8px;\n}\n.SuggestedActions-module_xapp_search_suggested_actions__item__Q7nQb {\n margin-right: 16px;\n}");var n2=function(t){var n=t.actions,r=t.onActionClick;return e.jsx("div",{className:t2.xapp_search_suggested_actions,children:e.jsx("div",{className:t2.xapp_search_suggested_actions__actions,children:n.map(function(t,n){return e.jsx(e2,{action:t,className:t2.xapp_search_suggested_actions__item,onClick:r},n)})})})},r2="SearchResponsePart-module_xapp_search_response_part__sF6gs";te(".SearchResponsePart-module_xapp_search_response_part__sF6gs {\n margin-bottom: 12px;\n margin-top: 86px;\n border-radius: 8px;\n}\n.SearchResponsePart-module_xapp_search_response_part__sF6gs.SearchResponsePart-module_noHeaderForm__HdlyL {\n margin-top: 12px;\n}");var o2=function(t){var n=t.extraClass;return e.jsx("div",{className:"".concat(r2," ").concat(n||""),children:t.children})},a2="FormResponse-module_xapp_search_response__r2YN1";te(".FormResponse-module_xapp_search_response__r2YN1 {\n padding: 0 10px;\n overflow: auto;\n}");var i2=function(t){var n=t.response,r=t.className,o=t.onActionClick,a=t.onActionResponse,i=t.onAudioChange,s=t.loading,l=t.onTrackNextStep,u=t.onTrackPreviousStep,c=t.onTrackSubmit,d=t.onTrackSubmitFailure,p=t.currentStepDataRef,f=t.onFormNext,m=t.stepUpdate,h=t.onTrackHandoffRendered,y=t.onTrackHandoffNoRender,g=t.onTrackHandoffScheduled,b=t.onTrackHandoffError,v=n.outputSpeech,x=n.displays,_="object"==typeof v?v.suggestions:void 0;return e.jsxs("div",{className:"".concat(a2," ").concat(r||""),children:[!!v&&e.jsx(o2,{children:e.jsx(Se,{children:e.jsx(q1,{outputSpeech:v,onAudioChange:i})})}),!!(null==_?void 0:_.length)&&(null==_?void 0:_.length)>0&&e.jsx(n2,{actions:_,onActionClick:o}),!!(null==x?void 0:x.length)&&(null==x?void 0:x.length)>0&&x.map(function(t,n){var r=w(t)&&(!t.header||0===t.header.length);return e.jsx(o2,{extraClass:r?"noHeaderForm":"",children:e.jsx(B1,{display:t,onActionResponse:a,loading:s,onTrackNextStep:l,onTrackPreviousStep:u,onTrackSubmit:c,onTrackSubmitFailure:d,currentStepDataRef:p,onFormNext:f,stepUpdate:m,onTrackHandoffRendered:h,onTrackHandoffNoRender:y,onTrackHandoffScheduled:g,onTrackHandoffError:b})},n)})]})},s2=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","gclid","fbclid","msclkid"],l2=function(){function e(e,t,n){this.api=e,this.sessionId=t,this.formId=n}return e.prototype.trackFormOpen=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"form_open",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] form_open event tracked: ".concat(e.formName)),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track form_open event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackEngaged=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"engaged",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] engaged event tracked: ".concat(e.formName," (").concat(e.trigger,")")),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track engaged event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackNextStep=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"next_step",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] next_step event tracked: ".concat(e.completedStepName)),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track next_step event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackPreviousStep=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"previous_step",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] previous_step event tracked: ".concat(e.fromStepName," -> ").concat(e.toStepName)),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track previous_step event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackStepChange=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"step_change",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] step_change event tracked: ".concat(e.fromStepName," -> ").concat(e.toStepName," (").concat(e.direction,")")),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track step_change event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackSubmit=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"submit",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] submit event tracked: ".concat(e.finalStepName)),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track submit event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackSubmitFailure=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"submit_failure",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] submit_failure event tracked: ".concat(e.finalStepName)),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track submit_failure event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackClose=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"close",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] close event tracked: ".concat(e.lastStepName)),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track close event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackPartialData=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"partial_data",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] partial_data event tracked: ".concat(e.lastStepName," (").concat(e.abandonmentReason,")")),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track partial_data event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackHandoffRendered=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"handoff_rendered",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] handoff_rendered event tracked: ".concat(e.stepName," (").concat(e.provider,")")),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track handoff_rendered event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackHandoffNoRender=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"handoff_no_render",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] handoff_no_render event tracked: ".concat(e.stepName," (").concat(e.provider,")")),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track handoff_no_render event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackHandoffScheduled=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"handoff_scheduled",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] handoff_scheduled event tracked: ".concat(e.stepName," (").concat(e.provider,")")),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track handoff_scheduled event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackHandoffError=function(e){return l(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"handoff_error",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),b("[EventTracking] handoff_error event tracked: ".concat(e.stepName," (").concat(e.provider,")")),[3,3];case 2:return r=o.sent(),v("[EventTracking] Failed to track handoff_error event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackPartialDataBeacon=function(e){try{var t={eventType:"partial_data",metadata:this.buildMetadata(),data:e};return this.api.trackEventBeacon(t)}catch(e){return v("[EventTracking] Failed to queue partial_data beacon: ".concat(e)),!1}},e.prototype.buildMetadata=function(){var e={timestamp:(new Date).toISOString(),sessionId:this.sessionId||"unknown",formId:this.formId||"unknown",userAgent:navigator.userAgent};try{var t=this.getUserId();t&&"unknown"!==t&&(e.userId=t)}catch(e){}try{var n=new URL(window.location.href);(null==n?void 0:n.host.toLowerCase().startsWith("localhost"))||(e.currentUrl=window.location.href)}catch(e){}try{var r=this.getTrackingParameters();Object.assign(e,r)}catch(e){}return e},e.prototype.getUserId=function(){return localStorage.getItem("__xapp_form_user_id")||void 0},e.prototype.getTrackingParameters=function(){var e={},t=Date.now();s2.forEach(function(n){var r=localStorage.getItem("xa_tracking_".concat(n));if(r)try{var o=JSON.parse(r);o.expires>t&&(e[n]=o.value)}catch(e){}});for(var n=0;n<localStorage.length;n++){var r=localStorage.key(n);if(r&&r.startsWith("xa_tracking_track_"))try{var o=JSON.parse(localStorage.getItem(r)||"{}");if(o.expires>t){var a=r.replace("xa_tracking_","");e[a]=o.value}}catch(e){}}return e},e.prototype.sendEvent=function(e){return l(this,void 0,void 0,function(){var t;return u(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.api.trackEvent(e.eventType,e)];case 1:return n.sent(),[3,3];case 2:return t=n.sent(),v("[EventTracking] API call failed: ".concat(t)),[3,3];case 3:return[2]}})})},e}(),u2="FormWidget-module_loading__aAJ-B",c2="FormWidget-module_xapp_form_widget__V-G-H",d2="FormWidget-module_xapp_form_widget__content__a9NXC",p2="FormWidget-module_xapp_form_widget__response__X8Hbz",f2="FormWidget-module_xapp_form_widget__spinner__FBxso",m2="FormWidget-module_xapp_form_widget__close__0lp0O";te('/**\n * The phone breakpoint.\n *\n * Width alone cannot express "phone". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step\'s action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n.FormWidget-module_loading__aAJ-B {\n background-color: rgba(0, 0, 0, 0) !important;\n border: 0px !important;\n}\n\n.FormWidget-module_xapp_form_widget__V-G-H {\n display: flex;\n flex-direction: column;\n border: solid 1px var(--xapp-form-widget-border-color, #d3d3df);\n background: var(--xapp-form-widget-background-color, #f3f8fb);\n border-radius: var(--xapp-form-widget-border-radius-xl, 20px);\n overflow: hidden;\n max-width: 740px;\n max-height: 100%;\n box-shadow: var(--xapp-form-widget-box-shadow, 0 4px 24px rgba(0, 0, 0, 0.12));\n box-sizing: border-box;\n position: relative;\n}\n.FormWidget-module_xapp_form_widget__content__a9NXC {\n display: flex;\n flex-direction: column;\n border-top: solid 1px var(--xapp-form-widget-border-color, #d3d3df);\n max-height: 100%;\n min-height: 128px;\n overflow: hidden;\n width: 100%;\n}\n.FormWidget-module_xapp_form_widget__response__X8Hbz {\n padding-top: 1em;\n}\n.FormWidget-module_xapp_form_widget__spinner__FBxso {\n width: 100px;\n height: 100px;\n margin: auto;\n padding: 20px;\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O {\n position: absolute;\n top: 8px;\n right: 8px;\n width: 28px;\n height: 28px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #666;\n cursor: pointer;\n font-weight: bold;\n border: none;\n background: rgba(255, 255, 255, 0.9);\n z-index: 1000;\n transition: background-color 200ms ease-in-out, transform 150ms ease-in-out, box-shadow 200ms ease-in-out;\n box-shadow: var(--xapp-form-widget-box-shadow-subtle, 0 2px 8px rgba(0, 0, 0, 0.08));\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O::before {\n content: "";\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 44px;\n height: 44px;\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O:hover {\n background-color: rgb(255, 255, 255);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n transform: scale(1.05);\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O:active {\n transform: scale(0.95);\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O:focus {\n outline: none;\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n\n@media (min-width: 1201px) {\n .FormWidget-module_xapp_form_widget__V-G-H {\n width: 740px;\n /*\n &__content {\n width: 740px;\n } */\n }\n}\n@media (min-width: 992px) and (max-width: 1200px) {\n .FormWidget-module_xapp_form_widget__V-G-H {\n width: 600px;\n /* &__content {\n width: 600px;\n } */\n }\n}\n@media (min-width: 641px) and (max-width: 991px) {\n .FormWidget-module_xapp_form_widget__V-G-H {\n width: 500px;\n /* &__content {\n width: 500px; \n } */\n }\n}\n/* Mobile */\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormWidget-module_xapp_form_widget__V-G-H {\n width: 100%;\n max-width: none;\n height: 100%;\n border-radius: 0;\n border: 0;\n }\n .FormWidget-module_xapp_form_widget__content__a9NXC {\n width: 100%;\n border-top: 0;\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n }\n}');var h2=[1e3,2e3];var y2=function(t){var n=t.config;return e.jsx(me.Provider,{value:n,children:e.jsx(g2,{docked:t.docked,openedByTrigger:t.openedByTrigger,preselectChipLabel:t.preselectChipLabel,onPreselectChipUsed:t.onPreselectChipUsed,onSubmit:t.onSubmit})})},g2=function(n){var r,o=n.docked,a=n.openedByTrigger,s=n.preselectChipLabel,c=n.onPreselectChipUsed,d=n.onSubmit,p=T(),f=p[0],m=p[1],h=he(),g=h.loading,x=h.run,_=f.query,w=f.sendRequest,O=f.active,S=t.useState(n.response),k=S[0],j=S[1],P=t.useState(void 0),C=P[0],M=P[1],E=t.useState(!1),D=E[0],N=E[1],R=t.useState(0),$=R[0],I=R[1],F=t.useContext(me),A=be(F.api.demoMode||null===(r=F.trustedForm)||void 0===r?void 0:r.scriptUrl),L=t.useMemo(function(){return pe.getApi({key:F.api.key,url:F.api.url,intentId:F.intentId,demoMode:F.api.demoMode})},[F]),z=t.useRef(null),V=t.useRef({}),B=t.useRef({}),W=t.useRef(0),U=t.useRef(!1),H=t.useRef(!1),Y=t.useRef(void 0),q=t.useCallback(function(){var e=Y.current;if(e)return e;var t=ee();return Y.current=t,t},[]),G=t.useRef(null),K=t.useRef("unknown"),X=t.useRef(!1),Z=t.useRef(!1),Q=t.useRef(!1),J=t.useCallback(function(e){var t,n,r;z.current&&!Q.current&&(Q.current=!0,z.current.trackEngaged({formName:K.current,trigger:e,firstStepName:null===(r=null===(n=null===(t=G.current)||void 0===t?void 0:t.steps)||void 0===n?void 0:n[0])||void 0===r?void 0:r.name}))},[]),te=t.useCallback(function(){j(void 0),m({type:"new-search"}),m({type:"set-modal-state",active:!1,minimized:!0,sendRequest:!1})},[m]),ne=t.useCallback(function(){var e,t,n,r,o;if(z.current&&!U.current&&!X.current){var a=G.current;if(a){var s=(null===(e=a.steps)||void 0===e?void 0:e.length)||1,l=W.current,u=i(i({},V.current),B.current),c=Object.keys(u).length>0;z.current.trackClose({lastStepName:(null===(n=null===(t=a.steps)||void 0===t?void 0:t[l])||void 0===n?void 0:n.name)||"unknown",lastStepIndex:l,totalStepsCompleted:l,totalSteps:s,formData:c?u:void 0}),z.current.trackPartialData({lastStepName:(null===(o=null===(r=a.steps)||void 0===r?void 0:r[l])||void 0===o?void 0:o.name)||"unknown",lastStepIndex:l,totalStepsCompleted:l,totalSteps:s,partialData:c?u:void 0,abandonmentReason:"widget_close"}),X.current=!0}}j(void 0),m({type:"new-search"}),m({type:"set-modal-state",active:!1,minimized:!1,sendRequest:!1}),L.channelActionRequest({data:{result:{},step:"",form:""}},"FORM_CLOSE").then(function(e){b("ACTION Request (FORM_CLOSE). Data: Response: ".concat(JSON.stringify(e))),I(0)})},[L,m]);t.useEffect(function(){var e=y(window.location.href,{persistToLocalStorage:!0,persistenceDays:30,preferUrlParameters:!0});"development"===process.env.NODE_ENV&&Object.keys(e).length>0&&b("[FormWidget] Captured tracking parameters:",e)},[]),t.useEffect(function(){var e=function(){var e,t,n,r=i(i({},V.current),B.current);if(z.current&&!U.current&&!X.current){var o=G.current;if(o){var a=(null===(e=o.steps)||void 0===e?void 0:e.length)||1,s=W.current;z.current.trackPartialDataBeacon({lastStepName:(null===(n=null===(t=o.steps)||void 0===t?void 0:t[s])||void 0===n?void 0:n.name)||"unknown",lastStepIndex:s,partialData:r,totalStepsCompleted:s,totalSteps:a,completionPercentage:Math.round(s/a*100),abandonmentReason:"close_tab"}),X.current=!0}}};return window.addEventListener("beforeunload",e),function(){return window.removeEventListener("beforeunload",e)}},[]),t.useEffect(function(){var e=null,t=function(){var e,t,n,r=i(i({},V.current),B.current);if(z.current&&!U.current&&!X.current){var o=G.current;if(o){var a=(null===(e=o.steps)||void 0===e?void 0:e.length)||1,s=W.current;z.current.trackPartialDataBeacon({lastStepName:(null===(n=null===(t=o.steps)||void 0===t?void 0:t[s])||void 0===n?void 0:n.name)||"unknown",lastStepIndex:s,partialData:r,totalStepsCompleted:s,totalSteps:a,completionPercentage:Math.round(s/a*100),abandonmentReason:"timeout"}),X.current=!0}}},n=function(){if(document.hidden){var n=(r=new Date,(o=new Date(r)).setHours(24,0,0,0),o.getTime()-r.getTime());e=setTimeout(t,n)}else e&&(clearTimeout(e),e=null);var r,o};return document.addEventListener("visibilitychange",n),function(){document.removeEventListener("visibilitychange",n),e&&clearTimeout(e)}},[]);var re=t.useCallback(function(e,t){m({query:e.query,intentId:e.intentId,type:"set-query"}),x(function(){return L.intentRequest(e).then(function(n){var r,o,a,i,s;j(n),m({type:"set-response",response:n,query:e.query,intentId:e.intentId});var l=null===(r=null==n?void 0:n.displays)||void 0===r?void 0:r.find(function(e){var t=e;return"FORM"===(null==t?void 0:t.type)});if(l){G.current=l;var u=(null===(o=L.session)||void 0===o?void 0:o.sessionId)||"unknown",c=l.name||"unknown";if(K.current=c,z.current=new l2(L,u,c),!Z.current){Z.current=!0;var d=(null===(a=l.steps)||void 0===a?void 0:a.length)||1,p=null===(s=null===(i=l.steps)||void 0===i?void 0:i[0])||void 0===s?void 0:s.name;z.current.trackFormOpen({formName:c,totalSteps:d,firstStepName:p,lastStepIndex:0})}(null==t?void 0:t.engagementTrigger)&&J(t.engagementTrigger)}})})},[L,m,x,J]),oe=t.useCallback(function(e,t){var n=function(){return L.channelActionRequest(e,t).then(function(n){var r;if(b("ACTION Request (".concat(t,"). Data: ").concat(JSON.stringify(e)," Response: ").concat(JSON.stringify(n))),function(e){return!!e&&!0===e[se]}(n)&&v("ACTION Request (".concat(t,") was suppressed: this session already sent a final submit.")),(n.outputSpeech||n.displays)&&m({type:"set-response",response:n,query:""}),"FORM_SUBMIT"===t&&n.displays){var o=n.displays.find(function(e){return"FORM_STEP_UPDATE"===(null==e?void 0:e.type)});o&&M(o)}if((null===(r=n.context)||void 0===r?void 0:r.active)&&n.context.active.length>0){var a=n.context.active[0].parameters||{};m({type:"set-context",context:a})}e.autoClose?I(1):e.autoMinimize?I(2):I(0)})};return"FORM_SUBMIT"===t?x(function(){return function(e,t){return l(this,void 0,void 0,function(){var n,r,o;return u(this,function(a){switch(a.label){case 0:r=0,a.label=1;case 1:return r<=t.length?r>0?[4,(i=t[r-1],new Promise(function(e){setTimeout(e,i)}))]:[3,3]:[3,7];case 2:a.sent(),a.label=3;case 3:return a.trys.push([3,5,,6]),[4,e()];case 4:return[2,a.sent()];case 5:return o=a.sent(),n=o,v("FORM_SUBMIT attempt ".concat(r+1," of ").concat(t.length+1," failed: ").concat(o)),[3,6];case 6:return r++,[3,1];case 7:throw n}var i})})}(n,h2)}):x(n).catch(function(e){v("ACTION Request (".concat(t,") failed: ").concat(e))})},[L,m,x]);t.useEffect(function(){if(o&&!H.current||w&&O&&(F.autoGreeting||F.intentId)){o&&(H.current=!0),L.resetSession();var e=o||a?void 0:"manual_open";re({query:F.autoGreeting,intentId:F.intentId},{engagementTrigger:e}),m({type:"set-modal-state",active:!0,minimized:!1,sendRequest:!1})}},[o,a,w,O,re,m,F.autoGreeting,L,F.intentId]),t.useEffect(function(){D||(1===$?(j(void 0),m({type:"new-search"}),m({type:"set-modal-state",active:!1,minimized:!1,sendRequest:!1}),I(0)):2===$&&(j(void 0),m({type:"new-search"}),m({type:"set-modal-state",active:!1,minimized:!0,sendRequest:!1}),I(0)))},[D,m,$]);var ae=t.useCallback(function(e){var t=fe(e);re({query:t},{engagementTrigger:"chip_click"})},[re]);t.useEffect(function(){if(s&&k){var e=k.outputSpeech,t="object"==typeof e&&null!==e?e.suggestions:void 0;if(t&&0!==t.length){var n=t.find(function(e){return fe(e).toLowerCase()===s.toLowerCase()});n&&(b("Auto-selecting chip: ".concat(fe(n))),setTimeout(function(){ae(n)},100)),c&&c()}}},[k,s,ae,c]);var ie=t.useCallback(function(e,t){if(t||(t=e.action),e.timezoneOffset=(new Date).getTimezoneOffset(),"FORM_SUBMIT"===t){var n=A();n&&e.result&&(e.result=i(i({},e.result),n)),e.extras=i(i(i({},e.extras),{eventId:q()}),(r=ve("_fbp"),o=ve("_fbc"),i(i({},r?{fbp:r}:{}),o?{fbc:o}:{})))}var r,o;return oe(e,t)},[oe,A,q]),le=t.useCallback(function(e){return L.channelActionRequest(e,"FORM_NEXT")},[L]),ue=function(e){N(e)},ce=t.useCallback(function(e,t,n,r){var o,a,s;if(V.current=i(i({},V.current),n),B.current={},W.current=t+1,J("step_transition"),z.current){var l=G.current,u=null===(a=null===(o=null==l?void 0:l.steps)||void 0===o?void 0:o[t+1])||void 0===a?void 0:a.name,c=(null===(s=null==l?void 0:l.steps)||void 0===s?void 0:s.length)||1;z.current.trackNextStep({completedStepName:e,completedStepIndex:t,nextStepName:u,stepData:n,isLastStep:r}),u&&z.current.trackStepChange({fromStepName:e,fromStepIndex:t,toStepName:u,toStepIndex:t+1,direction:"forward",lastStepIndex:t+1,totalSteps:c})}},[J]),de=t.useCallback(function(e,t,n,r){var o,a;if(B.current={},W.current=r,z.current){var i=(null===(a=null===(o=G.current)||void 0===o?void 0:o.steps)||void 0===a?void 0:a.length)||1;z.current.trackPreviousStep({fromStepName:e,fromStepIndex:t,toStepName:n,toStepIndex:r,lastStepIndex:r,totalSteps:i}),z.current.trackStepChange({fromStepName:e,fromStepIndex:t,toStepName:n,toStepIndex:r,direction:"backward",lastStepIndex:r,totalSteps:i})}},[]),ye=t.useCallback(function(e,t,n,r){if(!U.current){U.current=!0;var o=A(),a=o?i(i({},n),o):n;if(V.current=a,z.current&&z.current.trackSubmit({finalStepName:e,finalStepIndex:t,completedData:a,totalSteps:r}),d&&!F.api.demoMode)try{d(q())}catch(e){v("[FormWidget] onSubmit callback threw:",e)}}},[A,d,q,F.api.demoMode]),ge=t.useCallback(function(e,t,n,r){var o;null===(o=z.current)||void 0===o||o.trackSubmitFailure({finalStepName:e,finalStepIndex:t,totalSteps:n,reason:r})},[]),xe=t.useCallback(function(e,t){var n;null===(n=z.current)||void 0===n||n.trackHandoffRendered({stepName:e,provider:t})},[]),_e=t.useCallback(function(e,t){var n;null===(n=z.current)||void 0===n||n.trackHandoffNoRender({stepName:e,provider:t})},[]),Oe=t.useCallback(function(e,t,n){var r;null===(r=z.current)||void 0===r||r.trackHandoffScheduled({stepName:e,provider:t,payload:n})},[]),Se=t.useCallback(function(e,t){var n;null===(n=z.current)||void 0===n||n.trackHandoffError({stepName:e,provider:t})},[]),ke=!!_||!!k;return o?e.jsx("div",{className:"".concat(c2," ").concat(g?u2:""),children:e.jsx("div",{className:"".concat(d2," ").concat(g?u2:""),children:k?e.jsx(i2,{response:k,className:p2,onActionClick:ae,onActionResponse:ie,onAudioChange:ue,loading:g,onTrackNextStep:ce,onTrackPreviousStep:de,onTrackSubmit:ye,onTrackSubmitFailure:ge,currentStepDataRef:B,onFormNext:le,stepUpdate:C,onTrackHandoffRendered:xe,onTrackHandoffNoRender:_e,onTrackHandoffScheduled:Oe,onTrackHandoffError:Se}):e.jsx("div",{className:f2,children:e.jsx(we,{})})})}):e.jsxs("div",{className:"".concat(c2," ").concat(g&&!k?u2:""),children:[ke&&e.jsxs("div",{className:"".concat(d2," ").concat(g&&!k?u2:""),children:[!k&&g&&e.jsx("div",{className:f2,children:e.jsx(we,{})}),k&&e.jsx(i2,{response:k,className:p2,onActionClick:ae,onActionResponse:ie,onAudioChange:ue,loading:g,onTrackNextStep:ce,onTrackPreviousStep:de,onTrackSubmit:ye,onTrackSubmitFailure:ge,currentStepDataRef:B,onFormNext:le,stepUpdate:C,onTrackHandoffRendered:xe,onTrackHandoffNoRender:_e,onTrackHandoffScheduled:Oe,onTrackHandoffError:Se})]}),k&&!!te&&e.jsx("div",{className:m2,onClick:ne,children:"✕"})]})},b2=function(e){var n,r=e.theme;t.useEffect(function(){var e,t=null===(e=null==r?void 0:r.font)||void 0===e?void 0:e.link;return t&&function(e){try{var t=new URL(e);if("https:"!==t.protocol)return void console.warn("Only HTTPS font URLs are allowed:",e);["fonts.googleapis.com","fonts.gstatic.com","use.typekit.net","use.fontawesome.com","cdn.jsdelivr.net","unpkg.com","cdnjs.cloudflare.com"].includes(t.hostname)||console.warn("Font URL from untrusted domain:",t.hostname),"fonts.googleapis.com"!==t.hostname||t.searchParams.has("display")||(t.searchParams.set("display","swap"),e=t.toString())}catch(t){return void console.error("Invalid font URL:",e,t)}var n="xapp-form-widget-font",r=document.getElementById(n);r&&r.remove();var o=document.createElement("link");o.id=n,o.rel="stylesheet",o.href=e,o.crossOrigin="anonymous",document.head.appendChild(o)}(t),function(){if(t){var e=document.getElementById("xapp-form-widget-font");e&&e.getAttribute("href")===t&&e.remove()}}},[null===(n=null==r?void 0:r.font)||void 0===n?void 0:n.link]);var o=JSON.stringify(function(e){var t=[],n=function(e){var t=e||{};return _2("--xapp-form-widget-",w2(O2("background-color",null==t?void 0:t.backgroundColor),O2("header-background-color",null==t?void 0:t.headerBackgroundColor),O2("header-text-color",null==t?void 0:t.headerTextColor),O2("primary-button-color",null==t?void 0:t.primaryButtonColor),O2("primary-button-text-color",null==t?void 0:t.primaryButtonTextColor),O2("secondary-button-color",null==t?void 0:t.secondaryButtonColor),O2("secondary-button-text-color",null==t?void 0:t.secondaryButtonTextColor),O2("border-color",null==t?void 0:t.borderColor),O2("border-radius-md",null==t?void 0:t.borderRadius),O2("border-radius-xl",null==t?void 0:t.borderRadius),_2("font-",w2(function(e){return u(this,function(t){switch(t.label){case 0:return e?[4,["family",e.fontFamily]]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})}(null==t?void 0:t.font))),_2("text-",w2(function(e){return u(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,6];case 1:return t.sent(),[4,["background-color-dark",S2(e.backgroundColor,3)]];case 2:return t.sent(),[4,["color",e.color]];case 3:return t.sent(),[4,["font-size",e.fontSize]];case 4:return t.sent(),[4,["font-family",e.fontFamily]];case 5:t.sent(),t.label=6;case 6:return[2]}})}(null==t?void 0:t.text))),_2("dropdown-",w2(function(e){return u(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,5];case 1:return t.sent(),[4,["color",e.color]];case 2:return t.sent(),[4,["font-size",e.fontSize]];case 3:return t.sent(),[4,["font-family",e.fontFamily]];case 4:t.sent(),t.label=5;case 5:return[2]}})}(null==t?void 0:t.dropdown))),_2("checkbox-",w2(function(e){return u(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,5];case 1:return t.sent(),[4,["color",e.color]];case 2:return t.sent(),[4,["font-size",e.fontSize]];case 3:return t.sent(),[4,["font-family",e.fontFamily]];case 4:t.sent(),t.label=5;case 5:return[2]}})}(null==t?void 0:t.checkbox))),_2("chips-",w2(function(e){return u(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,8];case 1:return t.sent(),[4,["background-color-selected",e.backgroundColorSelected]];case 2:return t.sent(),[4,["background-color-dark",S2(e.backgroundColor,20)]];case 3:return t.sent(),[4,["color",e.color]];case 4:return t.sent(),[4,["color-selected",e.colorSelected]];case 5:return t.sent(),[4,["font-size",e.fontSize]];case 6:return t.sent(),[4,["font-family",e.fontFamily]];case 7:t.sent(),t.label=8;case 8:return[2]}})}(null==t?void 0:t.chips))),_2("date-",w2(function(e){return u(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,6];case 1:return t.sent(),[4,["background-color-selected",e.backgroundColorSelected]];case 2:return t.sent(),[4,["color",e.color]];case 3:return t.sent(),[4,["font-size",e.fontSize]];case 4:return t.sent(),[4,["font-family",e.fontFamily]];case 5:t.sent(),t.label=6;case 6:return[2]}})}(null==t?void 0:t.date))),_2("card-",w2(function(e){return u(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,5];case 1:return t.sent(),[4,["color",e.color]];case 2:return t.sent(),[4,["font-size",e.fontSize]];case 3:return t.sent(),[4,["font-family",e.fontFamily]];case 4:t.sent(),t.label=5;case 5:return[2]}})}(null==t?void 0:t.card))),_2("side-button-",w2(function(e){return u(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,8];case 1:return t.sent(),[4,["background-color-dark",S2(e.backgroundColor,10)]];case 2:return t.sent(),[4,["color",e.color]];case 3:return t.sent(),[4,["font-size",e.fontSize]];case 4:return t.sent(),[4,["font-family",e.fontFamily]];case 5:return t.sent(),[4,["top",e.top]];case 6:return t.sent(),[4,["min-length",e.minLength]];case 7:t.sent(),t.label=8;case 8:return[2]}})}(null==t?void 0:t.sideButton))),_2("external-widget-",w2(function(e){return u(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,4];case 1:return t.sent(),[4,["padding",e.padding]];case 2:return t.sent(),[4,["min-height",e.minHeight]];case 3:t.sent(),t.label=4;case 4:return[2]}})}(null==t?void 0:t.externalWidget)))))}(e),r=n.next();for(;!1===r.done;){var o=r.value,a=o[0],i=o[1];null!=i&&""!==i&&t.push([a,i]),r=n.next()}return t}(r));return t.useLayoutEffect(function(){var e=JSON.parse(o);return function(e){for(var t,n=document.documentElement,r=0,o=e;r<o.length;r++){var a=o[r],i=a[0],s=a[1];n.style.setProperty(i,s),x2.set(i,(null!==(t=x2.get(i))&&void 0!==t?t:0)+1)}}(e),function(){return function(e){for(var t,n=document.documentElement,r=0,o=e;r<o.length;r++){var a=o[r][0],i=(null!==(t=x2.get(a))&&void 0!==t?t:1)-1;i<=0?(x2.delete(a),n.style.removeProperty(a)):x2.set(a,i)}}(e)}},[o]),null};var v2,x2=new Map;function _2(e,t){var n;return u(this,function(r){switch(r.label){case 0:n=t.next(),r.label=1;case 1:return n.done?[3,3]:[4,["".concat(e).concat(n.value[0]),n.value[1]]];case 2:return r.sent(),n=t.next(),[3,1];case 3:return[2]}})}function w2(){var e,t,n,r,o,a=[];for(e=0;e<arguments.length;e++)a[e]=arguments[e];return u(this,function(e){switch(e.label){case 0:t=0,n=a,e.label=1;case 1:if(!(t<n.length))return[3,5];r=n[t],o=r.next(),e.label=2;case 2:return!1!==o.done?[3,4]:[4,o.value];case 3:return e.sent(),o=r.next(),[3,2];case 4:return t++,[3,1];case 5:return[2]}})}function O2(e,t){return u(this,function(n){switch(n.label){case 0:return[4,[e,t]];case 1:return n.sent(),[2]}})}function S2(e,t){var n,r,o,a,i,s;if(!e)return e;try{if(e.startsWith("#")){var l=e.match(/\w\w/g);l&&(r=(n=l.map(function(e){return parseInt(e,16)}))[0],o=n[1],a=n[2])}else if(e.startsWith("rgb")){var u=function(e){var t,n=/^rgba?\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)$/,r=/^rgb?\((\d+),\s*(\d+),\s*(\d+)\)$/;return(t=e.match(n))?{r:parseInt(t[1]),g:parseInt(t[2]),b:parseInt(t[3]),a:parseFloat(t[4])}:(t=e.match(r))?{r:parseInt(t[1]),g:parseInt(t[2]),b:parseInt(t[3])}:null}(e);u&&(r=u.r,o=u.g,a=u.b,i=u.a)}if(void 0===r||void 0===o||void 0===a)return v("Darken: Unsupported color format: ".concat(e)),e;if(void 0!==i){if(0===r&&0===o&&0===a)i+=t/100;else{var c=.3*r+.59*o+.11*a,d=c*(1-t/100)/c;r=Math.round(r*d),o=Math.round(o*d),a=Math.round(a*d)}s="rgba(".concat(r,", ").concat(o,", ").concat(a,", ").concat(i,")")}else r=Math.max(0,r-t),o=Math.max(0,o-t),a=Math.max(0,a-t),s="#".concat(r.toString(16).padStart(2,"0")).concat(o.toString(16).padStart(2,"0")).concat(a.toString(16).padStart(2,"0"))}catch(t){v("Darken: Unsupported color format: ".concat(e," - Error: ").concat(t))}return s}!function(e){e.XAPP_FORM_BUTTON="xapp-form-button"}(v2||(v2={}));var k2="SideButton-module_xapp_form_sticky_button__YqORL",j2="SideButton-module_left__GT6z8",P2="SideButton-module_right__Hy2FU";te('/**\n * The phone breakpoint.\n *\n * Width alone cannot express "phone". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step\'s action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n.SideButton-module_xapp_form_sticky_button__YqORL {\n position: fixed;\n z-index: 10000;\n cursor: pointer;\n transform: translateY(-50%);\n text-align: center;\n writing-mode: vertical-rl;\n background-color: var(--xapp-form-widget-side-button-background-color, #d8412a);\n color: var(--xapp-form-widget-side-button-color, #ffffff);\n font-size: var(--xapp-form-widget-side-button-font-size, 1.5em);\n font-family: var(--xapp-form-widget-side-button-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n top: var(--xapp-form-widget-side-button-top, 50%);\n min-height: var(--xapp-form-widget-side-button-min-length, 200px);\n box-shadow: var(--xapp-form-widget-box-shadow, 0 4px 24px rgba(0, 0, 0, 0.12));\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out, transform 150ms ease-in-out;\n}\n.SideButton-module_xapp_form_sticky_button__YqORL:hover {\n background-color: var(--xapp-form-widget-side-button-background-color-dark, darkred);\n box-shadow: var(--xapp-form-widget-box-shadow-hover, 0 6px 32px rgba(0, 0, 0, 0.16));\n}\n.SideButton-module_xapp_form_sticky_button__YqORL:active {\n transform: translateY(-50%) scale(0.98);\n}\n.SideButton-module_xapp_form_sticky_button__YqORL:focus {\n outline: none;\n}\n.SideButton-module_xapp_form_sticky_button__YqORL:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n.SideButton-module_xapp_form_sticky_button__YqORL.SideButton-module_left__GT6z8 {\n left: 0;\n border-top-right-radius: 50%;\n border-bottom-right-radius: 50%;\n padding: 20px 20px 20px 10px;\n}\n.SideButton-module_xapp_form_sticky_button__YqORL.SideButton-module_right__Hy2FU {\n right: 0;\n border-top-left-radius: 50%;\n border-bottom-left-radius: 50%;\n padding: 20px 10px 20px 20px;\n transform: translateY(-50%) rotate(180deg);\n}\n.SideButton-module_xapp_form_sticky_button__YqORL.SideButton-module_right__Hy2FU:active {\n transform: translateY(-50%) rotate(180deg) scale(0.98);\n}');var T2=function(t){var n=t.onClick,r=t.position,o=t.label,a="right"===(null==r?void 0:r.toLowerCase())?P2:j2;return e.jsx("div",{onClick:n,className:"".concat(k2," ").concat(a),"data-xapp-form-side-button":"true",children:e.jsx("span",{children:o||"Schedule Now"})})},C2="xafw-auto-open-dismissed";function M2(e){if(!("number"!=typeof e||e<0))return Math.min(e,3e5)}function E2(e){if("number"==typeof e)return Math.max(0,Math.min(e,100))}function D2(e){var n,r=e.config,o=e.isActive,a=e.onOpen,i=e.hasInteracted,s=t.useRef(new Set),l=t.useRef(!1),u=t.useRef(null),c=(null==r?void 0:r.sessionKey)||C2,d=(null==r?void 0:r.mode)||"any",p=null==r?void 0:r.triggers,f=M2(null==p?void 0:p.delay),m=E2(null==p?void 0:p.scrollPercent),h=null==p?void 0:p.exitIntent,y="number"!=typeof(n=null==p?void 0:p.exitIntentThreshold)||n<0?50:n,g=M2(null==p?void 0:p.inactivity),b=null==r?void 0:r.patterns,v=null==r?void 0:r.minimumWidth,x=t.useMemo(function(){return JSON.stringify(null!=b?b:[])},[b]),_=t.useRef([]),w=t.useCallback(function(){var e=[];return void 0!==(null==p?void 0:p.delay)&&e.push("delay"),void 0!==(null==p?void 0:p.scrollPercent)&&e.push("scrollPercent"),(null==p?void 0:p.exitIntent)&&e.push("exitIntent"),void 0!==(null==p?void 0:p.inactivity)&&e.push("inactivity"),e},[null==p?void 0:p.delay,null==p?void 0:p.scrollPercent,null==p?void 0:p.exitIntent,null==p?void 0:p.inactivity]),O=t.useCallback(function(e){if(!l.current)if(s.current.add(e),"any"===d)l.current=!0,a();else if("all"===d){_.current.every(function(e){return s.current.has(e)})&&(l.current=!0,a())}},[d,a]);t.useEffect(function(){s.current=new Set,l.current=!1,_.current=w()},[w]),t.useEffect(function(){if((void 0!==f||void 0!==m||h||void 0!==g)&&!o&&!i&&!function(e){try{return"true"===sessionStorage.getItem(e)}catch(e){return!1}}(c)&&function(e){if(!e||0===e.length)return!0;var t=window.location.href;return e.some(function(e){return t.includes(e)})}(b)&&function(e){return"number"!=typeof e||window.innerWidth>=e}(v)){var e=[],t=[],n=function(e,n,r,o){e.addEventListener(n,r,o),t.push({target:e,event:n,handler:r,options:o})};if("number"==typeof f&&f>0){var r=setTimeout(function(){O("delay")},f);e.push(r)}if("number"==typeof m){var a=m,s=!1,l=function(){var e=window.scrollY||document.documentElement.scrollTop,t=document.documentElement.scrollHeight-window.innerHeight;t<=0||(e/t*100>=a&&O("scrollPercent"),s=!1)};n(window,"scroll",function(){s||(s=!0,"function"==typeof requestAnimationFrame?requestAnimationFrame(l):l())},{passive:!0}),l()}if(h&&!("ontouchstart"in window||navigator.maxTouchPoints>0)){var d=null!=y?y:50;n(document,"mouseout",function(e){e.clientY<=d&&O("exitIntent")})}if("number"==typeof g&&g>0){var p=function(){u.current&&clearTimeout(u.current),u.current=setTimeout(function(){O("inactivity")},g)};p();["mousemove","keydown","scroll","click","touchstart"].forEach(function(e){n(document,e,p,{passive:!0})})}return function(){e.forEach(function(e){return clearTimeout(e)}),u.current&&(clearTimeout(u.current),u.current=null),t.forEach(function(e){var t=e.target,n=e.event,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})}}},[f,m,h,y,g,x,v,o,i,c,O])}
322
322
  /*! Copyright (c) 2026, XAPPmedia */var N2="data-xapp-form-page",R2="data-xapp-form-page-count";function $2(){var e=parseInt(document.body.getAttribute(R2)||"0",10);return Number.isNaN(e)?0:e}function I2(){if("undefined"==typeof document||!document.body)return function(){};document.body.setAttribute(R2,String($2()+1)),document.body.setAttribute(N2,"true");var e=!1;return function(){if(!e){e=!0;var t=Math.max(0,$2()-1);0===t?(document.body.removeAttribute(N2),document.body.removeAttribute(R2)):document.body.setAttribute(R2,String(t))}}}var F2="Form-module_xapp_form__mMqzX";te('@font-face {\n font-family: RobotoRegular;\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: local("Roboto"), local("Roboto-Regular"), url(https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2) format("woff2");\n}\n.Form-module_xapp_form__mMqzX {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n}\n.Form-module_xapp_form__mMqzX .MuiTypography-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiButton-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiButtonBase-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX button {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiInputBase-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiInputBase-input {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiTextField-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiInputLabel-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiFormHelperText-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiFilledInput-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiFilledInput-input {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiChip-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiChip-label {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiAutocomplete-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiAutocomplete-input {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiFormControl-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiFormControlLabel-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX [class*="Mui"]:not([class*="Portal"]) {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}');var A2=function(n){var r,o,a,s,l=n.config,u=n.theme,c=T()[1],d=C(),p=d.active,f=d.minimized,m=t.useState(),h=m[0],y=m[1],g=t.useState(!1),x=g[0],_=g[1],w=t.useState(!1),O=w[0],S=w[1],k=!!(null===(r=l.autoOpen)||void 0===r?void 0:r.enabled)&&!function(e){var t=null==e?void 0:e.triggers;return void 0!==M2(null==t?void 0:t.delay)||void 0!==E2(null==t?void 0:t.scrollPercent)||!!(null==t?void 0:t.exitIntent)||void 0!==M2(null==t?void 0:t.inactivity)}(l.autoOpen),j=t.useCallback(function(e){(null==e?void 0:e.preselectChipLabel)&&y(e.preselectChipLabel),c({type:"toggle-modal-state"})},[c]),P=t.useCallback(function(){j()},[j]),M=t.useCallback(function(e){j(e)},[j]),E=t.useCallback(function(){return{active:p,minimized:f}},[p,f]),D=t.useMemo(function(){return pe.getApi({key:l.api.key,url:l.api.url,intentId:l.intentId,demoMode:l.api.demoMode})},[l]),N=t.useCallback(function(){var e;if(y(void 0),_(!0),O){try{var t=(null===(e=l.autoOpen)||void 0===e?void 0:e.sessionKey)||C2;sessionStorage.setItem(t,"true")}catch(e){}S(!1)}c({type:"new-search"}),c({type:"set-modal-state",active:!1,minimized:!1,sendRequest:!1}),D.channelActionRequest({data:{result:{},step:"",form:""}},"FORM_CLOSE").then(function(e){b("ACTION Request (FORM_CLOSE). Data: Response: ".concat(JSON.stringify(e)))})},[D,null===(o=l.autoOpen)||void 0===o?void 0:o.sessionKey,c,O]),R=t.useCallback(function(){S(!0),c({type:"set-modal-state",active:!0,minimized:!1,sendRequest:!0})},[c]);return D2({config:l.autoOpen,isActive:p,onOpen:R,hasInteracted:x}),t.useEffect(function(){var e=document.getElementsByClassName(v2.XAPP_FORM_BUTTON);if(e.length)b("Assigning ".concat(e.length," button(s) by class: ").concat(v2.XAPP_FORM_BUTTON)),Array.from(e).forEach(function(e){e.onclick=P,e.onfocus=P});else{var t=document.getElementById(v2.XAPP_FORM_BUTTON);t?(b("Assigning one button by id: ".concat(v2.XAPP_FORM_BUTTON,")}")),t.onclick=P,t.onfocus=P):b("Cannot assign buttons by class or id: ".concat(v2.XAPP_FORM_BUTTON,")}"))}window.xafwControl={openForm:M,formStatus:E}},[E,P,M]),t.useEffect(function(){var e=l.triggerSelector;if(e){var t,n=new WeakSet,r=[],o=!1,a=function(e){if(!n.has(e)&&!e.classList.contains(v2.XAPP_FORM_BUTTON)&&e.id!==v2.XAPP_FORM_BUTTON){n.add(e);var t=function(t){e instanceof HTMLAnchorElement&&("#"===e.getAttribute("href")||""===e.getAttribute("href"))&&t.preventDefault(),P()};e.addEventListener("click",t),r.push({element:e,onClick:t})}},i=function(){u.disconnect(),void 0!==t&&(clearTimeout(t),t=void 0)},s=function(){try{document.querySelectorAll(e).forEach(a)}catch(t){return o=!0,v('Invalid triggerSelector "'.concat(e,'": ').concat(t)),void i()}r.length>0&&i()},u=new MutationObserver(s);return s(),o||0!==r.length||(u.observe(document.body,{childList:!0,subtree:!0}),t=setTimeout(function(){0===r.length&&(v('triggerSelector "'.concat(e,'" matched no elements within ').concat(3e4,"ms - giving up")),i())},3e4)),function(){i(),r.forEach(function(e){var t=e.element,n=e.onClick;return t.removeEventListener("click",n)})}}},[l.triggerSelector,P]),s=n.button&&"object"==typeof n.button?e.jsx(n.button.type,i({},n.button.props,{onClick:P,onFocus:P})):e.jsx(e.Fragment,{}),e.jsxs("div",{className:F2,children:[e.jsx(b2,{theme:u}),l.sideButtonLabel&&!k&&e.jsx(T2,{onClick:P,label:l.sideButtonLabel,position:null===(a=null==u?void 0:u.sideButton)||void 0===a?void 0:a.position}),s,(p||k)&&e.jsx(ae,{disableBackdrop:k,onClose:N,children:e.jsx(y2,{docked:k,openedByTrigger:O,config:l,preselectChipLabel:h,onPreselectChipUsed:function(){return y(void 0)}})})]})};function L2(){var e=null===document||void 0===document?void 0:document.getElementById("xapp-form-js");return function(e){if(!e)return{path:""};var t=e.lastIndexOf("/"),n="";t>=0&&(n=e.substr(0,t));var r=new URL(e),o=new URLSearchParams(r.search).get("key")||"";return{path:n,key:o}}(null==e?void 0:e.src)}var z2="none";function V2(e){var t,n=e.standalone,r=e.stylePreset,o=e.partnerCode,a=e.getPresetStyle;if(n&&r!==z2){if(r)return r;if(o)return(null===(t=null==a?void 0:a(o))||void 0===t?void 0:t.enabled)?o:void 0}}function B2(e,t){return t?e?U2(e,t):t:e}function W2(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function U2(e,t){for(var n=i({},e),r=0,o=Object.entries(t);r<o.length;r++){var a=o[r],s=a[0],l=a[1];if(void 0!==l){var u=n[s];n[s]=W2(l)&&W2(u)?U2(u,l):l}}return n}exports.COST_GUIDE_FORM_STYLE={enabled:!0,theme:{borderColor:"#1aacbe",borderRadius:"8px",backgroundColor:"#eef8fa",headerBackgroundColor:"#22a2b4",headerTextColor:"#ffffff",primaryButtonColor:"#1aacbe",primaryButtonTextColor:"#ffffff",secondaryButtonColor:"#1aacbe",secondaryButtonTextColor:"#ffffff",text:{color:"#1c3f47"},chips:{backgroundColorSelected:"#1aacbe",colorSelected:"#ffffff"},date:{backgroundColorSelected:"#1aacbe"},font:{fontFamily:"Montserrat, Arial, Verdana, sans-serif",link:"https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Poppins:wght@400;700&display=swap"},standAlone:{backgroundColor:"rgb(243, 248, 251)"},externalWidget:{minHeight:"600px"}},framing:{tabLabel:"BOOK YOUR ESTIMATE",introPlacement:"above-tab"}},exports.DEFAULT_DATE_FIELD_NAME=Hc,exports.DEFAULT_DATE_TIME_FIELD_NAME=Yc,exports.DEFAULT_HORIZON_DAYS=60,exports.DEFAULT_SLOT_MINUTES=30,exports.DEFAULT_TIME_ZONE_FIELD_NAME=qc,exports.FORM_PAGE_ATTRIBUTE=N2,exports.FORM_PAGE_COUNT_ATTRIBUTE=R2,exports.Form=A2,exports.FormContainer=function(t){return e.jsx(P,{children:e.jsx(A2,{config:t.config,theme:t.theme,button:t.button,buttonElementLookup:t.buttonElementLookup})})},exports.FormDisplay=V1,exports.FormFrame=M1,exports.FormWidget=y2,exports.LeftAngleIcon=xe,exports.RightAngleIcon=_e,exports.STYLE_PRESET_NONE=z2,exports.SearchIcon=function(){return e.jsx("svg",{fill:"#000000",height:"300px",width:"30px",version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 382.163 382.163",children:e.jsxs("g",{children:[e.jsx("path",{d:"M344.89,215.855c0-50.602-24.567-95.57-62.396-123.618l2.982-5.326l46.258,25.92c1.16,0.65,2.418,0.958,3.659,0.958\n\t\tc2.626,0,5.175-1.381,6.55-3.835c8.883-15.853,11.061-34.216,6.132-51.706c-4.243-15.059-13.327-27.91-25.887-36.864l5.722-10.22\n\t\tc2.023-3.614,0.733-8.185-2.881-10.208c-3.614-2.023-8.184-0.734-10.208,2.88l-5.72,10.216\n\t\tc-31.487-13.349-68.758-1.123-85.857,29.391c-0.972,1.735-1.215,3.786-0.676,5.7s1.817,3.536,3.553,4.509l46.268,25.925\n\t\tl-2.406,4.297c-23.084-13.853-50.078-21.83-78.903-21.83c-28.825,0-55.818,7.977-78.902,21.829l-2.408-4.296l46.269-25.926\n\t\tc3.614-2.025,4.902-6.595,2.877-10.209c-8.883-15.853-23.407-27.297-40.897-32.226c-15.061-4.244-30.765-3.205-44.96,2.833\n\t\tL67.342,3.838c-2.023-3.615-6.593-4.904-10.208-2.881c-3.614,2.023-4.904,6.594-2.881,10.208l5.721,10.22\n\t\tc-12.559,8.954-21.643,21.804-25.886,36.864c-4.929,17.49-2.751,35.854,6.132,51.706c1.375,2.454,3.924,3.835,6.55,3.835\n\t\tc1.241,0,2.5-0.309,3.659-0.958l46.257-25.919l2.984,5.324c-37.83,28.047-62.397,73.016-62.397,123.619\n\t\tc0,45.21,19.61,85.924,50.767,114.091l-9.427,43.114c-0.885,4.047,1.678,8.044,5.725,8.929c0.54,0.118,1.078,0.175,1.609,0.175\n\t\tc3.448,0,6.553-2.393,7.32-5.899l7.818-35.757c25.321,18.332,56.416,29.157,89.996,29.157c33.58,0,64.676-10.825,89.997-29.158\n\t\tl7.818,35.758c0.767,3.507,3.871,5.899,7.319,5.899c0.531,0,1.07-0.057,1.609-0.175c4.046-0.885,6.61-4.882,5.725-8.929\n\t\tl-9.427-43.115C325.281,301.778,344.89,261.065,344.89,215.855z M308.517,30.436c12.357,6.924,21.279,18.246,25.121,31.88\n\t\tc3.155,11.198,2.574,22.853-1.57,33.507l-91.609-51.331C256.211,23.856,285.228,17.387,308.517,30.436z M50.096,95.824\n\t\tc-4.145-10.654-4.726-22.31-1.57-33.507c3.842-13.634,12.763-24.956,25.121-31.88c8.179-4.583,17.064-6.758,25.833-6.758\n\t\tc16.201,0,32.005,7.425,42.225,20.814L50.096,95.824z M52.273,215.855c0-76.54,62.269-138.809,138.809-138.809\n\t\tS329.89,139.315,329.89,215.855s-62.27,138.809-138.809,138.809S52.273,292.394,52.273,215.855z"}),e.jsx("path",{d:"M191.081,107.685c-59.645,0-108.17,48.525-108.17,108.17c0,59.645,48.525,108.17,108.17,108.17\n\t\tc59.646,0,108.17-48.525,108.17-108.17C299.252,156.21,250.727,107.685,191.081,107.685z M191.081,309.025\n\t\tc-51.374,0-93.17-41.796-93.17-93.17c0-51.374,41.796-93.17,93.17-93.17c51.375,0,93.17,41.796,93.17,93.17\n\t\tC284.252,267.229,242.456,309.025,191.081,309.025z"}),e.jsx("path",{d:"M198.585,190.081v-36.262c0-4.142-3.358-7.5-7.5-7.5s-7.5,3.358-7.5,7.5v36.26c-8.784,2.559-15.718,9.492-18.279,18.276\n\t\th-16.941c-4.142,0-7.5,3.358-7.5,7.5s3.358,7.5,7.5,7.5h16.941c3.254,11.165,13.574,19.349,25.775,19.349\n\t\tc14.805,0,26.849-12.044,26.849-26.849C217.93,203.655,209.748,193.337,198.585,190.081z M191.081,227.704\n\t\tc-6.533,0-11.849-5.315-11.849-11.849s5.315-11.849,11.849-11.849c6.534,0,11.849,5.315,11.849,11.849\n\t\tS197.615,227.704,191.081,227.704z"})]})})},exports.SpinnerIcon=we,exports.WidgetStylesheet=b2,exports.formatOfferingLabel=id,exports.generateOfferings=ud,exports.horizonDaysOf=sd,exports.isDateSelectable=cd,exports.markFormPage=I2,exports.mergeFormWidgetTheme=B2,exports.parseWidgetEnv=function(e){var t,n,r=(null===(t=e.connection)||void 0===t?void 0:t.accountKey)||L2().key||"";return[{api:{url:(null===(n=e.connection)||void 0===n?void 0:n.serverUrl)||"",key:r},suggestionsUrl:e.autocompleteSuggestionsUrl,autoGreeting:e.autoGreeting||"contact us",intentId:e.intentId,sideButtonLabel:e.sideButtonLabel,googleMapsApiKey:e.googleMapsApiKey,mapsBaseUrl:e.mapsBaseUrl,autoOpen:e.autoOpen,disabled:e.disabled,trustedForm:e.trustedForm,triggerSelector:e.triggerSelector},e.theme]},exports.resolveFormStyle=function(e){var t=e.customerTheme,n=e.getPresetStyle,r=V2(e),o=r?null==n?void 0:n(r):void 0;return o?{preset:r,theme:B2(t,o.theme),framing:o.framing}:{theme:t}},exports.resolveStylePresetName=V2,exports.timeZoneOf=od,exports.toCalendarDate=ed,exports.toOffsetIso=rd,exports.useFormPageMarker=function(e){void 0===e&&(e=!0),t.useEffect(function(){if(e)return I2()},[e])};