PageSourceSearch

https://beautifydata.com/chunk-D4TN3BTE.js

js beautifydata.com collected 2026-10-02 06:43:16 UTC 16,872 bytes, 1 lines download raw bytes

1import{a as k,b as le,c as H,d as re,e as ce,f as me,g as de,h as se,i as pe,j as ue,k as Ce,l as ge,m as _e,n as be,p as fe,q as he,s as xe,t as ve,u as I}from"./chunk-5UQIUGH7.js";import"./chunk-6J2RMMQM.js";import{a as ie}from"./chunk-VWPATGG6.js";import{a as oe}from"./chunk-UWSAHVZU.js";import{b as ae}from"./chunk-N4MGIWTG.js";import{j as E,l as ne}from"./chunk-WVMIPZCG.js";import"./chunk-WM6N4WKG.js";import{r as te}from"./chunk-UENSDTAX.js";import"./chunk-AMSIJOHU.js";import{b as Me,d as V}from"./chunk-VD3DNBDN.js";import{c as Z,e as ee}from"./chunk-VISZOBOM.js";import{Ab as j,Bb as B,Da as P,Ea as i,Ga as W,Ib as m,Jb as g,Ka as f,Kb as _,Lb as K,Qa as O,Ua as S,Wb as w,cb as d,db as s,e as z,eb as q,fa as x,fb as L,ga as v,gb as $,ha as U,hb as C,ia as Q,ib as o,jb as l,kb as y,mc as X,nc as p,ob as N,pb as F,ra as b,rb as M,ta as G,tb as T,vb as c,zb as J}from"./chunk-NPSW5S2Y.js";var Y=z(Z());var Pe=(t,n)=>n.col1;function Oe(t,n){if(t&1&&(o(0,"li",8)(1,"em"),m(2),l()()),t&2){let e=n.$implicit;i(2),K("",e.shortName," \u2014 ",e.longName)}}function Ne(t,n){if(t&1&&(o(0,"div",3)(1,"div",7),m(2,"Column Name Legends"),l(),o(3,"ul"),L(4,Oe,3,2,"li",8,q),l()()),t&2){let e=c();i(4),$(e.longHeaderLabels())}}function Fe(t,n){if(t&1){let e=M();o(0,"div",4)(1,"input",9),T("keyup",function(r){x(e);let u=c();return v(u.applyTableFilter(r))}),l()()}if(t&2){let e=c();i(),C("placeholder",w(e.filterPlaceHolder()))}}function Ve(t,n){if(t&1&&(o(0,"th",17),m(1),l()),t&2){let e=c(3);i(),g(e.tableHeaders().col1)}}function Ee(t,n){if(t&1){let e=M();o(0,"td",18)(1,"div",19),U(),o(2,"svg",20),T("click",function(){let r=x(e).$implicit,u=c(3);return v(u.notifyParentDelete(r.col1))}),o(3,"g"),y(4,"path",21),l()(),Q(),o(5,"a",22),m(6),l()()()}if(t&2){let e=n.$implicit,a=c(3);i(5),C("href",w(e[a.nameLinkColumn()]),P),i(),_(" ",e.col1," ")}}function ke(t,n){if(t&1&&(o(0,"td",23),m(1),l()),t&2){let e=c(3);i(),g(e.totalRow().col1)}}function He(t,n){t&1&&(N(0,10),S(1,Ve,2,1,"th",12)(2,Ee,7,3,"td",13)(3,ke,2,1,"td",14),F())}function Ie(t,n){if(t&1&&(o(0,"th",17),m(1),l()),t&2){let e=c(3);i(),g(e.tableHeaders().col1)}}function Ae(t,n){if(t&1&&(o(0,"td",18),m(1),l()),t&2){let e=n.$implicit;i(),g(e.col1)}}function Re(t,n){if(t&1&&(o(0,"td",23),m(1),l()),t&2){let e=c(3);i(),g(e.totalRow().col1)}}function ze(t,n){t&1&&(N(0,10),S(1,Ie,2,1,"th",12)(2,Ae,2,1,"td",13)(3,Re,2,1,"td",14),F())}function Le(t,n){if(t&1&&(o(0,"th",17),m(1),l()),t&2){let e=c(2);i(),g(e.tableHeaders().col2)}}function $e(t,n){if(t&1&&(o(0,"td",18),m(1),l()),t&2){let e=n.$implicit,a=c(2);i(),g(a.formatNumberWithCommas(e.col2))}}function je(t,n){if(t&1&&(o(0,"td",23),m(1),l()),t&2){let e=c(2);i(),g(e.formatNumberWithCommas(e.totalRow().col2))}}function Be(t,n){t&1&&y(0,"tr",24)}function Ye(t,n){t&1&&y(0,"tr",25)}function Ue(t,n){if(t&1&&(o(0,"table",5),d(1,He,4,0,"ng-container",10),d(2,ze,4,0,"ng-container",10),N(3,11),S(4,Le,2,1,"th",12)(5,$e,2,1,"td",13)(6,je,2,1,"td",14),F(),S(7,Be,1,0,"tr",15)(8,Ye,1,0,"tr",16),l()),t&2){let e=c();C("dataSource",e.dataSource),i(),s(e.nameColumn()=="col1"?1:-1),i(),s(e.nameColumn()!=="col1"?2:-1),i(5),C("matHeaderRowDef",e.displayedColumns),i(),C("matRowDefColumns",e.displayedColumns)}}function Qe(t,n){if(t&1&&(o(0,"span")(1,"a",22),m(2),l()()),t&2){let e=c().$implicit,a=c(2);i(),C("href",w(e[a.nameLinkColumn()]),P),i(),_(" ",e.col1," ")}}function Ge(t,n){if(t&1&&(o(0,"span"),m(1),l()),t&2){let e=c().$implicit;i(),_(" ",e.col1," ")}}function We(t,n){if(t&1&&(o(0,"span")(1,"a",22),m(2),l()()),t&2){let e=c().$implicit,a=c(2);i(),C("href",w(e[a.nameLinkColumn()]),P),i(),_(" ",e.col2," ")}}function qe(t,n){if(t&1&&(o(0,"span"),m(1),l()),t&2){let e=c().$implicit;i(),_(" ",e.col2," ")}}function Je(t,n){if(t&1&&(o(0,"tr")(1,"td"),d(2,Qe,3,3,"span"),d(3,Ge,2,1,"span"),l(),o(4,"td"),d(5,We,3,3,"span"),d(6,qe,2,1,"span"),l()()),t&2){let e=c(2);i(2),s(e.nameColumn()=="col1"?2:-1),i(),s(e.nameColumn()!=="col1"?3:-1),i(2),s(e.nameColumn()=="col2"?5:-1),i(),s(e.nameColumn()!=="col2"?6:-1)}}function Ke(t,n){if(t&1&&(o(0,"table")(1,"thead")(2,"tr")(3,"th"),m(4),l(),o(5,"th"),m(6),l()()(),o(7,"tbody"),L(8,Je,7,4,"tr",null,Pe),l()()),t&2){let e=c();i(4),_(" ",e.tableHeaders().col1," "),i(2),_(" ",e.tableHeaders().col2," "),i(2),$(e.tableData())}}var A=class t{constructor(n,e){this.numFormatService=n;this.pageService=e;W(()=>{this.myInit()})}set matPaginator(n){this.paginator=n,this.setDataSourceAttributes()}set matSort(n){this.sort=n,this.setDataSourceAttributes()}tableData=p();tableId=p();tableTitle=p();tableHeaders=p();initialSortColumn=p();initialSortOrder=p();showTotalRow=p();totalRow=p();nameColumn=p("");nameLinkColumn=p("");longHeaderLabels=p();includeFilterNames=p();filterPlaceHolder=p();pageSizeOptions=p();onActionTriggered=X();dataSource;sort;paginator;displayedColumns=["col1","col2"];updatedTableData=[];isBrowser=!1;pageSizes=[25,50,100];async ngOnInit(){}
1async myInit(){if(this.isBrowser=!0,this.isBrowser){this.dataSource=new I(this.tableData());let n=this.pageSizeOptions();n&&(this.pageSizes=n)}}async applyTableFilter(n){let e=n.target.value;this.dataSource.filter=e.trim().toLowerCase(),this.dataSource.paginator&&this.dataSource.paginator.firstPage()}formatNumberWithCommas(n){return!Number(n)&&n!=="0"?n:n.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}notifyParentDelete(n){this.onActionTriggered.emit(n)}ngAfterViewInit(){}ngOnDestroy(){}async ngOnChanges(n){let e=(0,Y.get)(n,"tableData.currentValue",[]),a=(0,Y.get)(n,"tableData.previousValue",[]),r=this.tableData();if(this.isBrowser&&a!==e&&r){this.dataSource=new I(r),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort;let u=this.initialSortColumn(),h=this.initialSortOrder();u||(u=`${this.displayedColumns[1]}`),h||(h="desc"),this.sort&&this.sort.sort({id:u,start:h})}}setDataSourceAttributes(){if(this.isBrowser){this.dataSource=new I(this.tableData()),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort;let n=this.initialSortColumn();n||(n=`${this.displayedColumns[1]}`);let e=this.initialSortOrder();e||(e="desc"),this.sort&&this.sort.sort({id:n,start:e})}}static \u0275fac=function(e){return new(e||t)(f(ie),f(V))};static \u0275cmp=O({type:t,selectors:[["spec-name-value-2-cols-tbl"]],viewQuery:function(e,a){if(e&1&&J(k,5)(H,5),e&2){let r;j(r=B())&&(a.matPaginator=r.first),j(r=B())&&(a.matSort=r.first)}},inputs:{tableData:[1,"tableData"],tableId:[1,"tableId"],tableTitle:[1,"tableTitle"],tableHeaders:[1,"tableHeaders"],initialSortColumn:[1,"initialSortColumn"],initialSortOrder:[1,"initialSortOrder"],showTotalRow:[1,"showTotalRow"],totalRow:[1,"totalRow"],nameColumn:[1,"nameColumn"],nameLinkColumn:[1,"nameLinkColumn"],longHeaderLabels:[1,"longHeaderLabels"],includeFilterNames:[1,"includeFilterNames"],filterPlaceHolder:[1,"filterPlaceHolder"],pageSizeOptions:[1,"pageSizeOptions"]},outputs:{onActionTriggered:"onActionTriggered"},features:[G],decls:9,vars:7,consts:[[1,"name-value-tbl","colFlex",3,"id"],[1,"state-demog-table-container","colFlex"],[1,"table-main-header"],[1,"long-col-name-container"],[1,"rowFlex","filter-container"],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource"],[1,"paginator",3,"pageSizeOptions"],[1,"legends-header"],[1,"long-col-name"],[1,"table-search-input",3,"keyup","placeholder"],["matColumnDef","col1"],["matColumnDef","col2"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["mat-footer-cell","",4,"matFooterCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"rowFlex","col-w-del"],["viewBox","0 0 24 24","aria-hidden","true",1,"del-sign",3,"click"],["d","M16 6V4.5C16 3.12 14.88 2 13.5 2h-3C9.11 2 8 3.12 8 4.5V6H3v2h1.06l.81 11.21C4.98 20.78 6.28 22 7.86 22h8.27c1.58 0 2.88-1.22 3-2.79L19.93 8H21V6h-5zm-6-1.5c0-.28.22-.5.5-.5h3c.27 0 .5.22.5.5V6h-4V4.5zm7.13 14.57c-.04.52-.47.93-1 .93H7.86c-.53 0-.96-.41-1-.93L6.07 8h11.85l-.79 11.07zM9 17v-6h2v6H9zm4 0v-6h2v6h-2z"],[3,"href"],["mat-footer-cell",""],["mat-header-row",""],["mat-row",""]],template:function(e,a){e&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),m(3),l(),d(4,Ne,6,0,"div",3),d(5,Fe,2,2,"div",4),d(6,Ue,9,5,"table",5),y(7,"mat-paginator",6),d(8,Ke,10,2,"table"),l()()),e&2&&(C("id",a.tableId()),i(3),g(a.tableTitle()),i(),s(a.longHeaderLabels()?4:-1),i(),s(a.includeFilterNames()==!0?5:-1),i(),s(a.isBrowser?6:-1),i(),C("pageSizeOptions",a.pageSizes),i(),s(!a.isBrowser&&a.tableData()&&a.tableData().length>0?8:-1))},dependencies:[E,ve,me,se,be,ue,de,fe,pe,Ce,_e,ge,he,xe,ce,H,re,le,k],styles:[".table-search-input[_ngcontent-%COMP%]{font:inherit;background:transparent;color:currentColor;border:none;outline:none;margin:0 0 5px;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit;box-sizing:content-box;border-bottom:1px solid #cacaca;padding:0 0 0 10px}table[_ngcontent-%COMP%]{border-radius:5px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;border-spacing:2px;border-color:gray}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{padding:5px;font-family:noto_serif,Georgia,Times New Roman!important;color:#0c0c0c}tr[_ngcontent-%COMP%]:nth-of-type(odd){background-color:#fff}.col-w-del[_ngcontent-%COMP%]   .del-sign[_ngcontent-%COMP%]{height:22px;margin:0 15px 0 0;cursor:pointer}.col-w-del[_ngcontent-%COMP%]   .del-sign[_ngcontent-%COMP%]:hover{fill:red}
1.name-value-tbl[_ngcontent-%COMP%]   .long-col-name-container[_ngcontent-%COMP%]{justify-content:start;width:80%;margin-bottom:20px;font-size:.9em}.name-value-tbl[_ngcontent-%COMP%]   .long-col-name-container[_ngcontent-%COMP%]   .legends-header[_ngcontent-%COMP%]{color:#5f9ea0;font-weight:600}.name-value-tbl[_ngcontent-%COMP%]   .long-col-name-container[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{margin-top:2px}.name-value-tbl[_ngcontent-%COMP%]   .long-col-name-container[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]::marker{position:absolute;left:-2rem;color:#cd5c5c;font-weight:700;font-size:1em}.name-value-tbl[_ngcontent-%COMP%]   .long-col-name-container[_ngcontent-%COMP%]   .long-col-name[_ngcontent-%COMP%]{font-size:.9em}.name-value-tbl[_ngcontent-%COMP%]   .paginator[_ngcontent-%COMP%]{margin-top:-90px;width:80%;margin-bottom:80px}.name-value-tbl[_ngcontent-%COMP%]   .state-demog-table-container[_ngcontent-%COMP%]{align-items:center;justify-content:center;margin:20px 5px}.name-value-tbl[_ngcontent-%COMP%]   .table-main-header[_ngcontent-%COMP%]{margin-top:20px;margin-bottom:15px;font-size:1em;font-weight:700;text-align:center}.name-value-tbl[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]{width:80%;margin-bottom:10px;padding-bottom:100px}.name-value-tbl[_ngcontent-%COMP%]   .filter-container[_ngcontent-%COMP%]{width:100%;justify-content:center}.name-value-tbl[_ngcontent-%COMP%]   .mat-form-field[_ngcontent-%COMP%]{font-size:14px;width:80%}.name-value-tbl[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{font-weight:700}.name-value-tbl[_ngcontent-%COMP%]   td[_ngcontent-%COMP%], .name-value-tbl[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{width:25%;padding:10px 12px}.name-value-tbl[_ngcontent-%COMP%]   tr.mat-footer-row[_ngcontent-%COMP%]{font-weight:700}.name-value-tbl[_ngcontent-%COMP%]   .mat-row[_ngcontent-%COMP%]:nth-child(2n){background-color:#fff}.name-value-tbl[_ngcontent-%COMP%]   .mat-row[_ngcontent-%COMP%]:nth-child(odd){background-color:#f2f2f2}@media(max-width:700px){table[_ngcontent-%COMP%]{width:100%!important;padding-bottom:150px!important;margin-bottom:60px!important;margin-left:-20px!important;margin-right:-20px!important}.mat-form-field[_ngcontent-%COMP%]{width:100%!important}.paginator[_ngcontent-%COMP%]{width:100%!important;margin-top:-187px!important}}"]})};var D=z(Z()),ye=z(Me());function Xe(t,n){t&1&&(o(0,"span",3),m(1,"You are not logged in. "),o(2,"a",4),m(3," Sign in now"),l(),m(4,". "),l())}function Ze(t,n){t&1&&(o(0,"div",5),m(1," You don't have any Favorite pages yet. "),l())}function et(t,n){t&1&&(o(0,"div")(1,"p"),m(2," The following are the pages you've recently Favorited. You can search and filter the table and also remove rows from your Favorites. "),l()())}function tt(t,n){if(t&1){let e=M();o(0,"spec-name-value-2-cols-tbl",7),T("onActionTriggered",function(r){x(e);let u=c(2);return v(u.handleDeleteAction(r))}),l()}if(t&2){let e=c(2);C("tableData",e.tableData())("tableId",e.tableId)("tableTitle",e.tableTitle)("tableHeaders",e.tableHeaders)("initialSortColumn",e.initialSortColumn)("includeFilterNames",e.includeFilterNames)("filterPlaceHolder",e.filterPlaceHolder)("nameColumn",e.nameColumn)("nameLinkColumn",e.nameLinkColumn)}}function nt(t,n){if(t&1&&(d(0,Ze,2,0,"div",5),d(1,et,3,0,"div"),d(2,tt,1,9,"spec-name-value-2-cols-tbl",6)),t&2){let e=c();s(e.favoritesExist()?-1:0),i(),s(e.favoritesExist()?1:-1),i(),s(e.favoritesExist()?2:-1)}}var Se=class t{constructor(n,e,a){this.authService=n;this.api=e;this.pageService=a}signInForm;name="";username="";userEmail="";userAuthenticated=b(!1);userChecked=b(!1);emailExistError=b(!1);updateSuccess=b(!1);pageName="user-favorites";tableTitle="";tableId=`table-${(0,D.kebabCase)(this.pageName)}`;chartData=[];tableHeaders={col1:"Page Title",col2:"Date Added",col3:""};tableColProps=["pageTitle","fmtCreatedAt","pageUrl"];tableData=b([]);initialSortColumn="col2";includeFilterNames=!0;filterPlaceHolder="Type here to filter table";nameColumn="col1";nameLinkColumn="col3";favoritesExist=b(!1);async ngOnInit(){try{let n=await this.authService.getToken();this.pageName="user_favorites";let e={token:n,whost:"bd"};this.api.get("/user-account/get-all-user-favorites",e).subscribe({next:r=>{this.dataReceived(r)},error:r=>{console.log("there was an error getting page data",r)}})}catch{}}async dataReceived(n){if(this.userChecked.set(!0),n&&n.authenticated){this.userAuthenticated.set(!0);let e=n.favList;for(let a=0;a<e.length;a++)e[a].fmtCreatedAt=(0,ye.default)(e[a].createdAt).format("YYYY-MM-DD hh:mm:ss a");this.chartData=e,e.length>0?this.favoritesExist.set(!0):this.favoritesExist.set(!1),await this.updateTableData()}}updateTableData(){try{let n=[];if(this.chartData&&this.chartData.length>0)for(let e=0;e<this.chartData.length;e++){let a={};for(let r=0;r<this.tableColProps.length;r++)a[`col${r+1}`]=this.chartData[e][this.tableColProps[r]];n.push(a)}this.tableData.set(n)}catch(n){let e=JSON.stringify({stage:"updateTableData",err:`${n}`});this.pageService.writePageError(this.pageName,e)}}async handleDeleteAction(n){let e=(0,D.filter)(this.chartData,a=>a.pageTitle==n);if(e.length>0){let a=e[0].pageName,r=e[0].pageType,u=await this.authService.getToken();if(u&&u!=="undefined"){let h={token:u,pageName:a,pType:r,whost:"bd"};this.api.post("/user-account/user-favorites",h).subscribe({next:R=>{this.refreshAfterDelete(R,n)},error:R=>{console.log("there was an error getting page data",R)}})}}}refreshAfterDelete(n,e){let a=this.tableData();n&&n.successSave&&(a=(0,D.filter)(this.tableData(),r=>r.col1!==e),this.tableData.set(a),console.log("tableData now: ",this.tableData))}static \u0275fac=function(e){return new(e||t)(f(oe),f(ee),f(V))};static \u0275cmp=O({type:t,selectors:[["app-account-favorites"]],decls:6,vars:2,consts:[[1,"sign-in-mdl","colFlex"],["tabindex","-1",1,"sign-in-title"],[1,"colFlex","btn-group"],[1,"sign-in-link"],["href","/account/sign-in",1,"sign-in-link-a"],[1,"rowFlex","no-favs"],[3,"tableData","tableId","tableTitle","tableHeaders","initialSortColumn","includeFilterNames","filterPlaceHolder","nameColumn","nameLinkColumn"],[3,"onActionTriggered","tableData","tableId","tableTitle","tableHeaders","initialSortColumn","includeFilterNames","filterPlaceHolder","nameColumn","nameLinkColumn"]],template:function(e,a){e&1&&(o(0,"div",0)(1,"h3",1),m(2,"Your Favorite Pages"),l(),o(3,"div",2),d(4,Xe,5,0,"span",3),d(5,nt,3,3),l()()),e&2&&(i(4),s(a.userChecked()&&!a.userAuthenticated()?4:-1),i(),s(a.userAuthenticated()?5:-1))},dependencies:[te,E,ae,ne,A],styles:[".sign-in-mdl[_ngcontent-%COMP%]{margin-top:50px}.btn-group[_ngcontent-%COMP%]{width:100%;max-width:1000px;margin:0 auto}.btn-group[_ngcontent-%COMP%]   .no-favs[_ngcontent-%COMP%]{justify-content:center;margin-top:20px}.submit-btn[_ngcontent-%COMP%]{height:45px;border-radius:22px;font-size:18px;background-color:#111827;color:#fff;cursor:pointer;margin-bottom:20px}.submit-btn[_ngcontent-%COMP%]:disabled{background-color:#a9a9a9}.error-text[_ngcontent-%COMP%]{color:red}.success-text[_ngcontent-%COMP%]{color:#726969;margin:auto}.disabled-text[_ngcontent-%COMP%]{color:#5b5757!important}.sign-in-link[_ngcontent-%COMP%]{display:block;padding-top:20px;border-top:1px dashed #D1D5DB}.sign-in-link[_ngcontent-%COMP%]   .sign-in-link-a[_ngcontent-%COMP%]{color:#067a8d;font-weight:700}.info-label[_ngcontent-%COMP%]{margin-top:10px}"]})};export{Se as AccountFavoritesComponent};

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.