{"version":3,"file":"Book_button.7rbgR-Rp.mjs","names":["useState","useStore","useState"],"sources":["https:/framerusercontent.com/modules/j4jpyA8J5ZOdZrYpFSm7/T6sqZC4ef6jqbSCRxNAh/Mews_integration.js","https:/framerusercontent.com/modules/5PwpCO5YxxGt1MKhSBUJ/Y2N8K0brVTCScFh3gria/Avvio_integration.js","https:/framerusercontent.com/modules/suYg7ALXWasn4MpwOXag/JaTKqJzcgFXAlUL8t3TG/Component_protection.js","https:/framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js","https:/framer.com/m/framer/store.js@^1.0.0","https:/framerusercontent.com/modules/AfJKZyb5rFSw4TwJkMwh/U7FHCxVgUhEtCIXviqHD/Override_mews.js","https:/framerusercontent.com/modules/YdzI1knTpMjudyd9i2wq/H37ArRHXHnvrG0j5Ir9I/Book_button.js"],"sourcesContent":["import{RenderTarget}from\"framer\";import{useEffect,useState}from\"react\";// ------------------------------------------------- //\n// DEEPLINK BOOKING\n// ------------------------------------------------- //\nexport const handleMewsDeeplinkBooking=({mewsDistributorId,mewsBaseUrl,defaultLanguage,isDemo,checkIn,checkOut,adults,children,missingDatesOpenStep,roomId,voucherCode})=>{const mewsRoute=missingDatesOpenStep===\"rooms\"?\"rooms\":checkIn&&checkOut?\"rooms\":roomId?\"rates\":\"\";const params=new URLSearchParams({mewsStart:checkIn?formatDateForMews(checkIn):\"\",mewsEnd:checkOut?formatDateForMews(checkOut):\"\",mewsAdultCount:adults?adults.toString():\"\",mewsChildCount:children?children.toString():\"\",language:defaultLanguage,mewsRoute:mewsRoute,mewsRoom:roomId?roomId:\"\",mewsVoucherCode:voucherCode?voucherCode:\"\"});const mewsUrl=isDemo?\"https://app.mews-demo.com/distributor\":mewsBaseUrl;const bookingUrl=`${mewsUrl}/${mewsDistributorId}?${params.toString()}`;window.open(bookingUrl,\"_blank\");};// ------------------------------------------------- //\n// IFRAME BOOKING\n// ------------------------------------------------- //\nexport const useInitializeMewsScript=({isDemo,isIframeIntegration,mewsDistributorId})=>{// @eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst[mewsApi,setMewsApi]=useState(null);const isOnFramerCanvas=RenderTarget.hasRestrictions();useEffect(()=>{if(!isIframeIntegration&&isOnFramerCanvas)return;// Create and load the Mews script\nconst script=document.createElement(\"script\");script.src=\"https://api.mews.com/distributor/distributor.min.js\";script.async=false;script.onload=()=>{// Initialize Mews Distributor after script loads\nwindow.Mews.Distributor({configurationIds:[mewsDistributorId]},api=>{setMewsApi(api);},{dataBaseUrl:isDemo?\"https://api.mews-demo.com\":\"https://api.mews.com\"});};document.head.appendChild(script);// Cleanup\nreturn()=>{document.head.removeChild(script);};},[isDemo,mewsDistributorId,isIframeIntegration,isOnFramerCanvas]);return mewsApi;};export const handleMewsIframeBooking=({mewsApi,checkinDate,checkoutDate,adults,children,missingDatesOpenStep,roomId,voucherCode})=>{if(!mewsApi)return;// Store the currently focused element\nconst previouslyFocusedElement=document.activeElement;// Create overlay if it doesn't exist\nlet overlay=document.querySelector(\".mews-overlay\");if(!overlay){overlay=document.createElement(\"div\");overlay.className=\"mews-overlay\";document.body.appendChild(overlay);}// Function to clean up overlay and body class\nconst cleanup=()=>{overlay?.classList.remove(\"active\");document.body.classList.remove(\"mews-iframe-active\");// Restore focus to the previously focused element\nif(previouslyFocusedElement instanceof HTMLElement){previouslyFocusedElement.focus();}};// Add event listener to close on overlay click\nconst handleOverlayClick=()=>{mewsApi.close();cleanup();};overlay.addEventListener(\"click\",handleOverlayClick);// Function to find the active iframe\nconst findActiveIframe=()=>{const iframes=document.querySelectorAll(\"iframe.mews-distributor\");return Array.from(iframes).find(iframe=>iframe.hasAttribute(\"title\"));};// Keep track of previous opacity value\nlet wasVisible=false;// Set up mutation observer for the document body\nconst observer=new MutationObserver(()=>{const activeIframe=findActiveIframe();if(activeIframe){const container=activeIframe.parentElement;if(container){const iframeOpacity=parseFloat(getComputedStyle(activeIframe).opacity);const isVisible=iframeOpacity>=.9;// Focus the iframe when it becomes visible\nif(!wasVisible&&isVisible){activeIframe.setAttribute(\"tabindex\",\"0\");// @ts-expect-error - focus is not typed\nactiveIframe.focus({preventScroll:true});}// Only cleanup if iframe was previously visible and is now hidden\nif(wasVisible&&!isVisible){cleanup();observer.disconnect();}// Update visibility state for next check\nwasVisible=isVisible;}}});// Start observing the document body for changes\nobserver.observe(document.body,{childList:true,subtree:true,attributes:true,attributeFilter:[\"style\",\"class\"]});const{startDate,endDate}=formatDateForIframe({checkinDateFormatted:checkinDate?formatDateForMews(checkinDate):\"\",checkoutDateFormatted:checkoutDate?formatDateForMews(checkoutDate):\"\"});mewsApi.setStartDate(startDate);mewsApi.setEndDate(endDate);if(adults){mewsApi.setAdultCount(adults);}if(children){mewsApi.setChildCount(children);}if(voucherCode&&voucherCode!==\"\"){mewsApi.setVoucherCode(voucherCode);}// Show overlay and add body class\noverlay.classList.add(\"active\");document.body.classList.add(\"mews-iframe-active\");mewsApi.open();if(checkinDate&&checkoutDate){mewsApi.showRooms();}else if(missingDatesOpenStep===\"rooms\"){mewsApi.showRooms();}else if(roomId){mewsApi.showRates(roomId);}// Clean up event listener and observer when component unmounts\nreturn()=>{overlay?.removeEventListener(\"click\",handleOverlayClick);observer.disconnect();cleanup();};};const formatDateForIframe=({checkinDateFormatted,checkoutDateFormatted})=>{const[startYear,startMonth,startDay]=checkinDateFormatted.split(\"-\");const[endYear,endMonth,endDay]=checkoutDateFormatted.split(\"-\");const startDate=new Date(parseInt(startYear),parseInt(startMonth)-1,parseInt(startDay));const endDate=new Date(parseInt(endYear),parseInt(endMonth)-1,parseInt(endDay));return{startDate,endDate};};export function getMewsIframeStyle({maxWidth,maxHeight,borderRadius,shadowColor,paddingTop}){return`\n    /* Overlay styles */\n    body.mews-iframe-active {\n      overflow: hidden;\n    }\n\n    .mews-overlay {\n      position: fixed;\n      top: 0;\n      left: 0;\n      right: 0;\n      bottom: 0;\n      background-color: rgba(0, 0, 0, 0.5);\n      z-index: 9998;\n      display: none;\n    }\n\n    .mews-overlay.active {\n      display: block;\n    }\n\n    /* Iframe container styles */\n    .mews-distributor {\n      position: fixed;\n      top: 50%;\n      left: 50%;\n      transform: translate(-50%, -50%);\n      max-width: ${maxWidth}vw;\n      max-height: ${maxHeight}vh;\n      width: 100%;\n      margin: auto;\n      border-radius: ${borderRadius}px;\n      box-shadow: 0 4px 12px ${shadowColor};\n      padding-top: ${paddingTop}px;\n      z-index: 9999;\n      background-color: white;\n    }\n\n    @media (max-width: 768px) {\n      .mews-distributor {\n        max-width: ${maxWidth}vw;\n        max-height: ${maxHeight}vh;\n        width: ${maxWidth}vw;\n        height: ${maxHeight}vh;\n        border-radius: ${borderRadius}px;\n        box-shadow: 0 4px 12px ${shadowColor};\n        padding-top: ${paddingTop}px;\n      }\n    }\n`;}const formatDateForMews=dateString=>{// Split the date string into components\nconst[month,day,year]=dateString.split(\" \");// Create a map of month abbreviations to numbers\nconst months={Jan:\"01\",Feb:\"02\",Mar:\"03\",Apr:\"04\",May:\"05\",Jun:\"06\",Jul:\"07\",Aug:\"08\",Sep:\"09\",Oct:\"10\",Nov:\"11\",Dec:\"12\"};// Format day to ensure two digits\nconst formattedDay=day.replace(\",\",\"\").padStart(2,\"0\");// Construct the date string in YYYY-MM-DD format\nreturn`${year}-${months[month]}-${formattedDay}`;};\nexport const __FramerMetadata__ = {\"exports\":{\"handleMewsIframeBooking\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getMewsIframeStyle\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useInitializeMewsScript\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"handleMewsDeeplinkBooking\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Mews_integration.map","// ------------------------------------------------- //\n// AVVIO DEEPLINK BOOKING\n// ------------------------------------------------- //\nexport const handleAvvioDeeplinkBooking=({avvioSiteId,checkIn,checkOut,adults,children,voucherCode,roomId})=>{// Calculate nights from check-in and check-out dates\nconst nights=checkIn&&checkOut?calculateNights(checkIn,checkOut):1;const params=new URLSearchParams({checkin:checkIn?formatDateForAvvio(checkIn):\"\",nights:nights.toString(),totalAdults:adults?adults.toString():\"1\",totalChildren:children?children.toString():\"0\",promotionCode:voucherCode||\"\",// fw_submitted: \"1\",\n// av: \"search\",\nroomIDs:roomId||\"\"});// Remove empty parameters to clean up the URL\nconst cleanParams=new URLSearchParams;params.forEach((value,key)=>{if(value!==\"\"&&value!==\"0\"&&!(key===\"voucherCode\"&&value===\"\")){cleanParams.append(key,value);}});const bookingUrl=`https://ar.avvio.com/convert/site/${encodeURIComponent(avvioSiteId)}/en/results.php?${cleanParams.toString()}`;window.open(bookingUrl,\"_blank\");};// ------------------------------------------------- //\n// HELPER FUNCTIONS\n// ------------------------------------------------- //\nconst formatDateForAvvio=dateString=>{// Convert from \"Jan 15, 2024\" format to \"2024-01-15\" format\nconst[month,day,year]=dateString.split(\" \");// Create a map of month abbreviations to numbers\nconst months={Jan:\"01\",Feb:\"02\",Mar:\"03\",Apr:\"04\",May:\"05\",Jun:\"06\",Jul:\"07\",Aug:\"08\",Sep:\"09\",Oct:\"10\",Nov:\"11\",Dec:\"12\"};// Format day to ensure two digits\nconst formattedDay=day.replace(\",\",\"\").padStart(2,\"0\");// Construct the date string in YYYY-MM-DD format\nreturn`${year}-${months[month]}-${formattedDay}`;};const calculateNights=(checkIn,checkOut)=>{// Parse dates and calculate the difference in days\nconst checkInDate=new Date(formatDateForAvvio(checkIn));const checkOutDate=new Date(formatDateForAvvio(checkOut));const timeDifference=checkOutDate.getTime()-checkInDate.getTime();const daysDifference=Math.ceil(timeDifference/(1e3*3600*24));return Math.max(1,daysDifference);// Ensure at least 1 night\n};\nexport const __FramerMetadata__ = {\"exports\":{\"handleAvvioDeeplinkBooking\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Avvio_integration.map","import{jsx as _jsx}from\"react/jsx-runtime\";const ALLOWED_DOMAINS=[\"localhost\",\"booking-widget-byehotelier.framer.website\"];const ALLOWED_DOMAIN_PATTERNS=[\"framercanvas.com\",\"framer.app\",\"framer.website\",\"victorianhotel.ca\"];const useComponentProtection=()=>{if(typeof window===\"undefined\")return true;// Allow during SSR\nconst{hostname}=window.location;// Check exact domain matches\nif(ALLOWED_DOMAINS.includes(hostname)){return true;}// Check domain patterns (domains ending with specified patterns)\nreturn ALLOWED_DOMAIN_PATTERNS.some(pattern=>hostname.endsWith(`.${pattern}`));};export default function NotAllowedComponent(){return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",minWidth:\"fit-content\",minHeight:\"fit-content\",maxHeight:\"200px\",backgroundColor:\"#ff4444\",color:\"white\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",fontFamily:\"sans-serif\",fontSize:\"14px\",fontWeight:\"bold\",textAlign:\"center\",border:\"2px solid #cc0000\",padding:\"12px\"},children:\"🔒 Access Not Allowed. Please contact byeHotelier.\"});}export{useComponentProtection};\nexport const __FramerMetadata__ = {\"exports\":{\"useComponentProtection\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"NotAllowedComponent\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Component_protection.map","import{useState,useEffect}from\"react\";import{Data,useObserveData}from\"framer\";export function createStore(state1){// Use Data so that a Preview reload resets the state\nconst dataStore=Data({state:Object.freeze({...state1})});// Create a set function that updates the state\nconst setDataStore=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(dataStore.state);}dataStore.state=Object.freeze({...dataStore.state,...newState});};// Store the initial state, copy the object if it's an object\nlet storeState=typeof state1===\"object\"?Object.freeze({...state1}):state1;// Keep a list of all the listeners, in the form of React hook setters\nconst storeSetters=new Set();// Create a set function that updates all the listeners / setters\nconst setStoreState=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(storeState);}storeState=typeof newState===\"object\"?Object.freeze({...storeState,...newState}):newState;// Update all the listeners / setters with the new value\nstoreSetters.forEach(setter=>setter(storeState));};// Create the actual hook based on everything above\nfunction useStore(){// Create the hook we are going to use as a listener\nconst[state,setState]=useState(storeState);// If we unmount the component using this hook, we need to remove the listener\n// @ts-ignore\nuseEffect(()=>{// But right now, we need to add the listener\nstoreSetters.add(setState);return()=>storeSetters.delete(setState);},[]);// If Data context exists, use Data, otherwise use vanilla React state\nif(useObserveData()===true){useObserveData();return[dataStore.state,setDataStore];}else{// Return the state and a function to update the central store\nreturn[state,setStoreState];}}return useStore;}\nexport const __FramerMetadata__ = {\"exports\":{\"createStore\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./createStore.map","/*\n * createStore (framer/store@1.0.1)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js\"\n","import{jsx as _jsx}from\"react/jsx-runtime\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";const useStore=createStore({mewsApi:null});export const withSetMewsApi=Component=>{// eslint-disable-next-line react/display-name\nreturn props=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{...props,setStore:setStore});};};export const withMewsApi=Component=>{// eslint-disable-next-line react/display-name\nreturn props=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{...props,mewsApi:store.mewsApi});};};\nexport const __FramerMetadata__ = {\"exports\":{\"withMewsApi\":{\"type\":\"reactHoc\",\"name\":\"withMewsApi\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSetMewsApi\":{\"type\":\"reactHoc\",\"name\":\"withSetMewsApi\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Override_mews.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{handleMewsDeeplinkBooking,handleMewsIframeBooking}from\"https://framerusercontent.com/modules/j4jpyA8J5ZOdZrYpFSm7/T6sqZC4ef6jqbSCRxNAh/Mews_integration.js\";import{handleAvvioDeeplinkBooking}from\"https://framerusercontent.com/modules/5PwpCO5YxxGt1MKhSBUJ/Y2N8K0brVTCScFh3gria/Avvio_integration.js\";import NotAllowedComponent,{useComponentProtection}from\"https://framerusercontent.com/modules/suYg7ALXWasn4MpwOXag/JaTKqJzcgFXAlUL8t3TG/Component_protection.js\";// --------------------------------------------------- //\n// PROPERTY CONTROLS\n// --------------------------------------------------- //\naddPropertyControls(BookButton,{bookingEngine:{type:ControlType.Enum,options:[\"mews\",\"avvio\"],optionTitles:[\"Mews\",\"Avvio\"],defaultValue:\"mews\"},mewsIntegration:{type:ControlType.Object,controls:{mewsDistributorId:{type:ControlType.String,defaultValue:\"\"},mewsBaseUrl:{type:ControlType.String,defaultValue:\"https://app.mews.com/distributor\",description:\"Usually don't change this\"},defaultLanguage:{type:ControlType.String,defaultValue:\"en-US\",description:\"[Supported language codes](https://mews-systems.gitbook.io/booking-engine-guide/booking-engine-api/guidelines/supported-language-codes)\"},mewsIntegrationType:{type:ControlType.Enum,options:[\"deeplink\",\"iframe\"],defaultValue:\"deeplink\"},isDemo:{type:ControlType.Boolean,defaultValue:true,description:\"If true, the widget will be in demo mode\"},iframeStyle:{type:ControlType.Object,controls:{maxWidth:{type:ControlType.Number,defaultValue:80,min:1,max:100,description:\"Viewport width\"},maxHeight:{type:ControlType.Number,defaultValue:80,min:1,max:100,description:\"Viewport height\"},borderRadius:{type:ControlType.Number,defaultValue:12,min:0,max:100,description:\"Border radius\"},shadowColor:{type:ControlType.Color,defaultValue:\"rgba(0, 0, 0, 0.15)\",description:\"Shadow color\"},paddingTop:{type:ControlType.Number,defaultValue:8,min:0,max:100,unit:\"px\",description:\"Padding top, for language and currency selector to not be sticked to the top of the widget\"}}}},hidden:props=>props.bookingEngine!==\"mews\"},avvioIntegration:{type:ControlType.Object,controls:{avvioSiteId:{type:ControlType.String,defaultValue:\"\"}},hidden:props=>props.bookingEngine!==\"avvio\"},buttonComponent:{type:ControlType.ComponentInstance},roomId:{type:ControlType.String,defaultValue:\"\"}});// --------------------------------------------------- //\n// DEFAULT PROPS\n// --------------------------------------------------- //\nBookButton.defaultProps={bookingEngine:\"mews\",avvioIntegration:{avvioSiteId:\"\"},buttonComponent:undefined,mewsIntegration:{mewsDistributorId:\"34723ee1-8fdf-4aa9-9f3c-b24300d7ee4b\",mewsBaseUrl:\"https://app.mews.com/distributor\",defaultLanguage:\"en-US\",mewsIntegrationType:\"iframe\",isDemo:true,iframeStyle:{maxWidth:80,maxHeight:80,borderRadius:12,shadowColor:\"rgba(0, 0, 0, 0.15)\",paddingTop:8}},roomId:\"5bf22f23-7b6e-4437-8a31-b24300d7f4de\"};/**\n * @Copyright © David McBacon | Bachoff Studio\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerIntrinsicWidth 100\n * @framerIntrinsicHeight 40\n * @framerDisableUnlink\n */export default function BookButton(props){const handleBookButtonClick=()=>{handleBookingEngineBooking({bookingEngine:props.bookingEngine,mewsIntegration:props.mewsIntegration,avvioIntegration:props.avvioIntegration,mewsApi:props.mewsApi,roomId:props.roomId});};const isAllowed=useComponentProtection();if(!isAllowed){return /*#__PURE__*/_jsx(NotAllowedComponent,{});}return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\"},onClick:handleBookButtonClick,children:props.buttonComponent&&props.buttonComponent.length>0?props.buttonComponent:/*#__PURE__*/_jsx(\"button\",{style:{width:\"100%\",height:\"100%\",backgroundColor:\"#0D353D\",borderRadius:10,display:\"flex\",justifyContent:\"center\",alignItems:\"center\",cursor:\"pointer\",color:\"white\"},\"aria-label\":\"Book Now\",children:\"Book Now\"})});}const handleBookingEngineBooking=props=>{switch(props.bookingEngine){case\"mews\":if(!props.mewsApi)return;if(props.mewsIntegration.mewsIntegrationType===\"iframe\"){handleMewsIframeBooking({mewsApi:props.mewsApi,roomId:props.roomId});}if(props.mewsIntegration.mewsIntegrationType===\"deeplink\"){handleMewsDeeplinkBooking({mewsDistributorId:props.mewsIntegration.mewsDistributorId,mewsBaseUrl:props.mewsIntegration.mewsBaseUrl,defaultLanguage:props.mewsIntegration.defaultLanguage,isDemo:props.mewsIntegration.isDemo,roomId:props.roomId});}break;case\"avvio\":handleAvvioDeeplinkBooking({avvioSiteId:props.avvioIntegration.avvioSiteId,roomId:props.roomId});break;}};BookButton.displayName=\"BOOK BUTTON - BYEHOTELIER\";\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BookButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"40\",\"framerIntrinsicWidth\":\"100\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Book_button.map"],"mappings":"gNAyB4f,SAAgB,EAAmB,CAAC,WAAS,YAAU,eAAa,cAAY,cAAY,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA2B5kB,EAAS;oBACR,EAAU;;;uBAGP,EAAa;+BACL,EAAY;qBACtB,EAAW;;;;;;;qBAOX,EAAS;sBACR,EAAU;iBACf,EAAS;kBACR,EAAU;yBACH,EAAa;iCACL,EAAY;uBACtB,EAAW;;;iCAvED,IAAsC,CAG1D,GAA2B,CAAC,oBAAkB,cAAY,kBAAgB,SAAO,UAAQ,WAA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