{"id":27,"date":"2020-11-06T08:37:33","date_gmt":"2020-11-06T08:37:33","guid":{"rendered":"https:\/\/demo.secretred.com\/22\/?page_id=27"},"modified":"2026-08-11T16:48:54","modified_gmt":"2026-08-11T16:48:54","slug":"reserve","status":"publish","type":"page","link":"https:\/\/demo.secretred.com\/22\/reserve\/","title":{"rendered":"Reserve"},"content":{"rendered":"    \n    \n    <style>\n    @media (max-width: 767px) {\n            .sr-box-ZmUpYg{\n                    padding-top:100px !important;                    padding-right:0px !important;                    padding-bottom:100px !important;                    padding-left:0px !important;            }\n    }\n    \n    <\/style>\n    \n    <div class=\"edge-to-edge\"> \n    <div  class=\"sr-box sr-box-ZmUpYg  rounded-0 wow animate__fadeIn  remove-top-margin  \" style=\"max-width:9999px; margin-top:0px; margin-bottom:0px; padding-top:130px; padding-right:0px; padding-bottom:100px; padding-left:0px;  background-color:#0000000d;  background-attachment: scroll; background-position:50% 50%;\">\n        <div class=\"bg-overlay\" style=\"  opacity:5;\"><\/div>\n        <div class=\"sr-box-content w-100 \" style=\"width:px !important; \">\n            \n    \n    \n    <style>\n    @media (max-width: 767px) {\n            .sr-box-CpRbu{\n                    padding-top:0px !important;                    padding-right:15px !important;                    padding-bottom:0px !important;                    padding-left:15px !important;            }\n    }\n    \n    <\/style>\n    \n     \n    <div  class=\"sr-box sr-box-CpRbu  rounded-0 wow animate__fadeIn    \" style=\"max-width:830px; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-right:15px; padding-bottom:0px; padding-left:15px;    background-attachment: scroll; background-position:50% 50%;\">\n        <div class=\"bg-overlay\" style=\"  opacity:5;\"><\/div>\n        <div class=\"sr-box-content w-100 \" style=\"width:px !important; \">\n            \n    \n    <style>\n            .sr-heading-1w47fv{\n                    font-size:4rem !important;            }\n            @media screen and (max-width: 1000px) {\n                    .sr-heading-1w47fv{\n                            font-size:2.75rem !important;                    }\n            }\n    <\/style>\n    \n    <h2  class=\"sr-heading-1w47fv    \" style=\" \"><span>Reserve<\/span><\/h2>\n\n    \n    \n    <style>\n    @media (max-width: 767px) {\n            .sr-box-Z1ofoNr{\n                    padding-top:0px !important;                    padding-right:0px !important;                    padding-bottom:0px !important;                    padding-left:0px !important;            }\n    }\n    \n    <\/style>\n    \n     \n    <div  class=\"sr-box sr-box-Z1ofoNr  rounded-0 wow animate__fadeIn align-left   \" style=\"max-width:600px; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px;    background-attachment: scroll; background-position:50% 50%;\">\n        <div class=\"bg-overlay\" style=\"  opacity:5;\"><\/div>\n        <div class=\"sr-box-content w-100 \" style=\"width:px !important; \">\n            \n\n<p class=\"wp-block-paragraph\">Suspendisse sed tortor at risus varius aliquet. Etiam ante nisl, placerat non sagittis at, lobortis sed enim. Donec et aliquet nunc. Praesent vulputate viverra massa a tincidunt. Pellentesque varius suscipit mauris, a consectetur mauris ultrices vitae. Aenean vitae sagittis nisl, a pellentesque purus. Mauris vehicula, velit in aliquam ullamcorper, ipsum eros finibus magna, eu mollis metus dolor ac nulla.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Nulla tincidunt vitae ligula sed euismod. Curabitur eget ante sed diam congue sollicitudin. Phasellus in fermentum nisl, in gravida turpis. Nam in velit eget diam suscipit finibus. Donec in purus urna. Morbi ipsum arcu, eleifend ut sapien quis, molestie eleifend nisl. Curabitur et vestibulum tellus.<\/p>\n\n\n            <div class=\"clearfix\"><\/div>\n        <\/div>\n    <\/div>\n    \n\n            <div class=\"clearfix\"><\/div>\n        <\/div>\n    <\/div>\n    \n\n            <div class=\"clearfix\"><\/div>\n        <\/div>\n    <\/div>\n    <\/div>\n\n<style>\n    #sr-spacer-11R6Ca{\n            height:50px;                            \n    }\n        \n    @media (min-width: 576px) { \n            #sr-spacer-11R6Ca{\n                    height:50px;                                                    }\n    }\n        \n    @media (min-width: 768px) {\n            #sr-spacer-11R6Ca{\n                    height:50px;                                                    }\n    }\n        \n    @media (min-width: 1001px) {\n            #sr-spacer-11R6Ca{\n                    height:100px;                                                    }\n    }\n        \n    @media (min-width: 1200px) {\n            #sr-spacer-11R6Ca{\n                    height:100px;                                                    }\n    }\n    <\/style>\n    \n    <div id=\"sr-spacer-11R6Ca\" class=\"sr-spacer \"><\/div>\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">To book an appointment to meet me, please fill in the form below.<\/p>\n\n\n    \n    \n    <style>\n    @media (max-width: 767px) {\n            .sr-box-Zp5by3{\n                    padding-top:0px !important;                    padding-right:0px !important;                    padding-bottom:0px !important;                    padding-left:0px !important;            }\n    }\n    \n    <\/style>\n    \n     \n    <div  class=\"sr-box sr-box-Zp5by3  rounded-0 wow animate__fadeIn    \" style=\"max-width:800px; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px;    background-attachment: scroll; background-position:50% 50%;\">\n        <div class=\"bg-overlay\" style=\"  opacity:5;\"><\/div>\n        <div class=\"sr-box-content w-100 \" style=\"width:px !important; \">\n            \n\n            <div class=\"srcb-form-wrap\">\n            <form class=\"srcb-form\" method=\"post\" enctype=\"multipart\/form-data\">\n                <input type=\"hidden\" id=\"srcb_nonce\" name=\"srcb_nonce\" value=\"0efe97a272\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/22\/wp-json\/wp\/v2\/pages\/27\" \/>\n                <div class=\"srcb-row\" data-conditional-field=\"\" data-conditional-value=\"\"><h3 class=\"srcb-form-heading\">Appointment Details<\/h3><\/div>                    <div class=\"srcb-row\">\n                <label for=\"srcb_booking_location\">Location *<\/label>\n                                <select id=\"srcb_booking_location\" name=\"srcb_booking_location\" required>\n                    <option value=\"\">Select location<\/option>\n                                            <option value=\"london\">\n                            London                        <\/option>\n                                            <option value=\"nyc\">\n                            NYC                        <\/option>\n                                            <option value=\"other\">\n                            Other                        <\/option>\n                                    <\/select>\n            <\/div>\n        \n        <div class=\"srcb-manual-destination-wrapper\" style=\"display:none;\">\n            <div class=\"srcb-row\">\n                <label for=\"srcb_manual_destination\">Town\/City\/Country *<\/label>\n                                 <textarea\n                    id=\"srcb_manual_destination\"\n                    name=\"manual_destination\"\n                    rows=\"3\"\n                    placeholder=\"\"\n                ><\/textarea>\n            <\/div>\n        <\/div>\n\n        <div class=\"srcb-destination-wrapper\" style=\"display:none;\">\n            <div class=\"srcb-row\">\n                <label for=\"srcb-country\">Country *<\/label>\n                <select id=\"srcb-country\" name=\"country\">\n                    <option value=\"\">Select country<\/option>\n                <\/select>\n            <\/div>\n\n            <div class=\"srcb-row srcb-region-row\" style=\"display:none;\">\n                <label for=\"srcb-region\">State \/ Region *<\/label>\n                <select id=\"srcb-region\" name=\"region\">\n                    <option value=\"\">Select state \/ region<\/option>\n                <\/select>\n            <\/div>\n\n            <div class=\"srcb-row srcb-city-row\" style=\"display:none;\">\n                <label for=\"srcb-city\">City *<\/label>\n                <select id=\"srcb-city\" name=\"city\">\n                    <option value=\"\">Select city<\/option>\n                <\/select>\n            <\/div>\n\n            <input type=\"hidden\" id=\"srcb-destination-path\" name=\"destination_path\" value=\"\">\n            <input type=\"hidden\" id=\"srcb-destination-timezone\" name=\"timezone\" value=\"\">\n        <\/div>\n\n        <div class=\"srcb-row srcb-date-row\">\n            <label for=\"srcb_booking_date\">Date *<\/label>\n                        <div class=\"srcb-date-input-wrap\">\n                <input type=\"text\" id=\"srcb_booking_date\" name=\"srcb_booking_date\" class=\"srcb-date-input\" placeholder=\"Select a date\" autocomplete=\"off\" required>\n            <\/div>\n            <small class=\"srcb-help\">Click the date field to open the calendar.<\/small>\n        <\/div>\n\n        <div class=\"srcb-row\">\n            <label for=\"srcb_booking_type\">Booking Type *<\/label>\n                        <select id=\"srcb_booking_type\" name=\"srcb_booking_type\" required>\n                <option value=\"\">Select booking type<\/option>\n                                    <option value=\"incall\">\n                        Incall                    <\/option>\n                                    <option value=\"outcall\">\n                        Outcall                    <\/option>\n                                    <option value=\"fmty\">\n                        FMTY                    <\/option>\n                                    <option value=\"dmty\">\n                        DMTY                    <\/option>\n                            <\/select>\n        <\/div>\n\n        <div class=\"srcb-row srcb-appointment-address-row\" style=\"display:none;\">\n            <label for=\"srcb_appointment_address\">Appointment Address *<\/label>\n                        <textarea\n                id=\"srcb_appointment_address\"\n                name=\"srcb_appointment_address\"\n                placeholder=\"\"\n                rows=\"3\"\n            ><\/textarea>\n        <\/div>\n\n        <div class=\"srcb-row\">\n            <label for=\"srcb_booking_duration\">Duration *<\/label>\n                        <select id=\"srcb_booking_duration\" name=\"srcb_booking_duration\" required>\n                <option value=\"\">Select duration<\/option>\n                                    <option value=\"30minutes\">30 Minutes<\/option>\n                                    <option value=\"1hour\">1 Hour<\/option>\n                                    <option value=\"90minutes\">90 Minutes<\/option>\n                                    <option value=\"2hours\">2 Hours<\/option>\n                                    <option value=\"3hours\">3 Hours<\/option>\n                                    <option value=\"4hours\">4 Hours<\/option>\n                                    <option value=\"6hours\">6 Hours<\/option>\n                                    <option value=\"12hours\">12 Hours<\/option>\n                                    <option value=\"24hours\">24 Hours<\/option>\n                                    <option value=\"48hours\">48 Hours<\/option>\n                            <\/select>\n        <\/div>\n\n        <div class=\"srcb-row\">\n            <label for=\"srcb_booking_time\">\n                <span class=\"srcb-booking-time-label-base\">Available times<\/span> *\n            <\/label>\n                        <select id=\"srcb_booking_time\" name=\"srcb_booking_time\" required>\n                <option value=\"\">Select location, date, booking type and duration first<\/option>\n            <\/select>\n            <small class=\"srcb-help srcb-location-timezone-note\"><\/small>\n        <\/div>\n        <div class=\"srcb-row\" data-conditional-field=\"\" data-conditional-value=\"\"><h3 class=\"srcb-form-heading\">Your Details<\/h3><\/div><div class=\"srcb-row\" data-conditional-field=\"\" data-conditional-value=\"\"><label for=\"full_name\">Full Name *<\/label><input type=\"text\" id=\"full_name\" name=\"full_name\" placeholder=\"\" required><\/div><div class=\"srcb-row\" data-conditional-field=\"\" data-conditional-value=\"\"><label for=\"email\">Email *<\/label><input type=\"email\" id=\"email\" name=\"email\" placeholder=\"\" required><\/div><div class=\"srcb-row\" data-conditional-field=\"\" data-conditional-value=\"\"><label for=\"phone_number\">Telephone Number *<\/label><input type=\"text\" id=\"phone_number\" name=\"phone_number\" placeholder=\"\" required><\/div><div class=\"srcb-row\" data-conditional-field=\"\" data-conditional-value=\"\"><label for=\"preferred_method_of_contact\">Preferred method of contact *<\/label><select id=\"preferred_method_of_contact\" name=\"preferred_method_of_contact\" required><option value=\"\">Select<\/option><option value=\"email\">Email<\/option><option value=\"phone\">Phone<\/option><option value=\"textmessage\">Text Message<\/option><\/select><\/div><div class=\"srcb-row\" data-conditional-field=\"\" data-conditional-value=\"\"><h3 class=\"srcb-form-heading\">Screening Options<\/h3><\/div><div class=\"srcb-row\" data-conditional-field=\"\" data-conditional-value=\"\"><label for=\"screening-options_2\">Choose your preferred method of screening *<\/label><label class=\"srcb-inline\"><input type=\"radio\" name=\"screening-options_2\" value=\"companion-references\" required> Companion References<\/label><label class=\"srcb-inline\"><input type=\"radio\" name=\"screening-options_2\" value=\"employment-verification\" required> Employment Verification<\/label><label class=\"srcb-inline\"><input type=\"radio\" name=\"screening-options_2\" value=\"id\" required> ID<\/label><label class=\"srcb-inline\"><input type=\"radio\" name=\"screening-options_2\" value=\"p411\" required> P411<\/label><\/div><div class=\"srcb-row\" data-conditional-field=\"screening-options_2\" data-conditional-value=\"companion-references\"><h4 class=\"srcb-form-heading\">Companion References<\/h4><div class=\"srcb-form-heading-description\"><p>Minimum of 2 references from companions you have visited in the last 6 months. Name, website, email + phone number.<\/p>\n<\/div><\/div><div class=\"srcb-row\" data-conditional-field=\"screening-options_2\" data-conditional-value=\"companion-references\"><label for=\"companion-reference-1\">Companion reference 1 *<\/label><textarea id=\"companion-reference-1\" name=\"companion-reference-1\" placeholder=\"\" required><\/textarea><\/div><div class=\"srcb-row\" data-conditional-field=\"screening-options_2\" data-conditional-value=\"companion-references\"><label for=\"companion-reference-2\">Companion reference 2 *<\/label><textarea id=\"companion-reference-2\" name=\"companion-reference-2\" placeholder=\"\" required><\/textarea><\/div><div class=\"srcb-row\" data-conditional-field=\"screening-options_2\" data-conditional-value=\"employment-verification\"><h4 class=\"srcb-form-heading\">Employment Verification<\/h4><\/div><div class=\"srcb-row\" data-conditional-field=\"screening-options_2\" data-conditional-value=\"employment-verification\"><label for=\"position\">Position *<\/label><input type=\"text\" id=\"position\" name=\"position\" placeholder=\"\" required><\/div><div class=\"srcb-row\" data-conditional-field=\"screening-options_2\" data-conditional-value=\"employment-verification\"><label for=\"company-name\">Company name *<\/label><input type=\"text\" id=\"company-name\" name=\"company-name\" placeholder=\"\" required><\/div><div class=\"srcb-row\" data-conditional-field=\"screening-options_2\" data-conditional-value=\"employment-verification\"><label for=\"company-phone-number\">Company main phone number *<\/label><input type=\"text\" id=\"company-phone-number\" name=\"company-phone-number\" placeholder=\"\" required><\/div><div class=\"srcb-row\" data-conditional-field=\"screening-options_2\" data-conditional-value=\"employment-verification\"><label for=\"your-direct-line\">Your direct line *<\/label><input type=\"text\" id=\"your-direct-line\" name=\"your-direct-line\" placeholder=\"\" required><\/div><div class=\"srcb-row\" data-conditional-field=\"screening-options_2\" data-conditional-value=\"employment-verification\"><label for=\"linkedin-page\">LinkedIn page *<\/label><div class=\"srcb-field-description\"><p>With 250+ connections and profile picture.<\/p>\n<\/div><input type=\"text\" id=\"linkedin-page\" name=\"linkedin-page\" placeholder=\"\" required><\/div><div class=\"srcb-row\" data-conditional-field=\"screening-options_2\" data-conditional-value=\"id\"><h4 class=\"srcb-form-heading\">ID<\/h4><\/div><div class=\"srcb-row\" data-conditional-field=\"screening-options_2\" data-conditional-value=\"id\"><label for=\"id_2\">Please provide a copy your photo ID *<\/label><input type=\"file\" id=\"id_2\" name=\"id_2\" accept=\".jpg,.jpeg,.png,.pdf\" required data-max-size=\"5242880\"><small class=\"srcb-help\">Allowed: JPG, JPEG, PNG, PDF. Maximum file size: 5MB.<\/small><\/div><div class=\"srcb-row\" data-conditional-field=\"screening-options_2\" data-conditional-value=\"p411\"><h4 class=\"srcb-form-heading\">P411<\/h4><\/div><div class=\"srcb-row\" data-conditional-field=\"screening-options_2\" data-conditional-value=\"p411\"><label for=\"p411-details\">Please provide your P411 details for verification *<\/label><input type=\"text\" id=\"p411-details\" name=\"p411-details\" placeholder=\"\" required><\/div><div class=\"srcb-row\" data-conditional-field=\"\" data-conditional-value=\"\"><h3 class=\"srcb-form-heading\">Additional Information<\/h3><\/div><div class=\"srcb-row\" data-conditional-field=\"\" data-conditional-value=\"\"><label for=\"hear-about\">Where did you hear about me? *<\/label><select id=\"hear-about\" name=\"hear-about\" required><option value=\"\">Select<\/option><option value=\"instagram\">Instagram<\/option><option value=\"x-twitter\">X (Twitter)<\/option><option value=\"linkedin\">LinkedIn<\/option><option value=\"google\">Google<\/option><option value=\"directory\">Directory<\/option><option value=\"other\">Other<\/option><\/select><\/div><div class=\"srcb-row\" data-conditional-field=\"hear-about\" data-conditional-value=\"directory\"><label for=\"directory-name\">Please enter the directory name below *<\/label><input type=\"text\" id=\"directory-name\" name=\"directory-name\" placeholder=\"\" required><\/div><div class=\"srcb-row\" data-conditional-field=\"hear-about\" data-conditional-value=\"other\"><label for=\"other\">If other, please state below *<\/label><input type=\"text\" id=\"other\" name=\"other\" placeholder=\"\" required><\/div><div class=\"srcb-row\" data-conditional-field=\"\" data-conditional-value=\"\"><label for=\"photo\">Would you like to share your picture with me?<\/label><input type=\"file\" id=\"photo\" name=\"photo\" accept=\".jpg,.jpeg,.png,.pdf\" data-max-size=\"5242880\"><small class=\"srcb-help\">Allowed: JPG, JPEG, PNG, PDF. Maximum file size: 5MB.<\/small><\/div><div class=\"srcb-row\" data-conditional-field=\"\" data-conditional-value=\"\"><label for=\"message\">Comments \/ questions \/ requests...<\/label><textarea id=\"message\" name=\"message\" placeholder=\"\"><\/textarea><\/div><div class=\"srcb-row\" data-conditional-field=\"\" data-conditional-value=\"\"><label for=\"quiz\">Anti-Spam Quiz *<\/label><div class=\"srcb-quiz-question\">How many legs has a 6 legged spider?<\/div><input type=\"text\" id=\"quiz\" name=\"quiz\" placeholder=\"Type your answer\" required autocomplete=\"off\"><input type=\"hidden\" name=\"quiz__question\" value=\"How many legs has a 6 legged spider?\"><input type=\"hidden\" name=\"quiz__answer_hash\" value=\"a371bde784c7889fcc0e1e90c0da3ff2\"><\/div><div class=\"srcb-row\" data-conditional-field=\"\" data-conditional-value=\"\"><div class=\"srcb-submit\"><button type=\"submit\" name=\"srcb_submit_booking\" value=\"1\">Submit<\/button><\/div><\/div>\n                \n                <div class=\"srcb-row srcb-notice-row\">\n                    <div class=\"srcb-form-notice\" aria-live=\"polite\"><\/div>\n                <\/div>\n            <\/form>\n        <\/div>\n\n        <script>\n        (function(){\n            const wrap = document.currentScript.previousElementSibling && document.currentScript.previousElementSibling.classList.contains('srcb-form-wrap')\n                ? document.currentScript.previousElementSibling\n                : document.querySelector('.srcb-form-wrap');\n            if (!wrap) return;\n\n            const form = wrap.querySelector('.srcb-form');\n            const noticeBox = wrap.querySelector('.srcb-form-notice');\n            if (!form) return;\n\n            const ajaxUrl = \"https:\\\/\\\/demo.secretred.com\\\/22\\\/wp-admin\\\/admin-ajax.php\";\n            const ajaxNonce = \"71d8e67474\";\n            const serverNowMs = 1786560804058;\n            const dateInput = form.querySelector('#srcb_booking_date');\n            const timeSelect = form.querySelector('#srcb_booking_time');\n            const durationSelect = form.querySelector('#srcb_booking_duration');\n            const locationSelect = form.querySelector('#srcb_booking_location');\n            const bookingTypeSelect = form.querySelector('#srcb_booking_type');\n            const appointmentAddressRow = form.querySelector('.srcb-appointment-address-row');\n            const appointmentAddressInput = form.querySelector('#srcb_appointment_address');\n            const conditionalRows = form.querySelectorAll('[data-conditional-field]');\n            const tzNote = form.querySelector('.srcb-location-timezone-note');\n            const bookingTypeNote = form.querySelector('.srcb-booking-type-note');\n            const durationNote = form.querySelector('.srcb-duration-note');\n            const masterBlackoutRanges = [];\n            const blackoutMap = {\"london\":[],\"nyc\":[],\"other\":[]};\n            const bookingTypeLabels = {\"incall\":\"Incall\",\"outcall\":\"Outcall\",\"fmty\":\"FMTY\",\"dmty\":\"DMTY\"};\n            const durationConfigs = [{\"id\":\"30minutes\",\"label\":\"30 Minutes\",\"minutes\":30,\"price\":\"\",\"deposit_amount\":\"\",\"currency_prices\":\"\",\"deposit_currency_prices\":\"\",\"location_rules\":{\"london\":{\"booking_types\":[\"incall\"]},\"nyc\":{\"booking_types\":[\"incall\"]}},\"allowed_locations\":[\"london\",\"nyc\"],\"display_label\":\"30 Minutes\"},{\"id\":\"1hour\",\"label\":\"1 Hour\",\"minutes\":60,\"price\":\"\",\"deposit_amount\":\"\",\"currency_prices\":\"\",\"deposit_currency_prices\":\"\",\"location_rules\":{\"london\":{\"booking_types\":[\"incall\",\"outcall\"]},\"nyc\":{\"booking_types\":[\"incall\",\"outcall\"]}},\"allowed_locations\":[\"london\",\"nyc\"],\"display_label\":\"1 Hour\"},{\"id\":\"90minutes\",\"label\":\"90 Minutes\",\"minutes\":90,\"price\":\"\",\"deposit_amount\":\"\",\"currency_prices\":\"\",\"deposit_currency_prices\":\"\",\"location_rules\":{\"london\":{\"booking_types\":[\"incall\",\"outcall\"]},\"nyc\":{\"booking_types\":[\"incall\",\"outcall\"]}},\"allowed_locations\":[\"london\",\"nyc\"],\"display_label\":\"90 Minutes\"},{\"id\":\"2hours\",\"label\":\"2 Hours\",\"minutes\":120,\"price\":\"\",\"deposit_amount\":\"\",\"currency_prices\":\"\",\"deposit_currency_prices\":\"\",\"location_rules\":{\"london\":{\"booking_types\":[\"incall\",\"outcall\"]},\"nyc\":{\"booking_types\":[\"incall\",\"outcall\"]}},\"allowed_locations\":[\"london\",\"nyc\"],\"display_label\":\"2 Hours\"},{\"id\":\"3hours\",\"label\":\"3 Hours\",\"minutes\":180,\"price\":\"\",\"deposit_amount\":\"\",\"currency_prices\":\"\",\"deposit_currency_prices\":\"\",\"location_rules\":{\"london\":{\"booking_types\":[\"incall\",\"outcall\"]},\"nyc\":{\"booking_types\":[\"incall\",\"outcall\"]}},\"allowed_locations\":[\"london\",\"nyc\"],\"display_label\":\"3 Hours\"},{\"id\":\"4hours\",\"label\":\"4 Hours\",\"minutes\":240,\"price\":\"\",\"deposit_amount\":\"\",\"currency_prices\":\"\",\"deposit_currency_prices\":\"\",\"location_rules\":{\"london\":{\"booking_types\":[\"incall\",\"outcall\"]},\"nyc\":{\"booking_types\":[\"incall\",\"outcall\"]}},\"allowed_locations\":[\"london\",\"nyc\"],\"display_label\":\"4 Hours\"},{\"id\":\"6hours\",\"label\":\"6 Hours\",\"minutes\":360,\"price\":\"\",\"deposit_amount\":\"\",\"currency_prices\":\"\",\"deposit_currency_prices\":\"\",\"location_rules\":{\"london\":{\"booking_types\":[\"incall\",\"outcall\"]},\"nyc\":{\"booking_types\":[\"incall\",\"outcall\"]}},\"allowed_locations\":[\"london\",\"nyc\"],\"display_label\":\"6 Hours\"},{\"id\":\"12hours\",\"label\":\"12 Hours\",\"minutes\":720,\"price\":\"\",\"deposit_amount\":\"\",\"currency_prices\":\"\",\"deposit_currency_prices\":\"\",\"location_rules\":{\"london\":{\"booking_types\":[\"incall\",\"outcall\"]},\"nyc\":{\"booking_types\":[\"incall\",\"outcall\"]}},\"allowed_locations\":[\"london\",\"nyc\"],\"display_label\":\"12 Hours\"},{\"id\":\"24hours\",\"label\":\"24 Hours\",\"minutes\":1440,\"price\":\"\",\"deposit_amount\":\"\",\"currency_prices\":\"\",\"deposit_currency_prices\":\"\",\"location_rules\":{\"london\":{\"booking_types\":[\"incall\",\"outcall\"]},\"nyc\":{\"booking_types\":[\"incall\",\"outcall\"]},\"other\":{\"booking_types\":[\"fmty\"]}},\"allowed_locations\":[\"london\",\"nyc\",\"other\"],\"display_label\":\"24 Hours\"},{\"id\":\"48hours\",\"label\":\"48 Hours\",\"minutes\":2880,\"price\":\"\",\"deposit_amount\":\"\",\"currency_prices\":\"\",\"deposit_currency_prices\":\"\",\"location_rules\":{\"london\":{\"booking_types\":[\"incall\",\"outcall\"]},\"nyc\":{\"booking_types\":[\"incall\",\"outcall\"]},\"other\":{\"booking_types\":[\"fmty\"]}},\"allowed_locations\":[\"london\",\"nyc\",\"other\"],\"display_label\":\"48 Hours\"}];\n            const rawLocationConfigs = [{\"key\":\"london\",\"label\":\"London\",\"timezone\":\"UTC\",\"default_min_notice_minutes\":0,\"booking_types\":[\"incall\",\"outcall\",\"fmty\",\"dmty\"],\"booking_type_rules\":{\"incall\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}},\"outcall\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}},\"fmty\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}},\"dmty\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}}},\"current_location_ranges\":[],\"limit_bookings_to_current_location_ranges\":0,\"exclusive_current_location_ranges\":0,\"standard_destination_label\":\"\",\"standard_destination_path\":\"\",\"destination_input_mode\":\"none\",\"use_destinations_dataset\":0,\"destination_paths\":[],\"destinations\":[]},{\"key\":\"nyc\",\"label\":\"NYC\",\"timezone\":\"UTC\",\"default_min_notice_minutes\":0,\"booking_types\":[\"incall\",\"outcall\",\"fmty\",\"dmty\"],\"booking_type_rules\":{\"incall\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}},\"outcall\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}},\"fmty\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}},\"dmty\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}}},\"current_location_ranges\":[],\"limit_bookings_to_current_location_ranges\":0,\"exclusive_current_location_ranges\":0,\"standard_destination_label\":\"\",\"standard_destination_path\":\"\",\"destination_input_mode\":\"none\",\"use_destinations_dataset\":0,\"destination_paths\":[],\"destinations\":[]},{\"key\":\"other\",\"label\":\"Other\",\"timezone\":\"UTC\",\"default_min_notice_minutes\":0,\"booking_types\":[\"fmty\"],\"booking_type_rules\":{\"incall\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}},\"outcall\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}},\"fmty\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}},\"dmty\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}}},\"current_location_ranges\":[],\"limit_bookings_to_current_location_ranges\":0,\"exclusive_current_location_ranges\":0,\"standard_destination_label\":\"\",\"standard_destination_path\":\"\",\"destination_input_mode\":\"manual\",\"use_destinations_dataset\":0,\"destination_paths\":[],\"destinations\":[]}];\n            const locationConfigs = Array.isArray(rawLocationConfigs) ? rawLocationConfigs.reduce(function(map, item){\n                if (!item || typeof item !== 'object') {\n                    return map;\n                }\n\n                const key = String(item.key || '').toLowerCase();\n                if (!key) {\n                    return map;\n                }\n\n                map[key] = {\n                    key: key,\n                    label: String(item.label || ''),\n                    booking_types: Array.isArray(item.booking_types)\n                        ? item.booking_types.map(function(v){\n                            return String(v || '').toLowerCase();\n                        }).filter(Boolean)\n                        : []\n                };\n\n                return map;\n            }, {}) : {};\n            const allowedFileExts = [\"jpg\",\"jpeg\",\"png\",\"pdf\"];\n            const maxUploadBytes = 5242880;\n            const bookingCoreLabels = {\"location\":\"Location\",\"date\":\"Date\",\"duration\":\"Duration\",\"booking_type\":\"Booking Type\",\"booking_time\":\"Available times\"};\n\n            const selectBookingTimeText = 'Select ' + String(bookingCoreLabels.booking_time || 'Available time').toLowerCase();\n            const selectLocationText = 'Select ' + String(bookingCoreLabels.location || 'Location').toLowerCase();\n            const selectDurationText = 'Select ' + String(bookingCoreLabels.duration || 'Duration').toLowerCase();\n            const selectBookingTypeText = 'Select ' + String(bookingCoreLabels.booking_type || 'Booking Type').toLowerCase();\n            const selectBookingTimePrereqText =\n                'Select ' +\n                String(bookingCoreLabels.location || 'Location').toLowerCase() + ', ' +\n                String(bookingCoreLabels.date || 'Date').toLowerCase() + ', ' +\n                String(bookingCoreLabels.booking_type || 'Booking Type').toLowerCase() + ' and ' +\n                String(bookingCoreLabels.duration || 'Duration').toLowerCase() + ' first';\n            const successMessage = \"Your booking request has been submitted and is awaiting approval.\";\n\n            let fp = null;\n            let slotTimer = null;\n            let slotRequestController = null;\n            let submitRequestController = null;\n            let isResettingForm = false;\n            const slotCache = {};\n\n            const destinationWrapper = form.querySelector('.srcb-destination-wrapper');\n            const countrySelect = form.querySelector('#srcb-country');\n            const regionSelect = form.querySelector('#srcb-region');\n            const citySelect = form.querySelector('#srcb-city');\n            const regionRow = form.querySelector('.srcb-region-row');\n            const cityRow = form.querySelector('.srcb-city-row');\n            const destinationPathInput = form.querySelector('#srcb-destination-path');\n            const destinationTimezoneInput = form.querySelector('#srcb-destination-timezone');\n            const frontendLocations = [{\"key\":\"london\",\"label\":\"London\",\"timezone\":\"UTC\",\"default_min_notice_minutes\":0,\"booking_types\":[\"incall\",\"outcall\",\"fmty\",\"dmty\"],\"booking_type_rules\":{\"incall\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}},\"outcall\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}},\"fmty\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}},\"dmty\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}}},\"current_location_ranges\":[],\"limit_bookings_to_current_location_ranges\":0,\"exclusive_current_location_ranges\":0,\"standard_destination_label\":\"\",\"standard_destination_path\":\"\",\"destination_input_mode\":\"none\",\"use_destinations_dataset\":0,\"destination_paths\":[],\"destinations\":[]},{\"key\":\"nyc\",\"label\":\"NYC\",\"timezone\":\"UTC\",\"default_min_notice_minutes\":0,\"booking_types\":[\"incall\",\"outcall\",\"fmty\",\"dmty\"],\"booking_type_rules\":{\"incall\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}},\"outcall\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}},\"fmty\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}},\"dmty\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}}},\"current_location_ranges\":[],\"limit_bookings_to_current_location_ranges\":0,\"exclusive_current_location_ranges\":0,\"standard_destination_label\":\"\",\"standard_destination_path\":\"\",\"destination_input_mode\":\"none\",\"use_destinations_dataset\":0,\"destination_paths\":[],\"destinations\":[]},{\"key\":\"other\",\"label\":\"Other\",\"timezone\":\"UTC\",\"default_min_notice_minutes\":0,\"booking_types\":[\"fmty\"],\"booking_type_rules\":{\"incall\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}},\"outcall\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}},\"fmty\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}},\"dmty\":{\"min_notice_minutes\":\"\",\"booking_gap_minutes\":\"\",\"same_city_min_notice_minutes\":\"\",\"same_city_booking_gap_minutes\":\"\",\"business_hours\":{\"mon\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"tue\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"wed\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"thu\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"fri\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sat\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"},\"sun\":{\"enabled\":1,\"start\":\"10:00\",\"end\":\"21:00\",\"mode\":\"absolute\"}}}},\"current_location_ranges\":[],\"limit_bookings_to_current_location_ranges\":0,\"exclusive_current_location_ranges\":0,\"standard_destination_label\":\"\",\"standard_destination_path\":\"\",\"destination_input_mode\":\"manual\",\"use_destinations_dataset\":0,\"destination_paths\":[],\"destinations\":[]}];\n            const googleCalendarConnected = false;\n\n            function clearSlotCache() {\n                Object.keys(slotCache).forEach(function(key){\n                    delete slotCache[key];\n                });\n            }\n\n            function resetTimeSelect(message) {\n                if (!timeSelect) return;\n                timeSelect.innerHTML = '<option value=\"\">' + String(message || selectBookingTimePrereqText) + '<\/option>';\n            }\n\n            function getSelectedLocation(){\n                const key = locationSelect ? String(locationSelect.value || '') : '';\n                if (!key || !Array.isArray(frontendLocations)) {\n                    return null;\n                }\n\n                return frontendLocations.find(function(item){\n                    return String(item.key || '') === key;\n                }) || null;\n            }\n\n            function showNotice(type, message){\n                if (!noticeBox) {\n                    console.log('Notice:', type, message);\n                    return;\n                }\n\n                noticeBox.innerHTML = '<div class=\"srcb-' + type + '\">' + String(message || '') + '<\/div>';\n                noticeBox.style.display = 'block';\n            }\n\n            function clearNotice(){\n                if (!noticeBox) return;\n                noticeBox.innerHTML = '';\n                noticeBox.style.display = '';\n            }\n\n            function toYmd(dateObj){\n                const y = dateObj.getFullYear();\n                const m = String(dateObj.getMonth() + 1).padStart(2, '0');\n                const d = String(dateObj.getDate()).padStart(2, '0');\n                return y + '-' + m + '-' + d;\n            }\n\n            function getSelectedLocationConfig() {\n                if (!locationSelect) {\n                    return null;\n                }\n\n                const key = String(locationSelect.value || '');\n                if (!key || !Array.isArray(frontendLocations)) {\n                    return null;\n                }\n\n                return frontendLocations.find(function(item){\n                    return String(item.key || '') === key;\n                }) || null;\n            }\n\n                        function dateRangeDayBounds(dateObj) {\n                const ymd = toYmd(dateObj);\n\n                return {\n                    ymd: ymd,\n                    start: new Date(ymd + 'T00:00:00'),\n                    end: new Date(ymd + 'T23:59:59')\n                };\n            }\n\n            function parseRangeDateTime(dateStr, timeStr, fallbackTime) {\n                const date = String(dateStr || '');\n                if (!date) {\n                    return null;\n                }\n\n                const time = String(timeStr || '') || fallbackTime;\n                const normalizedTime = \/^\\d{2}:\\d{2}$\/.test(time) ? time : fallbackTime;\n\n                const dt = new Date(date + 'T' + normalizedTime + ':00');\n                return isNaN(dt.getTime()) ? null : dt;\n            }\n\n            function rangeCoversAnyPartOfDay(range, dateObj) {\n                if (!range || typeof range !== 'object') {\n                    return false;\n                }\n\n                const bounds = dateRangeDayBounds(dateObj);\n                const from = parseRangeDateTime(range.from_date, range.from_time, '00:00');\n                const until = parseRangeDateTime(range.until_date, range.until_time, '23:59');\n\n                const fromOk = !until || bounds.start <= until;\n                const untilOk = !from || bounds.end >= from;\n\n                return fromOk && untilOk;\n            }\n\n            function rangeCoversWholeDay(range, dateObj) {\n                if (!range || typeof range !== 'object') {\n                    return false;\n                }\n\n                const bounds = dateRangeDayBounds(dateObj);\n                const from = parseRangeDateTime(range.from_date, range.from_time, '00:00');\n                const until = parseRangeDateTime(range.until_date, range.until_time, '23:59');\n\n                const fromOk = !from || from <= bounds.start;\n                const untilOk = !until || until >= bounds.end;\n\n                return fromOk && untilOk;\n            }\n\n            function isDateWithinCurrentLocationRanges(dateObj, location) {\n                if (!location || !location.limit_bookings_to_current_location_ranges) {\n                    return true;\n                }\n\n                const ranges = Array.isArray(location.current_location_ranges)\n                    ? location.current_location_ranges\n                    : [];\n\n                if (!ranges.length) {\n                    return false;\n                }\n\n                return ranges.some(function(range){\n                    return rangeCoversAnyPartOfDay(range, dateObj);\n                });\n            }\n\n            function getExclusiveLocationsForDate(dateObj) {\n                if (!Array.isArray(frontendLocations)) {\n                    return [];\n                }\n\n                return frontendLocations.filter(function(location){\n                    if (!location || !location.exclusive_current_location_ranges) {\n                        return false;\n                    }\n\n                    const ranges = Array.isArray(location.current_location_ranges)\n                        ? location.current_location_ranges\n                        : [];\n\n                    return ranges.some(function(range){\n                        return rangeCoversAnyPartOfDay(range, dateObj);\n                    });\n                });\n            }\n\n            function isBlockedByExclusiveOtherLocation(dateObj, selectedLocation) {\n                if (!selectedLocation || !selectedLocation.key) {\n                    return false;\n                }\n\n                const exclusiveLocations = getExclusiveLocationsForDate(dateObj);\n\n                if (!exclusiveLocations.length) {\n                    return false;\n                }\n\n                const selectedIsExclusive = exclusiveLocations.some(function(location){\n                    return String(location.key || '') === String(selectedLocation.key || '');\n                });\n\n                if (selectedIsExclusive) {\n                    return false;\n                }\n\n                return exclusiveLocations.some(function(location){\n                    const ranges = Array.isArray(location.current_location_ranges)\n                        ? location.current_location_ranges\n                        : [];\n\n                    return ranges.some(function(range){\n                        return rangeCoversWholeDay(range, dateObj);\n                    });\n                });\n            }\n\n            function getMinimumNoticeMinutes(location) {\n                if (!location || typeof location !== 'object') {\n                    return 0;\n                }\n\n                const defaultNotice = Math.max(\n                    0,\n                    parseInt(location.default_min_notice_minutes, 10) || 0\n                );\n                const rules = location.booking_type_rules && typeof location.booking_type_rules === 'object'\n                    ? location.booking_type_rules\n                    : {};\n                const allowedBookingTypes = Array.isArray(location.booking_types)\n                    ? location.booking_types.map(function(value){\n                        return String(value || '').toLowerCase();\n                    }).filter(Boolean)\n                    : [];\n                const bookingTypesToCheck = allowedBookingTypes.length\n                    ? allowedBookingTypes\n                    : Object.keys(rules);\n\n                if (!bookingTypesToCheck.length) {\n                    return defaultNotice;\n                }\n\n                const noticePeriods = bookingTypesToCheck.map(function(bookingType){\n                    const rule = rules[bookingType] && typeof rules[bookingType] === 'object'\n                        ? rules[bookingType]\n                        : {};\n                    const configuredNotice = rule.min_notice_minutes;\n\n                    if (\n                        configuredNotice !== '' &&\n                        configuredNotice !== null &&\n                        typeof configuredNotice !== 'undefined'\n                    ) {\n                        return Math.max(0, parseInt(configuredNotice, 10) || 0);\n                    }\n\n                    return defaultNotice;\n                });\n\n                return Math.min.apply(null, noticePeriods);\n            }\n\n            function dateYmdInTimezone(timestampMs, timezone) {\n                try {\n                    const parts = new Intl.DateTimeFormat('en-CA', {\n                        timeZone: timezone || 'UTC',\n                        year: 'numeric',\n                        month: '2-digit',\n                        day: '2-digit'\n                    }).formatToParts(new Date(timestampMs));\n                    const values = {};\n\n                    parts.forEach(function(part){\n                        if (part.type !== 'literal') {\n                            values[part.type] = part.value;\n                        }\n                    });\n\n                    if (values.year && values.month && values.day) {\n                        return values.year + '-' + values.month + '-' + values.day;\n                    }\n                } catch (e) {\n                    \/\/ Fall back to the browser timezone below.\n                }\n\n                return toYmd(new Date(timestampMs));\n            }\n\n            function getMinimumSelectableDateYmd() {\n                const location = getSelectedLocationConfig();\n                const noticeMinutes = getMinimumNoticeMinutes(location);\n                const timezone = location && location.timezone ? String(location.timezone) : 'UTC';\n                const earliestTimestamp = serverNowMs + (noticeMinutes * 60 * 1000);\n\n                return dateYmdInTimezone(earliestTimestamp, timezone);\n            }\n\n            function isBeforeMinimumNoticeDate(dateObj) {\n                return toYmd(dateObj) < getMinimumSelectableDateYmd();\n            }\n\n            function isBlackoutDate(dateObj){\n                if (isBeforeMinimumNoticeDate(dateObj)) {\n                    return true;\n                }\n\n                const ymd = toYmd(dateObj);\n\n                const blockedByMasterBlackout = masterBlackoutRanges.some(function(range){\n                    return range && range.start && range.end && ymd >= range.start && ymd <= range.end;\n                });\n\n                if (blockedByMasterBlackout) {\n                    return true;\n                }\n\n                if (!locationSelect || !locationSelect.value) {\n                    return false;\n                }\n\n                const selectedLocation = getSelectedLocationConfig();\n                const blackoutRanges = blackoutMap[locationSelect.value] || [];\n                const blockedByBlackout = blackoutRanges.some(function(range){\n                    return range && range.start && range.end && ymd >= range.start && ymd <= range.end;\n                });\n\n                if (blockedByBlackout) {\n                    return true;\n                }\n\n                if (!isDateWithinCurrentLocationRanges(dateObj, selectedLocation)) {\n                    return true;\n                }\n\n                if (isBlockedByExclusiveOtherLocation(dateObj, selectedLocation)) {\n                    return true;\n                }\n\n                return false;\n            }\n\n            function clearDateSelection(){\n                if (dateInput) dateInput.value = '';\n                if (fp) fp.clear();\n            }\n\n            function refreshFlatpickr(){\n                if (!dateInput || typeof flatpickr === 'undefined') return;\n                const selectedDate = dateInput.value || null;\n                if (fp) {\n                    fp.destroy();\n                    fp = null;\n                }\n                fp = flatpickr(dateInput, {\n                    altInput: true,\n                    altFormat: 'F j, Y',\n                    dateFormat: 'Y-m-d',\n                    ariaDateFormat: 'F j, Y',\n                    allowInput: false,\n                    clickOpens: true,\n                    disableMobile: true,\n                    minDate: getMinimumSelectableDateYmd(),\n                    defaultDate: selectedDate,\n                    disable: [function(dateObj){\n                        return isBlackoutDate(dateObj);\n                    }],\n                    onChange: function(selectedDates, dateStr){\n                        clearSlotCache();\n\n                        if (!selectedDates || !selectedDates.length || !dateStr) {\n                            dateInput.value = '';\n                            resetTimeSelect(selectBookingTimePrereqText);\n                            return;\n                        }\n\n                        loadSlots(true);\n                    }\n                });\n\n                if (selectedDate) {\n                    const current = new Date(selectedDate + 'T00:00:00');\n                    if (!isNaN(current.getTime()) && isBlackoutDate(current)) {\n                        clearDateSelection();\n                        resetTimeSelect(selectBookingTimePrereqText);\n                    } else {\n                        fp.setDate(selectedDate, false, 'Y-m-d');\n                    }\n                }\n            }\n\n            function getDurationConfig(){\n                const duration = durationSelect ? String(durationSelect.value || '') : '';\n                return durationConfigs.find(function(item){\n                    return String(item.id || '') === duration;\n                }) || null;\n            }\n\n            function getLocationConfig(){\n                const location = locationSelect ? String(locationSelect.value || '').toLowerCase() : '';\n                return location && locationConfigs[location] ? locationConfigs[location] : null;\n            }\n\n            function normalizeKeys(values){\n                return Array.isArray(values)\n                    ? values.map(function(v){ return String(v || '').toLowerCase(); }).filter(Boolean)\n                    : [];\n            }\n\n            function getAllBookingTypeKeys(){\n                return Object.keys(bookingTypeLabels || {}).map(function(key){\n                    return String(key || '').toLowerCase();\n                }).filter(Boolean);\n            }\n\n            function getLocationBookingTypes(locationConfig){\n                const allKeys = getAllBookingTypeKeys();\n\n                if (!locationConfig) {\n                    return allKeys;\n                }\n\n                const types = Array.isArray(locationConfig.booking_types)\n                    ? locationConfig.booking_types.map(function(v){\n                        return String(v || '').toLowerCase();\n                    }).filter(Boolean)\n                    : [];\n\n                return types.length ? types : allKeys;\n            }\n\n            function getDurationLocationRule(duration, locationKey){\n                locationKey = String(locationKey || '').toLowerCase();\n\n                if (!duration || !locationKey) {\n                    return {};\n                }\n\n                const rules = duration.location_rules && typeof duration.location_rules === 'object'\n                    ? duration.location_rules\n                    : {};\n\n                if (rules[locationKey] && typeof rules[locationKey] === 'object') {\n                    return rules[locationKey];\n                }\n\n                const allowed = Array.isArray(duration.allowed_locations)\n                    ? duration.allowed_locations.map(function(v){\n                        return String(v || '').toLowerCase();\n                    }).filter(Boolean)\n                    : [];\n\n                if (allowed.indexOf(locationKey) !== -1) {\n                    return {\n                        booking_types: Array.isArray(duration.allowed_booking_types)\n                            ? duration.allowed_booking_types\n                            : []\n                    };\n                }\n\n                return {};\n            }\n\n            function isDurationAllowedForLocation(duration, locationKey){\n                locationKey = String(locationKey || '').toLowerCase();\n\n                if (!locationKey) {\n                    return true;\n                }\n\n                if (duration && duration.location_rules && typeof duration.location_rules === 'object' && Object.keys(duration.location_rules).length) {\n                    if (!duration.location_rules[locationKey] || typeof duration.location_rules[locationKey] !== 'object') {\n                        return false;\n                    }\n\n                    const ruleTypes = Array.isArray(duration.location_rules[locationKey].booking_types)\n                        ? normalizeKeys(duration.location_rules[locationKey].booking_types)\n                        : [];\n\n                    return ruleTypes.length > 0;\n                }\n\n                const allowed = Array.isArray(duration.allowed_locations)\n                    ? duration.allowed_locations.map(function(v){\n                        return String(v || '').toLowerCase();\n                    }).filter(Boolean)\n                    : [];\n\n                if (allowed.indexOf(locationKey) === -1) {\n                    return false;\n                }\n\n                const legacyTypes = Array.isArray(duration.allowed_booking_types)\n                    ? normalizeKeys(duration.allowed_booking_types)\n                    : [];\n\n                return legacyTypes.length > 0;\n            }\n\n            function resetDestinationFields() {\n                if (countrySelect) {\n                    countrySelect.innerHTML = '<option value=\"\">Select country<\/option>';\n                    countrySelect.required = false;\n                }\n\n                if (regionSelect) {\n                    regionSelect.innerHTML = '<option value=\"\">Select state \/ region<\/option>';\n                    regionSelect.required = false;\n                }\n\n                if (citySelect) {\n                    citySelect.innerHTML = '<option value=\"\">Select city<\/option>';\n                    citySelect.required = false;\n                }\n\n                if (regionRow) {\n                    regionRow.style.display = 'none';\n                }\n\n                if (cityRow) {\n                    cityRow.style.display = 'none';\n                }\n\n                if (destinationPathInput) {\n                    destinationPathInput.value = '';\n                }\n\n                if (destinationTimezoneInput) {\n                    destinationTimezoneInput.value = '';\n                }\n            }\n\n            function hideDestinationFields() {\n                if (destinationWrapper) {\n                    destinationWrapper.style.display = 'none';\n                }\n                resetDestinationFields();\n                refreshBookingTimeTimezoneDisplay();\n            }\n\n            function showDestinationFields() {\n                if (destinationWrapper) {\n                    destinationWrapper.style.display = '';\n                }\n            }\n\n            function getLocationDestinations() {\n                const location = getSelectedLocation();\n                if (!location || !Array.isArray(location.destinations)) {\n                    return [];\n                }\n                return location.destinations;\n            }\n\n            function uniqueValues(items, key) {\n                const seen = [];\n                items.forEach(function(item){\n                    const value = String(item && item[key] ? item[key] : '');\n                    if (value && seen.indexOf(value) === -1) {\n                        seen.push(value);\n                    }\n                });\n                return seen;\n            }\n\n            function fillSelect(select, placeholder, values) {\n                if (!select) return;\n\n                let html = '<option value=\"\">' + placeholder + '<\/option>';\n                values.forEach(function(value){\n                    html += '<option value=\"' + value.replace(\/\"\/g, '&quot;') + '\">' + value + '<\/option>';\n                });\n                select.innerHTML = html;\n            }\n\n            function applyResolvedDestination(item) {\n                if (!destinationPathInput || !destinationTimezoneInput) {\n                    return;\n                }\n\n                destinationPathInput.value = item && item.path ? item.path : '';\n                destinationTimezoneInput.value = item && item.timezone ? item.timezone : '';\n\n                refreshBookingTimeTimezoneDisplay();\n            }\n\n            function buildDestinationCountries() {\n                const destinations = getLocationDestinations();\n\n                if (!destinations.length) {\n                    hideDestinationFields();\n                    return;\n                }\n\n                showDestinationFields();\n                resetDestinationFields();\n\n                const countries = uniqueValues(destinations, 'country');\n                fillSelect(countrySelect, 'Select country', countries);\n                countrySelect.required = true;\n\n                refreshBookingTimeTimezoneDisplay();\n            }\n\n            function handleCountryChange() {\n                const destinations = getLocationDestinations();\n                const country = countrySelect ? String(countrySelect.value || '') : '';\n\n                if (!country) {\n                    resetDestinationFields();\n                    if (countrySelect) {\n                        fillSelect(countrySelect, 'Select country', uniqueValues(destinations, 'country'));\n                        countrySelect.value = '';\n                        countrySelect.required = true;\n                    }\n                    return;\n                }\n\n                const countryItems = destinations.filter(function(item){\n                    return String(item.country || '') === country;\n                });\n\n                const hasRegions = countryItems.some(function(item){\n                    return String(item.region || '') !== '';\n                });\n\n                const hasCitiesWithoutRegion = countryItems.some(function(item){\n                    return String(item.city || '') !== '' && String(item.region || '') === '';\n                });\n\n                const countryOnlyItem = countryItems.find(function(item){\n                    return String(item.type || '') === 'country_only';\n                });\n\n                if (hasRegions) {\n                    const regions = uniqueValues(countryItems, 'region');\n                    if (regionRow) regionRow.style.display = '';\n                    if (cityRow) cityRow.style.display = 'none';\n                    fillSelect(regionSelect, 'Select state \/ region', regions);\n                    regionSelect.required = true;\n                    citySelect.required = false;\n                    applyResolvedDestination(null);\n                    return;\n                }\n\n                if (hasCitiesWithoutRegion) {\n                    const cities = uniqueValues(countryItems, 'city');\n                    if (regionRow) regionRow.style.display = 'none';\n                    if (cityRow) cityRow.style.display = '';\n                    fillSelect(citySelect, 'Select city', cities);\n                    citySelect.required = true;\n                    regionSelect.required = false;\n                    applyResolvedDestination(null);\n                    return;\n                }\n\n                if (countryOnlyItem) {\n                    if (regionRow) regionRow.style.display = 'none';\n                    if (cityRow) cityRow.style.display = 'none';\n                    regionSelect.required = false;\n                    citySelect.required = false;\n                    applyResolvedDestination(countryOnlyItem);\n                    return;\n                }\n\n                applyResolvedDestination(null);\n            }\n\n            function handleRegionChange() {\n                const destinations = getLocationDestinations();\n                const country = countrySelect ? String(countrySelect.value || '') : '';\n                const region = regionSelect ? String(regionSelect.value || '') : '';\n\n                if (cityRow) cityRow.style.display = 'none';\n                if (citySelect) {\n                    citySelect.innerHTML = '<option value=\"\">Select city<\/option>';\n                    citySelect.required = false;\n                }\n\n                applyResolvedDestination(null);\n\n                if (!country || !region) {\n                    return;\n                }\n\n                const regionItems = destinations.filter(function(item){\n                    return String(item.country || '') === country && String(item.region || '') === region;\n                });\n\n                const cities = uniqueValues(regionItems, 'city');\n\n                if (cities.length) {\n                    if (cityRow) cityRow.style.display = '';\n                    fillSelect(citySelect, 'Select city', cities);\n                    citySelect.required = true;\n                }\n            }\n\n            function handleCityChange() {\n                const destinations = getLocationDestinations();\n                const country = countrySelect ? String(countrySelect.value || '') : '';\n                const region = regionSelect ? String(regionSelect.value || '') : '';\n                const city = citySelect ? String(citySelect.value || '') : '';\n\n                if (!country || !city) {\n                    applyResolvedDestination(null);\n                    return;\n                }\n\n                const item = destinations.find(function(dest){\n                    return String(dest.country || '') === country\n                        && String(dest.city || '') === city\n                        && String(dest.region || '') === region;\n                }) || null;\n\n                applyResolvedDestination(item);\n            }\n\n            const manualDestinationWrapper = form.querySelector('.srcb-manual-destination-wrapper');\n            const manualDestinationInput = form.querySelector('#srcb_manual_destination');\n\n            function hideManualDestinationField() {\n                if (manualDestinationWrapper) {\n                    manualDestinationWrapper.style.display = 'none';\n                }\n                if (manualDestinationInput) {\n                    manualDestinationInput.value = '';\n                    manualDestinationInput.required = false;\n                }\n            }\n\n            function showManualDestinationField() {\n                if (manualDestinationWrapper) {\n                    manualDestinationWrapper.style.display = '';\n                }\n                if (manualDestinationInput) {\n                    manualDestinationInput.required = true;\n                }\n            }\n\n            function refreshDestinationUIForLocation() {\n                const location = getSelectedLocation();\n                const mode = location && location.destination_input_mode\n                    ? String(location.destination_input_mode)\n                    : 'none';\n\n                hideManualDestinationField();\n                hideDestinationFields();\n\n                if (mode === 'predefined' && location && Array.isArray(location.destinations) && location.destinations.length) {\n                    buildDestinationCountries();\n                    return;\n                }\n\n                if (mode === 'manual') {\n                    showManualDestinationField();\n                    refreshBookingTimeTimezoneDisplay();\n                }\n            }\n\n            function getDurationBookingTypesForLocation(duration, locationKey){\n                const rule = getDurationLocationRule(duration, locationKey);\n\n                if (!locationKey) {\n                    return getAllBookingTypeKeys();\n                }\n\n                if (!rule || !Object.keys(rule).length) {\n                    return [];\n                }\n\n                return Array.isArray(rule.booking_types)\n                    ? normalizeKeys(rule.booking_types)\n                    : [];\n            }\n\n            function intersectArrays(a, b){\n                return a.filter(function(item){\n                    return b.indexOf(item) !== -1;\n                });\n            }\n\n            function getDurationById(durationId){\n                const value = String(durationId || '');\n                return durationConfigs.find(function(item){\n                    return String(item.id || '') === value;\n                }) || null;\n            }\n\n            function getAvailableBookingTypesForState(locationKey, durationValue){\n                const allKeys = getAllBookingTypeKeys();\n                const normalizedLocationKey = String(locationKey || '').toLowerCase();\n                const duration = getDurationById(durationValue);\n                const location = normalizedLocationKey ? (locationConfigs[normalizedLocationKey] || null) : null;\n\n                if (!normalizedLocationKey) {\n                    return allKeys;\n                }\n\n                const locationTypes = getLocationBookingTypes(location);\n\n                if (duration) {\n                    if (!isDurationAllowedForLocation(duration, normalizedLocationKey)) {\n                        return [];\n                    }\n\n                    const durationTypes = getDurationBookingTypesForLocation(duration, normalizedLocationKey);\n                    const allowedTypes = intersectArrays(locationTypes, durationTypes);\n\n                    return allowedTypes.length ? allowedTypes : [];\n                }\n\n                const seen = [];\n\n                durationConfigs.forEach(function(item){\n                    if (!item || !isDurationAllowedForLocation(item, normalizedLocationKey)) {\n                        return;\n                    }\n\n                    const durationTypes = getDurationBookingTypesForLocation(item, normalizedLocationKey);\n                    const allowedTypes = intersectArrays(locationTypes, durationTypes);\n\n                    if (!allowedTypes.length) {\n                        return;\n                    }\n\n                    allowedTypes.forEach(function(type){\n                        if (seen.indexOf(type) === -1) {\n                            seen.push(type);\n                        }\n                    });\n                });\n\n                return seen;\n            }\n\n            function getAvailableDurationsForState(locationKey, bookingTypeValue){\n                const normalizedLocationKey = String(locationKey || '').toLowerCase();\n                const normalizedBookingType = String(bookingTypeValue || '').toLowerCase();\n\n                if (!normalizedLocationKey) {\n                    return durationConfigs.slice();\n                }\n\n                const location = locationConfigs[normalizedLocationKey] || null;\n                const locationTypes = getLocationBookingTypes(location);\n\n                return durationConfigs.filter(function(duration){\n                    if (!duration) {\n                        return false;\n                    }\n\n                    if (!isDurationAllowedForLocation(duration, normalizedLocationKey)) {\n                        return false;\n                    }\n\n                    const durationTypes = getDurationBookingTypesForLocation(duration, normalizedLocationKey);\n                    const allowedTypes = intersectArrays(locationTypes, durationTypes);\n\n                    if (!allowedTypes.length) {\n                        return false;\n                    }\n\n                    if (!normalizedBookingType) {\n                        return true;\n                    }\n\n                    return allowedTypes.indexOf(normalizedBookingType) !== -1;\n                });\n            }\n\n            function syncBookingCoreFields(changedField){\n                if (!bookingTypeSelect || !durationSelect) {\n                    return;\n                }\n\n                const locationKey = locationSelect ? String(locationSelect.value || '').toLowerCase() : '';\n                let selectedBookingType = String(bookingTypeSelect.value || '').toLowerCase();\n                let selectedDuration = String(durationSelect.value || '');\n\n                const bookingTypesForLocation = getAvailableBookingTypesForState(locationKey, '');\n\n                if (changedField === 'location') {\n                    if (selectedBookingType && bookingTypesForLocation.indexOf(selectedBookingType) === -1) {\n                        selectedBookingType = '';\n                    }\n                }\n\n                let availableDurations = getAvailableDurationsForState(locationKey, selectedBookingType);\n\n                if (selectedDuration) {\n                    const durationStillValid = availableDurations.some(function(item){\n                        return String(item.id || '') === selectedDuration;\n                    });\n\n                    if (!durationStillValid) {\n                        selectedDuration = '';\n                    }\n                }\n\n                let bookingTypeHtml = '<option value=\"\">' + selectBookingTypeText + '<\/option>';\n                bookingTypesForLocation.forEach(function(key){\n                    bookingTypeHtml += '<option value=\"' + key + '\">' + (bookingTypeLabels[key] || key.toUpperCase()) + '<\/option>';\n                });\n                bookingTypeSelect.innerHTML = bookingTypeHtml;\n                bookingTypeSelect.value = bookingTypesForLocation.indexOf(selectedBookingType) !== -1 ? selectedBookingType : '';\n\n                availableDurations = getAvailableDurationsForState(locationKey, bookingTypeSelect.value || '');\n\n                let durationHtml = '<option value=\"\">' + selectDurationText + '<\/option>';\n                availableDurations.forEach(function(duration){\n                    durationHtml += '<option value=\"' + String(duration.id || '') + '\">' + String(duration.display_label || duration.label || duration.minutes || '') + '<\/option>';\n                });\n                durationSelect.innerHTML = durationHtml;\n                durationSelect.value = availableDurations.some(function(item){\n                    return String(item.id || '') === selectedDuration;\n                }) ? selectedDuration : '';\n\n                if (bookingTypeNote) {\n                    if (!locationKey) {\n                        bookingTypeNote.textContent = '';\n                    } else if (!bookingTypesForLocation.length) {\n                        bookingTypeNote.textContent = 'No booking types available for this location';\n                    } else {\n                        bookingTypeNote.textContent = 'Available: ' + bookingTypesForLocation.map(function(key){\n                            return bookingTypeLabels[key] || key.toUpperCase();\n                        }).join(', ');\n                    }\n                }\n\n                if (durationNote) {\n                    if (!locationKey) {\n                        durationNote.textContent = '';\n                    } else if (!availableDurations.length) {\n                        durationNote.textContent = bookingTypeSelect.value\n                            ? 'No durations available for this location and booking type'\n                            : 'No durations available for this location';\n                    } else {\n                        durationNote.textContent = 'Available: ' + availableDurations.map(function(item){\n                            return String(item.display_label || item.label || item.minutes || '');\n                        }).join(', ');\n                    }\n                }\n\n                refreshAppointmentAddressField();\n            }\n\n            function refreshAppointmentAddressField(){\n                if (!appointmentAddressRow || !appointmentAddressInput || !bookingTypeSelect) return;\n\n                const value = String(bookingTypeSelect.value || '').toLowerCase();\n                const shouldShow = ['outcall', 'fmty', 'dmty'].indexOf(value) !== -1;\n\n                appointmentAddressRow.style.display = shouldShow ? '' : 'none';\n                appointmentAddressInput.required = shouldShow;\n\n                if (!shouldShow) {\n                    appointmentAddressInput.value = '';\n                }\n            }\n\n            function getFieldValues(dep){\n                const checks = form.querySelectorAll('[name=\"' + dep + '[]\"]');\n\n                if (checks.length) {\n                    return Array.from(checks)\n                        .filter(function(el){\n                            return el.checked;\n                        })\n                        .map(function(el){\n                            return String(el.value || '').trim().toLowerCase();\n                        })\n                        .filter(Boolean);\n                }\n\n                const radios = form.querySelectorAll('[name=\"' + dep + '\"]');\n\n                if (radios.length > 1) {\n                    const checked = Array.from(radios).find(function(el){\n                        return el.checked;\n                    });\n\n                    return checked ? [String(checked.value || '').trim().toLowerCase()] : [];\n                }\n\n                const field = form.querySelector('[name=\"' + dep + '\"]');\n\n                if (!field) {\n                    return [];\n                }\n\n                const value = String(field.value || '').trim().toLowerCase();\n\n                return value !== '' ? [value] : [];\n            }\n\n            function applyConditions(){\n                conditionalRows.forEach(function(row){\n                    const dep = row.getAttribute('data-conditional-field');\n                    const rawVal = row.getAttribute('data-conditional-value');\n\n                    let isVisible = true;\n\n                    if (dep) {\n                        const currentValues = getFieldValues(dep);\n\n                        const allowedValues = String(rawVal || '')\n                            .split(',')\n                            .map(function(v){\n                                return String(v || '').trim().toLowerCase();\n                            })\n                            .filter(Boolean);\n\n                        if (allowedValues.length) {\n                            isVisible = currentValues.some(function(currentValue){\n                                return allowedValues.indexOf(currentValue) !== -1;\n                            });\n                        } else {\n                            isVisible = currentValues.length === 0;\n                        }\n                    }\n\n                    row.style.display = isVisible ? '' : 'none';\n\n                    row.querySelectorAll('input, select, textarea, button').forEach(function(field){\n                        if (field.type === 'hidden') {\n                            return;\n                        }\n\n                        if (isVisible) {\n                            field.disabled = false;\n                            if (field.dataset.wasRequired === '1') {\n                                field.required = true;\n                            }\n                        } else {\n                            if (field.required) {\n                                field.dataset.wasRequired = '1';\n                            } else {\n                                field.dataset.wasRequired = '0';\n                            }\n\n                            field.required = false;\n                            field.disabled = true;\n\n                            if (field.type === 'checkbox' || field.type === 'radio') {\n                                field.checked = false;\n                            } else if (field.tagName === 'SELECT') {\n                                field.selectedIndex = 0;\n                            } else if (field.type !== 'file') {\n                                field.value = '';\n                            }\n                        }\n                    });\n                });\n            }\n\n            function getSlotCacheKey(location, date, duration, bookingType){\n                const tz = getCurrentResolvedTimezone();\n                const destinationPath = destinationPathInput ? String(destinationPathInput.value || '') : '';\n                return [location || '', date || '', duration || '', bookingType || '', tz || '', destinationPath || ''].join('|');\n            }\n\n            function getCurrentResolvedTimezone() {\n                const selectedLocation = getSelectedLocation();\n\n                if (!selectedLocation) {\n                    return '';\n                }\n\n                const destinationTimezone = destinationTimezoneInput\n                    ? String(destinationTimezoneInput.value || '')\n                    : '';\n\n                if (destinationTimezone) {\n                    return destinationTimezone;\n                }\n\n                return String(selectedLocation.timezone || '');\n            }\n\n            function getCurrentResolvedTimezoneLabel() {\n                const timezone = getCurrentResolvedTimezone();\n\n                if (!timezone) {\n                    return '';\n                }\n\n                return timezone;\n            }\n\n            function getCurrentLocationDisplayLabel() {\n                const selectedLocation = getSelectedLocation();\n\n                if (!selectedLocation) {\n                    return '';\n                }\n\n                const mode = String(selectedLocation.destination_input_mode || 'none');\n\n                if (\n                    mode === 'predefined' &&\n                    destinationPathInput &&\n                    destinationPathInput.value\n                ) {\n                    const destinations = Array.isArray(selectedLocation.destinations)\n                        ? selectedLocation.destinations\n                        : [];\n\n                    const matched = destinations.find(function(item){\n                        return String(item.path || '') === String(destinationPathInput.value || '');\n                    });\n\n                    if (matched) {\n                        const parts = [\n                            String(matched.country || ''),\n                            String(matched.region || ''),\n                            String(matched.city || '')\n                        ].filter(Boolean);\n\n                        if (parts.length) {\n                            return parts.join(' \/ ');\n                        }\n                    }\n                }\n\n                if (mode === 'manual' && manualDestinationInput) {\n                    const manualValue = String(manualDestinationInput.value || '').trim();\n                    if (manualValue) {\n                        return manualValue;\n                    }\n                }\n\n                if (selectedLocation.standard_destination_label) {\n                    return String(selectedLocation.standard_destination_label);\n                }\n\n                return String(selectedLocation.label || '');\n            }\n\n            function refreshBookingTimeTimezoneDisplay() {\n                if (!tzNote) {\n                    return;\n                }\n\n                if (!googleCalendarConnected) {\n                    tzNote.textContent = '';\n                    return;\n                }\n\n                const timezone = getCurrentResolvedTimezone();\n                const locationLabel = getCurrentLocationDisplayLabel();\n\n                if (timezone && locationLabel) {\n                    tzNote.textContent = 'Times shown in ' + timezone + ' for ' + locationLabel;\n                } else if (timezone) {\n                    tzNote.textContent = 'Times shown in ' + timezone;\n                } else {\n                    tzNote.textContent = '';\n                }\n            }\n\n            function renderSlotResponse(data){\n                if (!data || !data.success) {\n                    const msg = (data && data.data) ? data.data : 'No slots available';\n                    resetTimeSelect(String(msg));\n                    refreshBookingTimeTimezoneDisplay();\n                    return;\n                }\n\n                if (!data.data.slots || !data.data.slots.length) {\n                    resetTimeSelect('No slots available');\n\n                    if (tzNote) {\n                        tzNote.textContent = googleCalendarConnected && data.data.timezone_label\n                            ? ('Times shown in ' + data.data.timezone_label)\n                            : '';\n                    }\n                    return;\n                }\n\n                const options = ['<option value=\"\">' + selectBookingTimeText + '<\/option>'];\n                data.data.slots.forEach(function(slot){\n                    options.push('<option value=\"' + slot.value + '\">' + slot.label + '<\/option>');\n                });\n\n                timeSelect.innerHTML = options.join('');\n\n                if (tzNote) {\n                    tzNote.textContent = googleCalendarConnected && data.data.timezone_label\n                        ? ('Times shown in ' + data.data.timezone_label)\n                        : '';\n                }\n            }\n\n            function loadSlots(immediate){\n                const date = dateInput ? dateInput.value : '';\n                const duration = durationSelect ? durationSelect.value : '';\n                const location = locationSelect ? locationSelect.value : '';\n                const bookingType = bookingTypeSelect ? bookingTypeSelect.value : '';\n\n                if ((locationSelect && !location) || !date || !duration || (bookingTypeSelect && !bookingType)) {\n                    resetTimeSelect(selectBookingTimePrereqText);\n                    if (tzNote) tzNote.textContent = '';\n                    return;\n                }\n\n                const cacheKey = getSlotCacheKey(location, date, duration, bookingType);\n\n                if (slotCache[cacheKey]) {\n                    renderSlotResponse(slotCache[cacheKey]);\n                    return;\n                }\n\n                clearTimeout(slotTimer);\n\n                const trigger = function(){\n                    if (slotRequestController) {\n                        slotRequestController.abort();\n                    }\n\n                    slotRequestController = new AbortController();\n                    resetTimeSelect('Loading available times\u2026');\n\n                    const body = new URLSearchParams();\n                    body.set('action', 'srcb_get_slots');\n                    body.set('nonce', ajaxNonce);\n                    body.set('date', date);\n                    body.set('duration', duration);\n                    body.set('location', location);\n                    body.set('booking_type', bookingType);\n                    body.set('timezone', getCurrentResolvedTimezone());\n\n                    fetch(ajaxUrl, {\n                        method:'POST',\n                        headers:{'Content-Type':'application\/x-www-form-urlencoded; charset=UTF-8'},\n                        body: body.toString(),\n                        signal: slotRequestController.signal\n                    })\n                    .then(function(res){\n                        return res.json().then(function(data){\n                            return { body: data };\n                        });\n                    })\n                    .then(function(result){\n                        slotCache[cacheKey] = result.body;\n                        renderSlotResponse(result.body);\n                    })\n                    .catch(function(err){\n                        if (err && err.name === 'AbortError') {\n                            return;\n                        }\n                        resetTimeSelect('No slots available');\n                        if (tzNote) tzNote.textContent = '';\n                    });\n                };\n\n                if (immediate) {\n                    trigger();\n                } else {\n                    slotTimer = setTimeout(trigger, 250);\n                }\n            }\n\n            function validateNativeDate(){\n                if (!dateInput || !dateInput.value) return true;\n\n                const current = new Date(dateInput.value + 'T00:00:00');\n                if (!isNaN(current.getTime()) && isBlackoutDate(current)) {\n                    window.alert(\"That date is unavailable. Please choose another date.\");\n                    clearDateSelection();\n                    resetTimeSelect(selectBookingTimePrereqText);\n                    clearSlotCache();\n                    return false;\n                }\n\n                if (fp) {\n                    fp.setDate(dateInput.value, false, 'Y-m-d');\n                }\n\n                return true;\n            }\n\n            function validateFileInput(input){\n                if (!input || input.type !== 'file') return true;\n\n                const file = input.files && input.files[0] ? input.files[0] : null;\n                if (!file) return true;\n\n                const ext = ((file.name || '').split('.').pop() || '').toLowerCase();\n\n                if (file.size > maxUploadBytes) {\n                    alert('File exceeds the 5MB limit.');\n                    input.value = '';\n                    return false;\n                }\n\n                if (allowedFileExts.indexOf(ext) === -1) {\n                    alert('Only JPG, JPEG, PNG and PDF files are allowed.');\n                    input.value = '';\n                    return false;\n                }\n\n                return true;\n            }\n\n            function clearForm(){\n                isResettingForm = true;\n\n                form.reset();\n                clearSlotCache();\n\n                if (fp) {\n                    fp.clear();\n                }\n\n                resetTimeSelect(selectBookingTimePrereqText);\n\n                if (tzNote) tzNote.textContent = '';\n                if (bookingTypeNote) bookingTypeNote.textContent = '';\n                if (durationNote) durationNote.textContent = '';\n\n                syncBookingCoreFields('location');\n                refreshAppointmentAddressField();\n                refreshFlatpickr();\n                applyConditions();\n\n                form.querySelectorAll('input[type=\"file\"]').forEach(function(input){\n                    input.value = '';\n                });\n\n                refreshDestinationUIForLocation();\n                refreshBookingTimeTimezoneDisplay();\n\n                setTimeout(function(){\n                    isResettingForm = false;\n                }, 0);\n            }\n\n            function setSubmitting(isSubmitting){\n                form.classList.toggle('srcb-submitting', !!isSubmitting);\n\n                form.querySelectorAll('button, input, select, textarea').forEach(function(el){\n                    if (el.type === 'hidden') {\n                        return;\n                    }\n\n                    if (isSubmitting) {\n                        el.disabled = true;\n                        return;\n                    }\n\n                    const parentRow = el.closest('.srcb-row');\n                    const rowHidden = parentRow && parentRow.style.display === 'none';\n\n                    if (rowHidden) {\n                        el.disabled = true;\n                        return;\n                    }\n\n                    el.disabled = false;\n                });\n            }\n\n            function resetSubmitButton(submitBtn){\n                if (!submitBtn) return;\n\n                submitBtn.disabled = false;\n                submitBtn.classList.remove('is-loading');\n\n                if (submitBtn.dataset.originalText) {\n                    submitBtn.innerHTML = submitBtn.dataset.originalText;\n                }\n            }\n\n            if (locationSelect) {\n                locationSelect.addEventListener('change', function () {\n                    clearSlotCache();\n                    syncBookingCoreFields('location');\n                    refreshDestinationUIForLocation();\n                    refreshBookingTimeTimezoneDisplay();\n                    refreshFlatpickr();\n                    validateNativeDate();\n                    loadSlots(false);\n                });\n            }\n\n            if (bookingTypeSelect) {\n                bookingTypeSelect.addEventListener('change', function () {\n                    clearSlotCache();\n                    syncBookingCoreFields('booking_type');\n                    refreshFlatpickr();\n                    validateNativeDate();\n                    loadSlots(false);\n                });\n            }\n\n            if (durationSelect) {\n                durationSelect.addEventListener('change', function () {\n                    clearSlotCache();\n                    syncBookingCoreFields('duration');\n                    loadSlots(false);\n                });\n            }\n\n            if (countrySelect) {\n                countrySelect.addEventListener('change', function () {\n                    clearSlotCache();\n                    handleCountryChange();\n                    loadSlots(false);\n                });\n            }\n\n            if (regionSelect) {\n                regionSelect.addEventListener('change', function () {\n                    clearSlotCache();\n                    handleRegionChange();\n                    loadSlots(false);\n                });\n            }\n\n            if (citySelect) {\n                citySelect.addEventListener('change', function () {\n                    clearSlotCache();\n                    handleCityChange();\n                    loadSlots(false);\n                });\n            }\n\n            form.addEventListener('change', function(e){\n                if (!isResettingForm) {\n                    clearNotice();\n                }\n\n                applyConditions();\n\n                if (e.target === dateInput) {\n                    clearSlotCache();\n                    loadSlots(false);\n                }\n\n                if (e.target && e.target.type === 'file') {\n                    validateFileInput(e.target);\n                }\n            });\n\n            form.addEventListener('submit', function(e){\n                e.preventDefault();\n                clearNotice();\n\n                const fileInputs = form.querySelectorAll('input[type=\"file\"]');\n                for (let i = 0; i < fileInputs.length; i++) {\n                    if (!validateFileInput(fileInputs[i])) {\n                        return false;\n                    }\n                }\n\n                if (submitRequestController) {\n                    submitRequestController.abort();\n                }\n                submitRequestController = new AbortController();\n\n                const formData = new FormData(form);\n                formData.set('action', 'srcb_submit_booking');\n\n                const selectedLocation = getSelectedLocation();\n                const destinationMode = selectedLocation\n                    ? String(selectedLocation.destination_input_mode || 'none')\n                    : 'none';\n\n                if (destinationMode === 'predefined') {\n                    formData.set('country', countrySelect ? (countrySelect.value || '') : '');\n                    formData.set('region', regionSelect ? (regionSelect.value || '') : '');\n                    formData.set('city', citySelect ? (citySelect.value || '') : '');\n                    formData.set('destination_path', destinationPathInput ? (destinationPathInput.value || '') : '');\n                    formData.set('manual_destination', '');\n                } else if (destinationMode === 'manual') {\n                    formData.set('manual_destination', manualDestinationInput ? (manualDestinationInput.value || '') : '');\n                    formData.set('country', '');\n                    formData.set('region', '');\n                    formData.set('city', '');\n                    formData.set('destination_path', '');\n                } else {\n                    formData.set('manual_destination', '');\n                    formData.set('country', '');\n                    formData.set('region', '');\n                    formData.set('city', '');\n                    formData.set('destination_path', '');\n                }\n\n                if (destinationMode === 'manual') {\n                    const manualValue = manualDestinationInput ? String(manualDestinationInput.value || '').trim() : '';\n\n                    if (!manualValue) {\n                        showNotice('error', 'Please enter the town\/city\/country.');\n                        return false;\n                    }\n                }\n\n                formData.set('timezone', getCurrentResolvedTimezone());\n\n                setSubmitting(true);\n\n                const submitBtn = form.querySelector('[type=\"submit\"]');\n\n                if (submitBtn) {\n                    submitBtn.disabled = true;\n                    submitBtn.classList.add('is-loading');\n\n                    if (!submitBtn.dataset.originalText) {\n                        submitBtn.dataset.originalText = submitBtn.innerHTML;\n                    }\n\n                    submitBtn.innerHTML = '<span class=\"srcb-spinner\"><\/span> Submitting...';\n                }\n\n                fetch(ajaxUrl, {\n                    method: 'POST',\n                    body: formData,\n                    signal: submitRequestController.signal\n                })\n                .then(async function(res){\n                    const data = await res.json();\n                    return { ok: res.ok, data: data };\n                })\n                .then(function(result){\n                    if (!result.ok || !result.data || !result.data.success) {\n                        const msg = result.data && result.data.data && result.data.data.message\n                            ? result.data.data.message\n                            : 'There was a problem submitting your booking.';\n                        showNotice('error', msg);\n                        return;\n                    }\n\n                    const payload = result.data.data || {};\n\n                    if (payload.redirect) {\n                        showNotice('success', payload.message || 'Redirecting to checkout\u2026');\n                        window.location.href = payload.redirect;\n                        return;\n                    }\n\n                    clearForm();\n                    showNotice(\n                        'success',\n                        payload.message ? payload.message : successMessage\n                    );\n                })\n                .catch(function(err){\n                    if (err && err.name === 'AbortError') {\n                        return;\n                    }\n                    showNotice('error', 'There was a problem submitting your booking.');\n                })\n                .finally(function(){\n                    setSubmitting(false);\n                    resetSubmitButton(submitBtn);\n                });\n\n                return false;\n            });\n\n            refreshFlatpickr();\n            applyConditions();\n            syncBookingCoreFields('location');\n            refreshAppointmentAddressField();\n            refreshDestinationUIForLocation();\n            refreshBookingTimeTimezoneDisplay();\n        })();\n        <\/script>\n\n            \n\n\n            <div class=\"clearfix\"><\/div>\n        <\/div>\n    <\/div>\n    ","protected":false},"excerpt":{"rendered":"<p>To book an appointment to meet me, please fill in the form below.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-templates\/floating-header-standard-colours.php","meta":{"footnotes":""},"class_list":["post-27","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/demo.secretred.com\/22\/wp-json\/wp\/v2\/pages\/27","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demo.secretred.com\/22\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/demo.secretred.com\/22\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/demo.secretred.com\/22\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/demo.secretred.com\/22\/wp-json\/wp\/v2\/comments?post=27"}],"version-history":[{"count":4,"href":"https:\/\/demo.secretred.com\/22\/wp-json\/wp\/v2\/pages\/27\/revisions"}],"predecessor-version":[{"id":3050,"href":"https:\/\/demo.secretred.com\/22\/wp-json\/wp\/v2\/pages\/27\/revisions\/3050"}],"wp:attachment":[{"href":"https:\/\/demo.secretred.com\/22\/wp-json\/wp\/v2\/media?parent=27"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}