PageSourceSearch

https://landfolk.com/_next/static/chunks/pages/my/host/listings/[l…/settings/pricing-937f472ad335c281.js

js landfolk.com collected 2026-09-24 22:58:33 UTC 65,367 bytes, 179 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i=(new e.Error).stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="f0ddd89f-f872-488c-a5f9-5448702a5fe5",e._sentryDebugIdIdentifier="sentry-dbid-f0ddd89f-f872-488c-a5f9-5448702a5fe5")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1656],{51128:function(e,i,t){"use strict";var s,n,a=t(52983);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e}).apply(this,arguments)}i.Z=e=>a.createElement("svg",o({width:64,height:64,viewBox:"0 0 64 64"},e),s||(s=a.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M17.896 25.762c1.365 1.346 2.798 2.76 3.769 3.628l-.014.014.2.173c2.066 1.794 4.153 3.607 6.917 4.36a.46.46 0 0 0 .565-.353c.594-2.402 2.59-3.876 4.613-5.369 1.391-1.027 2.794-2.063 3.761-3.415.226-.325 0-.762-.395-.734-4.014.272-8.059.17-12.1.067-2.656-.067-5.31-.135-7.953-.095-.396.014-.593.508-.311.79l.948.934Zm-5.89 35.698c-.071.805.55 1.497 1.37 1.497l30.545.268-.017-.138c-.419-3.36-.846-6.797-1.989-9.973a1.427 1.427 0 0 0-1.03-.89c-9.01-1.906-18.782-1.482-27.227 2.387a1.427 1.427 0 0 0-.749.82c-.562 1.697-.704 3.506-.847 5.318l-.056.711Z",className:"color",clipRule:"evenodd"})),n||(n=a.createElement("path",{fill:"currentColor",d:"M51.755 60.399c-1.115 0-1.143-.085-2.316-.085.693-3.093.848-6.566.184-9.744l.79.226c-.281-.184-.564-.325-.832-.48-1.116-7.075-6.313-12.06-12.526-15.125-5.607-4.928 5.973-7.385 8.02-11.057 4.845-6.002 5.918-14.687 4.04-22.002 3.149 0 6.385-.632.212-.805-2.458.382-4.844-.367-7.287-.536-4.915.183-9.914-.41-14.786-.777C25.348-.268 2 1.327 15.59 2.654c-1.101 8.305.693 17.357 6.638 23.514 1.934 2.372 6.595 2.697 6.129 6.44-.41.903-1.271 1.906-2.09 2.103-7.47 2.472-10.676 11.128-11.637 18.274-.41.297-.819.593-1.2.904.41-.141.805-.31 1.186-.48-.07 2.217.396 4.632.72 6.764-1.144.014-1.384-.056-2.556-.056-3.092.48-1.737 4.194 1.06 3.558 3.106 0 5.973-.014 9.136.297 1.92.127 3.968-.212 5.832-.283 1.61.113 2.839.24 4.576.297 3.954-.057 7.555-.508 11.467-.184 2.316.396 4.533-.042 6.905.142 2.274.028 2.302-3.56 0-3.53v-.015Zm-34.71-47.124c-.933-3.446-1.102-6.934-1.004-10.493 4.915 1.582 10.013.621 15.026.55 5.917-.084 11.665-.734 17.553-1.073-.65 5.776-2.005 11.637-4.73 16.791-3.065-.183-6.115.58-9.123.24-2.683-.254-5.903-.268-8.629-.098-1.977-.085-4.617-.297-6.538.028-.861-1.991-1.652-3.954-2.57-5.945h.014Zm3.162 32.113c1.427-2.43 3.432-5.028 5.55-6.892 2.627-1.06 5.253-2.88 5.578-5.988.085-.282-.17-1.595-.17-1.595-.056-.226-.395-1.158-.762-1.54-.677-1.497-2.81-2.81-4.194-3.177-2.203-1.045-3.87-3.305-5.578-4.985 4.222-.042 8.501.056 12.738.042 3.05.495 6.256 0 9.292-.127-2.16 4.053-8.205 5.296-8.967 10.055 0 0-.07 1.624.423 2.57.466 1.102 1.271 2.048 2.345 2.486 5.225 1.962 8.035 6.891 9.179 12.074-8.897-3.361-19.347-2.825-27.552 2.132.593-1.723 1.426-3.474 2.104-5.07l.014.015Zm26.945 15.096c-4.76-.749-9.942.042-14.715-.085-2.91-.424-6.355.042-9.25.056-2.062-.14-4.717-.451-6.891-.282.338-2.754.254-5.592 1.27-8.134 8.799-4.223 19.122-4.618 28.527-2.471 1.37 3.417 1.821 7.173 2.287 10.83-.452.057-.593.1-1.214.1l-.014-.014Z"})))},87348:function(e,i,t){"use strict";var s,n,a=t(52983);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e}).apply(this,arguments)}i.Z=e=>a.createElement("svg",o({width:64,height:64,viewBox:"0 0 64 64"},e),s||(s=a.createElement("path",{fill:"currentColor",d:"m1.877 58.434 14.084-.494a1.808 1.808 0 0 0 1.75-1.807v-33.29a1.8 1.8 0 0 0-1.806-1.807H1.806A1.8 1.8 0 0 0 0 22.842v33.785a1.8 1.8 0 0 0 1.877 1.807Zm6.308-15.75a3.246 3.246 0 1 1 0 6.493 3.246 3.246 0 0 1 0-6.493Z",className:"color"})),n||(n=a.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M48.519 19.695C54.644 18.552 62.067 17.578 64 25.27l-.028-.015c-.045.794-.087 1.582-.129 2.364-.733 13.857-1.355 25.587-19.149 25.72-1.304.059-2.662.218-4.042.38-4.283.502-8.787 1.03-12.596-1.34a10.56 10.56 0 0 0-.467-.322c.142.026.14.026.093.016l-.105-.024c-2.22-1.441-4.601-1.778-7.326-1.857v.24c.494 3.74-2.102 5.504-5.49 4.234-4.459.17-8.918-.325-13.307-.903 2.487-.334 5.164-.552 7.81-.768 2.846-.232 5.656-.461 8.15-.827-.31-10.641-.507-21.169 0-31.81a21.805 21.805 0 0 0-.86-.125c-.48-.063-.972-.128-1.454-.242v-.352c.188-.043.384-.09.585-.14.523-.127 1.084-.263 1.645-.354-.093-.302-.095-.638-.097-.961-.002-.31-.003-.61-.086-.86-3.262.203-6.524-.164-9.799-.532-1.954-.22-3.913-.44-5.88-.54 3.02-.566 6.082-.73 9.131-.895 1.667-.09 3.33-.179 4.981-.333 2.893-1.242 4.615 1.411 4.714 4.008 5.899-.607 6.294-.805 10.189-5.25 3.175-2.427 5.588-5.462 6.492-9.328 2.328-7.988 13.83-4.107 15.354 2.822.237 4.325-1.87 8.54-3.746 12.29l-.064.129ZM27.577 52.049a1.134 
11.134 0 0 1-.086-.022.554.554 0 0 0 .098.03l-.012-.008Zm.577-2.492-.113-.056c.113.042.212.098.113.056Zm31.316-13.32c.072-2.775.145-5.556.833-8.244.737-1.42-.05-2.84-.787-4.17-.222-.402-.44-.796-.61-1.178-1.801-1.448-4.251-1.643-6.66-1.834-1.348-.107-2.682-.213-3.883-.537-.151.975-.694 1.692-1.244 2.42-.167.22-.334.44-.491.67l-.34-.099c.537-4.784 1.652-9.511 2.88-14.21 1.256-4.418-2.95-8.355-7.212-7.918-2.436.834-2.654 3.056-2.88 5.358-.16 1.631-.323 3.303-1.283 4.55a128.74 128.74 0 0 0-1.482 1.858c-2.69 3.415-5.514 6.998-9.624 8.5a76.099 76.099 0 0 1-6.238-.226c.02 2.235.058 4.462.095 6.684.12 7.137.24 14.232-.222 21.442 3.604-1.488 7.143-.157 10.553 1.125.502.189 1.002.377 1.499.554 2.514-.234 5.356.039 8.231.315 7.842.754 15.928 1.531 18.272-7.907.466-2.336.53-4.742.593-7.153ZM9.71 45.301v-.042C1.961 47.29 3.4 34.632 10.74 37.525c3.98 1.2 3.062 7.734-1.03 7.776Zm.197-5.857c4.586 2.95-2.089 8.933-4.206 3.345-.804-2.484 1.948-4.827 4.206-3.345Z",clipRule:"evenodd"})))},20644:function(e,i,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/my/host/listings/[listingShortId]/settings/pricing",function(){return t(69331)}])},91785:function(e,i,t){"use strict";t.d(i,{p:function(){return a}});var s=t(48938);let n={[s.km.Available]:s.VC.Available,[s.km.Unavailable]:s.VC.Unavailable,[s.km.Undecided]:s.VC.Undecided};function a(e){return n[e]}},78789:function(e,i,t){"use strict";t.d(i,{a:function(){return c},g:function(){return n}});var s=t(48938);let n=({state:e,listingAgreement:i,publishingProgress:t})=>{let n=e===s.ab.Published,a=i?.plan===s.is.Expand;return{isPublished:n,isPricingSetup:t.pricingSetup,isCalendarPageViewed:t.calendarReviewed,isCancellationPolicySelected:t.cancellationPolicySelected,isCinRequired:t.cinRequired,isCinValid:t.cinValid,isPublishable:!a&&t.publishable,remainingStepsCount:t.remainingStepsCount}},a=/^[0-9A-Z]{18}$/,o=({address:e})=>e?.country===s.Cv.It,r=e=>a.test(e??""),l=({address:e,payoutDetails:i})=>!o({address:e})||r(i?.landRegistrationNumber??void 0),c=({listing:e,submittedCin:i})=>!e.firstPublishedAt&&o(e)&&!l(e)&&r(i)},36376:function(e,i,t){"use strict";t.d(i,{i:function(){return p},m:function(){return n}});var s,n,a=t(66122),o=t(80215),r=t(52983),l=t(1168),c=t(61716),d=t(48938),g=t(16063),u=t(78789);(s=n||(n={})).PRICING_SETUP="pricingSetup",s.CALENDAR_VIEWED="calendarViewed",s.CANCELLATION_POLICY_SELECTED="cancellationPolicySelected",s.CIN_VALID="cinValid";let p=e=>{let i=(0,l.Z)(),t=(0,o.useRouter)(),{isPricingSetup:s,isCalendarPageViewed:n,isCancellationPolicySelected:c,isCinValid:p}=(0,u.g)(e),h=(0,r.useRef)([]),f=(0,r.useMemo)(()=>({pricingSetup:{description:i.formatMessage(m.pricingNextDescription),actionLabel:i.formatMessage(m.pricingNextActionLabel),onAction:()=>t.push(g._j.hostListingSettings(e.shortId).pricing)},calendarViewed:{description:i.formatMessage(m.calendarNextDescription),actionLabel:i.formatMessage(m.calendarNextActionLabel),onAction:()=>t.push(g._j.hostListingCalendar(e.shortId))},cancellationPolicySelected:{description:i.formatMessage(m.cancellationNextDescription),actionLabel:i.formatMessage(m.cancellationNextActionLabel),onAction:()=>t.push(g._j.hostListingSettings(e.shortId).general+"#cancellation-policy")},cinValid:{description:i.formatMessage(m.cinNextDescription),actionLabel:i.formatMessage(m.cinNextActionLabel),onAction:()=>t.push(g._j.hostListingSettings(e.shortId).contact+"#tax-information")},default:{description:i.formatMessage(m.overviewNextDescription),actionLabel:i.formatMessage(m.overViewNextActionLabel),onAction:()=>t.push(g._j.hostListing(e.shortId))}}),[i,e.shortId,t]),y=(0,r.useMemo)(()=>({pricingSetup:i.formatMessage(m.pricingSetupHeadline),calendarViewed:i.formatMessage(m.calendarViewedHeadline),cancellationPolicySelected:i.formatMessage(m.cancellationPolicySelectedHeadline),cinValid:i.formatMessage(m.cinValidHeadline)}),[i]),x=(0,r.useCallback)(e=>"pricingSetup"===e||s?"calendarViewed"===e||n?"cancellationPolicySelected"===e||c?"cinValid"===e||p?f.default:f.cinValid:f.cancellationPolicySelected:f.calendarViewed:f.pricingSetup,[n,c,p,s,f]),{addToast:j}=(0,a.p)(),b=(0,r.useCallback)(e=>{let i=x(e);if(!i)return;
1h.current.forEach(e=>{e.dismiss()});let t=j({headline:y[e],description:i.description,actionLabel:i.actionLabel,onAction:()=>{i.onAction(),t.dismiss()},duration:15e3,notificationType:"success"});h.current=[...h.current,t]},[j,x,y]);return e.listingAgreement?.plan===d.is.Expand?{showNextToast:()=>{}}:{showNextToast:b}},m=(0,c.vU)({pricingSetupHeadline:{defaultMessage:"You’ve set your pricing",id:"Ya8UuOYmy0",description:"Host listing publish flow toast: pricing headline"},calendarViewedHeadline:{defaultMessage:"You’ve reviewed your calendar",id:"fI3huD5CFx",description:"Host listing publish flow toast: calendar viewed headline"},cancellationPolicySelectedHeadline:{defaultMessage:"You’ve selected a cancellation policy",id:"9neWdnz71l",description:"Host listing publish flow toast: cancellation policy selected headline"},cinValidHeadline:{defaultMessage:"You’ve added your CIN number",id:"x6/Q9mcPj/",description:"Host listing publish flow toast: CIN valid headline"},pricingNextDescription:{defaultMessage:"Moving on, let’s set up your pricing.",id:"u673iKW9+j",description:"Host listing publish flow toast: pricing description"},pricingNextActionLabel:{defaultMessage:"Set up pricing",id:"+12PGUmHyb",description:"Host listing publish flow toast: pricing action label"},calendarNextDescription:{defaultMessage:"Now, it’s time to review your calendar.",id:"7fXAd3d19o",description:"Host listing publish flow toast: calendar description"},calendarNextActionLabel:{defaultMessage:"Review calendar",id:"2T/splKaCq",description:"Host listing publish flow toast: calendar action label"},cancellationNextDescription:{defaultMessage:"Next, select a cancellation policy.",id:"uOqBNrznT5",description:"Host listing publish flow toast: cancellation description"},cancellationNextActionLabel:{defaultMessage:"Select policy",id:"B21Raf7pCf",description:"Host listing publish flow toast: cancellation action label"},cinNextDescription:{defaultMessage:"Next, add your CIN number.",id:"PZqY3sfszb",description:"Host listing publish flow toast: CIN description"},cinNextActionLabel:{defaultMessage:"Add CIN number",id:"mSsKP0I+ah",description:"Host listing publish flow toast: CIN action label"},overviewNextDescription:{defaultMessage:"Done! Go to the overview to publish your holiday home.",id:"bTaq+TO1XH",description:"Host listing publish flow toast: publish description"},overViewNextActionLabel:{defaultMessage:"Go to overview",id:"PnNZNt9PeS",description:"Host listing publish flow toast: publish action label"}})},69331:function(e,i,t){"use strict";t.r(i),t.d(i,{default:function(){return e1}});var s=t(97458),n=t(71775),a=t(80215),o=t(99617),r=t(52983),l=t(27401),c=t(81641),d=t(61716),g=t(67374),u=t(37863),p=t(16176),m=t(35488),h=t(32470),f=t(92098),y=t(60923),x=t(43547),j=t(43244);function b({adminView:e,managedByLandfolk:i=!1,onSupportArticleClick:t,className:n}){let{watch:a,control:o}=(0,l.Gc)(),r=a("promotionsConfig.lastMinutePromotionEnabled");return(0,s.jsx)(j.Q,{id:"discounts",title:(0,s.jsx)(c.Z,{id:"IxPsk9Dxob",defaultMessage:"Discounts",description:"Listing discount section: title"}),headlineStyles:["!scroll-m-6"],className:n,children:(0,s.jsx)("ul",{className:"mt-3.5 border-t border-t-neutral-300",children:v(e,i).filter(e=>!e.hide).map((e,i)=>(0,s.jsx)(P,{...e,onSupportArticleClick:t,children:"promotionsConfig.lastMinutePromotionEnabled"===e.name&&(0,s.jsx)(l.Qr,{name:"promotionsConfig.lastMinutePromotionMaxDiscountRate",control:o,render:({field:i})=>(0,s.jsx)(w,{show:!!r,readOnly:e.readOnly,value:i.value,onChange:i.onChange})})},`promo-${i}`))})})}function w({show:e,readOnly:i=!1,value:t,onChange:n}){let[a,o]=(0,r.useState)(()=>100*t),l=e=>{let i=Math.round(e[0]??0);
1if(i<10){o(10),n(.1);return}if(i>50){o(50),n(.5);return}o(i),n(i/100)};return(0,s.jsx)(u.m,{mounted:e,children:(0,s.jsxs)("div",{className:"pt-3",children:[(0,s.jsxs)("div",{className:"mb-4 flex items-center gap-4",children:[(0,s.jsxs)("div",{className:"w-full",children:[(0,s.jsx)(m.i,{disabled:i,name:"promotionsConfig.lastMinutePromotionMaxDiscountRate",value:[a],min:.1,max:.5,step:.05,onValueChange:l,scale:{transform:e=>100*e,inverse:e=>e/100}}),(0,s.jsxs)("div",{className:"mt-2 grid shrink-0 grow-0 text-f7",children:[(0,s.jsx)("span",{className:"col-start-1 row-start-1",children:(0,s.jsx)(d.BK,{style:"percent",value:.1})}),(0,s.jsx)("span",{className:"col-start-1 row-start-1 self-end justify-self-end",children:(0,s.jsx)(d.BK,{style:"percent",value:.5})})]})]}),(0,s.jsx)("div",{className:"w-[7rem] sm:w-[6rem]",children:(0,s.jsx)(y.K,{disabled:i,value:a,onChange:e=>l([e.target.valueAsNumber]),min:10,max:50,step:1,suffix:"%",inputStyles:["text-f3 sm:text-f4 font-bold"]})})]}),(0,s.jsx)(u.m,{mounted:a<15,children:(0,s.jsx)("div",{className:"pb-3",children:(0,s.jsx)(x.P,{type:"warning",size:"small",children:(0,s.jsx)(c.Z,{id:"Pe6Y48FLi1",defaultMessage:"We recommend offering a discount of {percentageRate} or more if you want to attract guests. ",description:"Listing discounts last minute discount: Minimum rate recommendation",values:{percentageRate:(0,s.jsx)(d.BK,{style:"percent",value:.15})}})})})}),(0,s.jsx)("div",{className:"col-span-full",children:(0,s.jsx)(c.Z,{id:"6ecggvdNnm",defaultMessage:"The discount is only applied to your nightly prices.",description:"Listing discounts last minute discount: rate application"})})]})})}let v=(e,i)=>[{label:(0,s.jsx)(c.Z,{id:"7jcy077WAu",defaultMessage:"New gems",description:"Listing new gems discount: title"}),description:(0,s.jsx)(c.Z,{id:"SUGHZ5Fzng",defaultMessage:"Give a discount to the first 3 who book your holiday home within 90 days of publishing",description:"Listing new gems discount: description"}),name:"promotionsConfig.discountFirstBookingsEnabled",hide:!e,readOnly:!i},{label:(0,s.jsx)(c.Z,{id:"hpyaqttF6d",defaultMessage:"Last minute",description:"Listing last minute discount: title"}),description:(0,s.jsx)(c.Z,{id:"mo0IvilJsP",defaultMessage:"Give discounts to guests booking within 30 days before their stay",description:"Listing last minute discount: description"}),name:"promotionsConfig.lastMinutePromotionEnabled",readOnly:e&&!i,supportArticle:"guideToLastMinuteDiscounts"}],P=({label:e,description:i,name:t,children:n,readOnly:a,supportArticle:o,onSupportArticleClick:r})=>{let{control:d}=(0,l.Gc)();return(0,s.jsxs)("li",{className:"block border-b border-b-neutral-300 py-3.5",children:[(0,s.jsx)(l.Qr,{control:d,name:t??"",render:({field:n})=>(0,s.jsx)(h.r,{verticalAlign:"all",label:(0,s.jsxs)("span",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{children:e}),a&&(0,s.jsx)(f.C,{type:"muted",children:(0,s.jsx)(c.Z,{id:"niwnHXvG/8",defaultMessage:"Read only",description:"Listing discount section item: Read only badge"})}),!t&&(0,s.jsx)(f.C,{type:"muted",children:(0,s.jsx)(c.Z,{id:"vRpxs/RoJh",defaultMessage:"Coming soon",description:"Listing discount section item: Coming soon badge"})})]}),description:!!t&&i,small:!0,checked:n.value,onChange:n.onChange,disabled:!t||a})}),n,o&&r&&(0,s.jsxs)("div",{onClick:()=>r(o),className:"mt-2 inline-flex cursor-pointer items-center gap-2",children:[(0,s.jsx)(g.Z,{className:"h-1 w-1"}),(0,s.jsx)(p.Q,{type:"button",className:"text-f6",children:(0,s.jsx)(c.Z,{id:"A42Q5yRdU0",defaultMessage:"Learn more",description:"Listing discounts settings: Discount Item 'Learn more' CTA"})})]})]})};var N=t(56610),M=t(44821),C=t(74252),L=t(18011),S=t(22177);function k({calendarUrl:e,hasSetUtilityCosts:i,estimate:t,loading:n,className:a}){let{ref:o,isSticky:r}=(0,S._)({rootMargin:"-1px 0px 100% 0px",initialInView:!1});return(0,s.jsx)("aside",{ref:o,className:[a,"sticky top-0 z-20 transition-all duration-300 ease-out-smooth before:absolute before:-inset-x-2 before:top-0 before:-z-10 before:block before:h-1/2 before:bg-white nl:pt-2 lg:pt-3",r&&"lg:-mx-3 nl:-mx-2"].filter(
1Boolean).join(" "),children:(0,s.jsxs)("div",{className:["relative rounded bg-white p-3",r?"shadow-md":"shadow-widget"].filter(Boolean).join(" "),children:[n&&(0,s.jsx)("div",{className:"absolute right-4 top-3.5 z-10 animate-fade-in text-february-muted [animation-fill-mode:both] [animation-delay:200ms]",children:(0,s.jsx)(C.$,{size:16,thickness:3})}),(0,s.jsxs)("h4",{className:"flex items-start justify-between text-f7 font-bold",children:[(0,s.jsx)("span",{children:(0,s.jsx)(c.Z,{defaultMessage:"Estimated earnings for 1 week:",id:"2D4wjELgx4",description:"Host listing price page: Estimated earnings for 1 week label"})}),t&&(0,s.jsx)("span",{className:["transition-opacity",n&&"opacity-20 duration-500"].filter(Boolean).join(" "),children:(0,s.jsx)(M.cg,{currency:t.lowSeasonHostEarnings.currency,from:t.lowSeasonHostEarnings,to:t.highSeasonHostEarnings})})]}),(0,s.jsxs)("p",{className:"flex items-start justify-between text-f7 text-february-muted",children:[(0,s.jsx)("span",{children:(0,s.jsx)(c.Z,{defaultMessage:"Estimated guest price:",id:"5xUlEsF7in",description:"Host listing price page: Estimated earnings guest price label"})}),t&&(0,s.jsx)("span",{className:["transition-opacity",n&&"opacity-20 duration-500"].filter(Boolean).join(" "),children:(0,s.jsx)(M.cg,{currency:t.lowSeasonBookerPrice.currency,from:t.lowSeasonBookerPrice,to:t.highSeasonBookerPrice})})]}),(0,s.jsxs)("p",{className:"mt-2 flex flex-wrap items-start justify-between text-f8",children:[(0,s.jsx)("span",{children:(0,s.jsx)(c.Z,{defaultMessage:"See the price breakdown for specific dates in <a>your calendar</a>.",id:"X9cCqW3k5X",description:"Host listing price page: Estimated earnings description with link to calendar",values:{a:i=>(0,s.jsx)("a",{href:e,children:i})}})}),t&&(0,s.jsx)(A,{estimate:t,calendarUrl:e,hasSetUtilityCosts:i,className:["transition-opacity",n&&"opacity-20 duration-500"].filter(Boolean).join(" ")})]})]})})}let A=({estimate:e,calendarUrl:i,hasSetUtilityCosts:t,className:n,...a})=>{let o=e.lowSeasonBookerInvoice.lineItems.filter(e=>e?.total?.majorAmount&&e.total?.majorAmount>0),r=e.highSeasonBookerInvoice.lineItems.filter(e=>e?.total?.majorAmount&&e.total?.majorAmount>0),l=o.some((e,i)=>o[i]?.total.majorAmount!==r[i]?.total.majorAmount),d=[...o,...r.filter(e=>!o.some(i=>i.type===e.type))].map(e=>({type:e.type,description:e.description,lowTotal:o.find(i=>i.type===e.type)?.total,highTotal:r.find(i=>i.type===e.type)?.total}));return(0,s.jsxs)(L.GR,{children:[(0,s.jsx)(L.hg,{asChild:!0,children:(0,s.jsx)(p.Q,{...a,className:[n,"text-left"].filter(Boolean).join(" "),children:(0,s.jsx)(c.Z,{defaultMessage:"Show calculation",id:"x8E5jm8Q7s",description:"Host listing price page: Estimated earnings price calculation dialog button label"})})}),(0,s.jsx)(L.Vq,{width:"md",children:(0,s.jsxs)(L.a7,{children:[(0,s.jsx)(L.GG,{float:!0}),(0,s.jsx)(L.$N,{asChild:!0,children:(0,s.jsx)("h2",{className:"text-f3 font-bold nl:my-3",children:(0,s.jsx)(c.Z,{defaultMessage:"Price calculation",id:"9A+tfoguf3",description:"Host listing price page: Estimated earnings price calculation dialog headline"})})}),(0,s.jsxs)("table",{className:"mt-4 w-full",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:"border-b border-neutral-300 pb-3 text-f7 font-bold",children:(0,s.jsx)(c.Z,{defaultMessage:"Description",id:"XaXhm0QbZY",description:"Host listing price page: Estimated earnings price calculation table column header"})}),(0,s.jsx)("td",{className:"border-b border-neutral-300 pb-3 text-right text-f7 font-bold",children:l&&(0,s.jsx)(c.Z,{defaultMessage:"Off-season",id:"Jna5IzxlYj",description:"Host listing price page: Estimated earnings price calculation table column header"})}),l&&(0,s.jsx)("td",{className:"border-b border-neutral-300 pb-3 text-right text-f7 font-bold",children:(0,s.jsx)(c.Z,{defaultMessage:"High season",id:"jFubRYQ+0F",description:"Host listing price page: Estimated earnings price calculation table column header"})})]})}),(0,s.jsxs)("tbody",{children:[d.map(({type:e,description:i,highTotal:t,lowTotal:n},a,o)=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:["pt-2",0===a&&"pt-3",a===o.length-1&&"pb-3"].filter(
1Boolean).join(" "),children:(0,s.jsx)(H,{type:e,description:i})}),(0,s.jsx)("td",{className:["pl-3 pt-2 text-right",0===a&&"pt-3",a===o.length-1&&"pb-3"].filter(Boolean).join(" "),children:n&&(0,s.jsx)(M.jM,{currency:n.currency,majorAmount:n.majorAmount})}),l&&(0,s.jsx)("td",{className:["pl-3 pt-2 text-right",0===a&&"pt-3",a===o.length-1&&"pb-3"].filter(Boolean).join(" "),children:t&&(0,s.jsx)(M.jM,{currency:t.currency,majorAmount:t.majorAmount})})]},e)),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:"border-y border-neutral-300 py-3 [border-top-style:dashed]",children:(0,s.jsx)(c.Z,{defaultMessage:"Estimated price for guest:",id:"Qgg5PTY+Gi",description:"Host listing price page: Estimated earnings price calculation table item label"})}),(0,s.jsx)("td",{className:"border-y border-neutral-300 py-1 pl-3 text-right [border-top-style:dashed]",children:(0,s.jsx)(M.jM,{...e.lowSeasonBookerPrice})}),l&&(0,s.jsx)("td",{className:"border-y border-neutral-300 py-1 pl-3 text-right [border-top-style:dashed]",children:(0,s.jsx)(M.jM,{...e.highSeasonBookerPrice})})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:"pt-3 font-bold",children:(0,s.jsx)(c.Z,{defaultMessage:"Your earnings",id:"cf6B9jvHdt",description:"Host listing price page: Estimated earnings price calculation table item label"})}),(0,s.jsx)("td",{className:"pt-3 text-right font-bold",children:(0,s.jsx)(M.jM,{...e.lowSeasonHostEarnings})}),l&&(0,s.jsx)("td",{className:"pt-3 text-right font-bold",children:(0,s.jsx)(M.jM,{...e.highSeasonHostEarnings})})]})]})]}),t&&(0,s.jsx)(x.P,{type:"warning",size:"small",className:"mt-4",children:(0,s.jsx)("p",{children:(0,s.jsx)(c.Z,{defaultMessage:"Your utility costs are not included. <a>Choose nights in your calendar</a> to see a precise price breakdown including utility costs.",id:"EFHIPeYevo",description:"Host listing price page: Estimated earnings price calculation notification when utility costs are set",values:{a:e=>(0,s.jsx)("a",{href:i,children:e})}})})})]})})]})},H=({type:e,description:i})=>{switch(e){case N.cl.ServiceFee:return(0,s.jsx)(c.Z,{defaultMessage:"Estimated guest fee incl. VAT",id:"+OnrxqXHTd",description:"Host listing price page: Estimated earnings price calculation table item label"});case N.cl.PetsFee:return(0,s.jsx)(c.Z,{defaultMessage:"Pet fee <dim>(only if guests bring pets)</dim>",id:"tzVT9i/fyj",description:"Host listing price page: Estimated earnings price calculation table item label",values:{dim:e=>(0,s.jsx)("span",{className:"relative top-[-0.05em] inline-block text-f7 text-february-muted",children:e})}});case N.cl.Rental:return(0,s.jsx)(c.Z,{defaultMessage:"Rental price for 7 nights",id:"bSp2YhaxK8",description:"Host listing price page: Estimated earnings price calculation table item label"});default:return i}};var E=t(72934),Z=t(61230),D=t.n(Z),I=t(73352),F=t.n(I),U=t(49574),T=t(48938),B=t(31378),W=t(91785),G=t(78789),R=t(36376),V=t(93207),z=t(16063),_=t(11133),Y=t(25959),$=t(28168),q=t(2506),Q=t(42701),O=t(89174),X=t(8736),K=t(65454),J=t(10448),ee=t(64076),ei=t(75754);let et={},es=(0,q.Ps)`
2    fragment HostListingPriceDetails on HostListing {
3  id
4  landfolkCleaningMode
5  publishingProgress {
6    ...HostListingPublishingProgressDetails
7  }
8  pricing {
9    scheme
10    currency
11    cleaningFee {
12      ...Money
13    }
14    petsFee {
15      ...Money
16    }
17    dailyPriceWeekday {
18      ...Money
19    }
20    dailyPriceWeekend {
21      ...Money
22    }
23    dailyPriceHighSeason {
24      ...Money
25    }
26    dailyPriceLowSeason {
27      ...Money
28    }
29    suggestedDailyPriceHighSeason {
30      ...Money
31    }
32    suggestedDailyPriceLowSeason {
33      ...Money
34    }
35    dailyUtilityCostColdest {
36      ...Money
37    }
38    dailyUtilityCostWarmest {
39      ...Money
40    }
41    dailyUtilityCostPerExtraParticipantColdest {
42      ...Money
43    }
44    dailyUtilityCostPerExtraParticipantWarmest {
45      ...Money
46    }
47    utilityCostParticipantsCap
48  }
49  features {
50    evCharger {
51      ...ListingFeature
52    }
53    petsAllowed {
54      ...ListingFeature
55    }
56  }
57  promotions {
58    ... on DiscountFirstBookingsPromotion {
59      __typename
60      available
61      daysUntilUnavailable
62      enabled
63      active
64    }
65  }
66  promotionsConfig {
67    discountFirstBookingsEnabled
68    lastMinutePromotionEnabled
69    lastMinutePromotionMaxDiscountRate
70  }
71}
72    ${K.A}
73${O.Z}
74${J.pB}`,en=(0,q.Ps)`
75    fragment HostListingPricing on HostListing {
76  shortId
77  capacity
78  cleanedByLandfolk
79  address {
80    country
81  }
82  ...HostListingSharedLayout
83  ...HostListingPriceDetails
84}
85    ${Q.m}
86${es}`,ea=(0,q.Ps)`
87    fragment HostListingPriceEstimationInvoice on BookerInvoice {
88  id
89  total {
90    ...Money
91  }
92  subtotal {
93    ...Money
94  }
95  lineItems {
96    id
97    type
98    description
99    subtotal {
100      ...Money
101    }
102    total {
103      ...Money
104    }
105  }
106}
107    ${O.Z}`,eo=(0,q.Ps)`
108    fragment HostListingPriceEstimation on HostListing {
109  priceEstimations(
110    cleaningFee: $cleaningFee
111    dailyPriceHighSeason: $dailyPriceHighSeason
112    dailyPriceLowSeason: $dailyPriceLowSeason
113    dailyPriceWeekday: $dailyPriceWeekday
114    dailyPriceWeekend: $dailyPriceWeekend
115    participants: $participants
116    petsFee: $petsFee
117    pricingScheme: $pricingScheme
118  ) {
119    lowSeasonBookerInvoice {
120      ...HostListingPriceEstimationInvoice
121    }
122    highSeasonBookerInvoice {
123      ...HostListingPriceEstimationInvoice
124    }
125    lowSeasonBookerPrice {
126      ...Money
127    }
128    highSeasonBookerPrice {
129      ...Money
130    }
131    lowSeasonHostEarnings {
132      ...Money
133    }
134    highSeasonHostEarnings {
135      ...Money
136    }
137  }
138}
139    ${ea}
140${O.Z}`,er=(0,q.Ps)`
141    query HostListingPricing($shortId: String!) {
142  viewer {
143    id
144    listing(shortId: $shortId) {
145      id
146      listingAgreement {
147        id
148        canEditPricing
149      }
150      ...HostListingPricing
151    }
152  }
153}
154    ${en}`,el=(0,q.Ps)`
155    query HostListingPriceEstimation($shortId: String!, $cleaningFee: Float, $dailyPriceHighSeason: Float, $dailyPriceLowSeason: Float, $dailyPriceWeekday: Float, $dailyPriceWeekend: Float, $participants: ParticipantsInput!, $petsFee: Float, $pricingScheme: PricingScheme) {
156  viewer {
157    id
158    listing(shortId: $shortId) {
159      id
160      ...HostListingPriceEstimation
161    }
162  }
163}
164    ${eo}`,ec=(0,q.Ps)`
165    mutation UpdateListingPricing($input: UpdateListingInput!) {
166  updateListing(input: $input) {
167    success
168    listing {
169      id
170      ...HostListingPriceDetails
171    }
172    errors {
173      ...Error
174    }
175  }
176}
177    ${es}
178${X.v}`;var ed=t(51128),eg=t(14981),eu=t(87348),ep=t(61959);function em({available:e,daysUntilUnavailable:i}){let[t,n]=(0,r.useState)(!1),{register:a,watch:o,setValue:d}=(0,l.Gc)();a("promotionsConfig.discountFirstBookingsEnabled");let g=o("promotionsConfig.discountFirstBookingsEnabled");return(0,s.jsxs)(j.Q,{id:"welcome-promotion",headlineStyles:["!scroll-m
178-6"],children:[(0,s.jsxs)("div",{className:"mb-3 flex items-center space-x-2",children:[(0,s.jsx)("h2",{id:"welcome-promotion",className:"scroll-m-4.5 font-bold lg:text-f3 lg:leading-8 nl:text-f4 nl:leading-6",children:(0,s.jsx)(c.Z,{defaultMessage:"New gem promotion",id:"5HUwexiY5U",description:"Listing welcome promotion: Title"})}),!g&&void 0!==i&&(0,s.jsx)(f.C,{type:"warning",children:i>1?(0,s.jsx)(c.Z,{defaultMessage:"{daysUntilUnavailable} days left to activate",id:"VUkalpVHFB",description:"Listing welcome promotion: Time to activate: Countdown",values:{daysUntilUnavailable:i}}):(0,s.jsx)(c.Z,{defaultMessage:"Last day to activate",id:"sqFi8+ki4m",description:"Listing welcome promotion: Time to activate: Last day"})})]}),(0,s.jsxs)("div",{className:"mb-4 flex items-center space-x-3",children:[(0,s.jsx)("p",{children:(0,s.jsx)(c.Z,{defaultMessage:"Get off to a flying start on Landfolk by offering a 20% discount on your first three bookings.",id:"cXuU0zn8Gg",description:"Listing welcome promotion: Description"})}),(0,s.jsx)(h.r,{checked:g,onChange:()=>{g&&!e?n(!0):d("promotionsConfig.discountFirstBookingsEnabled",!g,{shouldDirty:!0})}})]}),(0,s.jsx)(eh,{open:t,onOpenChange:n,onConfirm:()=>d("promotionsConfig.discountFirstBookingsEnabled",!1,{shouldDirty:!0})}),(0,s.jsx)("ul",{className:"space-y-3",children:ef.map(({icon:e,copy:i},t)=>(0,s.jsxs)("li",{className:"flex",children:[(0,s.jsx)(e,{className:"-mt-2.5 mr-3 w-2 shrink-0 grow-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"font-bold",children:(0,s.jsx)(c.Z,{...i.title})}),(0,s.jsx)("p",{children:(0,s.jsx)(c.Z,{...i.description})})]})]},t))}),(0,s.jsx)("p",{className:"mt-4 text-february-muted",children:(0,s.jsx)(c.Z,{defaultMessage:"You can only activate this promotion before publishing or within the first 30 days of publishing. The discount is applied to your nightly prices only.",id:"MdHEMJxAE5",description:"Listing welcome promotion: Explanation"})})]})}let eh=({open:e,onOpenChange:i,onConfirm:t})=>(0,s.jsx)(L.GR,{open:e,onOpenChange:i,children:(0,s.jsxs)(L.Vq,{width:"md",children:[(0,s.jsx)(L.GG,{className:"absolute right-0 top-0 sm:m-3 ns:m-4"}),(0,s.jsxs)(L.fK,{children:[(0,s.jsx)(L.$N,{asChild:!0,children:(0,s.jsx)("h1",{className:"font-bold sm:text-f4 ns:text-f3",children:(0,s.jsx)(c.Z,{defaultMessage:"Are you sure?",id:"wQ9k9OgTPC",description:"Listing welcome promotion: Disable dialog: title"})})}),(0,s.jsx)(L.GG,{})]}),(0,s.jsx)(L.a7,{children:(0,s.jsx)("p",{children:(0,s.jsx)(c.Z,{defaultMessage:"If you turn this off you will not be able to turn it back on. Are you sure you want to turn off the welcome promotion?",id:"TbMDj/4IZq",description:"Listing welcome promotion: Disable dialog: body"})})}),(0,s.jsxs)(L.cN,{className:"flex justify-between gap-x-3",children:[(0,s.jsx)(L.GG,{asChild:!0,children:(0,s.jsx)(ep.zx,{kind:"outline",children:(0,s.jsx)(c.Z,{defaultMessage:"Cancel",id:"tmSUZdVdCL",description:"Listing welcome promotion: Disable dialog: cancel button label"})})}),(0,s.jsx)(L.GG,{asChild:!0,children:(0,s.jsx)(ep.zx,{onClick:t,children:(0,s.jsx)(c.Z,{defaultMessage:"Turn off",id:"fT2xl/LX1P",description:"Listing welcome promotion: Disable dialog: confirm button label"})})})]})]})}),ef=[{icon:eu.Z,copy:(0,d.vU)({title:{defaultMessage:"Get guest reviews sooner",id:"NxCQ2IdLDt",description:"Listing welcome promotion: USP title"},description:{defaultMessage:"Guests are more likely to book a holiday home adorned with a positive guest review than one without. ",id:"nz6dwzMKps",description:"Listing welcome promotion: USP description"}})},{icon:eg.Z,copy:(0,d.vU)({title:{defaultMessage:"Stand out from the crowd",id:"n1sZNPudLM",description:"Listing welcome promotion: USP title"},description:{defaultMessage:"Your home will be shown with a discounted price in search results, on your listing and in Collections.",id:"BTGQlc+J5d",description:"Listing welcome promotion: USP description"}})},{icon:ed.Z,copy:(0,d.vU)({title:{defaultMessage:"Only for a limited time",id:"pT8Gf0smxv",description:"Listing welcome promotion: USP title"},description:{defaultMessage:"This discount expires after the third booking or 90 days after your holiday home was published, whichever happens first.",id:"A+136E6Ywb",description:"Listing welcome promotion: USP description"}})}];var ey=t(61524),ex=t(1168),ej=t(13490),eb=t(62534),ew=t(54585),ev=t(78504),eP=t(19330);function eN({capacity:e,currency:i,calendarUrl:t}){let n=(0,ex.Z)(),{register:a,setValue:o,watch:d}=(0,l.Gc)(),p=d("pricing.utilityCostParticipantsCap"),m=d("pricing.dailyUtilityCostPerExtraParticipantColdest.majorAmount"),h=d("pricing.dailyUtilityCostPerExtraParticipantWarmest.majorAmount"),[f,y]=(0,r.useState)((p||0)>
1780||(m||0)>0||(h||0)>0);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"mt-3.5",children:[(0,s.jsx)("span",{className:"font-bold",children:(0,s.jsx)(c.Z,{...eM.perNight})}),(0,s.jsx)(ev.p,{content:(0,s.jsx)("p",{className:"max-w-5",children:(0,s.jsx)(c.Z,{...eM.perNightTooltip})}),openDelay:0,positioning:{gutter:4},children:(0,s.jsx)("div",{className:"mx-2 -mb-[0.125rem] inline-block align-baseline",children:(0,s.jsx)(g.Z,{className:"h-1 w-1 text-february-muted"})})})]}),(0,s.jsxs)("div",{className:"mb-3 mt-2 flex space-x-3",children:[(0,s.jsx)(ew.L,{name:"pricing.dailyUtilityCostColdest.majorAmount",currency:i,description:n.formatMessage(eM.perNightColdestTime),label:!1}),(0,s.jsx)(ew.L,{name:"pricing.dailyUtilityCostWarmest.majorAmount",currency:i,description:n.formatMessage(eM.perNightWarmestTime),label:!1})]}),(0,s.jsx)(x.P,{size:"small",type:"warning",className:"mb-4.5",children:(0,s.jsx)(c.Z,{...eM.utilityCostsRecommendation,values:{a:e=>(0,s.jsx)("a",{href:t,children:e})}})}),e-4>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ej.G,{type:"checkbox",label:n.formatMessage(eM.enableGuestFeeCheckboxLabel),checked:f,onChange:e=>{e.target.checked||(o("pricing.utilityCostParticipantsCap",eP.PX,{shouldDirty:!0}),o("pricing.dailyUtilityCostPerExtraParticipantColdest.majorAmount",eP.PX,{shouldDirty:!0}),o("pricing.dailyUtilityCostPerExtraParticipantWarmest.majorAmount",eP.PX,{shouldDirty:!0})),y(e.target.checked)},className:"font-bold"}),(0,s.jsx)("p",{className:"text-february-muted",children:(0,s.jsx)(c.Z,{...eM.enableGuestFeeCheckboxDescription})}),(0,s.jsx)(u.m,{mounted:f,children:(0,s.jsxs)("div",{className:"pb-4 pt-3",children:[(0,s.jsx)(eb.P,{disabled:!f,required:f,name:"pricing.utilityCostParticipantsCap",label:n.formatMessage(eM.guestCountSelectorLabel),register:a,defaultValue:p,valueAsNumber:!0,children:[...Array(e-4)].map((e,i)=>(0,s.jsx)("option",{value:i+4,children:n.formatMessage(eM.guestSelector,{value:i+4})},i))}),(0,s.jsx)("p",{className:"mt-3.5 font-bold",children:(0,s.jsx)(c.Z,{...eM.perGuest})}),(0,s.jsxs)("div",{className:"mt-2 flex space-x-3",children:[(0,s.jsx)(ew.L,{disabled:!f,required:f,name:"pricing.dailyUtilityCostPerExtraParticipantColdest.majorAmount",currency:i,description:n.formatMessage(eM.perGuestColdestTime),label:!1}),(0,s.jsx)(ew.L,{disabled:!f,required:f,name:"pricing.dailyUtilityCostPerExtraParticipantWarmest.majorAmount",currency:i,description:n.formatMessage(eM.perGuestWarmestTime),label:!1})]})]})})]})]})}let eM=(0,d.vU)({perNight:{defaultMessage:"Utility cost per night",id:"JC7nVt5mo3",description:"Listing utility costs: Per night section"},perNightTooltip:{defaultMessage:"When you add your utility cost per night the price should reflect the cost of a stay in your holiday home in both the coldest and warmest months",id:"CrLfHy8JuZ",description:"Listing utility costs: Per night section tooltip"},perNightColdestTime:{defaultMessage:"Coldest time of year",id:"vPr1UcQQC3",description:"Listing utility costs: per night coldest time: description"},perNightWarmestTime:{defaultMessage:"Warmest time of year",id:"+l5TYI1v4z",description:"Listing utility costs: per night warmest time: description"},enableGuestFeeCheckboxLabel:{defaultMessage:"I’d like to set further fees if there are many guests",id:"hoP9gMoG9+",description:"Listing utility costs: Enable guest fee checkbox label"},enableGuestFeeCheckboxDescription:{defaultMessage:"If your price should vary depending on the amount of guests, you can add an extra fee here to cover extra utility costs. Note that infants don’t count towards the guest count.",id:"21dbdt7mRi",description:"Listing utility costs: Enable guest fee checkbox description"},guestCountSelectorLabel:{defaultMessage:"If there’s more than",id:"xHPtrQBDxx",description:"Listing utility costs: Guest count selector label"},perGuest:{defaultMessage:"add an extra fee per guest per night:",id:"2BNz4hdokB",description:"Listing utility costs: Per guest section"},perGuestColdestTime:{defaultMessage:"Coldest time of year",id:"dzJoD7sAbY",description:"Listing utility costs: per guest coldest time: description"},perGuestWarmestTime:{defaultMessage:"Warmest time of year",id:"+WcCBNt4YK",description:"Listing utility costs: per guest warmest time: description"},guestSelector:{defaultMessage:"{value, plural, =0 {# guests} one {# guest} other {# guests}}",id:"f0YwgzvHLm",description:"Listing utility costs: Guest count selector option"},utilityCostsRecommendation:{defaultMessage:"Adding utility costs increases the price for guests. <a>Choose nights in your calendar</a> to see a precise price breakdown including utility costs.",id:"n248REr8pD",description:"Listing utility costs: Description"}}),eC=({checked:e,fieldNames:i,onChange:t,children:n,...a})=>{let{getValues:o,setValue:c,unregister:d}=(0,l.Gc)(),g=(0,r.useRef)(o(i)??[]);return(0,s.jsxs)("li",{className:"block border-b border-b-neutral-300 py-3.5",children:[(0,s.jsx)(h.r,{small:!0,checked:e,onChange:e=>{e.target.checked?g.current.forEach((e,t)=>{let s=i[t];e&&s&&c(s,e,{shouldDirty:!0})}):g.current=o(i)??[],t?.(e)},...a}
178),(0,s.jsx)(u.m,{mounted:e,onUnmounted:()=>{d(i,{keepValue:!0}),setTimeout(()=>{i.forEach(e=>{e&&c(e,0,{shouldDirty:!0})})},1)},className:"-m-1 overflow-hidden p-1",children:(0,s.jsx)("div",{className:"pb-2 pt-3",children:n})})]})},eL=({listing:e})=>{let{register:i,getValues:t}=(0,l.Gc)(),[n,a]=(0,r.useState)(!!(e.pricing.dailyUtilityCostColdest.majorAmount||e.pricing.dailyUtilityCostWarmest.majorAmount||e.pricing.dailyUtilityCostPerExtraParticipantColdest.majorAmount||e.pricing.dailyUtilityCostPerExtraParticipantWarmest.majorAmount||e.pricing.utilityCostParticipantsCap));return(0,s.jsxs)(eC,{checked:n,onChange:e=>{a(e.target.checked),e.target.checked&&i("features.evCharger",{value:t("features.evCharger")??T.VC.Undecided})},fieldNames:["pricing.dailyUtilityCostColdest.majorAmount","pricing.dailyUtilityCostWarmest.majorAmount","pricing.dailyUtilityCostPerExtraParticipantColdest.majorAmount","pricing.dailyUtilityCostPerExtraParticipantWarmest.majorAmount","pricing.utilityCostParticipantsCap"],label:(0,s.jsx)("span",{className:"mb-1 flex items-center",children:(0,s.jsx)(c.Z,{...eS.advancedFeesTitle})}),description:(0,s.jsx)("span",{className:"mb-2 block",children:(0,s.jsx)(c.Z,{...eS.advancedFeesDescription})}),children:[(0,s.jsx)(eN,{capacity:e.capacity,currency:e.pricing.currency,calendarUrl:z._j.hostListingCalendar(e.shortId)}),(0,s.jsxs)("section",{className:"mt-4",children:[(0,s.jsx)("h4",{className:"font-bold",children:(0,s.jsx)(c.Z,{...eS.evChargingNoticeTitle})}),(0,s.jsx)("p",{children:(0,s.jsx)(c.Z,{...eS.evChargingNoticeBody})}),(0,s.jsx)(ey.Z,{feature:"evCharger",light:!0,hideIcon:!0,className:"mt-3 bg-neutral-100 px-3.5",children:(0,s.jsx)(c.Z,{...eS.evChargingNoticeLabel})})]})]})},eS=(0,d.vU)({advancedFeesTitle:{defaultMessage:"Advanced pricing",id:"0l0nQgZKU7",description:"Host listing price page: Advanced fees: title"},advancedFeesDescription:{defaultMessage:"Add additional fees",id:"8lZM1zw4jy",description:"Host listing price page: Advanced fees: description"},evChargingNoticeTitle:{defaultMessage:"EV charging",id:"CWTSefVrvW",description:"Listing utility costs: Ev charging notice title"},evChargingNoticeBody:{defaultMessage:"Guests aren’t allowed to charge their EV in the holiday home unless there’s a dedicated charger for it. If you have one, we’ll show it on the website, and the guest will be asked to make further arrangements with you before arrival.",id:"Zl8lDITBCf",description:"Listing utility costs: Ev charging notice body"},evChargingNoticeLabel:{defaultMessage:"I have an EV charger",id:"70IPckhJBs",description:"Listing utility costs: Ev charging notice checkbox label"}}),ek=({listing:e})=>{let i=e.landfolkCleaningMode===T.c2.Automatic,[t,n]=(0,r.useState)(!!(e.pricing.cleaningFee?.majorAmount||i));if(!i||e.pricing.cleaningFee?.majorAmount)return(0,s.jsx)(eC,{checked:t,disabled:i,onChange:e=>{n(e.target.checked||i)},fieldNames:["pricing.cleaningFee.majorAmount"],label:(0,s.jsx)("span",{className:"mb-1 flex items-center",children:(0,s.jsx)(c.Z,{...eA.cleaningFeeTitle})}),description:(0,s.jsx)("span",{className:"mb-2 block",children:(0,s.jsx)(c.Z,{...i?eA.cleaningFeeDescriptionDisabled:eA.cleaningFeeDescription})}),children:(0,s.jsx)(ew.L,{disabled:i,name:"pricing.cleaningFee.majorAmount",label:!1,currency:e.pricing.currency,max:1e5,register:i?"off":"auto",defaultValue:i?e.pricing?.cleaningFee?.majorAmount:void 0})})},eA=(0,d.vU)({cleaningFeeTitle:{defaultMessage:"Cleaning fee",id:"90xJ/VeZhm",description:"Host listing price page: Cleaning fee: title"},cleaningFeeDescription:{defaultMessage:"Set this fee if you’d like bookings to include a fixed fee for cleaning and preparations",id:"HRncOfxulW",description:"Host listing price page: Cleaning fee: description"},cleaningFeeDescriptionDisabled:{defaultMessage:"This fee is set by Landfolk in agreement with our helpers who will clean and tidy up your holiday home. The fee and applicable VAT will be added to the booking price as you can see in the examples.",id:"bqa+5m21G7",description:"Host listing price page: Disabled cleaning fee: description"}}),eH=({listing:e})=>{let[i,t]=(0,r.useState)(!!e.pricing.petsFee?.majorAmount);return(0,s.jsx)(eC,{checked:i,onChange:e=>{t(e.target.checked)},fieldNames:["pricing.petsFee.majorAmount"],label:(0,s.jsx)("span",{className:"mb-1 flex items-center",children:(0,s.jsx)(c.Z,{...eE.petsFeeTitle})}),description:(0,s.jsx)("span",{className:"mb-2 block",children:(0,s.jsx)(c.Z,{...eE.petsFeeDescription})}),children:(0,s.jsx)(ew.L,{name:"pricing.petsFee.majorAmount",label:!1,
178currency:e.pricing.currency,max:1e5,defaultValue:e.pricing?.petsFee?.majorAmount,className:"mb-2 mt-3"})})},eE=(0,d.vU)({petsFeeTitle:{defaultMessage:"Pet fee",id:"lMy+dmBnG/",description:"Host listing price page: Pet fee: title"},petsFeeDescription:{defaultMessage:"Charge extra for guests bringing pets",id:"sFxZXXAQRj",description:"Host listing price page: Pet fee: description"}});var eZ=t(75997);let eD=({className:e})=>(0,s.jsx)(x.P,{type:"info",size:"small",className:e,children:(0,s.jsx)(c.Z,{...eI.pricingGuideNotice,values:{a:e=>(0,s.jsx)(eZ.z,{article:"howToSetAPriceForYourLandfolkHolidayHome",className:"underline",children:e})}})}),eI=(0,d.vU)({pricingGuideNotice:{defaultMessage:"We know that setting a price for your holiday home can be difficult. Please <a>read this article</a> for tips on how to set it right.",id:"o0CVmQ9H1i",description:"Host listing price page: Pricing guide notice"}}),eF=({listing:e})=>{let i=(0,ex.Z)();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eD,{className:"lg:mb-4 nl:mb-3.5"}),(0,s.jsx)("div",{className:"lg:mb-4 nl:mb-3.5",children:(0,s.jsx)(ew.L,{required:!0,name:"pricing.dailyPriceWeekday.majorAmount",label:i.formatMessage(eU.dailyPriceWeekdayLabel),description:i.formatMessage(eU.dailyPriceWeekdayDescription),currency:e.pricing.currency,max:1e7,min:1,className:"mb-2"})}),(0,s.jsx)("div",{children:(0,s.jsx)(ew.L,{required:!0,name:"pricing.dailyPriceWeekend.majorAmount",label:i.formatMessage(eU.dailyPriceWeekendLabel),description:i.formatMessage(eU.dailyPriceWeekendDescription),currency:e.pricing.currency,max:1e7,min:1,className:"mb-2"})})]})},eU=(0,d.vU)({dailyPriceWeekdayLabel:{defaultMessage:"Week price per night",id:"hW+7lE9UEc",description:"Host listing price page: Low season price input label"},dailyPriceWeekdayDescription:{defaultMessage:"Your price for 1 night Monday to Thursday",id:"DZg5x/tfRp",description:"Host listing price page: Low season price input description"},dailyPriceWeekendLabel:{defaultMessage:"Weekend price per night",id:"cehi1GFuIj",description:"Host listing price page: High season price input label"},dailyPriceWeekendDescription:{defaultMessage:"Your price for 1 night Friday to Sunday",id:"gKpPVHxV+A",description:"Host listing price page: High season price input description"}});var eT=t(55311),eB=t(59877);let eW=(0,d.vU)({title:{defaultMessage:"Are you sure?",id:"bIsknZUeZ7",description:"Host listing price page: Flat pricing confirmation dialog: title"},intro:{defaultMessage:"If you turn off seasonal pricing:",id:"bsZlm/78zE",description:"Host listing price page: Flat pricing confirmation dialog: intro"},seasonalAdjustmentNotice:{defaultMessage:"Your prices will no longer automatically adjust to seasons and holidays.",id:"eyM0m9rQUg",description:"Host listing price page: Flat pricing confirmation dialog: seasonal adjustments notice"},singlePriceNotice:{defaultMessage:"You can only set one price for all weekdays and one for all weekends.",id:"YXjVkiQGlT",description:"Host listing price page: Flat pricing confirmation dialog: single weekday and weekend price notice"},calendarUpdateNotice:{defaultMessage:"You can still update your prices manually in the calendar.",id:"kgbPe7LTWo",description:"Host listing price page: Flat pricing confirmation dialog: calendar update notice"},customPriceNotice:{defaultMessage:"If you have previously updated your prices in the calendar, those changes will remain in place even if you turn off seasonal pricing.",id:"0ocBxZKJKn",description:"Host listing price page: Flat pricing confirmation dialog: customised prices notice"},cancel:{defaultMessage:"Cancel",id:"2EnydX4ecL",description:"Host listing price page: Flat pricing confirmation dialog: cancel button label"},deactivate:{defaultMessage:"Deactivate",id:"0uWdk0dj3o",description:"Host listing price page: Flat pricing confirmation dialog: confirm button label"}}),eG=[{Icon:eB.Z,message:eW.seasonalAdjustmentNotice},{Icon:eB.Z,message:eW.singlePriceNotice},{Icon:eT.Z,message:eW.calendarUpdateNotice}],eR=({open:e,onOpenChange:i,onConfirm:t})=>(0,s.jsx)(L.GR,{open:e,onOpenChange:i,children:(0,s.jsxs)(L.Vq,{width:"sm",children:[(0,s.jsx)(L.GG,{float:!0}),(0,s.jsx)(L.fK,{children:(0,s.jsx)(L.$N,{asChild:!0,children:(0,s.jsx)("h1",{className:"w-full text-center font-bold sm:text-f4 ns:text-f3",children:(0,s.jsx)(c.Z,{...eW.title})})})}),(0,s.jsxs)(L.a7,{children:[(0,s.jsx)("p",{className:"mb-3 font-bold",children:(0,s.jsx)(c.Z,{...eW.intro})}),(0,s.jsx)("ul",{className:"mb-4 flex flex-col gap-1",children:eG.map(({Icon:e,message:i})=>(0,s.jsxs)("li",{className:"flex items-start gap-2.5",children:[(0,s.jsx)(e,{className:"mt-1 h-1 w-1 shrink-0"}),(0,s.jsx)("p",{children:(0,s.jsx)(c.Z,{...i})})]},i.defaultMessage))}),(0,s.jsx)(x.P,{type:"info",size:"compact",children:(0,s.jsx)(c.Z,{...eW.customPriceNotice})})]}),(0,s.jsxs)(L.cN,{className:"flex justify-between gap-x-3",children:[(0,s.jsx)(L.GG,{asChild:!0,children:(0,s.jsx)(ep.zx,{kind:"text",children:(0,s.jsx)(c.Z,{...eW.cancel})})}),(0,s.jsx)(L.GG,{asChild:!0,children:(0,s.jsx)(ep.zx,{danger:!0,onClick:t,children:(0,s.jsx)(c.Z,{...eW.deactivate})})})]})]})});var eV=t(95429),ez=t(48406),e_=t(14875);function eY({suggestedPrice:e,currentPrice:i,className:t,resetToSuggestion:n}
178){let a=i?.majorAmount||0,o=e?.majorAmount||0,r=e?.currency,[l]=(0,U.cF)(Math.round(a/o*100-100),200);if(!o||!r||l<5)return;let d="info";return l>10&&(d="warning"),l>25&&(d="error"),(0,s.jsx)(x.P,{type:d,size:"small",className:[t,"flex items-start space-x-3"].filter(Boolean).join(" "),children:(0,s.jsx)(c.Z,{defaultMessage:"Your price is <b>{percentage}% higher</b> than frequently booked houses in your area with a similar capacity. Unless your house has an extraordinary location or feature, you might receive fewer booking requests. To improve your chances, we suggest to <link>set your nightly price to {suggestedPrice}</link>.",id:"yCqtwPIdHg",values:{b:e=>(0,s.jsx)("b",{children:e}),percentage:l,link:e=>(0,s.jsx)("button",{type:"button",onClick:n,className:"cursor-pointer underline",children:e}),suggestedPrice:(0,s.jsx)(M.jM,{majorAmount:o,currency:r})}})},"price-feedback")}let e$=({listing:e,isInitialSetup:i,updatedByDeeplink:t})=>{let n=(0,ex.Z)(),{watch:a,setValue:o}=(0,l.Gc)(),d=a("pricing"),g=!!(e.pricing.suggestedDailyPriceHighSeason&&e.pricing.suggestedDailyPriceLowSeason),u=(0,r.useMemo)(()=>({suggestedPrice:{majorAmount:e.pricing.suggestedDailyPriceLowSeason?.majorAmount,currency:e.pricing.suggestedDailyPriceLowSeason?.currency},currentPrice:{majorAmount:d?.dailyPriceLowSeason?.majorAmount},resetToSuggestion:()=>{o("pricing.dailyPriceLowSeason.majorAmount",e.pricing.suggestedDailyPriceLowSeason?.majorAmount,{shouldDirty:!0}),e_.c.track({event:"Low Season Price Reset To Suggestions",listingShortId:e.shortId})}}),[e.pricing.suggestedDailyPriceLowSeason?.majorAmount,e.pricing.suggestedDailyPriceLowSeason?.currency,e.shortId,o,d?.dailyPriceLowSeason?.majorAmount]),p=(0,r.useMemo)(()=>({suggestedPrice:{majorAmount:e.pricing.suggestedDailyPriceHighSeason?.majorAmount,currency:e.pricing.suggestedDailyPriceHighSeason?.currency},currentPrice:{majorAmount:d?.dailyPriceHighSeason?.majorAmount},resetToSuggestion:()=>{o("pricing.dailyPriceHighSeason.majorAmount",e.pricing.suggestedDailyPriceHighSeason?.majorAmount,{shouldDirty:!0}),e_.c.track({event:"High Season Price Reset To Suggestions",listingShortId:e.shortId})}}),[e.pricing.suggestedDailyPriceHighSeason?.majorAmount,e.pricing.suggestedDailyPriceHighSeason?.currency,e.shortId,o,d?.dailyPriceHighSeason?.majorAmount]);return(0,s.jsxs)(s.Fragment,{children:[!g&&(0,s.jsx)(eD,{className:"mb-4"}),g&&i&&(0,s.jsx)(eq,{className:"mb-4"}),(0,s.jsx)("div",{className:"lg:mb-4 nl:mb-3.5",children:(0,s.jsx)(ez.k,{width:"auto",className:"-m-1",children:(0,s.jsxs)(eV.Q,{className:"p-1",children:[(0,s.jsx)(ew.L,{required:!0,name:"pricing.dailyPriceLowSeason.majorAmount",label:n.formatMessage(eQ.dailyPriceLowSeasonLabel),description:n.formatMessage(eQ.dailyPriceLowSeasonDescription),currency:e.pricing.currency,max:1e7,min:1},"low-season-price-input"),t&&e.pricing.suggestedDailyPriceLowSeason?.majorAmount===d?.dailyPriceLowSeason?.majorAmount&&(0,s.jsx)(x.P,{type:"success",size:"small",headline:(0,s.jsx)(c.Z,{...eQ.deepLinkLowSeasonPriceUpdatedTitle}),className:"mt-2",children:(0,s.jsx)(c.Z,{...eQ.deepLinkLowSeasonPriceUpdatedBody})},"low-season-price-updated"),(0,s.jsx)(eY,{...u,className:"mt-2"},"low-season-price-feedback")]})})}),(0,s.jsx)("div",{className:"lg:mb-4 nl:mb-3.5",children:(0,s.jsx)(ez.k,{width:"auto",className:"-m-1",children:(0,s.jsxs)(eV.Q,{className:"p-1",children:[(0,s.jsx)(ew.L,{required:!0,name:"pricing.dailyPriceHighSeason.majorAmount",label:n.formatMessage(eQ.dailyPriceHighSeasonLabel),description:n.formatMessage(eQ.dailyPriceHighSeasonDescription),currency:e.pricing.currency,max:1e7,min:1},"high-season-price-input"),(0,s.jsx)(eY,{...p,className:"mt-2"},"high-season-price-feedback")]})})})]})},eq=({className:e})=>(0,s.jsxs)(x.P,{type:"info",headline:(0,s.jsx)(c.Z,{...eQ.pricingSuggestionsNoticeTitle}),className:[e,"flex flex-col"].filter(Boolean).join(" "),children:[(0,s.jsx)("p",{children:(0,s.jsx)(c.Z,{...eQ.pricingSuggestionsNoticeBody})}),(0,s.jsx)(ep.zx,{type:"submit",size:"sm",className:"mt-3",children:(0,s.jsx)(c.Z,{...eQ.pricingSuggestionsNoticeButton})})]}),eQ=(0,d.vU)({pricingSuggestionsNoticeTitle:{defaultMessage:"We suggest these prices for you!",id:"tQWGz5W2EA",description:"Host listing price page: Pricing suggestions notice title"},pricingSuggestionsNoticeBody:{defaultMessage:"Our recommendations are based on similar holiday homes near yours. You can change your price below, but it might affect how many booking requests your get.",id:"3qf41X1vR+",description:"Host listing price page: Pricing suggestions notice body"},pricingSuggestionsNoticeButton:{defaultMessage:"Use suggested prices",id:"mKI4kENeEt",description:"Host listing price page: Pricing suggestions notice button"},deepLinkLowSeasonPriceUpdatedTitle:{defaultMessage:"Price saved!",id:"aVITzbmU3R",de
178scription:"Host listing price page: Pricing suggestions notice title"},deepLinkLowSeasonPriceUpdatedBody:{defaultMessage:"You have updated your nightly off-season prices to match our suggestion.",id:"OUBBaz73vW",description:"Host listing price page: Pricing suggestions notice body"},dailyPriceLowSeasonLabel:{defaultMessage:"Off-season price per night",id:"1BWOYPwNJC",description:"Host listing price page: Low season price input label"},dailyPriceLowSeasonDescription:{defaultMessage:"Your price for 1 night during the least attractive time of the year.",id:"P3v44iQVki",description:"Host listing price page: Low season price input description"},dailyPriceHighSeasonLabel:{defaultMessage:"High season price per night",id:"hk07TJSQ4N",description:"Host listing price page: High season price input label"},dailyPriceHighSeasonDescription:{defaultMessage:"Your price for 1 night during the most attractive time of the year.",id:"OjdCgcN5q5",description:"Host listing price page: High season price input description"}});function eO(){let e=(0,_.S)();return(0,s.jsx)(p.Q,{type:"button",onClick:()=>e.showArticle("shortGuideToSeasonalPricing"),className:"text-f7",children:(0,s.jsx)(c.Z,{defaultMessage:"Learn more about seasonal pricing",id:"jvuh6QcInw",description:"Seasonal pricing info: link"})})}let eX=e=>({...e,pricing:{...e.pricing,scheme:e.pricing.scheme??T.E5.Seasonal},promotionsConfig:{...e.promotionsConfig,lastMinutePromotionEnabled:e.promotionsConfig?.lastMinutePromotionEnabled??!1,lastMinutePromotionMaxDiscountRate:e.promotionsConfig?.lastMinutePromotionMaxDiscountRate??.3},features:D()(F()(e.features,"__typename"),e=>(0,W.p)(e.availability))});function eK({listing:e}){let i=(0,_.S)(),{cache:t}=(0,o.x)(),[n,d]=(0,r.useState)(!e.pricing?.scheme);(0,r.useEffect)(()=>{d(!e.pricing?.scheme)},[e.pricing?.scheme]);let[g,u]=(0,r.useState)(!1),[p,{loading:m,data:y,error:w}]=function(e){let i={...et,...e};return ei.D(ec,i)}({onCompleted:()=>{t.evict({id:`HostListing:${e.id}`,fieldName:"dateConfigurations"}),t.gc()}}),v=y?.updateListing?.success,P=w?.message||y?.updateListing?.errors[0]?.message,N=(0,E.u)({defaultValues:eX(e)}),{register:M,handleSubmit:C,formState:L,watch:S,setValue:A,reset:H}=N;M("pricing.scheme");let Z=S("pricing"),D=Z?.scheme===T.E5.Seasonal,I=S("pricing.dailyPriceHighSeason.majorAmount"),F=S("pricing.dailyPriceLowSeason.majorAmount"),W=S("pricing.dailyPriceWeekday.majorAmount"),q=S("pricing.dailyPriceWeekend.majorAmount"),Q=S("pricing.dailyUtilityCostColdest.majorAmount"),O=S("pricing.dailyUtilityCostWarmest.majorAmount"),X=(0,r.useRef)(I),K=(0,r.useRef)(F),J=(0,r.useRef)(W),es=(0,r.useRef)(q),en=(0,r.useRef)(e.pricing.scheme===T.E5.Seasonal),ea=(0,r.useRef)(!1),[eo]=(0,U.cF)((0,r.useMemo)(()=>({cleaningFee:Z?.cleaningFee?.majorAmount,dailyPriceHighSeason:I,dailyPriceLowSeason:F,dailyPriceWeekday:W,dailyPriceWeekend:q,dailyUtilityCostColdest:Q,dailyUtilityCostWarmest:O,petsFee:Z?.petsFee?.majorAmount,pricingScheme:Z?.scheme,participants:{adults:4,children:0,infants:0,pets:e.features.petsAllowed.availability===T.km.Available?1:0}}),[I,F,W,q,Q,O,Z?.cleaningFee?.majorAmount,Z?.petsFee?.majorAmount,Z?.scheme,e.features.petsAllowed.availability]),300),er=function(e){let i={...et,...e};return ee.a(el,i)}({variables:{shortId:e.shortId,...eo}}),ed=er.data??er.previousData,eg=w?void 0:ed?.viewer?.listing?.priceEstimations;(0,U.lR)(()=>{ea.current=!0},[I,F,W,q]),(0,r.useEffect)(()=>{D&&(!e.pricing.dailyPriceLowSeason&&e.pricing.suggestedDailyPriceLowSeason&&A("pricing.dailyPriceLowSeason.majorAmount",e.pricing.suggestedDailyPriceLowSeason.majorAmount,{shouldDirty:!0}),!e.pricing.dailyPriceHighSeason&&e.pricing.suggestedDailyPriceHighSeason&&A("pricing.dailyPriceHighSeason.majorAmount",e.pricing.suggestedDailyPriceHighSeason.majorAmount,{shouldDirty:!0}))},[D]);let eu=(0,r.useCallback)((i=e)=>{let t=eX(i);H(t),en.current=i.pricing.scheme===T.E5.Seasonal,A("features",t.features)},[H,A,e]),ep=(0,a.useRouter)(),eh=isNaN(Number(ep.query.daily_price_low_season))?void 0:Number(ep.query.daily_price_low_season);(0,r.useEffect)(()=>{eh&&p({variables:{input:{listingId:e.id,pricing:{dailyPriceLowSeason:{majorAmount:eh}}}}})},[eh]);let ef="DE"===e.address.country,ey=e.promotions.find(e=>"DiscountFirstBookingsPromotion"===e.__typename),ex=ey&&function({available:e,enabled:i,active:t}){return e||i&&t}(ey),{isPricingSetup:ej}=(0,G.g)(e),{showNextToast:eb}=(0,R.i)(e),ew=e.listingAgreement&&!e.listingAgreement.canEditPricing,ev=(0,r.useCallback)(async i=>{A("pricing.scheme",i,{shouldDirty:!0});let{data:t}=await p({variables:{input:{listingId:e.id,pricing:{scheme:i}}}}),s=t?.updateListing?.listing;t?.updateListing?.success&&eu(s)},[e.id,eu,A,p]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eR,{open:g,onOpenChange:u,onConfirm:()=>ev(T.E5.Flat)}),(0,s.jsx)(B.w,{...e,children:(0,s.jsx)($.d,{...e,discountFirstBookingsPromotionAvailable:ex,children:(0,s.jsx)(l.RV,{...N,children:(0,s.jsxs)("form",{onSubmit:C(async i=>{if(ea.current){let i={listingShortId:e.shortId,previous:Z?.scheme===T.E5.Seasonal?{dailyPriceHighSeason:X.current,dailyPriceLowSeason:K.current}:{dailyPriceWeekday:J.current,dailyPriceWeekend:es.current},current:Z?.scheme===T.E5.Seasonal?{dailyPriceHighSeason:I,dailyPriceLowSeason:F}:{dailyPriceWeekday:W,dailyPriceWeekend:q}};(0,V.j)({hostListingPriceUpdated:i})}let{data:t}=await p({variables:{input:{...i,listingId:e.id}}}),s=t?.updateListing?.listing;t?.updateListing?.success&&eu(s),ej||eb(R.m.PRICING_SETUP)}),children:[(0,s.jsx)(j.Q,{id:"rental-price",title:(0,s.jsx)(c.Z,{...eJ.rentalPriceSectionTitle}),children:ew?(0,s.jsx)(x.P,{children:(0,s.jsx)(c.Z,{...eJ.pricingHandledByLandfolk})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)(h.r,{checked:D,onChange:async()=>{D?en.current?u(!0):A("pricing.scheme",T.E5.Flat,{shouldDirty:!0}):await ev(T.E5.Seasonal)},label:(0,s.jsxs)("span",{className:"mb-1 flex items-center",children:[(0,s.jsx)(c.Z,{...eJ.seasonalPricingTitle}),ef&&(0,s.jsx)(f.C,{type:"dark",className:"ml-2",children:(0,s.jsx)(c.Z,{...eJ.beta})})]}),description:(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("span",{className:"mb-2 block",children:(0,s.jsx)(c.Z,{...ef?eJ.seasonalPricingBetaDescription:eJ.seasonalPricingDescription})})}),verticalAlign:"description",small:!0}),(0,s.jsx)(eO,{})]}),D?(0,s.jsx)(e$,{listing:e,isInitialSetup:n,updatedByDeeplink:!!(eh&&v)}):(0,s.jsx)(eF,{listing:e})]})}),!ew&&(0,s.jsx)(k,{estimate:eg,loading:er.loading,hasSetUtilityCosts:!!(Q||O),calendarUrl:z._j.hostListingCalendar(e.shortId),className:"mb-5 mt-4"}),(0,s.jsx)(j.Q,{id:"extra-fees",title:(0,s.jsx)(c.Z,{...eJ.extraFeesSectionTitle}
178),headlineStyles:["!scroll-m-6"],children:(0,s.jsxs)("ul",{className:"border-t border-t-neutral-300",children:[(0,s.jsx)(ek,{listing:e}),(0,s.jsx)(eH,{listing:e}),(0,s.jsx)(eL,{listing:e})]})}),ex&&(0,s.jsx)(em,{...ey}),(0,s.jsx)(b,{onSupportArticleClick:i.showArticle}),(0,s.jsx)(Y.J,{state:m?"loading":v?"success":P?"error":void 0,dirty:L.isDirty,onReset:()=>eu(e),errorMessage:P,layout:"withAside"})]})})})})]})}let eJ=(0,d.vU)({seasonalPricingTitle:{defaultMessage:"Seasonal pricing",id:"uVMtRosl2F",description:"Host listing price page: seasonal pricing toggle box title"},seasonalPricingDescription:{defaultMessage:"We set your prices based on previous seasonal trends in your holiday home area - always within your chosen price range.",id:"jW3kgXGvJp",description:"Host listing price page: seasonal pricing toggle box description"},seasonalPricingBetaDescription:{defaultMessage:"We’re working to develop seasonal prices in your area. We've made an estimate that takes weekends and most holidays into account, but it's important that you make sure the prices reflect your desired earnings. You can always change the prices manually in your calendar.",id:"TuZlp28xIw",description:"Host listing price page: seasonal pricing toggle box beta description"},rentalPriceSectionTitle:{defaultMessage:"Rental price",id:"9W0ZABBn4K",description:"Host listing price page: Rental price title"},pricingHandledByLandfolk:{defaultMessage:"Landfolk is handling your rental price setup and you cannot make changes to it yourself. Please reach out to us if you have any questions.",id:"0qzs7/dcQK",description:"Host listing price page: pricing handled by landfolk"},extraFeesSectionTitle:{defaultMessage:"Extra fees",id:"2zivFbjb5j",description:"Host listing price page: Extra fees: title"},beta:{defaultMessage:"Beta",id:"riw/yc06Nq"}});var e0=t(99650);function e1(){let{listingShortId:e}=(0,a.useRouter)().query;(0,e0.W)();let i=function(e){let i={...et,...e};return ee.a(er,i)}({variables:{shortId:e},skip:"string"!=typeof e});if("string"==typeof e)return(0,s.jsx)(n.G,{query:i,field:"viewer",children:({listing:e})=>
178{if(e)return(0,s.jsx)(eK,{listing:e})}})}},75997:function(e,i,t){"use strict";t.d(i,{z:function(){return a}});var s=t(97458),n=t(11133);function a({article:e,onClick:i,className:t,...a}){let o=(0,n.S)();return(0,s.jsx)("button",{type:"button",onClick:t=>{i?.(t),o.showArticle(e)},className:t,...a})}},25959:function(e,i,t){"use strict";t.d(i,{J:function(){return o}});var s=t(97458),n=t(61959),a=t(81641);function o({state:e,dirty:i,onReset:t,errorMessage:o,layout:r="default",className:l,disabled:c}){let d="loading"===e||!i;return(0,s.jsx)("div",{className:l,children:(0,s.jsx)("div",{className:["fixed bottom-0 left-0 right-0 z-navigation bg-white shadow-md transition-transform pr-[var(--removed-body-scroll-bar-size,0px)]",i||"loading"===e?"translate-y-0 delay-[0ms] duration-300 ease-out":"translate-y-full delay-[3000ms] duration-700 ease-in-out"].filter(Boolean).join(" "),children:(0,s.jsx)("div",{className:"p-3 lg:mx-auto lg:grid lg:max-w-page-xl lg:grid-cols-12 lg:gap-3 lg:px-5",children:(0,s.jsxs)("div",{className:["rightColumn"===r&&"lg:col-start-7 lg:col-end-12","withAside"===r&&"lg:col-start-5 lg:col-end-12"].filter(Boolean).join(" "),children:[(0,s.jsxs)("div",{className:"flex items-center nl:justify-between",children:[t&&(0,s.jsx)("button",{type:"button",onClick:t,disabled:d,className:["underline transition hover:text-forest-700 lg:order-2",d&&i&&"opacity-10",!i&&"opacity-0"].filter(Boolean).join(" "),children:(0,s.jsx)(a.Z,{defaultMessage:"Cancel",id:"HYfUK5l4qR",description:"My profile: cancel changes made to the form"})}),(0,s.jsx)(n.zx,{type:"submit",state:e,stateTimeout:2e3,disabled:!i||c,className:"ml-3 lg:ml-0 lg:mr-3 lg:w-auto",children:(0,s.jsx)(a.Z,{defaultMessage:"Save changes",id:"f6TX0QJlJ+",description:"My profile: save changes made to the form"})})]}),o&&(0,s.jsx)("p",{className:"mt-2 text-f6 text-error",children:o})]})})})})}},35488:function(e,i,t){"use strict";t.d(i,{i:function(){return o}});var s=t(97458),n=t(47340),a=t(52983);
178let o=(0,a.forwardRef)(function({scale:e,onChange:i,onValueCommit:t,onValueChange:o,onInteractionStart:r,onInteractionEnd:l,className:c,...d},g){let u=(0,a.useMemo)(()=>{let i=d.value||d.defaultValue;return e?.inverse?i?.map(e.inverse):i},[e?.inverse,d.value,d.defaultValue]);return(0,s.jsxs)(n.fC,{onValueCommit:e=>{l?.(),t?.(e)},onValueChange:t=>{r?.(),i?.(t.map(i=>e?.transform?e.transform(i):i)),o?.(t.map(i=>e?.transform?e.transform(i):i))},...d,value:u,ref:g,className:[c,"relative flex touch-manipulation select-none items-center bg-transparent data-[orientation=horizontal]:h-1 data-[orientation=vertical]:w-1"].filter(Boolean).join(" "),children:[(0,s.jsx)(n.fQ,{className:"relative grow bg-neutral-300 data-[orientation=horizontal]:h-[2px] data-[orientation=vertical]:w-[2px]",children:(0,s.jsx)(n.e6,{className:"absolute bg-confirmation data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"})}),u?.map((i,t)=>s.jsx(n.bU,{"aria-valuenow":e?.transform?e.transform(i):void 0,className:"block h-1 w-1 rounded-full bg-confirmation shadow-sm transition-all focus:scale-110 focus:ring-4 focus:ring-confirmation focus:ring-opacity-10 active:scale-110 active:ring-2 active:ring-white sm:h-2 sm:w-2 can-hover:hover:scale-125"},t))]})})},54585:function(e,i,t){"use strict";t.d(i,{L:function(){return r}});var s=t(97458),n=t(1168),a=t(19330),o=t(59365);function r({currency:e,placeholder:i,validation:t,...r}){let l=(0,n.Z)();return(0,s.jsx)(o.I,{...r,type:"number",prefix:e,placeholder:i??l.formatNumber(0,{minimumFractionDigits:2}),validation:{valueAsNumber:!1,setValueAs:e=>"number"==typeof e||e===a.km?e:""===e?a.km:Number(e),...t}})}},22177:function(e,i,t){"use strict";t.d(i,{_:function(){return n}});var s=t(47014);function n(e){let[i,t]=(0,s.YD)({threshold:1,rootMargin:"-1px 0px -1px 0px",initialInView:!0,...e});return{ref:i,isSticky:!t}}}},function(e){e.O(0,[1367,6028,5809,5483,7746,6414,1853,3574,7340,1645,7454,625,158,1524,6547,1767,5021,5814,8168,2888,9774,179],function(){return e(e.s=20644)}),_N_E=e.O()}]);
179//# sourceMappingURL=pricing-937f472ad335c281.js.map

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