(()=>{"use strict";var e={192(e,t,i){
/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var o=i(609),n=Symbol.for("react.element"),l=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,r=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,i){var o,l={},s=null,d=null;for(o in void 0!==i&&(s=""+i),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(d=t.ref),t)a.call(t,o)&&!p.hasOwnProperty(o)&&(l[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===l[o]&&(l[o]=t[o]);return{$$typeof:n,type:e,key:s,ref:d,props:l,_owner:r.current}}t.Fragment=l,t.jsx=s,t.jsxs=s},540(e,t,i){e.exports=i(192)},609(e){e.exports=window.React}},t={};function i(o){var n=t[o];if(void 0!==n)return n.exports;var l=t[o]={exports:{}};return e[o](l,l.exports,i),l.exports}i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{metadata:()=>P,name:()=>L,settings:()=>A});var n={};i.r(n),i.d(n,{metadata:()=>oe,name:()=>le,settings:()=>re});const{__:l}=wp.i18n,a={appointment_service_field:[{value:"current_post_id",label:l("Current Post ID","jet-appointments-booking")},{value:"form_field",label:l("Form Field","jet-appointments-booking")},{value:"manual_input",label:l("Manual Input","jet-appointments-booking")}]},r={appointment_service_field:l("Get Service ID From:","jet-appointments-booking"),appointment_form_field:l("Select Service Field:","jet-appointments-booking"),appointment_service_id:l("Set Service ID:","jet-appointments-booking")},{__:p}=wp.i18n,s={appointment_provider_custom_template:p("Use Custom Template For Items:","jet-appointments-booking"),appointment_provider_custom_template_id:p("Custom Template ID:","jet-appointments-booking"),switch_on_change:p("Switch Page on Change:","jet-appointments-booking"),value_from_meta:p("By default post ID is used as value. Here you can set meta field name to use its value as form field value","jet-appointments-booking"),...r};var d=i(540),_=i(609);const{AdvancedFields:m,GeneralFields:c,ToolBarFields:f,FieldWrapper:u,HorizontalLine:h}=JetFBComponents,{Tools:{withPlaceholder:v},getFieldsWithoutCurrent:g}=JetFBActions,{TextControl:C,SelectControl:b,PanelBody:y,ToggleControl:w,RadioControl:x}=wp.components,{__:k}=wp.i18n,{InspectorControls:j,useBlockProps:B}=wp.blockEditor;const F=function(e){const t=B(),i=g("--"),o=window.JetAppointmentProviderField,{attributes:n,setAttributes:l,isSelected:r,editProps:{uniqKey:p}}=e;return[(0,d.jsx)(f,{...e},p("ToolBarFields")),r&&(0,d.jsxs)(j,{children:[(0,d.jsx)(c,{...e},p("GeneralFields")),(0,d.jsxs)(y,{title:k("Field Settings"),children:[(0,d.jsx)(b,{label:s.appointment_service_field,labelPosition:"top",value:n.appointment_service_field,onChange:e=>{l({appointment_service_field:e})},options:v(a.appointment_service_field)}),"form_field"===n.appointment_service_field&&(0,d.jsx)(b,{label:s.appointment_form_field,labelPosition:"top",value:n.appointment_form_field,onChange:e=>{l({appointment_form_field:e})},options:i}),"manual_input"===n.appointment_service_field&&(0,d.jsx)(C,{label:s.appointment_service_id,value:n.appointment_service_id,onChange:e=>{l({appointment_service_id:e})}}),(0,d.jsx)(h,{}),(0,d.jsx)(w,{label:s.appointment_provider_custom_template,checked:n.appointment_provider_custom_template,onChange:e=>l({appointment_provider_custom_template:e})}),n.appointment_provider_custom_template&&(0,d.jsx)(b,{label:s.appointment_provider_custom_template_id,labelPosition:"top",value:n.appointment_provider_custom_template_id,onChange:e=>{l({appointment_provider_custom_template_id:e})},options:v(o.listings)}),(0,d.jsx)(w,{label:s.switch_on_change,checked:n.switch_on_change,onChange:e=>l({switch_on_change:e})})]},p("PanelBody")),(0,d.jsx)(m,{...e},p("AdvancedFields"))]},p("InspectorControls")),(0,_.createElement)("div",{...t,key:p("viewBlock")},(0,d.jsxs)(u,{...e,children:[(0,d.jsx)(x,{selected:"",options:[{label:"Provider",value:""}],onChange:()=>{}},"gateways_radio_control"),(0,d.jsx)("div",{className:"inside-block-options",children:(0,d.jsx)(C,{label:"Calculated value from meta field",help:s.value_from_meta,value:n.calculated_value_from_key,onChange:e=>{l({calculated_value_from_key:e})}},"calculated_value_from_key")})]},p("FieldWrapper")))]},P=JSON.parse('{"apiVersion":2,"name":"jet-forms/appointment-provider","category":"jet-form-builder-fields","icon":"<svg width=\\"25\\" height=\\"24\\" viewBox=\\"0 0 25 24\\" fill=\\"none\\" xmlns=\\"http://www.w3.org/2000/svg\\"><path d=\\"M15.6522 3.14024H2.34781C1.79552 3.14024 1.34781 3.58796 1.34781 4.14024V17.75C1.34781 18.3023 1.79552 18.75 2.34781 18.75H15.6522C16.2044 18.75 16.6522 18.3023 16.6522 17.75V4.14024C16.6522 3.58796 16.2044 3.14024 15.6522 3.14024Z\\" fill=\\"white\\" stroke=\\"#162B40\\" stroke-width=\\"0.75\\"/><path d=\\"M1.375 3.75C1.375 3.40482 1.65482 3.125 2 3.125H16C16.3452 3.125 16.625 3.40482 16.625 3.75V6.66768H1.375V3.75Z\\" fill=\\"#4AF3BA\\" stroke=\\"#162B40\\" stroke-width=\\"0.75\\"/><path d=\\"M13.6575 18.4716L13.6605 18.468C13.8511 18.2315 14.0882 18.0869 14.3836 18.0272L16.8213 17.5921C17.2103 17.5314 17.561 17.3406 17.6677 16.9295L17.6685 16.9266C17.7322 16.6717 17.7661 16.427 17.7661 16.1941V15.946L17.5333 15.8684C17.2794 15.7838 17.045 15.65 16.8288 15.4637C16.6126 15.2618 16.426 15.034 16.2686 14.7798C16.1095 14.5144 15.9845 14.2344 15.8932 13.9391C15.8103 13.6441 15.7702 13.3612 15.7702 13.0897V11.5188C15.7702 11.2321 15.86 10.9412 16.0599 10.6407C16.2684 10.3398 16.5092 10.142 16.7802 10.0291L18.9716 9.15804L18.9724 9.15777C19.0866 9.11327 19.1844 9.11543 19.2841 9.15616L19.2864 9.15712L19.2888 9.15804C19.4078 9.20457 19.484 9.27461 19.5352 9.37175L19.7964 9.8813L19.8857 10.0556L20.0795 10.0658C20.4668 10.0862 20.7896 10.2353 21.0633 10.5225L21.0662 10.5255L21.0691 10.5284C21.3461 10.8053 21.4798 11.129 21.4798 11.5188V13.0897C21.4798 13.3684 21.4359 13.6541 21.3455 13.9477L21.3443 13.9516L21.3432 13.9555C21.2601 14.2499 21.1393 14.5292 20.9802 14.7942C20.8237 15.0548 20.6348 15.2803 20.4132 15.4723L20.4111 15.4742L20.4089 15.476C20.2015 15.6619 19.9714 15.796 19.7167 15.8809L19.4839 15.9584V16.2065C19.4839 16.4397 19.5179 16.6812 19.5823 16.9295C19.689 17.3406 20.0397 17.5313 20.4285 17.5921L22.8865 18.033C23.1692 18.0961 23.4048 18.2389 23.5895 18.468C23.7791 18.6967 23.875 18.9588 23.875 19.2611V21.0689C23.875 21.0724 23.8748 21.0745 23.8746 21.0755L23.8738 21.0766C23.8725 21.0783 23.8696 21.0818 23.864 21.0869L23.8506 21.0989L23.8387 21.1122C23.8373 21.1137 23.8361 21.115 23.835 21.1161C23.8319 21.1192 23.8295 21.1211 23.8282 21.1222C23.8272 21.1229 23.8261 21.1236 23.8261 21.1236L23.8255 21.1239L23.8242 21.1242C23.8231 21.1245 23.82 21.125 23.8145 21.125H13.4355C13.4241 21.125 13.412 21.1246 13.3866 21.0992C13.379 21.0917 13.3773 21.0873 13.3773 21.0873C13.3773 21.0873 13.375 21.0818 13.375 21.0689V19.2611C13.375 18.9588 13.4679 18.7003 13.6575 18.4716Z\\" fill=\\"white\\" stroke=\\"#162B40\\" stroke-width=\\"0.75\\"/><path d=\\"M3.625 2.40385C3.625 2.18081 3.80581 2 4.02885 2C4.25188 2 4.43269 2.18081 4.43269 2.40385V4.07115C4.43269 4.29419 4.25188 4.475 4.02885 4.475C3.80581 4.475 3.625 4.29419 3.625 4.07115V2.40385Z\\" fill=\\"#162B40\\"/><path d=\\"M13.625 2.40385C13.625 2.18081 13.8058 2 14.0288 2C14.2519 2 14.4327 2.18081 14.4327 2.40385V4.07115C14.4327 4.29419 14.2519 4.475 14.0288 4.475C13.8058 4.475 13.625 4.29419 13.625 4.07115V2.40385Z\\" fill=\\"#162B40\\"/><rect x=\\"3.5\\" y=\\"13.875\\" width=\\"2.5\\" height=\\"2.5\\" rx=\\"0.25\\" fill=\\"white\\" stroke=\\"#162B40\\" stroke-width=\\"0.5\\"/><rect x=\\"7.625\\" y=\\"13.875\\" width=\\"2.5\\" height=\\"2.5\\" rx=\\"0.25\\" fill=\\"white\\" stroke=\\"#162B40\\" stroke-width=\\"0.5\\"/><rect x=\\"11.75\\" y=\\"13.875\\" width=\\"2.5\\" height=\\"2.5\\" rx=\\"0.25\\" fill=\\"#4AF3BA\\" stroke=\\"#162B40\\" stroke-width=\\"0.5\\"/><rect x=\\"7.625\\" y=\\"9.75\\" width=\\"2.5\\" height=\\"2.5\\" rx=\\"0.25\\" fill=\\"white\\" stroke=\\"#162B40\\" stroke-width=\\"0.5\\"/><rect x=\\"3.5\\" y=\\"9.75\\" width=\\"2.5\\" height=\\"2.5\\" rx=\\"0.25\\" fill=\\"white\\" stroke=\\"#162B40\\" stroke-width=\\"0.5\\"/><rect x=\\"11.75\\" y=\\"9.75\\" width=\\"2.5\\" height=\\"2.5\\" rx=\\"0.25\\" fill=\\"white\\" stroke=\\"#162B40\\" stroke-width=\\"0.5\\"/></svg>","keywords":["field","provider","appointment-provider","booking","appointment"],"textdomain":"jet-form-builder","supports":{"customClassName":false,"html":false},"attributes":{"calculated_value_from_key":{"type":"string","default":""},"appointment_service_field":{"type":"string","default":""},"appointment_form_field":{"type":"string","default":""},"appointment_service_id":{"type":"string","default":""},"appointment_provider_custom_template":{"type":"boolean","default":false},"appointment_provider_custom_template_id":{"type":"string","default":""},"switch_on_change":{"type":"boolean","default":false},"label":{"type":"string","default":""},"name":{"type":"string","default":"field_name"},"desc":{"type":"string","default":""},"default":{"type":"string","default":""},"required":{"type":"boolean","default":false},"add_prev":{"type":"boolean","default":false},"prev_label":{"type":"string","default":""},"visibility":{"type":"string","default":""},"class_name":{"type":"string","default":""},"className":{"type":"string","default":""},"placeholder":{"type":"string","default":""}}}'),{__:S}=wp.i18n,{name:L,icon:V}=P,A={title:S("Appointment Provider"),icon:(0,d.jsx)("span",{dangerouslySetInnerHTML:{__html:V}}),edit:F,useEditProps:["uniqKey","blockName","attrHelp"],example:{attributes:{label:"Appointment Provider",desc:"Field description..."}}},{__:H}=wp.i18n,T={appointment_provider_field:H("Get Provider ID From:","jet-appointments-booking"),appointment_provider_form_field:H("Select Provider Field:","jet-appointments-booking"),appointment_provider_id:H("Set Provider ID:","jet-appointments-booking"),slot_auto_check:H("Auto-Select Single Slot","jet-appointments-booking"),validation_notice:H("To pre-validate whether the selected appointment time or slot can be booked, go to the Validation section → Advanced and add the “Server-side callback” rule with the “Is appointment allowed” callback.","jet-appointments-booking"),...r},I={slot_auto_check_help:H("Skip the slot selection step when only one time slot is available.","jet-appointments-booking")},{AdvancedFields:M,EditAdvancedRulesButton:O,ValidationToggleGroup:N,ValidationBlockMessage:D,GeneralFields:E,ToolBarFields:Z,FieldWrapper:J,HorizontalLine:R}=JetFBComponents,{useIsAdvancedValidation:G}=JetFBHooks,{Tools:{withPlaceholder:W},getFieldsWithoutCurrent:q}=JetFBActions,{TextControl:K,SelectControl:U,PanelBody:z,ToggleControl:$,Notice:Y}=wp.components,{__:Q}=wp.i18n,{InspectorControls:X,useBlockProps:ee}=wp.blockEditor,{RawHTML:te}=wp.element;const ie=function(e){const t=ee(),i=q("--"),o=G(),{static_calendar:n}=window.JetAppointmentDateField,{attributes:l,setAttributes:r,isSelected:p,editProps:{uniqKey:s}}=e;return[(0,d.jsx)(Z,{...e},s("ToolBarFields")),p&&(0,d.jsxs)(X,{children:[(0,d.jsx)(E,{...e},s("GeneralFields")),(0,d.jsxs)(z,{title:Q("Validation","jet-form-builder"),children:[(0,d.jsx)(N,{}),o&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(O,{}),(0,d.jsx)(D,{name:"empty"})]})]}),(0,d.jsxs)(z,{title:Q("Field Settings"),children:[(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(Y,{status:"info",isDismissible:!1,children:T.validation_notice})}),(0,d.jsx)(U,{label:T.appointment_service_field,labelPosition:"top",value:l.appointment_service_field,onChange:e=>{r({appointment_service_field:e})},options:W(a.appointment_service_field)}),"form_field"===l.appointment_service_field&&(0,d.jsx)(U,{label:T.appointment_form_field,labelPosition:"top",value:l.appointment_form_field,onChange:e=>{r({appointment_form_field:e})},options:i}),"manual_input"===l.appointment_service_field&&(0,d.jsx)(K,{label:T.appointment_service_id,value:l.appointment_service_id,onChange:e=>{r({appointment_service_id:e})}}),(0,d.jsx)(R,{}),(0,d.jsx)(U,{label:T.appointment_provider_field,labelPosition:"top",value:l.appointment_provider_field,onChange:e=>{r({appointment_provider_field:e})},options:W(a.appointment_service_field)}),"form_field"===l.appointment_provider_field&&(0,d.jsx)(U,{label:T.appointment_provider_form_field,labelPosition:"top",value:l.appointment_provider_form_field,onChange:e=>{r({appointment_provider_form_field:e})},options:i}),"manual_input"===l.appointment_provider_field&&(0,d.jsx)(K,{label:T.appointment_provider_id,value:l.appointment_provider_id,onChange:e=>{r({appointment_provider_id:e})}}),(0,d.jsx)($,{label:T.slot_auto_check,help:I.slot_auto_check_help,checked:l.slot_auto_check,onChange:e=>{r({slot_auto_check:e})}})]},s("PanelBody")),(0,d.jsx)(M,{...e},s("AdvancedFields"))]},s("InspectorControls")),(0,_.createElement)("div",{...t,key:s("viewBlock")},(0,d.jsx)(J,{...e,children:(0,d.jsx)(te,{children:n})},s("FieldWrapper")))]},oe=JSON.parse('{"apiVersion":2,"name":"jet-forms/appointment-date","category":"jet-form-builder-fields","icon":"<svg width=\\"24\\" height=\\"24\\" viewBox=\\"0 0 24 24\\" fill=\\"none\\" xmlns=\\"http://www.w3.org/2000/svg\\">\\n<rect x=\\"0.375\\" y=\\"3\\" width=\\"15.75\\" height=\\"14.25\\" rx=\\"0.625\\" fill=\\"white\\" stroke=\\"#162B40\\" stroke-width=\\"0.75\\"/>\\n<path d=\\"M1 3H15.5C15.8452 3 16.125 3.27982 16.125 3.625V6H0.375V3.625C0.375 3.27982 0.654822 3 1 3Z\\" fill=\\"white\\" stroke=\\"#162B40\\" stroke-width=\\"0.75\\"/>\\n<rect x=\\"12\\" y=\\"10.2\\" width=\\"11.625\\" height=\\"10.8\\" rx=\\"0.625\\" fill=\\"white\\" stroke=\\"#162B40\\" stroke-width=\\"0.75\\"/>\\n<path d=\\"M12 10.75C12 10.4048 12.2798 10.125 12.625 10.125H23C23.3452 10.125 23.625 10.4048 23.625 10.75V13.5H12V10.75Z\\" fill=\\"#4AF3BA\\" stroke=\\"#162B40\\" stroke-width=\\"0.75\\"/>\\n<path d=\\"M14.4808 9.47596C14.4808 9.2131 14.6939 9 14.9567 9C15.2196 9 15.4327 9.2131 15.4327 9.47596V10.999C15.4327 11.2619 15.2196 11.475 14.9567 11.475C14.6939 11.475 14.4808 11.2619 14.4808 10.999V9.47596Z\\" fill=\\"#162B40\\"/>\\n<path d=\\"M20.1923 9.47596C20.1923 9.2131 20.4054 9 20.6683 9C20.9311 9 21.1442 9.2131 21.1442 9.47596V10.999C21.1442 11.2619 20.9311 11.475 20.6683 11.475C20.4054 11.475 20.1923 11.2619 20.1923 10.999V9.47596Z\\" fill=\\"#162B40\\"/>\\n<rect x=\\"2.625\\" y=\\"7.875\\" width=\\"11.25\\" height=\\"0.75\\" rx=\\"0.375\\" fill=\\"#162B40\\"/>\\n<rect x=\\"1.875\\" y=\\"4.125\\" width=\\"0.75\\" height=\\"0.75\\" rx=\\"0.375\\" fill=\\"#162B40\\"/>\\n<rect x=\\"3\\" y=\\"4.125\\" width=\\"0.75\\" height=\\"0.75\\" rx=\\"0.375\\" fill=\\"#162B40\\"/>\\n<rect x=\\"4.125\\" y=\\"4.125\\" width=\\"0.75\\" height=\\"0.75\\" rx=\\"0.375\\" fill=\\"#162B40\\"/>\\n<rect x=\\"2.625\\" y=\\"12.375\\" width=\\"7.5\\" height=\\"0.75\\" rx=\\"0.375\\" fill=\\"#162B40\\"/>\\n<path d=\\"M2.625 10.5C2.625 10.2929 2.79289 10.125 3 10.125H9.75C9.95711 10.125 10.125 10.2929 10.125 10.5C10.125 10.7071 9.95711 10.875 9.75 10.875H3C2.79289 10.875 2.625 10.7071 2.625 10.5Z\\" fill=\\"#162B40\\"/>\\n<path d=\\"M2.625 15C2.625 14.7929 2.79289 14.625 3 14.625H9.75C9.95711 14.625 10.125 14.7929 10.125 15C10.125 15.2071 9.95711 15.375 9.75 15.375H3C2.79289 15.375 2.625 15.2071 2.625 15Z\\" fill=\\"#162B40\\"/>\\n</svg>\\n","keywords":["field","date","appointment-date","booking","appointment","calendar"],"textdomain":"jet-form-builder","supports":{"customClassName":false,"html":false},"attributes":{"validation":{"type":"object","default":{}},"appointment_service_field":{"type":"string","default":""},"appointment_form_field":{"type":"string","default":""},"appointment_service_id":{"type":"string","default":""},"appointment_provider_field":{"type":"string","default":""},"appointment_provider_form_field":{"type":"string","default":""},"appointment_provider_id":{"type":"string","default":""},"label":{"type":"string","default":""},"name":{"type":"string","default":"field_name"},"desc":{"type":"string","default":""},"default":{"type":"string","default":""},"required":{"type":"boolean","default":false},"add_prev":{"type":"boolean","default":false},"slot_auto_check":{"type":"boolean","default":false},"prev_label":{"type":"string","default":""},"visibility":{"type":"string","default":""},"class_name":{"type":"string","default":""},"className":{"type":"string","default":""}}}'),{__:ne}=wp.i18n,{name:le,icon:ae}=oe,re={title:ne("Appointment Date"),icon:(0,d.jsx)("span",{dangerouslySetInnerHTML:{__html:ae}}),edit:ie,useEditProps:["uniqKey","blockName","attrHelp"],example:{attributes:{label:"Appointment Date",desc:"Field description..."}}};(0,window.wp.hooks.addFilter)("jet.fb.register.fields","jet-form-builder",e=>(e.push(o,n),e))})();