PageSourceSearch

https://auth.buffer.com/assets/Login-CyI-AFal.js

js buffer.com collected 2026-09-24 06:40:09 UTC 9,046 bytes, 1 lines download raw bytes

1import{M as e,O as t,P as n,k as r,r as i,t as a}from"./jsx-runtime-CL-DilWO.js";import{D as o,E as s,b as c}from"./LucideIcons-9IqVpk3v.js";import{i as l,n as u,r as d,t as ee}from"./LegalFooter-CZUOGWXy.js";import{t as f}from"./Notice-hJmUoi3l.js";import{t as p}from"./VisuallyHidden-CYKcRQqL.js";import{i as m,t as h}from"./Button-Dfnu3zd4.js";import{n as g,t as _}from"./AuthFormFields.module-KMmMqFAU.js";import{t as v}from"./PasswordInput-CVPGGr1r.js";import{t as y}from"./Label-DuHNjnur.js";import{t as b}from"./useCookie-Ca5KReaY.js";import{n as x,r as S}from"./pageTitle-DrP3IrGA.js";import{n as te,r as ne,t as C}from"./PageLayout-CMwo5IdX.js";import{n as re,t as w}from"./loginDetails-dwIhq5JG.js";import{a as T,o as E,s as D}from"./screenVariant-Fc8c8l9Z.js";import{n as O}from"./constants-C42EMpmP.js";var k={banner:`_banner_1czmt_1`,warning:`_warning_1czmt_22`,critical:`_critical_1czmt_26`,content:`_content_1czmt_30`,text:`_text_1czmt_39`,close:`_close_1czmt_43`,action:`_action_1czmt_66`,dismiss:`_dismiss_1czmt_72`},A=n(e(),1),j=a(),M=A.forwardRef(({className:e,...t},n)=>(0,j.jsx)(`p`,{ref:n,className:o(k.text,e),...t}));M.displayName=`Banner.Text`;var N=function(e){return e.critical=`critical`,e.warning=`warning`,e.info=`primary`,e}(N||{}),P=({className:e,children:t,...n})=>{let{variant:r}=R();return(0,j.jsx)(h,{className:o(k.action,e),size:`small`,variant:n?.variant||N[r],...n,children:t})};P.displayName=`Banner.Action`;var F=({className:e,children:t,...n})=>{let{variant:r}=R();return(0,j.jsx)(h,{as:`a`,className:o(k.action,e),size:`small`,variant:n?.variant||N[r],...n,children:t})};F.displayName=`Banner.ActionLink`;var I=({className:e,children:t,...n})=>(0,j.jsx)(h,{className:o(k.dismiss,e),size:`small`,variant:`secondary`,...n,children:t});I.displayName=`Banner.Dismiss`;var L=A.createContext(null),R=()=>{let e=A.useContext(L);if(!e)throw Error(`useBanner must be used within a Banner`);return e},z={critical:`alert`,warning:`status`,info:`status`},B=A.forwardRef(({variant:e=`info`,children:t,className:n,onDismiss:r,...i},a)=>(s(r!==void 0,"Banner: The `onDismiss` prop is deprecated. Use a `Banner.Action` button inside the banner content to handle dismissal instead."),(0,j.jsx)(L.Provider,{value:{variant:e},children:(0,j.jsxs)(`div`,{ref:a,role:z[e],className:o(k.banner,e!==`info`&&k[e],n),...i,children:[(0,j.jsx)(`div`,{className:k.content,children:t}),r&&(0,j.jsxs)(m,{className:k.close,onClick:r,children:[(0,j.jsx)(p,{children:`Dismiss`}),(0,j.jsx)(c,{})]})]})})));B.displayName=`Banner`;var V=Object.assign(B,{Text:M,Action:P,ActionLink:F,Dismiss:I}),H=`https://status-proxy.buffer.com`,U=e=>typeof e==`object`&&!!e,W=e=>{if(!(!U(e)||typeof e.name!=`string`||typeof e.group_name!=`string`))return{...typeof e.id==`string`?{id:e.id}:{},name:e.name,group_name:e.group_name,...typeof e.current_status==`string`?{current_status:e.current_status}:{}}},G=e=>{if(!Array.isArray(e))return;let t=e.map(W);return t.every(e=>e!==void 0)?t:void 0},K=e=>{if(!(!U(e)||typeof e.id!=`string`||typeof e.name!=`string`))return{id:e.id,name:e.name,...typeof e.status==`string`?{status:e.status}:{},url:typeof e.url==`string`?e.url:``,...typeof e.last_update_message==`string`?{last_update_message:e.last_update_message}:{},...typeof e.last_update_at==`string`?{last_update_at:e.last_update_at}:{},...typeof e.current_worst_impact==`string`?{current_worst_impact:e.current_worst_impact}:{},affected_components:G(e.affected_components)}},q=e=>!U(e)||!Array.isArray(e.ongoing_incidents)?[]:e.ongoing_incidents.flatMap(e=>{let t=K(e);return t===void 0?[]:[t]});async function J({signal:e}={}){try{let t=await fetch(H,{signal:e});if(!t.ok)throw Error(`Status proxy returned ${t.status}`);return q(await t.json())}catch(e){throw e instanceof Error&&e.name!==`AbortError`&&console.error(e.message),e}}var Y={logo:`_logo_1gcgu_13`,"logo-entrance":`_logo-entrance_1gcgu_1`,logoSection:`_logoSection_1gcgu_23`,heading:`_heading_1gcgu_30`,fields:`_fields_1gcgu_34`,field:`_field_1gcgu_34`,passwordField:`_passwordField_1gcgu_48`,passwordLabel:`_passwordLabel_1gcgu_57`,passwordInput
1:`_passwordInput_1gcgu_62`,forgotLink:`_forgotLink_1gcgu_67`,signupText:`_signupText_1gcgu_74`},X={link:`_link_ka0rz_1`},ie=`https://status.buffer.com/`;function Z(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function ae({incidents:e}){let[t,n]=b(`buffer-status-dismissed-incidents`,[]),r=Z(t),i=e.find(e=>!r.includes(e.id));return i?(0,j.jsxs)(V,{variant:`warning`,children:[(0,j.jsxs)(V.Text,{children:[(0,j.jsx)(`strong`,{children:`⚠️ Buffer Status:`}),` `,i.name,` —`,` `,(0,j.jsx)(u,{color:`inherit`,href:i.url||ie,target:`_blank`,rel:`noopener noreferrer`,className:X.link,children:`More details`})]}),(0,j.jsx)(V.Dismiss,{onClick:()=>{n(e=>[...Z(e),i.id])},children:`Dismiss`})]}):null}var Q=e=>typeof e==`string`?e.trim().toLowerCase():``,oe=new Set([`social networks`,`developer platform`]),se=new Set([`publishing`,`community`,`analytics`,`settings`,`channel connections`]),ce=e=>Q(e.name)===`login`,le=e=>oe.has(Q(e.group_name))||se.has(Q(e.name)),ue=e=>{let t=e.affected_components??[];return t.length===0||t.some(ce)?!0:!t.every(le)};function de(e){return e.filter(ue)}var fe=x(`Log In`),pe=3e3,me=`This invitation may have expired or been cancelled. Ask the admin who invited you to send a new invitation.`,$={missing_credentials:`Please enter your email and password.`,invalid_credentials:`Invalid email or password. Please try again.`,account_suspended:`Your account has been suspended. Please contact support.`,rate_limited:O},he={variant:`default`,invite:null,inviteInvalid:!1};function ge(){let e=new URL(window.location.href);e.searchParams.delete(`error`),window.history.replaceState(window.history.state,``,e)}function _e(e){let t=e.inviterName&&e.inviterEmail?`${e.inviterName} (${e.inviterEmail})`:e.inviterName||e.inviterEmail;return t&&e.organizationName?`${t} invited you to join ${e.organizationName} on Buffer. Log in to accept.`:t?`${t} invited you to their Buffer account. Log in to accept.`:e.organizationName?`You've been invited to join ${e.organizationName} on Buffer. Log in to accept.`:`We found your existing Buffer account. Log in to accept.`}async function ve({params:e}){return w(e.uid)}var ye=r(function({params:e,loaderData:n}){let{uid:r}=e,a=n??he,s=a.variant===`buffer-web`,c=a.inviteInvalid,[p,m]=(0,A.useState)([]);(0,A.useEffect)(()=>{if(!s)return;let e=new AbortController,t=setTimeout(()=>e.abort(),pe),n=!1;return J({signal:e.signal}).then(e=>(n||m(de(e)),null)).catch(()=>void 0).finally(()=>clearTimeout(t)),()=>{n=!0,clearTimeout(t),e.abort()}},[s]);let b=(0,j.jsx)(u,{as:i,to:`/signup/${r}`,children:`Create an account`}),[x]=t(),w=x.get(`error`),O=w?$[w]??null:null,[k,M]=(0,A.useState)(!1),N=w===`invalid_credentials`&&!k,P=x.get(`email`)??``,F=T(`email`),I=()=>{M(!0),F()},L=a.invite?.invitedEmail,R=!!L,z=(0,j.jsxs)(j.Fragment,{children:[a.invite&&(0,j.jsx)(f,{variant:`info`,children:_e(a.invite)}),c&&(0,j.jsx)(f,{variant:`error`,children:me})]}),B=(0,j.jsx)(`form`,{action:`/interaction/${r}/login`,method:`post`,onSubmit:ge,className:_.form,children:(0,j.jsxs)(d,{direction:`column`,gap:`lg`,children:[z,O&&(0,j.jsx)(f,{variant:`error`,children:O}),(0,j.jsxs)(`div`,{className:Y.fields,children:[(0,j.jsxs)(`div`,{className:Y.field,children:[(0,j.jsx)(y,{htmlFor:`email`,children:`Email`}),(0,j.jsx)(g,{id:`email`,name:`email`,type:`email`,autoComplete:`username`,required:!0,size:`large`,className:_.input,defaultValue:L||P,readOnly:R,placeholder:`Your email address`,"aria-invalid":N,onChange:I})]}),(0,j.jsxs)(`div`,{className:Y.passwordField,children:[(0,j.jsx)(y,{htmlFor:`password`,className:Y.passwordLabel,children:`Password`}),(0,j.jsx)(v,{id:`password`,name:`password`,autoComplete:`current-password`,required:!0,size:`large`,className:o(_.input,Y.passwordInput),placeholder:`Your password`,"aria-invalid":N,onChange:I}),(0,j.jsx)(u,{as:i,to:`/forgot-password?uid=${r}`,color:`inherit`,className:o(Y.forgotLink,s&&E.forgotLink),children:s?`Forgot Password?`:`Forgot password?`})]})]}),(0,j.jsx)(h,{type:`submit`,size:`large`,disabled:c,className:o(_.submitButton,s&&E.submitButton),children:`Continue`})]})});return s?(0,j.jsx)(D,{hero:(0,j.jsx)(re,{}),banner:(0,j.jsx)(ae,{incidents:p}),children:(0,j.jsxs)(`div`,{className:E.formBlock,children:[(0,j.jsxs)(`div`,{className:Y.logoSection,children:[(0,j.jsx)(S,{className:o(Y.logo,E.logoMark)}),(0,j.jsx)(l,{size:`lg`,as:`h1`,className:Y.heading,children:`Log in to Buffer`})]}),(0,j.jsxs)(`div`,{className:E.body,children:[(0,j.jsxs)(`p`,{className:E.prompt,children:[`New to Buffer? `,b]}),B]})]})}):(0,j.jsxs)(ne,{children:[(0,j.jsxs)(te,{children:[(0,j.jsxs)(`div`,{className:Y.logoSection,children:[(0,j.jsx)(S,{className:Y.logo}),(0,j.jsx)(l,{size:`lg`,as:`h1`,className:Y.heading,children:`Log in to Buffer`})]}),(0,j.jsxs)(C,{children:[(0,j.jsxs)(`p`,{className:Y.signupText,children:[`New to Buffer? `,b]}),B]})]}),(0,j.jsx)(ee,{})]})});export{ve as clientLoader,ye as default,fe as meta};

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.