PageSourceSearch

https://sidequestvr.com/chunk-54ZBG7U6.js

js sidequestvr.com collected 2026-09-24 08:59:36 UTC 10,733 bytes, 1 lines download raw bytes

1import{b as X,c as Y,d as Z,g as tt,h as et}from"./chunk-2BTSYOT7.js";import"./chunk-5FWIO4OW.js";import"./chunk-GPZM2QXL.js";import{a as K}from"./chunk-G477PCL2.js";import"./chunk-J5CFKZFC.js";import"./chunk-BSWFNN3E.js";import{b as H,c as J}from"./chunk-CIBY6B7Q.js";import"./chunk-WV4B4HPR.js";import{c as z,e as G,h as D,i as B,k as N,m as Q}from"./chunk-RHKHZH2I.js";import{i as j}from"./chunk-3RUUGTJM.js";import"./chunk-6GZWOG4L.js";import"./chunk-F5X5MWHG.js";import{a as $,b as R}from"./chunk-LLN6G6BG.js";import"./chunk-PZQZVEM4.js";import"./chunk-36QUTK7Z.js";import{a as W}from"./chunk-IYKCVKQQ.js";import"./chunk-S7HRMRUH.js";import"./chunk-BDS2Q76J.js";import"./chunk-77LUYYJW.js";import"./chunk-ULUX7TUZ.js";import{Q as V,b as T,c as q}from"./chunk-E5H7XEDV.js";import{$b as c,Ab as f,Bb as l,Cb as a,Hb as h,Jb as k,Ka as S,Kb as s,Sa as y,Ya as o,ac as u,bc as U,gb as L,jb as E,mb as _,na as C,pc as I,qb as d,qe as A,va as v,wa as x,wb as m,yb as F,yc as b,zb as g,zc as M}from"./chunk-Z4JINGEV.js";import{a as P,b as w,h as O}from"./chunk-WWX6BADO.js";var nt=(()=>{class e{transform(t){return tt[t]??t}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275pipe=E({name:"providerLabel",type:e,pure:!0})}}return e})();var at=e=>["/admin/scraper/apps",e,"platform-links"],lt=(e,r)=>r.label,st=(e,r)=>r.provider,ct=(e,r)=>r.title;function pt(e,r){if(e&1&&(l(0,"p",3),c(1),a()),e&2){let t=s();o(),u(t.store.sectionLockMessage("links"))}}function dt(e,r){if(e&1&&(l(0,"a",9)(1,"mat-icon",10),c(2,"settings"),a()()),e&2){let t,n=s(2);d("routerLink",I(1,at,(t=n.store.listing())==null?null:t.id))}}function mt(e,r){if(e&1&&(l(0,"div",4)(1,"span",6),c(2),a(),l(3,"a",7),c(4),a(),l(5,"span",8),c(6),a(),_(7,dt,3,3,"a",9),a()),e&2){let t=r.$implicit,n=s();o(2),u(t.label),o(),d("href",t.storeUrl,y),o(),U(" ",t.storeUrl," "),o(2),u(t.managedNote),o(),m(n.isAdmin?7:-1)}}function ut(e,r){if(e&1){let t=h();l(0,"button",18),k("click",function(){v(t);let i=s().$implicit,p=s();return x(p.removeRow(i.provider))}),l(1,"span",19),c(2,"\xD7"),a()()}}function _t(e,r){e&1&&(l(0,"p",16),c(1),a()),e&2&&(o(),u(r))}function gt(e,r){if(e&1&&(l(0,"p",17),c(1),a()),e&2){let t=s(2);o(),u(t.itchWarning())}}function ft(e,r){if(e&1){let t=h();l(0,"div",11)(1,"span",12),c(2),b(3,"providerLabel"),a(),l(4,"mat-form-field",13)(5,"input",14),k("change",function(i){let p=v(t).$implicit,ot=s();return x(ot.onUrlChange(p.provider,i))}),a()(),_(6,ut,3,0,"button",15),a(),_(7,_t,2,1,"p",16)(8,gt,2,1,"p",17)}if(e&2){let t,n=r.$implicit,i=s();o(2),u(M(3,8,n.provider)),o(2),d("subscriptSizing","dynamic"),o(),d("placeholder",n.provider==="Email"?"[email protected]":"https://\u2026")("value",n.linkUrl)("disabled",i.isSectionLocked),o(),m(i.isSectionLocked?-1:6),o(),m((t=i.rowError(n))?7:-1,t),o(),m(n.provider==="Itch"&&i.itchWarning()?8:-1)}}function vt(e,r){if(e&1&&(l(0,"mat-option",22),c(1),b(2,"providerLabel"),a()),e&2){let t=r.$implicit;d("value",t),o(),u(M(2,2,t))}}function xt(e,r){if(e&1&&(l(0,"mat-optgroup",21),g(1,vt,3,4,"mat-option",22,F),a()),e&2){let t=s().$implicit,n=s(2);d("label",t.title),o(),f(n.availableProvidersForGroup(t))}}function ht(e,r){if(e&1&&_(0,xt,3,1,"mat-optgroup",21),e&2){let t=r.$implicit,n=s(2);m(n.availableProvidersForGroup(t).length>0?0:-1)}}function kt(e,r){if(e&1){let t=h();l(0,"mat-form-field",5)(1,"mat-select",20),k("selectionChange",function(i){v(t);let p=s();return x(p.addProvider(i))}),g(2,ht,1,1,null,null,ct),a()()}if(e&2){let t=s();d("subscriptSizing","dynamic"),o(2),f(t.providerGroups)}}var Ct=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,bt=/^https:\/\/(.+)\.itch\.io\/([^/])+(\/)?$/,it=[{title:"Social",providers:X},{title:"Donations",providers:Y},{title:"Other stores",providers:Z}],Dt=(()=>{class e{constructor(){this.store=C(et),this.isAdmin=C(V).is_admin,this.providerGroups=it,this.itchWarning=S(null),this._linkProviders=it.flatMap(t=>t.providers)}get isSectionLocked(){return this.store.isSectionLocked("links")}get linkRows(){return this.store.urls().filter(t=>this._linkProviders.includes(t.provider))}availableProvidersForGroup(t){let n=this.linkRows.map(i=>i.provider);return t.providers.filter(i=>!n.includes(i))}get hasAvailableProviders(){return this.providerGroups.some(t=>this.availableProvidersForGroup(t).length>0)}addProvider(t){let n=t.value;!n||this.isSectionLocked||(this.store.setUrls([...this.store.urls(),{provider:n,linkUrl:""}]),t.source.value=null)}onUrlChange(t,n){let i=n.target;this.updateUrl(t,i.value.trim())}updateUrl(t,n){if(this.isSectionLocked)return;let i=W.cleanMetaStoreUrl(n);this.store.setUrls(this.store.urls().map(p=>p.provider!==t?p:w(P({},p),{linkUrl:i}))),t==="Itch"&&this._probeItchUrl(n)}removeRow(t){this.isSectionLocked||(this.store.setUrls(this.store.urls().filter(n=>n.provider!==t)),t==="Itch"&&this.itchWarning.set(null))}rowError(t){if(!t.linkUrl)return null;if(t.provider==="Email")return Ct.test(t.linkUrl)?null:"Enter a valid email address.";if(!/^https?:\/\//i.test(t.linkUrl))return"Enter a full URL starting with https://";try{return new URL(t.linkUrl),null}catch{return"Enter a valid URL."}}_probeItchUrl(t){return O(this,null,function*(){if(!t){this.itchWarning.set(null);return}if(!bt.test(t)){this.itchWarning.set('Be sure to link to the game project page, not a sub-page (e.g. "https://username.itch.io/my-game").');return}let n=`${t}${t.endsWith("/")?"":"/"}data.json`;try{let i=yield fetch(n);this.itchWarning.set(i.status===200?null:"This Itch.io link does not look like a game project page.")}catch{this.itchWarning.set("Could not verify this Itch.io link - double-check it points at your game project page.")}})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=L({type:e,selectors:[["app-links-section"]],decls:12,vars:2,consts:[[1,"links-section"],[1,"editor-card"],[1,"hint-copy"],[1,"lock-hint"],[1,"platform-link-row"],[1,"add-provider",3,"subscriptSizing"],[1,"provider-chip"],["target","_blank","rel","noopener",1,"platform-link-url",3,"href"],[1,"managed-note"],["matTooltip","Open in scraper admin","aria-label","Open in scraper admin",1,"scraper-a
1dmin-link",3,"routerLink"],[1,"material-symbols-outlined"],[1,"link-row"],[1,"provider-label"],[1,"url-field",3,"subscriptSizing"],["matInput","","type","text",1,"aurora-input",3,"change","placeholder","value","disabled"],["type","button","aria-label","Remove link",1,"remove-row"],[1,"row-error"],[1,"row-warning"],["type","button","aria-label","Remove link",1,"remove-row",3,"click"],["aria-hidden","true"],["placeholder","Add a link\u2026",3,"selectionChange"],[3,"label"],[3,"value"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"section",1)(2,"h2"),c(3,"Links"),a(),l(4,"p",2),c(5,"Add social, donation, and store links for your app. Rows left empty are not saved."),a(),_(6,pt,2,1,"p",3),g(7,mt,8,5,"div",4,lt),g(9,ft,9,10,null,null,st),_(11,kt,4,1,"mat-form-field",5),a()()),n&2&&(o(6),m(i.isSectionLocked?6:-1),o(),f(i.store.platformStoreLinks()),o(2),f(i.linkRows),o(2),m(!i.isSectionLocked&&i.hasAvailableProviders?11:-1))},dependencies:[B,j,q,T,J,H,Q,N,G,z,D,R,$,A,K,nt],styles:['.links-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px}.links-section[_ngcontent-%COMP%]     .mat-mdc-form-field .mat-mdc-text-field-wrapper{background:var(--sq-global-colour-surface-card-primary-background);border-radius:5px}.links-section[_ngcontent-%COMP%]     .mat-mdc-form-field .mat-mdc-form-field-infix{min-height:48px;padding-top:12px;padding-bottom:12px}.links-section[_ngcontent-%COMP%]   .editor-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.links-section[_ngcontent-%COMP%]   .editor-card[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin:0;color:var(--sq-global-colour-text-headings)}.links-section[_ngcontent-%COMP%]   .hint-copy[_ngcontent-%COMP%], .links-section[_ngcontent-%COMP%]   .lock-hint[_ngcontent-%COMP%]{margin:0;color:var(--sq-global-colour-subtitles)}.links-section[_ngcontent-%COMP%]   .link-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.links-section[_ngcontent-%COMP%]   .provider-label[_ngcontent-%COMP%]{min-width:110px;color:var(--sq-global-colour-text-headings)}.links-section[_ngcontent-%COMP%]   .url-field[_ngcontent-%COMP%]{flex:1}.links-section[_ngcontent-%COMP%]   .platform-link-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:var(--sq-global-spacing-padding-3);background:var(--sq-global-colour-surface-card-primary-background);border-radius:var(--sq-global-border-radius-md)}.links-section[_ngcontent-%COMP%]   .provider-chip[_ngcontent-%COMP%]{padding:2px 10px;border:1px solid var(--sq-global-colour-brand-primary);border-radius:10px;color:var(--sq-global-colour-brand-primary);font-size:.8em;white-space:nowrap}.links-section[_ngcontent-%COMP%]   .platform-link-url[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;color:var(--sq-global-colour-text-body);text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.links-section[_ngcontent-%COMP%]   .platform-link-url[_ngcontent-%COMP%]:hover{text-decoration:underline}.links-section[_ngcontent-%COMP%]   .managed-note[_ngcontent-%COMP%]{color:var(--sq-global-colour-subtitles);font-size:.85em;white-space:nowrap}.links-section[_ngcontent-%COMP%]   .scraper-admin-link[_ngcontent-%COMP%]{display:flex;flex-shrink:0;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid var(--sq-global-colour-surface-stroke);border-radius:50%;color:var(--sq-global-colour-subtitles)}.links-section[_ngcontent-%COMP%]   .scraper-admin-link[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{width:16px;height:16px;font-size:16px;font-variation-settings:"FILL" 0}.links-section[_ngcontent-%COMP%]   .scraper-admin-link[_ngcontent-%COMP%]:hover{border-color:var(--sq-global-colour-brand-secondary);color:var(--sq-global-colour-text-body)}.links-section[_ngcontent-%COMP%]   .remove-row[_ngcontent-%COMP%]{width:28px;height:28px;border:1px solid var(--sq-global-colour-surface-stroke);border-radius:50%;background:transparent;color:var(--sq-global-colour-text-body);cursor:pointer}.links-section[_ngcontent-%COMP%]   .row-error[_ngcontent-%COMP%]{margin:-8px 0 0 122px;color:var(--sq-global-colour-semantic-error)}.links-section[_ngcontent-%COMP%]   .row-warning[_ngcontent-%COMP%]{margin:-8px 0 0 122px;color:var(--sq-global-colour-semantic-warning)}.links-section[_ngcontent-%COMP%]   .add-provider[_ngcontent-%COMP%]{max-width:280px}@media(width<=600px){.links-section[_ngcontent-%COMP%]   .link-row[_ngcontent-%COMP%]{flex-wrap:wrap}.links-section[_ngcontent-%COMP%]   .row-error[_ngcontent-%COMP%], .links-section[_ngcontent-%COMP%]   .row-warning[_ngcontent-%COMP%]{margin-left:0}}']})}}return e})();export{Dt as LinksSectionComponent};

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.