1"use strict";(self.webpackChunkultimate_jekyll=self.webpackChunkultimate_jekyll||[]).push([[9738],{596(e,t,n){var o=n(5652),r=n(8129);n.d(t,["A",0,async function(e,t={}){const i=JSON.parse(JSON.stringify(t)),{getAuth:s}=await Promise.all([n.e(9943),n.e(2052)]).then(n.bind(n,2052)),a=s().currentUser;if(a||console.warn("authorizedFetch: No authenticated user found. Did we fully wait for auth state to be determined?"),i.headers||(i.headers={}),a){const e=await a.getIdToken(!0);i.headers.Authorization=`Bearer ${e}`}const c="complete"===i.output;i.output="complete";const d=await(0,o.A)(e,i);return function(e){const t=e?.["bm-properties"];if(!t?.usage)return;const{current:n,limits:o}=t.usage;if(!n)return;const i=r.A.bindings().getContext().usage||{},s={...i};for(const e of Object.keys(n))s[e]={...i[e],...n[e],limit:o?.[e]||0};r.A.bindings().update({usage:s})}(d.headers),c?d:d.body}])},9738(e,t,n){n.r(t),n.d(t,{init:()=>l,loadData:()=>f,onShow:()=>p});var o=n(200),r=n(596),i=n(8129);let s=null,a=null,c=new Map;const d=["google","discord","github","twitter","facebook","spotify","apple","microsoft","linkedin","twitch","slack"];function u(){return`${i.A.getApiUrl()}/backend-manager/user/oauth2`}async function l(){}async function f(e,t){e&&(a=e,s=t,m())}function m(){const e=document.getElementById("connections-loading");if(e&&e.classList.add("d-none"),!s)return void(e&&e.classList.remove("d-none"));const t=s,n=a?.oauth2||{};let l=!1;d.forEach(e=>{const i=t[e],d=document.getElementById(`connection-${e}`);d&&(i&&!1!==i.enabled?(l=!0,d.classList.remove("d-none"),function(e){const t=`connection-form-${e}`;if(!document.getElementById(t))return;if(c.has(e))return;const n=new o.FormManager(`#${t}`,{submittingText:"Connecting..."});c.set(e,n),n.on("statechange",({state:t})=>{if("ready"===t){const t=a?.oauth2?.[e],n=s?.[e];h(e,t,n)}}),n.on("submit",async({data:e,$submitButton:t})=>{const n=e.provider,o=t?.getAttribute("data-action");if("connect"===o)await async function(e){const t=s?.[e];if(!t||!1===t.enabled)throw new Error("This connection service is not available.");const n=new URL(u());n.searchParams.set("provider",e),n.searchParams.set("action","authorize"),n.searchParams.set("redirect","false");const o=await(0,r.A)(n.toString(),{method:"GET",timeout:3e4,response:"json",tries:2});if(!o.url||!/^https?:\/\//i.test(o.url))throw new Error(o.message||"Failed to get authorization URL");window.location.href=o.url}(n);else if("disconnect"===o){const e=await async function(e){const t=e.charAt(0).toUpperCase()+e.slice(1);if(await new Promise(e=>setTimeout(e,1)),!confirm(`Are you sure you want to disconnect your ${t} account?`))throw new Error("Disconnection cancelled");const n=new URL(u());n.searchParams.set("provider",e);const o=await(0,r.A)(n.toString(),{method:"DELETE",timeout:3e4,response:"json",tries:2});if(o.success)return a.oauth2&&a.oauth2[e]&&delete a.oauth2[e],!0;throw new Error(o.message||"Failed to disconnect")}(n);if(e){const e=s?.[n];h(n,null,e)}}})}(e),h(e,n[e],i)):d.classList.add("d-none"))});const f=document.getElementById("connections-list");Object.keys(t).forEach(e=>{const n=t[e];if(!n||!1===n.enabled)return;if(document.getElementById(`connection-${e}`))return;l=!0,console.warn(`[Connections] Provider "${e}" is enabled in brand config but missing from the account page template. Add it to the connections frontmatter list.`);const o=`connection-${e}-unconfigured`;if(document.getElementById(o))return;const r=e.charAt(0).toUpperCase()+e.slice(1),s=document.createElement("div");s.id=o,s.className="border-top px-0 py-3",s.innerHTML=`\n <div class="d-flex flex-column flex-sm-row align-items-stretch align-items-sm-center justify-content-between gap-3">\n <div class="d-flex align-items-center">\n <div class="d-flex align-items-center justify-content-center me-3 flex-shrink-0" style="width: 1.875em; font-size: 1.5rem;">\n ⚠\n </div>\n <div>\n <h6 class="mb-0">${i.A.utilities().escapeHTML(r)}</h6>\n <small class="text-warning d-block">Unsupported connection: "${i.A.utilities().escapeHTML(e)}". Update Ultimate Jekyll Manager to enable this provider.</small>\n </div>\n </div>\n <div class="text-start text-sm-end flex-shrink-0">\n <button class="btn btn-sm btn-outline-secondary" disabled>Unavailable</button>\n </div>\n </div>\n `,f.appendChild(s)});
1const m=document.getElementById("connections-empty");m&&(l?m.classList.add("d-none"):m.classList.remove("d-none"))}function h(e,t,n){const o=document.getElementById(`${e}-connection-status`),r=document.getElementById(`${e}-connection-description`),i=document.getElementById(`connection-form-${e}`),s=i?.querySelector('button[data-action="connect"]'),a=i?.querySelector('button[data-action="disconnect"]'),c=t&&t.identity;if(r){const t={google:"Enable single sign-on with your Google account",discord:"Connect to access Discord community features",github:"Link your GitHub account for repository access",twitter:"Share updates and connect with Twitter",facebook:"Connect your Facebook account for social features"},o=n?.description||t[e]||`Connect your ${e.charAt(0).toUpperCase()+e.slice(1)} account`;r.textContent=o,r.classList.remove("d-none")}if(o)if(c){const e=(d=t)&&d.identity?d.identity.global_name||d.identity.username||d.identity.name||d.identity.email||d.identity.id||"Connected":"Unknown";let n=`Connected: ${e}`;t.updated&&t.updated.timestamp&&(n=`${e} ⢠${new Date(t.updated.timestamp).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}`),o.textContent=n,o.classList.remove("d-none")}else o.textContent="",o.classList.add("d-none");var d;s&&a&&(c?(s.classList.add("d-none"),a.classList.remove("d-none")):(s.classList.remove("d-none"),a.classList.add("d-none")))}function p(){a&&s&&m()}},5652(e,t,n){n.d(t,{A:()=>c});var o=(e=>"undefined"!=typeof require?require:"undefined"!=typeof Proxy?new Proxy(e,{get:(e,t)=>("undefined"!=typeof require?require:e)[t]}):e)(function(e){if("undefined"!=typeof require)return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});function r(e){const t={};return e&&e.headers?(e.headers.forEach(function(e,n){try{t[n]=JSON.parse(e)}catch(o){t[n]=e}}),t):t}function i(e,t,n){return"body"===n.output?t:{status:e.status,headers:r(e),body:t}}function s(e){return new Promise(function(t){setTimeout(t,e)})}async function a(e,t){const n=function(e,t){if(!(e=e||t.url))throw new Error("No URL provided.");return(t=t||{}).timeout=t.timeout||6e4,t.tries=void 0===t.tries?1:t.tries,t.log=void 0!==t.log&&t.log,t.method=(t.method||"get").toLowerCase(),t.cacheBreaker=void 0===t.cacheBreaker||t.cacheBreaker,t.contentType=(void 0===t.contentType?"":t.contentType).toLowerCase(),t.response=(void 0===t.response?"raw":t.response).toLowerCase(),t.output=void 0===t.output?"body":t.output,t.authorization=void 0!==t.authorization&&t.authorization,t.attachResponseHeaders=void 0!==t.attachResponseHeaders&&t.attachResponseHeaders,t.download=t.download||!1,t.headers=t.headers||{},t.query=t.query||{},t.body=t.body||null,{url:e,options:t}}(e,t);e=n.url,t=n.options;const{url:a,config:c}=function(e,t){const n=t.body&&"object"==typeof t.body,o=n&&"function"==typeof t.body.append,r={method:t.method.toUpperCase(),headers:{...t.headers},body:null};if(t.body&&(r.body=o?t.body:n?JSON.stringify(t.body):t.body),(n&&!o||"json"===t.contentType)&&(r.headers["Content-Type"]="application/json"),"GET"===r.method&&(delete r.body,delete r.headers["Content-Type"]),t.authorization){const e=t.authorization;r.headers.Authorization=e.match(/^Bearer |^Basic |^Digest /)?e:`Bearer ${e}`}const i=new URL(e);Object.keys(t.query).forEach(function(e){i.searchParams.set(e,t.query[e])});const s=!0===t.cacheBreaker?Math.floor(Date.now()/1e3):t.cacheBreaker;return s&&i.searchParams.set("cb",s),t.log&&console.log("Fetch configuration:",{bodyIsFormData:o,bodyIsObject:n,options:t,config:r}),{url:i.toString(),config:r}}(e,t);return async function(e,t){const n=t.tries,o=0===n;let r;for(let i=1;o||i<=n;i++){if(i>1){const e=Math.min(3e3*(i-1),6e4);await s(e)}let a,c;t.log&&console.log(`Fetch (${i}/${t.tries}): attempt`),t.timeout>0&&(a=new AbortController,c=setTimeout(function(){a.abort()},t.timeout));try{const t=await e(a?a.signal:void 0);return clearTimeout(c),t}catch(e){if(clearTimeout(c),r="AbortError"===e.name?new Error("Request timed out"):e,!o&&i>=n)throw r}}}(async function(e){const n={...c};e&&(n.signal=e);const s="undefined"!=typeof window&&window.fetch||globalThis.fetch;t.log&&console.log("Fetching:",a);const d=await s(a,n);if(d.ok&&t.download){const e=await function(e,t){const{Readable:n}=o("stream"),r=o("fs-jetpack"),i=o("mime-types"),s=o("path");return new Promise(function(o,a){const c=e.headers.get("content-type"),d=(i.extension(c)||"").replace("jpeg","jpg");if(!r.exists(t.download)){const e=s.dirname(t.download);r.dir(e)}s.extname(t.download)||(t.download+=`.${d}`);const u=n.fromWeb(e.body),l=r.createWriteStream(t.download);u.pipe(l),u.on("error",function(e){a(new Error(`Failed to download: ${e}`))}),l.on("finish",function(){o({res:e,path:t.download})})})}(d,t);return i(d,e,t)}if(!d.ok){const e=await function(e,t){const n=r(e);return e.text().then(function(o){const r=new Error(o||e.statusText||"Unknown error");
1if(r.status=e.status,n["bm-properties"])try{Object.keys(n["bm-properties"]).forEach(function(e){r[e]=n["bm-properties"][e]})}catch(e){console.warn("Failed to add bm-properties to error object",e)}return t.attachResponseHeaders&&Object.keys(n).forEach(function(e){"bm-properties"!==e&&(r[e]=n[e])}),r})}(d,t);throw e}const u=await async function(e,t){if("raw"===t.response)return e;const n=await e.text();if("json"===t.response)try{return JSON.parse(n)}catch(e){throw new Error(`Response is not JSON: ${e}`)}return n}(d,t);return i(d,u,t)},t)}"undefined"!=typeof window&&(window.WonderfulFetch=a);var c=a}}]);
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.