1(()=>{"use strict";var e={n:t=>{var a=t&&t.__esModule?()=>t.default:()=>t;return e.d(a,{a}),a},d:(t,a)=>{for(var s in a)e.o(a,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:a[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.React,a=window.wp.element,s=window.wp.apiFetch;var n=e.n(s);const l=()=>{const[e,s]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{const t=document.querySelector(".wps-bfw_main");t&&t.classList.toggle("card-view-order",e)},[e]),(0,t.createElement)("div",{className:"wps-bfw_f-s-toggle"},(0,t.createElement)("span",null,wpsBfwData.listText),(0,t.createElement)("input",{type:"checkbox",checked:e,onChange:()=>s(e=>!e)}),(0,t.createElement)("span",null,wpsBfwData.gridText))},r=({value:e,onChange:a})=>{const s=window.wpsBfwData?.orderStatuses||{};return(0,t.createElement)("select",{id:"wps-bfw_f-order-status",value:e,onChange:e=>a(e.target.value)},(0,t.createElement)("option",{value:""},wpsBfwData.allOrdersText),Object.entries(s).map(([e,a])=>(0,t.createElement)("option",{key:e,value:e},a)))},o=()=>(0,t.createElement)("svg",{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("path",{d:"M6.02447 0.463526C6.17415 0.00287056 6.82585 0.00286996 6.97553 0.463525L8.0716 3.83688C8.13854 4.04289 8.33051 4.18237 8.54713 4.18237H12.0941C12.5784 4.18237 12.7798 4.80218 12.388 5.08688L9.51843 7.17173C9.34318 7.29905 9.26985 7.52474 9.33679 7.73075L10.4329 11.1041C10.5825 11.5648 10.0553 11.9478 9.66344 11.6631L6.79389 9.57827C6.61865 9.45095 6.38135 9.45095 6.20611 9.57827L3.33656 11.6631C2.9447 11.9478 2.41746 11.5648 2.56714 11.1041L3.66321 7.73075C3.73015 7.52474 3.65682 7.29905 3.48157 7.17173L0.612025 5.08688C0.220169 4.80218 0.421556 4.18237 0.905918 4.18237H4.45287C4.66949 4.18237 4.86146 4.04289 4.9284 3.83688L6.02447 0.463526Z",fill:"#FC9918"})),c=()=>(0,t.createElement)("svg",{className:"wps-bfw_f-s-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("path",{d:"M9.16667 15.8333C12.8486 15.8333 15.8333 12.8486 15.8333 9.16667C15.8333 5.48477 12.8486 2.5 9.16667 2.5C5.48477 2.5 2.5 5.48477 2.5 9.16667C2.5 12.8486 5.48477 15.8333 9.16667 15.8333Z",stroke:"#e0e0e0",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,t.createElement)("path",{d:"M17.5 17.5L13.875 13.875",stroke:"#e0e0e0",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),w=()=>(0,t.createElement)("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("path",{d:"M19.3004 3.99219H5.3004C4.19583 3.99219 3.3004 4.88762 3.3004 5.99219V19.9922C3.3004 21.0968 4.19583 21.9922 5.3004 21.9922H19.3004C20.405 21.9922 21.3004 21.0968 21.3004 19.9922V5.99219C21.3004 4.88762 20.405 3.99219 19.3004 3.99219Z",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,t.createElement)("path",{d:"M16.3004 1.99219V5.99219",stroke:"black",strokeWidth:"2",strokeLinecap:"round"}),(0,t.createElement)("path",{d:"M8.3004 1.99219V5.99219",stroke:"black",strokeWidth:"2",strokeLinecap:"round"}),(0,t.createElement)("path",{d:"M3.3004 9.99219H21.3004",stroke:"black",strokeWidth:"2",strokeLinecap:"round"})),d=()=>(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false"},(0,t.createElement)("path",{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));function m(){const[e,s]=(0,a.useState)([]),[m,i]=(0,a.useState)(!0),[p,u]=(0,a.useState)(""),[f,h]=(0,a.useState)(!1),[E,b]=(0,a.useState)(""),g=(0,a.useMemo)(()=>{let t=e;if(E&&(t=t.filter(e=>e.status===E)),p.trim()){const e=p.toLowerCase();t=t.filter(t=>Object.values(t).join(" ").toLowerCase().includes(e))}return t},[e,E,p]),[v,_]=(0,a.useState)(4);(0,a.useEffect)(()=>{_(4)},[E,p]);const k=(0,a.useMemo)(()=>g.slice(0,v),[g,v]),N=`Showing ${k.length} of ${g.length} orders`;return(0,a.useEffect)(()=>{console.log("Selected status:",E)},[E]),(0,a.useEffect)(()=>{n()({path:"/wps-bfw/v1/bookings"}).then(e=>{s(e),i(!1)})}
1,[]),m?(0,t.createElement)("p",null,"Loading bookings..."):(0,t.createElement)("div",{className:"wps-bfw_main",id:"wps-bfw_main"},(0,t.createElement)("div",{className:"wps-bfw_header"},(0,t.createElement)("h3",{className:"wps-bfw_h-title"},"Bookings Dashboard"),(0,t.createElement)("p",{className:"wps-bfw_h-desc"},wpsBfwData.dashboardMsgl1,(0,t.createElement)("br",null),wpsBfwData.dashboardMsgl2)),(0,t.createElement)("div",{className:"wps-bfw_filters"},(0,t.createElement)(r,{value:E,onChange:b}),(0,t.createElement)("div",{className:"wps-bfw_f-search-box"},(0,t.createElement)(c,null),(0,t.createElement)("input",{type:"text",placeholder:N,className:"wps-bfw_f-search-input",value:p,onChange:e=>u(e.target.value)}),(0,t.createElement)(l,null))),(0,t.createElement)("div",{className:"wps-bfw_orders"},(0,t.createElement)("ul",null,k.map((e,a)=>(0,t.createElement)("li",{className:e.status},(0,t.createElement)("img",{src:e.image,alt:"Room"}),(0,t.createElement)("div",{className:"wps-bfw_o-desc"},(0,t.createElement)("div",{className:"wps-bfw_od-header"},(0,t.createElement)("a",{href:e.product_url,className:"h4 wps-bfw_od-title"},e.product),0!=e.product_rating&&(0,t.createElement)("div",{className:"wps-bfw_odh-rate"},(0,t.createElement)(o,null),(0,t.createElement)("span",null,e.product_rating))),(0,t.createElement)("div",{className:"wps-bfw_od-loc-date"},(0,t.createElement)("a",{href:"#",className:"wps-bfw_od-locate"},wpsBfwData.orderIdText,": ",e.order_id),(0,t.createElement)("div",{className:"wps-bfw_od-locate wps-bfw_od-date"},(0,t.createElement)(w,null),(0,t.createElement)("span",null,e.booking))),(0,t.createElement)("div",{className:"wps-bfw_od-loc-status"},(0,t.createElement)("a",{href:"#",className:"wps-bfw_od-locate"},wpsBfwData.statusText,": ",e.status)),(0,t.createElement)("div",{className:"p wps-bfw_od-desc"},e.short_desc),(0,t.createElement)("div",{className:"wps-bfw_od-pay-cancel"},(0,t.createElement)("div",{className:"wps-bfw_od-pay"},wpsBfwData.paymentMethodText,":",(0,t.createElement)("span",{className:"offline"},e.payment_method)),e.calendar_url&&(0,t.createElement)("a",{href:e.calendar_url,className:"button",style:{marginBottom:"5px"},target:"_blank",rel:"noopener noreferrer"},"+ ",wpsBfwData.addToCalendarText)),(0,t.createElement)("div",{className:"wps-bfw_od-view-price"},(0,t.createElement)("div",{className:"wps-bfw_od-view-cancel-buttons"},(0,t.createElement)("input",{type:"button",value:wpsBfwData.viewOrderText,className:"wps-bfw_od-view",onClick:()=>window.location.href=e.view_order_url}),e.can_cancel&&e.cancel_allowed&&(0,t.createElement)("input",{type:"button",value:wpsBfwData.cancelBookingText,id:"wps_bfw_cancel_order","data-product":e.product_id,"data-order":e.order_id,className:"wps-bfw_od-d-can-input wps-bfw_od-cancel-button"})),(0,t.createElement)("div",{className:"wps-bfw_od-price"},e.total)))))),0===e.length&&(0,t.createElement)("div",{id:"no-orders-msg",class:"woocommerce-Message woocommerce-Message--info wps-bfw-empty-state"},(0,t.createElement)("span",null,(0,t.createElement)(d,null)),(0,t.createElement)("span",{class:"wps-bfw-empty-text"},wpsBfwData.nobookingmsg),(0,t.createElement)("a",{class:"woocommerce-Button button wps-bfw-empty-action",href:wpsBfwData.shopPageUrl},wpsBfwData.bookNowText)),0!==e.length&&0===g.length&&(0,t.createElement)("div",{id:"no-orders-msg",class:"woocommerce-Message woocommerce-Message--info wps-bfw-empty-state"},(0,t.createElement)("span",null,(0,t.createElement)(d,null)),(0,t.createElement)("span",{class:"wps-bfw-empty-text"},wpsBfwData.noBookingFilterMsg)),v<g.length&&(0,t.createElement)("button",{id:"wps-load-more-btn",className:"wps-load-more",onClick:()=>_(e=>e+4)},wpsBfwData.loadMoreText)))}document.addEventListener("DOMContentLoaded",()=>{const e=document.getElementById("mwb-booking-root");e&&(0,a.createRoot)(e).render((0,t.createElement)(m,null))})})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.