1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6d4ded74-f39f-5f7a-9c97-773c2a88e5b3")}catch(e){}}(); 3import{a as C}from"./chunk-CMSUN764.js";import{a as T}from"./chunk-KIC5KJ7C.js";import"./chunk-77KO6I45.js";import"./chunk-R7MSJQOC.js";import"./chunk-6UNLROVI.js";import"./chunk-3YM57F2T.js";import{f as v}from"./chunk-Z5M2FKAZ.js";import"./chunk-5NDSS4DO.js";import"./chunk-TTUVP5SZ.js";import"./chunk-5CMUHLSG.js";import"./chunk-TNAGEFXD.js";import"./chunk-YH4N3M4B.js";import"./chunk-BHOSW24E.js";import"./chunk-56LBQIQP.js";import"./chunk-IKWIL4NU.js";import"./chunk-5K5PYV5V.js";import"./chunk-TDGVUJZJ.js";import"./chunk-MWF7JXGK.js";import"./chunk-UJXOZNZV.js";import"./chunk-KS3Q7H57.js";import"./chunk-DAOAKQM2.js";import"./chunk-MGCQ5S6F.js";import"./chunk-MJXNRHWH.js";import"./chunk-BUOPWRDV.js";import"./chunk-UQU3EU23.js";import"./chunk-346ISJSG.js";import"./chunk-CNRKNNWP.js";import"./chunk-L6Z7ZO7O.js";import"./chunk-TLCCWCNW.js";import"./chunk-5SJALNJN.js";import"./chunk-XEY266ER.js";import"./chunk-SEDEP525.js";import"./chunk-SECBI6OV.js";import"./chunk-LXBG4CPT.js";import"./chunk-56KVT3OQ.js";import"./chunk-MF7VZYLI.js";import"./chunk-NFMDOWTR.js";import"./chunk-QE6DXY66.js";import"./chunk-B5YZVWIB.js";import"./chunk-HCSN2NMS.js";import"./chunk-FDIRDMLL.js";import"./chunk-XQLUXGKM.js";import"./chunk-3JHJJCIF.js";import"./chunk-J4X36CU5.js";import"./chunk-X3ZU2Z3D.js";import"./chunk-QZXCI4ZV.js";import"./chunk-VO633UWN.js";import"./chunk-XIKGSSI2.js";import"./chunk-MNZQGPDO.js";import{j as f}from"./chunk-NK2KZLT6.js";import"./chunk-MU5APV2L.js";import"./chunk-KRFZY2QT.js";import"./chunk-DFSGG2NH.js";import"./chunk-MREDPIUE.js";import"./chunk-BWICLBYB.js";import"./chunk-TYTNPDEC.js";import"./chunk-WAPZ5LEW.js";import{L as w,M as y}from"./chunk-746D4QTP.js";import{D as U,Ua as h,qa as i}from"./chunk-BZJI6Z2X.js";import"./chunk-CS7K6LXP.js";function A(t){let u=i(f),d=i(C),n=i(h);return new Promise(r=>{let o=d.data;o?.id?o.urn!==t.params.urn?c(t.params.urn,r):r(o):c(t.params.urn,r)});function c(r,o){let m={include_all_details:!0};if(w(n)){let e=window.location.pathname.match(/story\/([^/?#]+)\/invite\/([^/?#]+)/);!e&&window.location.search&&(e=new URLSearchParams(window.location.search).get("redirectUrl")?.match(/story\/([^/?#]+)\/invite\/([^/?#]+)/)),e&&e[2]&&(m.token=e[2])}d.getStory(r.trim(),m).subscribe(e=>{if(w(n)&&e.urn!==r){let p=l({host:"",urn:e.urn});window.location.pathname=p}else d.data=e,o(e)},e=>{if(w(n)){if(e.status===404){let p={redirectUrl:`/story/${r}`};u.navigate(["/404"],{queryParams:p})}else if(e.error?.message==="Unpublished story")u.navigate(["/unpublished"],{skipLocationChange:!0});else if(e.status===422&&e.error?.new_url)if(e.error.host){let p=l(e.error);window.location.href=p}else window.location.href=e.error.new_url;else if(e.status===302&&e.headers.get("location")){let s=e.headers.get("location").match(/^(https?:)\/\/(([^:/?#]*)(?::([0-9]+))?)([/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/)[3];window.location.href=`https://${s}${window.location.pathname}${window.location.search}`}}else o({})})}function l(r){let o=`${r.host}/story/${r.urn}`,m=new RegExp("/story/([^/#?]+)((/[^/?#]+)*)?"),e=window.location.pathname.match(m);return e&&e[2]&&(o+=e[2]),window.location.search&&(o+=window.location.search),window.location.hash&&(o+=window.location.hash),o=o.replace("7000",window.location.port),o}}var S=t=>A(t);var a=(t,u)=>{let d=i(f),n=i(v),c=i(C),l=i(h);if(y(l))return!0;let r=t.parent.params.urn,o=d.parseUrl(`/story/${r}`),m=d.parseUrl("/login");m.queryParams={redirectUrl:u.url};let e=t.url[0].path==="bank-setup";return new Promise(s=>{c.dataRef.id&&n.currentUserResolved?n.currentUser?.id?p(s):s(m):U([n.getCurrentUser(),A(t.parent)]).subscribe(g=>{n.currentUser=g[0],c.data=g[1],n.currentUser?.id?p(s):s(m)})});function p(s){let g=c.dataRef;e&&c.settingsPromise().then(R=>{if(R.user_is_recipient){s(!0);return}}),n.hasEditPermission(g.perm_urn,g.admin_user_ids).then(R=>{R?(c.userCanEdit=!0,s(!0)):s(o)})}};var G=(t,u)=>{let d=i(f),n=i(v),c=i(h);if(y(c))return!0;let l=d.parseUrl("/login");return l.queryParams={redirectUrl:u.url},new Promise(r=>{n.currentUserResolved?n.currentUser?.id?r(!0):r(l):n.getCurrentUser().subscribe(o=>{n.currentUser=o,n.currentUser?.id?r(!0):r(l)})})};var K=[{path:"",loadComponent:()=>import("./chunk-U5JKPVUY.js").then(t=>t.StoryComponent),resolve:{story:S},runGuardsAndResolvers:"always",children:[{path:"",loadComponent:()=>import("./chunk-4QR6LZBE.js").then(t=>t.StoryPageComponent)},{path:"spotlight",redirectTo:""},{path:"related_causes",redirectTo:""},{path:"fundraising",loadComponent:()=>import("./chunk-REOUN4WU.js").then(t=>t.FundraisingComponent),canActivate:[a],runGuardsAndResolvers:"always",data:{pageTitle:"fundraising"}},{path:"widgets",redirectTo:"embeds"},{path:"embeds",loadChildren:()=>import("./chunk-LZQX3D6W.js").then(t=>
3t.WIDGETS_ROUTES),canActivate:[a],runGuardsAndResolvers:"always",data:{pageTitle:"embeds"}},{path:"checkout",loadComponent:()=>import("./chunk-TJE5RLH5.js").then(t=>t.CheckoutComponent),canActivate:[a],runGuardsAndResolvers:"always",data:{pageTitle:"checkout"}},{path:"donation-form",loadComponent:()=>import("./chunk-EIFN3BXR.js").then(t=>t.DonationFormComponent),canActivate:[a],runGuardsAndResolvers:"always",data:{pageTitle:"donation form"}},{path:"thank-you",loadComponent:()=>import("./chunk-CZZDJSKC.js").then(t=>t.ThankYouComponent),canActivate:[a],runGuardsAndResolvers:"always",data:{pageTitle:"thank you"}},{path:"donation-receipt",loadComponent:()=>import("./chunk-UVNDFELM.js").then(t=>t.DonationReceiptComponent),canActivate:[a],runGuardsAndResolvers:"always",data:{pageTitle:"Donation receipt"}},{path:"donations",loadComponent:()=>import("./chunk-GASVMWHP.js").then(t=>t.DonationsComponent),canActivate:[a],runGuardsAndResolvers:"always",data:{pageTitle:"Donations"}},{path:"matching-grants",loadComponent:()=>import("./chunk-R7DDKSKS.js").then(t=>t.MatchingGrantsComponent),canActivate:[a],runGuardsAndResolvers:"always",data:{pageTitle:"Matching grants"}},{path:"matching-grants",canActivate:[a],runGuardsAndResolvers:"always",data:{pageTitle:"matching grants"},children:[{path:"create",loadComponent:()=>import("./chunk-KT27WZ4E.js").then(t=>t.CreateUpdateMatchesComponent),data:{pageTitle:"create"}},{path:":grantId/edit",loadComponent:()=>import("./chunk-KT27WZ4E.js").then(t=>t.CreateUpdateMatchesComponent),data:{pageTitle:"edit"}}]},{path:"bank-setup",loadComponent:()=>import("./chunk-GDSIVLHB.js").then(t=>t.BankSetupComponent),canActivate:[a],runGuardsAndResolvers:"always",data:{pageTitle:"bank setup"}},{path:"invite/:token/:action",loadComponent:()=>import("./chunk-TSQAK5H6.js").then(t=>t.InviteComponent),canActivate:[G],runGuardsAndResolvers:"always",data:{pageTitle:"invite"}},{path:"settings",loadComponent:()=>import("./chunk-CHRRZANQ.js").then(t=>t.SettingsComponent),canActivate:[a],runGuardsAndResolvers:"always",data:{pageTitle:"settings"}},{path:"admin-tools",loadComponent:()=>import("./chunk-3GFBIP6S.js").then(t=>t.AdminToolsComponent),canActivate:[T,a],runGuardsAndResolvers:"always",data:{pageTitle:"Admin tools",expectedRole:"mighty_admin"}},{path:"success",loadComponent:()=>import("./chunk-AT7CDBLU.js").then(t=>t.SuccessComponent),canActivate:[a],runGuardsAndResolvers:"always",data:{pageTitle:"success"}}]}];export{K as storyRoutes}; 4 5//# debugId=6d4ded74-f39f-5f7a-9c97-773c2a88e5b3
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.