TvBox/all/lib/notifications-subscriptions-menu-c9ab807bd021.js

2 lines
24 KiB
JavaScript
Raw Permalink Normal View History

2025-07-03 20:15:22 +08:00
"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([["notifications-subscriptions-menu"],{78924:(e,t,n)=>{n.d(t,{I:()=>a});let a=(0,n(96540).createContext)(null)},52811:(e,t,n)=>{n.d(t,{C:()=>o,i:()=>i});var a=n(96679),s=n(27851),r=n(46493);function o(e,t){(0,s.G7)("arianotify_comprehensive_migration")?i(l(e),{...t,element:t?.element??e}):(0,s.G7)("primer_live_region_element")&&t?.element===void 0?(0,r.Cj)(e,{politeness:t?.assertive?"assertive":"polite"}):i(l(e),t)}function i(e,t){let{assertive:n,element:o}=t??{};(0,s.G7)("arianotify_comprehensive_migration")&&"ariaNotify"in Element.prototype?(o||document.body).ariaNotify(e):(0,s.G7)("primer_live_region_element")&&void 0===o?(0,r.iP)(e,{politeness:n?"assertive":"polite"}):function(e,t,n){let s=n??a.XC?.querySelector(t?"#js-global-screen-reader-notice-assertive":"#js-global-screen-reader-notice");s&&(s.textContent===e?s.textContent=`${e}\u00A0`:s.textContent=e)}(e,n,o)}function l(e){return(e.getAttribute("aria-label")||e.innerText||"").trim()}},53005:(e,t,n)=>{n.d(t,{O:()=>o,S:()=>r});var a=n(96679);let s=a.cg?.document?.head?.querySelector('meta[name="release"]')?.content||"",r="X-GitHub-Client-Version";function o(){return s}},39627:(e,t,n)=>{n.d(t,{D:()=>r,Y:()=>o});var a=n(52811),s=n(96679);function r(e){if(!s.XC)return;let t=s.XC.querySelector("title"),n=s.XC.createElement("title");n.textContent=e,t?t.textContent!==e&&(t.replaceWith(n),(0,a.i)(e)):(s.XC.head.appendChild(n),(0,a.i)(e))}function o(e){return document.body.classList.contains("logged-out")?`${e} \xb7 GitHub`:e}},26559:(e,t,n)=>{n.d(t,{jC:()=>l,kt:()=>o,tV:()=>i});var a=n(53005),s=n(27851),r=n(88191);function o(e){let t={"X-Requested-With":"XMLHttpRequest",...(0,r.wE)(e)};return(0,s.G7)("client_version_header")&&(t={...t,[a.S]:(0,a.O)()}),t}function i(e,t){for(let[n,a]of Object.entries(o(t)))e.set(n,a)}function l(e){return{"X-GitHub-App-Type":e}}},88191:(e,t,n)=>{n.d(t,{$r:()=>o,M1:()=>i,li:()=>s,pS:()=>c,wE:()=>l});var a=n(96679);let s="X-Fetch-Nonce",r=new Set;function o(e){r.add(e)}function i(){return r.values().next().value||""}function l(e){let t={};return void 0!==e&&(t["X-Fetch-Nonce-To-Validate"]=e),void 0===e?t[s]=i():r.has(e)?t[s]=e:t[s]=Array.from(r).join(","),t}function c(){let e=a.XC?.head?.querySelector('meta[name="fetch-nonce"]')?.content||"";e&&o(e)}},13233:(e,t,n)=>{n.d(t,{l:()=>a});let a=()=>void 0},39784:(e,t,n)=>{let a;var s,r=n(52497),o=n(74848),i=n(96540),l=n(10569),c=n(95776),d=n(2724),u=n(38621),h=n(60039);let p=(a="/notifications/subscribe",async e=>{try{let t=await (0,h.DI)(a,{method:"POST",body:e});if(t.ok)return t;return Error("Failed to update")}catch(e){return e}});var m=n(15385);let f={NONE:"none",WATCHING:"watching",IGNORING:"ignoring",CUSTOM:"custom"},b={[f.NONE]:"Participating and @mentions",[f.WATCHING]:"All Activity",[f.IGNORING]:"Ignore",[f.CUSTOM]:"Custom"},g={...b,[f.NONE]:"Participating"},y={[f.NONE]:"Watch",[f.WATCHING]:"Unwatch",[f.IGNORING]:"Stop ignoring",[f.CUSTOM]:"Unwatch"},C=[{name:b[f.NONE],description:"Only receive notifications from this repository when participating or @mentioned.",subscriptionType:f.NONE},{name:b[f.WATCHING],description:"Notified of all notifications on this repository.",subscriptionType:f.WATCHING},{name:b[f.IGNORING],description:"Never be notified.",subscriptionType:f.IGNORING},{name:b[f.CUSTOM],description:"Select events you want to be notified of in addition to participating and @mentions.",trailingIcon:(0,i.createElement)(u.ArrowRightIcon),subscriptionType:f.CUSTOM}],x=e=>e in y?y[e]:"",v=(e,t)=>{let n=x(e),a=g[e];return e===f.IGNORING?`${n} in ${t}`:`${n}: ${a} in ${t}`},N={subscriptionTypeName:"SubscriptionList-module__subscriptionTypeName--mWUOD"};function w(e){return(0,o.jsx)(m.l,{selectionVariant:"single",children:C.map((t,n)=>(0,o.jsxs)(i.Fragment,{children:[(0,o.jsxs)(m.l.Item,{selected:t.subscriptionType===e.selected,onSelect:()=>e.onSelect(t.subscriptionType),children:[(0,o.jsx)("span",{className:N.subscriptionTypeName,children:t.name}),(0,o.jsx)(m.l.Description,{variant:"block",children:t.description})
//# sourceMappingURL=notifications-subscriptions-menu-50f6a9ba8e34.js.map