PageSourceSearch

https://roiscale.ai/chunk-TZ5VZ4GV.js

js roiscale.ai collected 2026-10-05 14:44:13 UTC 14,579 bytes, 1 lines download raw bytes

1import{a as tt}from"./chunk-QUVHIJGT.js";import{d as V}from"./chunk-PFFI2ISF.js";import"./chunk-V6GSNGFJ.js";import"./chunk-5VPXBEUU.js";import"./chunk-VZWI2VH6.js";import{A as Z,b as j,c as C,d as W,e as B,i as G,p as Q,q as U,r as K,s as Y,t as H,w as X,y as J}from"./chunk-P5GJR4AC.js";import"./chunk-ME32OR76.js";import{r as A}from"./chunk-A7ET6VDF.js";import"./chunk-RGZ4OJ2S.js";import{D as z,z as $}from"./chunk-BQVU46A6.js";import{$a as w,Ab as h,C as P,I as S,Ib as q,Mb as N,Na as l,Ob as p,Qb as F,Rb as D,S as b,Sb as L,X as E,Y as k,Yb as c,Zb as _,_b as y,d as O,gc as R,ha as g,pb as M,rb as m,sa as T,sb as u,ub as I,vb as x,wb as v,xb as f,yb as o,zb as i}from"./chunk-NLDCKMPI.js";import"./chunk-ODN5LVDJ.js";var et=["captchaContainer"],nt=()=>[],it=(e,a)=>a.id,ot=(e,a)=>a.key;function rt(e,a){e&1&&(o(0,"div",2),h(1,"div",5),o(2,"p"),c(3,"Loading\u2026"),i()())}function at(e,a){e&1&&(o(0,"section",3)(1,"h1"),c(2,"Thanks, we have your request"),i(),o(3,"p",6),c(4," Your reference is "),o(5,"strong",7),c(6),i()(),o(7,"p"),c(8,"We have emailed a confirmation to you. Our team will reply to that address."),i()()),e&2&&(l(6),_(a))}function lt(e,a){if(e&1&&(o(0,"p",9),c(1),i()),e&2){let t=p();l(),_(t.introBody)}}function ct(e,a){e&1&&(o(0,"p",10),c(1,"This contact form is not available right now."),i())}function dt(e,a){if(e&1&&(o(0,"p",9),c(1),i()),e&2){let t=p(2);l(),_(t.formDescription)}}function pt(e,a){e&1&&(o(0,"p",12),c(1,"Contact options are not set up yet. Please check back soon."),i())}function st(e,a){if(e&1&&(o(0,"p",13),c(1),i()),e&2){let t=p(4);l(),_(t.error())}}function mt(e,a){if(e&1&&(o(0,"option",20),c(1),i()),e&2){let t=a.$implicit;f("value",t.id),l(),_(t.label)}}function ut(e,a){e&1&&(o(0,"span",21),c(1,"Pick the topic that fits best."),i())}function _t(e,a){e&1&&(o(0,"span",21),c(1,"Enter a valid email address so we can reply."),i())}function ft(e,a){e&1&&(o(0,"span",17),c(1,"*"),i())}function ht(e,a){if(e&1&&h(0,"textarea",32),e&2){let t=p().$implicit;f("id","support-"+t.key)("formControlName",t.key)("placeholder",t.placeholder||""),M("maxlength",t.maxLength||null)}}function Ct(e,a){if(e&1&&(o(0,"option",20),c(1),i()),e&2){let t=a.$implicit;f("value",t),l(),_(t)}}function gt(e,a){if(e&1&&(o(0,"select",33)(1,"option",19),c(2,"Select an option"),i(),x(3,Ct,2,2,"option",20,I),i()),e&2){let t=p().$implicit;f("id","support-"+t.key)("formControlName",t.key),l(3),v(t.options||R(2,nt))}}function bt(e,a){if(e&1&&h(0,"input",34),e&2){let t=p().$implicit;f("id","support-"+t.key)("type",t.type==="EMAIL"?"email":"text")("formControlName",t.key)("placeholder",t.placeholder||""),M("maxlength",t.maxLength||null)}}function xt(e,a){if(e&1&&(o(0,"span",21),c(1),i()),e&2){let t=p().$implicit;l(),y("",t.label," is required.")}}function vt(e,a){if(e&1&&(o(0,"div",15)(1,"label",31),c(2),m(3,ft,2,0,"span",17),i(),m(4,ht,1,4,"textarea",32)(5,gt,5,3,"select",33)(6,bt,1,5,"input",34),m(7,xt,2,1,"span",21),i()),e&2){let t,n,d=a.$implicit,r=p(4);l(),f("for","support-"+d.key),l(),y(" ",d.label," "),l(),u(d.required?3:-1),l(),u((t=d.type)==="TEXTAREA"?4:t==="SELECT"?5:6),l(3),u((n=r.form.get(d.key))!=null&&n.invalid&&((n=r.form.get(d.key))!=null&&n.touched)?7:-1)}}function yt(e,a){e&1&&h(0,"div",29,0)}function Pt(e,a){if(e&1){let t=q();m(0,st,2,1,"p",13),o(1,"form",14),N("ngSubmit",function(){E(t);let d=p(3);return k(d.submit())}),o(2,"div",15)(3,"label",16),c(4,"What is this about? "),o(5,"span",17),c(6,"*"),i()(),o(7,"select",18)(8,"option",19),c(9,"Choose a topic"),i(),x(10,mt,2,2,"option",20,it),i(),m(12,ut,2,0,"span",21),i(),o(13,"div",15)(14,"label",22),c(15,"Your name"),i(),h(16,"input",23),i(),o(17,"div",15)(18,"label",24),c(19,"Email "),o(20,"span",17),c(21,"*"),i()(),h(22,"input",25),m(23,_t,2,0,"span",21),i(),x(24,vt,8,5,"div",15,ot),o(26,"div",26)(27,"label",27),c(28,"Website"),i(),h(29,"input",28),i(),m(30,yt,2,0,"div",29),o(31,"button",30),c(32),i()()}if(e&2){let t,n,d=p(2),r=p();u(r.error()?0:-1),l(),f("formGroup",r.form),l(9),v(d.categories),l(2),u((t=r.form.get("categoryId"))!=null&&t.invalid&&((t=r.form.get("categoryId"))!=null&&t.touched)?12:-1),l(11),u((n=r.form.get("email"))!=null&&n.invalid&&((n=r.form.get("email"))!=null&&n.touched)?23:-1),l(),v(r.fields),l(6),u(r.captchaEnabled?30:-1),l(),f("disabled",r.isSubmitting()),l(),y(" ",r.isSubmitting()?"Sending\u2026":"Send request"," ")}}function St(e,a){if(e&1&&(o(0,"section",11)(1,"h2"),c(2),i(),m(3,dt,2,1,"p",9),m(4,pt,2,0,"p",12)(5,Pt,33,7),i()),e&2){let t=p();l(2),_(t.formTitle||"Get in touch"),l(),u(t.formDescription?3:-1),l(),u(t.categories.length===0?4:5)}}function Mt(e,a){if(e&1&&(o(0,"header",8)(1,"h1"),c(2),i(),m(3,lt,2,1,"p",9),i(),m(4,ct,2,0,"p",10)(5,St,6,3,"section",11)),e&2){let t=a;
1l(2),_(t.introTitle||"Support"),l(),u(t.introBody?3:-1),l(),u(t.published===!1?4:5)}}function Ot(e,a){if(e&1&&(o(0,"p",4),c(1),i()),e&2){let t=p();l(),_(t.error()||"Support is not available for this site.")}}var $t=(()=>{class e{constructor(){this.siteState=b(V),this.supportService=b(tt),this.fb=b(J),this.platformId=b(T),this.destroy$=new O,this.site=this.siteState.currentSite,this.hub=g(null),this.isLoading=g(!0),this.isSubmitting=g(!1),this.error=g(null),this.ticketNumber=g(null),this.captchaToken=null,this.captchaRendered=!1}set captchaContainerRef(t){this.captchaContainer=t,this.tryRenderCaptcha()}get basePath(){let t=this.site()?.slug;return t?`/sites/${t}`:""}get fields(){return this.hub()?.fields||[]}get captchaEnabled(){return this.hub()?.captchaEnabled===!0&&!!this.hub()?.captchaSiteKey}ngOnInit(){this.form=this.fb.group({categoryId:["",C.required],name:[""],email:["",[C.required,C.email]],website:[""]});let t=this.site()?.tenantId;if(!t){this.isLoading.set(!1),this.error.set("Support is not available for this site.");return}this.supportService.getPublicHub(t).pipe(S(this.destroy$),P(()=>this.isLoading.set(!1))).subscribe({next:n=>{this.hub.set(n),this.addFieldControls(n.fields||[]),n.categories?.length===1&&this.form.patchValue({categoryId:n.categories[0].id}),this.tryRenderCaptcha()},error:()=>this.error.set("We could not load the support page. Please try again later.")})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}submit(){let t=this.site()?.tenantId;if(!t||this.form.invalid){this.form.markAllAsTouched();return}if(this.captchaEnabled&&!this.captchaToken){this.error.set("Please complete the verification challenge.");return}let n=this.form.value,d={};for(let r of this.fields){let s=n[r.key];s!=null&&s!==""&&(d[r.key]=s)}this.isSubmitting.set(!0),this.error.set(null),this.supportService.submitPublicForm(t,{categoryId:n.categoryId,name:n.name||void 0,email:n.email,values:d,website:n.website||void 0,captchaToken:this.captchaToken||void 0}).pipe(S(this.destroy$),P(()=>this.isSubmitting.set(!1))).subscribe({next:r=>this.ticketNumber.set(r.ticketNumber),error:r=>{this.error.set(r?.error?.detail||"We could not send your request. Please try again."),this.resetCaptcha()}})}addFieldControls(t){for(let n of t){let d=n.required?[C.required]:[];n.type==="EMAIL"&&d.push(C.email),n.maxLength&&d.push(C.maxLength(n.maxLength)),this.form.addControl(n.key,this.fb.control("",d))}}tryRenderCaptcha(){if(this.captchaRendered||!z(this.platformId))return;let t=this.hub(),n=this.captchaContainer?.nativeElement;if(!t?.captchaEnabled||!t.captchaSiteKey||!t.captchaProvider||!n)return;this.captchaRendered=!0;let d=t.captchaProvider;this.loadCaptchaScript(d).then(()=>{let r=this.captchaApi(d);r&&(this.captchaWidgetId=r.render(n,{sitekey:t.captchaSiteKey,callback:s=>{this.captchaToken=s}}))}).catch(()=>this.error.set("Verification could not be loaded. Please refresh and try again."))}resetCaptcha(){this.captchaToken=null;let t=this.hub()?.captchaProvider;t&&this.captchaApi(t)?.reset(this.captchaWidgetId)}captchaApi(t){let n=window;return t==="TURNSTILE"?n.turnstile:n.hcaptcha}loadCaptchaScript(t){let n=t==="TURNSTILE"?"https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit":"https://js.hcaptcha.com/1/api.js?render=explicit";return document.querySelector(`script[src="${n}"]`)?Promise.resolve():new Promise((d,r)=>{let s=document.createElement("script");s.src=n,s.async=!0,s.defer=!0,s.onload=()=>d(),s.onerror=()=>r(new Error("Failed to load the verification script")),document.head.appendChild(s)})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=w({type:e,selectors:[["app-public-support"]],viewQuery:function(n,d){if(n&1&&F(et,5),n&2){let r;D(r=L())&&(d.captchaContainerRef=r.first)}},decls:5,vars:1,consts:[["captchaContainer",""],["data-cy","public-support",1,"support-page"],[1,"loading-state"],["data-cy","support-success",1,"success-panel"],[1,"error-banner"],[1,"spinner"],[1,"ticket-line"],["data-cy","support-ticket-number"],[1,"support-header"],[1,"intro"],["data-cy","support-unpublished",1,"empty-text"],[1,"form-section"],[1,"empty-text"],["data-cy","support-form-error",1,"error-banner"],["novalidate","",3,"ngSubmit","formGroup"],[1,"field"],["for","support-category"],[1,"required"],["id","supp
1ort-category","formControlName","categoryId","required","","data-cy","support-category"],["value",""],[3,"value"],[1,"field-error"],["for","support-name"],["id","support-name","formControlName","name","autocomplete","name"],["for","support-email"],["id","support-email","type","email","formControlName","email","autocomplete","email","required","","data-cy","support-email"],["aria-hidden","true",1,"honeypot"],["for","support-website"],["id","support-website","formControlName","website","tabindex","-1","autocomplete","off"],["data-cy","support-captcha",1,"captcha"],["type","submit","data-cy","support-submit",1,"btn","btn-primary",3,"disabled"],[3,"for"],["rows","6",3,"id","formControlName","placeholder"],[3,"id","formControlName"],[3,"id","type","formControlName","placeholder"]],template:function(n,d){if(n&1&&(o(0,"div",1),m(1,rt,4,0,"div",2)(2,at,9,1,"section",3)(3,Mt,6,3)(4,Ot,2,1,"p",4),i()),n&2){let r;l(),u(d.isLoading()?1:(r=d.ticketNumber())?2:(r=d.hub())?3:4,r)}},dependencies:[$,A,Z,G,Y,H,j,K,W,B,X,U,Q],styles:['@charset "UTF-8";.support-page[_ngcontent-%COMP%]{max-width:720px;margin:0 auto;padding:3rem 1.5rem 4rem}.support-header[_ngcontent-%COMP%]{margin-bottom:2.5rem}.support-header[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:2.25rem;font-weight:700;color:var(--text-primary, #111827);margin:0 0 .75rem}.intro[_ngcontent-%COMP%]{font-size:1.0625rem;color:var(--text-secondary, #4b5563);margin:0 0 1.5rem;max-width:60ch}h2[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:600;color:var(--text-primary, #111827);margin:0 0 1rem}.faq-section[_ngcontent-%COMP%]{margin-bottom:3rem}.faq-list[_ngcontent-%COMP%]{border:1px solid var(--border-light, #e5e7eb);border-radius:12px;overflow:hidden}.faq-item[_ngcontent-%COMP%]{border-bottom:1px solid var(--border-light, #e5e7eb)}.faq-item[_ngcontent-%COMP%]:last-child{border-bottom:none}.faq-question[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;width:100%;padding:1rem 1.25rem;border:none;background:transparent;text-align:left;font-size:1rem;font-weight:500;color:var(--text-primary, #111827);cursor:pointer}.faq-question[_ngcontent-%COMP%]:hover{background:var(--bg-secondary, #f9fafb)}.faq-question[_ngcontent-%COMP%]   .chevron[_ngcontent-%COMP%]{transition:transform .2s;font-size:1.25rem;line-height:1}.faq-item.expanded[_ngcontent-%COMP%]   .faq-question[_ngcontent-%COMP%]   .chevron[_ngcontent-%COMP%]{transform:rotate(180deg)}.faq-answer[_ngcontent-%COMP%]{padding:0 1.25rem 1.25rem;color:var(--text-secondary, #4b5563);white-space:pre-wrap;line-height:1.6}.field[_ngcontent-%COMP%]{margin-bottom:1.25rem}.field[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{display:block;font-size:.875rem;font-weight:500;color:var(--text-primary, #111827);margin-bottom:.375rem}.field[_ngcontent-%COMP%]   input[_ngcontent-%COMP%], .field[_ngcontent-%COMP%]   select[_ngcontent-%COMP%], .field[_ngcontent-%COMP%]   textarea[_ngcontent-%COMP%]{width:100%;padding:.75rem 1rem;font-size:.9375rem;font-family:inherit;border:1px solid var(--border-strong, #9ca3af);border-radius:8px;background:var(--bg-primary, #fff);color:var(--text-primary, #111827)}.field[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:focus, .field[_ngcontent-%COMP%]   select[_ngcontent-%COMP%]:focus, .field[_ngcontent-%COMP%]   textarea[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #6366f11f}.field[_ngcontent-%COMP%]   textarea[_ngcontent-%COMP%]{resize:vertical}.required[_ngcontent-%COMP%]{color:var(--error-500, #ef4444)}.field-error[_ngcontent-%COMP%]{display:block;margin-top:.375rem;font-size:.8125rem;color:var(--error-500, #ef4444)}.honeypot[_ngcontent-%COMP%]{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.captcha[_ngcontent-%COMP%]{margin-bottom:1.25rem}.btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;padding:.75rem 1.75rem;font-size:.9375rem;font-weight:600;border:none;border-radius:8px;cursor:pointer;text-decoration:none}.btn[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed}.btn-primary[_ngcontent-%COMP%]{background:var(--primary-600, #4f46e5);color:#fff}.btn-primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--primary-700, #4338ca)}.error-banner[_ngcontent-%COMP%]{padding:.75rem 1rem;border-radius:8px;background:#fee2e2;color:#991b1b;margin-bottom:1.25rem}.success-panel[_ngcontent-%COMP%]{padding:2.5rem 2rem;border:1px solid var(--border-light, #e5e7eb);border-radius:12px;text-align:center}.success-panel[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:1.625rem;font-weight:700;margin:0 0 1rem;color:var(--text-primary, #111827)}.success-panel[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:var(--text-secondary, #4b5563);margin:0 0 .75rem}.success-panel[_ngcontent-%COMP%]   .ticket-line[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{font-family:var(--font-mono, monospace);font-size:1.125rem;color:var(--text-primary, #111827)}.loading-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding:3rem;color:var(--text-muted, #6b7280)}.spinner[_ngcontent-%COMP%]{width:32px;height:32px;border:3px solid var(--border-light, #e5e7eb);border-top-color:var(--primary-600, #4f46e5);border-radius:50%;animation:_ngcontent-%COMP%_spin 1s linear infinite}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}.empty-text[_ngcontent-%COMP%]{color:var(--text-muted, #6b7280)}']})}}return e})();export{$t as PublicSupportComponent};

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.