PageSourceSearch

https://ecn.net.au/_nuxt/PvkzUmn2.js

js ecn.net.au collected 2026-10-02 13:01:17 UTC 2,997 bytes, 1 lines download raw bytes

1import{_ as M}from"./BFiieZ_G.js";import{_ as P}from"./pn4BklKQ.js";import{u as T,o as $,c as i,a as d,b as t,d as m,w as c,F as B,e as k,i as _,m as I,r as f,g as s,n as w,t as W,h as v}from"./DYfXanV7.js";import{u as q,a as E}from"./BULsbhIX.js";import"./BDLW59ml.js";const F={class:"mt-28 md:mt-56 mb-12 container relative w-full lg:w-4/5 xl:w-3/5 mx-auto px-8 lg:px-0"},L={key:0,role:"status",class:"text-gray-600 py-10"},N={key:0},V={key:1},j={key:0,class:"font-semibold text-red-700"},z={key:1,class:"font-semibold text-red-700"},A=["disabled"],x="py-2 px-4 rounded transition ease-in-out duration-300 bg-lightblue active:bg-blue text-white cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",O={__name:"[token]",setup(D){q("Manage your subscriptions");const h=T(),r=String(h.params.token??""),p=E(),n=f("loading"),y=f(null),a=f("idle");async function g({quiet:o=!1}={}){if(!_(r)){n.value="invalid";return}o||(n.value="loading");const{status:e,body:l}=await p.getManage(r),u=I(e,l);o&&u.state!=="ready"||(y.value=u.preferences??null,n.value=u.state)}const S=async o=>v((await p.saveManage(r,o)).status);async function C(){if(a.value==="sending"||!_(r))return;a.value="sending";const o=v((await p.resendManage(r)).status);a.value=o==="done"?"sent":o==="rate-limited"?"rate-limited":"error"}return $(g),(o,e)=>{const l=M,u=P;return s(),i("div",F,[e[5]||(e[5]=d("h2",{class:"text-2xl md:text-3xl font-bold text-blue mb-5"},"Manage your subscriptions",-1)),t(n)==="loading"?(s(),i("p",L,"Loading your subscriptions...")):t(n)==="error"||t(n)==="rate-limited"?(s(),m(l,{key:1,tone:"error",title:"We couldn't load your subscriptions"},{actions:c(()=>[d("button",{type:"button",class:w(x),onClick:e[0]||(e[0]=b=>g())},"Try again")]),default:c(()=>[t(n)==="rate-limited"?(s(),i("p",N,"Too many requests. Please wait a minute and try again.")):(s(),i("p",V,"Please check your connection and try again."))]),_:1})):t(n)==="invalid"?(s(),i(B,{key:2},[t(a)==="sent"?(s(),m(l,{key:0,tone:"success",title:"Check your inbox"},{default:c(()=>[...e[3]||(e[3]=[d("p",null,"If this link came from us, a new one is on its way to the address it was sent to. It works for 24 hours.",-1)])]),_:1})):(s(),m(l,{key:1,title:"This link has expired or isn't valid"},{actions:c(()=>[d("button",{type:"button",class:w(x),disabled:t(a)==="sending",onClick:C},W(t(a)==="sending"?"Sending...":"Email me a new link"),9,A)]),default:c(()=>[e[4]||(e[4]=d("p",null,"Links to manage your subscriptions work for 24 hours. We can email a new one to the address this link was sent to.",-1)),t(a)==="rate-limited"?(s(),i("p",j," Too many requests. Please wait a minute and try again. ")):t(a)==="error"?(s(),i("p",z," We couldn't send a new link just now. Please try again in a moment. ")):k("",!0)]),_:1}))],64)):t(n)==="ready"&&t(y)?(s(),m(u,{key:3,preferences:t(y),save:S,onChanged:e[1]||(e[1]=b=>g({quiet:!0})),onInvalid:e[2]||(e[2]=b=>n.value="invalid")},null,8,["preferences"])):k("",!0)])}}};export{O as default};

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.