PageSourceSearch

https://account.platfio.com/chunk-NAWEYQAW.js

js platfio.com collected 2026-10-02 16:05:13 UTC 8,961 bytes, 1 lines download raw bytes

1import{ca as U,sb as D}from"./chunk-3DQNDFEG.js";import"./chunk-343O3U3M.js";import"./chunk-JE2DLEPK.js";import"./chunk-RAXTUVIM.js";import"./chunk-2NPW36IE.js";import"./chunk-7EGFHFBD.js";import"./chunk-O272AIBE.js";import"./chunk-CRPMSPJM.js";import"./chunk-V3V7436G.js";import"./chunk-ZEXHBJES.js";import{L as R}from"./chunk-C5JOXK3X.js";import"./chunk-BU6OUP3A.js";import{a as W}from"./chunk-SHVT27ZR.js";import"./chunk-PIEFXZAY.js";import{b as N}from"./chunk-HPYFBCBG.js";import"./chunk-D5LMDM2Q.js";import"./chunk-UQFNGT5Y.js";import{a as k}from"./chunk-S2ZEB74F.js";import"./chunk-CJETJIFS.js";import"./chunk-7THPGJXK.js";import"./chunk-OVUAHIK7.js";import"./chunk-62F2HA7U.js";import"./chunk-OHTAQ7Q3.js";import"./chunk-IS6IIR5M.js";import{e as O,h as L,v as j}from"./chunk-GK6CCXA7.js";import{x as B}from"./chunk-NGADLQNA.js";import{Fa as u,Ga as a,Qc as F,Sa as C,Sc as P,T as _,Ua as M,Uc as v,Y as f,Za as d,_a as m,c as S,ca as T,da as g,eb as l,ec as w,wc as I,xb as h,yb as c,zb as p}from"./chunk-ZBB2FDI3.js";import"./chunk-MRT7IOGV.js";import"./chunk-AG43DLNM.js";import"./chunk-TQIZSBFB.js";import"./chunk-US5ASVOF.js";import"./chunk-NIJN5YNO.js";import{a as b,b as y,j as o}from"./chunk-OX62P4D5.js";var E=(()=>{class s{constructor(t,i,e,n,r,H,q){this.afs=t,this.router=i,this.activatedRoute=e,this.location=n,this.toastService=r,this.alertService=H,this.theme=q,this.superCta=null,this.utilities=[],this.breadcrumbs=[],this.term={id:"",name:"",version:"",terms:"",status:"draft",index:100},this.manageNested="",this.funnelId="",this.funnel=null,this.isSaving=!1,this.termSnapshot="",this.statusOptions=[{label:"Draft",value:"draft"},{label:"Live",value:"live"},{label:"Archived",value:"archived"}],this.destroy$=new S}ngOnInit(){this.activatedRoute.paramMap.pipe(_(this.destroy$)).subscribe(t=>{this.tid=t.get("tid"),this.activatedRoute.queryParams.pipe(_(this.destroy$)).subscribe(i=>{this.uid=i.aid,this.manageNested=i.manageNested||"",this.funnelId=i.funnelId||"",this.loadFunnel(),this.tid=="add"?(this.tid="add",this.snapshotTerm(),this.updateBreadcrumbs(),this.updateUtilities()):this.afs.doc("users/"+this.uid+"/agencyTerms/"+this.tid).valueChanges().subscribe(e=>{e&&(e.id=this.tid,this.term=e,this.snapshotTerm(),this.updateSaveCta(!1),this.updateBreadcrumbs(),this.updateUtilities())})})})}ngOnDestroy(){this.funnelSubscription?.unsubscribe?.(),this.destroy$.next(),this.destroy$.complete()}ngDoCheck(){!this.term||!this.termSnapshot||this.isSaving||this.updateSaveCta(this.currentTermSnapshot()!==this.termSnapshot)}onFieldChange(){this.updateBreadcrumbs()}add(){return o(this,null,function*(){return this.isSaving=!0,this.afs.collection("users/"+this.uid+"/agencyTerms").add(this.term).then(t=>(this.afs.doc("users/"+this.uid+"/agencyTerms/"+t.id).update({id:t.id}),this.tid=t.id,this.term.id=t.id,this.snapshotTerm(),this.updateSaveCta(!1),this.updateBreadcrumbs(),this.updateUtilities(),this.isSaving=!1,this.toastService.showSuccess("Terms created"),!0)).catch(()=>(this.isSaving=!1,this.toastService.showError("Failed to create terms"),!1))})}edit(){return o(this,null,function*(){return this.isSaving=!0,this.superCta=y(b({},this.buildSuperCta()),{loading:!0,disabled:!0}),this.afs.doc("users/"+this.uid+"/agencyTerms/"+this.tid).set(this.term,{merge:!0}).then(()=>(this.snapshotTerm(),this.updateSaveCta(!1),this.isSaving=!1,this.toastService.showSuccess("Terms saved"),!0)).catch(()=>(this.isSaving=!1,this.updateSaveCta(!0),this.toastService.showError("Failed to save terms"),!1))})}save(){return o(this,null,function*(){return this.tid==="add"?this.add():this.edit()})}onUtilityChange(t){t.utility.id==="delete-terms"&&this.deleteTemplate(this.term)}updateBreadcrumbs(){let t=this.term?.name?.trim()||(this.tid==="add"?"New Terms":"Untitled Terms");if(this.uid&&this.funnelId){let i=new URLSearchParams({manageNested:this.manageNested||"agency",aid:this.uid});this.breadcrumbs=[{label:"Home",route:"/myagency"},{label:"Funnels",routePreset:"defaultFunnelsDashboard"},{label:this.funnel?.name?.trim()||"Funnel",route:`/funnel/${this.funnelId}?${i.toString()}`},{label:"Terms",route:`/funnel/${this.funnelId}/terms?${i.toString()}`},{label:t}];return}this.breadcrumbs=[{label:"Home",route:"/myagency"},{label:"Terms",route:`/myagency/terms?aid=${this.uid||""}`},{label:t}]}loadFunnel(){if(this.funnelSubscription?.unsubscribe?.(),!this.uid||!this.funnelId){this.funnel=null,this.updateBreadcrumbs();return}let t=this.manageNested==="agency"?`users/${this.uid}/funnel/${this.funnelId}`:`funnel/${this.funnelId}`;this.funnelSubscription=this.afs.doc(t).valueChanges().subscribe(i=>{this.funnel=i?y(b({},i),{id:this.funnelId}):null,this.updateBreadcrumbs()})}updateUtilities(){this.utilities=this.tid!=="add"?[{id:"delete-terms",label:"Delete Terms",type:"button",icon:"fa-solid fa-tras
1h"}]:[]}deleteTemplate(t){return o(this,null,function*(){let i=yield this.alertService.open({heading:"Delete Terms",description:`Are you sure you want to delete "${t.name||"this term"}"? This action cannot be undone.`,buttons:[{id:"cancel",label:"Cancel",color:"neutral"},{id:"delete",label:"Delete",color:"danger",icon:"fa-trash",handler:()=>o(this,null,function*(){yield this.afs.doc("users/"+this.uid+"/agencyTerms/"+t.id).delete(),this.toastService.showSuccess("Terms deleted"),this.location.back()})}]})})}buildSuperCta(){return{label:this.tid==="add"?"Create":"Save",loadingLabel:"Saving...",icon:"fa-solid fa-floppy-disk",color:"primary",style:"filled",emit:"save",tooltip:this.tid==="add"?"Create terms":"Save terms",hideLabelOnMobile:!0,action:()=>o(this,null,function*(){yield this.save()})}}updateSaveCta(t){this.superCta=t?this.buildSuperCta():null}snapshotTerm(){this.termSnapshot=this.currentTermSnapshot()}currentTermSnapshot(){return JSON.stringify(this.term||{})}static{this.\u0275fac=function(i){return new(i||s)(a(B),a(P),a(F),a(w),a(k),a(W),a(N))}}static{this.\u0275cmp=T({type:s,selectors:[["app-terms-crud"]],hostVars:2,hostBindings:function(i,e){i&2&&M("theme-light",e.theme.isLight)},decls:11,vars:11,consts:[["title","Terms",3,"utilityChange","showBack","superCta","breadcrumbConfig","utilities","hideContextualPanelToggle"],["slot","body"],[1,"container-fluid"],[1,"row","mb-3"],[1,"col-12","col-md-4"],["label","Name","placeholder","e.g., Standard Terms & Conditions",3,"ngModelChange","ngModel"],["label","Version","placeholder","e.g., 1.0.0",3,"ngModelChange","ngModel"],["type","select","label","Status",3,"ngModelChange","options","ngModel"],["type","textarea","label","Terms & Conditions","placeholder","Enter your terms and conditions here...",3,"ngModelChange","rows","ngModel"]],template:function(i,e){i&1&&(d(0,"app-layout",0),l("utilityChange",function(r){return e.onUtilityChange(r)}),d(1,"span",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"ui-form-field",5),p("ngModelChange",function(r){return c(e.term.name,r)||(e.term.name=r),r}),l("ngModelChange",function(){return e.onFieldChange()}),m()(),d(6,"div",4)(7,"ui-form-field",6),p("ngModelChange",function(r){return c(e.term.version,r)||(e.term.version=r),r}),l("ngModelChange",function(){return e.onFieldChange()}),m()(),d(8,"div",4)(9,"ui-form-field",7),p("ngModelChange",function(r){return c(e.term.status,r)||(e.term.status=r),r}),l("ngModelChange",function(){return e.onFieldChange()}),m()()(),d(10,"ui-form-field",8),p("ngModelChange",function(r){return c(e.term.terms,r)||(e.term.terms=r),r}),l("ngModelChange",function(){return e.onFieldChange()}),m()()()()),i&2&&(C("showBack",!0)("superCta",e.superCta)("breadcrumbConfig",e.breadcrumbs)("utilities",e.utilities)("hideContextualPanelToggle",e.utilities.length===0),u(5),h("ngModel",e.term.name),u(2),h("ngModel",e.term.version),u(2),C("options",e.statusOptions),h("ngModel",e.term.status),u(),C("rows",12),h("ngModel",e.term.terms))},dependencies:[U,R,O,L],styles:[".save-status[_ngcontent-%COMP%]{position:fixed;top:80px;right:24px;display:flex;align-items:center;gap:.5rem;padding:.5rem 1rem;background:#ffffff14;border:1px solid rgba(255,255,255,.12);border-radius:8px;color:#fffc;font-size:.875rem;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);z-index:1000;animation:_ngcontent-%COMP%_fadeIn .3s ease}.save-status[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{color:#15cdffcc}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.theme-light[_nghost-%COMP%]   .save-status[_ngcontent-%COMP%]{background:#00000014;border:1px solid rgba(0,0,0,.12);color:#000c}.container-fluid[_ngcontent-%COMP%]{padding:0}"]})}}return s})();var z=[{path:"",component:E}],$=(()=>{class s{static{this.\u0275fac=function(i){return new(i||s)}}static{this.\u0275mod=g({type:s})}static{this.\u0275inj=f({imports:[v.forChild(z),v]})}}return s})();var ye=(()=>{class s{static{this.\u0275fac=function(i){return new(i||s)}}static{this.\u0275mod=g({type:s})}static{this.\u0275inj=f({imports:[I,D,$,j]})}}return s})();export{ye as TermsCrudModule};

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.