1import{a as Ue}from"./chunk-XEL22CM6.js";import{a as ye,c as he,d as Fe}from"./chunk-OGRBR3CY.js";import{a as $e}from"./chunk-MFQA3JVP.js";import{a as Ne}from"./chunk-QCAN7S3L.js";import"./chunk-YPGEPCCE.js";import"./chunk-KOEKGIOJ.js";import"./chunk-ZXI4VZGZ.js";import"./chunk-MW32WWIK.js";import"./chunk-COAKN2MX.js";import"./chunk-JOL524W4.js";import{a as Le}from"./chunk-IW2UOT3G.js";import"./chunk-YYMW6PUU.js";import"./chunk-YSE3ND72.js";import{a as ve,b as Me,d as be}from"./chunk-J2Z7QPQA.js";import"./chunk-PPHM6GXD.js";import"./chunk-2K7E3S2U.js";import"./chunk-CCMACI33.js";import"./chunk-DO3FGHQD.js";import"./chunk-JCSESH2J.js";import"./chunk-SYHXPIWY.js";import"./chunk-GLFJMVTU.js";import"./chunk-7E7WVJAW.js";import"./chunk-UZR6VFPG.js";import"./chunk-PHYKRJFI.js";import"./chunk-JGPCN62Y.js";import"./chunk-BQ5C4YUN.js";import"./chunk-G2WNBUZW.js";import"./chunk-OOHCB7D4.js";import"./chunk-ECDTEDEZ.js";import"./chunk-KPAGQI66.js";import"./chunk-ZDTU7YMQ.js";import"./chunk-INJMAYG3.js";import"./chunk-FVG77HMA.js";import{a as fe}from"./chunk-5P6XQABN.js";import{f as Pe}from"./chunk-OVGPRL77.js";import"./chunk-APZSKP2S.js";import{a as Ie}from"./chunk-53MVBNEN.js";import{h as oe}from"./chunk-RVTINMFF.js";import{a as We}from"./chunk-NPUNOIRL.js";import"./chunk-IUKVZ62K.js";import"./chunk-FSVMYTLF.js";import"./chunk-ZD3CEWXG.js";import"./chunk-HXP5L5ZV.js";import"./chunk-R5HHLNRP.js";import"./chunk-EVV2DOEW.js";import"./chunk-4ULU7FGM.js";import"./chunk-JC7MHMTM.js";import"./chunk-QWF5VYAS.js";import"./chunk-IRENRCFR.js";import"./chunk-BUBGHNDZ.js";import"./chunk-5GS3QR7H.js";import"./chunk-D22K4JI4.js";import"./chunk-OLYVZWCV.js";import"./chunk-IZUO562Y.js";import"./chunk-EPKHUYLQ.js";import"./chunk-X2RCV4LG.js";import"./chunk-QPUYZBAW.js";import"./chunk-5FFKWPA2.js";import{a as ce}from"./chunk-NURIXNLT.js";import"./chunk-TLNRIP4G.js";import"./chunk-ZTHYKD22.js";import"./chunk-5GUWLVV5.js";import"./chunk-QKHSI6KH.js";import"./chunk-WHEHVMAA.js";import"./chunk-FRP7PEI4.js";import"./chunk-7GB2H7DU.js";import"./chunk-MJXFXCGO.js";import"./chunk-2A2LFZKU.js";import{Ha as ge,ee as De,ta as ue}from"./chunk-RQ4WSQDN.js";import{c as me,d as pe}from"./chunk-5UCOJBJI.js";import{D as Te,G as Ce,c as le,f as ae,g as Ee,m as re,t as Ae,u as de,v as Se,w as se,x as Ge}from"./chunk-H7R3FY4F.js";import{c as Re}from"./chunk-UG7YN4RB.js";import"./chunk-HF2B77MC.js";import{d as ie}from"./chunk-SX2H7FAR.js";import{l as _e}from"./chunk-D6ZGPUYW.js";import"./chunk-XMT76HNJ.js";import"./chunk-ZFPQERPS.js";import"./chunk-E7QVDSDT.js";import"./chunk-TSRUDDSM.js";import{Kc as T,Lc as u,Mc as te,Ob as Q,Qb as g,Sb as D,Ub as C,Vb as m,Wb as p,X as q,Xb as r,Yb as t,Yc as ne,Zb as e,_b as d,cb as J,cc as Y,dc as Z,hb as l,ka as G,oc as _,od as R,tc as s,vc as ee,zb as K}from"./chunk-WSK7M3ME.js";import"./chunk-JECSBBV3.js";import"./chunk-XO6N3PVE.js";function Xe(a,E){if(a&1&&(t(0,"option",38),T(1),e()),a&2){let o=E.$implicit;r("value",o),l(),u(o);}}function ze(a,E){if(a&1&&(t(0,"option",38),T(1),Y(2),_(3,19),Z(),e()),a&2){let o=E.$implicit;r("value",o),l(),te("",o," ");}}function xe(a,E){if(a&1&&(t(0,"option",38),T(1),e()),a&2){let o=E.$implicit;r("value",o),l(),u(o);}}function Be(a,E){a&1&&(t(0,"code"),_(1,20),e());}function ke(a,E){if(a&1&&(t(0,"div",56),d(1,"iframe",58),e()),a&2){let o=ee();l(),Q("srcdoc",o.previewHtml(),J);}}function He(a,E){a&1&&(t(0,"div",57),_(1,21),e());}var we=class a{fb=G(Te).nonNullable;router=G(oe);authState=G(Ie);sanitizer=G(_e);amplitude=G(ce);helpArticleId=Ne.calendarWidgets;calendarsNumOpts=[1,3,6,9,12];fontSizeOpts=[12,13,14,15,16,17,18,19,20,21,22,23,24];fontFamilies=Ue;form=this.fb.group({rentalId:"",calendarEndpoint:ye(),calendarNum:3,availableBGColor:"#CCF2ED",availableColor:"#33475C",unavailableBGColor:"#FCDDDE",unavailableColor:"#33475C",fontFamily:"Arial",fontSize:14,sundayFirst:!0});formValue=ie(this.form.valueChanges.pipe(q(this.form.getRawValue())),{initialValue:this.form.getRawValue()});widgetCode=R(()=>Fe({rental_id:this.formValue().rentalId??"",rental_account:`${this.authState.user()?.account??""}`,calendar_endpoint:this.formValue().calendarEndpoint??"",calendar_months:Number(this.formValue().calendarNum)||3,available_bg_color:this.formValue().availableBGColor??"",available_color:this.formValue().availableColor??"",unavailable_bg_color:this.formValue().unavailableBGColor??"",unavailable_color:this.formValue().unavailableColor??"",font_family:this.formValue().fontFamily??"",font_size:Number(this.formValue().fontSize)||14,sunday_first:this.formValue().sundayFirst??!0}));previewHtml=R(()=>this.sanitizer.bypassSecurityTrustHtml(he(this.widgetCode())));constructor(){this.amplitude.logEvent("widgets-calendar-view");}goBack(){this.router.navigate(["/widgets"]);}copyCode(){let E=this.widgetCode();E&&navigator.clipboard.writeText(E).then(()=>this.amplitude.logEvent("widgets-calendar-copy")).then(()=>import("./chunk-43I63AVE.js").then(({toast:o})=>
1o.success("Code copied to clipboard")));}setColor(E,o){this.form.controls[E].setValue(o);}static ɵfac=function(o){return new(o||a)();};static ɵcmp=K({type:a,selectors:[["app-calendar-widget-page"]],hostAttrs:[1,"block","p-6"],features:[ne([],[me({lucideCircleHelp:ue,lucideCopy:ge})])],decls:97,vars:11,consts:()=>{let E;E="Calendar Widget";let o;o="Create a legacy-compatible availability embed for a selected rental.";let i;i="Select rental";let S;S="Available background color hex value";let A;A="Available color hex value";let c;c="Unavailable color hex value";let I;I="Unavailable color hex value";let P;P="Back to Widgets";let f;f=" Widget Configuration ";let W;W=" Adjust the visual settings below, then paste the generated embed code into your website. ";let N;N=" 1. Select a Rental ";let L;L="Rental";let v;v=" 2. Widget Style ";let M;M="Font Family";let b;b="Font Size";let $;$="Available Background Color";let y;y="Available Color";let h;h="Unavailable Background Color";let F;F="Unavailable Color";let U;U="Visible Months";let w;w=" The calendar widget reads availability from Sympl and renders the same script bundle used by legacy Sympl embeds. ";let X;X=" Widget Code ";let z;z=" Copy the embed snippet below and place it where you want the calendar to appear. ";let x;x="Copy Code";let B;B=" Preview ";let k;k=" The preview uses the generated embed code directly inside an iframe. ";let H;H="px";let V;V="Select a rental to generate the widget code.";let O;O="Calendar widget preview";let j;return j=" The preview becomes available after you select a rental. ",[P,f,W,N,L,v,M,b,$,y,h,F,U,w,X,z,x,B,k,H,V,j,[1,"space-y-6"],["title",E,"subtitle",o,3,"showBackButton"],["pageHeaderIcons","",3,"articleId"],["pageHeaderActions",""],["hlmBtn","","variant","secondary",3,"click"],[1,"grid","items-start","gap-5","xl:grid-cols-[minmax(0,1.08fr)_minmax(380px,0.92fr)]"],[1,"rounded-[var(--card-r)]","border","border-(--card-bd)","bg-(--card-bg)","p-6","shadow-(--card-sh)"],[1,"space-y-6",3,"formGroup"],[1,"space-y-1"],[1,"text-[length:var(--fs-h2)]","font-semibold","leading-[var(--lh-h2)]","text-(--ink-900)"],[1,"text-[length:var(--fs-body)]","leading-[var(--lh-body)]","text-(--ink-500)"],[1,"grid","gap-5","md:grid-cols-2"],[1,"text-[length:var(--fs-label)]","font-semibold","text-(--ink-900)","md:col-span-2"],["hlmLabel",""],["customInput","","formControlName","rentalId","variant","borderless","placeholder",i],["hlmInput","","formControlName","fontFamily","variant","borderless",1,"w-full"],[3,"value"],["hlmInput","","formControlName","fontSize","variant","borderless",1,"w-full"],["hlmInputGroup","","customInput","",1,"border-0","shadow-none"],["hlmInputGroupAddon",""],["type","color",1,"size-6","rounded-[8px]","border-0","bg-transparent","p-0",3,"input","value"],["hlmInputGroupInput","","formControlName","availableBGColor","type","text","aria-label",S],["hlmInputGroupInput","","formControlName","availableColor","type","text","aria-label",A],["hlmInputGroupInput","","formControlName","unavailableBGColor","type","text","aria-label",c],["hlmInputGroupInput","","formControlName","unavailableColor","type","text","aria-label",I],["hlmInput","","formControlName","calendarNum","variant","borderless",1,"w-full"],[1,"rounded-[var(--tile-r)]","border","border-(--blue-100)","bg-(--blue-50)","p-4","text-[length:var(--fs-label)]","leading-[var(--lh-body)]","text-(--blue-700)"],[1,"flex","items-start","gap-2"],["hlm","","name","lucideCircleHelp","size","sm",1,"mt-1","shrink-0"],[1,"flex","items-center","justify-between","gap-4"],["hlmBtn","","type","button",1,"gap-2","whitespace-nowrap",3,"click","disabled"],["hlm","","name","lucideCopy","size","sm"],[1,"mt-4","max-h-[260px]","overflow-auto","rounded-[var(--tile-r)]","border","border-(--line-2)","bg-(--canvas)","p-4","text-[length:var(--fs-meta)]","leading-5","text-(--ink-700)"],[1,"mt-1","text-[length:var(--fs-body)]","leading-[var(--lh-body)]","text-(--ink-500)"],[1,"mt-4","h-[500px]","overflow-hidden","rounded-[var(--tile-r)]","border","border-(--line-2)","bg-(--card-bg)"],[1,"mt-4","rounded-[var(--tile-r)]","border","border-dashed","border-(--line)","bg-(--canvas)","px-4","py-10","text-center","text-[length:var(--fs-body)]","text-(--ink-500)"],["title",O,1,"h-full","w-full"]];},template:function(o,i){o&1&&(t(0,"div",22)(1,"app-page-header",23),d(2,"app-help-icons",24),t(3,"div",25)(4,"button",26),s("click",function(){return i.goBack();}),_(5,0),e()()(),t(6,"div",27)(7,"section",28)(8,"form",29)(9,"div",30)(10,"h2",31),_(11,1),e(),t(12,"p",32),_(13,2),e()(),t(14,"div",33)(15,"div",34),_(16,3),e(),t(17,"hlm-outlined-field")(18,"label",35),_(19,4),e(),d(20,"app-rental-select",36),e(),t(21,"div",34),_(22,5),e(),t(23,"hlm-outlined-field")(24,"label",35),_(25,6),e(),t(26,"select",37),m(27,Xe,2,2,"option",38,C),e()(),t(29,"hlm-outlined-field")(30,"label",35),_(31,7),e(),t(32,"select",39),m(33,ze,4,2,"option",38,C),e()(),t(35,"hlm-outlined-field")(36,"label",35),_(37,8),e(),t(38,"div",40)(39,"span",41)(40,"input",42),s("input",function(A){return i.setColor("availableBGColor",A.target.value);}),e()(),d(41,"input",43),e()(),t(42,"hlm-outlined-field")(43,"label",35),_(44,9),e(),t(45,"div",40)(46,"span",41)(47,"input",42),s("input",function(A){return i.setColor("availableColor",A.target.value);}),e()(),d(48,"input",44),e()(),t(49,"hlm-outlined-field")(50,"label",35),_(51,10),e(),t(52,"div",40)(53,"span",41)(54,"input",42),s("input",function(A){return i.setColor("unavailableBGColor",A.target.value);}),e()(),d(55,"input",45),e()(),t(56,"hlm-outlined-field")(57,"label",35),_(58,11),e(),t(59,"div",40)(60,"span",41)(61,"input",42),s("input",function(A){return i.setColor("unavailableColor",A.target.value);}),e()(),d(62,"input",46),e()(),t(63,"hlm-outlined-field")(64,"label",35),_(65,12),e(),t(66,"select",47),m(67,xe,2,2,"option",38,C),e()()()()(),t(69,"section",22)(70,"div",48)(71,"div",49),d(72,"ng-icon",50),t(73,"p"),_(74,13),e()()(),t(75,"div",28)(76,"div",51)(77,"div")(78,"h2",31),_(79,14),e(),t(80,"p",32),_(81,15),e()(),t(82,"button",52),s("click",function(){return i.copyCode();}),d(83,"ng-icon",53),t(84,"span"),_(85,16),e()()(),t(86,"pre",54)(87,"code"),T(88),e(
1),g(89,Be,2,0,"code"),e()(),t(90,"div",28)(91,"h2",31),_(92,17),e(),t(93,"p",55),_(94,18),e(),g(95,ke,2,1,"div",56)(96,He,2,0,"div",57),e()()()()),o&2&&(l(),r("showBackButton",!1),l(),r("articleId",i.helpArticleId),l(6),r("formGroup",i.form),l(19),p(i.fontFamilies),l(6),p(i.fontSizeOpts),l(7),r("value",i.form.controls.availableBGColor.value),l(7),r("value",i.form.controls.availableColor.value),l(7),r("value",i.form.controls.unavailableBGColor.value),l(7),r("value",i.form.controls.unavailableColor.value),l(6),p(i.calendarsNumOpts),l(15),r("disabled",!i.widgetCode()),l(6),u(i.widgetCode()),l(),D(i.widgetCode()?-1:89),l(6),D(i.widgetCode()?95:96));},dependencies:[Ce,re,se,Ge,le,Se,ae,Ee,de,Ae,pe,$e,We,Le,Pe,Re,De,fe,ve,Me,be],encapsulation:2,changeDetection:0});};export{we as CalendarWidgetPageComponent};/**i18n:d8a016f29a2176cd812bc05ea24c5a0062b07c41e1d9ecf7f4690d1a67273969*/
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.