PageSourceSearch

https://towmatic.ai/static/js/7266.468b9a73.chunk.js

js towmatic.ai collected 2026-09-25 03:33:36 UTC 81,457 bytes, 3 lines download raw bytes

1/*! For license information please see 7266.468b9a73.chunk.js.LICENSE.txt */
2"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[7266],{12972(e,t,a){a.r(t),a.d(t,{default:()=>ye});var s=a(89379),i=a(65043),l=a(6931),r=a(63248),o=a(47097),c=a(44687),n=a(83124),d=a(95316),m=a(68521),h=a(94323),_=a(2428),u=a(45427),g=a(91140),p=a(92264),x=a(13390),v=a(51654),b=a(56328),f=a(77819),y=a(5656),w=a(53639),j=a(23988),N=a(36210),S=a(75088),k=a(73062),T=a(87978),M=a(57856),P=a(65727),A=a(28006),F=a(71360),C=a(50516),D=a(42489),R=a(44285),H=a(36401),E=a(40614),I=a(78615),q=a(82353),L=a(70579);const B=[];for(let we=0;we<24;we++)for(let e=0;e<60;e+=30){const t=we<12?"AM":"PM",a="".concat(0===we?12:we>12?we-12:we,":").concat(0===e?"00":"30"," ").concat(t);B.push(a)}const V=Array.from({length:101},(e,t)=>t),O=["2","3","4","5"],G=["America/New_York","America/Chicago","America/Denver","America/Los_Angeles","America/Anchorage","Pacific/Honolulu"],$={company_name:"Company Name",lot_address:"Lot Address",driver_time_limit:"Driver Time Limit (In Minutes)",cc_tow_standard_hook_up:"Standard Hook Up Fee",cc_tow_premium_hook_up:"Premium Hook Up Fee",cc_tow_dolly_fee:"Dolly Fee",cc_tow_enroute_mileage_threshold:"EnRoute Mileage Threshold",cc_tow_additional_per_mile:"EnRoute Mileage Price (Additional Price Per Mile)",cc_tow_standard_per_mile:"Standard Price Per Mile",cc_tow_distance_threshold_1:"Total Tow Distance Mileage Threshold 1",cc_tow_price_threshold_1:"Price Threshold 1",cc_tow_distance_threshold_2:"Total Tow Distance Mileage Threshold 2",cc_tow_price_threshold_2:"Price Threshold 2",cc_tow_fuel_surcharge:"Fuel Surcharge",cc_tow_skates:"Skates",cc_tow_parking_garage:"Parking Garage Fee",cc_svc_standard_hook_rate:"Standard Hook/Base Rate",cc_svc_enroute_mileage_threshold:"EnRoute Mileage Threshold",cc_svc_premium_hook_rate:"Premium Hook/Base Rate",cc_svc_additional_per_mile:"EnRoute Mileage Price (Additional Price Per Mile)",cc_svc_fuel_surcharge_pct:"Fuel Surcharge Percentage",cc_svc_night_start:"Night Time Service Start Time",cc_svc_night_end:"Night Time Service End Time",cc_svc_night_additional_fee:"Night Time Service Additional Fee",cc_svc_parking_garage:"Parking Garage Fee",mc_tow_standard_hook_rate:"Standard Hook Rate",mc_tow_premium_hook_rate:"Premium Hook Rate",mc_tow_dolly_fee:"Dolly Fee",mc_tow_enroute_mileage_threshold:"EnRoute Mileage Threshold",mc_tow_enroute_mileage_price:"EnRoute Mileage Price",mc_tow_standard_per_mile:"Standard Price Per Mile",mc_tow_distance_threshold_1:"Total Tow Distance Mileage Threshold 1",mc_tow_price_per_mile_threshold_1:"Price Per Mile Threshold 1",mc_tow_distance_threshold_2:"Total Tow Distance Mileage Threshold 2",mc_tow_price_per_mile_threshold_2:"Price Per Mile Threshold 2",mc_tow_fuel_surcharge_pct:"Fuel Surcharge",mc_svc_standard_base_service:"Standard Base Service Rate",mc_svc_premium_base_service:"Premium Base Service Rate",mc_svc_standard_base_winch_out:"Standard Base Winch Out Rate",mc_svc_premium_base_winch_out:"Premium Base Winch Out Rate",mc_svc_skates_fee:"Skates Fee",mc_svc_parking_garage:"Parking Garage Fee",mc_svc_goa_fee_pct:"GOA Fee Percentage",mc_svc_email:"Email Address",timezone:"Time Zone",premium_vehicle_list:"Premium Vehicle List",vehicle_issue_list:"Premium Vehicle Issue List",md_tow_standard_hook_up:"Standard Hook Up Fee (Medium)",md_tow_premium_hook_up:"Premium Hook Up Fee (Medium)",md_tow_standard_per_mile:"Standard Price Per Mile (Medium)",md_tow_enroute_mileage_threshold:"EnRoute Mileage Threshold (Medium Tow)",md_tow_enroute_mileage_price:"EnRoute Mileage Price (Medium Tow)",md_tow_distance_threshold_1:"Total Tow Distance Mileage Threshold 1 (Medium)",md_tow_price_threshold_1:"Price Threshold 1 (Medium)",md_tow_distance_threshold_2:"Total Tow Distance Mileage Threshold 2 (Medium)",md_tow_price_threshold_2:"Price Threshold 2 (Medium)",md_tow_fuel_surcharge:"Fuel Surcharge (Medium)",md_tow_skates:"Skates (Medium)",md_tow_dolly_fee:"Dolly Fee (Medium)",md_tow_parking_garage:"Parking Garage Fee (Medium Tow)",md_tow_hourly_rate:"Hourly Rate (Medium Tow)",md_tow_minimum_hours:"Minimum Hours (Medium Tow)",md_tow_billing_method:"Billing Method (Medium Tow)",md_svc_base_service_price:"Standard Hook/Base Rate (Medium Service)",md_svc_specialty_service_rate:"Specialty Service Rate (Medium)",md_svc_base_service_mileage_threshold:"EnRoute Mileage Threshold (Medium Service)",md_svc_price_per_mile:"EnRoute Mileage Price (Medium Service)",md_svc_night_start:"Night Time Service Start Time (Medium)",md_svc_night_end:"Night Time Service End Time (Medium)",md_svc_night_fee:"Night Time Service Additional Fee (Medium)",md_svc_fuel_surcharge_pct:"Fuel Surcharge Percentage (Medium Service)",md_svc_parking_garage:"Parking Garage Fee (Medium Service)",md_svc_hourly_rate:"Hourly Rate (Medium Service)",md_svc_minimum_hours:"Minimum Hours (Medium Service)",md_svc_billing_method:"Billing Method (Medium Service)",md_vehicle_list:"Medium Duty Vehicle Identification",md_issue_list:"Medium Duty Issue List",hd_tow_standard_hook_up:"Standard Hook Up Fee (Heavy
2)",hd_tow_premium_hook_up:"Premium Hook Up Fee (Heavy)",hd_tow_standard_per_mile:"Standard Price Per Mile (Heavy)",hd_tow_enroute_mileage_threshold:"EnRoute Mileage Threshold (Heavy Tow)",hd_tow_enroute_mileage_price:"EnRoute Mileage Price (Heavy Tow)",hd_tow_distance_threshold_1:"Total Tow Distance Mileage Threshold 1 (Heavy)",hd_tow_price_threshold_1:"Price Threshold 1 (Heavy)",hd_tow_distance_threshold_2:"Total Tow Distance Mileage Threshold 2 (Heavy)",hd_tow_price_threshold_2:"Price Threshold 2 (Heavy)",hd_tow_fuel_surcharge:"Fuel Surcharge (Heavy)",hd_tow_skates:"Skates (Heavy)",hd_tow_dolly_fee:"Dolly Fee (Heavy)",hd_tow_parking_garage:"Parking Garage Fee (Heavy Tow)",hd_tow_hourly_rate:"Hourly Rate (Heavy Tow)",hd_tow_minimum_hours:"Minimum Hours (Heavy Tow)",hd_tow_billing_method:"Billing Method (Heavy Tow)",hd_svc_base_service_price:"Standard Hook/Base Rate (Heavy Service)",hd_svc_specialty_service_rate:"Specialty Service Rate (Heavy)",hd_svc_base_service_mileage_threshold:"EnRoute Mileage Threshold (Heavy Service)",hd_svc_price_per_mile:"EnRoute Mileage Price (Heavy Service)",hd_svc_night_start:"Night Time Service Start Time (Heavy)",hd_svc_night_end:"Night Time Service End Time (Heavy)",hd_svc_night_fee:"Night Time Service Additional Fee (Heavy
2)",hd_svc_fuel_surcharge_pct:"Fuel Surcharge Percentage (Heavy Service)",hd_svc_parking_garage:"Parking Garage Fee (Heavy Service)",hd_svc_hourly_rate:"Hourly Rate (Heavy Service)",hd_svc_minimum_hours:"Minimum Hours (Heavy Service)",hd_svc_billing_method:"Billing Method (Heavy Service)",hd_vehicle_list:"Heavy Duty Vehicle Identification",hd_issue_list:"Heavy Duty Issue List"},W=e=>{let{text:t}=e;const[a,s]=(0,i.useState)(!1),l=(0,i.useRef)(null);return(0,i.useEffect)(()=>{if(!a)return;const e=e=>{l.current&&!l.current.contains(e.target)&&s(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[a]),(0,L.jsxs)("span",{className:"relative inline-block ml-1",ref:l,children:[(0,L.jsx)("button",{onClick:()=>s(!a),className:"text-blue-400 hover:text-blue-600 focus:outline-none align-middle","aria-label":"More info",children:(0,L.jsx)(M.A,{className:"w-3.5 h-3.5 inline"})}),a&&(0,L.jsxs)("div",{className:"absolute z-50 left-0 bottom-full mb-1 w-64 p-2.5 bg-gray-900 text-white text-xs rounded-lg shadow-lg leading-relaxed",children:[t,(0,L.jsx)("div",{className:"absolute left-2 top-full w-0 h-0 border-l-4 border-r-4 border-t-4 border-transparent border-t-gray-900"})]})]})},X=i.createContext([]),U=e=>{let{field:t}=e;return(0,L.jsxs)("span",{className:"ml-1 inline-flex items-center gap-0.5 text-[9.5px] text-amber-600 bg-amber-50 border border-amber-200 rounded px-1 py-0.5 align-middle",title:"Saved to your account \u2014 syncing to your Google Sheet in the background","data-testid":"pricing-unsynced-".concat(t),children:[(0,L.jsx)(C.A,{className:"w-2.5 h-2.5 animate-spin"}),"Syncing"]})},Q=i.createContext(null),z=e=>{let{field:t}=e;return(0,L.jsxs)("span",{className:"ml-1 inline-flex items-center gap-0.5 text-[9.5px] text-emerald-700 bg-emerald-50 border border-emerald-200 rounded px-1 py-0.5 align-middle animate-in fade-in zoom-in-95 duration-200",title:"Change is now live in your Google Sheet","data-testid":"pricing-just-synced-".concat(t),children:[(0,L.jsx)(N.A,{className:"w-2.5 h-2.5"}
2),"Synced"]})},K=e=>{let{field:t}=e;const a=(e=>{const t=i.useContext(X);return Array.isArray(t)&&t.includes(e)})(t),s=(e=>{const t=i.useContext(Q);return t instanceof Set&&t.has(e)})(t);return a?(0,L.jsx)(U,{field:t}):s?(0,L.jsx)(z,{field:t}):null},Z=e=>{let{label:t,field:a,value:s,onSave:l,saving:r,tooltip:o,noDollar:c,optional:n}=e;const[d,m]=(0,i.useState)(s||""),h=(0,i.useRef)(s);(0,i.useEffect)(()=>{s!==h.current&&(m(s||""),h.current=s)},[s]);const _=!d&&!n;return(0,L.jsxs)("div",{className:"space-y-1","data-testid":"pricing-field-".concat(a),children:[(0,L.jsxs)("label",{className:"text-xs font-medium text-gray-500 block",children:[t,!n&&(0,L.jsx)("span",{className:"text-red-400 ml-0.5",children:"*"}),o&&(0,L.jsx)(W,{text:o}),(0,L.jsx)(K,{field:a})]}),(0,L.jsxs)("div",{className:"relative",children:[!c&&(0,L.jsx)("span",{className:"absolute left-2 top-1/2 -translate-y-1/2 text-gray-400 text-xs",children:"$"}),(0,L.jsx)(p.p,{type:"text",inputMode:"decimal",value:d,onChange:e=>{const t=e.target.value;(""===t||/^\d*\.?\d*$/.test(t))&&m(t)},onBlur:()=>{const e=d.trim();e!==(s||"")&&l(a,e)},className:"".concat(c?"":"pl-6"," h-9 text-sm ").concat(_?"border-amber-300 bg-amber-50/30":""),disabled:r===a,placeholder:n?"Optional":void 0})]}),_&&(0,L.jsx)("p",{className:"text-[10px] text-amber-500",children:"Required"})]})},Y=e=>{let{label:t,field:a,value:s,onSave:l,saving:r,icon:o,multiline:c,tooltip:n,optional:d,placeholder:m}=e;const[h,_]=(0,i.useState)(s||""),u=(0,i.useRef)(s);(0,i.useEffect)(()=>{s!==u.current&&(_(s||""),u.current=s)},[s]);const g=()=>{const e=h.trim();e!==(s||"")&&l(a,e)},x=!h;return c?(0,L.jsxs)("div",{className:"space-y-1","data-testid":"pricing-field-".concat(a),children:[(0,L.jsxs)("label",{className:"text-xs font-medium text-gray-500 block",children:[t,!d&&(0,L.jsx)("span",{className:"text-red-400 ml-0.5",children:"*"}),n&&(0,L.jsx)(W,{text:n}),(0,L.jsx)(K,{field:a})]}),(0,L.jsxs)("div",{className:"relative",children:[o&&(0,L.jsx)(o,{className:"absolute left-2 top-2.5 text-gray-400 w-3.5 h-3.5"}),(0,L.jsx)("textarea",{value:h,onChange:e=>_(e.target.value),onBlur:g,rows:d?3:2,placeholder:m,className:"".concat(o?"pl-7":""," w-full text-sm border rounded-md px-3 py-2 resize-none focus:outline-none focus:ring-2 focus:ring-orange-500 ").concat(x&&!d?"border-amber-300 bg-amber-50/30":"border-gray-200"),disabled:r===a})]}),x&&!d&&(0,L.jsx)("p",{className:"text-[10px] text-amber-500",children:"Required"})]}):(0,L.jsxs)("div",{className:"space-y-1","data-testid":"pricing-field-".concat(a),children:[(0,L.jsxs)("label",{className:"text-xs font-medium text-gray-500 block",children:[t,!d&&(0,L.jsx)("span",{className:"text-red-400 ml-0.5",children:"*"}),n&&(0,L.jsx)(W,{text:n}),(0,L.jsx)(K,{field:a})]}),(0,L.jsxs)("div",{className:"relative",children:[o&&(0,L.jsx)(o,{className:"absolute left-2 top-1/2 -translate-y-1/2 text-gray-400 w-3.5 h-3.5"}),(0,L.jsx)(p.p,{type:"text",value:h,onChange:e=>_(e.target.value),onBlur:g,placeholder:m,className:"".concat(o?"pl-7":""," h-9 text-sm ").concat(x&&!d?"border-amber-300 bg-amber-50/30":""),disabled:r===a})]}),x&&!d&&(0,L.jsx)("p",{className:"text-[10px] text-amber-500",children:"Required"})]})},J=e=>{let{label:t,field:a,value:s,onSave:i,saving:l,tooltip:r}=e;const o=!s;return(0,L.jsxs)("div",{className:"space-y-1","data-testid":"pricing-field-".concat(a),children:[(0,L.jsxs)("label",{className:"text-xs font-medium text-gray-500 block",children:[t,(0,L.jsx)("span",{className:"text-red-400 ml-0.5",children:"*"}),r&&(0,L.jsx)(W,{text:r}),(0,L.jsx)(K,{field:a})]}),(0,L.jsxs)("select",{value:s||"",onChange:e=>i(a,e.target.value),disabled:l===a,className:"w-full h-9 text-sm border rounded-md px-2 bg-white focus:outline-none focus:ring-2 focus:ring-orange-500 ".concat(o?"border-amber-300 bg-amber-50/30":"border-gray-200"),children:[(0,L.jsx)("option",{value:"",children:"Select Time"}),B.map(e=>(0,L.jsx)("option",{value:e,children:e},e))]}),o&&(0,L.jsx)("p",{className:"text-[10px] text-amber-500",children:"Required"})]})},ee=e=>{let{label:t,field:a,value:s,onSave:i,saving:l,tooltip:r}=e;const o=!s&&"0"!==s;return(0,L.jsxs)("div",{className:"space-y-1","data-testid":"pricing-field-".concat(a),children:[(0,L.jsxs)("label",{className:"text-xs font-medium text-gray-500 block",children:[t,(0,L.jsx)("span",{className:"text-red-400 ml-0.5",children:"*"}),r&&(0,L.jsx)(W,{text:r}),(0,L.jsx)(K,{field:a})]}),(0,L.jsx)("div",{className:"relative",children:(0,L.jsxs)("select",{value:s||"",onChange:e=>i(a,e.target.value),disabled:l===a,className:"w-full h-9 text-sm border rounded-md px-2 pr-7 bg-white focus:outline-none focus:ring-2 focus:ring-orange-500 ".concat(o?"border-amber-300 bg-amber-50/30":"border-gray-200"),children:[(0,L.jsx)("option",{value:"",children:"Select %"}),V.map(e=>(0,L.jsxs)("option",{value:String(e),children:[e,"%"]},e))]})}),o&&(0,L.jsx)("p",{className:"text-[10px] text-amber-500",children:"Required"})]})},te=e=>{let{label:t,field:a,value:s,options:i,onSave:l,saving:r,tooltip:o}=e;const c=!s;return(0,L.jsxs)("div",{className:"space-y-1","data-testid":"pricing-field-".concat(a),children:[(0,L.jsxs)("label",{className:"text-xs font-medium text-gray-500 block",children:[t,(0,L.jsx)("span",{className:"text-red-400 ml-0.5",children:"*"}),o&&(0,L.jsx)(W,{text:o}),(0,L.jsx)(K,{field:a})]}),(0,L.jsxs)("select",{value:s||"",onChange:e=>l(a,e.target.value),disabled:r===a,className:"w-full h-9 text-sm border rounded-md px-2 bg-white focus:outline-none focus:ring-2 focus:ring-orange-500 ".concat(c?"border-amber-300 bg-amber-50/30":"border-gray-200"),children:[(0,L.jsx)("option",{value:"",children:"Select..."}),i.map(e=>(0,L.jsx)("option",{value:e,children:e},e))]}),c&&(0,L.jsx)("p",{className:"text-[10px] text-amber-500",children:"Required"})]})},ae=e=>{let{label:t,field:a,value:s,onSave:l,saving:r,description:o}=e;const[c,n]=(0,i.useState)([]),[d,m]=(0,i.useState)(""),h=(0,i.useRef)(s);(0,i.useEffect)(()=>{s!==h.current&&(h.current=s,n(s?s.split(",").map(e=>
2e.trim()).filter(Boolean):[]))},[s]),(0,i.useEffect)(()=>{s&&0===c.length&&n(s.split(",").map(e=>e.trim()).filter(Boolean))},[]);const _=e=>{const t=e.map(e=>e.toLowerCase().trim()).filter(Boolean).join(",");l(a,t)},u=()=>{const e=d.toLowerCase().trim();if(!e)return;if(c.includes(e))return void b.toast.error("This item is already in the list");const t=[...c,e];n(t),m(""),_(t)};return(0,L.jsxs)("div",{className:"space-y-2","data-testid":"pricing-field-".concat(a),children:[(0,L.jsxs)("label",{className:"text-xs font-medium text-gray-500 block",children:[t,(0,L.jsx)(K,{field:a})]}),o&&(0,L.jsx)("p",{className:"text-xs text-gray-400",children:o}),(0,L.jsx)("div",{className:"flex flex-wrap gap-1.5 p-2 border border-gray-200 rounded-lg min-h-[60px] bg-gray-50",children:c.map((e,t)=>(0,L.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-orange-100 text-orange-800 text-xs rounded-full border border-orange-200",children:[e,(0,L.jsx)("button",{onClick:()=>(e=>{const t=c.filter((t,a)=>a!==e);n(t),_(t)})(t),className:"hover:text-red-600 transition-colors",disabled:r===a,children:(0,L.jsx)(E.A,{className:"w-3 h-3"})})]},"".concat(e,"-").concat(t)))}),(0,L.jsxs)("div",{className:"flex gap-2",children:[(0,L.jsx)(p.p,{type:"text",value:d,onChange:e=>m(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),u())},placeholder:"Type and press Enter...",className:"h-8 text-sm flex-1",disabled:r===a}),(0,L.jsx)(x.$,{size:"sm",onClick:u,disabled:!d.trim()||r===a,className:"bg-orange-500 hover:bg-orange-600 text-white h-8 px-3",children:(0,L.jsx)(F.A,{className:"w-3.5 h-3.5"})})]})]})},se=e=>{let{title:t,icon:a,iconColor:s,children:i,description:l}=e;return(0,L.jsxs)(g.Zp,{className:"border border-gray-200 shadow-sm","data-testid":"pricing-section-".concat(t.replace(/\s+/g,"-").toLowerCase()),children:[(0,L.jsxs)("div",{className:"p-4 sm:p-5 border-b border-gray-100 bg-gray-50 rounded-t-lg",children:[(0,L.jsxs)("div",{className:"flex items-center gap-2",children:[a&&(0,L.jsx)(a,{className:"w-5 h-5 ".concat(s||"text-gray-600")}),(0,L.jsx)("h3",{className:"font-semibold text-gray-900 text-base",children:t})]}),l&&(0,L.jsx)("p",{className:"text-xs text-gray-500 mt-1 ml-7",children:l})]}),(0,L.jsx)(g.Wu,{className:"p-4 sm:p-5",children:i})]})},ie=e=>{let{text:t}=e;return(0,L.jsxs)("div",{className:"flex items-start gap-2 py-1.5",children:[(0,L.jsx)(M.A,{className:"w-3.5 h-3.5 text-blue-400 mt-0.5 flex-shrink-0"}),(0,L.jsx)("p",{className:"text-xs text-gray-500 leading-relaxed",children:t})]})},le=e=>{let{companyId:t}=e;return(0,L.jsx)(h.A,{companyId:t,area:"pricing",fieldLabels:(0,s.A)((0,s.A)({},$),{},{motor_club_enabled:"Motor Club",medium_duty_enabled:"Medium Duty",heavy_duty_enabled:"Heavy Duty"}),testIdPrefix:"pricing-change-log"})},re=e=>{let{children:t}=e;return(0,L.jsxs)("div",{className:"flex items-center gap-3 py-2","data-testid":"section-divider-".concat(String(t).replace(/\s+/g,"-").toLowerCase()),children:[(0,L.jsx)("div",{className:"flex-1 h-px bg-gray-200"}),(0,L.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wider text-gray-500",children:t}),(0,L.jsx)("div",{className:"flex-1 h-px bg-gray-200"})]})},oe=(e,t)=>"noquote"===t?[]:"hourly"===t?(e=>["".concat(e,"_tow_hourly_rate"),"".concat(e,"_tow_minimum_hours"),"".concat(e,"_tow_standard_hook_up"),"".concat(e,"_tow_parking_garage")])(e):(e=>["".concat(e,"_tow_standard_hook_up"),"".concat(e,"_tow_standard_per_mile"),"".concat(e,"_tow_enroute_mileage_threshold"),"".concat(e,"_tow_enroute_mileage_price"),"".concat(e,"_tow_distance_threshold_1"),"".concat(e,"_tow_price_threshold_1"),"".concat(e,"_tow_distance_threshold_2"),"".concat(e,"_tow_price_threshold_2"),"".concat(e,"_tow_fuel_surcharge"),"".concat(e,"_tow_skates"),"".concat(e,"_tow_dolly_fee"),"".concat(e,"_tow_parking_garage")])(e),ce=(e,t)=>"noquote"===t?[]:"hourly"===t?(e=>["".concat(e,"_svc_hourly_rate"),"".concat(e,"_svc_minimum_hours"),"".concat(e,"_svc_night_start"),"".concat(e,"_svc_night_end"),"".concat(e,"_svc_parking_garage")])(e):(e=>["".concat(e,"_svc_base_service_price"),"".concat(e,"_svc_specialty_service_rate"),"".concat(e,"_svc_base_service_mileage_threshold"),"".concat(e,"_svc_price_per_mile"),"".concat(e,"_svc_night_start"),"".concat(e,"_svc_night_end"),"".concat(e,"_svc_night_fee"),"".concat(e,"_svc_fuel_surcharge_pct"),"".concat(e,"_svc_parking_garage")])(e),ne=e=>{let{title:t,icon:a,iconBg:s,description:i,children:l,testId:r}=e;return(0,L.jsxs)("div",{className:"border border-gray-200 rounded-lg bg-white shadow-sm","data-testid":r,children:[(0,L.jsx)("div",{className:"p-3 sm:p-4 border-b border-gray-100 bg-gray-50 rounded-t-lg",children:(0,L.jsxs)("div",{className:"flex items-center gap-2",children:[a&&(0,L.jsx)("div",{className:"w-7 h-7 rounded-md flex items-center justify-center text-white",style:{background:s||"#2563eb"},children:(0,L.jsx)(a,{className:"w-4 h-4"})}),(0,L.jsxs)("div",{children:[(0,L.jsx)("h4",{className:"font-semibold text-gray-900 text-sm",children:t}),i&&(0,L.jsx)("p",{className:"text-[11px] text-gray-500",children:i})]})]})}),(0,L.jsx)("div",{className:"p-3 sm:p-4",children:l})]})},de=[{key:"mileage",label:"Mileage-Based",desc:"Hook fee plus per-mile charges"},{key:"hourly",label:"Hourly",desc:"Hourly rate with a minimum"},{key:"noquote",label:"Don't Quote",desc:"Dispatch without a price \u2014 the driver confirms on scene"}],me=["mileage","hourly","noquote"],he=e=>me.includes(e)?e:"mileage",_e=e=>{let{field:t,value:a,onSave:s,saving:i}=e;const l=he(a);return(0,L.jsxs)("div",{className:"mb-4 p-3 rounded-lg border border-blue-200 bg-blue-50/40","data-testid":"billing-method-".concat(t),children:[(0,L.jsx)("p",{className:"text-xs font-semibold text-blue-800 mb-2",children:"Billing Method"}),(0,L.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:de.map(e=>{const r=l===e.key;return(0,L.jsxs)("button",{type:"button",disabled:i===t,onClick:()=>{a!==e.key&&s(t,e.key)},className:"text-left p-2.5 rounded-md border transition-colors ".concat(r?"border-blue-500 bg-white shadow-sm ring-1 ring-blue-500":"border-gray-200 bg-white hover:border-blue-300"),"data-testid":"billing-method-".concat(t,"-").concat(e.key),children:[(0,L.jsxs)("div",{className:"flex items-center gap-2",children:[(0,L.jsx)("span",{className:"w-3 h-3 rounded-full border-2 ".concat(r?"bg-blue-600 border-blue-600":"border-gray-300")}),(0,L.jsx)("span",{className:"text-sm font-medium ".concat(r?"text-blue-900":"text-gray-700"),children:e.label})]}),(0,L.jsx)("p",{className:"text-[11px] text-gray-500 mt-0.5 pl-5",children:e.desc})]},e.key)})}),"noquote"===l&&(0,L.jsxs)("div",{className:"mt-3 p-3 rounded-md border border-amber-200 bg-amber-50 text-[11px] text-amber-900 leading-relaxed","data-testid":"billing-method-".concat(t,"-noquote-explainer"),children:[(0,L.jsx)("p",{className:"font-semibold mb-1",children:"This is not a lead-loss option."}),(0,L.jsxs)("p",{children:["Customers requesting this vehicle class will still receive a text confirming you offer the service. Instead of a price, it will tell them a driver needs to confirm pricing directly, and give them the option to reply ",(0,L.jsx)("b",{children:"YES"})," to dispatch a driver without a quote. The job is logged and dispatched normally \u2014 your driver sees ",(0,L.jsx)("b",{children:"\u201cTowmatic unable to quote. Call customer to confirm.\u201d"})," in place of a price."]})]})]})},ue=e=>{let{classLabel:t,prefix:a,p:s,handleSave:i,savingField:l}=e;const r=he(s["".concat(a,"_tow_billing_method")]),o="noquote"===r,c="hourly"===r,n="hourly"!==r;return(0,L.jsxs)(ne,{title:"Cash Call - Tow (".concat(t," Duty)"),icon:R.A,iconBg:"#2563eb",testId:"pricing-card-".concat(a,"-tow"),children:[(0,L.jsx)(_e,{field:"".concat(a,"_tow_billing_method"),value:s["".concat(a,"_tow_billing_method")],onSave:i,saving:l}),!o&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3 sm:gap-4",children:[(0,L.jsx)(Z,{label:"Standard Hook Up Fee",field:"".concat(a,"_tow_standard_hook_up"),value:s["".concat(a,"_tow_standard_hook_up")],onSave:i,saving:l}),(0,L.jsx)(Z,{label:"Standard Price Per Mile",field:"".concat(a,"_tow_standard_per_mile"),value:s["".concat(a,"_tow_standard_per_mile")],onSave:i,saving:l,optional:c})]}),(0,L.jsxs)("div",{className:"mt-4 p-3 bg-blue-50/50 rounded-lg border border-blue-200/60","data-testid":"".concat(a,"-tow-enroute-group"),children:[(0,L.jsx)("p",{className:"text-xs font-medium text-blue-700 mb-2",children:"EnRoute Mileage \u2014 If the service address is beyond the threshold distance from the lot, the additional per mile price will apply."}),(0,L.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:gap-4",children:[(0,L.jsx)(Z,{label:"EnRoute Mileage Threshold",field:"".concat(a,"_tow_enroute_mileage_threshold"),value:s["".concat(a,"_tow_enroute_mileage_threshold")],onSave:i,saving:l,noDollar:!0,optional:c,tooltip:"If the service address is within [X] miles of the lot address, standard rates apply. Beyond [X] miles, the base rate plus additional per mile charges and fuel surcharge will apply."}),(0,L.jsx)(Z,{label:"EnRoute Mileage Price (Additional Price Per Mile)",field:"".concat(a,"_tow_enroute_mileage_price"),value:s["".concat(a,"_tow_enroute_mileage_price")],onSave:i,saving:l,optional:c,tooltip:"This price will apply if the distance is over the EnRoute Mileage Threshold"})]}),(0,L.jsxs)("p",{className:"text-xs text-gray-500 mt-2 italic",children:["If the Service Address is ",(0,L.jsx)("span",{className:"font-semibold text-gray-700",children:s["".concat(a,"_tow_enroute_mileage_threshold")]||"___"})," miles or more from your Lot Address, an additional ",(0,L.jsxs)("span",{className:"font-semibold text-gray-700",children:["$",s["".concat(a,"_tow_enroute_mileage_price")]||"___"]})," per mile will be quoted."]})]}),(0,L.jsxs)("div",{className:"mt-3 p-3 bg-blue-50/50 rounded-lg border border-blue-200/60","data-testid":"".concat(a,"-tow-threshold-1-group"),children:[(0,L.jsx)("p",{className:"text-xs font-medium text-blue-700 mb-1",children:"Threshold 1"}),(0,L.jsxs)("p",{className:"text-[11px] text-gray-600 mb-2 leading-snug","data-testid":"".concat(a,"-tow-threshold-1-help"),children:["If total tow distance is ",(0,L.jsx)("span",{className:"font-semibold",children:"at or above"})," this mileage, the per-mile rate switches to ",(0,L.jsx)("span",{className:"font-semibold",children:"Price Threshold 1"}),"."]}),(0,L.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:gap-4",children:[(0,L.jsx)(Z,{label:"Total Tow Distance Mileage Threshold 1",field:"".concat(a,"_tow_distance_threshold_1"),value:s["".concat(a,"_tow_distance_threshold_1")],onSave:i,saving:l,noDollar:!0,optional:c,tooltip:"If total tow distance is X or more, charge Threshold 1 Price Per Mile."}),(0,L.jsx)(Z,{label:"Price Threshold 1",field:"".concat(a,"_tow_price_threshold_1"),value:s["".concat(a,"_tow_price_threshold_1")],onSave:i,saving:l,optional:c})]}),(0,L.jsxs)("p",{className:"text-xs text-gray-500 mt-2 italic",children:["For total tow distances of ",(0,L.jsxs)("span",{className:"font-semibold text-gray-700",children:[s["".concat(a,"_tow_distance_threshold_1")]||"___",s["".concat(a,"_tow_distance_threshold_2")]?"\u2013".concat(Number(s["".concat(a,"_tow_distance_threshold_2")])-1):"+"]})," miles, the per mile rate will be quoted at ",(0,L.jsxs)("span",{className:"font-semibold text-gray-700",children:["$",s["".concat(a,"_tow_price_threshold_1")]||"___"]}),"."]})]}),(0,L.jsxs)("div",{className:"mt-3 p-3 bg-blue-50/50 rounded-lg border border-blue-200/60","data-testid":"".concat(a,"-tow-threshold-2-group"),children:[(0,L.jsx)("p",{className:"text-xs font-medium text-blue-700 mb-1",children:"Threshold 2"}),(0,L.jsxs)("p",{className:"text-[11px] text-gray-600 mb-2 leading-snug","data-testid":"".concat(a,"-tow-threshold-2-help"),children:["If total tow distance is ",(0,L.jsx)("span",{className:"font-semibold",children:"at or above"})," this mileage, the per-mile rate switches to ",(0,L.jsx)("span",{className:"font-semibold",children:"Price Threshold 2"}),". Use this when longer tows should be priced differently than mid-range tows."]}),(0,L.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:gap-4",children:[(0,L.jsx)(Z,{label:"Total Tow Distance Mileage Threshold 2",field:"".concat(a,"_tow_distance_threshold_2"),value:s["".concat(a,"_tow_distance_threshold_2")],onSave:i,saving:l,noDollar:!0,optional:c,tooltip:"If total tow distance is X or more, charge Threshold 2 Price Per Mile."}),(0,L.jsx)(Z,{label:"Price Threshold 2",field:"".concat(a,"_tow_price_threshold_2"),value:s["".concat(a,"_tow_price_threshold_2")],onSave:i,saving:l,optional:c})]}),(0,L.jsxs)("p",{className:"text-xs text-gray-500 mt-2 italic",children:["For total tow distances of ",(0,L.jsxs)("span",{className:"font-semibold text-gray-700",children:[s["".concat(a,"_tow_distance_threshold_2")]||"___","+"]})," miles, the per mile rate will be quoted at ",(0,L.jsxs)("span",{className:"font-semibold text-gray-700",children:["$",s["".concat(a,"_tow_price_threshold_2")]||"___"]}),"."]}),s["".concat(a,"_tow_distance_threshold_1")]&&s["".concat(a,"_tow_distance_threshold_2")]&&Number(s["".concat(a,"_tow_distance_threshold_2")])<=Number(s["".concat(a,"_tow_distance_threshold_1")])&&(0,L.jsxs)("p",{className:"text-xs text-red-500 mt-1 flex items-center gap-1",children:[(0,L.jsx)(f.A,{className:"w-3 h-3"})," Threshold 2 mileage must be higher than Threshold 1."]})]}),(0,L.jsxs)("div",{className:"mt-4 grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3 sm:gap-4",children:[(0,L.jsx)(ee,{label:"Fuel Surcharge",field:"".concat(a,"_tow_fuel_surcharge"),value:s["".concat(a,"_tow_fuel_surcharge")],onSave:i,saving:l}),(0,L.jsx)(Z,{label:"Skates",field:"".concat(a,"_tow_skates"),value:s["".concat(a,"_tow_skates")],onSave:i,saving:l,optional:c,tooltip:"If vehicle cannot go into neutral, Skates fee will be quoted."}),(0,L.jsx)(Z,{label:"Dolly Fee",field:"".concat(a,"_tow_dolly_fee"),value:s["".concat(a,"_tow_dolly_fee")],onSave:i,saving:l,optional:c,tooltip:"If next truck up in rotation is Wrecker, and vehicle is AWD/4WD, Dolly Fee will be quoted."}),(0,L.jsx)(Z,{label:"Parking Garage Fee",field:"".concat(a,"_tow_parking_garage"),value:s["".concat(a,"_tow_parking_garage")],onSave:i,saving:l,tooltip:"If vehicle is located in a Parking Garage, additional fee will be quoted."})]}),(0,L.jsxs)("div",{className:"mt-4 p-3 rounded-lg border ".concat(n?"border-amber-200 bg-amber-50/50":"border-green-200 bg-green-50/40"),"data-testid":"".concat(a,"-tow-hourly-group"),children:[(0,L.jsx)("p",{className:"text-xs font-medium mb-2 ".concat(n?"text-amber-800":"text-green-800"),children:n?"Hourly billing \u2014 not used yet":"Hourly billing \u2014 active for this card"}),(0,L.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:gap-4",children:[(0,L.jsx)(Z,{label:"Hourly Rate",field:"".concat(a,"_tow_hourly_rate"),value:s["".concat(a,"_tow_hourly_rate")],onSave:i,saving:l,optional:n}),(0,L.jsx)(Z,{label:"Minimum Hours",field:"".concat(a,"_tow_minimum_hours"),value:s["".concat(a,"_tow_minimum_hours")],onSave:i,saving:l,noDollar:!0,optional:n})]}),!n&&"hd"!==a&&(0,L.jsx)("p",{className:"text-[11px] text-green-700 mt-2",children:"Make.com will send customers a rate-and-minimum message instead of a calculated total."})]}),"mileage"===r&&(0,L.jsxs)("div",{className:"mt-4 p-3 bg-blue-50 rounded-lg border border-blue-100","data-testid":"".concat(a,"-tow-pricing-rules"),children:[(0,L.jsx)("p",{className:"text-xs font-medium text-blue-700 mb-1.5",children:"Pricing Rules"}),(0,L.jsx)(ie,{text:"Standard rates apply if the service address is within the EnRoute Mileage Threshold of the lot address."}),(0,L.jsx)(ie,{text:"Beyond the threshold, base rate + additional per mile charges + fuel surcharge apply."}),(0,L.jsx)(ie,{text:"Mileage thresholds determine per-mile pricing tiers for total tow distance."})]})]})]})},ge=e=>{let{classLabel:t,prefix:a,p:s,handleSave:i,savingField:l}=e;const r=he(s["".concat(a,"_svc_billing_method")]),o="noquote"===r,c="hourly"===r,n="hourly"!==r;return(0,L.jsxs)(ne,{title:"Cash Call - Service (".concat(t," Duty)"),icon:H.A,iconBg:"#16a34a",testId:"pricing-card-".concat(a,"-svc"),children:[(0,L.jsx)(_e,{field:"".concat(a,"_svc_billing_method"),value:s["".concat(a,"_svc_billing_method")],onSave:i,saving:l}),!
2o&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:gap-4",children:(0,L.jsx)(Z,{label:"Standard Hook/Base Rate",field:"".concat(a,"_svc_base_service_price"),value:s["".concat(a,"_svc_base_service_price")],onSave:i,saving:l,optional:c})}),(0,L.jsxs)("p",{className:"text-[11px] text-gray-500 italic mt-1","data-testid":"".concat(a,"-svc-specialty-hidden-note"),children:[t," duty doesn't use a premium tier \u2014 this rate applies to every service call in this class."]}),(0,L.jsxs)("div",{className:"mt-4 p-3 bg-green-50/50 rounded-lg border border-green-200/60","data-testid":"".concat(a,"-svc-enroute-group"),children:[(0,L.jsx)("p",{className:"text-xs font-medium text-green-700 mb-2",children:"EnRoute Mileage \u2014 If the service address is beyond the threshold distance from the lot, the additional per mile price will apply."}),(0,L.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:gap-4",children:[(0,L.jsx)(Z,{label:"EnRoute Mileage Threshold",field:"".concat(a,"_svc_base_service_mileage_threshold"),value:s["".concat(a,"_svc_base_service_mileage_threshold")],onSave:i,saving:l,noDollar:!0,optional:c}),(0,L.jsx)(Z,{label:"EnRoute Mileage Price (Additional Price Per Mile)",field:"".concat(a,"_svc_price_per_mile"),value:s["".concat(a,"_svc_price_per_mile")],onSave:i,saving:l,optional:c})]}),(0,L.jsxs)("p",{className:"text-xs text-gray-500 mt-2 italic",children:["If the Service Address is ",(0,L.jsx)("span",{className:"font-semibold text-gray-700",children:s["".concat(a,"_svc_base_service_mileage_threshold")]||"___"})," miles or more from your Lot Address, an additional ",(0,L.jsxs)("span",{className:"font-semibold text-gray-700",children:["$",s["".concat(a,"_svc_price_per_mile")]||"___"]})," per mile will be quoted."]})]}),(0,L.jsxs)("div",{className:"mt-4 grid grid-cols-2 sm:grid-cols-3 gap-3 sm:gap-4",children:[(0,L.jsx)(J,{label:"Night Time Service Start Time",field:"".concat(a,"_svc_night_start"),value:s["".concat(a,"_svc_night_start")],onSave:i,saving:l,tooltip:"Charge an additional $X during this Start/End Time"}),(0,L.jsx)(J,{label:"Night Time Service End Time",field:"".concat(a,"_svc_night_end"),value:s["".concat(a,"_svc_night_end")],onSave:i,saving:l,tooltip:"Charge an additional $X during this Start/End Time"}),(0,L.jsx)(Z,{label:"Night Time Service Additional Fee",field:"".concat(a,"_svc_night_fee"),value:s["".concat(a,"_svc_night_fee")],onSave:i,saving:l,optional:c})]}),(s["".concat(a,"_svc_night_start")]||s["".concat(a,"_svc_night_end")]||s["".concat(a,"_svc_night_fee")])&&(0,L.jsxs)("p",{className:"text-xs text-gray-500 mt-2 italic px-1",children:["From ",(0,L.jsx)("span",{className:"font-semibold text-gray-700",children:s["".concat(a,"_svc_night_start")]||"______"})," to ",(0,L.jsx)("span",{className:"font-semibold text-gray-700",children:s["".concat(a,"_svc_night_end")]||"______"}),", customer will be quoted an additional ",(0,L.jsxs)("span",{className:"font-semibold text-gray-700",children:["$",s["".concat(a,"_svc_night_fee")]||"___"]}),"."]}),(0,L.jsxs)("div",{className:"mt-4 grid grid-cols-2 gap-3 sm:gap-4",children:[(0,L.jsx)(ee,{label:"Fuel Surcharge Percentage",field:"".concat(a,"_svc_fuel_surcharge_pct"),value:s["".concat(a,"_svc_fuel_surcharge_pct")],onSave:i,saving:l}),(0,L.jsx)(Z,{label:"Parking Garage Fee",field:"".concat(a,"_svc_parking_garage"),value:s["".concat(a,"_svc_parking_garage")],onSave:i,saving:l,tooltip:"If vehicle is located in a Parking Garage, additional fee will be quoted."})]}),(0,L.jsxs)("div",{className:"mt-4 p-3 rounded-lg border ".concat(n?"border-amber-200 bg-amber-50/50":"border-green-200 bg-green-50/40"),"data-testid":"".concat(a,"-svc-hourly-group"),children:[(0,L.jsx)("p",{className:"text-xs font-medium mb-2 ".concat(n?"text-amber-800":"text-green-800"),children:n?"Hourly billing \u2014 not used yet":"Hourly billing \u2014 active for this card"}),(0,L.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:gap-4",children:[(0,L.jsx)(Z,{label:"Hourly Rate",field:"".concat(a,"_svc_hourly_rate"),value:s["".concat(a,"_svc_hourly_rate")],onSave:i,saving:l,optional:n}),(0,L.jsx)(Z,{label:"Minimum Hours",field:"".concat(a,"_svc_minimum_hours"),value:s["".concat(a,"_svc_minimum_hours")],onSave:i,saving:l,noDollar:!0,optional:n})]}),!n&&"hd"!==a&&(0,L.jsx)("p",{className:"text-[11px] text-green-700 mt-2",children:"Make.com will send customers a rate-and-minimum message instead of a calculated total."})]}),"mileage"===r&&(0,L.jsxs)("div",{className:"mt-4 p-3 bg-green-50 rounded-lg border border-green-100","data-testid":"".concat(a,"-svc-pricing-rules"),children:[(0,L.jsx)("p",{className:"text-xs font-medium text-green-700 mb-1.5",children:"Pricing Rules"}),(0,L.jsx)(ie,{text:"Standard rates apply within the EnRoute Mileage Threshold of the lot address."}),(0,L.jsx)(ie,{text:"Night Time Service Additional Fee applies between Start and End times."})]})]})]})},pe=e=>e?String(e).split(",").map(e=>
2e.trim().toLowerCase()).filter(Boolean):[],xe=e=>Array.from(new Set(e.map(e=>e.trim().toLowerCase()).filter(Boolean))).join(","),ve=e=>{let{label:t,description:a,field:s,value:l,siblingField:r,siblingValue:o,seedSet:c,siblingSeedSet:n,classLabel:d,onSave:m,onMoveVehicle:h,saving:_}=e;const u=pe(l),g=pe(o),[v,f]=(0,i.useState)(""),[w,j]=(0,i.useState)(null),[N,S]=(0,i.useState)(null),k=()=>{const e=v.trim().toLowerCase();e&&(u.includes(e)?b.toast.error("This item is already in the list"):g.includes(e)?S({chip:e}):(m(s,xe([...u,e])),f("")))},T="medium"===d.toLowerCase()?"medium":"heavy",M="medium"===T?"heavy":"medium";return(0,L.jsxs)("div",{className:"space-y-2","data-testid":"pricing-field-".concat(s),children:[(0,L.jsxs)("label",{className:"text-xs font-medium text-gray-500 block",children:[t,(0,L.jsx)(K,{field:s})]}),a&&(0,L.jsx)("p",{className:"text-xs text-gray-400",children:a}),(0,L.jsx)("div",{className:"flex flex-wrap gap-1.5 p-2 border border-gray-200 rounded-lg min-h-[60px] bg-gray-50",children:u.map(e=>{const t=(e=>(null===c||void 0===c?void 0:c.has(e))||(null===n||void 0===n?void 0:n.has(e)))(e);if(!t)return(0,L.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-orange-100 text-orange-800 text-xs rounded-full border border-orange-200","data-testid":"chip-custom-".concat(s,"-").concat(e),children:[e,(0,L.jsx)("button",{onClick:()=>(e=>{m(s,xe(u.filter(t=>t!==e)))})(e),className:"hover:text-red-600 transition-colors",disabled:_===s,"aria-label":"Remove ".concat(e),"data-testid":"chip-delete-".concat(s,"-").concat(e),children:(0,L.jsx)(E.A,{className:"w-3 h-3"})})]},e);const a="".concat(s,":").concat(e);return(0,L.jsxs)(I.AM,{open:w===a,onOpenChange:e=>j(e?a:null),children:[(0,L.jsx)(I.Wv,{asChild:!0,children:(0,L.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-50 text-blue-800 text-xs rounded-full border border-blue-200 cursor-pointer hover:bg-blue-100","data-testid":"chip-seeded-".concat(s,"-").concat(e),role:"button",tabIndex:0,children:[(0,L.jsx)(P.A,{className:"w-2.5 h-2.5 opacity-60"}),e,(0,L.jsx)(y.A,{className:"w-3 h-3 opacity-60 hover:opacity-100"})]})}),(0,L.jsxs)(I.hl,{className:"w-56 p-2","data-testid":"chip-move-menu-".concat(s,"-").concat(e),children:[(0,L.jsxs)("p",{className:"text-[11px] font-semibold text-gray-700 px-1 pb-1.5 mb-1 border-b border-gray-100",children:["Move \u201c",e,"\u201d to"]}),[{key:"light",label:"Light \u2014 remove from duty lists"},{key:"medium",label:"Medium duty"},{key:"heavy",label:"Heavy duty"}].map(t=>{const a=t.key===T;return(0,L.jsxs)("button",{type:"button",disabled:a||_===s||_===r,onClick:()=>((e,t)=>{if(j(null),t===T)return;const a=xe(u.filter(t=>t!==e));if(t===M){const t=g.includes(e)?xe(g):xe([...g,e]);h(s,a,r,t),b.toast.success('Moved "'.concat(e,'" to ').concat(M," duty."))}else"light"===t&&(m(s,a),b.toast.success('Moved "'.concat(e,'" out of duty classification (light).')))})(e,t.key),className:"w-full text-left text-xs px-2 py-1.5 rounded ".concat(a?"text-gray-400 bg-gray-50 cursor-not-allowed":"text-gray-800 hover:bg-blue-50"),"data-testid":"chip-move-".concat(s,"-").concat(e,"-").concat(t.key),children:[t.label,a&&" (current)"]},t.key)})]})]},e)})}),(0,L.jsxs)("div",{className:"flex gap-2",children:[(0,L.jsx)(p.p,{type:"text",value:v,onChange:e=>f(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),k())},placeholder:"Type and press Enter\u2026",className:"h-8 text-sm flex-1",disabled:_===s,"data-testid":"chip-add-input-".concat(s)}),(0,L.jsx)(x.$,{size:"sm",onClick:k,disabled:!v.trim()||_===s,className:"bg-orange-500 hover:bg-orange-600 text-white h-8 px-3","data-testid":"chip-add-btn-".concat(s),children:(0,L.jsx)(F.A,{className:"w-3.5 h-3.5"})})]}),(0,L.jsxs)("div",{className:"flex items-center gap-3 text-[10px] text-gray-500 pt-0.5",children:[(0,L.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,L.jsx)("span",{className:"w-2 h-2 rounded-full bg-blue-200 border border-blue-300"}),"Seeded \u2014 move only"]}),(0,L.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,L.jsx)("span",{className:"w-2 h-2 rounded-full bg-orange-200 border border-orange-300"}),"Custom \u2014 deletable"]})]}),(0,L.jsx)(q.Lt,{open:null!==N,onOpenChange:e=>{e||S(null)},children:(0,L.jsxs)(q.EO,{"data-testid":"chip-dup-dialog-".concat(s),children:[(0,L.jsxs)(q.wd,{children:[(0,L.jsxs)(q.r7,{children:["Already in your ","heavy"===M?"Heavy":"Medium"," Duty list"]}),(0,L.jsx)(q.$v,{asChild:!0,children:(0,L.jsxs)("div",{className:"text-sm text-gray-700 leading-relaxed space-y-2",children:[(0,L.jsxs)("p",{children:[(0,L.jsxs)("b",{children:["\u201c",null===N||void 0===N?void 0:N.chip,"\u201d"]})," is already in your ","heavy"===M?"Heavy":"Medium"," Duty list. Heavy Duty takes precedence, so adding it here will have no effect."]}),(0,L.jsxs)("p",{className:"text-gray-600",children:["Would you like to move it to ","heavy"===T?"Heavy":"Medium"," Duty instead?"]})]})})]}),(0,L.jsxs)(q.ck,{children:[(0,L.jsx)(q.Zr,{"data-testid":"chip-dup-dialog-cancel-".concat(s),children:"Cancel"}),(0,L.jsxs)(q.Rx,{onClick:()=>{const e=null===N||void 0===N?void 0:N.chip;if(!e)return;const t=xe(g.filter(t=>t!==e)),a=xe([...u,e]);h(s,a,r,t),b.toast.success('Moved "'.concat(e,'" to ').concat(T," duty.")),S(null),f("")},"data-testid":"chip-dup-dialog-move-".concat(s),className:"bg-orange-500 hover:bg-orange-600",children:["Move to ","heavy"===T?"Heavy":"Medium"," Duty"]})]})]})})]})},be=e=>{let{classLabel:t,prefix:a,p:s,handleSave:l,savingField:r,seeds:o,onMoveVehicle:c,isEnabled:n}=e;const d="md"===a?"medium":"heavy",m=i.useMemo(()=>new Set(o?o["".concat(d,"_duty")]:[]),[o,d]),h=i.useMemo(()=>new Set(o?o["medium"===d?"heavy_duty":"medium_duty"]:[]),[o,d]),_="md"===a?"hd_vehicle_list":"md_vehicle_list";return(0,L.jsxs)(ne,{title:"".concat(t," Duty Vehicle Identification"),icon:j.A,iconBg:"#ea580c",de
2scription:"md"===a?"Vehicles listed here are quoted at Medium Duty rates and dispatched to Medium Duty trucks. If a Medium Duty truck is NOT On-Call it will dispatch to an On-Call Heavy Duty, Wrecker or Flatbed.":"Vehicles listed here are quoted at Heavy Duty rates and dispatched to Heavy Duty trucks. If a Heavy Duty truck is NOT On-Call it will dispatch to an On-Call Medium Duty, Wrecker or Flatbed.",testId:"pricing-card-".concat(a,"-vehicle-id"),children:[!n&&(0,L.jsxs)("div",{className:"mb-4 p-3 rounded-lg border border-amber-300 bg-amber-50 text-[11px] text-amber-900 leading-relaxed","data-testid":"vehicle-id-class-off-note-".concat(a),children:[(0,L.jsxs)("b",{children:[t," Duty is currently turned off."]})," ","Vehicles listed here will still be identified, but customers will receive the no-quote message instead of a price."]}),(0,L.jsx)(ve,{label:"".concat(t," Duty Vehicle List"),field:"".concat(a,"_vehicle_list"),value:s["".concat(a,"_vehicle_list")],siblingField:_,siblingValue:s[_],seedSet:m,siblingSeedSet:h,classLabel:t,onSave:l,onMoveVehicle:c,saving:r,description:"These lists tell Towmatic what kind of vehicle a customer is describing. They don't control whether you service it \u2014 that's the duty class toggle and Billing Method above. Put each vehicle in one list only; if a word appears in both, Heavy Duty wins."}),!1]})},fe=e=>{let{classLabel:t,prefix:a,initialLetter:s,description:l,isEnabled:r,isToggling:o,p:c,handleSave:n,savingField:d,onToggle:m,seeds:h,onMoveVehicle:_}=e;const u=he(c["".concat(a,"_tow_billing_method")]),g=he(c["".concat(a,"_svc_billing_method")]),p=i.useMemo(()=>((e,t,a)=>[...oe(e,t),...ce(e,a)])(a,u,g),[a,u,g]),x=i.useMemo(()=>p.filter(e=>{const t=c[e];return void 0===t||null===t||""===String(t).trim()}),[p,c]),b="md"===a?{container:"border-amber-200 bg-amber-50/40",avatar:"bg-amber-500",label:"text-amber-700"}:{container:"border-rose-200 bg-rose-50/40",avatar:"bg-rose-500",label:"text-rose-700"};return(0,L.jsxs)("div",{className:"rounded-xl border shadow-sm transition-colors ".concat(r?b.container:"border-gray-200 bg-white"),"data-testid":"duty-section-".concat(a),"data-tour":"pricing-".concat(a,"-enable"),children:[(0,L.jsxs)("div",{className:"flex items-center justify-between gap-3 p-4",children:[(0,L.jsxs)("div",{className:"flex items-center gap-3",children:[(0,L.jsx)("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center text-white text-base font-bold ".concat(r?b.avatar:"bg-gray-400"),children:s}),(0,L.jsxs)("div",{children:[(0,L.jsxs)("h3",{className:"font-semibold text-gray-900 text-base",children:[t," Duty"]}),(0,L.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:l})]})]}),(0,L.jsxs)("div",{className:"flex items-center gap-2",children:[(0,L.jsx)("span",{className:"text-xs font-medium ".concat(r?b.label:"text-gray-400"),"data-testid":"duty-toggle-state-".concat(a),children:o?"Saving\u2026":r?"On":"Off"}),(0,L.jsx)(v.d,{checked:r,onCheckedChange:e=>{o||m(e)},disabled:o,"data-testid":"duty-toggle-".concat(a)})]})]}),!r&&(0,L.jsxs)("div",{className:"mx-4 mb-4 p-3 rounded-lg border border-gray-200 bg-gray-50 text-xs text-gray-600 leading-relaxed","data-testid":"duty-off-note-".concat(a),children:["Turning this off means you don't service these vehicles. Customers requesting them will be told you can't help. If you do tow them but don't want automatic pricing, turn this on and choose ",(0,L.jsx)("span",{className:"font-semibold",children:"Don't Quote"})," instead."]}),r&&(0,L.jsxs)("div",{className:"p-4 pt-0 space-y-4",children:[x.length>0&&(0,L.jsx)("div",{className:"p-3 rounded-lg border border-amber-300 bg-amber-50 text-xs text-amber-900","data-testid":"duty-missing-fields-".concat(a),children:(0,L.jsxs)("div",{className:"flex items-start gap-2",children:[(0,L.jsx)(f.A,{className:"w-4 h-4 mt-0.5 flex-shrink-0 text-amber-600"}),(0,L.jsxs)("div",{className:"flex-1",children:[(0,L.jsxs)("p",{className:"font-semibold mb-1",children:[t," Duty is enabled, but ",x.length," required"," ",1===x.length?"field is":"fields are"," still blank."]}),(0,L.jsxs)("p",{className:"text-amber-800 mb-1.5 leading-relaxed",children:["Customers won\u2019t get accurate ",t.toLowerCase(),"-duty quotes until"," ",1===x.length?"it is":"they are"," filled 
2in below. Each field saves as you tab off it."]}),(0,L.jsxs)("details",{className:"text-amber-800",children:[(0,L.jsxs)("summary",{className:"cursor-pointer text-[11px] font-medium hover:text-amber-900",children:["Show ",1===x.length?"the missing field":"all ".concat(x.length," missing fields")]}),(0,L.jsx)("ul",{className:"list-disc pl-4 space-y-0.5 mt-1.5 max-h-40 overflow-auto",children:x.map(e=>(0,L.jsx)("li",{children:$[e]||e},e))})]})]})]})}),(0,L.jsx)(ue,{classLabel:t,prefix:a,p:c,handleSave:n,savingField:d}),(0,L.jsx)(ge,{classLabel:t,prefix:a,p:c,handleSave:n,savingField:d})]}),(0,L.jsx)("div",{className:"p-4 ".concat(r?"pt-0":""," space-y-4"),"data-testid":"duty-vehicle-id-container-".concat(a),children:(0,L.jsx)(be,{classLabel:t,prefix:a,p:c,handleSave:n,savingField:d,seeds:h,onMoveVehicle:_,isEnabled:r})})]})};function ye(){var e,t,a;const{user:h}=(0,n.A)(),g=(0,r.jE)(),[p,y]=(0,i.useState)("pricing"),[N,M]=(0,i.useState)(null),P=(0,i.useRef)(!1),{runTour:F}=(0,_.L)("pricing"),{data:E,isLoading:I,refetch:q,isFetching:B}=(0,l.I)({queryKey:["pricing-sheet",null===h||void 0===h?void 0:h.company_id],queryFn:async()=>{const e=P.current;P.current=!1;const t=await c.sheetsAPI.getPricing(h.company_id,e);return{pricing:t.data.pricing||{},unsyncedFields:t.data.unsynced_fields||[],lastSheetSyncAt:t.data.last_sheet_sync_at||null}},enabled:!(null===h||void 0===h||!h.company_id),staleTime:12e4,refetchOnWindowFocus:!0}),V=(0,o.n)({mutationFn:async e=>{let{field:t,value:a}=e;return c.sheetsAPI.updatePricingCell(h.company_id,t,a)},onMutate:async e=>{let{field:t,value:a}=e;M(t),await g.cancelQueries(["pricing-sheet",null===h||void 0===h?void 0:h.company_id]);const i=g.getQueryData(["pricing-sheet",null===h||void 0===h?void 0:h.company_id]);return g.setQueryData(["pricing-sheet",null===h||void 0===h?void 0:h.company_id],e=>(0,s.A)((0,s.A)({},e||{pricing:{},unsyncedFields:[],lastSheetSyncAt:null}),{},{pricing:(0,s.A)((0,s.A)({},(e||{}).pricing||{}),{},{[t]:a}),unsyncedFields:Array.from(new Set([...(e||{}).unsyncedFields||[],t]))})),{previous:i}},onSuccess:(e,t)=>{var a;let{field:i}=t;M(null);const l=null===e||void 0===e||null===(a=e.data)||void 0===a?void 0:a.unsynced_fields;Array.isArray(l)&&g.setQueryData(["pricing-sheet",null===h||void 0===h?void 0:h.company_id],e=>(0,s.A)((0,s.A)({},e||{pricing:{}}),{},{unsyncedFields:l})),g.invalidateQueries(["pricing-audit",null===h||void 0===h?void 0:h.company_id])},onError:(e,t,a)=>{var s,i;let{field:l}=t;M(null),null!==a&&void 0!==a&&a.previous&&g.setQueryData(["pricing-sheet",null===h||void 0===h?void 0:h.company_id],a.previous),b.toast.error("Failed to save ".concat($[l]||l,": ").concat((null===(s=e.response)||void 0===s||null===(i=s.data)||void 0===i?void 0:i.detail)||"Unknown error"))}}),W=(0,i.useCallback)((e,t)=>{V.mutate({field:e,value:t})},[V]),U=(0,o.n)({mutationFn:async e=>{let{sourceField:t,sourceValue:a,destField:s,destValue:i}=e;s&&await c.sheetsAPI.updatePricingCell(h.company_id,s,i),await c.sheetsAPI.updatePricingCell(h.company_id,t,a)},onMutate:async e=>{let{sourceField:t,sourceValue:a,destField:i,destValue:l}=e;await g.cancelQueries(["pricing-sheet",null===h||void 0===h?void 0:h.company_id]);const r=g.getQueryData(["pricing-sheet",null===h||void 0===h?void 0:h.company_id]);return g.setQueryData(["pricing-sheet",null===h||void 0===h?void 0:h.company_id],e=>{const r=(0,s.A)((0,s.A)({},(e||{}).pricing||{}),{},{[t]:a});i&&(r[i]=l);const o=Array.from(new Set([...(e||{}).unsyncedFields||[],t,...i?[i]:[]]));return(0,s.A)((0,s.A)({},e||{pricing:{},unsyncedFields:[],lastSheetSyncAt:null}),{},{pricing:r,unsyncedFields:o})}),{previous:r}},onError:(e,t,a)=>{var s,i;null!==a&&void 0!==a&&a.previous&&g.setQueryData(["pricing-sheet",null===h||void 0===h?void 0:h.company_id],a.previous),b.toast.error("Failed to move vehicle: ".concat((null===(s=e.response)||void 0===s||null===(i=s.data)||void 0===i?void 0:i.detail)||"Unknown error"))}}),z=(0,i.useCallback)((e,t,a,s)=>{U.mutate({sourceField:e,sourceValue:t,destField:a,destValue:s})},[U]),{data:K}=(0,l.I)({queryKey:["company",null===h||void 0===h?void 0:h.company_id],queryFn:async()=>(await c.companiesAPI.get(h.company_id)).data,enabled:!(null===h||void 0===h||!h.company_id),staleTime:6e4}),oe=(0,o.n)({mutationFn:async e=>{let{prefix:t,nextValue:a}=e;const s="md"===t?"medium_duty_enabled":"hd"===t?"heavy_duty_enabled":"motor_club_enabled";return c.companiesAPI.update(h.company_id,{[s]:a})},onMutate:async e=>{let{prefix:t,nextValue:a}=e;await g.cancelQueries(["company",null===h||void 0===h?void 0:h.company_id]);const i=g.getQueryData(["company",null===h||void 0===h?void 0:h.company_id]),l="md"===t?"medium_duty_enabled":"hd"===t?"heavy_duty_enabled":"motor_club_enabled";return g.setQueryData(["company",null===h||void 0===h?void 0:h.company_id],e=>(0,s.A)((0,s.A)({},e||{}),{},{[l]:a})),{previous:i}},onSuccess:(e,t)=>{let{prefix:a,nextValue:s}=t;const i="md"===a?"Medium Duty":"hd"===a?"Heavy Duty":"Motor Club";b.toast.success("".concat(i," ").concat(s?"enabled":"disabled"))},onError:(e,t,a)=>{var s,i;null!==a&&void 0!==a&&a.previous&&g.setQueryData(["company",null===h||void 0===h?void 0:h.company_id],a.previous),b.toast.error("Failed to update toggle: ".concat((null===(s=e.response)||void 0===s||null===(i=s.data)||void 0===i?void 0:i.detail)||"Unknown error"))}}),ce=(0,i.useCallback)((e,t)=>{oe.mutate({prefix:e,nextValue:t})},[oe]),ne=E&&E.pricing||{},de=E&&E.unsyncedFields||[],me=!(null===K||void 0===K||!K.medium_duty_enabled),he=!(null===K||void 0===K||!K.heavy_duty_enabled),_e=!1!==(null===K||void 0===K?void 0:K.motor_club_enabled),ue=oe.isPending&&"md"===(null===(e=oe.variables)||void 0===e?void 0:e.prefix),ge=oe.isPending&&"hd"===(null===(t=oe.variables)||void 0===t?void 0:t.prefix),pe=oe.isPending&&"mc"===(null===(a=oe.variables)||void 0===a?void 0:a.prefix),{data:xe}=(0,l.I)({queryKey:["vehicle-list-seeds"],queryFn:async()=>(await c.sheetsAPI.getVehicleListSeeds()).data,staleTime:864e5}),[ve,be]=(0,i.useState)(()=>new Set),ye=(0,i.useRef)([]),we=(0,i.useRef)({});(0,i.useEffect)(()=>{const e=ye.current.filter(e=>!de.includes(e));
2ye.current=de,0!==e.length&&(be(t=>{const a=new Set(t);return e.forEach(e=>a.add(e)),a}),e.forEach(e=>{we.current[e]&&clearTimeout(we.current[e]),we.current[e]=setTimeout(()=>{be(t=>{if(!t.has(e))return t;const a=new Set(t);return a.delete(e),a}),delete we.current[e]},1500)}))},[de]),(0,i.useEffect)(()=>{const e=we.current;return()=>{Object.values(e).forEach(clearTimeout)}},[]),(0,l.I)({queryKey:["pricing-sync-status",null===h||void 0===h?void 0:h.company_id],queryFn:async()=>{var e;const t=await c.sheetsAPI.getPricingSyncStatus(h.company_id),a=Array.isArray(null===(e=t.data)||void 0===e?void 0:e.unsynced_fields)?t.data.unsynced_fields:[];return g.setQueryData(["pricing-sheet",null===h||void 0===h?void 0:h.company_id],e=>{var i,l;if(!e)return e;const r=e.unsyncedFields||[];return r.length===a.length&&r.every(e=>a.includes(e))?e:(0,s.A)((0,s.A)({},e),{},{unsyncedFields:a,lastSheetSyncAt:null!==(i=null===(l=t.data)||void 0===l?void 0:l.last_sheet_sync_at)&&void 0!==i?i:e.lastSheetSyncAt})}),a},enabled:!(null===h||void 0===h||!h.company_id)&&de.length>0,refetchInterval:de.length>0&&3e3,refetchIntervalInBackground:!1,refetchOnWindowFocus:!1,staleTime:0});const{ready:je}=(0,d.o)();return je?I||E?(0,L.jsx)(X.Provider,{value:de,children:(0,L.jsx)(Q.Provider,{value:ve,children:(0,L.jsxs)("div",{className:"max-w-4xl mx-auto px-3 py-4 sm:px-4 sm:py-6","data-testid":"pricing-config-page",children:[(0,L.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 mb-5",children:[(0,L.jsxs)("div",{children:[(0,L.jsx)("h2",{className:"text-xl sm:text-2xl font-bold text-gray-900",children:"Pricing Configuration"}),(0,L.jsx)("p",{className:"text-sm text-gray-500 mt-0.5",children:"Manage your tow and service pricing"})]}),(0,L.jsxs)("div",{className:"flex items-center gap-2",children:[(0,L.jsx)(u.A,{onClick:()=>F("pricing"),testId:"pricing-show-around"}),(0,L.jsxs)(x.$,{variant:"outline",size:"sm",onClick:()=>{P.current=!0,q()},disabled:B,"data-testid":"pricing-refresh-btn",title:"Re-pull pricing from your Google Sheet. Use this if any list looks empty in the dashboard but is populated in the sheet.",children:[(0,L.jsx)(C.A,{className:"w-4 h-4 mr-1.5 ".concat(B?"animate-spin":"")}),"Refresh from Sheet"]})]})]}),(0,L.jsxs)("div",{className:"flex gap-1 mb-5 bg-gray-100 p-1 rounded-lg","data-testid":"pricing-tabs",children:[(0,L.jsxs)("button",{onClick:()=>y("pricing"),className:"flex-1 sm:flex-none px-4 py-2 rounded-md text-sm font-medium transition-colors ".concat("pricing"===p?"bg-white text-gray-900 shadow-sm":"text-gray-500 hover:text-gray-700"),"data-testid":"pricing-tab-pricing",children:[(0,L.jsx)(k.A,{className:"w-4 h-4 inline mr-1 -mt-0.5"}),"Pricing"]}),(0,L.jsxs)("button",{onClick:()=>y("changelog"),className:"flex-1 sm:flex-none px-4 py-2 rounded-md text-sm font-medium transition-colors ".concat("changelog"===p?"bg-white text-gray-900 shadow-sm":"text-gray-500 hover:text-gray-700"),"data-testid":"pricing-tab-changelog",children:[(0,L.jsx)(T.A,{className:"w-4 h-4 inline mr-1 -mt-0.5"}),"Change Log"]})]}),I?(0,L.jsx)("div",{className:"flex justify-center py-16",children:(0,L.jsx)(C.A,{className:"w-6 h-6 animate-spin text-orange-500"})}):"changelog"===p?(0,L.jsx)(le,{companyId:null===h||void 0===h?void 0:h.company_id}):(0,L.jsxs)("div",{className:"space-y-5",children:[(0,L.jsx)(se,{title:"Company Info",icon:w.A,iconColor:"text-orange-500",children:(0,L.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,L.jsx)(Y,{label:"Company Name",field:"company_name",value:ne.company_name,onSave:W,saving:N,icon:w.A,multiline:!0}),(0,L.jsxs)("div",{children:[(0,L.jsx)(Y,{label:"Lot Address",field:"lot_address",value:ne.lot_address,onSave:W,saving:N,icon:A.A,multiline:!0}),(0,L.jsx)("p",{className:"text-[10px] text-gray-400 mt-1 ml-0.5",children:"Needs to include Street, City, State, Zip Code"})]}),(0,L.jsx)(te,{label:"Driver Time Limit (In Minutes)",field:"driver_time_limit",value:ne.driver_time_limit,options:O,onSave:W,saving:N,tooltip:"Driver's must confirm/accept call within X minutes before the call is re-dispatched/dispatched to another driver."}),(0,L.jsx)(te,{label:"Time Zone",field:"timezone",value:ne.timezone,options:G,onSave:W,saving:N,tooltip:"Used for all duty classes \u2014 no per-card time zone field. Also mirrors to the medium and heavy service quote helper cells so date formatting stays valid."})]})}),(0,L.jsx)(re,{children:"Cash Call Pricing"}),(0,L.jsxs)("div",{className:"rounded-xl border border-sky-200 bg-sky-50/40 p-3 sm:p-4 space-y-4","data-testid":"duty-group-light","data-tour":"pricing-cc-tow",children:[(0,L.jsxs)(se,{title:"Cash Call - Tow (Light Duty)",icon:R.A,iconColor:"text-blue-600",description:"Light Duty vehicles are only dispatched to On-Call Flatbed or Wrecker.",children:[(0,L.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3 sm:gap-4",children:[(0,L.jsx)(Z,{label:"Standard Hook Up Fee",field:"cc_tow_standard_hook_up",value:ne.cc_tow_standard_hook_up,onSave:W,saving:N}),(0,L.jsx)(Z,{label:"Premium Hook Up Fee",field:"cc_tow_premium_hook_up",value:ne.cc_tow_premium_hook_up,onSave:W,saving:N,tooltip:"If the vehicle matches any make in your Premium Vehicle List or any issue in your Vehicle Issue List, this fee will automatically be quoted instead of the Standard Hook Up Fee."}),(0,L.jsx)(Z,{label:"Standard Price Per Mile",field:"cc_tow_standard_per_mile",value:ne.cc_tow_standard_per_mile,onSave:W,saving:N})]}),(0,L.jsxs)("div",{className:"mt-4 p-3 bg-blue-50/50 rounded-lg border border-blue-200/60","data-testid":"cc-tow-enroute-group",children:[(0,L.jsx)("p",{className:"text-xs font-medium text-blue-700 mb-2",children:"EnRoute Mileage \u2014 If the service address is beyond the threshold distance from the lot, the additional per mile price will apply."}),(0,L.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:gap-4",children:[(0,L.jsx)(Z,{label:"EnRoute Mileage Threshold",field:"cc_tow_enroute_mileage_threshold",value:ne.cc_tow_enroute_mileage_threshold,onSave:W,saving:N,noDollar:!0,tooltip:"If the service address is within [X] miles of the lot address, standard rates apply. If the service address is beyond [X] miles from the lot address, the base rate plus additional per mile charges and fuel surcharge will apply."}),(0,L.jsx)(Z,{label:"EnRoute Mileage Price (Additional Price Per Mile)",field:"cc_tow_additional_per_mile",value:ne.cc_tow_additional_per_mile,onSave:W,saving:N,tooltip:"This price will apply if the distance is over the EnRoute Mileage Threshold"})]}),(0,L.jsxs)("p",{className:"text-xs text-gray-500 mt-2 italic",children:["If the Service Address is ",(0,L.jsx)("span",{className:"font-semibold text-gray-700",children:ne.cc_tow_enroute_mileage_threshold||"___"})," miles or more from your Lot Address, an additional ",(0,L.jsxs)("span",{className:"font-semibold text-gray-700",children:["$",ne.cc_tow_additional_per_mile||"___"]})," per mile will be quoted."]})]}),(0,L.jsxs)("div",{className:"mt-4 p-3 bg-blue-50/50 rounded-lg border border-blue-200/60","data-testid":"threshold-1-group",children:[(0,L.jsx)("p",{className:"text-xs font-medium text-blue-700 mb-2",children:"Threshold 1"}),(0,L.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:gap-4",children:[(0,L.jsx)(Z,{label:"Total Tow Distance Mileage Threshold 1",field:"cc_tow_distance_threshold_1",value:ne.cc_tow_distance_threshold_1,onSave:W,saving:N,noDollar:!0,tooltip:"If total tow distance is X or more charge Threshold 1 Price Per Mile."}),(0,L.jsx)(Z,{label:"Price Threshold 1",field:"cc_tow_price_threshold_1",value:ne.cc_tow_price_threshold_1,onSave:W,saving:N})]}),(0,L.jsxs)("p",{className:"text-xs text-gray-500 mt-2 italic",children:["For total tow distances of ",(0,L.jsxs)("span",{className:"font-semibold text-gray-700",children:[ne.cc_tow_distance_threshold_1||"___",ne.cc_tow_distance_threshold_2?"\u2013".concat(Number(ne.cc_tow_distance_threshold_2)-1):"+"]})," miles, the per mile rate will be quoted at ",(0,L.jsxs)("span",{className:"font-semibold text-gray-700",children:["$",ne.cc_tow_price_threshold_1||"___"]}),"."]})]}),(0,L.jsxs)("div",{className:"mt-3 p-3 bg-blue-50/50 rounded-lg border border-blue-200/60","data-testid":"threshold-2-group",children:[(0,L.jsx)("p",{className:"text-xs font-medium text-blue-700 mb-2",children:"Threshold 2"}),(0,L.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:gap-4",children:[(0,L.jsx)(Z,{label:"Total Tow Distance Mileage Threshold 2",field:"cc_tow_distance_threshold_2",value:ne.cc_tow_distance_threshold_2,onSave:W,saving:N,noDollar:!0,tooltip:"If total tow distance is X or more charge Threshold 2 Price Per Mile."}),(0,L.jsx)(Z,{label:"Price Threshold 2",field:"cc_tow_price_threshold_2",value:ne.cc_tow_price_threshold_2,onSave:W,saving:N})]}),(0,L.jsxs)("p",{className:"text-xs text-gray-500 mt-2 italic",children:["For total tow distances of ",(0,L.jsxs)("span",{className:"font-semibold text-gray-700",children:[ne.cc_tow_distance_threshold_2||"___","+"]})," miles, the per mile rate will be quoted at ",(0,L.jsxs)("span",{className:"font-semibold text-gray-700",children:["$",ne.cc_tow_price_threshold_2||"___"]}),"."]}),ne.cc_tow_distance_threshold_1&&ne.cc_tow_distance_threshold_2&&Number(ne.cc_tow_distance_threshold_2)<=Number(ne.cc_tow_distance_threshold_1)&&(0,L.jsxs)("p",{className:"text-xs text-red-500 mt-1 flex items-center gap-1",children:[(0,L.jsx)(f.A,{className:"w-3 h-3"})," Threshold 2 mileage must be higher than Threshold 1."]})]}),(0,L.jsxs)("div",{className:"mt-4 grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3 sm:gap-4",children:[(0,L.jsx)(ee,{label:"Fuel Surcharge",field:"cc_tow_fuel_surcharge",value:ne.cc_tow_fuel_surcharge,onSave:W,saving:N}),(0,L.jsx)(Z,{label:"Skates",field:"cc_tow_skates",value:ne.cc_tow_skates,onSave:W,saving:N,tooltip:"If vehicle cannot go into neutral, Skates fee will be quoted."}),(0,L.jsx)(Z,{label:"Dolly Fee",field:"cc_tow_dolly_fee",value:ne.cc_tow_dolly_fee,onSave:W,saving:N,tooltip:"If next truck up in rotation is Wrecker, and vehicle is AWD/4WD, Dolly Fee will be quoted."}),(0,L.jsx)(Z,{label:"Parking Garage Fee",field:"cc_tow_parking_garage",value:ne.cc_tow_parking_garage,onSave:W,saving:N,tooltip:"If vehicle is located in a Parking Garage, additional fee will be quoted."})]}),(0,L.jsxs)("div",{className:"mt-4 p-3 bg-blue-50 rounded-lg border border-blue-100",children:[(0,L.jsx)("p",{className:"text-xs font-medium text-blue-700 mb-1.5",children:"Pricing Rules"}),(0,L.jsx)(ie,{text:"Standard rates apply if the service address is within the EnRoute Mileage Threshold of the lot address."}),(0,L.jsx)(ie,{text:"Beyond the threshold, base rate + additional per mile charges + fuel surcharge apply."}),(0,L.jsx)(ie,{text:"Mileage thresholds determine per-mile pricing tiers for total tow distance."})]})]}),(0,L.jsxs)(se,{title:"Cash Call - Service (Light Duty)",icon:H.A,iconColor:"text-green-600",description:"Pricing for roadside assistance services",children:[(0,L.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3 sm:gap-4",children:[(0,L.jsx)(Z,{label:"Standard Hook/Base Rate",field:"cc_svc_standard_hook_rate",value:ne.cc_svc_standard_hook_rate,onSave:W,saving:N}),(0,L.jsx)(Z,{label:"Premium Hook/Base Rate",field:"cc_svc_premium_hook_rate",value:ne.cc_svc_premium_hook_rate,onSave:W,saving:N})]}),(0,L.jsxs)("div",{className:"mt-4 p-3 bg-green-50/50 rounded-lg border border-green-200/60","data-testid":"cc-svc-enroute-group",children:[(0,L.jsx)("p",{className:"text-xs font-medium text-green-700 mb-2",children:"EnRoute Mileage \u2014 If the service address is beyond the threshold distance from the lot, the additional per mile price will apply."}),(0,L.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:gap-4",children:[(0,L.jsx)(Z,{label:"EnRoute Mileage Threshold",field:"cc_svc_enroute_mileage_threshold",value:ne.cc_svc_enroute_mileage_threshold,onSave:W,saving:N,noDollar:!0,tooltip:"If the service address is within [X] miles of the lot address, standard rates apply. If the service address is beyond [X] miles from the lot address, the base rate plus additional per mile charges and fuel surcharge will apply."}),(0,L.jsx)(Z,{label:"EnRoute Mileage Price (Additional Price Per Mile)",field:"cc_svc_additional_per_mile",value:ne.cc_svc_additional_per_mile,onSave:W,saving:N,tooltip:"This price will apply if the distance is over the EnRoute Mileage Threshold"})]}),(0,L.jsxs)("p",{className:"text-xs text-gray-500 mt-2 italic",children:["If the Service Address is ",(0,L.jsx)("span",{className:"font-semibold text-gray-700",children:ne.cc_svc_enroute_mileage_threshold||"___"})," miles or more from your Lot Address, an additional ",(0,L.jsxs)("span",{className:"font-semibold text-gray-700",children:["$",ne.cc_svc_additional_per_mile||"___"]})," per mile will be quoted."]})]}),(0,L.jsxs)("div",{className:"mt-4 grid grid-cols-2 sm:grid-cols-3 gap-3 sm:gap-4",children:[(0,L.jsx)(J,{label:"Night Time Service Start Time",field:"cc_svc_night_start",value:ne.cc_svc_night_start,onSave:W,saving:N,tooltip:"
2Charge an additional $X during this Start/End Time"}),(0,L.jsx)(J,{label:"Night Time Service End Time",field:"cc_svc_night_end",value:ne.cc_svc_night_end,onSave:W,saving:N,tooltip:"Charge an additional $X during this Start/End Time"}),(0,L.jsx)(Z,{label:"Night Time Service Additional Fee",field:"cc_svc_night_additional_fee",value:ne.cc_svc_night_additional_fee,onSave:W,saving:N})]}),(ne.cc_svc_night_start||ne.cc_svc_night_end||ne.cc_svc_night_additional_fee)&&(0,L.jsxs)("p",{className:"text-xs text-gray-500 mt-2 italic px-1",children:["From ",(0,L.jsx)("span",{className:"font-semibold text-gray-700",children:ne.cc_svc_night_start||"______"})," to ",(0,L.jsx)("span",{className:"font-semibold text-gray-700",children:ne.cc_svc_night_end||"______"}),", customer will be quoted an additional ",(0,L.jsxs)("span",{className:"font-semibold text-gray-700",children:["$",ne.cc_svc_night_additional_fee||"___"]}),"."]}),(0,L.jsxs)("div",{className:"mt-4 grid grid-cols-2 sm:grid-cols-3 gap-3 sm:gap-4",children:[(0,L.jsx)(ee,{label:"Fuel Surcharge Percentage",field:"cc_svc_fuel_surcharge_pct",value:ne.cc_svc_fuel_surcharge_pct,onSave:W,saving:N}),(0,L.jsx)(Z,{label:"Parking Garage Fee",field:"cc_svc_parking_garage",value:ne.cc_svc_parking_garage,onSave:W,saving:N,tooltip:"If vehicle is located in a Parking Garage, additional fee will be quoted."})]}),(0,L.jsxs)("div",{className:"mt-4 p-3 bg-green-50 rounded-lg border border-green-100",children:[(0,L.jsx)("p",{className:"text-xs font-medium text-green-700 mb-1.5",children:"Pricing Rules"}),(0,L.jsx)(ie,{text:"Standard rates apply within the EnRoute Mileage Threshold of the lot address."}),(0,L.jsx)(ie,{text:"Night Time Service Additional Fee applies between Start and End times."})]})]}),(0,L.jsxs)("div",{className:"rounded-xl border shadow-sm transition-colors ".concat(_e?"border-purple-200 bg-purple-50/30":"border-gray-200 bg-white"),"data-testid":"motor-club-section",children:[(0,L.jsxs)("div",{className:"flex items-center justify-between gap-3 p-4",children:[(0,L.jsxs)("div",{className:"flex items-center gap-3",children:[(0,L.jsx)("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center text-white text-base font-bold ".concat(_e?"bg-purple-600":"bg-gray-400"),children:(0,L.jsx)(D.A,{className:"w-5 h-5"})}),(0,L.jsxs)("div",{children:[(0,L.jsx)("h3",{className:"font-semibold text-gray-900 text-base",children:"Motor Club"}),(0,L.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:"Motor club / roadside-assistance partner tows & service (light duty)"})]})]}),(0,L.jsxs)("div",{className:"flex items-center gap-2",children:[(0,L.jsx)("span",{className:"text-xs font-medium ".concat(_e?"text-purple-700":"text-gray-400"),"data-testid":"motor-club-toggle-state",children:pe?"Saving\u2026":_e?"On":"Off"}),(0,L.jsx)(v.d,{checked:_e,onCheckedChange:e=>ce("mc",e),disabled:pe,"data-testid":"motor-club-toggle"})]})]}),!_e&&(0,L.jsx)("div",{className:"mx-4 mb-4 p-3 rounded-lg border border-gray-200 bg-gray-50 text-xs text-gray-600 leading-relaxed","data-testid":"motor-club-off-note",children:"Turning this off means you don't accept motor club calls. Motor club requests will be declined."}),_e&&(0,L.jsxs)("div",{className:"px-4 pb-4 space-y-4","data-testid":"motor-club-cards",children:[(0,L.jsxs)(se,{title:"Motor Club - Tow (Light Duty)",icon:D.A,iconColor:"text-purple-600",description:"Pricing for motor club / roadside assistance partner tows",children:[(0,L.jsx)("div",{className:"mb-4 grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:(0,L.jsx)(Y,{label:"Motor Club Email Address",field:"mc_svc_email",value:ne.mc_svc_email,onSave:W,saving:N,tooltip:"Enter your email address where you would like Motor Clubs to send payment information."})}),(0,L.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3 sm:gap-4",children:[(0,L.jsx)(Z,{label:"Standard Hook Rate",field:"mc_tow_standard_hook_rate",value:ne.mc_tow_standard_hook_rate,onSave:W,saving:N}),(0,L.jsx)(Z,{label:"Premium Hook Rate",field:"mc_tow_premium_hook_rate",value:ne.mc_tow_premium_hook_rate,onSave:W,saving:N,tooltip:"If the vehicle matches any make in your Premium Vehicle List or any issue in your Vehicle Issue List, this fee will automatically be quoted instead of the Standard Hook Up Fee."}),(0,L.jsx)(Z,{label:"Standard Price Per Mile",field:"mc_tow_standard_per_mile",value:ne.mc_tow_standard_per_mile,onSave:W,saving:N})]}),(0,L.jsxs)("div",{className:"mt-4 p-3 bg-purple-50/50 rounded-lg border border-purple-200/60","data-testid":"mc-tow-enroute-group",children:[(0,L.jsx)("p",{className:"text-xs font-medium text-purple-700 mb-2",children:"EnRoute Mileage \u2014 If the service address is beyond the threshold distance from the lot, the additional per mile price will apply."}),(0,L.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:gap-4",children:[(0,L.jsx)(Z,{label:"EnRoute Mileage Threshold",field:"mc_tow_enroute_mileage_threshold",value:ne.mc_tow_enroute_mileage_threshold,onSave:W,saving:N,noDollar:!0}),(0,L.jsx)(Z,{label:"EnRoute Mileage Price (Additional $X Per Mile)",field:"mc_tow_enroute_mileage_price",value:ne.mc_tow_enroute_mileage_price,onSave:W,saving:N})]})]}),(0,L.jsxs)("div",{className:"mt-3 p-3 bg-purple-50/50 rounded-lg border border-purple-200/60","data-testid":"mc-tow-threshold-1-group",children:[(0,L.jsx)("p",{className:"text-xs font-medium text-purple-700 mb-2",children:"Threshold 1"}),(0,L.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:gap-4",children:[(0,L.jsx)(Z,{label:"Total Tow Distance Mileage Threshold 1",field:"mc_tow_distance_threshold_1",value:ne.mc_tow_distance_threshold_1,onSave:W,saving:N,noDollar:!0,tooltip:"If total tow distance is X or more charge Threshold 1 Price Per Mile."}),(0,L.jsx)(Z,{label:"Price Per Mile Threshold 1",field:"mc_tow_price_per_mile_threshold_1",value:ne.mc_tow_price_per_mile_threshold_1,onSave:W,saving:N})]}),(0,L.jsxs)("p",{className:"text-xs text-gray-500 mt-2 italic",children:["For total tow distances of ",(0,L.jsxs)("span",{className:"font-semibold text-gray-700",children:[ne.mc_tow_distance_threshold_1||"___",ne.mc_tow_distance_threshold_2?"\u2013".concat(Number(ne.mc_tow_distance_threshold_2)-1):"+"]})," miles, the per mile rate will be quoted at ",(0,L.jsxs)("span",{className:"font-semibold text-gray-700",children:["$",ne.mc_tow_price_per_mile_threshold_1||"___"]}),"."]})]}),(0,L.jsxs)("div",{className:"mt-3 p-3 bg-purple-50/50 rounded-lg border border-purple-200/60","data-testid":"mc-tow-threshold-2-group",children:[(0,L.jsx)("p",{className:"text-xs font-medium text-purple-700 mb-2",children:"Threshold 2"}),(0,L.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:gap-4",children:[(0,L.jsx)(Z,{label:"Total Tow Distance Mileage Threshold 2",field:"mc_tow_distance_threshold_2",value:ne.mc_tow_distance_threshold_2,onSave:W,saving:N,noDollar:!0,tooltip:"If total tow distance is X or more charge Threshold 2 Price Per Mile."}),(0,L.jsx)(Z,{label:"Price Per Mile Threshold 2",field:"mc_tow_price_per_mile_threshold_2",value:ne.mc_tow_price_per_mile_threshold_2,onSave:W,saving:N})]}),(0,L.jsxs)("p",{className:"text-xs text-gray-500 mt-2 italic",children:["For total tow distances of ",(0,L.jsxs)("span",{className:"font-semibold text-gray-700",children:[ne.mc_tow_distance_threshold_2||"___","+"]})," miles, the per mile rate will be quoted at ",(0,L.jsxs)("span",{className:"font-semibold text-gray-700",children:["$",ne.mc_tow_price_per_mile_threshold_2||"___"]}),"."]}),ne.mc_tow_distance_threshold_1&&ne.mc_tow_distance_threshold_2&&Number(ne.mc_tow_distance_threshold_2)<=Number(ne.mc_tow_distance_threshold_1)&&(0,L.jsxs)("p",{className:"text-xs text-red-500 mt-1 flex items-center gap-1",children:[(0,L.jsx)(f.A,{className:"w-3 h-3"})," Threshold 2 mileage must be higher than Threshold 1."]})]}),(0,L.jsxs)("div",{className:"mt-4 grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3 sm:gap-4",children:[(0,L.jsx)(Z,{label:"Dolly Fee",field:"mc_tow_dolly_fee",value:ne.mc_tow_dolly_fee,onSave:W,saving:N,tooltip:"If next truck up in rotation is Wrecker, and vehicle is AWD/4WD, Dolly Fee will be quoted."}),(0,L.jsx)(ee,{label:"Fuel Surcharge",field:"mc_tow_fuel_surcharge_pct",value:ne.mc_tow_fuel_surcharge_pct,onSave:W,saving:N})]}),(0,L.jsxs)("div",{className:"mt-4 p-3 bg-purple-50 rounded-lg border border-purple-100",children:[(0,L.jsx)("p",{className:"text-xs font-medium text-purple-700 mb-1.5",children:"Pricing Rules"}),(0,L.jsx)(ie,{text:"Standard rates apply if the service address is within the EnRoute Mileage Threshold."}),(0,L.jsx)(ie,{text:"Beyond threshold, base rate + EnRoute Mileage Price per mile applies."}),(0,L.jsx)(ie,{text:"Mileage thresholds determine per-mile pricing tiers for total tow distance."})]})]}),(0,L.jsx)(se,{title:"Motor Club - Service (Light Duty)",icon:H.A,iconColor:"text-purple-600",description:"Service pricing for motor club calls",children:(0,L.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3 sm:gap-4",children:[(0,L.jsx)(Z,{label:"Standard Base Service Rate",field:"mc_svc_standard_base_service",value:ne.mc_svc_standard_base_service,onSave:W,saving:N}),(0,L.jsx)(Z,{label:"Premium Base Service Rate",field:"mc_svc_premium_base_service",value:ne.mc_svc_premium_base_service,onSave:W,saving:N}),(0,L.jsx)(Z,{label:"Standard Base Winch Out Rate",field:"mc_svc_standard_base_winch_out",value:ne.mc_svc_standard_base_winch_out,onSave:W,saving:N}),(0,L.jsx)(Z,{label:"Premium Base Winch Out Rate",field:"mc_svc_premium_base_winch_out",value:ne.mc_svc_premium_base_winch_out,onSave:W,saving:N}),(0,L.jsx)(Z,{label:"Skates Fee",field:"mc_svc_skates_fee",value:ne.mc_svc_skates_fee,onSave:W,saving:N,tooltip:"If vehicle cannot go into neutral, Skates fee will be quoted."}),(0,L.jsx)(Z,{label:"Parking Garage Fee",field:"mc_svc_parking_garage",value:ne.mc_svc_parking_garage,onSave:W,saving:N,tooltip:"If vehicle is located in a Parking Garage, additional fee will be quoted."}),(0,L.jsx)(ee,{label:"GOA Fee Percentage",field:"mc_svc_goa_fee_pct",value:ne.mc_svc_goa_fee_pct,onSave:W,saving:N,tooltip:"GOA (Gone On Arrival) - if vehicle is gone when you arrive you still collect X percentage of the quote. This will apply to Motor Club Tow & Service Calls."})]})})]})]}),(0,L.jsxs)("div",{"data-tour":"pricing-vehicle-lists",children:[(0,L.jsxs)(se,{title:"Premium Vehicle List (Light Duty)",icon:j.A,iconColor:"text-amber-600",description:"Vehicles that qualify for premium vehicle surcharge",children:[(0,L.jsx)(ae,{label:"Vehicle Makes",field:"premium_vehicle_list",value:ne.premium_vehicle_list,onSave:W,saving:N,description:"All entr
2ies stored lowercase, comma-separated. Type a make and press Enter."}),(0,L.jsx)("div",{className:"mt-3 p-3 rounded-lg border border-amber-200 bg-amber-50/60",children:(0,L.jsxs)("p",{className:"text-[11px] text-amber-800 leading-relaxed",children:["This list triggers the ",(0,L.jsx)("b",{children:"Premium Hook Up Fee"})," on light-duty calls."]})})]}),(0,L.jsxs)(se,{title:"Premium Vehicle Issue List (Light Duty)",icon:f.A,iconColor:"text-red-500",description:"Common vehicle issues for dropdown menus",children:[(0,L.jsx)(ae,{label:"Vehicle Issues",field:"vehicle_issue_list",value:ne.vehicle_issue_list,onSave:W,saving:N,description:"All entries stored lowercase, comma-separated. Type an issue and press Enter."}),(0,L.jsx)("div",{className:"mt-3 p-3 rounded-lg border border-amber-200 bg-amber-50/60",children:(0,L.jsxs)("p",{className:"text-[11px] text-amber-800 leading-relaxed",children:["This list triggers the ",(0,L.jsx)("b",{children:"Premium Hook Up Fee"})," on light-duty calls."]})})]})]})]}),(0,L.jsx)(fe,{classLabel:"Medium",prefix:"md",initialLetter:"M",description:"Box trucks, RVs, F-450 through F-750, shuttle buses, small equipment",isEnabled:me,isToggling:ue,p:ne,handleSave:W,savingField:N,onToggle:e=>ce("md",e),seeds:xe,onMoveVehicle:z}),(0,L.jsx)(fe,{classLabel:"Heavy",prefix:"hd",initialLetter:"H",description:"Semis and tractor trailers, buses, dump trucks, heavy equipment",isEnabled:he,isToggling:ge,p:ne,handleSave:W,savingField:N,onToggle:e=>ce("hd",e),seeds:xe,onMoveVehicle:z})]})]})})}):(0,L.jsx)("div",{className:"max-w-2xl mx-auto px-3 py-8 sm:px-4",children:(0,L.jsxs)("div",{className:"text-center py-16 bg-white rounded-xl border border-gray-200 shadow-sm",children:[(0,L.jsx)(S.A,{className:"w-12 h-12 text-orange-400 mx-auto mb-3"}),(0,L.jsx)("h2",{className:"text-lg font-semibold text-gray-700 mb-2",children:"We\u2019re Building Your Towmatic Agent"}),(0,L.jsx)("p",{className:"text-sm text-gray-500 max-w-md mx-auto",children:"You\u2019ll be alerted as soon as you are able to edit this page."})]})}):(0,L.jsx)(m.A,{pageName:"Pricing"})}},36401(e,t,a){a.d(t,{A:()=>s});const s=(0,a(77784).A)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]])},51654(e,t,a){a.d(t,{d:()=>d});var s=a(89379),i=a(53986),l=a(65043),r=a(77943),o=a(99766),c=a(70579);const n=["className"],d=l.forwardRef((e,t)=>{let{className:a}=e,l=(0,i.A)(e,n);return(0,c.jsx)(r.bL,(0,s.A)((0,s.A)({className:(0,o.cn)("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",a)},l),{},{ref:t,children:(0,c.jsx)(r.zi,{className:(0,o.cn)("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}))});d.displayName=r.bL.displayName},57856(e,t,a){a.d(t,{A:()=>s});const s=(0,a(77784).A)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},77943(e,t,a){a.d(t,{bL:()=>T,zi:()=>M});var s=a(89379),i=a(53986),l=a(65043),r=a(30858),o=a(82814),c=a(21862),n=a(13642),d=a(23168),m=a(93124),h=a(87914),_=a(70579);const u=["__scopeSwitch","name","checked","defaultChecked","required","disabled","value","onCheckedChange","form"],g=["__scopeSwitch"],p=["__scopeSwitch","control","checked","bubbles"];var x="Switch",[v,b]=(0,c.A)(x),[f,y]=v(x),w=l.forwardRef((e,t)=>{const{__scopeSwitch:a,name:c,checked:d,defaultChecked:m,required:g,disabled:p,value:v="on",onCheckedChange:b,form:y}=e,w=(0,i.A)(e,u),[j,N]=l.useState(null),T=(0,o.s)(t,e=>N(e)),M=l.useRef(!1),P=!j||(y||!!j.closest("form")),[A,F]=(0,n.i)({prop:d,defaultProp:null!==m&&void 0!==m&&m,onChange:b,caller:x});return(0,_.jsxs)(f,{scope:a,checked:A,disabled:p,children:[(0,_.jsx)(h.sG.button,(0,s.A)((0,s.A)({type:"button",role:"switch","aria-checked":A,"aria-required":g,"data-state":k(A),"data-disabled":p?"":void 0,disabled:p,value:v},w),{},{ref:T,onClick:(0,r.mK)(e.onClick,e=>{F(e=>!e),P&&(M.current=e.isPropagationStopped(),M.current||e.stopPropagation())})})),P&&(0,_.jsx)(S,{control:j,bubbles:!M.current,name:c,value:v,checked:A,required:g,disabled:p,form:y,style:{transform:"translateX(-100%)"}})]})});w.displayName=x;var j="SwitchThumb",N=l.forwardRef((e,t)=>
2{const{__scopeSwitch:a}=e,l=(0,i.A)(e,g),r=y(j,a);return(0,_.jsx)(h.sG.span,(0,s.A)((0,s.A)({"data-state":k(r.checked),"data-disabled":r.disabled?"":void 0},l),{},{ref:t}))});N.displayName=j;var S=l.forwardRef((e,t)=>{let{__scopeSwitch:a,control:r,checked:c,bubbles:n=!0}=e,h=(0,i.A)(e,p);const u=l.useRef(null),g=(0,o.s)(u,t),x=(0,d.Z)(c),v=(0,m.X)(r);return l.useEffect(()=>{const e=u.current;if(!e)return;const t=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(t,"checked").set;if(x!==c&&a){const t=new Event("click",{bubbles:n});a.call(e,c),e.dispatchEvent(t)}},[x,c,n]),(0,_.jsx)("input",(0,s.A)((0,s.A)({type:"checkbox","aria-hidden":!0,defaultChecked:c},h),{},{tabIndex:-1,ref:g,style:(0,s.A)((0,s.A)((0,s.A)({},h.style),v),{},{position:"absolute",pointerEvents:"none",opacity:0,margin:0})}))});function k(e){return e?"checked":"unchecked"}S.displayName="SwitchBubbleInput";var T=w,M=N}}]);
3//# sourceMappingURL=7266.468b9a73.chunk.js.map

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