diff --git a/userScript/en.user.js b/userScript/en.user.js index 3e670bd5..369df3ab 100644 --- a/userScript/en.user.js +++ b/userScript/en.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Shadowban Scanner (English) // @namespace https://github.com/Robot-Inventor/shadowban-scanner/ -// @version 3.1.9 +// @version 3.2.0 // @description A browser extension that detects shadowbans on Twitter. // @author Robot-Inventor (ろぼいん / @keita_roboin) // @match https://*.twitter.com/* @@ -13,28 +13,47 @@ // ==/UserScript== /*! For license information please see en.user.js.LICENSE.txt */ -(()=>{"use strict";var e={8531:function(e,t){var r=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))((function(n,o){function i(e){try{l(s.next(e))}catch(e){o(e)}}function a(e){try{l(s.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}l((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.asyncQuerySelectorAll=t.asyncQuerySelector=void 0;const s=(e,t)=>new Promise((r=>{const s=e();if(s instanceof Element||s instanceof NodeList&&s.length)return void r(s);let n=null;const o=new MutationObserver((()=>{const t=e();(t instanceof Element||t instanceof NodeList&&t.length)&&(o.disconnect(),n&&clearTimeout(n),r(t))}));n=setTimeout((()=>{o.disconnect(),r(null)}),t),o.observe(document.body,{attributes:!0,childList:!0,subtree:!0})}));t.asyncQuerySelector=(e,...t)=>r(void 0,[e,...t],void 0,(function*(e,t=document,r=500){return yield s((()=>t.querySelector(e)),r)})),t.asyncQuerySelectorAll=(e,...t)=>r(void 0,[e,...t],void 0,(function*(e,t=document,r=500){var n;return null!==(n=yield s((()=>t.querySelectorAll(e)),r))&&void 0!==n?n:document.createDocumentFragment().childNodes}))},1016:(e,t,r)=>{r.d(t,{A:()=>a});var s=r(1601),n=r.n(s),o=r(6314),i=r.n(o)()(n());i.push([e.id,".shadowban-scanner-tombstone-necromancer {\n display: inline-block;\n margin: 0 2rem;\n text-decoration: none;\n}\n\n.shadowban-scanner-tombstone-necromancer:hover {\n text-decoration: underline;\n}\n\n[data-sb-translation] {\n display: inline-block;\n min-width: 15em;\n min-height: 1em;\n border-radius: 0.25em;\n background-image: linear-gradient(90deg, transparent 40%, rgba(175, 175, 175, 0.7) 80%, transparent 100%);\n background-size: 200% 100%;\n animation: loading-animation 1.5s linear infinite;\n}\n\n@keyframes loading-animation {\n 0% {\n background-position: 200% 0%;\n opacity: 1;\n }\n 100% {\n background-position: 0% 0%;\n opacity: 1;\n }\n}\n",""]);const a=i},6314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",s=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),s&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),s&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,s,n,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(s)for(var a=0;a0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),r&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=r):d[2]=r),n&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=n):d[4]="".concat(n)),t.push(d))}},t}},1601:e=>{e.exports=function(e){return e[1]}},5535:(e,t,r)=>{r.r(t),r.d(t,{default:()=>y});var s=r(5072),n=r.n(s),o=r(7825),i=r.n(o),a=r(7659),l=r.n(a),c=r(5056),d=r.n(c),h=r(540),p=r.n(h),u=r(1113),m=r.n(u),f=r(1016),b={};b.styleTagTransform=m(),b.setAttributes=d(),b.insert=l().bind(null,"head"),b.domAPI=i(),b.insertStyleElement=p(),n()(f.A,b);const y=f.A&&f.A.locals?f.A.locals:void 0},5072:e=>{var t=[];function r(e){for(var r=-1,s=0;s{var t={};e.exports=function(e,r){var s=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(r)}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056:(e,t,r)=>{e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},7825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var s="";r.supports&&(s+="@supports (".concat(r.supports,") {")),r.media&&(s+="@media ".concat(r.media," {"));var n=void 0!==r.layer;n&&(s+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),s+=r.css,n&&(s+="}"),r.media&&(s+="}"),r.supports&&(s+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(s+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(s,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},41:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.INSTRUCTION_URL=t.RELEASE_NOTE_URL=t.ONBOARDING_PATH=t.ALLOWED_TWEMOJI=t.TWEMOJI_ATTRIBUTE=t.SHADOW_TRANSLATION_ATTRIBUTE=t.TRANSLATION_ATTRIBUTE=t.EVENT_GENERATOR_SETTINGS_ATTRIBUTE=t.EVENT_GENERATOR_ID=t.CHECKED_DATA_ATTRIBUTE=void 0,t.CHECKED_DATA_ATTRIBUTE="data-shadowban-checked",t.EVENT_GENERATOR_ID="shadowban-scanner-event-generator",t.EVENT_GENERATOR_SETTINGS_ATTRIBUTE="data-sb-settings",t.TRANSLATION_ATTRIBUTE="data-sb-translation",t.SHADOW_TRANSLATION_ATTRIBUTE="data-sb-shadow-translation",t.TWEMOJI_ATTRIBUTE="data-sb-enable-twemoji",t.ALLOWED_TWEMOJI=["✅","🚫","⚠️"],t.ONBOARDING_PATH="html/initialSetup.html",t.RELEASE_NOTE_URL={en:"https://roboin.io/article/2024/05/27/shadowban-scanner-reaches-over-10000-users/en/",ja:"https://roboin.io/article/2024/05/27/shadowban-scanner-reaches-over-10000-users/"},t.INSTRUCTION_URL={en:"https://roboin.io/article/2023/09/30/detect-twitter-shadowban/en/#usage",ja:"https://roboin.io/article/2023/09/30/detect-twitter-shadowban/#%E4%BD%BF%E3%81%84%E6%96%B9"}},8140:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_SETTINGS=void 0,t.DEFAULT_SETTINGS={alwaysDetailedView:!1,enableForOtherUsersProfiles:!0,enableForOtherUsersTweets:!0,showMessagesInUnproblematicProfiles:!0,showMessagesInUnproblematicTweets:!1,showNotesInMessages:!0,showTweetButton:!0}},7316:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Translator=void 0;const s=r(41),n=r(1497);t.Translator=class{constructor(e,t){this.translationFunction=e,this.twemojiEndpoint=t}convertEmojiToTwemoji(e){let t=e;for(const e of s.ALLOWED_TWEMOJI){const r=[...e].map((e=>e.codePointAt(0)?.toString(16))).join("-"),s=`${e}`;t=t.replaceAll(e,s)}return t}translateElements(){const e=[...document.querySelectorAll(`[${s.TRANSLATION_ATTRIBUTE}]`)],t=document.querySelectorAll(`sbs-message[${s.SHADOW_TRANSLATION_ATTRIBUTE}]`);for(const r of t){const{shadowRoot:t}=r;if(!t)return;const n=t.querySelectorAll(`[${s.TRANSLATION_ATTRIBUTE}]`);e.push(...n),n.length&&r.removeAttribute(s.SHADOW_TRANSLATION_ATTRIBUTE)}e.forEach((e=>{const t=e.getAttribute(s.TRANSLATION_ATTRIBUTE),r=e.getAttribute("data-sb-translation-substitutions"),o=r?JSON.parse(r):null,i=(0,n.isTranslationSubstitutions)(o)?this.translationFunction(t,o):this.translationFunction(t);e.hasAttribute(s.TWEMOJI_ATTRIBUTE)?e.innerHTML=this.convertEmojiToTwemoji(i):e.innerHTML=i,e.removeAttribute(s.TRANSLATION_ATTRIBUTE)}))}}},380:function(e,t,r){var s,n=this&&this.__decorate||function(e,t,r,s){var n,o=arguments.length,i=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,r):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(i=(o<3?n(i):o>3?n(t,r,i):n(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i};Object.defineProperty(t,"__esModule",{value:!0}),t.SbsMessage=void 0,r(919);const o=r(6337),i=r(2924),a=r(2627);let l=s=class extends o.LitElement{constructor(){super(...arguments),this.summary="tweetNoProblem",this.details=[],this.notes=[],this.isAlert=!1,this.isExpanded=!1,this.isFocalMode=!1,this.isTweetButtonShown=!1,this.isNoteShown=!1,this.textColor="white"}expand(){this.isExpanded=!0}tweetButtonClicked(){const e=new Event("tweetButtonClick",{bubbles:!0,composed:!0});this.dispatchEvent(e)}firstUpdated(e){this.onRenderedCallback&&this.onRenderedCallback(),super.firstUpdated(e)}getShowMoreButton(){return this.isExpanded?"":o.html``}getDetails(){return this.details.length?o.html``:""}getNotes(){if(!this.notes.length)return"";const e=(0,a.classMap)({"shadowban-scanner-collapsed-content":!this.isExpanded,"shadowban-scanner-message-note":!0});return this.notes.map((t=>o.html`
`))}getTweetButton(){const e=(0,a.classMap)({"shadowban-scanner-collapsed-content":!this.isExpanded});return this.isTweetButtonShown?o.html``:""}static cancelClickEvent(e){e.stopPropagation()}render(){const e=(0,a.classMap)({"focal-mode":this.isFocalMode,"shadowban-scanner-message":!0,"shadowban-scanner-message-no-problem":!this.isAlert});return o.html` -
- - ${this.getShowMoreButton()} ${this.getDetails()} ${this.getNotes()} ${this.getTweetButton()} -
- `}};t.SbsMessage=l,l.styles=o.css` +(()=>{"use strict";var e={531:function(e,t){var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,o){function i(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.asyncQuerySelectorAll=t.asyncQuerySelector=void 0;const n=(e,t)=>new Promise((r=>{const n=e();if(n instanceof Element||n instanceof NodeList&&n.length)return void r(n);let s=null;const o=new MutationObserver((()=>{const t=e();(t instanceof Element||t instanceof NodeList&&t.length)&&(o.disconnect(),s&&clearTimeout(s),r(t))}));s=setTimeout((()=>{o.disconnect(),r(null)}),t),o.observe(document.body,{attributes:!0,childList:!0,subtree:!0})}));t.asyncQuerySelector=(e,...t)=>r(void 0,[e,...t],void 0,(function*(e,t=document,r=500){return yield n((()=>t.querySelector(e)),r)})),t.asyncQuerySelectorAll=(e,...t)=>r(void 0,[e,...t],void 0,(function*(e,t=document,r=500){var s;return null!==(s=yield n((()=>t.querySelectorAll(e)),r))&&void 0!==s?s:document.createDocumentFragment().childNodes}))},16:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(601),s=r.n(n),o=r(314),i=r.n(o)()(s());i.push([e.id,".shadowban-scanner-tombstone-necromancer {\n display: inline-block;\n margin: 0 2rem;\n text-decoration: none;\n}\n\n.shadowban-scanner-tombstone-necromancer:hover {\n text-decoration: underline;\n}\n\n[data-sb-translation] {\n display: inline-block;\n min-width: 15em;\n min-height: 1em;\n border-radius: 0.25em;\n background-image: linear-gradient(90deg, transparent 40%, rgba(175, 175, 175, 0.7) 80%, transparent 100%);\n background-size: 200% 100%;\n animation: loading-animation 1.5s linear infinite;\n}\n\n@keyframes loading-animation {\n 0% {\n background-position: 200% 0%;\n opacity: 1;\n }\n 100% {\n background-position: 0% 0%;\n opacity: 1;\n }\n}\n",""]);const a=i},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,s,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(n)for(var a=0;a0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),r&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=r):d[2]=r),s&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=s):d[4]="".concat(s)),t.push(d))}},t}},601:e=>{e.exports=function(e){return e[1]}},72:e=>{var t=[];function r(e){for(var r=-1,n=0;n{var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},56:(e,t,r)=>{e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var s=void 0!==r.layer;s&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,s&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={id:n,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.nc=void 0;var n=r(72),s=r.n(n),o=r(825),i=r.n(o),a=r(659),l=r.n(a),c=r(56),d=r.n(c),h=r(540),p=r.n(h),u=r(113),f=r.n(u),m=r(16),b={};b.styleTagTransform=f(),b.setAttributes=d(),b.insert=l().bind(null,"head"),b.domAPI=i(),b.insertStyleElement=p(),s()(m.A,b),m.A&&m.A.locals&&m.A.locals;const g="data-shadowban-checked",y="data-sb-translation",v="data-sb-shadow-translation",w=["✅","🚫","⚠️"],_=e=>{const t=Object.getOwnPropertyNames(e).filter((e=>e.startsWith("__reactProps$")));return t.length?e[t[0]]:null};class A{profileElement;constructor(e){this.profileElement=e}get props(){const e=_(this.profileElement);if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[0]&&"object"==typeof t.children[0]||"function"==typeof t.children[0])&&(null!==t.children[0].props&&"object"==typeof t.children[0].props||"function"==typeof t.children[0].props)&&Array.isArray(t.children[0].props.children)&&(null!==t.children[0].props.children[1]&&"object"==typeof t.children[0].props.children[1]||"function"==typeof t.children[0].props.children[1])&&(null!==t.children[0].props.children[1].props&&"object"==typeof t.children[0].props.children[1].props||"function"==typeof t.children[0].props.children[1].props)&&(null!==t.children[0].props.children[1].props.user&&"object"==typeof t.children[0].props.children[1].props.user||"function"==typeof t.children[0].props.children[1].props.user)&&(void 0===t.children[0].props.children[1].props.user.possibly_sensitive||null===t.children[0].props.children[1].props.user.possibly_sensitive||!1===t.children[0].props.children[1].props.user.possibly_sensitive||!0===t.children[0].props.children[1].props.user.possibly_sensitive)&&"string"==typeof t.children[0].props.children[1].props.user.screen_name&&(""===t.children[0].props.children[1].props.user.profile_interstitial_type||"sensitive_media"===t.children[0].props.children[1].props.user.profile_interstitial_type||"fake_account"===t.children[0].props.children[1].props.user.profile_interstitial_type||"offensive_profile_content"===t.children[0].props.children[1].props.user.profile_interstitial_type||"timeout"===t.children[0].props.children[1].props.user.profile_interstitial_type)&&Array.isArray(t.children[0].props.children[1].props.user.withheld_in_countries)&&t.children[0].props.children[1].props.user.withheld_in_countries.every((e=>"string"==typeof e))}(e))throw new Error("Failed to get React props of profile");return e.children[0].props.children[1].props.user}}var S=r(531);class C{tweetElement;constructor(e){this.tweetElement=e}getMenuBar(){const e=this.tweetElement.querySelector("div[role='group'][id]");if(!e)throw new Error("Failed to get menu bar of tweet");return e}get element(){return this.tweetElement}get props(){const e=_(this.getMenuBar());if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[1]&&"object"==typeof t.children[1]||"function"==typeof t.children[1])&&(null!==t.children[1].props&&"object"==typeof t.children[1].props||"function"==typeof t.children[1].props)&&(null!==t.children[1].props.retweetWithCommentLink&&"object"==typeof t.children[1].props.retweetWithCommentLink||"function"==typeof t.children[1].props.retweetWithCommentLink)&&(null!==t.children[1].props.retweetWithCommentLink.state&&"object"==typeof t.children[1].props.retweetWithCommentLink.state||"function"==typeof t.children[1].props.retweetWithCommentLink.state)&&(null!==t.children[1].props.retweetWithCommentLink.state.quotedStatus&&"object"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus||"function"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable)&&"string"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.permalink&&(null!==t.children[1].props.retweetWithCommentLink.state.quotedStatus.user&&"object"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user||"function"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive)&&"string"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.screen_name&&(""===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"sensitive_media"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"fake_account"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"offensive_profile_content"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"timeout"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type)&&Array.isArray(t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.withheld_in_countries)&&t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.withheld_in_countries.every((e=>"string"==typeof e))}(e))throw new Error("Failed to get React props of tweet");return e.children[1].props.retweetWithCommentLink.state.quotedStatus}get metadata(){const e=this.props.user.screen_name,t=_(this.element);if(!t)throw new Error("Failed to get React props of tweet");let r=null;const n=function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&Array.isArray(t.children[0])&&(null!==t.children[0][1]&&"object"==typeof t.children[0][1]||"function"==typeof t.children[0][1])&&(null!==t.children[0][1].props&&"object"==typeof t.children[0][1].props||"function"==typeof t.children[0][1].props)&&Array.isArray(t.children[0][1].props.children)&&(null!==t.children[0][1].props.children[0]&&"object"==typeof t.children[0][1].props.children[0]||"function"==typeof t.children[0][1].props.children[0])&&(null!==t.children[0][1].props.children[0].props&&"object"==typeof t.children[0][1].props.children[0].props||"function"==typeof t.children[0][1].props.children[0].props)&&Array.isArray(t.children[0][1].props.children[0].props.children)&&(null!==t.children[0][1].props.children[0].props.children[2]&&"object"==typeof t.children[0][1].props.children[0].props.children[2]||"function"==typeof t.children[0][1].props.children[0].props.children[2])&&(null!==t.children[0][1].props.children[0].props.children[2].props&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props||"function"==typeof t.children[0][1].props.children[0].props.children[2].props)&&Array.isArray(t.children[0][1].props.children[0].props.children[2].props.children)&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7]&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7]||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7])&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7].props&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props)&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser)&&"string"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser.screen_name}(t);return function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&Array.isArray(t.children[0])&&(null!==t.children[0][1]&&"object"==typeof t.children[0][1]||"function"==typeof t.children[0][1])&&(null!==t.children[0][1].props&&"object"==typeof t.children[0][1].props||"function"==typeof t.children[0][1].props)&&Array.isArray(t.children[0][1].props.children)&&(null!==t.children[0][1].props.children[0]&&"object"==typeof t.children[0][1].props.children[0]||"function"==typeof t.children[0][1].props.children[0])&&(null!==t.children[0][1].props.children[0].props&&"object"==typeof t.children[0][1].props.children[0].props||"function"==typeof t.children[0][1].props.children[0].props)&&Array.isArray(t.children[0][1].props.children[0].props.children)&&(null!==t.children[0][1].props.children[0].props.children[1]&&"object"==typeof t.children[0][1].props.children[0].props.children[1]||"function"==typeof t.children[0][1].props.children[0].props.children[1])&&(null!==t.children[0][1].props.children[0].props.children[1].props&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props||"function"==typeof t.children[0][1].props.children[0].props.children[1].props)&&Array.isArray(t.children[0][1].props.children[0].props.children[1].props.children)&&Array.isArray(t.children[0][1].props.children[0].props.children[1].props.children[1])&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2]&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2]||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2])&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2].props&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props)&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser)&&"string"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser.screen_name}(t)&&(r=t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser.screen_name),n&&(r=t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser.screen_name),{isFocalMode:n,isPostedByCurrentUser:e===r}}async clickRetweetButton(e){const t=await(0,S.asyncQuerySelector)("[data-testid='unretweet'], [data-testid='retweet']",this.tweetElement,e);if(!t)throw new Error("Failed to get retweet button of tweet");t.click()}static async clickQuoteButton(e){const t=await(0,S.asyncQuerySelector)(["[data-testid='Dropdown'] [href='/compose/post']","[data-testid='sheetDialog'] [href='/compose/post']"].join(","),document,e);if(!t)throw new Error("Failed to get quote button of tweet");t.click()}static async getTweetTextBox(e){const t="pro.twitter.com"===location.hostname?"[role='dialog'] [data-text='true'], [role='dialog'] textarea[data-testid='tweetTextarea_0']":"[role='dialog'] [data-text='true'], textarea[data-testid='tweetTextarea_0']",r=await(0,S.asyncQuerySelector)(t,document,e);if(!r)throw new Error("Failed to get text box marker of tweet");const n="TEXTAREA"===r.tagName?r:r.parentElement;if(!n)throw new Error("Failed to get text box of tweet");return n}async quoteTweet(e,t=1e3){try{await this.clickRetweetButton(t),await C.clickQuoteButton(t);const r=await C.getTweetTextBox(t);r.innerHTML=e,r.dispatchEvent(new Event("input",{bubbles:!0}))}catch(t){const r=this.props.permalink;open(`https://twitter.com/intent/tweet?text=${encodeURIComponent(`${e}\nhttps://twitter.com${r}`)}`,"_blank")}}}const x={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var $,E=new Uint8Array(16);function k(){if(!$&&!($="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $(E)}for(var T=[],P=0;P<256;++P)T.push((P+256).toString(16).slice(1));const I=function(e,t,r){if(x.randomUUID&&!t&&!e)return x.randomUUID();var n=(e=e||{}).random||(e.rng||k)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var s=0;s<16;++s)t[r+s]=n[s];return t}return function(e,t=0){return(T[e[t+0]]+T[e[t+1]]+T[e[t+2]]+T[e[t+3]]+"-"+T[e[t+4]]+T[e[t+5]]+"-"+T[e[t+6]]+T[e[t+7]]+"-"+T[e[t+8]]+T[e[t+9]]+"-"+T[e[t+10]]+T[e[t+11]]+T[e[t+12]]+T[e[t+13]]+T[e[t+14]]+T[e[t+15]]).toLowerCase()}(n)};class N{OBSERVER_OPTIONS={childList:!0,subtree:!0};onNewTweetCallback=null;onNewProfileCallback=null;constructor(e){const t=`data-twi-ext-checked-${I()}`,r={timeoutMs:1e4,...e},n=new MutationObserver((()=>{if(this.onNewTweetCallback){const e=document.querySelectorAll(`[data-testid="tweet"]:not([${t}])`);for(const r of e)r.setAttribute(t,""),this.onNewTweetCallback(new C(r))}if(this.onNewProfileCallback){const e=document.querySelector(`:not([data-testid="tweet"]) [data-testid="UserName"]:not([${t}])`);e&&(e.setAttribute(t,""),this.onNewProfileCallback(new A(e)))}}));(0,S.asyncQuerySelector)("main",document,r.timeoutMs).then((e=>{if(!e)throw new Error("twi-ext: Failed to get main element");n.observe(e,this.OBSERVER_OPTIONS)})),(0,S.asyncQuerySelector)("#layers",document,r.timeoutMs).then((e=>{if(!e)throw new Error("twi-ext: Failed to get #layers element");n.observe(e,this.OBSERVER_OPTIONS)}))}onNewTweet(e){this.onNewTweetCallback=e}onNewProfile(e){this.onNewProfileCallback=e}}const O=e=>{const t=Boolean(e.possibly_sensitive),r=Boolean(["sensitive_media","offensive_profile_content"].includes(e.profile_interstitial_type)),n=e.withheld_in_countries,s=t||r;return{user:{hasAnyProblem:s||n.length>0,sensitiveMediaInProfile:r,shadowbanned:s,withheldInCountries:n}}},R=e=>{const t=navigator.language,r=new Intl.ListFormat(t,{style:"narrow",type:"conjunction"}),n=new Intl.DisplayNames([t],{type:"region"}),s=e.map((e=>n.of(e)||""));return r.format(s)},U=(e,t,r,n)=>{const s=(e=>{const t=(e=>e.user.shadowbanned||e.user.sensitiveMediaInProfile||Boolean(e.user.withheldInCountries.length)||e.tweet.possiblySensitive?e.user.withheldInCountries.length?"accountIsBlockedInSomeCountries":e.user.shadowbanned||e.user.sensitiveMediaInProfile?e.tweet.possiblySensitive?e.tweet.ageRestriction?"accountAndTweetShadowbanned":"accountShadowbannedAndTweetFlaggedAsSensitive":"accountShadowbanned":e.tweet.ageRestriction?"tweetShadowbanned":"tweetFlaggedAsSensitive":"tweetNoProblem")(e),r=(e=>[e.user.shadowbanned?"accountIsShadowbannedOrFlaggedAsSensitive":"accountIsNotFlaggedAsSensitive",e.user.sensitiveMediaInProfile?"profileContainsSensitiveMedia":"profileDoesNotContainSensitiveMedia",e.user.withheldInCountries.length?{messageName:"accountIsWithheldInCountries",substitutions:R(e.user.withheldInCountries)}:"accountIsNotWithheldInCountries"])(e),n=(e=>[e.tweet.possiblySensitive?"tweetIsFlaggedAsSensitive":"tweetIsNotFlaggedAsSensitive",e.tweet.ageRestriction?"tweetIsAgeRestricted":"tweetIsNotAgeRestricted",{possiblyUnsearchable:"tweetMayNotBeSearchable",searchable:"tweetIsSearchable",unsearchable:"tweetIsNotSearchable"}[e.tweet.searchability]])(e);return{details:[...r,...n],summary:t}})(t),o=(e=>{const t="searchable"===e.tweet.searchability;return`\n${e.user.shadowbanned?"🚫Account flagged as sensitive or shadowbanned":"✅Account not flagged as sensitive"}\n${e.user.sensitiveMediaInProfile?"🚫Sensitive flag on profile media":"✅No sensitive flag on profile media"}\n${e.user.withheldInCountries.length?"🚫Account blocked in some countries":"✅Account not blocked in any countries"}\n${e.tweet.possiblySensitive?"🚫Sensitive flag on tweet":"✅No sensitive flag on tweet"}\n${e.tweet.ageRestriction?"🚫Age limit on tweet":"✅No age limit on tweet"}\n${t?"✅Tweet searchable":"🚫Tweet may not be searchable"}\n\nShadowban Scanner by ろぼいん\n${navigator.language.toLowerCase().startsWith("ja")?"https://shadowban-scanner.roboin.io/ja/":"https://shadowban-scanner.roboin.io/en/"}\n `.trim()})(t);return{...s,isAlert:t.tweet.hasAnyProblem,isExpanded:n.alwaysDetailedView,isNoteShown:n.showNotesInMessages,isTweetButtonShown:n.showTweetButton,notes:["falsePositivesAndFalseNegativesOccur","translatedByAI"],onRenderedCallback:r,tweet:e,tweetText:o,type:"tweet"}};function M(e,t,r,n){var s,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;const j=e=>(t,r)=>{void 0!==r?r.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)},L=globalThis,B=L.ShadowRoot&&(void 0===L.ShadyCSS||L.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,F=Symbol(),q=new WeakMap;class D{constructor(e,t,r){if(this._$cssResult$=!0,r!==F)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(B&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=q.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&q.set(t,e))}return e}toString(){return this.cssText}}const W=(e,...t)=>{const r=1===e.length?e[0]:t.reduce(((t,r,n)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[n+1]),e[0]);return new D(r,e,F)},z=B?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return(e=>new D("string"==typeof e?e:e+"",void 0,F))(t)})(e):e,{is:H,defineProperty:V,getOwnPropertyDescriptor:G,getOwnPropertyNames:Q,getOwnPropertySymbols:K,getPrototypeOf:Y}=Object,J=globalThis,X=J.trustedTypes,Z=X?X.emptyScript:"",ee=J.reactiveElementPolyfillSupport,te=(e,t)=>e,re={toAttribute(e,t){switch(t){case Boolean:e=e?Z:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},ne=(e,t)=>!H(e,t),se={attribute:!0,type:String,converter:re,reflect:!1,hasChanged:ne};Symbol.metadata??=Symbol("metadata"),J.litPropertyMetadata??=new WeakMap;class oe extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=se){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(e,r,t);void 0!==n&&V(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){const{get:n,set:s}=G(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return n?.call(this)},set(t){const o=n?.call(this);s.call(this,t),this.requestUpdate(e,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??se}static _$Ei(){if(this.hasOwnProperty(te("elementProperties")))return;const e=Y(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(te("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(te("properties"))){const e=this.properties,t=[...Q(e),...K(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(z(e))}else void 0!==e&&t.push(z(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(B)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const r of t){const t=document.createElement("style"),n=L.litNonce;void 0!==n&&t.setAttribute("nonce",n),t.textContent=r.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EC(e,t){const r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(void 0!==n&&!0===r.reflect){const s=(void 0!==r.converter?.toAttribute?r.converter:re).toAttribute(t,r.type);this._$Em=e,null==s?this.removeAttribute(n):this.setAttribute(n,s),this._$Em=null}}_$AK(e,t){const r=this.constructor,n=r._$Eh.get(e);if(void 0!==n&&this._$Em!==n){const e=r.getPropertyOptions(n),s="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:re;this._$Em=n,this[n]=s.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){if(r??=this.constructor.getPropertyOptions(e),!(r.hasChanged??ne)(this[e],t))return;this.P(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,r){this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e)!0!==r.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],r)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}}oe.elementStyles=[],oe.shadowRootOptions={mode:"open"},oe[te("elementProperties")]=new Map,oe[te("finalized")]=new Map,ee?.({ReactiveElement:oe}),(J.reactiveElementVersions??=[]).push("2.0.4");const ie={attribute:!0,type:String,converter:re,reflect:!1,hasChanged:ne},ae=(e=ie,t,r)=>{const{kind:n,metadata:s}=r;let o=globalThis.litPropertyMetadata.get(s);if(void 0===o&&globalThis.litPropertyMetadata.set(s,o=new Map),o.set(r.name,e),"accessor"===n){const{name:n}=r;return{set(r){const s=t.get.call(this);t.set.call(this,r),this.requestUpdate(n,s,e)},init(t){return void 0!==t&&this.P(n,void 0,e),t}}}if("setter"===n){const{name:n}=r;return function(r){const s=this[n];t.call(this,r),this.requestUpdate(n,s,e)}}throw Error("Unsupported decorator location: "+n)};function le(e){return(t,r)=>"object"==typeof r?ae(e,t,r):((e,t,r)=>{const n=t.hasOwnProperty(r);return t.constructor.createProperty(r,n?{...e,wrapped:!0}:e),n?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}function ce(e){return le({...e,state:!0,attribute:!1})}const de=(e,t,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,r),r);function he(e,t){return(r,n,s)=>{const o=t=>t.renderRoot?.querySelector(e)??null;if(t){const{get:e,set:t}="object"==typeof n?r:s??(()=>{const e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return de(r,n,{get(){let r=e.call(this);return void 0===r&&(r=o(this),(null!==r||this.hasUpdated)&&t.call(this,r)),r}})}return de(r,n,{get(){return o(this)}})}}const pe=globalThis,ue=pe.trustedTypes,fe=ue?ue.createPolicy("lit-html",{createHTML:e=>e}):void 0,me="$lit$",be=`lit$${Math.random().toFixed(9).slice(2)}$`,ge="?"+be,ye=`<${ge}>`,ve=document,we=()=>ve.createComment(""),_e=e=>null===e||"object"!=typeof e&&"function"!=typeof e,Ae=Array.isArray,Se="[ \t\n\f\r]",Ce=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,xe=/-->/g,$e=/>/g,Ee=RegExp(`>|${Se}(?:([^\\s"'>=/]+)(${Se}*=${Se}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ke=/'/g,Te=/"/g,Pe=/^(?:script|style|textarea|title)$/i,Ie=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),Ne=Ie(1),Oe=(Ie(2),Ie(3),Symbol.for("lit-noChange")),Re=Symbol.for("lit-nothing"),Ue=new WeakMap,Me=ve.createTreeWalker(ve,129);function je(e,t){if(!Ae(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==fe?fe.createHTML(t):t}class Le{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let s=0,o=0;const i=e.length-1,a=this.parts,[l,c]=((e,t)=>{const r=e.length-1,n=[];let s,o=2===t?"":3===t?"":"",i=Ce;for(let t=0;t"===l[0]?(i=s??Ce,c=-1):void 0===l[1]?c=-2:(c=i.lastIndex-l[2].length,a=l[1],i=void 0===l[3]?Ee:'"'===l[3]?Te:ke):i===Te||i===ke?i=Ee:i===xe||i===$e?i=Ce:(i=Ee,s=void 0);const h=i===Ee&&e[t+1].startsWith("/>")?" ":"";o+=i===Ce?r+ye:c>=0?(n.push(a),r.slice(0,c)+me+r.slice(c)+be+h):r+be+(-2===c?t:h)}return[je(e,o+(e[r]||"")+(2===t?"":3===t?"":"")),n]})(e,t);if(this.el=Le.createElement(l,r),Me.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=Me.nextNode())&&a.length0){n.textContent=ue?ue.emptyScript:"";for(let r=0;rAe(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Re&&_e(this._$AH)?this._$AA.nextSibling.data=e:this.T(ve.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:r}=e,n="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=Le.createElement(je(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{const e=new Fe(n,this),r=e.u(this.options);e.p(t),this.T(r),this._$AH=e}}_$AC(e){let t=Ue.get(e.strings);return void 0===t&&Ue.set(e.strings,t=new Le(e)),t}k(e){Ae(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,n=0;for(const s of e)n===t.length?t.push(r=new qe(this.O(we()),this.O(we()),this,this.options)):r=t[n],r._$AI(s),n++;n2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=Re}_$AI(e,t=this,r,n){const s=this.strings;let o=!1;if(void 0===s)e=Be(this,e,t,0),o=!_e(e)||e!==this._$AH&&e!==Oe,o&&(this._$AH=e);else{const n=e;let i,a;for(e=s[0],i=0;i{const n=r?.renderBefore??t;let s=n._$litPart$;if(void 0===s){const e=r?.renderBefore??null;n._$litPart$=s=new qe(t.insertBefore(we(),e),e,void 0,r??{})}return s._$AI(e),s})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return Oe}}Qe._$litElement$=!0,Qe.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:Qe});const Ke=globalThis.litElementPolyfillSupport;Ke?.({LitElement:Qe}),(globalThis.litElementVersions??=[]).push("4.1.0");class Ye extends Qe{connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){return Ne``}}const Je=W`:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute;transition-duration:inherit;transition-property:inherit;transition-timing-function:inherit}:host{display:flex;pointer-events:none;transition-property:box-shadow,opacity}.shadow::before,.shadow::after{content:"";transition-property:box-shadow,opacity;--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000))}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color);opacity:.15} +`;let Xe=class extends Ye{};Xe.styles=[Je],Xe=M([j("md-elevation")],Xe);const Ze=Symbol("attachableController");let et;et=new MutationObserver((e=>{for(const t of e)t.target[Ze]?.hostConnected()}));class tt{get htmlFor(){return this.host.getAttribute("for")}set htmlFor(e){null===e?this.host.removeAttribute("for"):this.host.setAttribute("for",e)}get control(){return this.host.hasAttribute("for")?this.htmlFor&&this.host.isConnected?this.host.getRootNode().querySelector(`#${this.htmlFor}`):null:this.currentControl||this.host.parentElement}set control(e){e?this.attach(e):this.detach()}constructor(e,t){this.host=e,this.onControlChange=t,this.currentControl=null,e.addController(this),e[Ze]=this,et?.observe(e,{attributeFilter:["for"]})}attach(e){e!==this.currentControl&&(this.setCurrentControl(e),this.host.removeAttribute("for"))}detach(){this.setCurrentControl(null),this.host.setAttribute("for","")}hostConnected(){this.setCurrentControl(this.control)}hostDisconnected(){this.setCurrentControl(null)}setCurrentControl(e){this.onControlChange(this.currentControl,e),this.currentControl=e}}const rt=["focusin","focusout","pointerdown"];class nt extends Qe{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new tt(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}handleEvent(e){if(!e[st]){switch(e.type){default:return;case"focusin":this.visible=this.control?.matches(":focus-visible")??!1;break;case"focusout":case"pointerdown":this.visible=!1}e[st]=!0}}onControlChange(e,t){for(const r of rt)e?.removeEventListener(r,this),t?.addEventListener(r,this)}update(e){e.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(e)}}M([le({type:Boolean,reflect:!0})],nt.prototype,"visible",void 0),M([le({type:Boolean,reflect:!0})],nt.prototype,"inward",void 0);const st=Symbol("handledByFocusRing"),ot=W`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}} +`;let it=class extends nt{};it.styles=[ot],it=M([j("md-focus-ring")],it);class at{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this.t=e,this._$AM=t,this.i=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const lt=(e=>(...t)=>({_$litDirective$:e,values:t}))(class extends at{constructor(e){if(super(e),1!==e.type||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}const r=e.element.classList;for(const e of this.st)e in t||(r.remove(e),this.st.delete(e));for(const e in t){const n=!!t[e];n===this.st.has(e)||this.nt?.has(e)||(n?(r.add(e),this.st.add(e)):(r.remove(e),this.st.delete(e)))}return Oe}});var ct;!function(e){e[e.INACTIVE=0]="INACTIVE",e[e.TOUCH_DELAY=1]="TOUCH_DELAY",e[e.HOLDING=2]="HOLDING",e[e.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"}(ct||(ct={}));const dt=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],ht=window.matchMedia("(forced-colors: active)");class pt extends Qe{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=ct.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new tt(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const e={hovered:this.hovered,pressed:this.pressed};return Ne`
`}update(e){e.has("disabled")&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(e)}handlePointerenter(e){this.shouldReactToEvent(e)&&(this.hovered=!0)}handlePointerleave(e){this.shouldReactToEvent(e)&&(this.hovered=!1,this.state!==ct.INACTIVE&&this.endPressAnimation())}handlePointerup(e){if(this.shouldReactToEvent(e)){if(this.state!==ct.HOLDING)return this.state===ct.TOUCH_DELAY?(this.state=ct.WAITING_FOR_CLICK,void this.startPressAnimation(this.rippleStartEvent)):void 0;this.state=ct.WAITING_FOR_CLICK}}async handlePointerdown(e){if(this.shouldReactToEvent(e)){if(this.rippleStartEvent=e,!this.isTouch(e))return this.state=ct.WAITING_FOR_CLICK,void this.startPressAnimation(e);this.checkBoundsAfterContextMenu&&!this.inBounds(e)||(this.checkBoundsAfterContextMenu=!1,this.state=ct.TOUCH_DELAY,await new Promise((e=>{setTimeout(e,150)})),this.state===ct.TOUCH_DELAY&&(this.state=ct.HOLDING,this.startPressAnimation(e)))}}handleClick(){this.disabled||(this.state!==ct.WAITING_FOR_CLICK?this.state===ct.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation()):this.endPressAnimation())}handlePointercancel(e){this.shouldReactToEvent(e)&&this.endPressAnimation()}handleContextmenu(){this.disabled||(this.checkBoundsAfterContextMenu=!0,this.endPressAnimation())}determineRippleSize(){const{height:e,width:t}=this.getBoundingClientRect(),r=Math.max(e,t),n=Math.max(.35*r,75),s=Math.floor(.2*r),o=Math.sqrt(t**2+e**2)+10;this.initialSize=s,this.rippleScale=""+(o+n)/s,this.rippleSize=`${s}px`}getNormalizedPointerEventCoords(e){const{scrollX:t,scrollY:r}=window,{left:n,top:s}=this.getBoundingClientRect(),o=t+n,i=r+s,{pageX:a,pageY:l}=e;return{x:a-o,y:l-i}}getTranslationCoordinates(e){const{height:t,width:r}=this.getBoundingClientRect(),n={x:(r-this.initialSize)/2,y:(t-this.initialSize)/2};let s;return s=e instanceof PointerEvent?this.getNormalizedPointerEventCoords(e):{x:r/2,y:t/2},s={x:s.x-this.initialSize/2,y:s.y-this.initialSize/2},{startPoint:s,endPoint:n}}startPressAnimation(e){if(!this.mdRoot)return;this.pressed=!0,this.growAnimation?.cancel(),this.determineRippleSize();const{startPoint:t,endPoint:r}=this.getTranslationCoordinates(e),n=`${t.x}px, ${t.y}px`,s=`${r.x}px, ${r.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${n}) scale(1)`,`translate(${s}) scale(${this.rippleScale})`]},{pseudoElement:"::after",duration:450,easing:"cubic-bezier(0.2, 0, 0, 1)",fill:"forwards"})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=ct.INACTIVE;const e=this.growAnimation;let t=1/0;"number"==typeof e?.currentTime?t=e.currentTime:e?.currentTime&&(t=e.currentTime.to("ms").value),t>=225?this.pressed=!1:(await new Promise((e=>{setTimeout(e,225-t)})),this.growAnimation===e&&(this.pressed=!1))}shouldReactToEvent(e){if(this.disabled||!e.isPrimary)return!1;if(this.rippleStartEvent&&this.rippleStartEvent.pointerId!==e.pointerId)return!1;if("pointerenter"===e.type||"pointerleave"===e.type)return!this.isTouch(e);const t=1===e.buttons;return this.isTouch(e)||t}inBounds({x:e,y:t}){const{top:r,left:n,bottom:s,right:o}=this.getBoundingClientRect();return e>=n&&e<=o&&t>=r&&t<=s}isTouch({pointerType:e}){return"touch"===e}async handleEvent(e){if(!ht?.matches)switch(e.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(e);break;case"pointerdown":await this.handlePointerdown(e);break;case"pointerenter":this.handlePointerenter(e);break;case"pointerleave":this.handlePointerleave(e);break;case"pointerup":this.handlePointerup(e)}}onControlChange(e,t){for(const r of dt)e?.removeEventListener(r,this),t?.addEventListener(r,this)}}M([le({type:Boolean,reflect:!0})],pt.prototype,"disabled",void 0),M([ce()],pt.prototype,"hovered",void 0),M([ce()],pt.prototype,"pressed",void 0),M([he(".surface")],pt.prototype,"mdRoot",void 0);const ut=W`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms} +`;let ft=class extends pt{};ft.styles=[ut],ft=M([j("md-ripple")],ft);const mt=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText"],bt=mt.map(yt);function gt(e){return bt.includes(e)}function yt(e){return e.replace("aria","aria-").replace(/Elements?/g,"").toLowerCase()}const vt=Symbol("privateIgnoreAttributeChangesFor");function wt(e){return`data-${e}`}function _t(e){return e.replace(/-\w/,(e=>e[1].toUpperCase()))}const At=Symbol("internals"),St=Symbol("privateInternals");let Ct=!1;const xt=function(e){var t;class r extends e{constructor(){super(...arguments),this[t]=new Set}attributeChangedCallback(e,t,r){if(!gt(e))return void super.attributeChangedCallback(e,t,r);if(this[vt].has(e))return;this[vt].add(e),this.removeAttribute(e),this[vt].delete(e);const n=_t(e);null===r?delete this.dataset[n]:this.dataset[n]=r,this.requestUpdate(_t(e),t)}getAttribute(e){return gt(e)?super.getAttribute(wt(e)):super.getAttribute(e)}removeAttribute(e){super.removeAttribute(e),gt(e)&&(super.removeAttribute(wt(e)),this.requestUpdate())}}return t=vt,function(e){for(const t of mt){const r=yt(t),n=wt(r),s=_t(r);e.createProperty(t,{attribute:r,noAccessor:!0}),e.createProperty(Symbol(n),{attribute:n,noAccessor:!0}),Object.defineProperty(e.prototype,t,{configurable:!0,enumerable:!0,get(){return this.dataset[s]??null},set(e){const r=this.dataset[s]??null;e!==r&&(null===e?delete this.dataset[s]:this.dataset[s]=e,this.requestUpdate(t,r))}})}}(r),r}(($t=Qe,class extends $t{get[At](){return this[St]||(this[St]=this.attachInternals()),this[St]}}));var $t;class Et extends xt{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[At].form}constructor(){super(),this.disabled=!1,this.softDisabled=!1,this.href="",this.target="",this.trailingIcon=!1,this.hasIcon=!1,this.type="submit",this.value="",this.addEventListener("click",this.handleClick.bind(this))}focus(){this.buttonElement?.focus()}blur(){this.buttonElement?.blur()}render(){const e=!this.href&&(this.disabled||this.softDisabled),t=this.href?this.renderLink():this.renderButton(),r=this.href?"link":"button";return Ne` + ${this.renderElevationOrOutline?.()} +
+ + + ${t} + `}renderButton(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return Ne``}renderLink(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return Ne`${this.renderContent()} + `}renderContent(){const e=Ne``;return Ne` + + ${this.trailingIcon?Re:e} + + ${this.trailingIcon?e:Re} + `}handleClick(e){if(!this.href&&this.softDisabled)return e.stopImmediatePropagation(),void e.preventDefault();(function(e){return e.currentTarget===e.target&&e.composedPath()[0]===e.target&&!e.target.disabled&&!function(e){const t=Ct;return t&&(e.preventDefault(),e.stopImmediatePropagation()),async function(){Ct=!0,await null,Ct=!1}(),t}(e)})(e)&&this.buttonElement&&(this.focus(),function(e){const t=new MouseEvent("click",{bubbles:!0});e.dispatchEvent(t)}(this.buttonElement))}handleSlotChange(){this.hasIcon=this.assignedIcons.length>0}}Et.addInitializer((e=>{const t=e;t.addEventListener("click",(async e=>{const{type:r,[At]:n}=t,{form:s}=n;s&&"button"!==r&&(await new Promise((e=>{setTimeout(e)})),e.defaultPrevented||("reset"!==r?(s.addEventListener("submit",(e=>{Object.defineProperty(e,"submitter",{configurable:!0,enumerable:!0,get:()=>t})}),{capture:!0,once:!0}),n.setFormValue(t.value),s.requestSubmit()):s.reset()))}))})),Et.formAssociated=!0,Et.shadowRootOptions={mode:"open",delegatesFocus:!0},M([le({type:Boolean,reflect:!0})],Et.prototype,"disabled",void 0),M([le({type:Boolean,attribute:"soft-disabled",reflect:!0})],Et.prototype,"softDisabled",void 0),M([le()],Et.prototype,"href",void 0),M([le()],Et.prototype,"target",void 0),M([le({type:Boolean,attribute:"trailing-icon",reflect:!0})],Et.prototype,"trailingIcon",void 0),M([le({type:Boolean,attribute:"has-icon",reflect:!0})],Et.prototype,"hasIcon",void 0),M([le()],Et.prototype,"type",void 0),M([le({reflect:!0})],Et.prototype,"value",void 0),M([he(".button")],Et.prototype,"buttonElement",void 0),M([function(e){return(t,r)=>{const{slot:n,selector:s}=e??{},o="slot"+(n?`[name=${n}]`:":not([name])");return de(t,r,{get(){const t=this.renderRoot?.querySelector(o),r=t?.assignedElements(e)??[];return void 0===s?r:r.filter((e=>e.matches(s)))}})}}({slot:"icon",flatten:!0})],Et.prototype,"assignedIcons",void 0);class kt extends Et{renderElevationOrOutline(){return Ne``}}const Tt=W`:host{--_container-color: var(--md-filled-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-elevation: var(--md-filled-button-container-elevation, 0);--_container-height: var(--md-filled-button-container-height, 40px);--_container-shadow-color: var(--md-filled-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-button-focus-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-container-elevation: var(--md-filled-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-button-hover-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-button-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-filled-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-button-pressed-label-text-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-color: var(--md-filled-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_container-shape-start-start: var(--md-filled-button-container-shape-start-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-button-container-shape-start-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-button-container-shape-end-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-button-container-shape-end-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-button-leading-space, 24px);--_trailing-space: var(--md-filled-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-button-with-trailing-icon-trailing-space, 16px)} +`,Pt=W`md-elevation{transition-duration:280ms}:host(:is([disabled],[soft-disabled])) md-elevation{transition:none}md-elevation{--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}:host(:focus-within) md-elevation{--md-elevation-level: var(--_focus-container-elevation)}:host(:hover) md-elevation{--md-elevation-level: var(--_hover-container-elevation)}:host(:active) md-elevation{--md-elevation-level: var(--_pressed-container-elevation)}:host(:is([disabled],[soft-disabled])) md-elevation{--md-elevation-level: var(--_disabled-container-elevation)} +`,It=W`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background-color:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host(:is([disabled],[soft-disabled])) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host(:is([disabled],[soft-disabled])) .background{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host(:is([disabled],[soft-disabled])) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none} +`;let Nt=class extends kt{};Nt.styles=[It,Pt,Tt],Nt=M([j("md-filled-button")],Nt);var Ot,Rt=function(e,t,r,n){var s,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i};let Ut=class extends Qe{static{Ot=this}summary="tweetNoProblem";details=[];notes=[];isAlert=!1;isExpanded=!1;isFocalMode=!1;isTweetButtonShown=!1;isNoteShown=!1;onRenderedCallback;textColor="white";static styles=W` * { font-family: sans-serif; } @@ -128,44 +147,25 @@ opacity: 1; } } - `,n([(0,i.property)({reflect:!0})],l.prototype,"summary",void 0),n([(0,i.property)({reflect:!0,type:Array})],l.prototype,"details",void 0),n([(0,i.property)({reflect:!0,type:Array})],l.prototype,"notes",void 0),n([(0,i.property)({reflect:!0,type:Boolean})],l.prototype,"isAlert",void 0),n([(0,i.property)({reflect:!0,type:Boolean})],l.prototype,"isExpanded",void 0),n([(0,i.property)({reflect:!0,type:Boolean})],l.prototype,"isFocalMode",void 0),n([(0,i.property)({reflect:!0,type:Boolean})],l.prototype,"isTweetButtonShown",void 0),n([(0,i.property)({reflect:!0,type:Boolean})],l.prototype,"isNoteShown",void 0),n([(0,i.property)({attribute:!1,reflect:!0})],l.prototype,"onRenderedCallback",void 0),n([(0,i.property)({reflect:!0,type:String})],l.prototype,"textColor",void 0),t.SbsMessage=l=s=n([(0,i.customElement)("sbs-message")],l)},6911:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Core=void 0;const s=r(41),n=r(4114),o=r(1520),i=r(902),a=r(3114),l=r(8700),c=r(2634);t.Core=class{constructor(e,t){this.settings=e,this.onMessageCallback=t;const r=new n.Timeline;r.onNewTweet((e=>{this.checkTweet(e),this.timelineObserverCallback()})),r.onNewProfile((e=>{this.checkProfile(e)}))}checkProfile(e){if(Boolean(document.querySelector("[data-testid='editProfileButton']"))&&!this.settings.enableForOtherUsersProfiles)return;const t=i.PropsAnalyzer.analyzeProfileProps(e.props);if(!t.user.hasAnyProblem&&!this.settings.showMessagesInUnproblematicProfiles)return;const r=o.MessageDataGenerator.generateForProfile(t,this.onMessageCallback),s=new a.SbsMessageWrapper(r),n=document.querySelector("[data-testid='UserDescription']")||document.querySelector("[data-testid='UserName']");if(!n)throw new Error("Failed to get user description of profile");s.insertAdjacentElement(n,"afterend")}checkTweet(e){const t=i.PropsAnalyzer.analyzeTweetProps(new c.TweetParser(e));if(!e.metadata.isPostedByCurrentUser&&!this.settings.enableForOtherUsersTweets)return;if(!t.tweet.hasAnyProblem&&!this.settings.showMessagesInUnproblematicTweets)return;const r=o.MessageDataGenerator.generateForTweet(e,t,this.onMessageCallback,this.settings),s=new a.SbsMessageWrapper(r),n=e.element.querySelector("[data-testid='analyticsButton']")?.parentElement||e.element.querySelector("div[role='group'][id]");if(!n)throw new Error("Failed to get landmark element of tweet");s.insertAdjacentElement(n,"beforebegin")}necromancer(e){e.setAttribute(s.CHECKED_DATA_ATTRIBUTE,"true");const t=i.PropsAnalyzer.analyzeTombstoneProps(new l.TombstoneParser(e).parse());if(!t)return;const r=`https://twitter.com/i/status/${t}`,n=document.createElement("a");n.href=r,n.target="_blank",n.setAttribute(s.TRANSLATION_ATTRIBUTE,"viewTweet"),n.classList.add("shadowban-scanner-tombstone-necromancer");const o=e.querySelector("a");if(!o)throw new Error("Failed to get help link");n.style.color=getComputedStyle(o).color,o.insertAdjacentElement("afterend",n),this.onMessageCallback()}timelineObserverCallback(){const e=document.querySelectorAll(`[data-testid='cellInnerDiv']:not([${s.CHECKED_DATA_ATTRIBUTE}])`);for(const t of e)t.setAttribute(s.CHECKED_DATA_ATTRIBUTE,"true"),Boolean(t.querySelector("a[href='https://help.twitter.com/rules-and-policies/notices-on-twitter']"))&&this.necromancer(t)}}},1520:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MessageDataGenerator=void 0;const s=r(8197),n=r(6219);t.MessageDataGenerator=class{static generateForProfile(e,t){return{...n.TranslationKeyProvider.fromProfileAnalyzer(e),isAlert:e.user.hasAnyProblem,onRenderedCallback:t,type:"profile"}}static generateForTweet(e,t,r,o){const i=n.TranslationKeyProvider.fromTweetAnalyzer(t),a=s.ShareTextGenerator.generateShareText(t);return{...i,isAlert:t.tweet.hasAnyProblem,isExpanded:o.alwaysDetailedView,isNoteShown:o.showNotesInMessages,isTweetButtonShown:o.showTweetButton,notes:["falsePositivesAndFalseNegativesOccur","translatedByAI"],onRenderedCallback:r,tweet:e,tweetText:a,type:"tweet"}}}},8700:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TombstoneParser=void 0;const s=r(2632),n=r(543);t.TombstoneParser=class{constructor(e){this.element=e}parse(){const e=(0,n.getReactProps)(this.element);if(!(0,s.isCellInnerDivProps)(e))throw new Error("Type of props is invalid.");const t=this.element.querySelector("div > div");if(!t)throw new Error("Failed to get the tombstone's grandchild element.");const r=(0,n.getReactProps)(t);if(!(0,s.isTombstoneGrandchildProps)(r))throw new Error("Type of grandchild props is invalid.");return[e,r]}}},2634:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TweetParser=void 0,t.TweetParser=class{constructor(e){this.tweet=e}parse(){return this.tweet.props}}},543:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getReactProps=void 0,t.getReactProps=e=>e[Object.getOwnPropertyNames(e).filter((e=>e.startsWith("__reactProps$")))]},902:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropsAnalyzer=void 0;class r{static analyzeProfileProps(e){const t=Boolean(e.possibly_sensitive),r=Boolean(["sensitive_media","offensive_profile_content"].includes(e.profile_interstitial_type)),s=e.withheld_in_countries,n=t||r;return{user:{hasAnyProblem:n||s.length>0,sensitiveMediaInProfile:r,shadowbanned:n,withheldInCountries:s}}}static analyzeTweetProps(e){const t=e.parse(),s=r.analyzeProfileProps(t.user),n=Boolean(t.possibly_sensitive),o=!(!1===t.possibly_sensitive_editable),i=n&&!o;let a="searchable";return i||s.user.shadowbanned?a="unsearchable":n&&(a="possiblyUnsearchable"),{...s,tweet:{ageRestriction:i,hasAnyProblem:"searchable"!==a||s.user.hasAnyProblem,possiblySensitive:n,searchability:a}}}static analyzeTombstoneProps(e){const[t,r]=e;if(!t.children._owner)return;if(r.children[0].props.entry.conversationPosition.showReplyContext)return;const{key:s}=t.children._owner;return s.split("-")[3]}}t.PropsAnalyzer=r},3114:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SbsMessageWrapper=void 0,r(380);const s=r(41);class n{constructor(e){this.tweet=null;const t=document.createElement("sbs-message");if(t.textColor=n.getTextColor(),t.summary=e.summary,t.isAlert=e.isAlert,t.onRenderedCallback=e.onRenderedCallback,"tweet"===e.type){if(!e.tweet)throw new Error("Tweet data is missing");this.tweet=e.tweet,t.details=e.details,t.notes=e.notes,t.isFocalMode=e.tweet.metadata.isFocalMode,t.isExpanded=e.isExpanded,t.isTweetButtonShown=e.isTweetButtonShown,t.isNoteShown=e.isNoteShown,this.tweetText=e.tweetText}else t.isExpanded=!0;t.setAttribute(s.SHADOW_TRANSLATION_ATTRIBUTE,""),t.addEventListener("tweetButtonClick",this.onTweetButtonClick.bind(this)),this.sbsMessage=t}static getTextColor(){const e=["[data-testid='User-Name'] div:first-child span","[data-testid='UserName'] div:first-child span"].join(","),t=document.querySelector(e);if(!t)throw new Error("Failed to get user name span of tweet");const{color:r}=getComputedStyle(t);return r}onTweetButtonClick(){if(!this.tweet||!this.tweetText)throw new Error("Tweet button clicked without source tweet");this.tweet.quoteTweet(this.tweetText)}insertAdjacentElement(e,t){e.insertAdjacentElement(t,this.sbsMessage)}}t.SbsMessageWrapper=n},8197:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ShareTextGenerator=void 0,t.ShareTextGenerator=class{static generateShareText(e){const t="searchable"===e.tweet.searchability;return`\n${e.user.shadowbanned?"🚫Account flagged as sensitive or shadowbanned":"✅Account not flagged as sensitive"}\n${e.user.sensitiveMediaInProfile?"🚫Sensitive flag on profile media":"✅No sensitive flag on profile media"}\n${e.user.withheldInCountries.length?"🚫Account blocked in some countries":"✅Account not blocked in any countries"}\n${e.tweet.possiblySensitive?"🚫Sensitive flag on tweet":"✅No sensitive flag on tweet"}\n${e.tweet.ageRestriction?"🚫Age limit on tweet":"✅No age limit on tweet"}\n${t?"✅Tweet searchable":"🚫Tweet may not be searchable"}\n\nShadowban Scanner by ろぼいん\n${navigator.language.toLowerCase().startsWith("ja")?"https://shadowban-scanner.roboin.io/ja/":"https://shadowban-scanner.roboin.io/en/"}\n `.trim()}}},6219:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TranslationKeyProvider=void 0;class r{static fromProfileAnalyzer(e){let t=null;return t=e.user.shadowbanned?"thisUserIsShadowbanned":e.user.withheldInCountries.length?"accountIsBlockedInSomeCountries":"thisUserIsNotShadowbanned",{summary:t}}static summarizeForTweet(e){return e.user.shadowbanned||e.user.sensitiveMediaInProfile||Boolean(e.user.withheldInCountries.length)||e.tweet.possiblySensitive?e.user.withheldInCountries.length?"accountIsBlockedInSomeCountries":e.user.shadowbanned||e.user.sensitiveMediaInProfile?e.tweet.possiblySensitive?e.tweet.ageRestriction?"accountAndTweetShadowbanned":"accountShadowbannedAndTweetFlaggedAsSensitive":"accountShadowbanned":e.tweet.ageRestriction?"tweetShadowbanned":"tweetFlaggedAsSensitive":"tweetNoProblem"}static formatCountryList(e){const t=navigator.language,r=new Intl.ListFormat(t,{style:"narrow",type:"conjunction"}),s=new Intl.DisplayNames([t],{type:"region"}),n=e.map((e=>s.of(e)||""));return r.format(n)}static getAccountDetails(e){return[e.user.shadowbanned?"accountIsShadowbannedOrFlaggedAsSensitive":"accountIsNotFlaggedAsSensitive",e.user.sensitiveMediaInProfile?"profileContainsSensitiveMedia":"profileDoesNotContainSensitiveMedia",e.user.withheldInCountries.length?{messageName:"accountIsWithheldInCountries",substitutions:r.formatCountryList(e.user.withheldInCountries)}:"accountIsNotWithheldInCountries"]}static getTweetDetails(e){return[e.tweet.possiblySensitive?"tweetIsFlaggedAsSensitive":"tweetIsNotFlaggedAsSensitive",e.tweet.ageRestriction?"tweetIsAgeRestricted":"tweetIsNotAgeRestricted",{possiblyUnsearchable:"tweetMayNotBeSearchable",searchable:"tweetIsSearchable",unsearchable:"tweetIsNotSearchable"}[e.tweet.searchability]]}static fromTweetAnalyzer(e){const t=r.summarizeForTweet(e);return{details:[...r.getAccountDetails(e),...r.getTweetDetails(e)],summary:t}}}t.TranslationKeyProvider=r},2785:function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(5540),o=s(r(5094));new n.UserScriptBase(o.default)},5540:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UserScriptBase=void 0,r(5535);const s=r(6911),n=r(8140),o=r(7316);t.UserScriptBase=class{constructor(e){const t=new o.Translator(((t,r)=>{if(r){const s="string"==typeof r?[r]:r;let n=e[t].message;for(let e=0;e{t.translateElements()}))}}},1497:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isTranslationSubstitutions=function(e){const t=e;return void 0===t||"string"==typeof t||Array.isArray(t)&&t.every((e=>"string"==typeof e))}},2632:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isCellInnerDivProps=function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&(null!==t.children&&"object"==typeof t.children||"function"==typeof t.children)&&(void 0===t.children._owner||(null!==t.children._owner&&"object"==typeof t.children._owner||"function"==typeof t.children._owner)&&"string"==typeof t.children._owner.key)},t.isTombstoneGrandchildProps=function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[0]&&"object"==typeof t.children[0]||"function"==typeof t.children[0])&&(null!==t.children[0].props&&"object"==typeof t.children[0].props||"function"==typeof t.children[0].props)&&(null!==t.children[0].props.entry&&"object"==typeof t.children[0].props.entry||"function"==typeof t.children[0].props.entry)&&"tombstone"===t.children[0].props.entry.type&&(null!==t.children[0].props.entry.conversationPosition&&"object"==typeof t.children[0].props.entry.conversationPosition||"function"==typeof t.children[0].props.entry.conversationPosition)&&"boolean"==typeof t.children[0].props.entry.conversationPosition.showReplyContext}},842:(e,t,r)=>{r.d(t,{BO:()=>a,mN:()=>C,Rf:()=>d,AH:()=>c,W3:()=>T,sk:()=>h,Ec:()=>S,qM:()=>n,iz:()=>l});const s=globalThis,n=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),i=new WeakMap;class a{constructor(e,t,r){if(this._$cssResult$=!0,r!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(n&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=i.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&i.set(t,e))}return e}toString(){return this.cssText}}const l=e=>new a("string"==typeof e?e:e+"",void 0,o),c=(e,...t)=>{const r=1===e.length?e[0]:t.reduce(((t,r,s)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[s+1]),e[0]);return new a(r,e,o)},d=(e,t)=>{if(n)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const r of t){const t=document.createElement("style"),n=s.litNonce;void 0!==n&&t.setAttribute("nonce",n),t.textContent=r.cssText,e.appendChild(t)}},h=n?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return l(t)})(e):e,{is:p,defineProperty:u,getOwnPropertyDescriptor:m,getOwnPropertyNames:f,getOwnPropertySymbols:b,getPrototypeOf:y}=Object,g=globalThis,v=g.trustedTypes,w=v?v.emptyScript:"",_=g.reactiveElementPolyfillSupport,A=(e,t)=>e,T={toAttribute(e,t){switch(t){case Boolean:e=e?w:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},S=(e,t)=>!p(e,t),E={attribute:!0,type:String,converter:T,reflect:!1,hasChanged:S};Symbol.metadata??=Symbol("metadata"),g.litPropertyMetadata??=new WeakMap;class C extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=E){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),s=this.getPropertyDescriptor(e,r,t);void 0!==s&&u(this.prototype,e,s)}}static getPropertyDescriptor(e,t,r){const{get:s,set:n}=m(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return s?.call(this)},set(t){const o=s?.call(this);n.call(this,t),this.requestUpdate(e,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??E}static _$Ei(){if(this.hasOwnProperty(A("elementProperties")))return;const e=y(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(A("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(A("properties"))){const e=this.properties,t=[...f(e),...b(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(h(e))}else void 0!==e&&t.push(h(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return d(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EC(e,t){const r=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,r);if(void 0!==s&&!0===r.reflect){const n=(void 0!==r.converter?.toAttribute?r.converter:T).toAttribute(t,r.type);this._$Em=e,null==n?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(e,t){const r=this.constructor,s=r._$Eh.get(e);if(void 0!==s&&this._$Em!==s){const e=r.getPropertyOptions(s),n="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:T;this._$Em=s,this[s]=n.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){if(r??=this.constructor.getPropertyOptions(e),!(r.hasChanged??S)(this[e],t))return;this.P(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,r){this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e)!0!==r.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],r)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}}C.elementStyles=[],C.shadowRootOptions={mode:"open"},C[A("elementProperties")]=new Map,C[A("finalized")]=new Map,_?.({ReactiveElement:C}),(g.reactiveElementVersions??=[]).push("2.0.4")},919:(e,t,r)=>{function s(e,t,r,s){var n,o=arguments.length,i=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,r):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(i=(o<3?n(i):o>3?n(t,r,i):n(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}r.r(t),r.d(t,{MdFilledButton:()=>W}),Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var n=r(2924),o=r(6337);class i extends o.LitElement{connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){return o.html``}}const a=o.css`:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute;transition-duration:inherit;transition-property:inherit;transition-timing-function:inherit}:host{display:flex;pointer-events:none;transition-property:box-shadow,opacity}.shadow::before,.shadow::after{content:"";transition-property:box-shadow,opacity;--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000))}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color);opacity:.15} -`;let l=class extends i{};l.styles=[a],l=s([(0,n.customElement)("md-elevation")],l);const c=Symbol("attachableController");let d;o.isServer||(d=new MutationObserver((e=>{for(const t of e)t.target[c]?.hostConnected()})));class h{get htmlFor(){return this.host.getAttribute("for")}set htmlFor(e){null===e?this.host.removeAttribute("for"):this.host.setAttribute("for",e)}get control(){return this.host.hasAttribute("for")?this.htmlFor&&this.host.isConnected?this.host.getRootNode().querySelector(`#${this.htmlFor}`):null:this.currentControl||this.host.parentElement}set control(e){e?this.attach(e):this.detach()}constructor(e,t){this.host=e,this.onControlChange=t,this.currentControl=null,e.addController(this),e[c]=this,d?.observe(e,{attributeFilter:["for"]})}attach(e){e!==this.currentControl&&(this.setCurrentControl(e),this.host.removeAttribute("for"))}detach(){this.setCurrentControl(null),this.host.setAttribute("for","")}hostConnected(){this.setCurrentControl(this.control)}hostDisconnected(){this.setCurrentControl(null)}setCurrentControl(e){this.onControlChange(this.currentControl,e),this.currentControl=e}}const p=["focusin","focusout","pointerdown"];class u extends o.LitElement{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new h(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}handleEvent(e){if(!e[m]){switch(e.type){default:return;case"focusin":this.visible=this.control?.matches(":focus-visible")??!1;break;case"focusout":case"pointerdown":this.visible=!1}e[m]=!0}}onControlChange(e,t){if(!o.isServer)for(const r of p)e?.removeEventListener(r,this),t?.addEventListener(r,this)}update(e){e.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(e)}}s([(0,n.property)({type:Boolean,reflect:!0})],u.prototype,"visible",void 0),s([(0,n.property)({type:Boolean,reflect:!0})],u.prototype,"inward",void 0);const m=Symbol("handledByFocusRing"),f=o.css`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}} -`;let b=class extends u{};b.styles=[f],b=s([(0,n.customElement)("md-focus-ring")],b);var y=r(2627);var g;!function(e){e[e.INACTIVE=0]="INACTIVE",e[e.TOUCH_DELAY=1]="TOUCH_DELAY",e[e.HOLDING=2]="HOLDING",e[e.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"}(g||(g={}));const v=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],w=o.isServer?null:window.matchMedia("(forced-colors: active)");class _ extends o.LitElement{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=g.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new h(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const e={hovered:this.hovered,pressed:this.pressed};return o.html`
`}update(e){e.has("disabled")&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(e)}handlePointerenter(e){this.shouldReactToEvent(e)&&(this.hovered=!0)}handlePointerleave(e){this.shouldReactToEvent(e)&&(this.hovered=!1,this.state!==g.INACTIVE&&this.endPressAnimation())}handlePointerup(e){if(this.shouldReactToEvent(e)){if(this.state!==g.HOLDING)return this.state===g.TOUCH_DELAY?(this.state=g.WAITING_FOR_CLICK,void this.startPressAnimation(this.rippleStartEvent)):void 0;this.state=g.WAITING_FOR_CLICK}}async handlePointerdown(e){if(this.shouldReactToEvent(e)){if(this.rippleStartEvent=e,!this.isTouch(e))return this.state=g.WAITING_FOR_CLICK,void this.startPressAnimation(e);this.checkBoundsAfterContextMenu&&!this.inBounds(e)||(this.checkBoundsAfterContextMenu=!1,this.state=g.TOUCH_DELAY,await new Promise((e=>{setTimeout(e,150)})),this.state===g.TOUCH_DELAY&&(this.state=g.HOLDING,this.startPressAnimation(e)))}}handleClick(){this.disabled||(this.state!==g.WAITING_FOR_CLICK?this.state===g.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation()):this.endPressAnimation())}handlePointercancel(e){this.shouldReactToEvent(e)&&this.endPressAnimation()}handleContextmenu(){this.disabled||(this.checkBoundsAfterContextMenu=!0,this.endPressAnimation())}determineRippleSize(){const{height:e,width:t}=this.getBoundingClientRect(),r=Math.max(e,t),s=Math.max(.35*r,75),n=Math.floor(.2*r),o=Math.sqrt(t**2+e**2)+10;this.initialSize=n,this.rippleScale=""+(o+s)/n,this.rippleSize=`${n}px`}getNormalizedPointerEventCoords(e){const{scrollX:t,scrollY:r}=window,{left:s,top:n}=this.getBoundingClientRect(),o=t+s,i=r+n,{pageX:a,pageY:l}=e;return{x:a-o,y:l-i}}getTranslationCoordinates(e){const{height:t,width:r}=this.getBoundingClientRect(),s={x:(r-this.initialSize)/2,y:(t-this.initialSize)/2};let n;return n=e instanceof PointerEvent?this.getNormalizedPointerEventCoords(e):{x:r/2,y:t/2},n={x:n.x-this.initialSize/2,y:n.y-this.initialSize/2},{startPoint:n,endPoint:s}}startPressAnimation(e){if(!this.mdRoot)return;this.pressed=!0,this.growAnimation?.cancel(),this.determineRippleSize();const{startPoint:t,endPoint:r}=this.getTranslationCoordinates(e),s=`${t.x}px, ${t.y}px`,n=`${r.x}px, ${r.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${s}) scale(1)`,`translate(${n}) scale(${this.rippleScale})`]},{pseudoElement:"::after",duration:450,easing:"cubic-bezier(0.2, 0, 0, 1)",fill:"forwards"})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=g.INACTIVE;const e=this.growAnimation;let t=1/0;"number"==typeof e?.currentTime?t=e.currentTime:e?.currentTime&&(t=e.currentTime.to("ms").value),t>=225?this.pressed=!1:(await new Promise((e=>{setTimeout(e,225-t)})),this.growAnimation===e&&(this.pressed=!1))}shouldReactToEvent(e){if(this.disabled||!e.isPrimary)return!1;if(this.rippleStartEvent&&this.rippleStartEvent.pointerId!==e.pointerId)return!1;if("pointerenter"===e.type||"pointerleave"===e.type)return!this.isTouch(e);const t=1===e.buttons;return this.isTouch(e)||t}inBounds({x:e,y:t}){const{top:r,left:s,bottom:n,right:o}=this.getBoundingClientRect();return e>=s&&e<=o&&t>=r&&t<=n}isTouch({pointerType:e}){return"touch"===e}async handleEvent(e){if(!w?.matches)switch(e.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(e);break;case"pointerdown":await this.handlePointerdown(e);break;case"pointerenter":this.handlePointerenter(e);break;case"pointerleave":this.handlePointerleave(e);break;case"pointerup":this.handlePointerup(e)}}onControlChange(e,t){if(!o.isServer)for(const r of v)e?.removeEventListener(r,this),t?.addEventListener(r,this)}}s([(0,n.property)({type:Boolean,reflect:!0})],_.prototype,"disabled",void 0),s([(0,n.state)()],_.prototype,"hovered",void 0),s([(0,n.state)()],_.prototype,"pressed",void 0),s([(0,n.query)(".surface")],_.prototype,"mdRoot",void 0);const A=o.css`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms} -`;let T=class extends _{};T.styles=[A],T=s([(0,n.customElement)("md-ripple")],T);const S=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText"],E=S.map($);function C(e){return E.includes(e)}function $(e){return e.replace("aria","aria-").replace(/Elements?/g,"").toLowerCase()}const x=Symbol("privateIgnoreAttributeChangesFor");function P(e){return`data-${e}`}function I(e){return e.replace(/-\w/,(e=>e[1].toUpperCase()))}const k=Symbol("internals"),R=Symbol("privateInternals");let O=!1;const N=function(e){var t;if(o.isServer)return e;class r extends e{constructor(){super(...arguments),this[t]=new Set}attributeChangedCallback(e,t,r){if(!C(e))return void super.attributeChangedCallback(e,t,r);if(this[x].has(e))return;this[x].add(e),this.removeAttribute(e),this[x].delete(e);const s=I(e);null===r?delete this.dataset[s]:this.dataset[s]=r,this.requestUpdate(I(e),t)}getAttribute(e){return C(e)?super.getAttribute(P(e)):super.getAttribute(e)}removeAttribute(e){super.removeAttribute(e),C(e)&&(super.removeAttribute(P(e)),this.requestUpdate())}}return t=x,function(e){for(const t of S){const r=$(t),s=P(r),n=I(r);e.createProperty(t,{attribute:r,noAccessor:!0}),e.createProperty(Symbol(s),{attribute:s,noAccessor:!0}),Object.defineProperty(e.prototype,t,{configurable:!0,enumerable:!0,get(){return this.dataset[n]??null},set(e){const r=this.dataset[n]??null;e!==r&&(null===e?delete this.dataset[n]:this.dataset[n]=e,this.requestUpdate(t,r))}})}}(r),r}((M=o.LitElement,class extends M{get[k](){return this[R]||(this[R]=this.attachInternals()),this[R]}}));var M,U;class L extends N{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[k].form}constructor(){super(),this.disabled=!1,this.softDisabled=!1,this.href="",this.target="",this.trailingIcon=!1,this.hasIcon=!1,this.type="submit",this.value="",o.isServer||this.addEventListener("click",this.handleClick.bind(this))}focus(){this.buttonElement?.focus()}blur(){this.buttonElement?.blur()}render(){const e=!this.href&&(this.disabled||this.softDisabled),t=this.href?this.renderLink():this.renderButton(),r=this.href?"link":"button";return o.html` - ${this.renderElevationOrOutline?.()} -
- - - ${t} - `}renderButton(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return o.html``}renderLink(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return o.html`${this.renderContent()} - `}renderContent(){const e=o.html``;return o.html` - - ${this.trailingIcon?o.nothing:e} - - ${this.trailingIcon?e:o.nothing} - `}handleClick(e){if(!this.href&&this.softDisabled)return e.stopImmediatePropagation(),void e.preventDefault();(function(e){return e.currentTarget===e.target&&e.composedPath()[0]===e.target&&!e.target.disabled&&!function(e){const t=O;return t&&(e.preventDefault(),e.stopImmediatePropagation()),async function(){O=!0,await null,O=!1}(),t}(e)})(e)&&this.buttonElement&&(this.focus(),function(e){const t=new MouseEvent("click",{bubbles:!0});e.dispatchEvent(t)}(this.buttonElement))}handleSlotChange(){this.hasIcon=this.assignedIcons.length>0}}U=L,o.isServer||U.addInitializer((e=>{const t=e;t.addEventListener("click",(async e=>{const{type:r,[k]:s}=t,{form:n}=s;n&&"button"!==r&&(await new Promise((e=>{setTimeout(e)})),e.defaultPrevented||("reset"!==r?(n.addEventListener("submit",(e=>{Object.defineProperty(e,"submitter",{configurable:!0,enumerable:!0,get:()=>t})}),{capture:!0,once:!0}),s.setFormValue(t.value),n.requestSubmit()):n.reset()))}))})),L.formAssociated=!0,L.shadowRootOptions={mode:"open",delegatesFocus:!0},s([(0,n.property)({type:Boolean,reflect:!0})],L.prototype,"disabled",void 0),s([(0,n.property)({type:Boolean,attribute:"soft-disabled",reflect:!0})],L.prototype,"softDisabled",void 0),s([(0,n.property)()],L.prototype,"href",void 0),s([(0,n.property)()],L.prototype,"target",void 0),s([(0,n.property)({type:Boolean,attribute:"trailing-icon",reflect:!0})],L.prototype,"trailingIcon",void 0),s([(0,n.property)({type:Boolean,attribute:"has-icon",reflect:!0})],L.prototype,"hasIcon",void 0),s([(0,n.property)()],L.prototype,"type",void 0),s([(0,n.property)({reflect:!0})],L.prototype,"value",void 0),s([(0,n.query)(".button")],L.prototype,"buttonElement",void 0),s([(0,n.queryAssignedElements)({slot:"icon",flatten:!0})],L.prototype,"assignedIcons",void 0);class j extends L{renderElevationOrOutline(){return o.html``}}const B=o.css`:host{--_container-color: var(--md-filled-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-elevation: var(--md-filled-button-container-elevation, 0);--_container-height: var(--md-filled-button-container-height, 40px);--_container-shadow-color: var(--md-filled-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-button-focus-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-container-elevation: var(--md-filled-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-button-hover-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-button-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-filled-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-button-pressed-label-text-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-color: var(--md-filled-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_container-shape-start-start: var(--md-filled-button-container-shape-start-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-button-container-shape-start-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-button-container-shape-end-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-button-container-shape-end-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-button-leading-space, 24px);--_trailing-space: var(--md-filled-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-button-with-trailing-icon-trailing-space, 16px)} -`,D=o.css`md-elevation{transition-duration:280ms}:host(:is([disabled],[soft-disabled])) md-elevation{transition:none}md-elevation{--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}:host(:focus-within) md-elevation{--md-elevation-level: var(--_focus-container-elevation)}:host(:hover) md-elevation{--md-elevation-level: var(--_hover-container-elevation)}:host(:active) md-elevation{--md-elevation-level: var(--_pressed-container-elevation)}:host(:is([disabled],[soft-disabled])) md-elevation{--md-elevation-level: var(--_disabled-container-elevation)} -`,F=o.css`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background-color:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host(:is([disabled],[soft-disabled])) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host(:is([disabled],[soft-disabled])) .background{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host(:is([disabled],[soft-disabled])) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none} -`;let W=class extends j{};W.styles=[F,D,B],W=s([(0,n.customElement)("md-filled-button")],W)},7804:(e,t,r)=>{r.d(t,{OA:()=>s,WL:()=>o,u$:()=>n});const s={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},n=e=>(...t)=>({_$litDirective$:e,values:t});class o{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}},6683:(e,t,r)=>{r.d(t,{H:()=>o});var s=r(6752),n=r(7804);const o=(0,n.u$)(class extends n.WL{constructor(e){if(super(e),e.type!==n.OA.ATTRIBUTE||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}const r=e.element.classList;for(const e of this.st)e in t||(r.remove(e),this.st.delete(e));for(const e in t){const s=!!t[e];s===this.st.has(e)||this.nt?.has(e)||(s?(r.add(e),this.st.add(e)):(r.remove(e),this.st.delete(e)))}return s.c0}})},6752:(e,t,r)=>{r.d(t,{JW:()=>E,XX:()=>q,c0:()=>C,ge:()=>F,qy:()=>S,s6:()=>$});const s=globalThis,n=s.trustedTypes,o=n?n.createPolicy("lit-html",{createHTML:e=>e}):void 0,i="$lit$",a=`lit$${(Math.random()+"").slice(9)}$`,l="?"+a,c=`<${l}>`,d=document,h=()=>d.createComment(""),p=e=>null===e||"object"!=typeof e&&"function"!=typeof e,u=Array.isArray,m=e=>u(e)||"function"==typeof e?.[Symbol.iterator],f="[ \t\n\f\r]",b=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,y=/-->/g,g=/>/g,v=RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),w=/'/g,_=/"/g,A=/^(?:script|style|textarea|title)$/i,T=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),S=T(1),E=T(2),C=Symbol.for("lit-noChange"),$=Symbol.for("lit-nothing"),x=new WeakMap,P=d.createTreeWalker(d,129);function I(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==o?o.createHTML(t):t}const k=(e,t)=>{const r=e.length-1,s=[];let n,o=2===t?"":"",l=b;for(let t=0;t"===h[0]?(l=n??b,p=-1):void 0===h[1]?p=-2:(p=l.lastIndex-h[2].length,d=h[1],l=void 0===h[3]?v:'"'===h[3]?_:w):l===_||l===w?l=v:l===y||l===g?l=b:(l=v,n=void 0);const m=l===v&&e[t+1].startsWith("/>")?" ":"";o+=l===b?r+c:p>=0?(s.push(d),r.slice(0,p)+i+r.slice(p)+a+m):r+a+(-2===p?t:m)}return[I(e,o+(e[r]||"")+(2===t?"":"")),s]};class R{constructor({strings:e,_$litType$:t},r){let s;this.parts=[];let o=0,c=0;const d=e.length-1,p=this.parts,[u,m]=k(e,t);if(this.el=R.createElement(u,r),P.currentNode=this.el.content,2===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(s=P.nextNode())&&p.length0){s.textContent=n?n.emptyScript:"";for(let r=0;r2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=$}_$AI(e,t=this,r,s){const n=this.strings;let o=!1;if(void 0===n)e=O(this,e,t,0),o=!p(e)||e!==this._$AH&&e!==C,o&&(this._$AH=e);else{const s=e;let i,a;for(e=n[0],i=0;i{const s=r?.renderBefore??t;let n=s._$litPart$;if(void 0===n){const e=r?.renderBefore??null;s._$litPart$=n=new M(t.insertBefore(h(),e),e,void 0,r??{})}return n._$AI(e),n}},2924:(e,t,r)=>{r.r(t),r.d(t,{customElement:()=>s,eventOptions:()=>c,property:()=>a,query:()=>h,queryAll:()=>u,queryAssignedElements:()=>f,queryAssignedNodes:()=>b,queryAsync:()=>m,standardProperty:()=>i,state:()=>l});const s=e=>(t,r)=>{void 0!==r?r.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)};var n=r(842);const o={attribute:!0,type:String,converter:n.W3,reflect:!1,hasChanged:n.Ec},i=(e=o,t,r)=>{const{kind:s,metadata:n}=r;let i=globalThis.litPropertyMetadata.get(n);if(void 0===i&&globalThis.litPropertyMetadata.set(n,i=new Map),i.set(r.name,e),"accessor"===s){const{name:s}=r;return{set(r){const n=t.get.call(this);t.set.call(this,r),this.requestUpdate(s,n,e)},init(t){return void 0!==t&&this.P(s,void 0,e),t}}}if("setter"===s){const{name:s}=r;return function(r){const n=this[s];t.call(this,r),this.requestUpdate(s,n,e)}}throw Error("Unsupported decorator location: "+s)};function a(e){return(t,r)=>"object"==typeof r?i(e,t,r):((e,t,r)=>{const s=t.hasOwnProperty(r);return t.constructor.createProperty(r,s?{...e,wrapped:!0}:e),s?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}function l(e){return a({...e,state:!0,attribute:!1})}function c(e){return(t,r)=>{const s="function"==typeof t?t:t[r];Object.assign(s,e)}}const d=(e,t,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,r),r);function h(e,t){return(r,s,n)=>{const o=t=>t.renderRoot?.querySelector(e)??null;if(t){const{get:e,set:t}="object"==typeof s?r:n??(()=>{const e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return d(r,s,{get(){let r=e.call(this);return void 0===r&&(r=o(this),(null!==r||this.hasUpdated)&&t.call(this,r)),r}})}return d(r,s,{get(){return o(this)}})}}let p;function u(e){return(t,r)=>d(t,r,{get(){return(this.renderRoot??(p??=document.createDocumentFragment())).querySelectorAll(e)}})}function m(e){return(t,r)=>d(t,r,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(e)??null}})}function f(e){return(t,r)=>{const{slot:s,selector:n}=e??{},o="slot"+(s?`[name=${s}]`:":not([name])");return d(t,r,{get(){const t=this.renderRoot?.querySelector(o),r=t?.assignedElements(e)??[];return void 0===n?r:r.filter((e=>e.matches(n)))}})}}function b(e){return(t,r)=>{const{slot:s}=e??{},n="slot"+(s?`[name=${s}]`:":not([name])");return d(t,r,{get(){const t=this.renderRoot?.querySelector(n);return t?.assignedNodes(e)??[]}})}}},2627:(e,t,r)=>{r.r(t),r.d(t,{classMap:()=>s.H});var s=r(6683)},6337:(e,t,r)=>{r.r(t),r.d(t,{CSSResult:()=>s.BO,LitElement:()=>o,ReactiveElement:()=>s.mN,_$LE:()=>a,_$LH:()=>n.ge,adoptStyles:()=>s.Rf,css:()=>s.AH,defaultConverter:()=>s.W3,getCompatibleStyle:()=>s.sk,html:()=>n.qy,isServer:()=>l,noChange:()=>n.c0,notEqual:()=>s.Ec,nothing:()=>n.s6,render:()=>n.XX,supportsAdoptingStyleSheets:()=>s.qM,svg:()=>n.JW,unsafeCSS:()=>s.iz});var s=r(842),n=r(6752);class o extends s.mN{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=(0,n.XX)(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return n.c0}}o._$litElement$=!0,o.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:o});const i=globalThis.litElementPolyfillSupport;i?.({LitElement:o});const a={_$AK:(e,t,r)=>{e._$AK(t,r)},_$AL:e=>e._$AL};(globalThis.litElementVersions??=[]).push("4.0.4");const l=!1},4114:(e,t,r)=>{r.r(t),r.d(t,{Profile:()=>n,Timeline:()=>m,Tweet:()=>i});const s=e=>{const t=Object.getOwnPropertyNames(e).filter((e=>e.startsWith("__reactProps$")));return t.length?e[t[0]]:null};class n{profileElement;constructor(e){this.profileElement=e}get props(){const e=s(this.profileElement);if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[0]&&"object"==typeof t.children[0]||"function"==typeof t.children[0])&&(null!==t.children[0].props&&"object"==typeof t.children[0].props||"function"==typeof t.children[0].props)&&Array.isArray(t.children[0].props.children)&&(null!==t.children[0].props.children[1]&&"object"==typeof t.children[0].props.children[1]||"function"==typeof t.children[0].props.children[1])&&(null!==t.children[0].props.children[1].props&&"object"==typeof t.children[0].props.children[1].props||"function"==typeof t.children[0].props.children[1].props)&&(null!==t.children[0].props.children[1].props.user&&"object"==typeof t.children[0].props.children[1].props.user||"function"==typeof t.children[0].props.children[1].props.user)&&(void 0===t.children[0].props.children[1].props.user.possibly_sensitive||null===t.children[0].props.children[1].props.user.possibly_sensitive||!1===t.children[0].props.children[1].props.user.possibly_sensitive||!0===t.children[0].props.children[1].props.user.possibly_sensitive)&&"string"==typeof t.children[0].props.children[1].props.user.screen_name&&(""===t.children[0].props.children[1].props.user.profile_interstitial_type||"sensitive_media"===t.children[0].props.children[1].props.user.profile_interstitial_type||"fake_account"===t.children[0].props.children[1].props.user.profile_interstitial_type||"offensive_profile_content"===t.children[0].props.children[1].props.user.profile_interstitial_type||"timeout"===t.children[0].props.children[1].props.user.profile_interstitial_type)&&Array.isArray(t.children[0].props.children[1].props.user.withheld_in_countries)&&t.children[0].props.children[1].props.user.withheld_in_countries.every((e=>"string"==typeof e))}(e))throw new Error("Failed to get React props of profile");return e.children[0].props.children[1].props.user}}var o=r(8531);class i{tweetElement;constructor(e){this.tweetElement=e}getMenuBar(){const e=this.tweetElement.querySelector("div[role='group'][id]");if(!e)throw new Error("Failed to get menu bar of tweet");return e}get element(){return this.tweetElement}get props(){const e=s(this.getMenuBar());if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[1]&&"object"==typeof t.children[1]||"function"==typeof t.children[1])&&(null!==t.children[1].props&&"object"==typeof t.children[1].props||"function"==typeof t.children[1].props)&&(null!==t.children[1].props.retweetWithCommentLink&&"object"==typeof t.children[1].props.retweetWithCommentLink||"function"==typeof t.children[1].props.retweetWithCommentLink)&&(null!==t.children[1].props.retweetWithCommentLink.state&&"object"==typeof t.children[1].props.retweetWithCommentLink.state||"function"==typeof t.children[1].props.retweetWithCommentLink.state)&&(null!==t.children[1].props.retweetWithCommentLink.state.quotedStatus&&"object"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus||"function"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable)&&"string"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.permalink&&(null!==t.children[1].props.retweetWithCommentLink.state.quotedStatus.user&&"object"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user||"function"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive)&&"string"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.screen_name&&(""===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"sensitive_media"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"fake_account"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"offensive_profile_content"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"timeout"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type)&&Array.isArray(t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.withheld_in_countries)&&t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.withheld_in_countries.every((e=>"string"==typeof e))}(e))throw new Error("Failed to get React props of tweet");return e.children[1].props.retweetWithCommentLink.state.quotedStatus}get metadata(){const e=this.props.user.screen_name,t=s(this.element);if(!t)throw new Error("Failed to get React props of tweet");let r=null;const n=function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&Array.isArray(t.children[0])&&(null!==t.children[0][1]&&"object"==typeof t.children[0][1]||"function"==typeof t.children[0][1])&&(null!==t.children[0][1].props&&"object"==typeof t.children[0][1].props||"function"==typeof t.children[0][1].props)&&Array.isArray(t.children[0][1].props.children)&&(null!==t.children[0][1].props.children[0]&&"object"==typeof t.children[0][1].props.children[0]||"function"==typeof t.children[0][1].props.children[0])&&(null!==t.children[0][1].props.children[0].props&&"object"==typeof t.children[0][1].props.children[0].props||"function"==typeof t.children[0][1].props.children[0].props)&&Array.isArray(t.children[0][1].props.children[0].props.children)&&(null!==t.children[0][1].props.children[0].props.children[2]&&"object"==typeof t.children[0][1].props.children[0].props.children[2]||"function"==typeof t.children[0][1].props.children[0].props.children[2])&&(null!==t.children[0][1].props.children[0].props.children[2].props&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props||"function"==typeof t.children[0][1].props.children[0].props.children[2].props)&&Array.isArray(t.children[0][1].props.children[0].props.children[2].props.children)&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7]&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7]||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7])&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7].props&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props)&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser)&&"string"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser.screen_name}(t);return function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&Array.isArray(t.children[0])&&(null!==t.children[0][1]&&"object"==typeof t.children[0][1]||"function"==typeof t.children[0][1])&&(null!==t.children[0][1].props&&"object"==typeof t.children[0][1].props||"function"==typeof t.children[0][1].props)&&Array.isArray(t.children[0][1].props.children)&&(null!==t.children[0][1].props.children[0]&&"object"==typeof t.children[0][1].props.children[0]||"function"==typeof t.children[0][1].props.children[0])&&(null!==t.children[0][1].props.children[0].props&&"object"==typeof t.children[0][1].props.children[0].props||"function"==typeof t.children[0][1].props.children[0].props)&&Array.isArray(t.children[0][1].props.children[0].props.children)&&(null!==t.children[0][1].props.children[0].props.children[1]&&"object"==typeof t.children[0][1].props.children[0].props.children[1]||"function"==typeof t.children[0][1].props.children[0].props.children[1])&&(null!==t.children[0][1].props.children[0].props.children[1].props&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props||"function"==typeof t.children[0][1].props.children[0].props.children[1].props)&&Array.isArray(t.children[0][1].props.children[0].props.children[1].props.children)&&Array.isArray(t.children[0][1].props.children[0].props.children[1].props.children[1])&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2]&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2]||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2])&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2].props&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props)&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser)&&"string"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser.screen_name}(t)&&(r=t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser.screen_name),n&&(r=t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser.screen_name),{isFocalMode:n,isPostedByCurrentUser:e===r}}async clickRetweetButton(e){const t=await(0,o.asyncQuerySelector)("[data-testid='unretweet'], [data-testid='retweet']",this.tweetElement,e);if(!t)throw new Error("Failed to get retweet button of tweet");t.click()}static async clickQuoteButton(e){const t=await(0,o.asyncQuerySelector)(["[data-testid='Dropdown'] [href='/compose/post']","[data-testid='sheetDialog'] [href='/compose/post']"].join(","),document,e);if(!t)throw new Error("Failed to get quote button of tweet");t.click()}static async getTweetTextBox(e){const t="pro.twitter.com"===location.hostname?"[role='dialog'] [data-text='true'], [role='dialog'] textarea[data-testid='tweetTextarea_0']":"[role='dialog'] [data-text='true'], textarea[data-testid='tweetTextarea_0']",r=await(0,o.asyncQuerySelector)(t,document,e);if(!r)throw new Error("Failed to get text box marker of tweet");const s="TEXTAREA"===r.tagName?r:r.parentElement;if(!s)throw new Error("Failed to get text box of tweet");return s}async quoteTweet(e,t=1e3){try{await this.clickRetweetButton(t),await i.clickQuoteButton(t);const r=await i.getTweetTextBox(t);r.innerHTML=e,r.dispatchEvent(new Event("input",{bubbles:!0}))}catch(t){const r=this.props.permalink;open(`https://twitter.com/intent/tweet?text=${encodeURIComponent(`${e}\nhttps://twitter.com${r}`)}`,"_blank")}}}const a={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var l,c=new Uint8Array(16);function d(){if(!l&&!(l="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return l(c)}for(var h=[],p=0;p<256;++p)h.push((p+256).toString(16).slice(1));const u=function(e,t,r){if(a.randomUUID&&!t&&!e)return a.randomUUID();var s=(e=e||{}).random||(e.rng||d)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){r=r||0;for(var n=0;n<16;++n)t[r+n]=s[n];return t}return function(e,t=0){return(h[e[t+0]]+h[e[t+1]]+h[e[t+2]]+h[e[t+3]]+"-"+h[e[t+4]]+h[e[t+5]]+"-"+h[e[t+6]]+h[e[t+7]]+"-"+h[e[t+8]]+h[e[t+9]]+"-"+h[e[t+10]]+h[e[t+11]]+h[e[t+12]]+h[e[t+13]]+h[e[t+14]]+h[e[t+15]]).toLowerCase()}(s)};class m{OBSERVER_OPTIONS={childList:!0,subtree:!0};onNewTweetCallback=null;onNewProfileCallback=null;constructor(e){const t=`data-twi-ext-checked-${u()}`,r={timeoutMs:1e4,...e},s=new MutationObserver((()=>{if(this.onNewTweetCallback){const e=document.querySelectorAll(`[data-testid="tweet"]:not([${t}])`);for(const r of e)r.setAttribute(t,""),this.onNewTweetCallback(new i(r))}if(this.onNewProfileCallback){const e=document.querySelector(`:not([data-testid="tweet"]) [data-testid="UserName"]:not([${t}])`);e&&(e.setAttribute(t,""),this.onNewProfileCallback(new n(e)))}}));(0,o.asyncQuerySelector)("main",document,r.timeoutMs).then((e=>{if(!e)throw new Error("twi-ext: Failed to get main element");s.observe(e,this.OBSERVER_OPTIONS)})),(0,o.asyncQuerySelector)("#layers",document,r.timeoutMs).then((e=>{if(!e)throw new Error("twi-ext: Failed to get #layers element");s.observe(e,this.OBSERVER_OPTIONS)}))}onNewTweet(e){this.onNewTweetCallback=e}onNewProfile(e){this.onNewProfileCallback=e}}},5094:e=>{e.exports=JSON.parse('{"manifest_description":{"message":"A browser extension that detects shadowbans on Twitter."},"accountShadowbanned":{"message":"This user may be shadowbanned, so this tweet may not appear in search results."},"accountShadowbannedAndTweetFlaggedAsSensitive":{"message":"This user may be shadowbanned so this tweet may not appear in search results. Also, this tweet is flagged as sensitive."},"accountAndTweetShadowbanned":{"message":"This tweet is age-restricted and cannot be viewed by users under the age of 18 or who are not logged in. This tweet may not appear in search results."},"accountIsBlockedInSomeCountries":{"message":"This user is blocked in some countries."},"tweetFlaggedAsSensitive":{"message":"This tweet is flagged as sensitive and will not appear in search results depending on the viewer\'s preferences."},"thisUserIsNotShadowbanned":{"message":"This user is not shadowbanned."},"thisUserIsShadowbanned":{"message":"This user may be shadowbanned and tweets may not appear in search results."},"tweetShadowbanned":{"message":"This tweet is age-restricted and cannot be viewed by users under the age of 18 or who are not logged in. This tweet may not appear in search results."},"tweetNoProblem":{"message":"No problems was found with this tweet."},"accountIsNotFlaggedAsSensitive":{"message":"✅Account is not flagged as sensitive."},"accountIsShadowbannedOrFlaggedAsSensitive":{"message":"🚫Account may be shadowbanned or flagged as sensitive."},"profileDoesNotContainSensitiveMedia":{"message":"✅Profile media is not flagged as sensitive."},"profileContainsSensitiveMedia":{"message":"🚫Profile media is flagged as sensitive."},"accountIsNotWithheldInCountries":{"message":"✅Account is not blocked in any countries (details)."},"accountIsWithheldInCountries":{"message":"🚫Account is blocked in the following country(ies) (details): $1"},"tweetIsNotFlaggedAsSensitive":{"message":"✅Tweet is not flagged as sensitive."},"tweetIsFlaggedAsSensitive":{"message":"🚫Tweet is flagged as sensitive."},"tweetIsNotAgeRestricted":{"message":"✅Tweet has no age limit."},"tweetIsAgeRestricted":{"message":"🚫Tweet has age limit."},"tweetIsSearchable":{"message":"✅Tweet will appear in search results."},"tweetMayNotBeSearchable":{"message":"⚠️Tweet may not appear in search results depending on viewer preferences."},"tweetIsNotSearchable":{"message":"🚫Tweet may not appear in search results."},"falsePositivesAndFalseNegativesOccur":{"message":"Shadowban Scanner, like other similar tools, can produce false positives and false negatives. For more information on how it works, please click here."},"translatedByAI":{"message":"Translated from Japanese to English by AI. Please notify @keita_roboin\'s DM or GitHub repository if there are any unnatural points.","description":"This field is used if the translation was done by AI. Otherwise, set this field to an empty string. Example sentence: \\"Translated from Japanese to by AI. Please notify @keita_roboin\'s DM or GitHub repository if there are any unnatural points.\\""},"showMore":{"message":"▶show more"},"tweetTheResults":{"message":"Tweet the results"},"viewTweet":{"message":"View Tweet"},"settingsWhereToDisplayCheckResults":{"message":"Where to display check results"},"settingsShowMessagesInUnproblematicTweets":{"message":"Display in non-problematic tweets"},"settingsShowMessagesInUnproblematicProfiles":{"message":"Display in non-problematic profiles"},"settingsEnableForOtherUsersTweets":{"message":"Display in other users\' tweets"},"settingsEnableForOtherUsersProfiles":{"message":"Display in other users\' profiles"},"settingsOtherSettings":{"message":"Other settings"},"settingsAlwaysDetailedView":{"message":"Always display detailed information"},"settingsShowNotesInMessages":{"message":"Display notes at the bottom of the message"},"settingsShowTweetButton":{"message":"Display buttons to tweet the results"},"settingsPleaseReload":{"message":"Please reload Twitter once you have changed the settings"},"settingsPrivacyPolicy":{"message":"Privacy policy"},"settingsPrivacyPolicyURL":{"message":"https://github.com/Robot-Inventor/shadowban-scanner#privacy-policy"},"settingsOpenSourceLicenses":{"message":"Open source licenses"},"privacyPolicyPageTitle":{"message":"Privacy Policy - Shadowban Scanner"},"privacyPolicy":{"message":"Privacy Policy"},"privacyPolicyText":{"message":"As a rule, this extension performs all processing on the user\'s computer. No data is transmitted to an external server. It also does not access Twitter\'s internal API by obtaining the user\'s credentials without permission, as is the case with some extensions. Web pages not bundled in this extension are subject to their own terms of use and privacy policies."},"initialSetup":{"message":"Initial setup - Shadowban Scanner"},"shadowbanScannerHasBeenInstalled":{"message":"Shadowban Scanner installed"},"letsStartWithASimpleInitialSetup":{"message":"Let\'s start with a simple initial setup"},"pleaseSelectOneOfThem":{"message":"Please choose one. The settings can be changed later."},"displayForAllTweetsAndAccounts":{"message":"Show scan results for all tweets and accounts"},"displayOnlyForProblematicTweets":{"message":"Show scan results only for problematic tweets and accounts"},"displayOnlyInYourOwnTweets":{"message":"Show scan results only for my tweets"},"displayInAllUsersTweets":{"message":"Show scan results for all users\' tweets"},"back":{"message":"Back"},"next":{"message":"Next"},"initialSetupCompleted":{"message":"Initial setup complete!
Do you want to open the usage instructions?"},"open":{"message":"Open"},"exitWithoutOpening":{"message":"Close without opening"}}')}},t={};function r(s){var n=t[s];if(void 0!==n)return n.exports;var o=t[s]={id:s,exports:{}};return e[s].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var s in t)r.o(t,s)&&!r.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nc=void 0,r(2785)})(); \ No newline at end of file + `;expand(){this.isExpanded=!0}tweetButtonClicked(){const e=new Event("tweetButtonClick",{bubbles:!0,composed:!0});this.dispatchEvent(e)}firstUpdated(e){this.onRenderedCallback&&this.onRenderedCallback(),super.firstUpdated(e)}getShowMoreButton(){return this.isExpanded?"":Ne``}getDetails(){return this.details.length?Ne`
    + ${this.details.map((e=>"string"==typeof e?Ne`
  • `:Ne` +
  • + `))} +
`:""}getNotes(){if(!this.notes.length)return"";const e=lt({"shadowban-scanner-collapsed-content":!this.isExpanded,"shadowban-scanner-message-note":!0});return this.notes.map((t=>Ne`
`))}getTweetButton(){const e=lt({"shadowban-scanner-collapsed-content":!this.isExpanded});return this.isTweetButtonShown?Ne``:""}static cancelClickEvent(e){e.stopPropagation()}render(){const e=lt({"focal-mode":this.isFocalMode,"shadowban-scanner-message":!0,"shadowban-scanner-message-no-problem":!this.isAlert});return Ne` +
+ + ${this.getShowMoreButton()} ${this.getDetails()} ${this.getNotes()} ${this.getTweetButton()} +
+ `}};Rt([le({reflect:!0})],Ut.prototype,"summary",void 0),Rt([le({reflect:!0,type:Array})],Ut.prototype,"details",void 0),Rt([le({reflect:!0,type:Array})],Ut.prototype,"notes",void 0),Rt([le({reflect:!0,type:Boolean})],Ut.prototype,"isAlert",void 0),Rt([le({reflect:!0,type:Boolean})],Ut.prototype,"isExpanded",void 0),Rt([le({reflect:!0,type:Boolean})],Ut.prototype,"isFocalMode",void 0),Rt([le({reflect:!0,type:Boolean})],Ut.prototype,"isTweetButtonShown",void 0),Rt([le({reflect:!0,type:Boolean})],Ut.prototype,"isNoteShown",void 0),Rt([le({attribute:!1,reflect:!0})],Ut.prototype,"onRenderedCallback",void 0),Rt([le({reflect:!0,type:String})],Ut.prototype,"textColor",void 0),Ut=Ot=Rt([j("sbs-message")],Ut);class Mt{sbsMessage;tweet=null;tweetText;constructor(e){const t=document.createElement("sbs-message");t.textColor=Mt.getTextColor(),t.summary=e.summary,t.isAlert=e.isAlert,t.onRenderedCallback=e.onRenderedCallback,"tweet"===e.type?(this.tweet=e.tweet,t.details=e.details,t.notes=e.notes,t.isFocalMode=e.tweet.metadata.isFocalMode,t.isExpanded=e.isExpanded,t.isTweetButtonShown=e.isTweetButtonShown,t.isNoteShown=e.isNoteShown,this.tweetText=e.tweetText):t.isExpanded=!0,t.setAttribute(v,""),t.addEventListener("tweetButtonClick",this.onTweetButtonClick.bind(this)),this.sbsMessage=t}static getTextColor(){const e=["[data-testid='User-Name'] div:first-child span","[data-testid='UserName'] div:first-child span"].join(","),t=document.querySelector(e);if(!t)throw new Error("Failed to get user name span of tweet");const{color:r}=getComputedStyle(t);return r}onTweetButtonClick(){if(!this.tweet||!this.tweetText)throw new Error("Tweet button clicked without source tweet");this.tweet.quoteTweet(this.tweetText)}insertAdjacentElement(e,t){e.insertAdjacentElement(t,this.sbsMessage)}}const jt=e=>e[Object.getOwnPropertyNames(e).filter((e=>e.startsWith("__reactProps$")))];class Lt{element;constructor(e){this.element=e}parse(){const e=jt(this.element);if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&(null!==t.children&&"object"==typeof t.children||"function"==typeof t.children)&&(void 0===t.children._owner||(null!==t.children._owner&&"object"==typeof t.children._owner||"function"==typeof t.children._owner)&&"string"==typeof t.children._owner.key)}(e))throw new Error("Type of props is invalid.");const t=this.element.querySelector("div > div");if(!t)throw new Error("Failed to get the tombstone's grandchild element.");const r=jt(t);if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[0]&&"object"==typeof t.children[0]||"function"==typeof t.children[0])&&(null!==t.children[0].props&&"object"==typeof t.children[0].props||"function"==typeof t.children[0].props)&&(null!==t.children[0].props.entry&&"object"==typeof t.children[0].props.entry||"function"==typeof t.children[0].props.entry)&&"tombstone"===t.children[0].props.entry.type&&(null!==t.children[0].props.entry.conversationPosition&&"object"==typeof t.children[0].props.entry.conversationPosition||"function"==typeof t.children[0].props.entry.conversationPosition)&&"boolean"==typeof t.children[0].props.entry.conversationPosition.showReplyContext}(r))throw new Error("Type of grandchild props is invalid.");return[e,r]}}class Bt{tweet;constructor(e){this.tweet=e}parse(){return this.tweet.props}}class Ft{settings;onMessageCallback;constructor(e,t){this.settings=e,this.onMessageCallback=t;const r=new N;r.onNewTweet((e=>{this.checkTweet(e),this.timelineObserverCallback()})),r.onNewProfile((e=>{this.checkProfile(e)}))}checkProfile(e){if(Boolean(document.querySelector("[data-testid='editProfileButton']"))&&!this.settings.enableForOtherUsersProfiles)return;const t=O(e.props);if(!t.user.hasAnyProblem&&!this.settings.showMessagesInUnproblematicProfiles)return;const r=(n=t,s=this.onMessageCallback,{...(e=>{let t=null;return t=e.user.shadowbanned?"thisUserIsShadowbanned":e.user.withheldInCountries.length?"accountIsBlockedInSomeCountries":"thisUserIsNotShadowbanned",{summary:t}})(n),isAlert:n.user.hasAnyProblem,onRenderedCallback:s,type:"profile"});var n,s;const o=new Mt(r),i=document.querySelector("[data-testid='UserDescription']")||document.querySelector("[data-testid='UserName']");if(!i)throw new Error("Failed to get user description of profile");o.insertAdjacentElement(i,"afterend")}checkTweet(e){const t=(e=>{const t=e.parse(),r=O(t.user),n=Boolean(t.possibly_sensitive),s=!(!1===t.possibly_sensitive_editable),o=n&&!s;let i="searchable";return o||r.user.shadowbanned?i="unsearchable":n&&(i="possiblyUnsearchable"),{...r,tweet:{ageRestriction:o,hasAnyProblem:"searchable"!==i||r.user.hasAnyProblem,possiblySensitive:n,searchability:i}}})(new Bt(e));if(!e.metadata.isPostedByCurrentUser&&!this.settings.enableForOtherUsersTweets)return;if(!t.tweet.hasAnyProblem&&!this.settings.showMessagesInUnproblematicTweets)return;const r=U(e,t,this.onMessageCallback,this.settings),n=new Mt(r),s=e.element.querySelector("[data-testid='analyticsButton']")?.parentElement||e.element.querySelector("div[role='group'][id]");if(!s)throw new Error("Failed to get landmark element of tweet");n.insertAdjacentElement(s,"beforebegin")}necromancer(e){e.setAttribute(g,"true");const t=(e=>{const[t,r]=e;if(!t.children._owner)return;if(r.children[0].props.entry.conversationPosition.showReplyContext)return;const{key:n}=t.children._owner;return n.split("-")[3]})(new Lt(e).parse());if(!t)return;const r=`https://twitter.com/i/status/${t}`,n=document.createElement("a");n.href=r,n.target="_blank",n.setAttribute(y,"viewTweet"),n.classList.add("shadowban-scanner-tombstone-necromancer");const s=e.querySelector("a");if(!s)throw new Error("Failed to get help link");n.style.color=getComputedStyle(s).color,s.insertAdjacentElement("afterend",n),this.onMessageCallback()}timelineObserverCallback(){const e=document.querySelectorAll(`[data-testid='cellInnerDiv']:not([${g}])`);for(const t of e)t.setAttribute(g,"true"),Boolean(t.querySelector("a[href='https://help.twitter.com/rules-and-policies/notices-on-twitter']"))&&this.necromancer(t)}}const qt={alwaysDetailedView:!1,enableForOtherUsersProfiles:!0,enableForOtherUsersTweets:!0,enableOnXPro:!0,showMessagesInUnproblematicProfiles:!0,showMessagesInUnproblematicTweets:!1,showNotesInMessages:!0,showTweetButton:!0};class Dt{translationFunction;twemojiEndpoint;constructor(e,t){this.translationFunction=e,this.twemojiEndpoint=t}convertEmojiToTwemoji(e){let t=e;for(const e of w){const r=[...e].map((e=>e.codePointAt(0)?.toString(16))).join("-"),n=`${e}`;t=t.replaceAll(e,n)}return t}translateElements(){const e=[...document.querySelectorAll(`[${y}]`)],t=document.querySelectorAll(`sbs-message[${v}]`);for(const r of t){const{shadowRoot:t}=r;if(!t)return;const n=t.querySelectorAll(`[${y}]`);e.push(...n),n.length&&r.removeAttribute(v)}e.forEach((e=>{const t=e.getAttribute(y),r=e.getAttribute("data-sb-translation-substitutions"),n=r?JSON.parse(r):null,s=function(e){const t=e;return void 0===t||"string"==typeof t||Array.isArray(t)&&t.every((e=>"string"==typeof e))}(n)?this.translationFunction(t,n):this.translationFunction(t);e.hasAttribute("data-sb-enable-twemoji")?e.innerHTML=this.convertEmojiToTwemoji(s):e.innerHTML=s,e.removeAttribute(y)}))}}(e=>{const t=new Dt(((t,r)=>{if(r){const n="string"==typeof r?[r]:r;let s=e[t].message;for(let e=0;e{t.translateElements()}))})(JSON.parse('{"manifest_description":{"message":"A browser extension that detects shadowbans on Twitter."},"accountShadowbanned":{"message":"This user may be shadowbanned, so this tweet may not appear in search results."},"accountShadowbannedAndTweetFlaggedAsSensitive":{"message":"This user may be shadowbanned so this tweet may not appear in search results. Also, this tweet is flagged as sensitive."},"accountAndTweetShadowbanned":{"message":"This tweet is age-restricted and cannot be viewed by users under the age of 18 or who are not logged in. This tweet may not appear in search results."},"accountIsBlockedInSomeCountries":{"message":"This user is blocked in some countries."},"tweetFlaggedAsSensitive":{"message":"This tweet is flagged as sensitive and will not appear in search results depending on the viewer\'s preferences."},"thisUserIsNotShadowbanned":{"message":"This user is not shadowbanned."},"thisUserIsShadowbanned":{"message":"This user may be shadowbanned and tweets may not appear in search results."},"tweetShadowbanned":{"message":"This tweet is age-restricted and cannot be viewed by users under the age of 18 or who are not logged in. This tweet may not appear in search results."},"tweetNoProblem":{"message":"No problems was found with this tweet."},"accountIsNotFlaggedAsSensitive":{"message":"✅Account is not flagged as sensitive."},"accountIsShadowbannedOrFlaggedAsSensitive":{"message":"🚫Account may be shadowbanned or flagged as sensitive."},"profileDoesNotContainSensitiveMedia":{"message":"✅Profile media is not flagged as sensitive."},"profileContainsSensitiveMedia":{"message":"🚫Profile media is flagged as sensitive."},"accountIsNotWithheldInCountries":{"message":"✅Account is not blocked in any countries (details)."},"accountIsWithheldInCountries":{"message":"🚫Account is blocked in the following country(ies) (details): $1"},"tweetIsNotFlaggedAsSensitive":{"message":"✅Tweet is not flagged as sensitive."},"tweetIsFlaggedAsSensitive":{"message":"🚫Tweet is flagged as sensitive."},"tweetIsNotAgeRestricted":{"message":"✅Tweet has no age limit."},"tweetIsAgeRestricted":{"message":"🚫Tweet has age limit."},"tweetIsSearchable":{"message":"✅Tweet will appear in search results."},"tweetMayNotBeSearchable":{"message":"⚠️Tweet may not appear in search results depending on viewer preferences."},"tweetIsNotSearchable":{"message":"🚫Tweet may not appear in search results."},"falsePositivesAndFalseNegativesOccur":{"message":"Shadowban Scanner, like other similar tools, can produce false positives and false negatives. For more information on how it works, please click here."},"translatedByAI":{"message":"Translated from Japanese to English by AI. Please notify @keita_roboin\'s DM or GitHub repository if there are any unnatural points.","description":"This field is used if the translation was done by AI. Otherwise, set this field to an empty string. Example sentence: \\"Translated from Japanese to by AI. Please notify @keita_roboin\'s DM or GitHub repository if there are any unnatural points.\\""},"showMore":{"message":"▶show more"},"tweetTheResults":{"message":"Tweet the results"},"viewTweet":{"message":"View Tweet"},"settingsWhereToDisplayCheckResults":{"message":"Where to display check results"},"settingsShowMessagesInUnproblematicTweets":{"message":"Display in non-problematic tweets"},"settingsShowMessagesInUnproblematicProfiles":{"message":"Display in non-problematic profiles"},"settingsEnableForOtherUsersTweets":{"message":"Display in other users\' tweets"},"settingsEnableForOtherUsersProfiles":{"message":"Display in other users\' profiles"},"settingsOtherSettings":{"message":"Other settings"},"settingsAlwaysDetailedView":{"message":"Always display detailed information"},"settingsShowNotesInMessages":{"message":"Display notes at the bottom of the message"},"settingsShowTweetButton":{"message":"Display buttons to tweet the results"},"settingsEnableOnXPro":{"message":"Run on X Pro"},"settingsPleaseReload":{"message":"Please reload Twitter once you have changed the settings"},"settingsPrivacyPolicy":{"message":"Privacy policy"},"settingsPrivacyPolicyURL":{"message":"https://github.com/Robot-Inventor/shadowban-scanner#privacy-policy"},"settingsOpenSourceLicenses":{"message":"Open source licenses"},"privacyPolicyPageTitle":{"message":"Privacy Policy - Shadowban Scanner"},"privacyPolicy":{"message":"Privacy Policy"},"privacyPolicyText":{"message":"As a rule, this extension performs all processing on the user\'s computer. No data is transmitted to an external server. It also does not access Twitter\'s internal API by obtaining the user\'s credentials without permission, as is the case with some extensions. Web pages not bundled in this extension are subject to their own terms of use and privacy policies."},"initialSetup":{"message":"Initial setup - Shadowban Scanner"},"shadowbanScannerHasBeenInstalled":{"message":"Shadowban Scanner installed"},"letsStartWithASimpleInitialSetup":{"message":"Let\'s start with a simple initial setup"},"pleaseSelectOneOfThem":{"message":"Please choose one. The settings can be changed later."},"displayForAllTweetsAndAccounts":{"message":"Show scan results for all tweets and accounts"},"displayOnlyForProblematicTweets":{"message":"Show scan results only for problematic tweets and accounts"},"displayOnlyInYourOwnTweets":{"message":"Show scan results only for my tweets"},"displayInAllUsersTweets":{"message":"Show scan results for all users\' tweets"},"back":{"message":"Back"},"next":{"message":"Next"},"initialSetupCompleted":{"message":"Initial setup complete!
Do you want to open the usage instructions?"},"open":{"message":"Open"},"exitWithoutOpening":{"message":"Close without opening"}}'))})(); \ No newline at end of file diff --git a/userScript/en.user.js.LICENSE.txt b/userScript/en.user.js.LICENSE.txt index 6f070593..e243996e 100644 --- a/userScript/en.user.js.LICENSE.txt +++ b/userScript/en.user.js.LICENSE.txt @@ -20,12 +20,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -/** - * @license - * Copyright 2019 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ - /** * @license * Copyright 2021 Google LLC @@ -44,12 +38,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -/** - * @license - * Copyright 2022 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ - /** * @license * Copyright 2023 Google LLC diff --git a/userScript/ja.user.js b/userScript/ja.user.js index d85cd242..cc7790dc 100644 --- a/userScript/ja.user.js +++ b/userScript/ja.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Shadowban Scanner (日本語) // @namespace https://github.com/Robot-Inventor/shadowban-scanner/ -// @version 3.1.9 +// @version 3.2.0 // @description Twitterのシャドウバンを検出する拡張機能です。 // @author Robot-Inventor (ろぼいん / @keita_roboin) // @match https://*.twitter.com/* @@ -13,28 +13,47 @@ // ==/UserScript== /*! For license information please see ja.user.js.LICENSE.txt */ -(()=>{"use strict";var e={8531:function(e,t){var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,o){function i(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.asyncQuerySelectorAll=t.asyncQuerySelector=void 0;const n=(e,t)=>new Promise((r=>{const n=e();if(n instanceof Element||n instanceof NodeList&&n.length)return void r(n);let s=null;const o=new MutationObserver((()=>{const t=e();(t instanceof Element||t instanceof NodeList&&t.length)&&(o.disconnect(),s&&clearTimeout(s),r(t))}));s=setTimeout((()=>{o.disconnect(),r(null)}),t),o.observe(document.body,{attributes:!0,childList:!0,subtree:!0})}));t.asyncQuerySelector=(e,...t)=>r(void 0,[e,...t],void 0,(function*(e,t=document,r=500){return yield n((()=>t.querySelector(e)),r)})),t.asyncQuerySelectorAll=(e,...t)=>r(void 0,[e,...t],void 0,(function*(e,t=document,r=500){var s;return null!==(s=yield n((()=>t.querySelectorAll(e)),r))&&void 0!==s?s:document.createDocumentFragment().childNodes}))},1016:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(1601),s=r.n(n),o=r(6314),i=r.n(o)()(s());i.push([e.id,".shadowban-scanner-tombstone-necromancer {\n display: inline-block;\n margin: 0 2rem;\n text-decoration: none;\n}\n\n.shadowban-scanner-tombstone-necromancer:hover {\n text-decoration: underline;\n}\n\n[data-sb-translation] {\n display: inline-block;\n min-width: 15em;\n min-height: 1em;\n border-radius: 0.25em;\n background-image: linear-gradient(90deg, transparent 40%, rgba(175, 175, 175, 0.7) 80%, transparent 100%);\n background-size: 200% 100%;\n animation: loading-animation 1.5s linear infinite;\n}\n\n@keyframes loading-animation {\n 0% {\n background-position: 200% 0%;\n opacity: 1;\n }\n 100% {\n background-position: 0% 0%;\n opacity: 1;\n }\n}\n",""]);const a=i},6314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,s,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(n)for(var a=0;a0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),r&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=r):d[2]=r),s&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=s):d[4]="".concat(s)),t.push(d))}},t}},1601:e=>{e.exports=function(e){return e[1]}},5535:(e,t,r)=>{r.r(t),r.d(t,{default:()=>y});var n=r(5072),s=r.n(n),o=r(7825),i=r.n(o),a=r(7659),l=r.n(a),c=r(5056),d=r.n(c),h=r(540),p=r.n(h),u=r(1113),m=r.n(u),f=r(1016),b={};b.styleTagTransform=m(),b.setAttributes=d(),b.insert=l().bind(null,"head"),b.domAPI=i(),b.insertStyleElement=p(),s()(f.A,b);const y=f.A&&f.A.locals?f.A.locals:void 0},5072:e=>{var t=[];function r(e){for(var r=-1,n=0;n{var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056:(e,t,r)=>{e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},7825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var s=void 0!==r.layer;s&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,s&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},41:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.INSTRUCTION_URL=t.RELEASE_NOTE_URL=t.ONBOARDING_PATH=t.ALLOWED_TWEMOJI=t.TWEMOJI_ATTRIBUTE=t.SHADOW_TRANSLATION_ATTRIBUTE=t.TRANSLATION_ATTRIBUTE=t.EVENT_GENERATOR_SETTINGS_ATTRIBUTE=t.EVENT_GENERATOR_ID=t.CHECKED_DATA_ATTRIBUTE=void 0,t.CHECKED_DATA_ATTRIBUTE="data-shadowban-checked",t.EVENT_GENERATOR_ID="shadowban-scanner-event-generator",t.EVENT_GENERATOR_SETTINGS_ATTRIBUTE="data-sb-settings",t.TRANSLATION_ATTRIBUTE="data-sb-translation",t.SHADOW_TRANSLATION_ATTRIBUTE="data-sb-shadow-translation",t.TWEMOJI_ATTRIBUTE="data-sb-enable-twemoji",t.ALLOWED_TWEMOJI=["✅","🚫","⚠️"],t.ONBOARDING_PATH="html/initialSetup.html",t.RELEASE_NOTE_URL={en:"https://roboin.io/article/2024/05/27/shadowban-scanner-reaches-over-10000-users/en/",ja:"https://roboin.io/article/2024/05/27/shadowban-scanner-reaches-over-10000-users/"},t.INSTRUCTION_URL={en:"https://roboin.io/article/2023/09/30/detect-twitter-shadowban/en/#usage",ja:"https://roboin.io/article/2023/09/30/detect-twitter-shadowban/#%E4%BD%BF%E3%81%84%E6%96%B9"}},8140:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_SETTINGS=void 0,t.DEFAULT_SETTINGS={alwaysDetailedView:!1,enableForOtherUsersProfiles:!0,enableForOtherUsersTweets:!0,showMessagesInUnproblematicProfiles:!0,showMessagesInUnproblematicTweets:!1,showNotesInMessages:!0,showTweetButton:!0}},7316:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Translator=void 0;const n=r(41),s=r(1497);t.Translator=class{constructor(e,t){this.translationFunction=e,this.twemojiEndpoint=t}convertEmojiToTwemoji(e){let t=e;for(const e of n.ALLOWED_TWEMOJI){const r=[...e].map((e=>e.codePointAt(0)?.toString(16))).join("-"),n=`${e}`;t=t.replaceAll(e,n)}return t}translateElements(){const e=[...document.querySelectorAll(`[${n.TRANSLATION_ATTRIBUTE}]`)],t=document.querySelectorAll(`sbs-message[${n.SHADOW_TRANSLATION_ATTRIBUTE}]`);for(const r of t){const{shadowRoot:t}=r;if(!t)return;const s=t.querySelectorAll(`[${n.TRANSLATION_ATTRIBUTE}]`);e.push(...s),s.length&&r.removeAttribute(n.SHADOW_TRANSLATION_ATTRIBUTE)}e.forEach((e=>{const t=e.getAttribute(n.TRANSLATION_ATTRIBUTE),r=e.getAttribute("data-sb-translation-substitutions"),o=r?JSON.parse(r):null,i=(0,s.isTranslationSubstitutions)(o)?this.translationFunction(t,o):this.translationFunction(t);e.hasAttribute(n.TWEMOJI_ATTRIBUTE)?e.innerHTML=this.convertEmojiToTwemoji(i):e.innerHTML=i,e.removeAttribute(n.TRANSLATION_ATTRIBUTE)}))}}},380:function(e,t,r){var n,s=this&&this.__decorate||function(e,t,r,n){var s,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i};Object.defineProperty(t,"__esModule",{value:!0}),t.SbsMessage=void 0,r(919);const o=r(6337),i=r(2924),a=r(2627);let l=n=class extends o.LitElement{constructor(){super(...arguments),this.summary="tweetNoProblem",this.details=[],this.notes=[],this.isAlert=!1,this.isExpanded=!1,this.isFocalMode=!1,this.isTweetButtonShown=!1,this.isNoteShown=!1,this.textColor="white"}expand(){this.isExpanded=!0}tweetButtonClicked(){const e=new Event("tweetButtonClick",{bubbles:!0,composed:!0});this.dispatchEvent(e)}firstUpdated(e){this.onRenderedCallback&&this.onRenderedCallback(),super.firstUpdated(e)}getShowMoreButton(){return this.isExpanded?"":o.html``}getDetails(){return this.details.length?o.html`
    - ${this.details.map((e=>"string"==typeof e?o.html`
  • `:o.html` -
  • - `))} -
`:""}getNotes(){if(!this.notes.length)return"";const e=(0,a.classMap)({"shadowban-scanner-collapsed-content":!this.isExpanded,"shadowban-scanner-message-note":!0});return this.notes.map((t=>o.html`
`))}getTweetButton(){const e=(0,a.classMap)({"shadowban-scanner-collapsed-content":!this.isExpanded});return this.isTweetButtonShown?o.html``:""}static cancelClickEvent(e){e.stopPropagation()}render(){const e=(0,a.classMap)({"focal-mode":this.isFocalMode,"shadowban-scanner-message":!0,"shadowban-scanner-message-no-problem":!this.isAlert});return o.html` -
- - ${this.getShowMoreButton()} ${this.getDetails()} ${this.getNotes()} ${this.getTweetButton()} -
- `}};t.SbsMessage=l,l.styles=o.css` +(()=>{"use strict";var e={531:function(e,t){var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,o){function i(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.asyncQuerySelectorAll=t.asyncQuerySelector=void 0;const n=(e,t)=>new Promise((r=>{const n=e();if(n instanceof Element||n instanceof NodeList&&n.length)return void r(n);let s=null;const o=new MutationObserver((()=>{const t=e();(t instanceof Element||t instanceof NodeList&&t.length)&&(o.disconnect(),s&&clearTimeout(s),r(t))}));s=setTimeout((()=>{o.disconnect(),r(null)}),t),o.observe(document.body,{attributes:!0,childList:!0,subtree:!0})}));t.asyncQuerySelector=(e,...t)=>r(void 0,[e,...t],void 0,(function*(e,t=document,r=500){return yield n((()=>t.querySelector(e)),r)})),t.asyncQuerySelectorAll=(e,...t)=>r(void 0,[e,...t],void 0,(function*(e,t=document,r=500){var s;return null!==(s=yield n((()=>t.querySelectorAll(e)),r))&&void 0!==s?s:document.createDocumentFragment().childNodes}))},16:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(601),s=r.n(n),o=r(314),i=r.n(o)()(s());i.push([e.id,".shadowban-scanner-tombstone-necromancer {\n display: inline-block;\n margin: 0 2rem;\n text-decoration: none;\n}\n\n.shadowban-scanner-tombstone-necromancer:hover {\n text-decoration: underline;\n}\n\n[data-sb-translation] {\n display: inline-block;\n min-width: 15em;\n min-height: 1em;\n border-radius: 0.25em;\n background-image: linear-gradient(90deg, transparent 40%, rgba(175, 175, 175, 0.7) 80%, transparent 100%);\n background-size: 200% 100%;\n animation: loading-animation 1.5s linear infinite;\n}\n\n@keyframes loading-animation {\n 0% {\n background-position: 200% 0%;\n opacity: 1;\n }\n 100% {\n background-position: 0% 0%;\n opacity: 1;\n }\n}\n",""]);const a=i},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,s,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(n)for(var a=0;a0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),r&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=r):d[2]=r),s&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=s):d[4]="".concat(s)),t.push(d))}},t}},601:e=>{e.exports=function(e){return e[1]}},72:e=>{var t=[];function r(e){for(var r=-1,n=0;n{var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},56:(e,t,r)=>{e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var s=void 0!==r.layer;s&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,s&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={id:n,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.nc=void 0;var n=r(72),s=r.n(n),o=r(825),i=r.n(o),a=r(659),l=r.n(a),c=r(56),d=r.n(c),h=r(540),p=r.n(h),u=r(113),f=r.n(u),m=r(16),b={};b.styleTagTransform=f(),b.setAttributes=d(),b.insert=l().bind(null,"head"),b.domAPI=i(),b.insertStyleElement=p(),s()(m.A,b),m.A&&m.A.locals&&m.A.locals;const g="data-shadowban-checked",v="data-sb-translation",y="data-sb-shadow-translation",w=["✅","🚫","⚠️"],_=e=>{const t=Object.getOwnPropertyNames(e).filter((e=>e.startsWith("__reactProps$")));return t.length?e[t[0]]:null};class A{profileElement;constructor(e){this.profileElement=e}get props(){const e=_(this.profileElement);if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[0]&&"object"==typeof t.children[0]||"function"==typeof t.children[0])&&(null!==t.children[0].props&&"object"==typeof t.children[0].props||"function"==typeof t.children[0].props)&&Array.isArray(t.children[0].props.children)&&(null!==t.children[0].props.children[1]&&"object"==typeof t.children[0].props.children[1]||"function"==typeof t.children[0].props.children[1])&&(null!==t.children[0].props.children[1].props&&"object"==typeof t.children[0].props.children[1].props||"function"==typeof t.children[0].props.children[1].props)&&(null!==t.children[0].props.children[1].props.user&&"object"==typeof t.children[0].props.children[1].props.user||"function"==typeof t.children[0].props.children[1].props.user)&&(void 0===t.children[0].props.children[1].props.user.possibly_sensitive||null===t.children[0].props.children[1].props.user.possibly_sensitive||!1===t.children[0].props.children[1].props.user.possibly_sensitive||!0===t.children[0].props.children[1].props.user.possibly_sensitive)&&"string"==typeof t.children[0].props.children[1].props.user.screen_name&&(""===t.children[0].props.children[1].props.user.profile_interstitial_type||"sensitive_media"===t.children[0].props.children[1].props.user.profile_interstitial_type||"fake_account"===t.children[0].props.children[1].props.user.profile_interstitial_type||"offensive_profile_content"===t.children[0].props.children[1].props.user.profile_interstitial_type||"timeout"===t.children[0].props.children[1].props.user.profile_interstitial_type)&&Array.isArray(t.children[0].props.children[1].props.user.withheld_in_countries)&&t.children[0].props.children[1].props.user.withheld_in_countries.every((e=>"string"==typeof e))}(e))throw new Error("Failed to get React props of profile");return e.children[0].props.children[1].props.user}}var S=r(531);class C{tweetElement;constructor(e){this.tweetElement=e}getMenuBar(){const e=this.tweetElement.querySelector("div[role='group'][id]");if(!e)throw new Error("Failed to get menu bar of tweet");return e}get element(){return this.tweetElement}get props(){const e=_(this.getMenuBar());if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[1]&&"object"==typeof t.children[1]||"function"==typeof t.children[1])&&(null!==t.children[1].props&&"object"==typeof t.children[1].props||"function"==typeof t.children[1].props)&&(null!==t.children[1].props.retweetWithCommentLink&&"object"==typeof t.children[1].props.retweetWithCommentLink||"function"==typeof t.children[1].props.retweetWithCommentLink)&&(null!==t.children[1].props.retweetWithCommentLink.state&&"object"==typeof t.children[1].props.retweetWithCommentLink.state||"function"==typeof t.children[1].props.retweetWithCommentLink.state)&&(null!==t.children[1].props.retweetWithCommentLink.state.quotedStatus&&"object"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus||"function"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable)&&"string"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.permalink&&(null!==t.children[1].props.retweetWithCommentLink.state.quotedStatus.user&&"object"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user||"function"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive)&&"string"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.screen_name&&(""===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"sensitive_media"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"fake_account"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"offensive_profile_content"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"timeout"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type)&&Array.isArray(t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.withheld_in_countries)&&t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.withheld_in_countries.every((e=>"string"==typeof e))}(e))throw new Error("Failed to get React props of tweet");return e.children[1].props.retweetWithCommentLink.state.quotedStatus}get metadata(){const e=this.props.user.screen_name,t=_(this.element);if(!t)throw new Error("Failed to get React props of tweet");let r=null;const n=function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&Array.isArray(t.children[0])&&(null!==t.children[0][1]&&"object"==typeof t.children[0][1]||"function"==typeof t.children[0][1])&&(null!==t.children[0][1].props&&"object"==typeof t.children[0][1].props||"function"==typeof t.children[0][1].props)&&Array.isArray(t.children[0][1].props.children)&&(null!==t.children[0][1].props.children[0]&&"object"==typeof t.children[0][1].props.children[0]||"function"==typeof t.children[0][1].props.children[0])&&(null!==t.children[0][1].props.children[0].props&&"object"==typeof t.children[0][1].props.children[0].props||"function"==typeof t.children[0][1].props.children[0].props)&&Array.isArray(t.children[0][1].props.children[0].props.children)&&(null!==t.children[0][1].props.children[0].props.children[2]&&"object"==typeof t.children[0][1].props.children[0].props.children[2]||"function"==typeof t.children[0][1].props.children[0].props.children[2])&&(null!==t.children[0][1].props.children[0].props.children[2].props&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props||"function"==typeof t.children[0][1].props.children[0].props.children[2].props)&&Array.isArray(t.children[0][1].props.children[0].props.children[2].props.children)&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7]&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7]||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7])&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7].props&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props)&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser)&&"string"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser.screen_name}(t);return function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&Array.isArray(t.children[0])&&(null!==t.children[0][1]&&"object"==typeof t.children[0][1]||"function"==typeof t.children[0][1])&&(null!==t.children[0][1].props&&"object"==typeof t.children[0][1].props||"function"==typeof t.children[0][1].props)&&Array.isArray(t.children[0][1].props.children)&&(null!==t.children[0][1].props.children[0]&&"object"==typeof t.children[0][1].props.children[0]||"function"==typeof t.children[0][1].props.children[0])&&(null!==t.children[0][1].props.children[0].props&&"object"==typeof t.children[0][1].props.children[0].props||"function"==typeof t.children[0][1].props.children[0].props)&&Array.isArray(t.children[0][1].props.children[0].props.children)&&(null!==t.children[0][1].props.children[0].props.children[1]&&"object"==typeof t.children[0][1].props.children[0].props.children[1]||"function"==typeof t.children[0][1].props.children[0].props.children[1])&&(null!==t.children[0][1].props.children[0].props.children[1].props&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props||"function"==typeof t.children[0][1].props.children[0].props.children[1].props)&&Array.isArray(t.children[0][1].props.children[0].props.children[1].props.children)&&Array.isArray(t.children[0][1].props.children[0].props.children[1].props.children[1])&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2]&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2]||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2])&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2].props&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props)&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser)&&"string"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser.screen_name}(t)&&(r=t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser.screen_name),n&&(r=t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser.screen_name),{isFocalMode:n,isPostedByCurrentUser:e===r}}async clickRetweetButton(e){const t=await(0,S.asyncQuerySelector)("[data-testid='unretweet'], [data-testid='retweet']",this.tweetElement,e);if(!t)throw new Error("Failed to get retweet button of tweet");t.click()}static async clickQuoteButton(e){const t=await(0,S.asyncQuerySelector)(["[data-testid='Dropdown'] [href='/compose/post']","[data-testid='sheetDialog'] [href='/compose/post']"].join(","),document,e);if(!t)throw new Error("Failed to get quote button of tweet");t.click()}static async getTweetTextBox(e){const t="pro.twitter.com"===location.hostname?"[role='dialog'] [data-text='true'], [role='dialog'] textarea[data-testid='tweetTextarea_0']":"[role='dialog'] [data-text='true'], textarea[data-testid='tweetTextarea_0']",r=await(0,S.asyncQuerySelector)(t,document,e);if(!r)throw new Error("Failed to get text box marker of tweet");const n="TEXTAREA"===r.tagName?r:r.parentElement;if(!n)throw new Error("Failed to get text box of tweet");return n}async quoteTweet(e,t=1e3){try{await this.clickRetweetButton(t),await C.clickQuoteButton(t);const r=await C.getTweetTextBox(t);r.innerHTML=e,r.dispatchEvent(new Event("input",{bubbles:!0}))}catch(t){const r=this.props.permalink;open(`https://twitter.com/intent/tweet?text=${encodeURIComponent(`${e}\nhttps://twitter.com${r}`)}`,"_blank")}}}const x={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var $,E=new Uint8Array(16);function k(){if(!$&&!($="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $(E)}for(var P=[],T=0;T<256;++T)P.push((T+256).toString(16).slice(1));const I=function(e,t,r){if(x.randomUUID&&!t&&!e)return x.randomUUID();var n=(e=e||{}).random||(e.rng||k)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var s=0;s<16;++s)t[r+s]=n[s];return t}return function(e,t=0){return(P[e[t+0]]+P[e[t+1]]+P[e[t+2]]+P[e[t+3]]+"-"+P[e[t+4]]+P[e[t+5]]+"-"+P[e[t+6]]+P[e[t+7]]+"-"+P[e[t+8]]+P[e[t+9]]+"-"+P[e[t+10]]+P[e[t+11]]+P[e[t+12]]+P[e[t+13]]+P[e[t+14]]+P[e[t+15]]).toLowerCase()}(n)};class N{OBSERVER_OPTIONS={childList:!0,subtree:!0};onNewTweetCallback=null;onNewProfileCallback=null;constructor(e){const t=`data-twi-ext-checked-${I()}`,r={timeoutMs:1e4,...e},n=new MutationObserver((()=>{if(this.onNewTweetCallback){const e=document.querySelectorAll(`[data-testid="tweet"]:not([${t}])`);for(const r of e)r.setAttribute(t,""),this.onNewTweetCallback(new C(r))}if(this.onNewProfileCallback){const e=document.querySelector(`:not([data-testid="tweet"]) [data-testid="UserName"]:not([${t}])`);e&&(e.setAttribute(t,""),this.onNewProfileCallback(new A(e)))}}));(0,S.asyncQuerySelector)("main",document,r.timeoutMs).then((e=>{if(!e)throw new Error("twi-ext: Failed to get main element");n.observe(e,this.OBSERVER_OPTIONS)})),(0,S.asyncQuerySelector)("#layers",document,r.timeoutMs).then((e=>{if(!e)throw new Error("twi-ext: Failed to get #layers element");n.observe(e,this.OBSERVER_OPTIONS)}))}onNewTweet(e){this.onNewTweetCallback=e}onNewProfile(e){this.onNewProfileCallback=e}}const O=e=>{const t=Boolean(e.possibly_sensitive),r=Boolean(["sensitive_media","offensive_profile_content"].includes(e.profile_interstitial_type)),n=e.withheld_in_countries,s=t||r;return{user:{hasAnyProblem:s||n.length>0,sensitiveMediaInProfile:r,shadowbanned:s,withheldInCountries:n}}},R=e=>{const t=navigator.language,r=new Intl.ListFormat(t,{style:"narrow",type:"conjunction"}),n=new Intl.DisplayNames([t],{type:"region"}),s=e.map((e=>n.of(e)||""));return r.format(s)},U=(e,t,r,n)=>{const s=(e=>{const t=(e=>e.user.shadowbanned||e.user.sensitiveMediaInProfile||Boolean(e.user.withheldInCountries.length)||e.tweet.possiblySensitive?e.user.withheldInCountries.length?"accountIsBlockedInSomeCountries":e.user.shadowbanned||e.user.sensitiveMediaInProfile?e.tweet.possiblySensitive?e.tweet.ageRestriction?"accountAndTweetShadowbanned":"accountShadowbannedAndTweetFlaggedAsSensitive":"accountShadowbanned":e.tweet.ageRestriction?"tweetShadowbanned":"tweetFlaggedAsSensitive":"tweetNoProblem")(e),r=(e=>[e.user.shadowbanned?"accountIsShadowbannedOrFlaggedAsSensitive":"accountIsNotFlaggedAsSensitive",e.user.sensitiveMediaInProfile?"profileContainsSensitiveMedia":"profileDoesNotContainSensitiveMedia",e.user.withheldInCountries.length?{messageName:"accountIsWithheldInCountries",substitutions:R(e.user.withheldInCountries)}:"accountIsNotWithheldInCountries"])(e),n=(e=>[e.tweet.possiblySensitive?"tweetIsFlaggedAsSensitive":"tweetIsNotFlaggedAsSensitive",e.tweet.ageRestriction?"tweetIsAgeRestricted":"tweetIsNotAgeRestricted",{possiblyUnsearchable:"tweetMayNotBeSearchable",searchable:"tweetIsSearchable",unsearchable:"tweetIsNotSearchable"}[e.tweet.searchability]])(e);return{details:[...r,...n],summary:t}})(t),o=(e=>{const t="searchable"===e.tweet.searchability;return`\n${e.user.shadowbanned?"🚫Account flagged as sensitive or shadowbanned":"✅Account not flagged as sensitive"}\n${e.user.sensitiveMediaInProfile?"🚫Sensitive flag on profile media":"✅No sensitive flag on profile media"}\n${e.user.withheldInCountries.length?"🚫Account blocked in some countries":"✅Account not blocked in any countries"}\n${e.tweet.possiblySensitive?"🚫Sensitive flag on tweet":"✅No sensitive flag on tweet"}\n${e.tweet.ageRestriction?"🚫Age limit on tweet":"✅No age limit on tweet"}\n${t?"✅Tweet searchable":"🚫Tweet may not be searchable"}\n\nShadowban Scanner by ろぼいん\n${navigator.language.toLowerCase().startsWith("ja")?"https://shadowban-scanner.roboin.io/ja/":"https://shadowban-scanner.roboin.io/en/"}\n `.trim()})(t);return{...s,isAlert:t.tweet.hasAnyProblem,isExpanded:n.alwaysDetailedView,isNoteShown:n.showNotesInMessages,isTweetButtonShown:n.showTweetButton,notes:["falsePositivesAndFalseNegativesOccur","translatedByAI"],onRenderedCallback:r,tweet:e,tweetText:o,type:"tweet"}};function M(e,t,r,n){var s,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;const j=e=>(t,r)=>{void 0!==r?r.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)},L=globalThis,B=L.ShadowRoot&&(void 0===L.ShadyCSS||L.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,F=Symbol(),q=new WeakMap;class W{constructor(e,t,r){if(this._$cssResult$=!0,r!==F)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(B&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=q.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&q.set(t,e))}return e}toString(){return this.cssText}}const z=(e,...t)=>{const r=1===e.length?e[0]:t.reduce(((t,r,n)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[n+1]),e[0]);return new W(r,e,F)},D=B?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return(e=>new W("string"==typeof e?e:e+"",void 0,F))(t)})(e):e,{is:H,defineProperty:V,getOwnPropertyDescriptor:G,getOwnPropertyNames:Q,getOwnPropertySymbols:K,getPrototypeOf:Y}=Object,J=globalThis,X=J.trustedTypes,Z=X?X.emptyScript:"",ee=J.reactiveElementPolyfillSupport,te=(e,t)=>e,re={toAttribute(e,t){switch(t){case Boolean:e=e?Z:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},ne=(e,t)=>!H(e,t),se={attribute:!0,type:String,converter:re,reflect:!1,hasChanged:ne};Symbol.metadata??=Symbol("metadata"),J.litPropertyMetadata??=new WeakMap;class oe extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=se){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(e,r,t);void 0!==n&&V(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){const{get:n,set:s}=G(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return n?.call(this)},set(t){const o=n?.call(this);s.call(this,t),this.requestUpdate(e,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??se}static _$Ei(){if(this.hasOwnProperty(te("elementProperties")))return;const e=Y(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(te("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(te("properties"))){const e=this.properties,t=[...Q(e),...K(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(D(e))}else void 0!==e&&t.push(D(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(B)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const r of t){const t=document.createElement("style"),n=L.litNonce;void 0!==n&&t.setAttribute("nonce",n),t.textContent=r.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EC(e,t){const r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(void 0!==n&&!0===r.reflect){const s=(void 0!==r.converter?.toAttribute?r.converter:re).toAttribute(t,r.type);this._$Em=e,null==s?this.removeAttribute(n):this.setAttribute(n,s),this._$Em=null}}_$AK(e,t){const r=this.constructor,n=r._$Eh.get(e);if(void 0!==n&&this._$Em!==n){const e=r.getPropertyOptions(n),s="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:re;this._$Em=n,this[n]=s.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){if(r??=this.constructor.getPropertyOptions(e),!(r.hasChanged??ne)(this[e],t))return;this.P(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,r){this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e)!0!==r.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],r)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}}oe.elementStyles=[],oe.shadowRootOptions={mode:"open"},oe[te("elementProperties")]=new Map,oe[te("finalized")]=new Map,ee?.({ReactiveElement:oe}),(J.reactiveElementVersions??=[]).push("2.0.4");const ie={attribute:!0,type:String,converter:re,reflect:!1,hasChanged:ne},ae=(e=ie,t,r)=>{const{kind:n,metadata:s}=r;let o=globalThis.litPropertyMetadata.get(s);if(void 0===o&&globalThis.litPropertyMetadata.set(s,o=new Map),o.set(r.name,e),"accessor"===n){const{name:n}=r;return{set(r){const s=t.get.call(this);t.set.call(this,r),this.requestUpdate(n,s,e)},init(t){return void 0!==t&&this.P(n,void 0,e),t}}}if("setter"===n){const{name:n}=r;return function(r){const s=this[n];t.call(this,r),this.requestUpdate(n,s,e)}}throw Error("Unsupported decorator location: "+n)};function le(e){return(t,r)=>"object"==typeof r?ae(e,t,r):((e,t,r)=>{const n=t.hasOwnProperty(r);return t.constructor.createProperty(r,n?{...e,wrapped:!0}:e),n?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}function ce(e){return le({...e,state:!0,attribute:!1})}const de=(e,t,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,r),r);function he(e,t){return(r,n,s)=>{const o=t=>t.renderRoot?.querySelector(e)??null;if(t){const{get:e,set:t}="object"==typeof n?r:s??(()=>{const e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return de(r,n,{get(){let r=e.call(this);return void 0===r&&(r=o(this),(null!==r||this.hasUpdated)&&t.call(this,r)),r}})}return de(r,n,{get(){return o(this)}})}}const pe=globalThis,ue=pe.trustedTypes,fe=ue?ue.createPolicy("lit-html",{createHTML:e=>e}):void 0,me="$lit$",be=`lit$${Math.random().toFixed(9).slice(2)}$`,ge="?"+be,ve=`<${ge}>`,ye=document,we=()=>ye.createComment(""),_e=e=>null===e||"object"!=typeof e&&"function"!=typeof e,Ae=Array.isArray,Se="[ \t\n\f\r]",Ce=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,xe=/-->/g,$e=/>/g,Ee=RegExp(`>|${Se}(?:([^\\s"'>=/]+)(${Se}*=${Se}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ke=/'/g,Pe=/"/g,Te=/^(?:script|style|textarea|title)$/i,Ie=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),Ne=Ie(1),Oe=(Ie(2),Ie(3),Symbol.for("lit-noChange")),Re=Symbol.for("lit-nothing"),Ue=new WeakMap,Me=ye.createTreeWalker(ye,129);function je(e,t){if(!Ae(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==fe?fe.createHTML(t):t}class Le{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let s=0,o=0;const i=e.length-1,a=this.parts,[l,c]=((e,t)=>{const r=e.length-1,n=[];let s,o=2===t?"":3===t?"":"",i=Ce;for(let t=0;t"===l[0]?(i=s??Ce,c=-1):void 0===l[1]?c=-2:(c=i.lastIndex-l[2].length,a=l[1],i=void 0===l[3]?Ee:'"'===l[3]?Pe:ke):i===Pe||i===ke?i=Ee:i===xe||i===$e?i=Ce:(i=Ee,s=void 0);const h=i===Ee&&e[t+1].startsWith("/>")?" ":"";o+=i===Ce?r+ve:c>=0?(n.push(a),r.slice(0,c)+me+r.slice(c)+be+h):r+be+(-2===c?t:h)}return[je(e,o+(e[r]||"")+(2===t?"":3===t?"":"")),n]})(e,t);if(this.el=Le.createElement(l,r),Me.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=Me.nextNode())&&a.length0){n.textContent=ue?ue.emptyScript:"";for(let r=0;rAe(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Re&&_e(this._$AH)?this._$AA.nextSibling.data=e:this.T(ye.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:r}=e,n="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=Le.createElement(je(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{const e=new Fe(n,this),r=e.u(this.options);e.p(t),this.T(r),this._$AH=e}}_$AC(e){let t=Ue.get(e.strings);return void 0===t&&Ue.set(e.strings,t=new Le(e)),t}k(e){Ae(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,n=0;for(const s of e)n===t.length?t.push(r=new qe(this.O(we()),this.O(we()),this,this.options)):r=t[n],r._$AI(s),n++;n2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=Re}_$AI(e,t=this,r,n){const s=this.strings;let o=!1;if(void 0===s)e=Be(this,e,t,0),o=!_e(e)||e!==this._$AH&&e!==Oe,o&&(this._$AH=e);else{const n=e;let i,a;for(e=s[0],i=0;i{const n=r?.renderBefore??t;let s=n._$litPart$;if(void 0===s){const e=r?.renderBefore??null;n._$litPart$=s=new qe(t.insertBefore(we(),e),e,void 0,r??{})}return s._$AI(e),s})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return Oe}}Qe._$litElement$=!0,Qe.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:Qe});const Ke=globalThis.litElementPolyfillSupport;Ke?.({LitElement:Qe}),(globalThis.litElementVersions??=[]).push("4.1.0");class Ye extends Qe{connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){return Ne``}}const Je=z`:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute;transition-duration:inherit;transition-property:inherit;transition-timing-function:inherit}:host{display:flex;pointer-events:none;transition-property:box-shadow,opacity}.shadow::before,.shadow::after{content:"";transition-property:box-shadow,opacity;--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000))}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color);opacity:.15} +`;let Xe=class extends Ye{};Xe.styles=[Je],Xe=M([j("md-elevation")],Xe);const Ze=Symbol("attachableController");let et;et=new MutationObserver((e=>{for(const t of e)t.target[Ze]?.hostConnected()}));class tt{get htmlFor(){return this.host.getAttribute("for")}set htmlFor(e){null===e?this.host.removeAttribute("for"):this.host.setAttribute("for",e)}get control(){return this.host.hasAttribute("for")?this.htmlFor&&this.host.isConnected?this.host.getRootNode().querySelector(`#${this.htmlFor}`):null:this.currentControl||this.host.parentElement}set control(e){e?this.attach(e):this.detach()}constructor(e,t){this.host=e,this.onControlChange=t,this.currentControl=null,e.addController(this),e[Ze]=this,et?.observe(e,{attributeFilter:["for"]})}attach(e){e!==this.currentControl&&(this.setCurrentControl(e),this.host.removeAttribute("for"))}detach(){this.setCurrentControl(null),this.host.setAttribute("for","")}hostConnected(){this.setCurrentControl(this.control)}hostDisconnected(){this.setCurrentControl(null)}setCurrentControl(e){this.onControlChange(this.currentControl,e),this.currentControl=e}}const rt=["focusin","focusout","pointerdown"];class nt extends Qe{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new tt(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}handleEvent(e){if(!e[st]){switch(e.type){default:return;case"focusin":this.visible=this.control?.matches(":focus-visible")??!1;break;case"focusout":case"pointerdown":this.visible=!1}e[st]=!0}}onControlChange(e,t){for(const r of rt)e?.removeEventListener(r,this),t?.addEventListener(r,this)}update(e){e.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(e)}}M([le({type:Boolean,reflect:!0})],nt.prototype,"visible",void 0),M([le({type:Boolean,reflect:!0})],nt.prototype,"inward",void 0);const st=Symbol("handledByFocusRing"),ot=z`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}} +`;let it=class extends nt{};it.styles=[ot],it=M([j("md-focus-ring")],it);class at{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this.t=e,this._$AM=t,this.i=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const lt=(e=>(...t)=>({_$litDirective$:e,values:t}))(class extends at{constructor(e){if(super(e),1!==e.type||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}const r=e.element.classList;for(const e of this.st)e in t||(r.remove(e),this.st.delete(e));for(const e in t){const n=!!t[e];n===this.st.has(e)||this.nt?.has(e)||(n?(r.add(e),this.st.add(e)):(r.remove(e),this.st.delete(e)))}return Oe}});var ct;!function(e){e[e.INACTIVE=0]="INACTIVE",e[e.TOUCH_DELAY=1]="TOUCH_DELAY",e[e.HOLDING=2]="HOLDING",e[e.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"}(ct||(ct={}));const dt=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],ht=window.matchMedia("(forced-colors: active)");class pt extends Qe{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=ct.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new tt(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const e={hovered:this.hovered,pressed:this.pressed};return Ne`
`}update(e){e.has("disabled")&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(e)}handlePointerenter(e){this.shouldReactToEvent(e)&&(this.hovered=!0)}handlePointerleave(e){this.shouldReactToEvent(e)&&(this.hovered=!1,this.state!==ct.INACTIVE&&this.endPressAnimation())}handlePointerup(e){if(this.shouldReactToEvent(e)){if(this.state!==ct.HOLDING)return this.state===ct.TOUCH_DELAY?(this.state=ct.WAITING_FOR_CLICK,void this.startPressAnimation(this.rippleStartEvent)):void 0;this.state=ct.WAITING_FOR_CLICK}}async handlePointerdown(e){if(this.shouldReactToEvent(e)){if(this.rippleStartEvent=e,!this.isTouch(e))return this.state=ct.WAITING_FOR_CLICK,void this.startPressAnimation(e);this.checkBoundsAfterContextMenu&&!this.inBounds(e)||(this.checkBoundsAfterContextMenu=!1,this.state=ct.TOUCH_DELAY,await new Promise((e=>{setTimeout(e,150)})),this.state===ct.TOUCH_DELAY&&(this.state=ct.HOLDING,this.startPressAnimation(e)))}}handleClick(){this.disabled||(this.state!==ct.WAITING_FOR_CLICK?this.state===ct.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation()):this.endPressAnimation())}handlePointercancel(e){this.shouldReactToEvent(e)&&this.endPressAnimation()}handleContextmenu(){this.disabled||(this.checkBoundsAfterContextMenu=!0,this.endPressAnimation())}determineRippleSize(){const{height:e,width:t}=this.getBoundingClientRect(),r=Math.max(e,t),n=Math.max(.35*r,75),s=Math.floor(.2*r),o=Math.sqrt(t**2+e**2)+10;this.initialSize=s,this.rippleScale=""+(o+n)/s,this.rippleSize=`${s}px`}getNormalizedPointerEventCoords(e){const{scrollX:t,scrollY:r}=window,{left:n,top:s}=this.getBoundingClientRect(),o=t+n,i=r+s,{pageX:a,pageY:l}=e;return{x:a-o,y:l-i}}getTranslationCoordinates(e){const{height:t,width:r}=this.getBoundingClientRect(),n={x:(r-this.initialSize)/2,y:(t-this.initialSize)/2};let s;return s=e instanceof PointerEvent?this.getNormalizedPointerEventCoords(e):{x:r/2,y:t/2},s={x:s.x-this.initialSize/2,y:s.y-this.initialSize/2},{startPoint:s,endPoint:n}}startPressAnimation(e){if(!this.mdRoot)return;this.pressed=!0,this.growAnimation?.cancel(),this.determineRippleSize();const{startPoint:t,endPoint:r}=this.getTranslationCoordinates(e),n=`${t.x}px, ${t.y}px`,s=`${r.x}px, ${r.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${n}) scale(1)`,`translate(${s}) scale(${this.rippleScale})`]},{pseudoElement:"::after",duration:450,easing:"cubic-bezier(0.2, 0, 0, 1)",fill:"forwards"})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=ct.INACTIVE;const e=this.growAnimation;let t=1/0;"number"==typeof e?.currentTime?t=e.currentTime:e?.currentTime&&(t=e.currentTime.to("ms").value),t>=225?this.pressed=!1:(await new Promise((e=>{setTimeout(e,225-t)})),this.growAnimation===e&&(this.pressed=!1))}shouldReactToEvent(e){if(this.disabled||!e.isPrimary)return!1;if(this.rippleStartEvent&&this.rippleStartEvent.pointerId!==e.pointerId)return!1;if("pointerenter"===e.type||"pointerleave"===e.type)return!this.isTouch(e);const t=1===e.buttons;return this.isTouch(e)||t}inBounds({x:e,y:t}){const{top:r,left:n,bottom:s,right:o}=this.getBoundingClientRect();return e>=n&&e<=o&&t>=r&&t<=s}isTouch({pointerType:e}){return"touch"===e}async handleEvent(e){if(!ht?.matches)switch(e.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(e);break;case"pointerdown":await this.handlePointerdown(e);break;case"pointerenter":this.handlePointerenter(e);break;case"pointerleave":this.handlePointerleave(e);break;case"pointerup":this.handlePointerup(e)}}onControlChange(e,t){for(const r of dt)e?.removeEventListener(r,this),t?.addEventListener(r,this)}}M([le({type:Boolean,reflect:!0})],pt.prototype,"disabled",void 0),M([ce()],pt.prototype,"hovered",void 0),M([ce()],pt.prototype,"pressed",void 0),M([he(".surface")],pt.prototype,"mdRoot",void 0);const ut=z`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms} +`;let ft=class extends pt{};ft.styles=[ut],ft=M([j("md-ripple")],ft);const mt=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText"],bt=mt.map(vt);function gt(e){return bt.includes(e)}function vt(e){return e.replace("aria","aria-").replace(/Elements?/g,"").toLowerCase()}const yt=Symbol("privateIgnoreAttributeChangesFor");function wt(e){return`data-${e}`}function _t(e){return e.replace(/-\w/,(e=>e[1].toUpperCase()))}const At=Symbol("internals"),St=Symbol("privateInternals");let Ct=!1;const xt=function(e){var t;class r extends e{constructor(){super(...arguments),this[t]=new Set}attributeChangedCallback(e,t,r){if(!gt(e))return void super.attributeChangedCallback(e,t,r);if(this[yt].has(e))return;this[yt].add(e),this.removeAttribute(e),this[yt].delete(e);const n=_t(e);null===r?delete this.dataset[n]:this.dataset[n]=r,this.requestUpdate(_t(e),t)}getAttribute(e){return gt(e)?super.getAttribute(wt(e)):super.getAttribute(e)}removeAttribute(e){super.removeAttribute(e),gt(e)&&(super.removeAttribute(wt(e)),this.requestUpdate())}}return t=yt,function(e){for(const t of mt){const r=vt(t),n=wt(r),s=_t(r);e.createProperty(t,{attribute:r,noAccessor:!0}),e.createProperty(Symbol(n),{attribute:n,noAccessor:!0}),Object.defineProperty(e.prototype,t,{configurable:!0,enumerable:!0,get(){return this.dataset[s]??null},set(e){const r=this.dataset[s]??null;e!==r&&(null===e?delete this.dataset[s]:this.dataset[s]=e,this.requestUpdate(t,r))}})}}(r),r}(($t=Qe,class extends $t{get[At](){return this[St]||(this[St]=this.attachInternals()),this[St]}}));var $t;class Et extends xt{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[At].form}constructor(){super(),this.disabled=!1,this.softDisabled=!1,this.href="",this.target="",this.trailingIcon=!1,this.hasIcon=!1,this.type="submit",this.value="",this.addEventListener("click",this.handleClick.bind(this))}focus(){this.buttonElement?.focus()}blur(){this.buttonElement?.blur()}render(){const e=!this.href&&(this.disabled||this.softDisabled),t=this.href?this.renderLink():this.renderButton(),r=this.href?"link":"button";return Ne` + ${this.renderElevationOrOutline?.()} +
+ + + ${t} + `}renderButton(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return Ne``}renderLink(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return Ne`${this.renderContent()} + `}renderContent(){const e=Ne``;return Ne` + + ${this.trailingIcon?Re:e} + + ${this.trailingIcon?e:Re} + `}handleClick(e){if(!this.href&&this.softDisabled)return e.stopImmediatePropagation(),void e.preventDefault();(function(e){return e.currentTarget===e.target&&e.composedPath()[0]===e.target&&!e.target.disabled&&!function(e){const t=Ct;return t&&(e.preventDefault(),e.stopImmediatePropagation()),async function(){Ct=!0,await null,Ct=!1}(),t}(e)})(e)&&this.buttonElement&&(this.focus(),function(e){const t=new MouseEvent("click",{bubbles:!0});e.dispatchEvent(t)}(this.buttonElement))}handleSlotChange(){this.hasIcon=this.assignedIcons.length>0}}Et.addInitializer((e=>{const t=e;t.addEventListener("click",(async e=>{const{type:r,[At]:n}=t,{form:s}=n;s&&"button"!==r&&(await new Promise((e=>{setTimeout(e)})),e.defaultPrevented||("reset"!==r?(s.addEventListener("submit",(e=>{Object.defineProperty(e,"submitter",{configurable:!0,enumerable:!0,get:()=>t})}),{capture:!0,once:!0}),n.setFormValue(t.value),s.requestSubmit()):s.reset()))}))})),Et.formAssociated=!0,Et.shadowRootOptions={mode:"open",delegatesFocus:!0},M([le({type:Boolean,reflect:!0})],Et.prototype,"disabled",void 0),M([le({type:Boolean,attribute:"soft-disabled",reflect:!0})],Et.prototype,"softDisabled",void 0),M([le()],Et.prototype,"href",void 0),M([le()],Et.prototype,"target",void 0),M([le({type:Boolean,attribute:"trailing-icon",reflect:!0})],Et.prototype,"trailingIcon",void 0),M([le({type:Boolean,attribute:"has-icon",reflect:!0})],Et.prototype,"hasIcon",void 0),M([le()],Et.prototype,"type",void 0),M([le({reflect:!0})],Et.prototype,"value",void 0),M([he(".button")],Et.prototype,"buttonElement",void 0),M([function(e){return(t,r)=>{const{slot:n,selector:s}=e??{},o="slot"+(n?`[name=${n}]`:":not([name])");return de(t,r,{get(){const t=this.renderRoot?.querySelector(o),r=t?.assignedElements(e)??[];return void 0===s?r:r.filter((e=>e.matches(s)))}})}}({slot:"icon",flatten:!0})],Et.prototype,"assignedIcons",void 0);class kt extends Et{renderElevationOrOutline(){return Ne``}}const Pt=z`:host{--_container-color: var(--md-filled-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-elevation: var(--md-filled-button-container-elevation, 0);--_container-height: var(--md-filled-button-container-height, 40px);--_container-shadow-color: var(--md-filled-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-button-focus-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-container-elevation: var(--md-filled-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-button-hover-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-button-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-filled-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-button-pressed-label-text-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-color: var(--md-filled-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_container-shape-start-start: var(--md-filled-button-container-shape-start-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-button-container-shape-start-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-button-container-shape-end-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-button-container-shape-end-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-button-leading-space, 24px);--_trailing-space: var(--md-filled-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-button-with-trailing-icon-trailing-space, 16px)} +`,Tt=z`md-elevation{transition-duration:280ms}:host(:is([disabled],[soft-disabled])) md-elevation{transition:none}md-elevation{--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}:host(:focus-within) md-elevation{--md-elevation-level: var(--_focus-container-elevation)}:host(:hover) md-elevation{--md-elevation-level: var(--_hover-container-elevation)}:host(:active) md-elevation{--md-elevation-level: var(--_pressed-container-elevation)}:host(:is([disabled],[soft-disabled])) md-elevation{--md-elevation-level: var(--_disabled-container-elevation)} +`,It=z`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background-color:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host(:is([disabled],[soft-disabled])) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host(:is([disabled],[soft-disabled])) .background{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host(:is([disabled],[soft-disabled])) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none} +`;let Nt=class extends kt{};Nt.styles=[It,Tt,Pt],Nt=M([j("md-filled-button")],Nt);var Ot,Rt=function(e,t,r,n){var s,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i};let Ut=class extends Qe{static{Ot=this}summary="tweetNoProblem";details=[];notes=[];isAlert=!1;isExpanded=!1;isFocalMode=!1;isTweetButtonShown=!1;isNoteShown=!1;onRenderedCallback;textColor="white";static styles=z` * { font-family: sans-serif; } @@ -128,44 +147,25 @@ opacity: 1; } } - `,s([(0,i.property)({reflect:!0})],l.prototype,"summary",void 0),s([(0,i.property)({reflect:!0,type:Array})],l.prototype,"details",void 0),s([(0,i.property)({reflect:!0,type:Array})],l.prototype,"notes",void 0),s([(0,i.property)({reflect:!0,type:Boolean})],l.prototype,"isAlert",void 0),s([(0,i.property)({reflect:!0,type:Boolean})],l.prototype,"isExpanded",void 0),s([(0,i.property)({reflect:!0,type:Boolean})],l.prototype,"isFocalMode",void 0),s([(0,i.property)({reflect:!0,type:Boolean})],l.prototype,"isTweetButtonShown",void 0),s([(0,i.property)({reflect:!0,type:Boolean})],l.prototype,"isNoteShown",void 0),s([(0,i.property)({attribute:!1,reflect:!0})],l.prototype,"onRenderedCallback",void 0),s([(0,i.property)({reflect:!0,type:String})],l.prototype,"textColor",void 0),t.SbsMessage=l=n=s([(0,i.customElement)("sbs-message")],l)},6911:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Core=void 0;const n=r(41),s=r(4114),o=r(1520),i=r(902),a=r(3114),l=r(8700),c=r(2634);t.Core=class{constructor(e,t){this.settings=e,this.onMessageCallback=t;const r=new s.Timeline;r.onNewTweet((e=>{this.checkTweet(e),this.timelineObserverCallback()})),r.onNewProfile((e=>{this.checkProfile(e)}))}checkProfile(e){if(Boolean(document.querySelector("[data-testid='editProfileButton']"))&&!this.settings.enableForOtherUsersProfiles)return;const t=i.PropsAnalyzer.analyzeProfileProps(e.props);if(!t.user.hasAnyProblem&&!this.settings.showMessagesInUnproblematicProfiles)return;const r=o.MessageDataGenerator.generateForProfile(t,this.onMessageCallback),n=new a.SbsMessageWrapper(r),s=document.querySelector("[data-testid='UserDescription']")||document.querySelector("[data-testid='UserName']");if(!s)throw new Error("Failed to get user description of profile");n.insertAdjacentElement(s,"afterend")}checkTweet(e){const t=i.PropsAnalyzer.analyzeTweetProps(new c.TweetParser(e));if(!e.metadata.isPostedByCurrentUser&&!this.settings.enableForOtherUsersTweets)return;if(!t.tweet.hasAnyProblem&&!this.settings.showMessagesInUnproblematicTweets)return;const r=o.MessageDataGenerator.generateForTweet(e,t,this.onMessageCallback,this.settings),n=new a.SbsMessageWrapper(r),s=e.element.querySelector("[data-testid='analyticsButton']")?.parentElement||e.element.querySelector("div[role='group'][id]");if(!s)throw new Error("Failed to get landmark element of tweet");n.insertAdjacentElement(s,"beforebegin")}necromancer(e){e.setAttribute(n.CHECKED_DATA_ATTRIBUTE,"true");const t=i.PropsAnalyzer.analyzeTombstoneProps(new l.TombstoneParser(e).parse());if(!t)return;const r=`https://twitter.com/i/status/${t}`,s=document.createElement("a");s.href=r,s.target="_blank",s.setAttribute(n.TRANSLATION_ATTRIBUTE,"viewTweet"),s.classList.add("shadowban-scanner-tombstone-necromancer");const o=e.querySelector("a");if(!o)throw new Error("Failed to get help link");s.style.color=getComputedStyle(o).color,o.insertAdjacentElement("afterend",s),this.onMessageCallback()}timelineObserverCallback(){const e=document.querySelectorAll(`[data-testid='cellInnerDiv']:not([${n.CHECKED_DATA_ATTRIBUTE}])`);for(const t of e)t.setAttribute(n.CHECKED_DATA_ATTRIBUTE,"true"),Boolean(t.querySelector("a[href='https://help.twitter.com/rules-and-policies/notices-on-twitter']"))&&this.necromancer(t)}}},1520:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MessageDataGenerator=void 0;const n=r(8197),s=r(6219);t.MessageDataGenerator=class{static generateForProfile(e,t){return{...s.TranslationKeyProvider.fromProfileAnalyzer(e),isAlert:e.user.hasAnyProblem,onRenderedCallback:t,type:"profile"}}static generateForTweet(e,t,r,o){const i=s.TranslationKeyProvider.fromTweetAnalyzer(t),a=n.ShareTextGenerator.generateShareText(t);return{...i,isAlert:t.tweet.hasAnyProblem,isExpanded:o.alwaysDetailedView,isNoteShown:o.showNotesInMessages,isTweetButtonShown:o.showTweetButton,notes:["falsePositivesAndFalseNegativesOccur","translatedByAI"],onRenderedCallback:r,tweet:e,tweetText:a,type:"tweet"}}}},8700:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TombstoneParser=void 0;const n=r(2632),s=r(543);t.TombstoneParser=class{constructor(e){this.element=e}parse(){const e=(0,s.getReactProps)(this.element);if(!(0,n.isCellInnerDivProps)(e))throw new Error("Type of props is invalid.");const t=this.element.querySelector("div > div");if(!t)throw new Error("Failed to get the tombstone's grandchild element.");const r=(0,s.getReactProps)(t);if(!(0,n.isTombstoneGrandchildProps)(r))throw new Error("Type of grandchild props is invalid.");return[e,r]}}},2634:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TweetParser=void 0,t.TweetParser=class{constructor(e){this.tweet=e}parse(){return this.tweet.props}}},543:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getReactProps=void 0,t.getReactProps=e=>e[Object.getOwnPropertyNames(e).filter((e=>e.startsWith("__reactProps$")))]},902:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropsAnalyzer=void 0;class r{static analyzeProfileProps(e){const t=Boolean(e.possibly_sensitive),r=Boolean(["sensitive_media","offensive_profile_content"].includes(e.profile_interstitial_type)),n=e.withheld_in_countries,s=t||r;return{user:{hasAnyProblem:s||n.length>0,sensitiveMediaInProfile:r,shadowbanned:s,withheldInCountries:n}}}static analyzeTweetProps(e){const t=e.parse(),n=r.analyzeProfileProps(t.user),s=Boolean(t.possibly_sensitive),o=!(!1===t.possibly_sensitive_editable),i=s&&!o;let a="searchable";return i||n.user.shadowbanned?a="unsearchable":s&&(a="possiblyUnsearchable"),{...n,tweet:{ageRestriction:i,hasAnyProblem:"searchable"!==a||n.user.hasAnyProblem,possiblySensitive:s,searchability:a}}}static analyzeTombstoneProps(e){const[t,r]=e;if(!t.children._owner)return;if(r.children[0].props.entry.conversationPosition.showReplyContext)return;const{key:n}=t.children._owner;return n.split("-")[3]}}t.PropsAnalyzer=r},3114:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SbsMessageWrapper=void 0,r(380);const n=r(41);class s{constructor(e){this.tweet=null;const t=document.createElement("sbs-message");if(t.textColor=s.getTextColor(),t.summary=e.summary,t.isAlert=e.isAlert,t.onRenderedCallback=e.onRenderedCallback,"tweet"===e.type){if(!e.tweet)throw new Error("Tweet data is missing");this.tweet=e.tweet,t.details=e.details,t.notes=e.notes,t.isFocalMode=e.tweet.metadata.isFocalMode,t.isExpanded=e.isExpanded,t.isTweetButtonShown=e.isTweetButtonShown,t.isNoteShown=e.isNoteShown,this.tweetText=e.tweetText}else t.isExpanded=!0;t.setAttribute(n.SHADOW_TRANSLATION_ATTRIBUTE,""),t.addEventListener("tweetButtonClick",this.onTweetButtonClick.bind(this)),this.sbsMessage=t}static getTextColor(){const e=["[data-testid='User-Name'] div:first-child span","[data-testid='UserName'] div:first-child span"].join(","),t=document.querySelector(e);if(!t)throw new Error("Failed to get user name span of tweet");const{color:r}=getComputedStyle(t);return r}onTweetButtonClick(){if(!this.tweet||!this.tweetText)throw new Error("Tweet button clicked without source tweet");this.tweet.quoteTweet(this.tweetText)}insertAdjacentElement(e,t){e.insertAdjacentElement(t,this.sbsMessage)}}t.SbsMessageWrapper=s},8197:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ShareTextGenerator=void 0,t.ShareTextGenerator=class{static generateShareText(e){const t="searchable"===e.tweet.searchability;return`\n${e.user.shadowbanned?"🚫Account flagged as sensitive or shadowbanned":"✅Account not flagged as sensitive"}\n${e.user.sensitiveMediaInProfile?"🚫Sensitive flag on profile media":"✅No sensitive flag on profile media"}\n${e.user.withheldInCountries.length?"🚫Account blocked in some countries":"✅Account not blocked in any countries"}\n${e.tweet.possiblySensitive?"🚫Sensitive flag on tweet":"✅No sensitive flag on tweet"}\n${e.tweet.ageRestriction?"🚫Age limit on tweet":"✅No age limit on tweet"}\n${t?"✅Tweet searchable":"🚫Tweet may not be searchable"}\n\nShadowban Scanner by ろぼいん\n${navigator.language.toLowerCase().startsWith("ja")?"https://shadowban-scanner.roboin.io/ja/":"https://shadowban-scanner.roboin.io/en/"}\n `.trim()}}},6219:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TranslationKeyProvider=void 0;class r{static fromProfileAnalyzer(e){let t=null;return t=e.user.shadowbanned?"thisUserIsShadowbanned":e.user.withheldInCountries.length?"accountIsBlockedInSomeCountries":"thisUserIsNotShadowbanned",{summary:t}}static summarizeForTweet(e){return e.user.shadowbanned||e.user.sensitiveMediaInProfile||Boolean(e.user.withheldInCountries.length)||e.tweet.possiblySensitive?e.user.withheldInCountries.length?"accountIsBlockedInSomeCountries":e.user.shadowbanned||e.user.sensitiveMediaInProfile?e.tweet.possiblySensitive?e.tweet.ageRestriction?"accountAndTweetShadowbanned":"accountShadowbannedAndTweetFlaggedAsSensitive":"accountShadowbanned":e.tweet.ageRestriction?"tweetShadowbanned":"tweetFlaggedAsSensitive":"tweetNoProblem"}static formatCountryList(e){const t=navigator.language,r=new Intl.ListFormat(t,{style:"narrow",type:"conjunction"}),n=new Intl.DisplayNames([t],{type:"region"}),s=e.map((e=>n.of(e)||""));return r.format(s)}static getAccountDetails(e){return[e.user.shadowbanned?"accountIsShadowbannedOrFlaggedAsSensitive":"accountIsNotFlaggedAsSensitive",e.user.sensitiveMediaInProfile?"profileContainsSensitiveMedia":"profileDoesNotContainSensitiveMedia",e.user.withheldInCountries.length?{messageName:"accountIsWithheldInCountries",substitutions:r.formatCountryList(e.user.withheldInCountries)}:"accountIsNotWithheldInCountries"]}static getTweetDetails(e){return[e.tweet.possiblySensitive?"tweetIsFlaggedAsSensitive":"tweetIsNotFlaggedAsSensitive",e.tweet.ageRestriction?"tweetIsAgeRestricted":"tweetIsNotAgeRestricted",{possiblyUnsearchable:"tweetMayNotBeSearchable",searchable:"tweetIsSearchable",unsearchable:"tweetIsNotSearchable"}[e.tweet.searchability]]}static fromTweetAnalyzer(e){const t=r.summarizeForTweet(e);return{details:[...r.getAccountDetails(e),...r.getTweetDetails(e)],summary:t}}}t.TranslationKeyProvider=r},5275:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(5540),o=n(r(6556));new s.UserScriptBase(o.default)},5540:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UserScriptBase=void 0,r(5535);const n=r(6911),s=r(8140),o=r(7316);t.UserScriptBase=class{constructor(e){const t=new o.Translator(((t,r)=>{if(r){const n="string"==typeof r?[r]:r;let s=e[t].message;for(let e=0;e{t.translateElements()}))}}},1497:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isTranslationSubstitutions=function(e){const t=e;return void 0===t||"string"==typeof t||Array.isArray(t)&&t.every((e=>"string"==typeof e))}},2632:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isCellInnerDivProps=function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&(null!==t.children&&"object"==typeof t.children||"function"==typeof t.children)&&(void 0===t.children._owner||(null!==t.children._owner&&"object"==typeof t.children._owner||"function"==typeof t.children._owner)&&"string"==typeof t.children._owner.key)},t.isTombstoneGrandchildProps=function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[0]&&"object"==typeof t.children[0]||"function"==typeof t.children[0])&&(null!==t.children[0].props&&"object"==typeof t.children[0].props||"function"==typeof t.children[0].props)&&(null!==t.children[0].props.entry&&"object"==typeof t.children[0].props.entry||"function"==typeof t.children[0].props.entry)&&"tombstone"===t.children[0].props.entry.type&&(null!==t.children[0].props.entry.conversationPosition&&"object"==typeof t.children[0].props.entry.conversationPosition||"function"==typeof t.children[0].props.entry.conversationPosition)&&"boolean"==typeof t.children[0].props.entry.conversationPosition.showReplyContext}},842:(e,t,r)=>{r.d(t,{BO:()=>a,mN:()=>C,Rf:()=>d,AH:()=>c,W3:()=>S,sk:()=>h,Ec:()=>T,qM:()=>s,iz:()=>l});const n=globalThis,s=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),i=new WeakMap;class a{constructor(e,t,r){if(this._$cssResult$=!0,r!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(s&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=i.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&i.set(t,e))}return e}toString(){return this.cssText}}const l=e=>new a("string"==typeof e?e:e+"",void 0,o),c=(e,...t)=>{const r=1===e.length?e[0]:t.reduce(((t,r,n)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[n+1]),e[0]);return new a(r,e,o)},d=(e,t)=>{if(s)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const r of t){const t=document.createElement("style"),s=n.litNonce;void 0!==s&&t.setAttribute("nonce",s),t.textContent=r.cssText,e.appendChild(t)}},h=s?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return l(t)})(e):e,{is:p,defineProperty:u,getOwnPropertyDescriptor:m,getOwnPropertyNames:f,getOwnPropertySymbols:b,getPrototypeOf:y}=Object,g=globalThis,v=g.trustedTypes,w=v?v.emptyScript:"",_=g.reactiveElementPolyfillSupport,A=(e,t)=>e,S={toAttribute(e,t){switch(t){case Boolean:e=e?w:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},T=(e,t)=>!p(e,t),E={attribute:!0,type:String,converter:S,reflect:!1,hasChanged:T};Symbol.metadata??=Symbol("metadata"),g.litPropertyMetadata??=new WeakMap;class C extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=E){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(e,r,t);void 0!==n&&u(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){const{get:n,set:s}=m(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return n?.call(this)},set(t){const o=n?.call(this);s.call(this,t),this.requestUpdate(e,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??E}static _$Ei(){if(this.hasOwnProperty(A("elementProperties")))return;const e=y(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(A("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(A("properties"))){const e=this.properties,t=[...f(e),...b(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(h(e))}else void 0!==e&&t.push(h(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return d(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EC(e,t){const r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(void 0!==n&&!0===r.reflect){const s=(void 0!==r.converter?.toAttribute?r.converter:S).toAttribute(t,r.type);this._$Em=e,null==s?this.removeAttribute(n):this.setAttribute(n,s),this._$Em=null}}_$AK(e,t){const r=this.constructor,n=r._$Eh.get(e);if(void 0!==n&&this._$Em!==n){const e=r.getPropertyOptions(n),s="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:S;this._$Em=n,this[n]=s.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){if(r??=this.constructor.getPropertyOptions(e),!(r.hasChanged??T)(this[e],t))return;this.P(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,r){this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e)!0!==r.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],r)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}}C.elementStyles=[],C.shadowRootOptions={mode:"open"},C[A("elementProperties")]=new Map,C[A("finalized")]=new Map,_?.({ReactiveElement:C}),(g.reactiveElementVersions??=[]).push("2.0.4")},919:(e,t,r)=>{function n(e,t,r,n){var s,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}r.r(t),r.d(t,{MdFilledButton:()=>W}),Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var s=r(2924),o=r(6337);class i extends o.LitElement{connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){return o.html``}}const a=o.css`:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute;transition-duration:inherit;transition-property:inherit;transition-timing-function:inherit}:host{display:flex;pointer-events:none;transition-property:box-shadow,opacity}.shadow::before,.shadow::after{content:"";transition-property:box-shadow,opacity;--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000))}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color);opacity:.15} -`;let l=class extends i{};l.styles=[a],l=n([(0,s.customElement)("md-elevation")],l);const c=Symbol("attachableController");let d;o.isServer||(d=new MutationObserver((e=>{for(const t of e)t.target[c]?.hostConnected()})));class h{get htmlFor(){return this.host.getAttribute("for")}set htmlFor(e){null===e?this.host.removeAttribute("for"):this.host.setAttribute("for",e)}get control(){return this.host.hasAttribute("for")?this.htmlFor&&this.host.isConnected?this.host.getRootNode().querySelector(`#${this.htmlFor}`):null:this.currentControl||this.host.parentElement}set control(e){e?this.attach(e):this.detach()}constructor(e,t){this.host=e,this.onControlChange=t,this.currentControl=null,e.addController(this),e[c]=this,d?.observe(e,{attributeFilter:["for"]})}attach(e){e!==this.currentControl&&(this.setCurrentControl(e),this.host.removeAttribute("for"))}detach(){this.setCurrentControl(null),this.host.setAttribute("for","")}hostConnected(){this.setCurrentControl(this.control)}hostDisconnected(){this.setCurrentControl(null)}setCurrentControl(e){this.onControlChange(this.currentControl,e),this.currentControl=e}}const p=["focusin","focusout","pointerdown"];class u extends o.LitElement{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new h(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}handleEvent(e){if(!e[m]){switch(e.type){default:return;case"focusin":this.visible=this.control?.matches(":focus-visible")??!1;break;case"focusout":case"pointerdown":this.visible=!1}e[m]=!0}}onControlChange(e,t){if(!o.isServer)for(const r of p)e?.removeEventListener(r,this),t?.addEventListener(r,this)}update(e){e.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(e)}}n([(0,s.property)({type:Boolean,reflect:!0})],u.prototype,"visible",void 0),n([(0,s.property)({type:Boolean,reflect:!0})],u.prototype,"inward",void 0);const m=Symbol("handledByFocusRing"),f=o.css`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}} -`;let b=class extends u{};b.styles=[f],b=n([(0,s.customElement)("md-focus-ring")],b);var y=r(2627);var g;!function(e){e[e.INACTIVE=0]="INACTIVE",e[e.TOUCH_DELAY=1]="TOUCH_DELAY",e[e.HOLDING=2]="HOLDING",e[e.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"}(g||(g={}));const v=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],w=o.isServer?null:window.matchMedia("(forced-colors: active)");class _ extends o.LitElement{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=g.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new h(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const e={hovered:this.hovered,pressed:this.pressed};return o.html`
`}update(e){e.has("disabled")&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(e)}handlePointerenter(e){this.shouldReactToEvent(e)&&(this.hovered=!0)}handlePointerleave(e){this.shouldReactToEvent(e)&&(this.hovered=!1,this.state!==g.INACTIVE&&this.endPressAnimation())}handlePointerup(e){if(this.shouldReactToEvent(e)){if(this.state!==g.HOLDING)return this.state===g.TOUCH_DELAY?(this.state=g.WAITING_FOR_CLICK,void this.startPressAnimation(this.rippleStartEvent)):void 0;this.state=g.WAITING_FOR_CLICK}}async handlePointerdown(e){if(this.shouldReactToEvent(e)){if(this.rippleStartEvent=e,!this.isTouch(e))return this.state=g.WAITING_FOR_CLICK,void this.startPressAnimation(e);this.checkBoundsAfterContextMenu&&!this.inBounds(e)||(this.checkBoundsAfterContextMenu=!1,this.state=g.TOUCH_DELAY,await new Promise((e=>{setTimeout(e,150)})),this.state===g.TOUCH_DELAY&&(this.state=g.HOLDING,this.startPressAnimation(e)))}}handleClick(){this.disabled||(this.state!==g.WAITING_FOR_CLICK?this.state===g.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation()):this.endPressAnimation())}handlePointercancel(e){this.shouldReactToEvent(e)&&this.endPressAnimation()}handleContextmenu(){this.disabled||(this.checkBoundsAfterContextMenu=!0,this.endPressAnimation())}determineRippleSize(){const{height:e,width:t}=this.getBoundingClientRect(),r=Math.max(e,t),n=Math.max(.35*r,75),s=Math.floor(.2*r),o=Math.sqrt(t**2+e**2)+10;this.initialSize=s,this.rippleScale=""+(o+n)/s,this.rippleSize=`${s}px`}getNormalizedPointerEventCoords(e){const{scrollX:t,scrollY:r}=window,{left:n,top:s}=this.getBoundingClientRect(),o=t+n,i=r+s,{pageX:a,pageY:l}=e;return{x:a-o,y:l-i}}getTranslationCoordinates(e){const{height:t,width:r}=this.getBoundingClientRect(),n={x:(r-this.initialSize)/2,y:(t-this.initialSize)/2};let s;return s=e instanceof PointerEvent?this.getNormalizedPointerEventCoords(e):{x:r/2,y:t/2},s={x:s.x-this.initialSize/2,y:s.y-this.initialSize/2},{startPoint:s,endPoint:n}}startPressAnimation(e){if(!this.mdRoot)return;this.pressed=!0,this.growAnimation?.cancel(),this.determineRippleSize();const{startPoint:t,endPoint:r}=this.getTranslationCoordinates(e),n=`${t.x}px, ${t.y}px`,s=`${r.x}px, ${r.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${n}) scale(1)`,`translate(${s}) scale(${this.rippleScale})`]},{pseudoElement:"::after",duration:450,easing:"cubic-bezier(0.2, 0, 0, 1)",fill:"forwards"})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=g.INACTIVE;const e=this.growAnimation;let t=1/0;"number"==typeof e?.currentTime?t=e.currentTime:e?.currentTime&&(t=e.currentTime.to("ms").value),t>=225?this.pressed=!1:(await new Promise((e=>{setTimeout(e,225-t)})),this.growAnimation===e&&(this.pressed=!1))}shouldReactToEvent(e){if(this.disabled||!e.isPrimary)return!1;if(this.rippleStartEvent&&this.rippleStartEvent.pointerId!==e.pointerId)return!1;if("pointerenter"===e.type||"pointerleave"===e.type)return!this.isTouch(e);const t=1===e.buttons;return this.isTouch(e)||t}inBounds({x:e,y:t}){const{top:r,left:n,bottom:s,right:o}=this.getBoundingClientRect();return e>=n&&e<=o&&t>=r&&t<=s}isTouch({pointerType:e}){return"touch"===e}async handleEvent(e){if(!w?.matches)switch(e.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(e);break;case"pointerdown":await this.handlePointerdown(e);break;case"pointerenter":this.handlePointerenter(e);break;case"pointerleave":this.handlePointerleave(e);break;case"pointerup":this.handlePointerup(e)}}onControlChange(e,t){if(!o.isServer)for(const r of v)e?.removeEventListener(r,this),t?.addEventListener(r,this)}}n([(0,s.property)({type:Boolean,reflect:!0})],_.prototype,"disabled",void 0),n([(0,s.state)()],_.prototype,"hovered",void 0),n([(0,s.state)()],_.prototype,"pressed",void 0),n([(0,s.query)(".surface")],_.prototype,"mdRoot",void 0);const A=o.css`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms} -`;let S=class extends _{};S.styles=[A],S=n([(0,s.customElement)("md-ripple")],S);const T=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText"],E=T.map($);function C(e){return E.includes(e)}function $(e){return e.replace("aria","aria-").replace(/Elements?/g,"").toLowerCase()}const x=Symbol("privateIgnoreAttributeChangesFor");function P(e){return`data-${e}`}function I(e){return e.replace(/-\w/,(e=>e[1].toUpperCase()))}const k=Symbol("internals"),R=Symbol("privateInternals");let O=!1;const N=function(e){var t;if(o.isServer)return e;class r extends e{constructor(){super(...arguments),this[t]=new Set}attributeChangedCallback(e,t,r){if(!C(e))return void super.attributeChangedCallback(e,t,r);if(this[x].has(e))return;this[x].add(e),this.removeAttribute(e),this[x].delete(e);const n=I(e);null===r?delete this.dataset[n]:this.dataset[n]=r,this.requestUpdate(I(e),t)}getAttribute(e){return C(e)?super.getAttribute(P(e)):super.getAttribute(e)}removeAttribute(e){super.removeAttribute(e),C(e)&&(super.removeAttribute(P(e)),this.requestUpdate())}}return t=x,function(e){for(const t of T){const r=$(t),n=P(r),s=I(r);e.createProperty(t,{attribute:r,noAccessor:!0}),e.createProperty(Symbol(n),{attribute:n,noAccessor:!0}),Object.defineProperty(e.prototype,t,{configurable:!0,enumerable:!0,get(){return this.dataset[s]??null},set(e){const r=this.dataset[s]??null;e!==r&&(null===e?delete this.dataset[s]:this.dataset[s]=e,this.requestUpdate(t,r))}})}}(r),r}((M=o.LitElement,class extends M{get[k](){return this[R]||(this[R]=this.attachInternals()),this[R]}}));var M,U;class L extends N{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[k].form}constructor(){super(),this.disabled=!1,this.softDisabled=!1,this.href="",this.target="",this.trailingIcon=!1,this.hasIcon=!1,this.type="submit",this.value="",o.isServer||this.addEventListener("click",this.handleClick.bind(this))}focus(){this.buttonElement?.focus()}blur(){this.buttonElement?.blur()}render(){const e=!this.href&&(this.disabled||this.softDisabled),t=this.href?this.renderLink():this.renderButton(),r=this.href?"link":"button";return o.html` - ${this.renderElevationOrOutline?.()} -
- - - ${t} - `}renderButton(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return o.html``}renderLink(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return o.html`${this.renderContent()} - `}renderContent(){const e=o.html``;return o.html` - - ${this.trailingIcon?o.nothing:e} - - ${this.trailingIcon?e:o.nothing} - `}handleClick(e){if(!this.href&&this.softDisabled)return e.stopImmediatePropagation(),void e.preventDefault();(function(e){return e.currentTarget===e.target&&e.composedPath()[0]===e.target&&!e.target.disabled&&!function(e){const t=O;return t&&(e.preventDefault(),e.stopImmediatePropagation()),async function(){O=!0,await null,O=!1}(),t}(e)})(e)&&this.buttonElement&&(this.focus(),function(e){const t=new MouseEvent("click",{bubbles:!0});e.dispatchEvent(t)}(this.buttonElement))}handleSlotChange(){this.hasIcon=this.assignedIcons.length>0}}U=L,o.isServer||U.addInitializer((e=>{const t=e;t.addEventListener("click",(async e=>{const{type:r,[k]:n}=t,{form:s}=n;s&&"button"!==r&&(await new Promise((e=>{setTimeout(e)})),e.defaultPrevented||("reset"!==r?(s.addEventListener("submit",(e=>{Object.defineProperty(e,"submitter",{configurable:!0,enumerable:!0,get:()=>t})}),{capture:!0,once:!0}),n.setFormValue(t.value),s.requestSubmit()):s.reset()))}))})),L.formAssociated=!0,L.shadowRootOptions={mode:"open",delegatesFocus:!0},n([(0,s.property)({type:Boolean,reflect:!0})],L.prototype,"disabled",void 0),n([(0,s.property)({type:Boolean,attribute:"soft-disabled",reflect:!0})],L.prototype,"softDisabled",void 0),n([(0,s.property)()],L.prototype,"href",void 0),n([(0,s.property)()],L.prototype,"target",void 0),n([(0,s.property)({type:Boolean,attribute:"trailing-icon",reflect:!0})],L.prototype,"trailingIcon",void 0),n([(0,s.property)({type:Boolean,attribute:"has-icon",reflect:!0})],L.prototype,"hasIcon",void 0),n([(0,s.property)()],L.prototype,"type",void 0),n([(0,s.property)({reflect:!0})],L.prototype,"value",void 0),n([(0,s.query)(".button")],L.prototype,"buttonElement",void 0),n([(0,s.queryAssignedElements)({slot:"icon",flatten:!0})],L.prototype,"assignedIcons",void 0);class B extends L{renderElevationOrOutline(){return o.html``}}const j=o.css`:host{--_container-color: var(--md-filled-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-elevation: var(--md-filled-button-container-elevation, 0);--_container-height: var(--md-filled-button-container-height, 40px);--_container-shadow-color: var(--md-filled-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-button-focus-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-container-elevation: var(--md-filled-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-button-hover-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-button-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-filled-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-button-pressed-label-text-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-color: var(--md-filled-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_container-shape-start-start: var(--md-filled-button-container-shape-start-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-button-container-shape-start-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-button-container-shape-end-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-button-container-shape-end-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-button-leading-space, 24px);--_trailing-space: var(--md-filled-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-button-with-trailing-icon-trailing-space, 16px)} -`,D=o.css`md-elevation{transition-duration:280ms}:host(:is([disabled],[soft-disabled])) md-elevation{transition:none}md-elevation{--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}:host(:focus-within) md-elevation{--md-elevation-level: var(--_focus-container-elevation)}:host(:hover) md-elevation{--md-elevation-level: var(--_hover-container-elevation)}:host(:active) md-elevation{--md-elevation-level: var(--_pressed-container-elevation)}:host(:is([disabled],[soft-disabled])) md-elevation{--md-elevation-level: var(--_disabled-container-elevation)} -`,F=o.css`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background-color:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host(:is([disabled],[soft-disabled])) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host(:is([disabled],[soft-disabled])) .background{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host(:is([disabled],[soft-disabled])) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none} -`;let W=class extends B{};W.styles=[F,D,j],W=n([(0,s.customElement)("md-filled-button")],W)},7804:(e,t,r)=>{r.d(t,{OA:()=>n,WL:()=>o,u$:()=>s});const n={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},s=e=>(...t)=>({_$litDirective$:e,values:t});class o{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}},6683:(e,t,r)=>{r.d(t,{H:()=>o});var n=r(6752),s=r(7804);const o=(0,s.u$)(class extends s.WL{constructor(e){if(super(e),e.type!==s.OA.ATTRIBUTE||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}const r=e.element.classList;for(const e of this.st)e in t||(r.remove(e),this.st.delete(e));for(const e in t){const n=!!t[e];n===this.st.has(e)||this.nt?.has(e)||(n?(r.add(e),this.st.add(e)):(r.remove(e),this.st.delete(e)))}return n.c0}})},6752:(e,t,r)=>{r.d(t,{JW:()=>E,XX:()=>q,c0:()=>C,ge:()=>F,qy:()=>T,s6:()=>$});const n=globalThis,s=n.trustedTypes,o=s?s.createPolicy("lit-html",{createHTML:e=>e}):void 0,i="$lit$",a=`lit$${(Math.random()+"").slice(9)}$`,l="?"+a,c=`<${l}>`,d=document,h=()=>d.createComment(""),p=e=>null===e||"object"!=typeof e&&"function"!=typeof e,u=Array.isArray,m=e=>u(e)||"function"==typeof e?.[Symbol.iterator],f="[ \t\n\f\r]",b=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,y=/-->/g,g=/>/g,v=RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),w=/'/g,_=/"/g,A=/^(?:script|style|textarea|title)$/i,S=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),T=S(1),E=S(2),C=Symbol.for("lit-noChange"),$=Symbol.for("lit-nothing"),x=new WeakMap,P=d.createTreeWalker(d,129);function I(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==o?o.createHTML(t):t}const k=(e,t)=>{const r=e.length-1,n=[];let s,o=2===t?"":"",l=b;for(let t=0;t"===h[0]?(l=s??b,p=-1):void 0===h[1]?p=-2:(p=l.lastIndex-h[2].length,d=h[1],l=void 0===h[3]?v:'"'===h[3]?_:w):l===_||l===w?l=v:l===y||l===g?l=b:(l=v,s=void 0);const m=l===v&&e[t+1].startsWith("/>")?" ":"";o+=l===b?r+c:p>=0?(n.push(d),r.slice(0,p)+i+r.slice(p)+a+m):r+a+(-2===p?t:m)}return[I(e,o+(e[r]||"")+(2===t?"":"")),n]};class R{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let o=0,c=0;const d=e.length-1,p=this.parts,[u,m]=k(e,t);if(this.el=R.createElement(u,r),P.currentNode=this.el.content,2===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=P.nextNode())&&p.length0){n.textContent=s?s.emptyScript:"";for(let r=0;r2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=$}_$AI(e,t=this,r,n){const s=this.strings;let o=!1;if(void 0===s)e=O(this,e,t,0),o=!p(e)||e!==this._$AH&&e!==C,o&&(this._$AH=e);else{const n=e;let i,a;for(e=s[0],i=0;i{const n=r?.renderBefore??t;let s=n._$litPart$;if(void 0===s){const e=r?.renderBefore??null;n._$litPart$=s=new M(t.insertBefore(h(),e),e,void 0,r??{})}return s._$AI(e),s}},2924:(e,t,r)=>{r.r(t),r.d(t,{customElement:()=>n,eventOptions:()=>c,property:()=>a,query:()=>h,queryAll:()=>u,queryAssignedElements:()=>f,queryAssignedNodes:()=>b,queryAsync:()=>m,standardProperty:()=>i,state:()=>l});const n=e=>(t,r)=>{void 0!==r?r.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)};var s=r(842);const o={attribute:!0,type:String,converter:s.W3,reflect:!1,hasChanged:s.Ec},i=(e=o,t,r)=>{const{kind:n,metadata:s}=r;let i=globalThis.litPropertyMetadata.get(s);if(void 0===i&&globalThis.litPropertyMetadata.set(s,i=new Map),i.set(r.name,e),"accessor"===n){const{name:n}=r;return{set(r){const s=t.get.call(this);t.set.call(this,r),this.requestUpdate(n,s,e)},init(t){return void 0!==t&&this.P(n,void 0,e),t}}}if("setter"===n){const{name:n}=r;return function(r){const s=this[n];t.call(this,r),this.requestUpdate(n,s,e)}}throw Error("Unsupported decorator location: "+n)};function a(e){return(t,r)=>"object"==typeof r?i(e,t,r):((e,t,r)=>{const n=t.hasOwnProperty(r);return t.constructor.createProperty(r,n?{...e,wrapped:!0}:e),n?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}function l(e){return a({...e,state:!0,attribute:!1})}function c(e){return(t,r)=>{const n="function"==typeof t?t:t[r];Object.assign(n,e)}}const d=(e,t,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,r),r);function h(e,t){return(r,n,s)=>{const o=t=>t.renderRoot?.querySelector(e)??null;if(t){const{get:e,set:t}="object"==typeof n?r:s??(()=>{const e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return d(r,n,{get(){let r=e.call(this);return void 0===r&&(r=o(this),(null!==r||this.hasUpdated)&&t.call(this,r)),r}})}return d(r,n,{get(){return o(this)}})}}let p;function u(e){return(t,r)=>d(t,r,{get(){return(this.renderRoot??(p??=document.createDocumentFragment())).querySelectorAll(e)}})}function m(e){return(t,r)=>d(t,r,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(e)??null}})}function f(e){return(t,r)=>{const{slot:n,selector:s}=e??{},o="slot"+(n?`[name=${n}]`:":not([name])");return d(t,r,{get(){const t=this.renderRoot?.querySelector(o),r=t?.assignedElements(e)??[];return void 0===s?r:r.filter((e=>e.matches(s)))}})}}function b(e){return(t,r)=>{const{slot:n}=e??{},s="slot"+(n?`[name=${n}]`:":not([name])");return d(t,r,{get(){const t=this.renderRoot?.querySelector(s);return t?.assignedNodes(e)??[]}})}}},2627:(e,t,r)=>{r.r(t),r.d(t,{classMap:()=>n.H});var n=r(6683)},6337:(e,t,r)=>{r.r(t),r.d(t,{CSSResult:()=>n.BO,LitElement:()=>o,ReactiveElement:()=>n.mN,_$LE:()=>a,_$LH:()=>s.ge,adoptStyles:()=>n.Rf,css:()=>n.AH,defaultConverter:()=>n.W3,getCompatibleStyle:()=>n.sk,html:()=>s.qy,isServer:()=>l,noChange:()=>s.c0,notEqual:()=>n.Ec,nothing:()=>s.s6,render:()=>s.XX,supportsAdoptingStyleSheets:()=>n.qM,svg:()=>s.JW,unsafeCSS:()=>n.iz});var n=r(842),s=r(6752);class o extends n.mN{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=(0,s.XX)(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return s.c0}}o._$litElement$=!0,o.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:o});const i=globalThis.litElementPolyfillSupport;i?.({LitElement:o});const a={_$AK:(e,t,r)=>{e._$AK(t,r)},_$AL:e=>e._$AL};(globalThis.litElementVersions??=[]).push("4.0.4");const l=!1},4114:(e,t,r)=>{r.r(t),r.d(t,{Profile:()=>s,Timeline:()=>m,Tweet:()=>i});const n=e=>{const t=Object.getOwnPropertyNames(e).filter((e=>e.startsWith("__reactProps$")));return t.length?e[t[0]]:null};class s{profileElement;constructor(e){this.profileElement=e}get props(){const e=n(this.profileElement);if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[0]&&"object"==typeof t.children[0]||"function"==typeof t.children[0])&&(null!==t.children[0].props&&"object"==typeof t.children[0].props||"function"==typeof t.children[0].props)&&Array.isArray(t.children[0].props.children)&&(null!==t.children[0].props.children[1]&&"object"==typeof t.children[0].props.children[1]||"function"==typeof t.children[0].props.children[1])&&(null!==t.children[0].props.children[1].props&&"object"==typeof t.children[0].props.children[1].props||"function"==typeof t.children[0].props.children[1].props)&&(null!==t.children[0].props.children[1].props.user&&"object"==typeof t.children[0].props.children[1].props.user||"function"==typeof t.children[0].props.children[1].props.user)&&(void 0===t.children[0].props.children[1].props.user.possibly_sensitive||null===t.children[0].props.children[1].props.user.possibly_sensitive||!1===t.children[0].props.children[1].props.user.possibly_sensitive||!0===t.children[0].props.children[1].props.user.possibly_sensitive)&&"string"==typeof t.children[0].props.children[1].props.user.screen_name&&(""===t.children[0].props.children[1].props.user.profile_interstitial_type||"sensitive_media"===t.children[0].props.children[1].props.user.profile_interstitial_type||"fake_account"===t.children[0].props.children[1].props.user.profile_interstitial_type||"offensive_profile_content"===t.children[0].props.children[1].props.user.profile_interstitial_type||"timeout"===t.children[0].props.children[1].props.user.profile_interstitial_type)&&Array.isArray(t.children[0].props.children[1].props.user.withheld_in_countries)&&t.children[0].props.children[1].props.user.withheld_in_countries.every((e=>"string"==typeof e))}(e))throw new Error("Failed to get React props of profile");return e.children[0].props.children[1].props.user}}var o=r(8531);class i{tweetElement;constructor(e){this.tweetElement=e}getMenuBar(){const e=this.tweetElement.querySelector("div[role='group'][id]");if(!e)throw new Error("Failed to get menu bar of tweet");return e}get element(){return this.tweetElement}get props(){const e=n(this.getMenuBar());if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[1]&&"object"==typeof t.children[1]||"function"==typeof t.children[1])&&(null!==t.children[1].props&&"object"==typeof t.children[1].props||"function"==typeof t.children[1].props)&&(null!==t.children[1].props.retweetWithCommentLink&&"object"==typeof t.children[1].props.retweetWithCommentLink||"function"==typeof t.children[1].props.retweetWithCommentLink)&&(null!==t.children[1].props.retweetWithCommentLink.state&&"object"==typeof t.children[1].props.retweetWithCommentLink.state||"function"==typeof t.children[1].props.retweetWithCommentLink.state)&&(null!==t.children[1].props.retweetWithCommentLink.state.quotedStatus&&"object"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus||"function"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable)&&"string"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.permalink&&(null!==t.children[1].props.retweetWithCommentLink.state.quotedStatus.user&&"object"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user||"function"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive)&&"string"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.screen_name&&(""===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"sensitive_media"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"fake_account"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"offensive_profile_content"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"timeout"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type)&&Array.isArray(t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.withheld_in_countries)&&t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.withheld_in_countries.every((e=>"string"==typeof e))}(e))throw new Error("Failed to get React props of tweet");return e.children[1].props.retweetWithCommentLink.state.quotedStatus}get metadata(){const e=this.props.user.screen_name,t=n(this.element);if(!t)throw new Error("Failed to get React props of tweet");let r=null;const s=function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&Array.isArray(t.children[0])&&(null!==t.children[0][1]&&"object"==typeof t.children[0][1]||"function"==typeof t.children[0][1])&&(null!==t.children[0][1].props&&"object"==typeof t.children[0][1].props||"function"==typeof t.children[0][1].props)&&Array.isArray(t.children[0][1].props.children)&&(null!==t.children[0][1].props.children[0]&&"object"==typeof t.children[0][1].props.children[0]||"function"==typeof t.children[0][1].props.children[0])&&(null!==t.children[0][1].props.children[0].props&&"object"==typeof t.children[0][1].props.children[0].props||"function"==typeof t.children[0][1].props.children[0].props)&&Array.isArray(t.children[0][1].props.children[0].props.children)&&(null!==t.children[0][1].props.children[0].props.children[2]&&"object"==typeof t.children[0][1].props.children[0].props.children[2]||"function"==typeof t.children[0][1].props.children[0].props.children[2])&&(null!==t.children[0][1].props.children[0].props.children[2].props&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props||"function"==typeof t.children[0][1].props.children[0].props.children[2].props)&&Array.isArray(t.children[0][1].props.children[0].props.children[2].props.children)&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7]&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7]||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7])&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7].props&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props)&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser)&&"string"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser.screen_name}(t);return function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&Array.isArray(t.children[0])&&(null!==t.children[0][1]&&"object"==typeof t.children[0][1]||"function"==typeof t.children[0][1])&&(null!==t.children[0][1].props&&"object"==typeof t.children[0][1].props||"function"==typeof t.children[0][1].props)&&Array.isArray(t.children[0][1].props.children)&&(null!==t.children[0][1].props.children[0]&&"object"==typeof t.children[0][1].props.children[0]||"function"==typeof t.children[0][1].props.children[0])&&(null!==t.children[0][1].props.children[0].props&&"object"==typeof t.children[0][1].props.children[0].props||"function"==typeof t.children[0][1].props.children[0].props)&&Array.isArray(t.children[0][1].props.children[0].props.children)&&(null!==t.children[0][1].props.children[0].props.children[1]&&"object"==typeof t.children[0][1].props.children[0].props.children[1]||"function"==typeof t.children[0][1].props.children[0].props.children[1])&&(null!==t.children[0][1].props.children[0].props.children[1].props&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props||"function"==typeof t.children[0][1].props.children[0].props.children[1].props)&&Array.isArray(t.children[0][1].props.children[0].props.children[1].props.children)&&Array.isArray(t.children[0][1].props.children[0].props.children[1].props.children[1])&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2]&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2]||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2])&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2].props&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props)&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser)&&"string"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser.screen_name}(t)&&(r=t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser.screen_name),s&&(r=t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser.screen_name),{isFocalMode:s,isPostedByCurrentUser:e===r}}async clickRetweetButton(e){const t=await(0,o.asyncQuerySelector)("[data-testid='unretweet'], [data-testid='retweet']",this.tweetElement,e);if(!t)throw new Error("Failed to get retweet button of tweet");t.click()}static async clickQuoteButton(e){const t=await(0,o.asyncQuerySelector)(["[data-testid='Dropdown'] [href='/compose/post']","[data-testid='sheetDialog'] [href='/compose/post']"].join(","),document,e);if(!t)throw new Error("Failed to get quote button of tweet");t.click()}static async getTweetTextBox(e){const t="pro.twitter.com"===location.hostname?"[role='dialog'] [data-text='true'], [role='dialog'] textarea[data-testid='tweetTextarea_0']":"[role='dialog'] [data-text='true'], textarea[data-testid='tweetTextarea_0']",r=await(0,o.asyncQuerySelector)(t,document,e);if(!r)throw new Error("Failed to get text box marker of tweet");const n="TEXTAREA"===r.tagName?r:r.parentElement;if(!n)throw new Error("Failed to get text box of tweet");return n}async quoteTweet(e,t=1e3){try{await this.clickRetweetButton(t),await i.clickQuoteButton(t);const r=await i.getTweetTextBox(t);r.innerHTML=e,r.dispatchEvent(new Event("input",{bubbles:!0}))}catch(t){const r=this.props.permalink;open(`https://twitter.com/intent/tweet?text=${encodeURIComponent(`${e}\nhttps://twitter.com${r}`)}`,"_blank")}}}const a={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var l,c=new Uint8Array(16);function d(){if(!l&&!(l="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return l(c)}for(var h=[],p=0;p<256;++p)h.push((p+256).toString(16).slice(1));const u=function(e,t,r){if(a.randomUUID&&!t&&!e)return a.randomUUID();var n=(e=e||{}).random||(e.rng||d)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var s=0;s<16;++s)t[r+s]=n[s];return t}return function(e,t=0){return(h[e[t+0]]+h[e[t+1]]+h[e[t+2]]+h[e[t+3]]+"-"+h[e[t+4]]+h[e[t+5]]+"-"+h[e[t+6]]+h[e[t+7]]+"-"+h[e[t+8]]+h[e[t+9]]+"-"+h[e[t+10]]+h[e[t+11]]+h[e[t+12]]+h[e[t+13]]+h[e[t+14]]+h[e[t+15]]).toLowerCase()}(n)};class m{OBSERVER_OPTIONS={childList:!0,subtree:!0};onNewTweetCallback=null;onNewProfileCallback=null;constructor(e){const t=`data-twi-ext-checked-${u()}`,r={timeoutMs:1e4,...e},n=new MutationObserver((()=>{if(this.onNewTweetCallback){const e=document.querySelectorAll(`[data-testid="tweet"]:not([${t}])`);for(const r of e)r.setAttribute(t,""),this.onNewTweetCallback(new i(r))}if(this.onNewProfileCallback){const e=document.querySelector(`:not([data-testid="tweet"]) [data-testid="UserName"]:not([${t}])`);e&&(e.setAttribute(t,""),this.onNewProfileCallback(new s(e)))}}));(0,o.asyncQuerySelector)("main",document,r.timeoutMs).then((e=>{if(!e)throw new Error("twi-ext: Failed to get main element");n.observe(e,this.OBSERVER_OPTIONS)})),(0,o.asyncQuerySelector)("#layers",document,r.timeoutMs).then((e=>{if(!e)throw new Error("twi-ext: Failed to get #layers element");n.observe(e,this.OBSERVER_OPTIONS)}))}onNewTweet(e){this.onNewTweetCallback=e}onNewProfile(e){this.onNewProfileCallback=e}}},6556:e=>{e.exports=JSON.parse('{"manifest_description":{"message":"Twitterのシャドウバンを検出する拡張機能です。"},"accountShadowbanned":{"message":"このユーザーはシャドウバンされている可能性があるため、ツイートが検索結果に表示されないかもしれません。"},"accountShadowbannedAndTweetFlaggedAsSensitive":{"message":"このユーザーはシャドウバンされている可能性があるため、ツイートが検索結果に表示されないかもしれません。また、このツイートにはセンシティブフラグが付与されています。"},"accountAndTweetShadowbanned":{"message":"このツイートには年齢制限があり、18歳未満のユーザーやログインしていないユーザーは閲覧できません。また、検索結果に表示されない可能性があります。"},"accountIsBlockedInSomeCountries":{"message":"このユーザーは一部の国でブロックされています。"},"tweetFlaggedAsSensitive":{"message":"このツイートにはセンシティブフラグが付与されており、閲覧者の設定によっては検索結果に表示されません。"},"thisUserIsNotShadowbanned":{"message":"このユーザーはシャドウバンされていません。"},"thisUserIsShadowbanned":{"message":"このユーザーはシャドウバンされている可能性があるため、ツイートが検索結果に表示されないかもしれません。"},"tweetShadowbanned":{"message":"このツイートには年齢制限があり、18歳未満のユーザーやログインしていないユーザーは閲覧できません。また、検索結果に表示されない可能性があります。"},"tweetNoProblem":{"message":"ツイートに問題は見つかりませんでした。"},"accountIsNotFlaggedAsSensitive":{"message":"✅アカウントにセンシティブフラグは付与されていません"},"accountIsShadowbannedOrFlaggedAsSensitive":{"message":"🚫アカウントがシャドウバンされているか、センシティブフラグが付与されています"},"profileDoesNotContainSensitiveMedia":{"message":"✅プロフィールのメディアにセンシティブフラグは付与されていません"},"profileContainsSensitiveMedia":{"message":"🚫プロフィールのメディアにセンシティブフラグが付与されています"},"accountIsNotWithheldInCountries":{"message":"✅アカウントがブロックされている国はありません(詳細)"},"accountIsWithheldInCountries":{"message":"🚫アカウントは次の国でブロックされています(詳細):$1"},"tweetIsNotFlaggedAsSensitive":{"message":"✅ツイートにセンシティブフラグは付与されていません"},"tweetIsFlaggedAsSensitive":{"message":"🚫ツイートにセンシティブフラグが付与されています"},"tweetIsNotAgeRestricted":{"message":"✅ツイートに年齢制限はありません"},"tweetIsAgeRestricted":{"message":"🚫ツイートに年齢制限があります"},"tweetIsSearchable":{"message":"✅ツイートは検索結果に表示されます"},"tweetMayNotBeSearchable":{"message":"⚠️ツイートは閲覧者の設定によっては検索結果に表示されません"},"tweetIsNotSearchable":{"message":"🚫ツイートが検索結果に表示されない可能性があります"},"falsePositivesAndFalseNegativesOccur":{"message":"Shadowban Scannerは類似の他のツールと同様に、偽陽性や偽陰性が発生することがあります。仕組みについて詳しくはこちらを参照してください。"},"translatedByAI":{"message":"","description":"This field is used if the translation was done by AI. Otherwise, set this field to an empty string. Example sentence: \\"Translated from Japanese to by AI. Please notify @keita_roboin\'s DM or GitHub repository if there are any unnatural points.\\""},"showMore":{"message":"▶さらに表示"},"tweetTheResults":{"message":"結果をツイート"},"viewTweet":{"message":"ツイートを表示"},"settingsWhereToDisplayCheckResults":{"message":"検証結果を表示する場所"},"settingsShowMessagesInUnproblematicTweets":{"message":"問題のないツイートにも表示"},"settingsShowMessagesInUnproblematicProfiles":{"message":"問題のないプロフィールにも表示"},"settingsEnableForOtherUsersTweets":{"message":"他のユーザーのツイートにも表示"},"settingsEnableForOtherUsersProfiles":{"message":"他のユーザーのプロフィールにも表示"},"settingsOtherSettings":{"message":"その他の設定"},"settingsAlwaysDetailedView":{"message":"常に詳細情報を表示"},"settingsShowNotesInMessages":{"message":"メッセージ下部に注意書きを表示"},"settingsShowTweetButton":{"message":"結果をツイートするボタンを表示"},"settingsPleaseReload":{"message":"設定を変更したらTwitterを再読み込みしてください。"},"settingsPrivacyPolicy":{"message":"プライバシーポリシー"},"settingsPrivacyPolicyURL":{"message":"https://github.com/Robot-Inventor/shadowban-scanner/blob/main/README_ja.md#%E3%83%97%E3%83%A9%E3%82%A4%E3%83%90%E3%82%B7%E3%83%BC%E3%83%9D%E3%83%AA%E3%82%B7%E3%83%BC"},"settingsOpenSourceLicenses":{"message":"オープンソースライセンス"},"privacyPolicyPageTitle":{"message":"プライバシーポリシー - Shadowban Scanner"},"privacyPolicy":{"message":"プライバシーポリシー"},"privacyPolicyText":{"message":"この拡張機能は、原則としてすべての処理をユーザーのコンピューター上で実行します。データが外部のサーバーに送信されることはありません。また、一部の拡張機能でみられるような、ユーザーの認証情報を無断で取得してTwitterの内部APIにアクセスする処理もありません。この拡張機能に同梱されていないWebページには、それぞれの利用規約やプライバシーポリシーが適用されます。"},"initialSetup":{"message":"初期設定 - Shadowban Scanner"},"shadowbanScannerHasBeenInstalled":{"message":"Shadowban Scannerがインストールされました"},"letsStartWithASimpleInitialSetup":{"message":"簡単な初期設定を始めましょう"},"pleaseSelectOneOfThem":{"message":"どちらかを選択してください。設定はあとから変えられます。"},"displayForAllTweetsAndAccounts":{"message":"すべてのツイートとアカウントに検査結果を表示"},"displayOnlyForProblematicTweets":{"message":"問題のあるツイートとアカウントにだけ検査結果を表示"},"displayOnlyInYourOwnTweets":{"message":"自分のツイートにのみ検査結果を表示"},"displayInAllUsersTweets":{"message":"すべてのユーザーのツイートに検査結果を表示"},"back":{"message":"戻る"},"next":{"message":"次へ"},"initialSetupCompleted":{"message":"初期設定が完了しました!
使い方の説明を開きますか?"},"open":{"message":"開く"},"exitWithoutOpening":{"message":"開かずに終了"}}')}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={id:n,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nc=void 0,r(5275)})(); \ No newline at end of file + `;expand(){this.isExpanded=!0}tweetButtonClicked(){const e=new Event("tweetButtonClick",{bubbles:!0,composed:!0});this.dispatchEvent(e)}firstUpdated(e){this.onRenderedCallback&&this.onRenderedCallback(),super.firstUpdated(e)}getShowMoreButton(){return this.isExpanded?"":Ne``}getDetails(){return this.details.length?Ne`
    + ${this.details.map((e=>"string"==typeof e?Ne`
  • `:Ne` +
  • + `))} +
`:""}getNotes(){if(!this.notes.length)return"";const e=lt({"shadowban-scanner-collapsed-content":!this.isExpanded,"shadowban-scanner-message-note":!0});return this.notes.map((t=>Ne`
`))}getTweetButton(){const e=lt({"shadowban-scanner-collapsed-content":!this.isExpanded});return this.isTweetButtonShown?Ne``:""}static cancelClickEvent(e){e.stopPropagation()}render(){const e=lt({"focal-mode":this.isFocalMode,"shadowban-scanner-message":!0,"shadowban-scanner-message-no-problem":!this.isAlert});return Ne` +
+ + ${this.getShowMoreButton()} ${this.getDetails()} ${this.getNotes()} ${this.getTweetButton()} +
+ `}};Rt([le({reflect:!0})],Ut.prototype,"summary",void 0),Rt([le({reflect:!0,type:Array})],Ut.prototype,"details",void 0),Rt([le({reflect:!0,type:Array})],Ut.prototype,"notes",void 0),Rt([le({reflect:!0,type:Boolean})],Ut.prototype,"isAlert",void 0),Rt([le({reflect:!0,type:Boolean})],Ut.prototype,"isExpanded",void 0),Rt([le({reflect:!0,type:Boolean})],Ut.prototype,"isFocalMode",void 0),Rt([le({reflect:!0,type:Boolean})],Ut.prototype,"isTweetButtonShown",void 0),Rt([le({reflect:!0,type:Boolean})],Ut.prototype,"isNoteShown",void 0),Rt([le({attribute:!1,reflect:!0})],Ut.prototype,"onRenderedCallback",void 0),Rt([le({reflect:!0,type:String})],Ut.prototype,"textColor",void 0),Ut=Ot=Rt([j("sbs-message")],Ut);class Mt{sbsMessage;tweet=null;tweetText;constructor(e){const t=document.createElement("sbs-message");t.textColor=Mt.getTextColor(),t.summary=e.summary,t.isAlert=e.isAlert,t.onRenderedCallback=e.onRenderedCallback,"tweet"===e.type?(this.tweet=e.tweet,t.details=e.details,t.notes=e.notes,t.isFocalMode=e.tweet.metadata.isFocalMode,t.isExpanded=e.isExpanded,t.isTweetButtonShown=e.isTweetButtonShown,t.isNoteShown=e.isNoteShown,this.tweetText=e.tweetText):t.isExpanded=!0,t.setAttribute(y,""),t.addEventListener("tweetButtonClick",this.onTweetButtonClick.bind(this)),this.sbsMessage=t}static getTextColor(){const e=["[data-testid='User-Name'] div:first-child span","[data-testid='UserName'] div:first-child span"].join(","),t=document.querySelector(e);if(!t)throw new Error("Failed to get user name span of tweet");const{color:r}=getComputedStyle(t);return r}onTweetButtonClick(){if(!this.tweet||!this.tweetText)throw new Error("Tweet button clicked without source tweet");this.tweet.quoteTweet(this.tweetText)}insertAdjacentElement(e,t){e.insertAdjacentElement(t,this.sbsMessage)}}const jt=e=>e[Object.getOwnPropertyNames(e).filter((e=>e.startsWith("__reactProps$")))];class Lt{element;constructor(e){this.element=e}parse(){const e=jt(this.element);if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&(null!==t.children&&"object"==typeof t.children||"function"==typeof t.children)&&(void 0===t.children._owner||(null!==t.children._owner&&"object"==typeof t.children._owner||"function"==typeof t.children._owner)&&"string"==typeof t.children._owner.key)}(e))throw new Error("Type of props is invalid.");const t=this.element.querySelector("div > div");if(!t)throw new Error("Failed to get the tombstone's grandchild element.");const r=jt(t);if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[0]&&"object"==typeof t.children[0]||"function"==typeof t.children[0])&&(null!==t.children[0].props&&"object"==typeof t.children[0].props||"function"==typeof t.children[0].props)&&(null!==t.children[0].props.entry&&"object"==typeof t.children[0].props.entry||"function"==typeof t.children[0].props.entry)&&"tombstone"===t.children[0].props.entry.type&&(null!==t.children[0].props.entry.conversationPosition&&"object"==typeof t.children[0].props.entry.conversationPosition||"function"==typeof t.children[0].props.entry.conversationPosition)&&"boolean"==typeof t.children[0].props.entry.conversationPosition.showReplyContext}(r))throw new Error("Type of grandchild props is invalid.");return[e,r]}}class Bt{tweet;constructor(e){this.tweet=e}parse(){return this.tweet.props}}class Ft{settings;onMessageCallback;constructor(e,t){this.settings=e,this.onMessageCallback=t;const r=new N;r.onNewTweet((e=>{this.checkTweet(e),this.timelineObserverCallback()})),r.onNewProfile((e=>{this.checkProfile(e)}))}checkProfile(e){if(Boolean(document.querySelector("[data-testid='editProfileButton']"))&&!this.settings.enableForOtherUsersProfiles)return;const t=O(e.props);if(!t.user.hasAnyProblem&&!this.settings.showMessagesInUnproblematicProfiles)return;const r=(n=t,s=this.onMessageCallback,{...(e=>{let t=null;return t=e.user.shadowbanned?"thisUserIsShadowbanned":e.user.withheldInCountries.length?"accountIsBlockedInSomeCountries":"thisUserIsNotShadowbanned",{summary:t}})(n),isAlert:n.user.hasAnyProblem,onRenderedCallback:s,type:"profile"});var n,s;const o=new Mt(r),i=document.querySelector("[data-testid='UserDescription']")||document.querySelector("[data-testid='UserName']");if(!i)throw new Error("Failed to get user description of profile");o.insertAdjacentElement(i,"afterend")}checkTweet(e){const t=(e=>{const t=e.parse(),r=O(t.user),n=Boolean(t.possibly_sensitive),s=!(!1===t.possibly_sensitive_editable),o=n&&!s;let i="searchable";return o||r.user.shadowbanned?i="unsearchable":n&&(i="possiblyUnsearchable"),{...r,tweet:{ageRestriction:o,hasAnyProblem:"searchable"!==i||r.user.hasAnyProblem,possiblySensitive:n,searchability:i}}})(new Bt(e));if(!e.metadata.isPostedByCurrentUser&&!this.settings.enableForOtherUsersTweets)return;if(!t.tweet.hasAnyProblem&&!this.settings.showMessagesInUnproblematicTweets)return;const r=U(e,t,this.onMessageCallback,this.settings),n=new Mt(r),s=e.element.querySelector("[data-testid='analyticsButton']")?.parentElement||e.element.querySelector("div[role='group'][id]");if(!s)throw new Error("Failed to get landmark element of tweet");n.insertAdjacentElement(s,"beforebegin")}necromancer(e){e.setAttribute(g,"true");const t=(e=>{const[t,r]=e;if(!t.children._owner)return;if(r.children[0].props.entry.conversationPosition.showReplyContext)return;const{key:n}=t.children._owner;return n.split("-")[3]})(new Lt(e).parse());if(!t)return;const r=`https://twitter.com/i/status/${t}`,n=document.createElement("a");n.href=r,n.target="_blank",n.setAttribute(v,"viewTweet"),n.classList.add("shadowban-scanner-tombstone-necromancer");const s=e.querySelector("a");if(!s)throw new Error("Failed to get help link");n.style.color=getComputedStyle(s).color,s.insertAdjacentElement("afterend",n),this.onMessageCallback()}timelineObserverCallback(){const e=document.querySelectorAll(`[data-testid='cellInnerDiv']:not([${g}])`);for(const t of e)t.setAttribute(g,"true"),Boolean(t.querySelector("a[href='https://help.twitter.com/rules-and-policies/notices-on-twitter']"))&&this.necromancer(t)}}const qt={alwaysDetailedView:!1,enableForOtherUsersProfiles:!0,enableForOtherUsersTweets:!0,enableOnXPro:!0,showMessagesInUnproblematicProfiles:!0,showMessagesInUnproblematicTweets:!1,showNotesInMessages:!0,showTweetButton:!0};class Wt{translationFunction;twemojiEndpoint;constructor(e,t){this.translationFunction=e,this.twemojiEndpoint=t}convertEmojiToTwemoji(e){let t=e;for(const e of w){const r=[...e].map((e=>e.codePointAt(0)?.toString(16))).join("-"),n=`${e}`;t=t.replaceAll(e,n)}return t}translateElements(){const e=[...document.querySelectorAll(`[${v}]`)],t=document.querySelectorAll(`sbs-message[${y}]`);for(const r of t){const{shadowRoot:t}=r;if(!t)return;const n=t.querySelectorAll(`[${v}]`);e.push(...n),n.length&&r.removeAttribute(y)}e.forEach((e=>{const t=e.getAttribute(v),r=e.getAttribute("data-sb-translation-substitutions"),n=r?JSON.parse(r):null,s=function(e){const t=e;return void 0===t||"string"==typeof t||Array.isArray(t)&&t.every((e=>"string"==typeof e))}(n)?this.translationFunction(t,n):this.translationFunction(t);e.hasAttribute("data-sb-enable-twemoji")?e.innerHTML=this.convertEmojiToTwemoji(s):e.innerHTML=s,e.removeAttribute(v)}))}}(e=>{const t=new Wt(((t,r)=>{if(r){const n="string"==typeof r?[r]:r;let s=e[t].message;for(let e=0;e{t.translateElements()}))})(JSON.parse('{"manifest_description":{"message":"Twitterのシャドウバンを検出する拡張機能です。"},"accountShadowbanned":{"message":"このユーザーはシャドウバンされている可能性があるため、ツイートが検索結果に表示されないかもしれません。"},"accountShadowbannedAndTweetFlaggedAsSensitive":{"message":"このユーザーはシャドウバンされている可能性があるため、ツイートが検索結果に表示されないかもしれません。また、このツイートにはセンシティブフラグが付与されています。"},"accountAndTweetShadowbanned":{"message":"このツイートには年齢制限があり、18歳未満のユーザーやログインしていないユーザーは閲覧できません。また、検索結果に表示されない可能性があります。"},"accountIsBlockedInSomeCountries":{"message":"このユーザーは一部の国でブロックされています。"},"tweetFlaggedAsSensitive":{"message":"このツイートにはセンシティブフラグが付与されており、閲覧者の設定によっては検索結果に表示されません。"},"thisUserIsNotShadowbanned":{"message":"このユーザーはシャドウバンされていません。"},"thisUserIsShadowbanned":{"message":"このユーザーはシャドウバンされている可能性があるため、ツイートが検索結果に表示されないかもしれません。"},"tweetShadowbanned":{"message":"このツイートには年齢制限があり、18歳未満のユーザーやログインしていないユーザーは閲覧できません。また、検索結果に表示されない可能性があります。"},"tweetNoProblem":{"message":"ツイートに問題は見つかりませんでした。"},"accountIsNotFlaggedAsSensitive":{"message":"✅アカウントにセンシティブフラグは付与されていません"},"accountIsShadowbannedOrFlaggedAsSensitive":{"message":"🚫アカウントがシャドウバンされているか、センシティブフラグが付与されています"},"profileDoesNotContainSensitiveMedia":{"message":"✅プロフィールのメディアにセンシティブフラグは付与されていません"},"profileContainsSensitiveMedia":{"message":"🚫プロフィールのメディアにセンシティブフラグが付与されています"},"accountIsNotWithheldInCountries":{"message":"✅アカウントがブロックされている国はありません(詳細)"},"accountIsWithheldInCountries":{"message":"🚫アカウントは次の国でブロックされています(詳細):$1"},"tweetIsNotFlaggedAsSensitive":{"message":"✅ツイートにセンシティブフラグは付与されていません"},"tweetIsFlaggedAsSensitive":{"message":"🚫ツイートにセンシティブフラグが付与されています"},"tweetIsNotAgeRestricted":{"message":"✅ツイートに年齢制限はありません"},"tweetIsAgeRestricted":{"message":"🚫ツイートに年齢制限があります"},"tweetIsSearchable":{"message":"✅ツイートは検索結果に表示されます"},"tweetMayNotBeSearchable":{"message":"⚠️ツイートは閲覧者の設定によっては検索結果に表示されません"},"tweetIsNotSearchable":{"message":"🚫ツイートが検索結果に表示されない可能性があります"},"falsePositivesAndFalseNegativesOccur":{"message":"Shadowban Scannerは類似の他のツールと同様に、偽陽性や偽陰性が発生することがあります。仕組みについて詳しくはこちらを参照してください。"},"translatedByAI":{"message":"","description":"This field is used if the translation was done by AI. Otherwise, set this field to an empty string. Example sentence: \\"Translated from Japanese to by AI. Please notify @keita_roboin\'s DM or GitHub repository if there are any unnatural points.\\""},"showMore":{"message":"▶さらに表示"},"tweetTheResults":{"message":"結果をツイート"},"viewTweet":{"message":"ツイートを表示"},"settingsWhereToDisplayCheckResults":{"message":"検証結果を表示する場所"},"settingsShowMessagesInUnproblematicTweets":{"message":"問題のないツイートにも表示"},"settingsShowMessagesInUnproblematicProfiles":{"message":"問題のないプロフィールにも表示"},"settingsEnableForOtherUsersTweets":{"message":"他のユーザーのツイートにも表示"},"settingsEnableForOtherUsersProfiles":{"message":"他のユーザーのプロフィールにも表示"},"settingsOtherSettings":{"message":"その他の設定"},"settingsAlwaysDetailedView":{"message":"常に詳細情報を表示"},"settingsShowNotesInMessages":{"message":"メッセージ下部に注意書きを表示"},"settingsShowTweetButton":{"message":"結果をツイートするボタンを表示"},"settingsEnableOnXPro":{"message":"X Pro上で実行する"},"settingsPleaseReload":{"message":"設定を変更したらTwitterを再読み込みしてください。"},"settingsPrivacyPolicy":{"message":"プライバシーポリシー"},"settingsPrivacyPolicyURL":{"message":"https://github.com/Robot-Inventor/shadowban-scanner/blob/main/README_ja.md#%E3%83%97%E3%83%A9%E3%82%A4%E3%83%90%E3%82%B7%E3%83%BC%E3%83%9D%E3%83%AA%E3%82%B7%E3%83%BC"},"settingsOpenSourceLicenses":{"message":"オープンソースライセンス"},"privacyPolicyPageTitle":{"message":"プライバシーポリシー - Shadowban Scanner"},"privacyPolicy":{"message":"プライバシーポリシー"},"privacyPolicyText":{"message":"この拡張機能は、原則としてすべての処理をユーザーのコンピューター上で実行します。データが外部のサーバーに送信されることはありません。また、一部の拡張機能でみられるような、ユーザーの認証情報を無断で取得してTwitterの内部APIにアクセスする処理もありません。この拡張機能に同梱されていないWebページには、それぞれの利用規約やプライバシーポリシーが適用されます。"},"initialSetup":{"message":"初期設定 - Shadowban Scanner"},"shadowbanScannerHasBeenInstalled":{"message":"Shadowban Scannerがインストールされました"},"letsStartWithASimpleInitialSetup":{"message":"簡単な初期設定を始めましょう"},"pleaseSelectOneOfThem":{"message":"どちらかを選択してください。設定はあとから変えられます。"},"displayForAllTweetsAndAccounts":{"message":"すべてのツイートとアカウントに検査結果を表示"},"displayOnlyForProblematicTweets":{"message":"問題のあるツイートとアカウントにだけ検査結果を表示"},"displayOnlyInYourOwnTweets":{"message":"自分のツイートにのみ検査結果を表示"},"displayInAllUsersTweets":{"message":"すべてのユーザーのツイートに検査結果を表示"},"back":{"message":"戻る"},"next":{"message":"次へ"},"initialSetupCompleted":{"message":"初期設定が完了しました!
使い方の説明を開きますか?"},"open":{"message":"開く"},"exitWithoutOpening":{"message":"開かずに終了"}}'))})(); \ No newline at end of file diff --git a/userScript/ja.user.js.LICENSE.txt b/userScript/ja.user.js.LICENSE.txt index 6f070593..e243996e 100644 --- a/userScript/ja.user.js.LICENSE.txt +++ b/userScript/ja.user.js.LICENSE.txt @@ -20,12 +20,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -/** - * @license - * Copyright 2019 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ - /** * @license * Copyright 2021 Google LLC @@ -44,12 +38,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -/** - * @license - * Copyright 2022 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ - /** * @license * Copyright 2023 Google LLC diff --git a/userScript/ko.user.js b/userScript/ko.user.js index b84c6eaf..f22d1355 100644 --- a/userScript/ko.user.js +++ b/userScript/ko.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Shadowban Scanner (한국어) // @namespace https://github.com/Robot-Inventor/shadowban-scanner/ -// @version 3.1.9 +// @version 3.2.0 // @description Twitter의 Shadowban을 감지하는 확장 기능입니다. // @author Robot-Inventor (ろぼいん / @keita_roboin) // @match https://*.twitter.com/* @@ -13,28 +13,47 @@ // ==/UserScript== /*! For license information please see ko.user.js.LICENSE.txt */ -(()=>{"use strict";var e={8531:function(e,t){var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,o){function i(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.asyncQuerySelectorAll=t.asyncQuerySelector=void 0;const n=(e,t)=>new Promise((r=>{const n=e();if(n instanceof Element||n instanceof NodeList&&n.length)return void r(n);let s=null;const o=new MutationObserver((()=>{const t=e();(t instanceof Element||t instanceof NodeList&&t.length)&&(o.disconnect(),s&&clearTimeout(s),r(t))}));s=setTimeout((()=>{o.disconnect(),r(null)}),t),o.observe(document.body,{attributes:!0,childList:!0,subtree:!0})}));t.asyncQuerySelector=(e,...t)=>r(void 0,[e,...t],void 0,(function*(e,t=document,r=500){return yield n((()=>t.querySelector(e)),r)})),t.asyncQuerySelectorAll=(e,...t)=>r(void 0,[e,...t],void 0,(function*(e,t=document,r=500){var s;return null!==(s=yield n((()=>t.querySelectorAll(e)),r))&&void 0!==s?s:document.createDocumentFragment().childNodes}))},1016:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(1601),s=r.n(n),o=r(6314),i=r.n(o)()(s());i.push([e.id,".shadowban-scanner-tombstone-necromancer {\n display: inline-block;\n margin: 0 2rem;\n text-decoration: none;\n}\n\n.shadowban-scanner-tombstone-necromancer:hover {\n text-decoration: underline;\n}\n\n[data-sb-translation] {\n display: inline-block;\n min-width: 15em;\n min-height: 1em;\n border-radius: 0.25em;\n background-image: linear-gradient(90deg, transparent 40%, rgba(175, 175, 175, 0.7) 80%, transparent 100%);\n background-size: 200% 100%;\n animation: loading-animation 1.5s linear infinite;\n}\n\n@keyframes loading-animation {\n 0% {\n background-position: 200% 0%;\n opacity: 1;\n }\n 100% {\n background-position: 0% 0%;\n opacity: 1;\n }\n}\n",""]);const a=i},6314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,s,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(n)for(var a=0;a0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),r&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=r):d[2]=r),s&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=s):d[4]="".concat(s)),t.push(d))}},t}},1601:e=>{e.exports=function(e){return e[1]}},5535:(e,t,r)=>{r.r(t),r.d(t,{default:()=>y});var n=r(5072),s=r.n(n),o=r(7825),i=r.n(o),a=r(7659),l=r.n(a),c=r(5056),d=r.n(c),h=r(540),p=r.n(h),u=r(1113),m=r.n(u),f=r(1016),b={};b.styleTagTransform=m(),b.setAttributes=d(),b.insert=l().bind(null,"head"),b.domAPI=i(),b.insertStyleElement=p(),s()(f.A,b);const y=f.A&&f.A.locals?f.A.locals:void 0},5072:e=>{var t=[];function r(e){for(var r=-1,n=0;n{var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056:(e,t,r)=>{e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},7825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var s=void 0!==r.layer;s&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,s&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},41:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.INSTRUCTION_URL=t.RELEASE_NOTE_URL=t.ONBOARDING_PATH=t.ALLOWED_TWEMOJI=t.TWEMOJI_ATTRIBUTE=t.SHADOW_TRANSLATION_ATTRIBUTE=t.TRANSLATION_ATTRIBUTE=t.EVENT_GENERATOR_SETTINGS_ATTRIBUTE=t.EVENT_GENERATOR_ID=t.CHECKED_DATA_ATTRIBUTE=void 0,t.CHECKED_DATA_ATTRIBUTE="data-shadowban-checked",t.EVENT_GENERATOR_ID="shadowban-scanner-event-generator",t.EVENT_GENERATOR_SETTINGS_ATTRIBUTE="data-sb-settings",t.TRANSLATION_ATTRIBUTE="data-sb-translation",t.SHADOW_TRANSLATION_ATTRIBUTE="data-sb-shadow-translation",t.TWEMOJI_ATTRIBUTE="data-sb-enable-twemoji",t.ALLOWED_TWEMOJI=["✅","🚫","⚠️"],t.ONBOARDING_PATH="html/initialSetup.html",t.RELEASE_NOTE_URL={en:"https://roboin.io/article/2024/05/27/shadowban-scanner-reaches-over-10000-users/en/",ja:"https://roboin.io/article/2024/05/27/shadowban-scanner-reaches-over-10000-users/"},t.INSTRUCTION_URL={en:"https://roboin.io/article/2023/09/30/detect-twitter-shadowban/en/#usage",ja:"https://roboin.io/article/2023/09/30/detect-twitter-shadowban/#%E4%BD%BF%E3%81%84%E6%96%B9"}},8140:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_SETTINGS=void 0,t.DEFAULT_SETTINGS={alwaysDetailedView:!1,enableForOtherUsersProfiles:!0,enableForOtherUsersTweets:!0,showMessagesInUnproblematicProfiles:!0,showMessagesInUnproblematicTweets:!1,showNotesInMessages:!0,showTweetButton:!0}},7316:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Translator=void 0;const n=r(41),s=r(1497);t.Translator=class{constructor(e,t){this.translationFunction=e,this.twemojiEndpoint=t}convertEmojiToTwemoji(e){let t=e;for(const e of n.ALLOWED_TWEMOJI){const r=[...e].map((e=>e.codePointAt(0)?.toString(16))).join("-"),n=`${e}`;t=t.replaceAll(e,n)}return t}translateElements(){const e=[...document.querySelectorAll(`[${n.TRANSLATION_ATTRIBUTE}]`)],t=document.querySelectorAll(`sbs-message[${n.SHADOW_TRANSLATION_ATTRIBUTE}]`);for(const r of t){const{shadowRoot:t}=r;if(!t)return;const s=t.querySelectorAll(`[${n.TRANSLATION_ATTRIBUTE}]`);e.push(...s),s.length&&r.removeAttribute(n.SHADOW_TRANSLATION_ATTRIBUTE)}e.forEach((e=>{const t=e.getAttribute(n.TRANSLATION_ATTRIBUTE),r=e.getAttribute("data-sb-translation-substitutions"),o=r?JSON.parse(r):null,i=(0,s.isTranslationSubstitutions)(o)?this.translationFunction(t,o):this.translationFunction(t);e.hasAttribute(n.TWEMOJI_ATTRIBUTE)?e.innerHTML=this.convertEmojiToTwemoji(i):e.innerHTML=i,e.removeAttribute(n.TRANSLATION_ATTRIBUTE)}))}}},380:function(e,t,r){var n,s=this&&this.__decorate||function(e,t,r,n){var s,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i};Object.defineProperty(t,"__esModule",{value:!0}),t.SbsMessage=void 0,r(919);const o=r(6337),i=r(2924),a=r(2627);let l=n=class extends o.LitElement{constructor(){super(...arguments),this.summary="tweetNoProblem",this.details=[],this.notes=[],this.isAlert=!1,this.isExpanded=!1,this.isFocalMode=!1,this.isTweetButtonShown=!1,this.isNoteShown=!1,this.textColor="white"}expand(){this.isExpanded=!0}tweetButtonClicked(){const e=new Event("tweetButtonClick",{bubbles:!0,composed:!0});this.dispatchEvent(e)}firstUpdated(e){this.onRenderedCallback&&this.onRenderedCallback(),super.firstUpdated(e)}getShowMoreButton(){return this.isExpanded?"":o.html``}getDetails(){return this.details.length?o.html`
    - ${this.details.map((e=>"string"==typeof e?o.html`
  • `:o.html` -
  • - `))} -
`:""}getNotes(){if(!this.notes.length)return"";const e=(0,a.classMap)({"shadowban-scanner-collapsed-content":!this.isExpanded,"shadowban-scanner-message-note":!0});return this.notes.map((t=>o.html`
`))}getTweetButton(){const e=(0,a.classMap)({"shadowban-scanner-collapsed-content":!this.isExpanded});return this.isTweetButtonShown?o.html``:""}static cancelClickEvent(e){e.stopPropagation()}render(){const e=(0,a.classMap)({"focal-mode":this.isFocalMode,"shadowban-scanner-message":!0,"shadowban-scanner-message-no-problem":!this.isAlert});return o.html` -
- - ${this.getShowMoreButton()} ${this.getDetails()} ${this.getNotes()} ${this.getTweetButton()} -
- `}};t.SbsMessage=l,l.styles=o.css` +(()=>{"use strict";var e={531:function(e,t){var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,o){function i(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.asyncQuerySelectorAll=t.asyncQuerySelector=void 0;const n=(e,t)=>new Promise((r=>{const n=e();if(n instanceof Element||n instanceof NodeList&&n.length)return void r(n);let s=null;const o=new MutationObserver((()=>{const t=e();(t instanceof Element||t instanceof NodeList&&t.length)&&(o.disconnect(),s&&clearTimeout(s),r(t))}));s=setTimeout((()=>{o.disconnect(),r(null)}),t),o.observe(document.body,{attributes:!0,childList:!0,subtree:!0})}));t.asyncQuerySelector=(e,...t)=>r(void 0,[e,...t],void 0,(function*(e,t=document,r=500){return yield n((()=>t.querySelector(e)),r)})),t.asyncQuerySelectorAll=(e,...t)=>r(void 0,[e,...t],void 0,(function*(e,t=document,r=500){var s;return null!==(s=yield n((()=>t.querySelectorAll(e)),r))&&void 0!==s?s:document.createDocumentFragment().childNodes}))},16:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(601),s=r.n(n),o=r(314),i=r.n(o)()(s());i.push([e.id,".shadowban-scanner-tombstone-necromancer {\n display: inline-block;\n margin: 0 2rem;\n text-decoration: none;\n}\n\n.shadowban-scanner-tombstone-necromancer:hover {\n text-decoration: underline;\n}\n\n[data-sb-translation] {\n display: inline-block;\n min-width: 15em;\n min-height: 1em;\n border-radius: 0.25em;\n background-image: linear-gradient(90deg, transparent 40%, rgba(175, 175, 175, 0.7) 80%, transparent 100%);\n background-size: 200% 100%;\n animation: loading-animation 1.5s linear infinite;\n}\n\n@keyframes loading-animation {\n 0% {\n background-position: 200% 0%;\n opacity: 1;\n }\n 100% {\n background-position: 0% 0%;\n opacity: 1;\n }\n}\n",""]);const a=i},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,s,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(n)for(var a=0;a0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),r&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=r):d[2]=r),s&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=s):d[4]="".concat(s)),t.push(d))}},t}},601:e=>{e.exports=function(e){return e[1]}},72:e=>{var t=[];function r(e){for(var r=-1,n=0;n{var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},56:(e,t,r)=>{e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var s=void 0!==r.layer;s&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,s&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={id:n,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.nc=void 0;var n=r(72),s=r.n(n),o=r(825),i=r.n(o),a=r(659),l=r.n(a),c=r(56),d=r.n(c),h=r(540),p=r.n(h),u=r(113),f=r.n(u),m=r(16),b={};b.styleTagTransform=f(),b.setAttributes=d(),b.insert=l().bind(null,"head"),b.domAPI=i(),b.insertStyleElement=p(),s()(m.A,b),m.A&&m.A.locals&&m.A.locals;const g="data-shadowban-checked",y="data-sb-translation",v="data-sb-shadow-translation",w=["✅","🚫","⚠️"],_=e=>{const t=Object.getOwnPropertyNames(e).filter((e=>e.startsWith("__reactProps$")));return t.length?e[t[0]]:null};class A{profileElement;constructor(e){this.profileElement=e}get props(){const e=_(this.profileElement);if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[0]&&"object"==typeof t.children[0]||"function"==typeof t.children[0])&&(null!==t.children[0].props&&"object"==typeof t.children[0].props||"function"==typeof t.children[0].props)&&Array.isArray(t.children[0].props.children)&&(null!==t.children[0].props.children[1]&&"object"==typeof t.children[0].props.children[1]||"function"==typeof t.children[0].props.children[1])&&(null!==t.children[0].props.children[1].props&&"object"==typeof t.children[0].props.children[1].props||"function"==typeof t.children[0].props.children[1].props)&&(null!==t.children[0].props.children[1].props.user&&"object"==typeof t.children[0].props.children[1].props.user||"function"==typeof t.children[0].props.children[1].props.user)&&(void 0===t.children[0].props.children[1].props.user.possibly_sensitive||null===t.children[0].props.children[1].props.user.possibly_sensitive||!1===t.children[0].props.children[1].props.user.possibly_sensitive||!0===t.children[0].props.children[1].props.user.possibly_sensitive)&&"string"==typeof t.children[0].props.children[1].props.user.screen_name&&(""===t.children[0].props.children[1].props.user.profile_interstitial_type||"sensitive_media"===t.children[0].props.children[1].props.user.profile_interstitial_type||"fake_account"===t.children[0].props.children[1].props.user.profile_interstitial_type||"offensive_profile_content"===t.children[0].props.children[1].props.user.profile_interstitial_type||"timeout"===t.children[0].props.children[1].props.user.profile_interstitial_type)&&Array.isArray(t.children[0].props.children[1].props.user.withheld_in_countries)&&t.children[0].props.children[1].props.user.withheld_in_countries.every((e=>"string"==typeof e))}(e))throw new Error("Failed to get React props of profile");return e.children[0].props.children[1].props.user}}var S=r(531);class C{tweetElement;constructor(e){this.tweetElement=e}getMenuBar(){const e=this.tweetElement.querySelector("div[role='group'][id]");if(!e)throw new Error("Failed to get menu bar of tweet");return e}get element(){return this.tweetElement}get props(){const e=_(this.getMenuBar());if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[1]&&"object"==typeof t.children[1]||"function"==typeof t.children[1])&&(null!==t.children[1].props&&"object"==typeof t.children[1].props||"function"==typeof t.children[1].props)&&(null!==t.children[1].props.retweetWithCommentLink&&"object"==typeof t.children[1].props.retweetWithCommentLink||"function"==typeof t.children[1].props.retweetWithCommentLink)&&(null!==t.children[1].props.retweetWithCommentLink.state&&"object"==typeof t.children[1].props.retweetWithCommentLink.state||"function"==typeof t.children[1].props.retweetWithCommentLink.state)&&(null!==t.children[1].props.retweetWithCommentLink.state.quotedStatus&&"object"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus||"function"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable)&&"string"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.permalink&&(null!==t.children[1].props.retweetWithCommentLink.state.quotedStatus.user&&"object"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user||"function"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive)&&"string"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.screen_name&&(""===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"sensitive_media"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"fake_account"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"offensive_profile_content"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"timeout"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type)&&Array.isArray(t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.withheld_in_countries)&&t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.withheld_in_countries.every((e=>"string"==typeof e))}(e))throw new Error("Failed to get React props of tweet");return e.children[1].props.retweetWithCommentLink.state.quotedStatus}get metadata(){const e=this.props.user.screen_name,t=_(this.element);if(!t)throw new Error("Failed to get React props of tweet");let r=null;const n=function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&Array.isArray(t.children[0])&&(null!==t.children[0][1]&&"object"==typeof t.children[0][1]||"function"==typeof t.children[0][1])&&(null!==t.children[0][1].props&&"object"==typeof t.children[0][1].props||"function"==typeof t.children[0][1].props)&&Array.isArray(t.children[0][1].props.children)&&(null!==t.children[0][1].props.children[0]&&"object"==typeof t.children[0][1].props.children[0]||"function"==typeof t.children[0][1].props.children[0])&&(null!==t.children[0][1].props.children[0].props&&"object"==typeof t.children[0][1].props.children[0].props||"function"==typeof t.children[0][1].props.children[0].props)&&Array.isArray(t.children[0][1].props.children[0].props.children)&&(null!==t.children[0][1].props.children[0].props.children[2]&&"object"==typeof t.children[0][1].props.children[0].props.children[2]||"function"==typeof t.children[0][1].props.children[0].props.children[2])&&(null!==t.children[0][1].props.children[0].props.children[2].props&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props||"function"==typeof t.children[0][1].props.children[0].props.children[2].props)&&Array.isArray(t.children[0][1].props.children[0].props.children[2].props.children)&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7]&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7]||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7])&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7].props&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props)&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser)&&"string"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser.screen_name}(t);return function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&Array.isArray(t.children[0])&&(null!==t.children[0][1]&&"object"==typeof t.children[0][1]||"function"==typeof t.children[0][1])&&(null!==t.children[0][1].props&&"object"==typeof t.children[0][1].props||"function"==typeof t.children[0][1].props)&&Array.isArray(t.children[0][1].props.children)&&(null!==t.children[0][1].props.children[0]&&"object"==typeof t.children[0][1].props.children[0]||"function"==typeof t.children[0][1].props.children[0])&&(null!==t.children[0][1].props.children[0].props&&"object"==typeof t.children[0][1].props.children[0].props||"function"==typeof t.children[0][1].props.children[0].props)&&Array.isArray(t.children[0][1].props.children[0].props.children)&&(null!==t.children[0][1].props.children[0].props.children[1]&&"object"==typeof t.children[0][1].props.children[0].props.children[1]||"function"==typeof t.children[0][1].props.children[0].props.children[1])&&(null!==t.children[0][1].props.children[0].props.children[1].props&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props||"function"==typeof t.children[0][1].props.children[0].props.children[1].props)&&Array.isArray(t.children[0][1].props.children[0].props.children[1].props.children)&&Array.isArray(t.children[0][1].props.children[0].props.children[1].props.children[1])&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2]&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2]||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2])&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2].props&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props)&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser)&&"string"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser.screen_name}(t)&&(r=t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser.screen_name),n&&(r=t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser.screen_name),{isFocalMode:n,isPostedByCurrentUser:e===r}}async clickRetweetButton(e){const t=await(0,S.asyncQuerySelector)("[data-testid='unretweet'], [data-testid='retweet']",this.tweetElement,e);if(!t)throw new Error("Failed to get retweet button of tweet");t.click()}static async clickQuoteButton(e){const t=await(0,S.asyncQuerySelector)(["[data-testid='Dropdown'] [href='/compose/post']","[data-testid='sheetDialog'] [href='/compose/post']"].join(","),document,e);if(!t)throw new Error("Failed to get quote button of tweet");t.click()}static async getTweetTextBox(e){const t="pro.twitter.com"===location.hostname?"[role='dialog'] [data-text='true'], [role='dialog'] textarea[data-testid='tweetTextarea_0']":"[role='dialog'] [data-text='true'], textarea[data-testid='tweetTextarea_0']",r=await(0,S.asyncQuerySelector)(t,document,e);if(!r)throw new Error("Failed to get text box marker of tweet");const n="TEXTAREA"===r.tagName?r:r.parentElement;if(!n)throw new Error("Failed to get text box of tweet");return n}async quoteTweet(e,t=1e3){try{await this.clickRetweetButton(t),await C.clickQuoteButton(t);const r=await C.getTweetTextBox(t);r.innerHTML=e,r.dispatchEvent(new Event("input",{bubbles:!0}))}catch(t){const r=this.props.permalink;open(`https://twitter.com/intent/tweet?text=${encodeURIComponent(`${e}\nhttps://twitter.com${r}`)}`,"_blank")}}}const x={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var $,E=new Uint8Array(16);function k(){if(!$&&!($="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $(E)}for(var P=[],T=0;T<256;++T)P.push((T+256).toString(16).slice(1));const I=function(e,t,r){if(x.randomUUID&&!t&&!e)return x.randomUUID();var n=(e=e||{}).random||(e.rng||k)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var s=0;s<16;++s)t[r+s]=n[s];return t}return function(e,t=0){return(P[e[t+0]]+P[e[t+1]]+P[e[t+2]]+P[e[t+3]]+"-"+P[e[t+4]]+P[e[t+5]]+"-"+P[e[t+6]]+P[e[t+7]]+"-"+P[e[t+8]]+P[e[t+9]]+"-"+P[e[t+10]]+P[e[t+11]]+P[e[t+12]]+P[e[t+13]]+P[e[t+14]]+P[e[t+15]]).toLowerCase()}(n)};class N{OBSERVER_OPTIONS={childList:!0,subtree:!0};onNewTweetCallback=null;onNewProfileCallback=null;constructor(e){const t=`data-twi-ext-checked-${I()}`,r={timeoutMs:1e4,...e},n=new MutationObserver((()=>{if(this.onNewTweetCallback){const e=document.querySelectorAll(`[data-testid="tweet"]:not([${t}])`);for(const r of e)r.setAttribute(t,""),this.onNewTweetCallback(new C(r))}if(this.onNewProfileCallback){const e=document.querySelector(`:not([data-testid="tweet"]) [data-testid="UserName"]:not([${t}])`);e&&(e.setAttribute(t,""),this.onNewProfileCallback(new A(e)))}}));(0,S.asyncQuerySelector)("main",document,r.timeoutMs).then((e=>{if(!e)throw new Error("twi-ext: Failed to get main element");n.observe(e,this.OBSERVER_OPTIONS)})),(0,S.asyncQuerySelector)("#layers",document,r.timeoutMs).then((e=>{if(!e)throw new Error("twi-ext: Failed to get #layers element");n.observe(e,this.OBSERVER_OPTIONS)}))}onNewTweet(e){this.onNewTweetCallback=e}onNewProfile(e){this.onNewProfileCallback=e}}const O=e=>{const t=Boolean(e.possibly_sensitive),r=Boolean(["sensitive_media","offensive_profile_content"].includes(e.profile_interstitial_type)),n=e.withheld_in_countries,s=t||r;return{user:{hasAnyProblem:s||n.length>0,sensitiveMediaInProfile:r,shadowbanned:s,withheldInCountries:n}}},R=e=>{const t=navigator.language,r=new Intl.ListFormat(t,{style:"narrow",type:"conjunction"}),n=new Intl.DisplayNames([t],{type:"region"}),s=e.map((e=>n.of(e)||""));return r.format(s)},U=(e,t,r,n)=>{const s=(e=>{const t=(e=>e.user.shadowbanned||e.user.sensitiveMediaInProfile||Boolean(e.user.withheldInCountries.length)||e.tweet.possiblySensitive?e.user.withheldInCountries.length?"accountIsBlockedInSomeCountries":e.user.shadowbanned||e.user.sensitiveMediaInProfile?e.tweet.possiblySensitive?e.tweet.ageRestriction?"accountAndTweetShadowbanned":"accountShadowbannedAndTweetFlaggedAsSensitive":"accountShadowbanned":e.tweet.ageRestriction?"tweetShadowbanned":"tweetFlaggedAsSensitive":"tweetNoProblem")(e),r=(e=>[e.user.shadowbanned?"accountIsShadowbannedOrFlaggedAsSensitive":"accountIsNotFlaggedAsSensitive",e.user.sensitiveMediaInProfile?"profileContainsSensitiveMedia":"profileDoesNotContainSensitiveMedia",e.user.withheldInCountries.length?{messageName:"accountIsWithheldInCountries",substitutions:R(e.user.withheldInCountries)}:"accountIsNotWithheldInCountries"])(e),n=(e=>[e.tweet.possiblySensitive?"tweetIsFlaggedAsSensitive":"tweetIsNotFlaggedAsSensitive",e.tweet.ageRestriction?"tweetIsAgeRestricted":"tweetIsNotAgeRestricted",{possiblyUnsearchable:"tweetMayNotBeSearchable",searchable:"tweetIsSearchable",unsearchable:"tweetIsNotSearchable"}[e.tweet.searchability]])(e);return{details:[...r,...n],summary:t}})(t),o=(e=>{const t="searchable"===e.tweet.searchability;return`\n${e.user.shadowbanned?"🚫Account flagged as sensitive or shadowbanned":"✅Account not flagged as sensitive"}\n${e.user.sensitiveMediaInProfile?"🚫Sensitive flag on profile media":"✅No sensitive flag on profile media"}\n${e.user.withheldInCountries.length?"🚫Account blocked in some countries":"✅Account not blocked in any countries"}\n${e.tweet.possiblySensitive?"🚫Sensitive flag on tweet":"✅No sensitive flag on tweet"}\n${e.tweet.ageRestriction?"🚫Age limit on tweet":"✅No age limit on tweet"}\n${t?"✅Tweet searchable":"🚫Tweet may not be searchable"}\n\nShadowban Scanner by ろぼいん\n${navigator.language.toLowerCase().startsWith("ja")?"https://shadowban-scanner.roboin.io/ja/":"https://shadowban-scanner.roboin.io/en/"}\n `.trim()})(t);return{...s,isAlert:t.tweet.hasAnyProblem,isExpanded:n.alwaysDetailedView,isNoteShown:n.showNotesInMessages,isTweetButtonShown:n.showTweetButton,notes:["falsePositivesAndFalseNegativesOccur","translatedByAI"],onRenderedCallback:r,tweet:e,tweetText:o,type:"tweet"}};function M(e,t,r,n){var s,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;const j=e=>(t,r)=>{void 0!==r?r.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)},L=globalThis,B=L.ShadowRoot&&(void 0===L.ShadyCSS||L.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,F=Symbol(),q=new WeakMap;class W{constructor(e,t,r){if(this._$cssResult$=!0,r!==F)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(B&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=q.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&q.set(t,e))}return e}toString(){return this.cssText}}const z=(e,...t)=>{const r=1===e.length?e[0]:t.reduce(((t,r,n)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[n+1]),e[0]);return new W(r,e,F)},H=B?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return(e=>new W("string"==typeof e?e:e+"",void 0,F))(t)})(e):e,{is:D,defineProperty:V,getOwnPropertyDescriptor:G,getOwnPropertyNames:Q,getOwnPropertySymbols:K,getPrototypeOf:Y}=Object,J=globalThis,X=J.trustedTypes,Z=X?X.emptyScript:"",ee=J.reactiveElementPolyfillSupport,te=(e,t)=>e,re={toAttribute(e,t){switch(t){case Boolean:e=e?Z:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},ne=(e,t)=>!D(e,t),se={attribute:!0,type:String,converter:re,reflect:!1,hasChanged:ne};Symbol.metadata??=Symbol("metadata"),J.litPropertyMetadata??=new WeakMap;class oe extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=se){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(e,r,t);void 0!==n&&V(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){const{get:n,set:s}=G(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return n?.call(this)},set(t){const o=n?.call(this);s.call(this,t),this.requestUpdate(e,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??se}static _$Ei(){if(this.hasOwnProperty(te("elementProperties")))return;const e=Y(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(te("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(te("properties"))){const e=this.properties,t=[...Q(e),...K(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(H(e))}else void 0!==e&&t.push(H(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(B)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const r of t){const t=document.createElement("style"),n=L.litNonce;void 0!==n&&t.setAttribute("nonce",n),t.textContent=r.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EC(e,t){const r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(void 0!==n&&!0===r.reflect){const s=(void 0!==r.converter?.toAttribute?r.converter:re).toAttribute(t,r.type);this._$Em=e,null==s?this.removeAttribute(n):this.setAttribute(n,s),this._$Em=null}}_$AK(e,t){const r=this.constructor,n=r._$Eh.get(e);if(void 0!==n&&this._$Em!==n){const e=r.getPropertyOptions(n),s="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:re;this._$Em=n,this[n]=s.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){if(r??=this.constructor.getPropertyOptions(e),!(r.hasChanged??ne)(this[e],t))return;this.P(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,r){this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e)!0!==r.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],r)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}}oe.elementStyles=[],oe.shadowRootOptions={mode:"open"},oe[te("elementProperties")]=new Map,oe[te("finalized")]=new Map,ee?.({ReactiveElement:oe}),(J.reactiveElementVersions??=[]).push("2.0.4");const ie={attribute:!0,type:String,converter:re,reflect:!1,hasChanged:ne},ae=(e=ie,t,r)=>{const{kind:n,metadata:s}=r;let o=globalThis.litPropertyMetadata.get(s);if(void 0===o&&globalThis.litPropertyMetadata.set(s,o=new Map),o.set(r.name,e),"accessor"===n){const{name:n}=r;return{set(r){const s=t.get.call(this);t.set.call(this,r),this.requestUpdate(n,s,e)},init(t){return void 0!==t&&this.P(n,void 0,e),t}}}if("setter"===n){const{name:n}=r;return function(r){const s=this[n];t.call(this,r),this.requestUpdate(n,s,e)}}throw Error("Unsupported decorator location: "+n)};function le(e){return(t,r)=>"object"==typeof r?ae(e,t,r):((e,t,r)=>{const n=t.hasOwnProperty(r);return t.constructor.createProperty(r,n?{...e,wrapped:!0}:e),n?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}function ce(e){return le({...e,state:!0,attribute:!1})}const de=(e,t,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,r),r);function he(e,t){return(r,n,s)=>{const o=t=>t.renderRoot?.querySelector(e)??null;if(t){const{get:e,set:t}="object"==typeof n?r:s??(()=>{const e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return de(r,n,{get(){let r=e.call(this);return void 0===r&&(r=o(this),(null!==r||this.hasUpdated)&&t.call(this,r)),r}})}return de(r,n,{get(){return o(this)}})}}const pe=globalThis,ue=pe.trustedTypes,fe=ue?ue.createPolicy("lit-html",{createHTML:e=>e}):void 0,me="$lit$",be=`lit$${Math.random().toFixed(9).slice(2)}$`,ge="?"+be,ye=`<${ge}>`,ve=document,we=()=>ve.createComment(""),_e=e=>null===e||"object"!=typeof e&&"function"!=typeof e,Ae=Array.isArray,Se="[ \t\n\f\r]",Ce=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,xe=/-->/g,$e=/>/g,Ee=RegExp(`>|${Se}(?:([^\\s"'>=/]+)(${Se}*=${Se}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ke=/'/g,Pe=/"/g,Te=/^(?:script|style|textarea|title)$/i,Ie=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),Ne=Ie(1),Oe=(Ie(2),Ie(3),Symbol.for("lit-noChange")),Re=Symbol.for("lit-nothing"),Ue=new WeakMap,Me=ve.createTreeWalker(ve,129);function je(e,t){if(!Ae(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==fe?fe.createHTML(t):t}class Le{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let s=0,o=0;const i=e.length-1,a=this.parts,[l,c]=((e,t)=>{const r=e.length-1,n=[];let s,o=2===t?"":3===t?"":"",i=Ce;for(let t=0;t"===l[0]?(i=s??Ce,c=-1):void 0===l[1]?c=-2:(c=i.lastIndex-l[2].length,a=l[1],i=void 0===l[3]?Ee:'"'===l[3]?Pe:ke):i===Pe||i===ke?i=Ee:i===xe||i===$e?i=Ce:(i=Ee,s=void 0);const h=i===Ee&&e[t+1].startsWith("/>")?" ":"";o+=i===Ce?r+ye:c>=0?(n.push(a),r.slice(0,c)+me+r.slice(c)+be+h):r+be+(-2===c?t:h)}return[je(e,o+(e[r]||"")+(2===t?"":3===t?"":"")),n]})(e,t);if(this.el=Le.createElement(l,r),Me.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=Me.nextNode())&&a.length0){n.textContent=ue?ue.emptyScript:"";for(let r=0;rAe(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Re&&_e(this._$AH)?this._$AA.nextSibling.data=e:this.T(ve.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:r}=e,n="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=Le.createElement(je(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{const e=new Fe(n,this),r=e.u(this.options);e.p(t),this.T(r),this._$AH=e}}_$AC(e){let t=Ue.get(e.strings);return void 0===t&&Ue.set(e.strings,t=new Le(e)),t}k(e){Ae(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,n=0;for(const s of e)n===t.length?t.push(r=new qe(this.O(we()),this.O(we()),this,this.options)):r=t[n],r._$AI(s),n++;n2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=Re}_$AI(e,t=this,r,n){const s=this.strings;let o=!1;if(void 0===s)e=Be(this,e,t,0),o=!_e(e)||e!==this._$AH&&e!==Oe,o&&(this._$AH=e);else{const n=e;let i,a;for(e=s[0],i=0;i{const n=r?.renderBefore??t;let s=n._$litPart$;if(void 0===s){const e=r?.renderBefore??null;n._$litPart$=s=new qe(t.insertBefore(we(),e),e,void 0,r??{})}return s._$AI(e),s})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return Oe}}Qe._$litElement$=!0,Qe.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:Qe});const Ke=globalThis.litElementPolyfillSupport;Ke?.({LitElement:Qe}),(globalThis.litElementVersions??=[]).push("4.1.0");class Ye extends Qe{connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){return Ne``}}const Je=z`:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute;transition-duration:inherit;transition-property:inherit;transition-timing-function:inherit}:host{display:flex;pointer-events:none;transition-property:box-shadow,opacity}.shadow::before,.shadow::after{content:"";transition-property:box-shadow,opacity;--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000))}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color);opacity:.15} +`;let Xe=class extends Ye{};Xe.styles=[Je],Xe=M([j("md-elevation")],Xe);const Ze=Symbol("attachableController");let et;et=new MutationObserver((e=>{for(const t of e)t.target[Ze]?.hostConnected()}));class tt{get htmlFor(){return this.host.getAttribute("for")}set htmlFor(e){null===e?this.host.removeAttribute("for"):this.host.setAttribute("for",e)}get control(){return this.host.hasAttribute("for")?this.htmlFor&&this.host.isConnected?this.host.getRootNode().querySelector(`#${this.htmlFor}`):null:this.currentControl||this.host.parentElement}set control(e){e?this.attach(e):this.detach()}constructor(e,t){this.host=e,this.onControlChange=t,this.currentControl=null,e.addController(this),e[Ze]=this,et?.observe(e,{attributeFilter:["for"]})}attach(e){e!==this.currentControl&&(this.setCurrentControl(e),this.host.removeAttribute("for"))}detach(){this.setCurrentControl(null),this.host.setAttribute("for","")}hostConnected(){this.setCurrentControl(this.control)}hostDisconnected(){this.setCurrentControl(null)}setCurrentControl(e){this.onControlChange(this.currentControl,e),this.currentControl=e}}const rt=["focusin","focusout","pointerdown"];class nt extends Qe{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new tt(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}handleEvent(e){if(!e[st]){switch(e.type){default:return;case"focusin":this.visible=this.control?.matches(":focus-visible")??!1;break;case"focusout":case"pointerdown":this.visible=!1}e[st]=!0}}onControlChange(e,t){for(const r of rt)e?.removeEventListener(r,this),t?.addEventListener(r,this)}update(e){e.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(e)}}M([le({type:Boolean,reflect:!0})],nt.prototype,"visible",void 0),M([le({type:Boolean,reflect:!0})],nt.prototype,"inward",void 0);const st=Symbol("handledByFocusRing"),ot=z`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}} +`;let it=class extends nt{};it.styles=[ot],it=M([j("md-focus-ring")],it);class at{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this.t=e,this._$AM=t,this.i=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const lt=(e=>(...t)=>({_$litDirective$:e,values:t}))(class extends at{constructor(e){if(super(e),1!==e.type||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}const r=e.element.classList;for(const e of this.st)e in t||(r.remove(e),this.st.delete(e));for(const e in t){const n=!!t[e];n===this.st.has(e)||this.nt?.has(e)||(n?(r.add(e),this.st.add(e)):(r.remove(e),this.st.delete(e)))}return Oe}});var ct;!function(e){e[e.INACTIVE=0]="INACTIVE",e[e.TOUCH_DELAY=1]="TOUCH_DELAY",e[e.HOLDING=2]="HOLDING",e[e.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"}(ct||(ct={}));const dt=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],ht=window.matchMedia("(forced-colors: active)");class pt extends Qe{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=ct.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new tt(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const e={hovered:this.hovered,pressed:this.pressed};return Ne`
`}update(e){e.has("disabled")&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(e)}handlePointerenter(e){this.shouldReactToEvent(e)&&(this.hovered=!0)}handlePointerleave(e){this.shouldReactToEvent(e)&&(this.hovered=!1,this.state!==ct.INACTIVE&&this.endPressAnimation())}handlePointerup(e){if(this.shouldReactToEvent(e)){if(this.state!==ct.HOLDING)return this.state===ct.TOUCH_DELAY?(this.state=ct.WAITING_FOR_CLICK,void this.startPressAnimation(this.rippleStartEvent)):void 0;this.state=ct.WAITING_FOR_CLICK}}async handlePointerdown(e){if(this.shouldReactToEvent(e)){if(this.rippleStartEvent=e,!this.isTouch(e))return this.state=ct.WAITING_FOR_CLICK,void this.startPressAnimation(e);this.checkBoundsAfterContextMenu&&!this.inBounds(e)||(this.checkBoundsAfterContextMenu=!1,this.state=ct.TOUCH_DELAY,await new Promise((e=>{setTimeout(e,150)})),this.state===ct.TOUCH_DELAY&&(this.state=ct.HOLDING,this.startPressAnimation(e)))}}handleClick(){this.disabled||(this.state!==ct.WAITING_FOR_CLICK?this.state===ct.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation()):this.endPressAnimation())}handlePointercancel(e){this.shouldReactToEvent(e)&&this.endPressAnimation()}handleContextmenu(){this.disabled||(this.checkBoundsAfterContextMenu=!0,this.endPressAnimation())}determineRippleSize(){const{height:e,width:t}=this.getBoundingClientRect(),r=Math.max(e,t),n=Math.max(.35*r,75),s=Math.floor(.2*r),o=Math.sqrt(t**2+e**2)+10;this.initialSize=s,this.rippleScale=""+(o+n)/s,this.rippleSize=`${s}px`}getNormalizedPointerEventCoords(e){const{scrollX:t,scrollY:r}=window,{left:n,top:s}=this.getBoundingClientRect(),o=t+n,i=r+s,{pageX:a,pageY:l}=e;return{x:a-o,y:l-i}}getTranslationCoordinates(e){const{height:t,width:r}=this.getBoundingClientRect(),n={x:(r-this.initialSize)/2,y:(t-this.initialSize)/2};let s;return s=e instanceof PointerEvent?this.getNormalizedPointerEventCoords(e):{x:r/2,y:t/2},s={x:s.x-this.initialSize/2,y:s.y-this.initialSize/2},{startPoint:s,endPoint:n}}startPressAnimation(e){if(!this.mdRoot)return;this.pressed=!0,this.growAnimation?.cancel(),this.determineRippleSize();const{startPoint:t,endPoint:r}=this.getTranslationCoordinates(e),n=`${t.x}px, ${t.y}px`,s=`${r.x}px, ${r.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${n}) scale(1)`,`translate(${s}) scale(${this.rippleScale})`]},{pseudoElement:"::after",duration:450,easing:"cubic-bezier(0.2, 0, 0, 1)",fill:"forwards"})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=ct.INACTIVE;const e=this.growAnimation;let t=1/0;"number"==typeof e?.currentTime?t=e.currentTime:e?.currentTime&&(t=e.currentTime.to("ms").value),t>=225?this.pressed=!1:(await new Promise((e=>{setTimeout(e,225-t)})),this.growAnimation===e&&(this.pressed=!1))}shouldReactToEvent(e){if(this.disabled||!e.isPrimary)return!1;if(this.rippleStartEvent&&this.rippleStartEvent.pointerId!==e.pointerId)return!1;if("pointerenter"===e.type||"pointerleave"===e.type)return!this.isTouch(e);const t=1===e.buttons;return this.isTouch(e)||t}inBounds({x:e,y:t}){const{top:r,left:n,bottom:s,right:o}=this.getBoundingClientRect();return e>=n&&e<=o&&t>=r&&t<=s}isTouch({pointerType:e}){return"touch"===e}async handleEvent(e){if(!ht?.matches)switch(e.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(e);break;case"pointerdown":await this.handlePointerdown(e);break;case"pointerenter":this.handlePointerenter(e);break;case"pointerleave":this.handlePointerleave(e);break;case"pointerup":this.handlePointerup(e)}}onControlChange(e,t){for(const r of dt)e?.removeEventListener(r,this),t?.addEventListener(r,this)}}M([le({type:Boolean,reflect:!0})],pt.prototype,"disabled",void 0),M([ce()],pt.prototype,"hovered",void 0),M([ce()],pt.prototype,"pressed",void 0),M([he(".surface")],pt.prototype,"mdRoot",void 0);const ut=z`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms} +`;let ft=class extends pt{};ft.styles=[ut],ft=M([j("md-ripple")],ft);const mt=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText"],bt=mt.map(yt);function gt(e){return bt.includes(e)}function yt(e){return e.replace("aria","aria-").replace(/Elements?/g,"").toLowerCase()}const vt=Symbol("privateIgnoreAttributeChangesFor");function wt(e){return`data-${e}`}function _t(e){return e.replace(/-\w/,(e=>e[1].toUpperCase()))}const At=Symbol("internals"),St=Symbol("privateInternals");let Ct=!1;const xt=function(e){var t;class r extends e{constructor(){super(...arguments),this[t]=new Set}attributeChangedCallback(e,t,r){if(!gt(e))return void super.attributeChangedCallback(e,t,r);if(this[vt].has(e))return;this[vt].add(e),this.removeAttribute(e),this[vt].delete(e);const n=_t(e);null===r?delete this.dataset[n]:this.dataset[n]=r,this.requestUpdate(_t(e),t)}getAttribute(e){return gt(e)?super.getAttribute(wt(e)):super.getAttribute(e)}removeAttribute(e){super.removeAttribute(e),gt(e)&&(super.removeAttribute(wt(e)),this.requestUpdate())}}return t=vt,function(e){for(const t of mt){const r=yt(t),n=wt(r),s=_t(r);e.createProperty(t,{attribute:r,noAccessor:!0}),e.createProperty(Symbol(n),{attribute:n,noAccessor:!0}),Object.defineProperty(e.prototype,t,{configurable:!0,enumerable:!0,get(){return this.dataset[s]??null},set(e){const r=this.dataset[s]??null;e!==r&&(null===e?delete this.dataset[s]:this.dataset[s]=e,this.requestUpdate(t,r))}})}}(r),r}(($t=Qe,class extends $t{get[At](){return this[St]||(this[St]=this.attachInternals()),this[St]}}));var $t;class Et extends xt{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[At].form}constructor(){super(),this.disabled=!1,this.softDisabled=!1,this.href="",this.target="",this.trailingIcon=!1,this.hasIcon=!1,this.type="submit",this.value="",this.addEventListener("click",this.handleClick.bind(this))}focus(){this.buttonElement?.focus()}blur(){this.buttonElement?.blur()}render(){const e=!this.href&&(this.disabled||this.softDisabled),t=this.href?this.renderLink():this.renderButton(),r=this.href?"link":"button";return Ne` + ${this.renderElevationOrOutline?.()} +
+ + + ${t} + `}renderButton(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return Ne``}renderLink(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return Ne`${this.renderContent()} + `}renderContent(){const e=Ne``;return Ne` + + ${this.trailingIcon?Re:e} + + ${this.trailingIcon?e:Re} + `}handleClick(e){if(!this.href&&this.softDisabled)return e.stopImmediatePropagation(),void e.preventDefault();(function(e){return e.currentTarget===e.target&&e.composedPath()[0]===e.target&&!e.target.disabled&&!function(e){const t=Ct;return t&&(e.preventDefault(),e.stopImmediatePropagation()),async function(){Ct=!0,await null,Ct=!1}(),t}(e)})(e)&&this.buttonElement&&(this.focus(),function(e){const t=new MouseEvent("click",{bubbles:!0});e.dispatchEvent(t)}(this.buttonElement))}handleSlotChange(){this.hasIcon=this.assignedIcons.length>0}}Et.addInitializer((e=>{const t=e;t.addEventListener("click",(async e=>{const{type:r,[At]:n}=t,{form:s}=n;s&&"button"!==r&&(await new Promise((e=>{setTimeout(e)})),e.defaultPrevented||("reset"!==r?(s.addEventListener("submit",(e=>{Object.defineProperty(e,"submitter",{configurable:!0,enumerable:!0,get:()=>t})}),{capture:!0,once:!0}),n.setFormValue(t.value),s.requestSubmit()):s.reset()))}))})),Et.formAssociated=!0,Et.shadowRootOptions={mode:"open",delegatesFocus:!0},M([le({type:Boolean,reflect:!0})],Et.prototype,"disabled",void 0),M([le({type:Boolean,attribute:"soft-disabled",reflect:!0})],Et.prototype,"softDisabled",void 0),M([le()],Et.prototype,"href",void 0),M([le()],Et.prototype,"target",void 0),M([le({type:Boolean,attribute:"trailing-icon",reflect:!0})],Et.prototype,"trailingIcon",void 0),M([le({type:Boolean,attribute:"has-icon",reflect:!0})],Et.prototype,"hasIcon",void 0),M([le()],Et.prototype,"type",void 0),M([le({reflect:!0})],Et.prototype,"value",void 0),M([he(".button")],Et.prototype,"buttonElement",void 0),M([function(e){return(t,r)=>{const{slot:n,selector:s}=e??{},o="slot"+(n?`[name=${n}]`:":not([name])");return de(t,r,{get(){const t=this.renderRoot?.querySelector(o),r=t?.assignedElements(e)??[];return void 0===s?r:r.filter((e=>e.matches(s)))}})}}({slot:"icon",flatten:!0})],Et.prototype,"assignedIcons",void 0);class kt extends Et{renderElevationOrOutline(){return Ne``}}const Pt=z`:host{--_container-color: var(--md-filled-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-elevation: var(--md-filled-button-container-elevation, 0);--_container-height: var(--md-filled-button-container-height, 40px);--_container-shadow-color: var(--md-filled-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-button-focus-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-container-elevation: var(--md-filled-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-button-hover-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-button-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-filled-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-button-pressed-label-text-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-color: var(--md-filled-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_container-shape-start-start: var(--md-filled-button-container-shape-start-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-button-container-shape-start-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-button-container-shape-end-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-button-container-shape-end-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-button-leading-space, 24px);--_trailing-space: var(--md-filled-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-button-with-trailing-icon-trailing-space, 16px)} +`,Tt=z`md-elevation{transition-duration:280ms}:host(:is([disabled],[soft-disabled])) md-elevation{transition:none}md-elevation{--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}:host(:focus-within) md-elevation{--md-elevation-level: var(--_focus-container-elevation)}:host(:hover) md-elevation{--md-elevation-level: var(--_hover-container-elevation)}:host(:active) md-elevation{--md-elevation-level: var(--_pressed-container-elevation)}:host(:is([disabled],[soft-disabled])) md-elevation{--md-elevation-level: var(--_disabled-container-elevation)} +`,It=z`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background-color:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host(:is([disabled],[soft-disabled])) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host(:is([disabled],[soft-disabled])) .background{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host(:is([disabled],[soft-disabled])) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none} +`;let Nt=class extends kt{};Nt.styles=[It,Tt,Pt],Nt=M([j("md-filled-button")],Nt);var Ot,Rt=function(e,t,r,n){var s,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i};let Ut=class extends Qe{static{Ot=this}summary="tweetNoProblem";details=[];notes=[];isAlert=!1;isExpanded=!1;isFocalMode=!1;isTweetButtonShown=!1;isNoteShown=!1;onRenderedCallback;textColor="white";static styles=z` * { font-family: sans-serif; } @@ -128,44 +147,25 @@ opacity: 1; } } - `,s([(0,i.property)({reflect:!0})],l.prototype,"summary",void 0),s([(0,i.property)({reflect:!0,type:Array})],l.prototype,"details",void 0),s([(0,i.property)({reflect:!0,type:Array})],l.prototype,"notes",void 0),s([(0,i.property)({reflect:!0,type:Boolean})],l.prototype,"isAlert",void 0),s([(0,i.property)({reflect:!0,type:Boolean})],l.prototype,"isExpanded",void 0),s([(0,i.property)({reflect:!0,type:Boolean})],l.prototype,"isFocalMode",void 0),s([(0,i.property)({reflect:!0,type:Boolean})],l.prototype,"isTweetButtonShown",void 0),s([(0,i.property)({reflect:!0,type:Boolean})],l.prototype,"isNoteShown",void 0),s([(0,i.property)({attribute:!1,reflect:!0})],l.prototype,"onRenderedCallback",void 0),s([(0,i.property)({reflect:!0,type:String})],l.prototype,"textColor",void 0),t.SbsMessage=l=n=s([(0,i.customElement)("sbs-message")],l)},6911:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Core=void 0;const n=r(41),s=r(4114),o=r(1520),i=r(902),a=r(3114),l=r(8700),c=r(2634);t.Core=class{constructor(e,t){this.settings=e,this.onMessageCallback=t;const r=new s.Timeline;r.onNewTweet((e=>{this.checkTweet(e),this.timelineObserverCallback()})),r.onNewProfile((e=>{this.checkProfile(e)}))}checkProfile(e){if(Boolean(document.querySelector("[data-testid='editProfileButton']"))&&!this.settings.enableForOtherUsersProfiles)return;const t=i.PropsAnalyzer.analyzeProfileProps(e.props);if(!t.user.hasAnyProblem&&!this.settings.showMessagesInUnproblematicProfiles)return;const r=o.MessageDataGenerator.generateForProfile(t,this.onMessageCallback),n=new a.SbsMessageWrapper(r),s=document.querySelector("[data-testid='UserDescription']")||document.querySelector("[data-testid='UserName']");if(!s)throw new Error("Failed to get user description of profile");n.insertAdjacentElement(s,"afterend")}checkTweet(e){const t=i.PropsAnalyzer.analyzeTweetProps(new c.TweetParser(e));if(!e.metadata.isPostedByCurrentUser&&!this.settings.enableForOtherUsersTweets)return;if(!t.tweet.hasAnyProblem&&!this.settings.showMessagesInUnproblematicTweets)return;const r=o.MessageDataGenerator.generateForTweet(e,t,this.onMessageCallback,this.settings),n=new a.SbsMessageWrapper(r),s=e.element.querySelector("[data-testid='analyticsButton']")?.parentElement||e.element.querySelector("div[role='group'][id]");if(!s)throw new Error("Failed to get landmark element of tweet");n.insertAdjacentElement(s,"beforebegin")}necromancer(e){e.setAttribute(n.CHECKED_DATA_ATTRIBUTE,"true");const t=i.PropsAnalyzer.analyzeTombstoneProps(new l.TombstoneParser(e).parse());if(!t)return;const r=`https://twitter.com/i/status/${t}`,s=document.createElement("a");s.href=r,s.target="_blank",s.setAttribute(n.TRANSLATION_ATTRIBUTE,"viewTweet"),s.classList.add("shadowban-scanner-tombstone-necromancer");const o=e.querySelector("a");if(!o)throw new Error("Failed to get help link");s.style.color=getComputedStyle(o).color,o.insertAdjacentElement("afterend",s),this.onMessageCallback()}timelineObserverCallback(){const e=document.querySelectorAll(`[data-testid='cellInnerDiv']:not([${n.CHECKED_DATA_ATTRIBUTE}])`);for(const t of e)t.setAttribute(n.CHECKED_DATA_ATTRIBUTE,"true"),Boolean(t.querySelector("a[href='https://help.twitter.com/rules-and-policies/notices-on-twitter']"))&&this.necromancer(t)}}},1520:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MessageDataGenerator=void 0;const n=r(8197),s=r(6219);t.MessageDataGenerator=class{static generateForProfile(e,t){return{...s.TranslationKeyProvider.fromProfileAnalyzer(e),isAlert:e.user.hasAnyProblem,onRenderedCallback:t,type:"profile"}}static generateForTweet(e,t,r,o){const i=s.TranslationKeyProvider.fromTweetAnalyzer(t),a=n.ShareTextGenerator.generateShareText(t);return{...i,isAlert:t.tweet.hasAnyProblem,isExpanded:o.alwaysDetailedView,isNoteShown:o.showNotesInMessages,isTweetButtonShown:o.showTweetButton,notes:["falsePositivesAndFalseNegativesOccur","translatedByAI"],onRenderedCallback:r,tweet:e,tweetText:a,type:"tweet"}}}},8700:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TombstoneParser=void 0;const n=r(2632),s=r(543);t.TombstoneParser=class{constructor(e){this.element=e}parse(){const e=(0,s.getReactProps)(this.element);if(!(0,n.isCellInnerDivProps)(e))throw new Error("Type of props is invalid.");const t=this.element.querySelector("div > div");if(!t)throw new Error("Failed to get the tombstone's grandchild element.");const r=(0,s.getReactProps)(t);if(!(0,n.isTombstoneGrandchildProps)(r))throw new Error("Type of grandchild props is invalid.");return[e,r]}}},2634:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TweetParser=void 0,t.TweetParser=class{constructor(e){this.tweet=e}parse(){return this.tweet.props}}},543:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getReactProps=void 0,t.getReactProps=e=>e[Object.getOwnPropertyNames(e).filter((e=>e.startsWith("__reactProps$")))]},902:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropsAnalyzer=void 0;class r{static analyzeProfileProps(e){const t=Boolean(e.possibly_sensitive),r=Boolean(["sensitive_media","offensive_profile_content"].includes(e.profile_interstitial_type)),n=e.withheld_in_countries,s=t||r;return{user:{hasAnyProblem:s||n.length>0,sensitiveMediaInProfile:r,shadowbanned:s,withheldInCountries:n}}}static analyzeTweetProps(e){const t=e.parse(),n=r.analyzeProfileProps(t.user),s=Boolean(t.possibly_sensitive),o=!(!1===t.possibly_sensitive_editable),i=s&&!o;let a="searchable";return i||n.user.shadowbanned?a="unsearchable":s&&(a="possiblyUnsearchable"),{...n,tweet:{ageRestriction:i,hasAnyProblem:"searchable"!==a||n.user.hasAnyProblem,possiblySensitive:s,searchability:a}}}static analyzeTombstoneProps(e){const[t,r]=e;if(!t.children._owner)return;if(r.children[0].props.entry.conversationPosition.showReplyContext)return;const{key:n}=t.children._owner;return n.split("-")[3]}}t.PropsAnalyzer=r},3114:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SbsMessageWrapper=void 0,r(380);const n=r(41);class s{constructor(e){this.tweet=null;const t=document.createElement("sbs-message");if(t.textColor=s.getTextColor(),t.summary=e.summary,t.isAlert=e.isAlert,t.onRenderedCallback=e.onRenderedCallback,"tweet"===e.type){if(!e.tweet)throw new Error("Tweet data is missing");this.tweet=e.tweet,t.details=e.details,t.notes=e.notes,t.isFocalMode=e.tweet.metadata.isFocalMode,t.isExpanded=e.isExpanded,t.isTweetButtonShown=e.isTweetButtonShown,t.isNoteShown=e.isNoteShown,this.tweetText=e.tweetText}else t.isExpanded=!0;t.setAttribute(n.SHADOW_TRANSLATION_ATTRIBUTE,""),t.addEventListener("tweetButtonClick",this.onTweetButtonClick.bind(this)),this.sbsMessage=t}static getTextColor(){const e=["[data-testid='User-Name'] div:first-child span","[data-testid='UserName'] div:first-child span"].join(","),t=document.querySelector(e);if(!t)throw new Error("Failed to get user name span of tweet");const{color:r}=getComputedStyle(t);return r}onTweetButtonClick(){if(!this.tweet||!this.tweetText)throw new Error("Tweet button clicked without source tweet");this.tweet.quoteTweet(this.tweetText)}insertAdjacentElement(e,t){e.insertAdjacentElement(t,this.sbsMessage)}}t.SbsMessageWrapper=s},8197:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ShareTextGenerator=void 0,t.ShareTextGenerator=class{static generateShareText(e){const t="searchable"===e.tweet.searchability;return`\n${e.user.shadowbanned?"🚫Account flagged as sensitive or shadowbanned":"✅Account not flagged as sensitive"}\n${e.user.sensitiveMediaInProfile?"🚫Sensitive flag on profile media":"✅No sensitive flag on profile media"}\n${e.user.withheldInCountries.length?"🚫Account blocked in some countries":"✅Account not blocked in any countries"}\n${e.tweet.possiblySensitive?"🚫Sensitive flag on tweet":"✅No sensitive flag on tweet"}\n${e.tweet.ageRestriction?"🚫Age limit on tweet":"✅No age limit on tweet"}\n${t?"✅Tweet searchable":"🚫Tweet may not be searchable"}\n\nShadowban Scanner by ろぼいん\n${navigator.language.toLowerCase().startsWith("ja")?"https://shadowban-scanner.roboin.io/ja/":"https://shadowban-scanner.roboin.io/en/"}\n `.trim()}}},6219:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TranslationKeyProvider=void 0;class r{static fromProfileAnalyzer(e){let t=null;return t=e.user.shadowbanned?"thisUserIsShadowbanned":e.user.withheldInCountries.length?"accountIsBlockedInSomeCountries":"thisUserIsNotShadowbanned",{summary:t}}static summarizeForTweet(e){return e.user.shadowbanned||e.user.sensitiveMediaInProfile||Boolean(e.user.withheldInCountries.length)||e.tweet.possiblySensitive?e.user.withheldInCountries.length?"accountIsBlockedInSomeCountries":e.user.shadowbanned||e.user.sensitiveMediaInProfile?e.tweet.possiblySensitive?e.tweet.ageRestriction?"accountAndTweetShadowbanned":"accountShadowbannedAndTweetFlaggedAsSensitive":"accountShadowbanned":e.tweet.ageRestriction?"tweetShadowbanned":"tweetFlaggedAsSensitive":"tweetNoProblem"}static formatCountryList(e){const t=navigator.language,r=new Intl.ListFormat(t,{style:"narrow",type:"conjunction"}),n=new Intl.DisplayNames([t],{type:"region"}),s=e.map((e=>n.of(e)||""));return r.format(s)}static getAccountDetails(e){return[e.user.shadowbanned?"accountIsShadowbannedOrFlaggedAsSensitive":"accountIsNotFlaggedAsSensitive",e.user.sensitiveMediaInProfile?"profileContainsSensitiveMedia":"profileDoesNotContainSensitiveMedia",e.user.withheldInCountries.length?{messageName:"accountIsWithheldInCountries",substitutions:r.formatCountryList(e.user.withheldInCountries)}:"accountIsNotWithheldInCountries"]}static getTweetDetails(e){return[e.tweet.possiblySensitive?"tweetIsFlaggedAsSensitive":"tweetIsNotFlaggedAsSensitive",e.tweet.ageRestriction?"tweetIsAgeRestricted":"tweetIsNotAgeRestricted",{possiblyUnsearchable:"tweetMayNotBeSearchable",searchable:"tweetIsSearchable",unsearchable:"tweetIsNotSearchable"}[e.tweet.searchability]]}static fromTweetAnalyzer(e){const t=r.summarizeForTweet(e);return{details:[...r.getAccountDetails(e),...r.getTweetDetails(e)],summary:t}}}t.TranslationKeyProvider=r},2106:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(5540),o=n(r(8785));new s.UserScriptBase(o.default)},5540:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UserScriptBase=void 0,r(5535);const n=r(6911),s=r(8140),o=r(7316);t.UserScriptBase=class{constructor(e){const t=new o.Translator(((t,r)=>{if(r){const n="string"==typeof r?[r]:r;let s=e[t].message;for(let e=0;e{t.translateElements()}))}}},1497:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isTranslationSubstitutions=function(e){const t=e;return void 0===t||"string"==typeof t||Array.isArray(t)&&t.every((e=>"string"==typeof e))}},2632:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isCellInnerDivProps=function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&(null!==t.children&&"object"==typeof t.children||"function"==typeof t.children)&&(void 0===t.children._owner||(null!==t.children._owner&&"object"==typeof t.children._owner||"function"==typeof t.children._owner)&&"string"==typeof t.children._owner.key)},t.isTombstoneGrandchildProps=function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[0]&&"object"==typeof t.children[0]||"function"==typeof t.children[0])&&(null!==t.children[0].props&&"object"==typeof t.children[0].props||"function"==typeof t.children[0].props)&&(null!==t.children[0].props.entry&&"object"==typeof t.children[0].props.entry||"function"==typeof t.children[0].props.entry)&&"tombstone"===t.children[0].props.entry.type&&(null!==t.children[0].props.entry.conversationPosition&&"object"==typeof t.children[0].props.entry.conversationPosition||"function"==typeof t.children[0].props.entry.conversationPosition)&&"boolean"==typeof t.children[0].props.entry.conversationPosition.showReplyContext}},842:(e,t,r)=>{r.d(t,{BO:()=>a,mN:()=>C,Rf:()=>d,AH:()=>c,W3:()=>S,sk:()=>h,Ec:()=>T,qM:()=>s,iz:()=>l});const n=globalThis,s=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),i=new WeakMap;class a{constructor(e,t,r){if(this._$cssResult$=!0,r!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(s&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=i.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&i.set(t,e))}return e}toString(){return this.cssText}}const l=e=>new a("string"==typeof e?e:e+"",void 0,o),c=(e,...t)=>{const r=1===e.length?e[0]:t.reduce(((t,r,n)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[n+1]),e[0]);return new a(r,e,o)},d=(e,t)=>{if(s)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const r of t){const t=document.createElement("style"),s=n.litNonce;void 0!==s&&t.setAttribute("nonce",s),t.textContent=r.cssText,e.appendChild(t)}},h=s?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return l(t)})(e):e,{is:p,defineProperty:u,getOwnPropertyDescriptor:m,getOwnPropertyNames:f,getOwnPropertySymbols:b,getPrototypeOf:y}=Object,g=globalThis,v=g.trustedTypes,w=v?v.emptyScript:"",_=g.reactiveElementPolyfillSupport,A=(e,t)=>e,S={toAttribute(e,t){switch(t){case Boolean:e=e?w:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},T=(e,t)=>!p(e,t),E={attribute:!0,type:String,converter:S,reflect:!1,hasChanged:T};Symbol.metadata??=Symbol("metadata"),g.litPropertyMetadata??=new WeakMap;class C extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=E){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(e,r,t);void 0!==n&&u(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){const{get:n,set:s}=m(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return n?.call(this)},set(t){const o=n?.call(this);s.call(this,t),this.requestUpdate(e,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??E}static _$Ei(){if(this.hasOwnProperty(A("elementProperties")))return;const e=y(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(A("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(A("properties"))){const e=this.properties,t=[...f(e),...b(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(h(e))}else void 0!==e&&t.push(h(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return d(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EC(e,t){const r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(void 0!==n&&!0===r.reflect){const s=(void 0!==r.converter?.toAttribute?r.converter:S).toAttribute(t,r.type);this._$Em=e,null==s?this.removeAttribute(n):this.setAttribute(n,s),this._$Em=null}}_$AK(e,t){const r=this.constructor,n=r._$Eh.get(e);if(void 0!==n&&this._$Em!==n){const e=r.getPropertyOptions(n),s="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:S;this._$Em=n,this[n]=s.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){if(r??=this.constructor.getPropertyOptions(e),!(r.hasChanged??T)(this[e],t))return;this.P(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,r){this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e)!0!==r.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],r)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}}C.elementStyles=[],C.shadowRootOptions={mode:"open"},C[A("elementProperties")]=new Map,C[A("finalized")]=new Map,_?.({ReactiveElement:C}),(g.reactiveElementVersions??=[]).push("2.0.4")},919:(e,t,r)=>{function n(e,t,r,n){var s,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}r.r(t),r.d(t,{MdFilledButton:()=>W}),Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var s=r(2924),o=r(6337);class i extends o.LitElement{connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){return o.html``}}const a=o.css`:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute;transition-duration:inherit;transition-property:inherit;transition-timing-function:inherit}:host{display:flex;pointer-events:none;transition-property:box-shadow,opacity}.shadow::before,.shadow::after{content:"";transition-property:box-shadow,opacity;--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000))}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color);opacity:.15} -`;let l=class extends i{};l.styles=[a],l=n([(0,s.customElement)("md-elevation")],l);const c=Symbol("attachableController");let d;o.isServer||(d=new MutationObserver((e=>{for(const t of e)t.target[c]?.hostConnected()})));class h{get htmlFor(){return this.host.getAttribute("for")}set htmlFor(e){null===e?this.host.removeAttribute("for"):this.host.setAttribute("for",e)}get control(){return this.host.hasAttribute("for")?this.htmlFor&&this.host.isConnected?this.host.getRootNode().querySelector(`#${this.htmlFor}`):null:this.currentControl||this.host.parentElement}set control(e){e?this.attach(e):this.detach()}constructor(e,t){this.host=e,this.onControlChange=t,this.currentControl=null,e.addController(this),e[c]=this,d?.observe(e,{attributeFilter:["for"]})}attach(e){e!==this.currentControl&&(this.setCurrentControl(e),this.host.removeAttribute("for"))}detach(){this.setCurrentControl(null),this.host.setAttribute("for","")}hostConnected(){this.setCurrentControl(this.control)}hostDisconnected(){this.setCurrentControl(null)}setCurrentControl(e){this.onControlChange(this.currentControl,e),this.currentControl=e}}const p=["focusin","focusout","pointerdown"];class u extends o.LitElement{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new h(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}handleEvent(e){if(!e[m]){switch(e.type){default:return;case"focusin":this.visible=this.control?.matches(":focus-visible")??!1;break;case"focusout":case"pointerdown":this.visible=!1}e[m]=!0}}onControlChange(e,t){if(!o.isServer)for(const r of p)e?.removeEventListener(r,this),t?.addEventListener(r,this)}update(e){e.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(e)}}n([(0,s.property)({type:Boolean,reflect:!0})],u.prototype,"visible",void 0),n([(0,s.property)({type:Boolean,reflect:!0})],u.prototype,"inward",void 0);const m=Symbol("handledByFocusRing"),f=o.css`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}} -`;let b=class extends u{};b.styles=[f],b=n([(0,s.customElement)("md-focus-ring")],b);var y=r(2627);var g;!function(e){e[e.INACTIVE=0]="INACTIVE",e[e.TOUCH_DELAY=1]="TOUCH_DELAY",e[e.HOLDING=2]="HOLDING",e[e.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"}(g||(g={}));const v=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],w=o.isServer?null:window.matchMedia("(forced-colors: active)");class _ extends o.LitElement{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=g.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new h(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const e={hovered:this.hovered,pressed:this.pressed};return o.html`
`}update(e){e.has("disabled")&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(e)}handlePointerenter(e){this.shouldReactToEvent(e)&&(this.hovered=!0)}handlePointerleave(e){this.shouldReactToEvent(e)&&(this.hovered=!1,this.state!==g.INACTIVE&&this.endPressAnimation())}handlePointerup(e){if(this.shouldReactToEvent(e)){if(this.state!==g.HOLDING)return this.state===g.TOUCH_DELAY?(this.state=g.WAITING_FOR_CLICK,void this.startPressAnimation(this.rippleStartEvent)):void 0;this.state=g.WAITING_FOR_CLICK}}async handlePointerdown(e){if(this.shouldReactToEvent(e)){if(this.rippleStartEvent=e,!this.isTouch(e))return this.state=g.WAITING_FOR_CLICK,void this.startPressAnimation(e);this.checkBoundsAfterContextMenu&&!this.inBounds(e)||(this.checkBoundsAfterContextMenu=!1,this.state=g.TOUCH_DELAY,await new Promise((e=>{setTimeout(e,150)})),this.state===g.TOUCH_DELAY&&(this.state=g.HOLDING,this.startPressAnimation(e)))}}handleClick(){this.disabled||(this.state!==g.WAITING_FOR_CLICK?this.state===g.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation()):this.endPressAnimation())}handlePointercancel(e){this.shouldReactToEvent(e)&&this.endPressAnimation()}handleContextmenu(){this.disabled||(this.checkBoundsAfterContextMenu=!0,this.endPressAnimation())}determineRippleSize(){const{height:e,width:t}=this.getBoundingClientRect(),r=Math.max(e,t),n=Math.max(.35*r,75),s=Math.floor(.2*r),o=Math.sqrt(t**2+e**2)+10;this.initialSize=s,this.rippleScale=""+(o+n)/s,this.rippleSize=`${s}px`}getNormalizedPointerEventCoords(e){const{scrollX:t,scrollY:r}=window,{left:n,top:s}=this.getBoundingClientRect(),o=t+n,i=r+s,{pageX:a,pageY:l}=e;return{x:a-o,y:l-i}}getTranslationCoordinates(e){const{height:t,width:r}=this.getBoundingClientRect(),n={x:(r-this.initialSize)/2,y:(t-this.initialSize)/2};let s;return s=e instanceof PointerEvent?this.getNormalizedPointerEventCoords(e):{x:r/2,y:t/2},s={x:s.x-this.initialSize/2,y:s.y-this.initialSize/2},{startPoint:s,endPoint:n}}startPressAnimation(e){if(!this.mdRoot)return;this.pressed=!0,this.growAnimation?.cancel(),this.determineRippleSize();const{startPoint:t,endPoint:r}=this.getTranslationCoordinates(e),n=`${t.x}px, ${t.y}px`,s=`${r.x}px, ${r.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${n}) scale(1)`,`translate(${s}) scale(${this.rippleScale})`]},{pseudoElement:"::after",duration:450,easing:"cubic-bezier(0.2, 0, 0, 1)",fill:"forwards"})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=g.INACTIVE;const e=this.growAnimation;let t=1/0;"number"==typeof e?.currentTime?t=e.currentTime:e?.currentTime&&(t=e.currentTime.to("ms").value),t>=225?this.pressed=!1:(await new Promise((e=>{setTimeout(e,225-t)})),this.growAnimation===e&&(this.pressed=!1))}shouldReactToEvent(e){if(this.disabled||!e.isPrimary)return!1;if(this.rippleStartEvent&&this.rippleStartEvent.pointerId!==e.pointerId)return!1;if("pointerenter"===e.type||"pointerleave"===e.type)return!this.isTouch(e);const t=1===e.buttons;return this.isTouch(e)||t}inBounds({x:e,y:t}){const{top:r,left:n,bottom:s,right:o}=this.getBoundingClientRect();return e>=n&&e<=o&&t>=r&&t<=s}isTouch({pointerType:e}){return"touch"===e}async handleEvent(e){if(!w?.matches)switch(e.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(e);break;case"pointerdown":await this.handlePointerdown(e);break;case"pointerenter":this.handlePointerenter(e);break;case"pointerleave":this.handlePointerleave(e);break;case"pointerup":this.handlePointerup(e)}}onControlChange(e,t){if(!o.isServer)for(const r of v)e?.removeEventListener(r,this),t?.addEventListener(r,this)}}n([(0,s.property)({type:Boolean,reflect:!0})],_.prototype,"disabled",void 0),n([(0,s.state)()],_.prototype,"hovered",void 0),n([(0,s.state)()],_.prototype,"pressed",void 0),n([(0,s.query)(".surface")],_.prototype,"mdRoot",void 0);const A=o.css`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms} -`;let S=class extends _{};S.styles=[A],S=n([(0,s.customElement)("md-ripple")],S);const T=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText"],E=T.map($);function C(e){return E.includes(e)}function $(e){return e.replace("aria","aria-").replace(/Elements?/g,"").toLowerCase()}const x=Symbol("privateIgnoreAttributeChangesFor");function P(e){return`data-${e}`}function I(e){return e.replace(/-\w/,(e=>e[1].toUpperCase()))}const k=Symbol("internals"),R=Symbol("privateInternals");let O=!1;const N=function(e){var t;if(o.isServer)return e;class r extends e{constructor(){super(...arguments),this[t]=new Set}attributeChangedCallback(e,t,r){if(!C(e))return void super.attributeChangedCallback(e,t,r);if(this[x].has(e))return;this[x].add(e),this.removeAttribute(e),this[x].delete(e);const n=I(e);null===r?delete this.dataset[n]:this.dataset[n]=r,this.requestUpdate(I(e),t)}getAttribute(e){return C(e)?super.getAttribute(P(e)):super.getAttribute(e)}removeAttribute(e){super.removeAttribute(e),C(e)&&(super.removeAttribute(P(e)),this.requestUpdate())}}return t=x,function(e){for(const t of T){const r=$(t),n=P(r),s=I(r);e.createProperty(t,{attribute:r,noAccessor:!0}),e.createProperty(Symbol(n),{attribute:n,noAccessor:!0}),Object.defineProperty(e.prototype,t,{configurable:!0,enumerable:!0,get(){return this.dataset[s]??null},set(e){const r=this.dataset[s]??null;e!==r&&(null===e?delete this.dataset[s]:this.dataset[s]=e,this.requestUpdate(t,r))}})}}(r),r}((M=o.LitElement,class extends M{get[k](){return this[R]||(this[R]=this.attachInternals()),this[R]}}));var M,U;class L extends N{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[k].form}constructor(){super(),this.disabled=!1,this.softDisabled=!1,this.href="",this.target="",this.trailingIcon=!1,this.hasIcon=!1,this.type="submit",this.value="",o.isServer||this.addEventListener("click",this.handleClick.bind(this))}focus(){this.buttonElement?.focus()}blur(){this.buttonElement?.blur()}render(){const e=!this.href&&(this.disabled||this.softDisabled),t=this.href?this.renderLink():this.renderButton(),r=this.href?"link":"button";return o.html` - ${this.renderElevationOrOutline?.()} -
- - - ${t} - `}renderButton(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return o.html``}renderLink(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return o.html`${this.renderContent()} - `}renderContent(){const e=o.html``;return o.html` - - ${this.trailingIcon?o.nothing:e} - - ${this.trailingIcon?e:o.nothing} - `}handleClick(e){if(!this.href&&this.softDisabled)return e.stopImmediatePropagation(),void e.preventDefault();(function(e){return e.currentTarget===e.target&&e.composedPath()[0]===e.target&&!e.target.disabled&&!function(e){const t=O;return t&&(e.preventDefault(),e.stopImmediatePropagation()),async function(){O=!0,await null,O=!1}(),t}(e)})(e)&&this.buttonElement&&(this.focus(),function(e){const t=new MouseEvent("click",{bubbles:!0});e.dispatchEvent(t)}(this.buttonElement))}handleSlotChange(){this.hasIcon=this.assignedIcons.length>0}}U=L,o.isServer||U.addInitializer((e=>{const t=e;t.addEventListener("click",(async e=>{const{type:r,[k]:n}=t,{form:s}=n;s&&"button"!==r&&(await new Promise((e=>{setTimeout(e)})),e.defaultPrevented||("reset"!==r?(s.addEventListener("submit",(e=>{Object.defineProperty(e,"submitter",{configurable:!0,enumerable:!0,get:()=>t})}),{capture:!0,once:!0}),n.setFormValue(t.value),s.requestSubmit()):s.reset()))}))})),L.formAssociated=!0,L.shadowRootOptions={mode:"open",delegatesFocus:!0},n([(0,s.property)({type:Boolean,reflect:!0})],L.prototype,"disabled",void 0),n([(0,s.property)({type:Boolean,attribute:"soft-disabled",reflect:!0})],L.prototype,"softDisabled",void 0),n([(0,s.property)()],L.prototype,"href",void 0),n([(0,s.property)()],L.prototype,"target",void 0),n([(0,s.property)({type:Boolean,attribute:"trailing-icon",reflect:!0})],L.prototype,"trailingIcon",void 0),n([(0,s.property)({type:Boolean,attribute:"has-icon",reflect:!0})],L.prototype,"hasIcon",void 0),n([(0,s.property)()],L.prototype,"type",void 0),n([(0,s.property)({reflect:!0})],L.prototype,"value",void 0),n([(0,s.query)(".button")],L.prototype,"buttonElement",void 0),n([(0,s.queryAssignedElements)({slot:"icon",flatten:!0})],L.prototype,"assignedIcons",void 0);class j extends L{renderElevationOrOutline(){return o.html``}}const B=o.css`:host{--_container-color: var(--md-filled-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-elevation: var(--md-filled-button-container-elevation, 0);--_container-height: var(--md-filled-button-container-height, 40px);--_container-shadow-color: var(--md-filled-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-button-focus-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-container-elevation: var(--md-filled-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-button-hover-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-button-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-filled-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-button-pressed-label-text-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-color: var(--md-filled-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_container-shape-start-start: var(--md-filled-button-container-shape-start-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-button-container-shape-start-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-button-container-shape-end-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-button-container-shape-end-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-button-leading-space, 24px);--_trailing-space: var(--md-filled-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-button-with-trailing-icon-trailing-space, 16px)} -`,D=o.css`md-elevation{transition-duration:280ms}:host(:is([disabled],[soft-disabled])) md-elevation{transition:none}md-elevation{--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}:host(:focus-within) md-elevation{--md-elevation-level: var(--_focus-container-elevation)}:host(:hover) md-elevation{--md-elevation-level: var(--_hover-container-elevation)}:host(:active) md-elevation{--md-elevation-level: var(--_pressed-container-elevation)}:host(:is([disabled],[soft-disabled])) md-elevation{--md-elevation-level: var(--_disabled-container-elevation)} -`,F=o.css`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background-color:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host(:is([disabled],[soft-disabled])) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host(:is([disabled],[soft-disabled])) .background{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host(:is([disabled],[soft-disabled])) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none} -`;let W=class extends j{};W.styles=[F,D,B],W=n([(0,s.customElement)("md-filled-button")],W)},7804:(e,t,r)=>{r.d(t,{OA:()=>n,WL:()=>o,u$:()=>s});const n={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},s=e=>(...t)=>({_$litDirective$:e,values:t});class o{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}},6683:(e,t,r)=>{r.d(t,{H:()=>o});var n=r(6752),s=r(7804);const o=(0,s.u$)(class extends s.WL{constructor(e){if(super(e),e.type!==s.OA.ATTRIBUTE||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}const r=e.element.classList;for(const e of this.st)e in t||(r.remove(e),this.st.delete(e));for(const e in t){const n=!!t[e];n===this.st.has(e)||this.nt?.has(e)||(n?(r.add(e),this.st.add(e)):(r.remove(e),this.st.delete(e)))}return n.c0}})},6752:(e,t,r)=>{r.d(t,{JW:()=>E,XX:()=>q,c0:()=>C,ge:()=>F,qy:()=>T,s6:()=>$});const n=globalThis,s=n.trustedTypes,o=s?s.createPolicy("lit-html",{createHTML:e=>e}):void 0,i="$lit$",a=`lit$${(Math.random()+"").slice(9)}$`,l="?"+a,c=`<${l}>`,d=document,h=()=>d.createComment(""),p=e=>null===e||"object"!=typeof e&&"function"!=typeof e,u=Array.isArray,m=e=>u(e)||"function"==typeof e?.[Symbol.iterator],f="[ \t\n\f\r]",b=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,y=/-->/g,g=/>/g,v=RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),w=/'/g,_=/"/g,A=/^(?:script|style|textarea|title)$/i,S=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),T=S(1),E=S(2),C=Symbol.for("lit-noChange"),$=Symbol.for("lit-nothing"),x=new WeakMap,P=d.createTreeWalker(d,129);function I(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==o?o.createHTML(t):t}const k=(e,t)=>{const r=e.length-1,n=[];let s,o=2===t?"":"",l=b;for(let t=0;t"===h[0]?(l=s??b,p=-1):void 0===h[1]?p=-2:(p=l.lastIndex-h[2].length,d=h[1],l=void 0===h[3]?v:'"'===h[3]?_:w):l===_||l===w?l=v:l===y||l===g?l=b:(l=v,s=void 0);const m=l===v&&e[t+1].startsWith("/>")?" ":"";o+=l===b?r+c:p>=0?(n.push(d),r.slice(0,p)+i+r.slice(p)+a+m):r+a+(-2===p?t:m)}return[I(e,o+(e[r]||"")+(2===t?"":"")),n]};class R{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let o=0,c=0;const d=e.length-1,p=this.parts,[u,m]=k(e,t);if(this.el=R.createElement(u,r),P.currentNode=this.el.content,2===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=P.nextNode())&&p.length0){n.textContent=s?s.emptyScript:"";for(let r=0;r2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=$}_$AI(e,t=this,r,n){const s=this.strings;let o=!1;if(void 0===s)e=O(this,e,t,0),o=!p(e)||e!==this._$AH&&e!==C,o&&(this._$AH=e);else{const n=e;let i,a;for(e=s[0],i=0;i{const n=r?.renderBefore??t;let s=n._$litPart$;if(void 0===s){const e=r?.renderBefore??null;n._$litPart$=s=new M(t.insertBefore(h(),e),e,void 0,r??{})}return s._$AI(e),s}},2924:(e,t,r)=>{r.r(t),r.d(t,{customElement:()=>n,eventOptions:()=>c,property:()=>a,query:()=>h,queryAll:()=>u,queryAssignedElements:()=>f,queryAssignedNodes:()=>b,queryAsync:()=>m,standardProperty:()=>i,state:()=>l});const n=e=>(t,r)=>{void 0!==r?r.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)};var s=r(842);const o={attribute:!0,type:String,converter:s.W3,reflect:!1,hasChanged:s.Ec},i=(e=o,t,r)=>{const{kind:n,metadata:s}=r;let i=globalThis.litPropertyMetadata.get(s);if(void 0===i&&globalThis.litPropertyMetadata.set(s,i=new Map),i.set(r.name,e),"accessor"===n){const{name:n}=r;return{set(r){const s=t.get.call(this);t.set.call(this,r),this.requestUpdate(n,s,e)},init(t){return void 0!==t&&this.P(n,void 0,e),t}}}if("setter"===n){const{name:n}=r;return function(r){const s=this[n];t.call(this,r),this.requestUpdate(n,s,e)}}throw Error("Unsupported decorator location: "+n)};function a(e){return(t,r)=>"object"==typeof r?i(e,t,r):((e,t,r)=>{const n=t.hasOwnProperty(r);return t.constructor.createProperty(r,n?{...e,wrapped:!0}:e),n?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}function l(e){return a({...e,state:!0,attribute:!1})}function c(e){return(t,r)=>{const n="function"==typeof t?t:t[r];Object.assign(n,e)}}const d=(e,t,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,r),r);function h(e,t){return(r,n,s)=>{const o=t=>t.renderRoot?.querySelector(e)??null;if(t){const{get:e,set:t}="object"==typeof n?r:s??(()=>{const e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return d(r,n,{get(){let r=e.call(this);return void 0===r&&(r=o(this),(null!==r||this.hasUpdated)&&t.call(this,r)),r}})}return d(r,n,{get(){return o(this)}})}}let p;function u(e){return(t,r)=>d(t,r,{get(){return(this.renderRoot??(p??=document.createDocumentFragment())).querySelectorAll(e)}})}function m(e){return(t,r)=>d(t,r,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(e)??null}})}function f(e){return(t,r)=>{const{slot:n,selector:s}=e??{},o="slot"+(n?`[name=${n}]`:":not([name])");return d(t,r,{get(){const t=this.renderRoot?.querySelector(o),r=t?.assignedElements(e)??[];return void 0===s?r:r.filter((e=>e.matches(s)))}})}}function b(e){return(t,r)=>{const{slot:n}=e??{},s="slot"+(n?`[name=${n}]`:":not([name])");return d(t,r,{get(){const t=this.renderRoot?.querySelector(s);return t?.assignedNodes(e)??[]}})}}},2627:(e,t,r)=>{r.r(t),r.d(t,{classMap:()=>n.H});var n=r(6683)},6337:(e,t,r)=>{r.r(t),r.d(t,{CSSResult:()=>n.BO,LitElement:()=>o,ReactiveElement:()=>n.mN,_$LE:()=>a,_$LH:()=>s.ge,adoptStyles:()=>n.Rf,css:()=>n.AH,defaultConverter:()=>n.W3,getCompatibleStyle:()=>n.sk,html:()=>s.qy,isServer:()=>l,noChange:()=>s.c0,notEqual:()=>n.Ec,nothing:()=>s.s6,render:()=>s.XX,supportsAdoptingStyleSheets:()=>n.qM,svg:()=>s.JW,unsafeCSS:()=>n.iz});var n=r(842),s=r(6752);class o extends n.mN{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=(0,s.XX)(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return s.c0}}o._$litElement$=!0,o.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:o});const i=globalThis.litElementPolyfillSupport;i?.({LitElement:o});const a={_$AK:(e,t,r)=>{e._$AK(t,r)},_$AL:e=>e._$AL};(globalThis.litElementVersions??=[]).push("4.0.4");const l=!1},4114:(e,t,r)=>{r.r(t),r.d(t,{Profile:()=>s,Timeline:()=>m,Tweet:()=>i});const n=e=>{const t=Object.getOwnPropertyNames(e).filter((e=>e.startsWith("__reactProps$")));return t.length?e[t[0]]:null};class s{profileElement;constructor(e){this.profileElement=e}get props(){const e=n(this.profileElement);if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[0]&&"object"==typeof t.children[0]||"function"==typeof t.children[0])&&(null!==t.children[0].props&&"object"==typeof t.children[0].props||"function"==typeof t.children[0].props)&&Array.isArray(t.children[0].props.children)&&(null!==t.children[0].props.children[1]&&"object"==typeof t.children[0].props.children[1]||"function"==typeof t.children[0].props.children[1])&&(null!==t.children[0].props.children[1].props&&"object"==typeof t.children[0].props.children[1].props||"function"==typeof t.children[0].props.children[1].props)&&(null!==t.children[0].props.children[1].props.user&&"object"==typeof t.children[0].props.children[1].props.user||"function"==typeof t.children[0].props.children[1].props.user)&&(void 0===t.children[0].props.children[1].props.user.possibly_sensitive||null===t.children[0].props.children[1].props.user.possibly_sensitive||!1===t.children[0].props.children[1].props.user.possibly_sensitive||!0===t.children[0].props.children[1].props.user.possibly_sensitive)&&"string"==typeof t.children[0].props.children[1].props.user.screen_name&&(""===t.children[0].props.children[1].props.user.profile_interstitial_type||"sensitive_media"===t.children[0].props.children[1].props.user.profile_interstitial_type||"fake_account"===t.children[0].props.children[1].props.user.profile_interstitial_type||"offensive_profile_content"===t.children[0].props.children[1].props.user.profile_interstitial_type||"timeout"===t.children[0].props.children[1].props.user.profile_interstitial_type)&&Array.isArray(t.children[0].props.children[1].props.user.withheld_in_countries)&&t.children[0].props.children[1].props.user.withheld_in_countries.every((e=>"string"==typeof e))}(e))throw new Error("Failed to get React props of profile");return e.children[0].props.children[1].props.user}}var o=r(8531);class i{tweetElement;constructor(e){this.tweetElement=e}getMenuBar(){const e=this.tweetElement.querySelector("div[role='group'][id]");if(!e)throw new Error("Failed to get menu bar of tweet");return e}get element(){return this.tweetElement}get props(){const e=n(this.getMenuBar());if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[1]&&"object"==typeof t.children[1]||"function"==typeof t.children[1])&&(null!==t.children[1].props&&"object"==typeof t.children[1].props||"function"==typeof t.children[1].props)&&(null!==t.children[1].props.retweetWithCommentLink&&"object"==typeof t.children[1].props.retweetWithCommentLink||"function"==typeof t.children[1].props.retweetWithCommentLink)&&(null!==t.children[1].props.retweetWithCommentLink.state&&"object"==typeof t.children[1].props.retweetWithCommentLink.state||"function"==typeof t.children[1].props.retweetWithCommentLink.state)&&(null!==t.children[1].props.retweetWithCommentLink.state.quotedStatus&&"object"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus||"function"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable)&&"string"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.permalink&&(null!==t.children[1].props.retweetWithCommentLink.state.quotedStatus.user&&"object"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user||"function"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive)&&"string"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.screen_name&&(""===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"sensitive_media"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"fake_account"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"offensive_profile_content"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"timeout"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type)&&Array.isArray(t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.withheld_in_countries)&&t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.withheld_in_countries.every((e=>"string"==typeof e))}(e))throw new Error("Failed to get React props of tweet");return e.children[1].props.retweetWithCommentLink.state.quotedStatus}get metadata(){const e=this.props.user.screen_name,t=n(this.element);if(!t)throw new Error("Failed to get React props of tweet");let r=null;const s=function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&Array.isArray(t.children[0])&&(null!==t.children[0][1]&&"object"==typeof t.children[0][1]||"function"==typeof t.children[0][1])&&(null!==t.children[0][1].props&&"object"==typeof t.children[0][1].props||"function"==typeof t.children[0][1].props)&&Array.isArray(t.children[0][1].props.children)&&(null!==t.children[0][1].props.children[0]&&"object"==typeof t.children[0][1].props.children[0]||"function"==typeof t.children[0][1].props.children[0])&&(null!==t.children[0][1].props.children[0].props&&"object"==typeof t.children[0][1].props.children[0].props||"function"==typeof t.children[0][1].props.children[0].props)&&Array.isArray(t.children[0][1].props.children[0].props.children)&&(null!==t.children[0][1].props.children[0].props.children[2]&&"object"==typeof t.children[0][1].props.children[0].props.children[2]||"function"==typeof t.children[0][1].props.children[0].props.children[2])&&(null!==t.children[0][1].props.children[0].props.children[2].props&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props||"function"==typeof t.children[0][1].props.children[0].props.children[2].props)&&Array.isArray(t.children[0][1].props.children[0].props.children[2].props.children)&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7]&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7]||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7])&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7].props&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props)&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser)&&"string"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser.screen_name}(t);return function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&Array.isArray(t.children[0])&&(null!==t.children[0][1]&&"object"==typeof t.children[0][1]||"function"==typeof t.children[0][1])&&(null!==t.children[0][1].props&&"object"==typeof t.children[0][1].props||"function"==typeof t.children[0][1].props)&&Array.isArray(t.children[0][1].props.children)&&(null!==t.children[0][1].props.children[0]&&"object"==typeof t.children[0][1].props.children[0]||"function"==typeof t.children[0][1].props.children[0])&&(null!==t.children[0][1].props.children[0].props&&"object"==typeof t.children[0][1].props.children[0].props||"function"==typeof t.children[0][1].props.children[0].props)&&Array.isArray(t.children[0][1].props.children[0].props.children)&&(null!==t.children[0][1].props.children[0].props.children[1]&&"object"==typeof t.children[0][1].props.children[0].props.children[1]||"function"==typeof t.children[0][1].props.children[0].props.children[1])&&(null!==t.children[0][1].props.children[0].props.children[1].props&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props||"function"==typeof t.children[0][1].props.children[0].props.children[1].props)&&Array.isArray(t.children[0][1].props.children[0].props.children[1].props.children)&&Array.isArray(t.children[0][1].props.children[0].props.children[1].props.children[1])&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2]&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2]||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2])&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2].props&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props)&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser)&&"string"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser.screen_name}(t)&&(r=t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser.screen_name),s&&(r=t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser.screen_name),{isFocalMode:s,isPostedByCurrentUser:e===r}}async clickRetweetButton(e){const t=await(0,o.asyncQuerySelector)("[data-testid='unretweet'], [data-testid='retweet']",this.tweetElement,e);if(!t)throw new Error("Failed to get retweet button of tweet");t.click()}static async clickQuoteButton(e){const t=await(0,o.asyncQuerySelector)(["[data-testid='Dropdown'] [href='/compose/post']","[data-testid='sheetDialog'] [href='/compose/post']"].join(","),document,e);if(!t)throw new Error("Failed to get quote button of tweet");t.click()}static async getTweetTextBox(e){const t="pro.twitter.com"===location.hostname?"[role='dialog'] [data-text='true'], [role='dialog'] textarea[data-testid='tweetTextarea_0']":"[role='dialog'] [data-text='true'], textarea[data-testid='tweetTextarea_0']",r=await(0,o.asyncQuerySelector)(t,document,e);if(!r)throw new Error("Failed to get text box marker of tweet");const n="TEXTAREA"===r.tagName?r:r.parentElement;if(!n)throw new Error("Failed to get text box of tweet");return n}async quoteTweet(e,t=1e3){try{await this.clickRetweetButton(t),await i.clickQuoteButton(t);const r=await i.getTweetTextBox(t);r.innerHTML=e,r.dispatchEvent(new Event("input",{bubbles:!0}))}catch(t){const r=this.props.permalink;open(`https://twitter.com/intent/tweet?text=${encodeURIComponent(`${e}\nhttps://twitter.com${r}`)}`,"_blank")}}}const a={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var l,c=new Uint8Array(16);function d(){if(!l&&!(l="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return l(c)}for(var h=[],p=0;p<256;++p)h.push((p+256).toString(16).slice(1));const u=function(e,t,r){if(a.randomUUID&&!t&&!e)return a.randomUUID();var n=(e=e||{}).random||(e.rng||d)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var s=0;s<16;++s)t[r+s]=n[s];return t}return function(e,t=0){return(h[e[t+0]]+h[e[t+1]]+h[e[t+2]]+h[e[t+3]]+"-"+h[e[t+4]]+h[e[t+5]]+"-"+h[e[t+6]]+h[e[t+7]]+"-"+h[e[t+8]]+h[e[t+9]]+"-"+h[e[t+10]]+h[e[t+11]]+h[e[t+12]]+h[e[t+13]]+h[e[t+14]]+h[e[t+15]]).toLowerCase()}(n)};class m{OBSERVER_OPTIONS={childList:!0,subtree:!0};onNewTweetCallback=null;onNewProfileCallback=null;constructor(e){const t=`data-twi-ext-checked-${u()}`,r={timeoutMs:1e4,...e},n=new MutationObserver((()=>{if(this.onNewTweetCallback){const e=document.querySelectorAll(`[data-testid="tweet"]:not([${t}])`);for(const r of e)r.setAttribute(t,""),this.onNewTweetCallback(new i(r))}if(this.onNewProfileCallback){const e=document.querySelector(`:not([data-testid="tweet"]) [data-testid="UserName"]:not([${t}])`);e&&(e.setAttribute(t,""),this.onNewProfileCallback(new s(e)))}}));(0,o.asyncQuerySelector)("main",document,r.timeoutMs).then((e=>{if(!e)throw new Error("twi-ext: Failed to get main element");n.observe(e,this.OBSERVER_OPTIONS)})),(0,o.asyncQuerySelector)("#layers",document,r.timeoutMs).then((e=>{if(!e)throw new Error("twi-ext: Failed to get #layers element");n.observe(e,this.OBSERVER_OPTIONS)}))}onNewTweet(e){this.onNewTweetCallback=e}onNewProfile(e){this.onNewProfileCallback=e}}},8785:e=>{e.exports=JSON.parse('{"manifest_description":{"message":"Twitter의 Shadowban을 감지하는 확장 기능입니다."},"accountShadowbanned":{"message":"이 사용자는 Shadowban되어 있을 가능성이 있어, 트윗이 검색 결과에 표시되지 않을 수도 있습니다."},"accountShadowbannedAndTweetFlaggedAsSensitive":{"message":"이 사용자는 Shadowban되어 있을 가능성이 있어, 트윗이 검색 결과에 표시되지 않을 수도 있습니다. 또한, 이 트윗에는 센시티브 플래그가 부여되어 있습니다."},"accountAndTweetShadowbanned":{"message":"이 트윗에는 연령 제한이 있어, 만 18세 미만의 사용자나 로그인하지 않은 사용자는 볼 수 없습니다. 또한, 검색 결과에 표시되지 않을 수도 있습니다."},"accountIsBlockedInSomeCountries":{"message":"이 사용자는 일부 국가에서 차단되었습니다."},"tweetFlaggedAsSensitive":{"message":"이 트윗에는 센시티브 플래그가 부여되어 있고, 조회자의 설정에 따라 검색 결과에 표시되지 않을 수 있습니다."},"thisUserIsNotShadowbanned":{"message":"이 사용자는 shadowban되지 않았습니다."},"thisUserIsShadowbanned":{"message":"이 사용자는 Shadowban되어 있을 가능성이 있어, 트윗이 검색 결과에 표시되지 않을 수도 있습니다."},"tweetShadowbanned":{"message":"이 트윗에는 연령 제한이 있어, 만 18세 미만의 사용자나 로그인하지 않은 사용자는 볼 수 없습니다. 또한, 검색 결과에 표시되지 않을 수도 있습니다."},"tweetNoProblem":{"message":"트윗에 문제가 발견되지 않았습니다."},"accountIsNotFlaggedAsSensitive":{"message":"✅계정에 민감 플래그가 부여되지 않았습니다."},"accountIsShadowbannedOrFlaggedAsSensitive":{"message":"🚫계정이 셰도우밴되었거나, 또는 민감 플래그가 부여되었을 수 있습니다."},"profileDoesNotContainSensitiveMedia":{"message":"✅프로필의 미디어에 민감한 플래그가 부여되지 않았습니다."},"profileContainsSensitiveMedia":{"message":"🚫프로필의 미디어에 민감한 플래그가 지정되어 있습니다."},"accountIsNotWithheldInCountries":{"message":"✅계정은 모든 국가에서 차단되지 않습니다(세부 정보)."},"accountIsWithheldInCountries":{"message":"🚫계정은 다음 국가에서 차단됩니다(세부 정보): $1"},"tweetIsNotFlaggedAsSensitive":{"message":"✅트윗에는 센시티브 플래그가 부여되지 않았습니다."},"tweetIsFlaggedAsSensitive":{"message":"🚫트윗에 센시티브 플래그가 부여되었습니다."},"tweetIsNotAgeRestricted":{"message":"✅트윗에는 연령 제한이 없습니다."},"tweetIsAgeRestricted":{"message":"🚫트윗에 연령 제한이 있습니다."},"tweetIsSearchable":{"message":"✅트윗은 검색 결과에 표시됩니다."},"tweetMayNotBeSearchable":{"message":"⚠️트윗은 조회자의 설정에 따라 검색 결과에 표시되지 않을 수 있습니다."},"tweetIsNotSearchable":{"message":"🚫트윗이 검색 결과에 표시되지 않을 가능성이 있습니다."},"falsePositivesAndFalseNegativesOccur":{"message":"Shadowban Scanner는 유사한 다른 도구와 마찬가지로 위양성 또는 위음성이 발생할 수 있습니다. 작동 방식에 대한 자세한 내용은 여기를 참조하세요."},"translatedByAI":{"message":"AI에 의한 일본어에서 한국어로 번역되었습니다. 이상한 부분이 있으면 @keita_roboin의 DM이나 GitHub 저장소로 알려주세요.","description":"This field is used if the translation was done by AI. Otherwise, set this field to an empty string. Example sentence: \\"Translated from Japanese to by AI. Please notify @keita_roboin\'s DM or GitHub repository if there are any unnatural points.\\""},"showMore":{"message":"▶더 보기"},"tweetTheResults":{"message":"결과 트윗하기"},"viewTweet":{"message":"트윗 보기"},"settingsWhereToDisplayCheckResults":{"message":"검사 결과를 표시할 위치"},"settingsShowMessagesInUnproblematicTweets":{"message":"문제가 없는 트윗에 표시"},"settingsShowMessagesInUnproblematicProfiles":{"message":"문제가 없는 프로필에 표시"},"settingsEnableForOtherUsersTweets":{"message":"다른 사용자의 트윗에 표시"},"settingsEnableForOtherUsersProfiles":{"message":"다른 사용자의 프로필에 표시"},"settingsOtherSettings":{"message":"기타 설정"},"settingsAlwaysDetailedView":{"message":"항상 상세 정보 표시"},"settingsShowNotesInMessages":{"message":"메시지 하단에 메모 표시"},"settingsShowTweetButton":{"message":"결과 트윗하기 버튼 표시"},"settingsPleaseReload":{"message":"설정을 변경한 후 Twitter를 다시 로드해주세요"},"settingsPrivacyPolicy":{"message":"Privacy policy"},"settingsPrivacyPolicyURL":{"message":"https://github.com/Robot-Inventor/shadowban-scanner/blob/main/README_ko.md#privacy-policy"},"settingsOpenSourceLicenses":{"message":"Open source licenses"},"privacyPolicyPageTitle":{"message":"Privacy Policy - Shadowban Scanner"},"privacyPolicy":{"message":"Privacy Policy"},"privacyPolicyText":{"message":"As a rule, this extension performs all processing on the user\'s computer. No data is transmitted to an external server. It also does not access Twitter\'s internal API by obtaining the user\'s credentials without permission, as is the case with some extensions. Web pages not bundled in this extension are subject to their own terms of use and privacy policies."},"initialSetup":{"message":"초기 설정 - Shadowban Scanner"},"shadowbanScannerHasBeenInstalled":{"message":"Shadowban Scanner가 설치되었습니다."},"letsStartWithASimpleInitialSetup":{"message":"간단한 초기 설정을 시작해 보겠습니다."},"pleaseSelectOneOfThem":{"message":"둘 중 하나를 선택하세요. 설정은 나중에 변경할 수 있습니다."},"displayForAllTweetsAndAccounts":{"message":"모든 트윗과 계정에 검사 결과를 표시합니다."},"displayOnlyForProblematicTweets":{"message":"문제가 있는 트윗과 계정에만 검사 결과를 표시합니다."},"displayOnlyInYourOwnTweets":{"message":"내 트윗에만 검사 결과를 표시합니다."},"displayInAllUsersTweets":{"message":"모든 사용자의 트윗에 검사 결과를 표시합니다."},"back":{"message":"뒤로"},"next":{"message":"다음"},"initialSetupCompleted":{"message":"초기 설정 완료!
사용 설명서를 열까요?"},"open":{"message":"열기"},"exitWithoutOpening":{"message":"열지 않고 종료"}}')}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={id:n,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nc=void 0,r(2106)})(); \ No newline at end of file + `;expand(){this.isExpanded=!0}tweetButtonClicked(){const e=new Event("tweetButtonClick",{bubbles:!0,composed:!0});this.dispatchEvent(e)}firstUpdated(e){this.onRenderedCallback&&this.onRenderedCallback(),super.firstUpdated(e)}getShowMoreButton(){return this.isExpanded?"":Ne``}getDetails(){return this.details.length?Ne`
    + ${this.details.map((e=>"string"==typeof e?Ne`
  • `:Ne` +
  • + `))} +
`:""}getNotes(){if(!this.notes.length)return"";const e=lt({"shadowban-scanner-collapsed-content":!this.isExpanded,"shadowban-scanner-message-note":!0});return this.notes.map((t=>Ne`
`))}getTweetButton(){const e=lt({"shadowban-scanner-collapsed-content":!this.isExpanded});return this.isTweetButtonShown?Ne``:""}static cancelClickEvent(e){e.stopPropagation()}render(){const e=lt({"focal-mode":this.isFocalMode,"shadowban-scanner-message":!0,"shadowban-scanner-message-no-problem":!this.isAlert});return Ne` +
+ + ${this.getShowMoreButton()} ${this.getDetails()} ${this.getNotes()} ${this.getTweetButton()} +
+ `}};Rt([le({reflect:!0})],Ut.prototype,"summary",void 0),Rt([le({reflect:!0,type:Array})],Ut.prototype,"details",void 0),Rt([le({reflect:!0,type:Array})],Ut.prototype,"notes",void 0),Rt([le({reflect:!0,type:Boolean})],Ut.prototype,"isAlert",void 0),Rt([le({reflect:!0,type:Boolean})],Ut.prototype,"isExpanded",void 0),Rt([le({reflect:!0,type:Boolean})],Ut.prototype,"isFocalMode",void 0),Rt([le({reflect:!0,type:Boolean})],Ut.prototype,"isTweetButtonShown",void 0),Rt([le({reflect:!0,type:Boolean})],Ut.prototype,"isNoteShown",void 0),Rt([le({attribute:!1,reflect:!0})],Ut.prototype,"onRenderedCallback",void 0),Rt([le({reflect:!0,type:String})],Ut.prototype,"textColor",void 0),Ut=Ot=Rt([j("sbs-message")],Ut);class Mt{sbsMessage;tweet=null;tweetText;constructor(e){const t=document.createElement("sbs-message");t.textColor=Mt.getTextColor(),t.summary=e.summary,t.isAlert=e.isAlert,t.onRenderedCallback=e.onRenderedCallback,"tweet"===e.type?(this.tweet=e.tweet,t.details=e.details,t.notes=e.notes,t.isFocalMode=e.tweet.metadata.isFocalMode,t.isExpanded=e.isExpanded,t.isTweetButtonShown=e.isTweetButtonShown,t.isNoteShown=e.isNoteShown,this.tweetText=e.tweetText):t.isExpanded=!0,t.setAttribute(v,""),t.addEventListener("tweetButtonClick",this.onTweetButtonClick.bind(this)),this.sbsMessage=t}static getTextColor(){const e=["[data-testid='User-Name'] div:first-child span","[data-testid='UserName'] div:first-child span"].join(","),t=document.querySelector(e);if(!t)throw new Error("Failed to get user name span of tweet");const{color:r}=getComputedStyle(t);return r}onTweetButtonClick(){if(!this.tweet||!this.tweetText)throw new Error("Tweet button clicked without source tweet");this.tweet.quoteTweet(this.tweetText)}insertAdjacentElement(e,t){e.insertAdjacentElement(t,this.sbsMessage)}}const jt=e=>e[Object.getOwnPropertyNames(e).filter((e=>e.startsWith("__reactProps$")))];class Lt{element;constructor(e){this.element=e}parse(){const e=jt(this.element);if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&(null!==t.children&&"object"==typeof t.children||"function"==typeof t.children)&&(void 0===t.children._owner||(null!==t.children._owner&&"object"==typeof t.children._owner||"function"==typeof t.children._owner)&&"string"==typeof t.children._owner.key)}(e))throw new Error("Type of props is invalid.");const t=this.element.querySelector("div > div");if(!t)throw new Error("Failed to get the tombstone's grandchild element.");const r=jt(t);if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[0]&&"object"==typeof t.children[0]||"function"==typeof t.children[0])&&(null!==t.children[0].props&&"object"==typeof t.children[0].props||"function"==typeof t.children[0].props)&&(null!==t.children[0].props.entry&&"object"==typeof t.children[0].props.entry||"function"==typeof t.children[0].props.entry)&&"tombstone"===t.children[0].props.entry.type&&(null!==t.children[0].props.entry.conversationPosition&&"object"==typeof t.children[0].props.entry.conversationPosition||"function"==typeof t.children[0].props.entry.conversationPosition)&&"boolean"==typeof t.children[0].props.entry.conversationPosition.showReplyContext}(r))throw new Error("Type of grandchild props is invalid.");return[e,r]}}class Bt{tweet;constructor(e){this.tweet=e}parse(){return this.tweet.props}}class Ft{settings;onMessageCallback;constructor(e,t){this.settings=e,this.onMessageCallback=t;const r=new N;r.onNewTweet((e=>{this.checkTweet(e),this.timelineObserverCallback()})),r.onNewProfile((e=>{this.checkProfile(e)}))}checkProfile(e){if(Boolean(document.querySelector("[data-testid='editProfileButton']"))&&!this.settings.enableForOtherUsersProfiles)return;const t=O(e.props);if(!t.user.hasAnyProblem&&!this.settings.showMessagesInUnproblematicProfiles)return;const r=(n=t,s=this.onMessageCallback,{...(e=>{let t=null;return t=e.user.shadowbanned?"thisUserIsShadowbanned":e.user.withheldInCountries.length?"accountIsBlockedInSomeCountries":"thisUserIsNotShadowbanned",{summary:t}})(n),isAlert:n.user.hasAnyProblem,onRenderedCallback:s,type:"profile"});var n,s;const o=new Mt(r),i=document.querySelector("[data-testid='UserDescription']")||document.querySelector("[data-testid='UserName']");if(!i)throw new Error("Failed to get user description of profile");o.insertAdjacentElement(i,"afterend")}checkTweet(e){const t=(e=>{const t=e.parse(),r=O(t.user),n=Boolean(t.possibly_sensitive),s=!(!1===t.possibly_sensitive_editable),o=n&&!s;let i="searchable";return o||r.user.shadowbanned?i="unsearchable":n&&(i="possiblyUnsearchable"),{...r,tweet:{ageRestriction:o,hasAnyProblem:"searchable"!==i||r.user.hasAnyProblem,possiblySensitive:n,searchability:i}}})(new Bt(e));if(!e.metadata.isPostedByCurrentUser&&!this.settings.enableForOtherUsersTweets)return;if(!t.tweet.hasAnyProblem&&!this.settings.showMessagesInUnproblematicTweets)return;const r=U(e,t,this.onMessageCallback,this.settings),n=new Mt(r),s=e.element.querySelector("[data-testid='analyticsButton']")?.parentElement||e.element.querySelector("div[role='group'][id]");if(!s)throw new Error("Failed to get landmark element of tweet");n.insertAdjacentElement(s,"beforebegin")}necromancer(e){e.setAttribute(g,"true");const t=(e=>{const[t,r]=e;if(!t.children._owner)return;if(r.children[0].props.entry.conversationPosition.showReplyContext)return;const{key:n}=t.children._owner;return n.split("-")[3]})(new Lt(e).parse());if(!t)return;const r=`https://twitter.com/i/status/${t}`,n=document.createElement("a");n.href=r,n.target="_blank",n.setAttribute(y,"viewTweet"),n.classList.add("shadowban-scanner-tombstone-necromancer");const s=e.querySelector("a");if(!s)throw new Error("Failed to get help link");n.style.color=getComputedStyle(s).color,s.insertAdjacentElement("afterend",n),this.onMessageCallback()}timelineObserverCallback(){const e=document.querySelectorAll(`[data-testid='cellInnerDiv']:not([${g}])`);for(const t of e)t.setAttribute(g,"true"),Boolean(t.querySelector("a[href='https://help.twitter.com/rules-and-policies/notices-on-twitter']"))&&this.necromancer(t)}}const qt={alwaysDetailedView:!1,enableForOtherUsersProfiles:!0,enableForOtherUsersTweets:!0,enableOnXPro:!0,showMessagesInUnproblematicProfiles:!0,showMessagesInUnproblematicTweets:!1,showNotesInMessages:!0,showTweetButton:!0};class Wt{translationFunction;twemojiEndpoint;constructor(e,t){this.translationFunction=e,this.twemojiEndpoint=t}convertEmojiToTwemoji(e){let t=e;for(const e of w){const r=[...e].map((e=>e.codePointAt(0)?.toString(16))).join("-"),n=`${e}`;t=t.replaceAll(e,n)}return t}translateElements(){const e=[...document.querySelectorAll(`[${y}]`)],t=document.querySelectorAll(`sbs-message[${v}]`);for(const r of t){const{shadowRoot:t}=r;if(!t)return;const n=t.querySelectorAll(`[${y}]`);e.push(...n),n.length&&r.removeAttribute(v)}e.forEach((e=>{const t=e.getAttribute(y),r=e.getAttribute("data-sb-translation-substitutions"),n=r?JSON.parse(r):null,s=function(e){const t=e;return void 0===t||"string"==typeof t||Array.isArray(t)&&t.every((e=>"string"==typeof e))}(n)?this.translationFunction(t,n):this.translationFunction(t);e.hasAttribute("data-sb-enable-twemoji")?e.innerHTML=this.convertEmojiToTwemoji(s):e.innerHTML=s,e.removeAttribute(y)}))}}(e=>{const t=new Wt(((t,r)=>{if(r){const n="string"==typeof r?[r]:r;let s=e[t].message;for(let e=0;e{t.translateElements()}))})(JSON.parse('{"manifest_description":{"message":"Twitter의 Shadowban을 감지하는 확장 기능입니다."},"accountShadowbanned":{"message":"이 사용자는 Shadowban되어 있을 가능성이 있어, 트윗이 검색 결과에 표시되지 않을 수도 있습니다."},"accountShadowbannedAndTweetFlaggedAsSensitive":{"message":"이 사용자는 Shadowban되어 있을 가능성이 있어, 트윗이 검색 결과에 표시되지 않을 수도 있습니다. 또한, 이 트윗에는 센시티브 플래그가 부여되어 있습니다."},"accountAndTweetShadowbanned":{"message":"이 트윗에는 연령 제한이 있어, 만 18세 미만의 사용자나 로그인하지 않은 사용자는 볼 수 없습니다. 또한, 검색 결과에 표시되지 않을 수도 있습니다."},"accountIsBlockedInSomeCountries":{"message":"이 사용자는 일부 국가에서 차단되었습니다."},"tweetFlaggedAsSensitive":{"message":"이 트윗에는 센시티브 플래그가 부여되어 있고, 조회자의 설정에 따라 검색 결과에 표시되지 않을 수 있습니다."},"thisUserIsNotShadowbanned":{"message":"이 사용자는 shadowban되지 않았습니다."},"thisUserIsShadowbanned":{"message":"이 사용자는 Shadowban되어 있을 가능성이 있어, 트윗이 검색 결과에 표시되지 않을 수도 있습니다."},"tweetShadowbanned":{"message":"이 트윗에는 연령 제한이 있어, 만 18세 미만의 사용자나 로그인하지 않은 사용자는 볼 수 없습니다. 또한, 검색 결과에 표시되지 않을 수도 있습니다."},"tweetNoProblem":{"message":"트윗에 문제가 발견되지 않았습니다."},"accountIsNotFlaggedAsSensitive":{"message":"✅계정에 민감 플래그가 부여되지 않았습니다."},"accountIsShadowbannedOrFlaggedAsSensitive":{"message":"🚫계정이 셰도우밴되었거나, 또는 민감 플래그가 부여되었을 수 있습니다."},"profileDoesNotContainSensitiveMedia":{"message":"✅프로필의 미디어에 민감한 플래그가 부여되지 않았습니다."},"profileContainsSensitiveMedia":{"message":"🚫프로필의 미디어에 민감한 플래그가 지정되어 있습니다."},"accountIsNotWithheldInCountries":{"message":"✅계정은 모든 국가에서 차단되지 않습니다(세부 정보)."},"accountIsWithheldInCountries":{"message":"🚫계정은 다음 국가에서 차단됩니다(세부 정보): $1"},"tweetIsNotFlaggedAsSensitive":{"message":"✅트윗에는 센시티브 플래그가 부여되지 않았습니다."},"tweetIsFlaggedAsSensitive":{"message":"🚫트윗에 센시티브 플래그가 부여되었습니다."},"tweetIsNotAgeRestricted":{"message":"✅트윗에는 연령 제한이 없습니다."},"tweetIsAgeRestricted":{"message":"🚫트윗에 연령 제한이 있습니다."},"tweetIsSearchable":{"message":"✅트윗은 검색 결과에 표시됩니다."},"tweetMayNotBeSearchable":{"message":"⚠️트윗은 조회자의 설정에 따라 검색 결과에 표시되지 않을 수 있습니다."},"tweetIsNotSearchable":{"message":"🚫트윗이 검색 결과에 표시되지 않을 가능성이 있습니다."},"falsePositivesAndFalseNegativesOccur":{"message":"Shadowban Scanner는 유사한 다른 도구와 마찬가지로 위양성 또는 위음성이 발생할 수 있습니다. 작동 방식에 대한 자세한 내용은 여기를 참조하세요."},"translatedByAI":{"message":"AI에 의한 일본어에서 한국어로 번역되었습니다. 이상한 부분이 있으면 @keita_roboin의 DM이나 GitHub 저장소로 알려주세요.","description":"This field is used if the translation was done by AI. Otherwise, set this field to an empty string. Example sentence: \\"Translated from Japanese to by AI. Please notify @keita_roboin\'s DM or GitHub repository if there are any unnatural points.\\""},"showMore":{"message":"▶더 보기"},"tweetTheResults":{"message":"결과 트윗하기"},"viewTweet":{"message":"트윗 보기"},"settingsWhereToDisplayCheckResults":{"message":"검사 결과를 표시할 위치"},"settingsShowMessagesInUnproblematicTweets":{"message":"문제가 없는 트윗에 표시"},"settingsShowMessagesInUnproblematicProfiles":{"message":"문제가 없는 프로필에 표시"},"settingsEnableForOtherUsersTweets":{"message":"다른 사용자의 트윗에 표시"},"settingsEnableForOtherUsersProfiles":{"message":"다른 사용자의 프로필에 표시"},"settingsOtherSettings":{"message":"기타 설정"},"settingsAlwaysDetailedView":{"message":"항상 상세 정보 표시"},"settingsShowNotesInMessages":{"message":"메시지 하단에 메모 표시"},"settingsShowTweetButton":{"message":"결과 트윗하기 버튼 표시"},"settingsEnableOnXPro":{"message":"X Pro에서 실행"},"settingsPleaseReload":{"message":"설정을 변경한 후 Twitter를 다시 로드해주세요"},"settingsPrivacyPolicy":{"message":"Privacy policy"},"settingsPrivacyPolicyURL":{"message":"https://github.com/Robot-Inventor/shadowban-scanner/blob/main/README_ko.md#privacy-policy"},"settingsOpenSourceLicenses":{"message":"Open source licenses"},"privacyPolicyPageTitle":{"message":"Privacy Policy - Shadowban Scanner"},"privacyPolicy":{"message":"Privacy Policy"},"privacyPolicyText":{"message":"As a rule, this extension performs all processing on the user\'s computer. No data is transmitted to an external server. It also does not access Twitter\'s internal API by obtaining the user\'s credentials without permission, as is the case with some extensions. Web pages not bundled in this extension are subject to their own terms of use and privacy policies."},"initialSetup":{"message":"초기 설정 - Shadowban Scanner"},"shadowbanScannerHasBeenInstalled":{"message":"Shadowban Scanner가 설치되었습니다."},"letsStartWithASimpleInitialSetup":{"message":"간단한 초기 설정을 시작해 보겠습니다."},"pleaseSelectOneOfThem":{"message":"둘 중 하나를 선택하세요. 설정은 나중에 변경할 수 있습니다."},"displayForAllTweetsAndAccounts":{"message":"모든 트윗과 계정에 검사 결과를 표시합니다."},"displayOnlyForProblematicTweets":{"message":"문제가 있는 트윗과 계정에만 검사 결과를 표시합니다."},"displayOnlyInYourOwnTweets":{"message":"내 트윗에만 검사 결과를 표시합니다."},"displayInAllUsersTweets":{"message":"모든 사용자의 트윗에 검사 결과를 표시합니다."},"back":{"message":"뒤로"},"next":{"message":"다음"},"initialSetupCompleted":{"message":"초기 설정 완료!
사용 설명서를 열까요?"},"open":{"message":"열기"},"exitWithoutOpening":{"message":"열지 않고 종료"}}'))})(); \ No newline at end of file diff --git a/userScript/ko.user.js.LICENSE.txt b/userScript/ko.user.js.LICENSE.txt index 6f070593..e243996e 100644 --- a/userScript/ko.user.js.LICENSE.txt +++ b/userScript/ko.user.js.LICENSE.txt @@ -20,12 +20,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -/** - * @license - * Copyright 2019 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ - /** * @license * Copyright 2021 Google LLC @@ -44,12 +38,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -/** - * @license - * Copyright 2022 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ - /** * @license * Copyright 2023 Google LLC diff --git a/userScript/zh_TW.user.js b/userScript/zh_TW.user.js index e2de6946..b18ddb34 100644 --- a/userScript/zh_TW.user.js +++ b/userScript/zh_TW.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Shadowban Scanner (中文(台灣)) // @namespace https://github.com/Robot-Inventor/shadowban-scanner/ -// @version 3.1.9 +// @version 3.2.0 // @description 這是一個用於檢查 Twitter/X 的 Shadowban 的擴充功能。 // @author Robot-Inventor (ろぼいん / @keita_roboin) // @match https://*.twitter.com/* @@ -13,28 +13,47 @@ // ==/UserScript== /*! For license information please see zh_TW.user.js.LICENSE.txt */ -(()=>{"use strict";var e={8531:function(e,t){var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,o){function i(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.asyncQuerySelectorAll=t.asyncQuerySelector=void 0;const n=(e,t)=>new Promise((r=>{const n=e();if(n instanceof Element||n instanceof NodeList&&n.length)return void r(n);let s=null;const o=new MutationObserver((()=>{const t=e();(t instanceof Element||t instanceof NodeList&&t.length)&&(o.disconnect(),s&&clearTimeout(s),r(t))}));s=setTimeout((()=>{o.disconnect(),r(null)}),t),o.observe(document.body,{attributes:!0,childList:!0,subtree:!0})}));t.asyncQuerySelector=(e,...t)=>r(void 0,[e,...t],void 0,(function*(e,t=document,r=500){return yield n((()=>t.querySelector(e)),r)})),t.asyncQuerySelectorAll=(e,...t)=>r(void 0,[e,...t],void 0,(function*(e,t=document,r=500){var s;return null!==(s=yield n((()=>t.querySelectorAll(e)),r))&&void 0!==s?s:document.createDocumentFragment().childNodes}))},1016:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(1601),s=r.n(n),o=r(6314),i=r.n(o)()(s());i.push([e.id,".shadowban-scanner-tombstone-necromancer {\n display: inline-block;\n margin: 0 2rem;\n text-decoration: none;\n}\n\n.shadowban-scanner-tombstone-necromancer:hover {\n text-decoration: underline;\n}\n\n[data-sb-translation] {\n display: inline-block;\n min-width: 15em;\n min-height: 1em;\n border-radius: 0.25em;\n background-image: linear-gradient(90deg, transparent 40%, rgba(175, 175, 175, 0.7) 80%, transparent 100%);\n background-size: 200% 100%;\n animation: loading-animation 1.5s linear infinite;\n}\n\n@keyframes loading-animation {\n 0% {\n background-position: 200% 0%;\n opacity: 1;\n }\n 100% {\n background-position: 0% 0%;\n opacity: 1;\n }\n}\n",""]);const a=i},6314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,s,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(n)for(var a=0;a0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),r&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=r):d[2]=r),s&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=s):d[4]="".concat(s)),t.push(d))}},t}},1601:e=>{e.exports=function(e){return e[1]}},5535:(e,t,r)=>{r.r(t),r.d(t,{default:()=>y});var n=r(5072),s=r.n(n),o=r(7825),i=r.n(o),a=r(7659),l=r.n(a),c=r(5056),d=r.n(c),h=r(540),p=r.n(h),u=r(1113),m=r.n(u),f=r(1016),b={};b.styleTagTransform=m(),b.setAttributes=d(),b.insert=l().bind(null,"head"),b.domAPI=i(),b.insertStyleElement=p(),s()(f.A,b);const y=f.A&&f.A.locals?f.A.locals:void 0},5072:e=>{var t=[];function r(e){for(var r=-1,n=0;n{var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056:(e,t,r)=>{e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},7825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var s=void 0!==r.layer;s&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,s&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},41:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.INSTRUCTION_URL=t.RELEASE_NOTE_URL=t.ONBOARDING_PATH=t.ALLOWED_TWEMOJI=t.TWEMOJI_ATTRIBUTE=t.SHADOW_TRANSLATION_ATTRIBUTE=t.TRANSLATION_ATTRIBUTE=t.EVENT_GENERATOR_SETTINGS_ATTRIBUTE=t.EVENT_GENERATOR_ID=t.CHECKED_DATA_ATTRIBUTE=void 0,t.CHECKED_DATA_ATTRIBUTE="data-shadowban-checked",t.EVENT_GENERATOR_ID="shadowban-scanner-event-generator",t.EVENT_GENERATOR_SETTINGS_ATTRIBUTE="data-sb-settings",t.TRANSLATION_ATTRIBUTE="data-sb-translation",t.SHADOW_TRANSLATION_ATTRIBUTE="data-sb-shadow-translation",t.TWEMOJI_ATTRIBUTE="data-sb-enable-twemoji",t.ALLOWED_TWEMOJI=["✅","🚫","⚠️"],t.ONBOARDING_PATH="html/initialSetup.html",t.RELEASE_NOTE_URL={en:"https://roboin.io/article/2024/05/27/shadowban-scanner-reaches-over-10000-users/en/",ja:"https://roboin.io/article/2024/05/27/shadowban-scanner-reaches-over-10000-users/"},t.INSTRUCTION_URL={en:"https://roboin.io/article/2023/09/30/detect-twitter-shadowban/en/#usage",ja:"https://roboin.io/article/2023/09/30/detect-twitter-shadowban/#%E4%BD%BF%E3%81%84%E6%96%B9"}},8140:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_SETTINGS=void 0,t.DEFAULT_SETTINGS={alwaysDetailedView:!1,enableForOtherUsersProfiles:!0,enableForOtherUsersTweets:!0,showMessagesInUnproblematicProfiles:!0,showMessagesInUnproblematicTweets:!1,showNotesInMessages:!0,showTweetButton:!0}},7316:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Translator=void 0;const n=r(41),s=r(1497);t.Translator=class{constructor(e,t){this.translationFunction=e,this.twemojiEndpoint=t}convertEmojiToTwemoji(e){let t=e;for(const e of n.ALLOWED_TWEMOJI){const r=[...e].map((e=>e.codePointAt(0)?.toString(16))).join("-"),n=`${e}`;t=t.replaceAll(e,n)}return t}translateElements(){const e=[...document.querySelectorAll(`[${n.TRANSLATION_ATTRIBUTE}]`)],t=document.querySelectorAll(`sbs-message[${n.SHADOW_TRANSLATION_ATTRIBUTE}]`);for(const r of t){const{shadowRoot:t}=r;if(!t)return;const s=t.querySelectorAll(`[${n.TRANSLATION_ATTRIBUTE}]`);e.push(...s),s.length&&r.removeAttribute(n.SHADOW_TRANSLATION_ATTRIBUTE)}e.forEach((e=>{const t=e.getAttribute(n.TRANSLATION_ATTRIBUTE),r=e.getAttribute("data-sb-translation-substitutions"),o=r?JSON.parse(r):null,i=(0,s.isTranslationSubstitutions)(o)?this.translationFunction(t,o):this.translationFunction(t);e.hasAttribute(n.TWEMOJI_ATTRIBUTE)?e.innerHTML=this.convertEmojiToTwemoji(i):e.innerHTML=i,e.removeAttribute(n.TRANSLATION_ATTRIBUTE)}))}}},380:function(e,t,r){var n,s=this&&this.__decorate||function(e,t,r,n){var s,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i};Object.defineProperty(t,"__esModule",{value:!0}),t.SbsMessage=void 0,r(919);const o=r(6337),i=r(2924),a=r(2627);let l=n=class extends o.LitElement{constructor(){super(...arguments),this.summary="tweetNoProblem",this.details=[],this.notes=[],this.isAlert=!1,this.isExpanded=!1,this.isFocalMode=!1,this.isTweetButtonShown=!1,this.isNoteShown=!1,this.textColor="white"}expand(){this.isExpanded=!0}tweetButtonClicked(){const e=new Event("tweetButtonClick",{bubbles:!0,composed:!0});this.dispatchEvent(e)}firstUpdated(e){this.onRenderedCallback&&this.onRenderedCallback(),super.firstUpdated(e)}getShowMoreButton(){return this.isExpanded?"":o.html``}getDetails(){return this.details.length?o.html`
    - ${this.details.map((e=>"string"==typeof e?o.html`
  • `:o.html` -
  • - `))} -
`:""}getNotes(){if(!this.notes.length)return"";const e=(0,a.classMap)({"shadowban-scanner-collapsed-content":!this.isExpanded,"shadowban-scanner-message-note":!0});return this.notes.map((t=>o.html`
`))}getTweetButton(){const e=(0,a.classMap)({"shadowban-scanner-collapsed-content":!this.isExpanded});return this.isTweetButtonShown?o.html``:""}static cancelClickEvent(e){e.stopPropagation()}render(){const e=(0,a.classMap)({"focal-mode":this.isFocalMode,"shadowban-scanner-message":!0,"shadowban-scanner-message-no-problem":!this.isAlert});return o.html` -
- - ${this.getShowMoreButton()} ${this.getDetails()} ${this.getNotes()} ${this.getTweetButton()} -
- `}};t.SbsMessage=l,l.styles=o.css` +(()=>{"use strict";var e={531:function(e,t){var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,o){function i(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.asyncQuerySelectorAll=t.asyncQuerySelector=void 0;const n=(e,t)=>new Promise((r=>{const n=e();if(n instanceof Element||n instanceof NodeList&&n.length)return void r(n);let s=null;const o=new MutationObserver((()=>{const t=e();(t instanceof Element||t instanceof NodeList&&t.length)&&(o.disconnect(),s&&clearTimeout(s),r(t))}));s=setTimeout((()=>{o.disconnect(),r(null)}),t),o.observe(document.body,{attributes:!0,childList:!0,subtree:!0})}));t.asyncQuerySelector=(e,...t)=>r(void 0,[e,...t],void 0,(function*(e,t=document,r=500){return yield n((()=>t.querySelector(e)),r)})),t.asyncQuerySelectorAll=(e,...t)=>r(void 0,[e,...t],void 0,(function*(e,t=document,r=500){var s;return null!==(s=yield n((()=>t.querySelectorAll(e)),r))&&void 0!==s?s:document.createDocumentFragment().childNodes}))},16:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(601),s=r.n(n),o=r(314),i=r.n(o)()(s());i.push([e.id,".shadowban-scanner-tombstone-necromancer {\n display: inline-block;\n margin: 0 2rem;\n text-decoration: none;\n}\n\n.shadowban-scanner-tombstone-necromancer:hover {\n text-decoration: underline;\n}\n\n[data-sb-translation] {\n display: inline-block;\n min-width: 15em;\n min-height: 1em;\n border-radius: 0.25em;\n background-image: linear-gradient(90deg, transparent 40%, rgba(175, 175, 175, 0.7) 80%, transparent 100%);\n background-size: 200% 100%;\n animation: loading-animation 1.5s linear infinite;\n}\n\n@keyframes loading-animation {\n 0% {\n background-position: 200% 0%;\n opacity: 1;\n }\n 100% {\n background-position: 0% 0%;\n opacity: 1;\n }\n}\n",""]);const a=i},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,s,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(n)for(var a=0;a0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),r&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=r):d[2]=r),s&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=s):d[4]="".concat(s)),t.push(d))}},t}},601:e=>{e.exports=function(e){return e[1]}},72:e=>{var t=[];function r(e){for(var r=-1,n=0;n{var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},56:(e,t,r)=>{e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var s=void 0!==r.layer;s&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,s&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={id:n,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.nc=void 0;var n=r(72),s=r.n(n),o=r(825),i=r.n(o),a=r(659),l=r.n(a),c=r(56),d=r.n(c),h=r(540),p=r.n(h),u=r(113),f=r.n(u),m=r(16),b={};b.styleTagTransform=f(),b.setAttributes=d(),b.insert=l().bind(null,"head"),b.domAPI=i(),b.insertStyleElement=p(),s()(m.A,b),m.A&&m.A.locals&&m.A.locals;const g="data-shadowban-checked",v="data-sb-translation",y="data-sb-shadow-translation",w=["✅","🚫","⚠️"],_=e=>{const t=Object.getOwnPropertyNames(e).filter((e=>e.startsWith("__reactProps$")));return t.length?e[t[0]]:null};class A{profileElement;constructor(e){this.profileElement=e}get props(){const e=_(this.profileElement);if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[0]&&"object"==typeof t.children[0]||"function"==typeof t.children[0])&&(null!==t.children[0].props&&"object"==typeof t.children[0].props||"function"==typeof t.children[0].props)&&Array.isArray(t.children[0].props.children)&&(null!==t.children[0].props.children[1]&&"object"==typeof t.children[0].props.children[1]||"function"==typeof t.children[0].props.children[1])&&(null!==t.children[0].props.children[1].props&&"object"==typeof t.children[0].props.children[1].props||"function"==typeof t.children[0].props.children[1].props)&&(null!==t.children[0].props.children[1].props.user&&"object"==typeof t.children[0].props.children[1].props.user||"function"==typeof t.children[0].props.children[1].props.user)&&(void 0===t.children[0].props.children[1].props.user.possibly_sensitive||null===t.children[0].props.children[1].props.user.possibly_sensitive||!1===t.children[0].props.children[1].props.user.possibly_sensitive||!0===t.children[0].props.children[1].props.user.possibly_sensitive)&&"string"==typeof t.children[0].props.children[1].props.user.screen_name&&(""===t.children[0].props.children[1].props.user.profile_interstitial_type||"sensitive_media"===t.children[0].props.children[1].props.user.profile_interstitial_type||"fake_account"===t.children[0].props.children[1].props.user.profile_interstitial_type||"offensive_profile_content"===t.children[0].props.children[1].props.user.profile_interstitial_type||"timeout"===t.children[0].props.children[1].props.user.profile_interstitial_type)&&Array.isArray(t.children[0].props.children[1].props.user.withheld_in_countries)&&t.children[0].props.children[1].props.user.withheld_in_countries.every((e=>"string"==typeof e))}(e))throw new Error("Failed to get React props of profile");return e.children[0].props.children[1].props.user}}var S=r(531);class C{tweetElement;constructor(e){this.tweetElement=e}getMenuBar(){const e=this.tweetElement.querySelector("div[role='group'][id]");if(!e)throw new Error("Failed to get menu bar of tweet");return e}get element(){return this.tweetElement}get props(){const e=_(this.getMenuBar());if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[1]&&"object"==typeof t.children[1]||"function"==typeof t.children[1])&&(null!==t.children[1].props&&"object"==typeof t.children[1].props||"function"==typeof t.children[1].props)&&(null!==t.children[1].props.retweetWithCommentLink&&"object"==typeof t.children[1].props.retweetWithCommentLink||"function"==typeof t.children[1].props.retweetWithCommentLink)&&(null!==t.children[1].props.retweetWithCommentLink.state&&"object"==typeof t.children[1].props.retweetWithCommentLink.state||"function"==typeof t.children[1].props.retweetWithCommentLink.state)&&(null!==t.children[1].props.retweetWithCommentLink.state.quotedStatus&&"object"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus||"function"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable)&&"string"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.permalink&&(null!==t.children[1].props.retweetWithCommentLink.state.quotedStatus.user&&"object"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user||"function"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive)&&"string"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.screen_name&&(""===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"sensitive_media"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"fake_account"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"offensive_profile_content"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"timeout"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type)&&Array.isArray(t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.withheld_in_countries)&&t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.withheld_in_countries.every((e=>"string"==typeof e))}(e))throw new Error("Failed to get React props of tweet");return e.children[1].props.retweetWithCommentLink.state.quotedStatus}get metadata(){const e=this.props.user.screen_name,t=_(this.element);if(!t)throw new Error("Failed to get React props of tweet");let r=null;const n=function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&Array.isArray(t.children[0])&&(null!==t.children[0][1]&&"object"==typeof t.children[0][1]||"function"==typeof t.children[0][1])&&(null!==t.children[0][1].props&&"object"==typeof t.children[0][1].props||"function"==typeof t.children[0][1].props)&&Array.isArray(t.children[0][1].props.children)&&(null!==t.children[0][1].props.children[0]&&"object"==typeof t.children[0][1].props.children[0]||"function"==typeof t.children[0][1].props.children[0])&&(null!==t.children[0][1].props.children[0].props&&"object"==typeof t.children[0][1].props.children[0].props||"function"==typeof t.children[0][1].props.children[0].props)&&Array.isArray(t.children[0][1].props.children[0].props.children)&&(null!==t.children[0][1].props.children[0].props.children[2]&&"object"==typeof t.children[0][1].props.children[0].props.children[2]||"function"==typeof t.children[0][1].props.children[0].props.children[2])&&(null!==t.children[0][1].props.children[0].props.children[2].props&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props||"function"==typeof t.children[0][1].props.children[0].props.children[2].props)&&Array.isArray(t.children[0][1].props.children[0].props.children[2].props.children)&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7]&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7]||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7])&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7].props&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props)&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser)&&"string"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser.screen_name}(t);return function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&Array.isArray(t.children[0])&&(null!==t.children[0][1]&&"object"==typeof t.children[0][1]||"function"==typeof t.children[0][1])&&(null!==t.children[0][1].props&&"object"==typeof t.children[0][1].props||"function"==typeof t.children[0][1].props)&&Array.isArray(t.children[0][1].props.children)&&(null!==t.children[0][1].props.children[0]&&"object"==typeof t.children[0][1].props.children[0]||"function"==typeof t.children[0][1].props.children[0])&&(null!==t.children[0][1].props.children[0].props&&"object"==typeof t.children[0][1].props.children[0].props||"function"==typeof t.children[0][1].props.children[0].props)&&Array.isArray(t.children[0][1].props.children[0].props.children)&&(null!==t.children[0][1].props.children[0].props.children[1]&&"object"==typeof t.children[0][1].props.children[0].props.children[1]||"function"==typeof t.children[0][1].props.children[0].props.children[1])&&(null!==t.children[0][1].props.children[0].props.children[1].props&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props||"function"==typeof t.children[0][1].props.children[0].props.children[1].props)&&Array.isArray(t.children[0][1].props.children[0].props.children[1].props.children)&&Array.isArray(t.children[0][1].props.children[0].props.children[1].props.children[1])&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2]&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2]||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2])&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2].props&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props)&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser)&&"string"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser.screen_name}(t)&&(r=t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser.screen_name),n&&(r=t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser.screen_name),{isFocalMode:n,isPostedByCurrentUser:e===r}}async clickRetweetButton(e){const t=await(0,S.asyncQuerySelector)("[data-testid='unretweet'], [data-testid='retweet']",this.tweetElement,e);if(!t)throw new Error("Failed to get retweet button of tweet");t.click()}static async clickQuoteButton(e){const t=await(0,S.asyncQuerySelector)(["[data-testid='Dropdown'] [href='/compose/post']","[data-testid='sheetDialog'] [href='/compose/post']"].join(","),document,e);if(!t)throw new Error("Failed to get quote button of tweet");t.click()}static async getTweetTextBox(e){const t="pro.twitter.com"===location.hostname?"[role='dialog'] [data-text='true'], [role='dialog'] textarea[data-testid='tweetTextarea_0']":"[role='dialog'] [data-text='true'], textarea[data-testid='tweetTextarea_0']",r=await(0,S.asyncQuerySelector)(t,document,e);if(!r)throw new Error("Failed to get text box marker of tweet");const n="TEXTAREA"===r.tagName?r:r.parentElement;if(!n)throw new Error("Failed to get text box of tweet");return n}async quoteTweet(e,t=1e3){try{await this.clickRetweetButton(t),await C.clickQuoteButton(t);const r=await C.getTweetTextBox(t);r.innerHTML=e,r.dispatchEvent(new Event("input",{bubbles:!0}))}catch(t){const r=this.props.permalink;open(`https://twitter.com/intent/tweet?text=${encodeURIComponent(`${e}\nhttps://twitter.com${r}`)}`,"_blank")}}}const x={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var $,E=new Uint8Array(16);function k(){if(!$&&!($="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $(E)}for(var P=[],T=0;T<256;++T)P.push((T+256).toString(16).slice(1));const I=function(e,t,r){if(x.randomUUID&&!t&&!e)return x.randomUUID();var n=(e=e||{}).random||(e.rng||k)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var s=0;s<16;++s)t[r+s]=n[s];return t}return function(e,t=0){return(P[e[t+0]]+P[e[t+1]]+P[e[t+2]]+P[e[t+3]]+"-"+P[e[t+4]]+P[e[t+5]]+"-"+P[e[t+6]]+P[e[t+7]]+"-"+P[e[t+8]]+P[e[t+9]]+"-"+P[e[t+10]]+P[e[t+11]]+P[e[t+12]]+P[e[t+13]]+P[e[t+14]]+P[e[t+15]]).toLowerCase()}(n)};class N{OBSERVER_OPTIONS={childList:!0,subtree:!0};onNewTweetCallback=null;onNewProfileCallback=null;constructor(e){const t=`data-twi-ext-checked-${I()}`,r={timeoutMs:1e4,...e},n=new MutationObserver((()=>{if(this.onNewTweetCallback){const e=document.querySelectorAll(`[data-testid="tweet"]:not([${t}])`);for(const r of e)r.setAttribute(t,""),this.onNewTweetCallback(new C(r))}if(this.onNewProfileCallback){const e=document.querySelector(`:not([data-testid="tweet"]) [data-testid="UserName"]:not([${t}])`);e&&(e.setAttribute(t,""),this.onNewProfileCallback(new A(e)))}}));(0,S.asyncQuerySelector)("main",document,r.timeoutMs).then((e=>{if(!e)throw new Error("twi-ext: Failed to get main element");n.observe(e,this.OBSERVER_OPTIONS)})),(0,S.asyncQuerySelector)("#layers",document,r.timeoutMs).then((e=>{if(!e)throw new Error("twi-ext: Failed to get #layers element");n.observe(e,this.OBSERVER_OPTIONS)}))}onNewTweet(e){this.onNewTweetCallback=e}onNewProfile(e){this.onNewProfileCallback=e}}const O=e=>{const t=Boolean(e.possibly_sensitive),r=Boolean(["sensitive_media","offensive_profile_content"].includes(e.profile_interstitial_type)),n=e.withheld_in_countries,s=t||r;return{user:{hasAnyProblem:s||n.length>0,sensitiveMediaInProfile:r,shadowbanned:s,withheldInCountries:n}}},R=e=>{const t=navigator.language,r=new Intl.ListFormat(t,{style:"narrow",type:"conjunction"}),n=new Intl.DisplayNames([t],{type:"region"}),s=e.map((e=>n.of(e)||""));return r.format(s)},U=(e,t,r,n)=>{const s=(e=>{const t=(e=>e.user.shadowbanned||e.user.sensitiveMediaInProfile||Boolean(e.user.withheldInCountries.length)||e.tweet.possiblySensitive?e.user.withheldInCountries.length?"accountIsBlockedInSomeCountries":e.user.shadowbanned||e.user.sensitiveMediaInProfile?e.tweet.possiblySensitive?e.tweet.ageRestriction?"accountAndTweetShadowbanned":"accountShadowbannedAndTweetFlaggedAsSensitive":"accountShadowbanned":e.tweet.ageRestriction?"tweetShadowbanned":"tweetFlaggedAsSensitive":"tweetNoProblem")(e),r=(e=>[e.user.shadowbanned?"accountIsShadowbannedOrFlaggedAsSensitive":"accountIsNotFlaggedAsSensitive",e.user.sensitiveMediaInProfile?"profileContainsSensitiveMedia":"profileDoesNotContainSensitiveMedia",e.user.withheldInCountries.length?{messageName:"accountIsWithheldInCountries",substitutions:R(e.user.withheldInCountries)}:"accountIsNotWithheldInCountries"])(e),n=(e=>[e.tweet.possiblySensitive?"tweetIsFlaggedAsSensitive":"tweetIsNotFlaggedAsSensitive",e.tweet.ageRestriction?"tweetIsAgeRestricted":"tweetIsNotAgeRestricted",{possiblyUnsearchable:"tweetMayNotBeSearchable",searchable:"tweetIsSearchable",unsearchable:"tweetIsNotSearchable"}[e.tweet.searchability]])(e);return{details:[...r,...n],summary:t}})(t),o=(e=>{const t="searchable"===e.tweet.searchability;return`\n${e.user.shadowbanned?"🚫Account flagged as sensitive or shadowbanned":"✅Account not flagged as sensitive"}\n${e.user.sensitiveMediaInProfile?"🚫Sensitive flag on profile media":"✅No sensitive flag on profile media"}\n${e.user.withheldInCountries.length?"🚫Account blocked in some countries":"✅Account not blocked in any countries"}\n${e.tweet.possiblySensitive?"🚫Sensitive flag on tweet":"✅No sensitive flag on tweet"}\n${e.tweet.ageRestriction?"🚫Age limit on tweet":"✅No age limit on tweet"}\n${t?"✅Tweet searchable":"🚫Tweet may not be searchable"}\n\nShadowban Scanner by ろぼいん\n${navigator.language.toLowerCase().startsWith("ja")?"https://shadowban-scanner.roboin.io/ja/":"https://shadowban-scanner.roboin.io/en/"}\n `.trim()})(t);return{...s,isAlert:t.tweet.hasAnyProblem,isExpanded:n.alwaysDetailedView,isNoteShown:n.showNotesInMessages,isTweetButtonShown:n.showTweetButton,notes:["falsePositivesAndFalseNegativesOccur","translatedByAI"],onRenderedCallback:r,tweet:e,tweetText:o,type:"tweet"}};function M(e,t,r,n){var s,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;const j=e=>(t,r)=>{void 0!==r?r.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)},L=globalThis,B=L.ShadowRoot&&(void 0===L.ShadyCSS||L.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,F=Symbol(),q=new WeakMap;class z{constructor(e,t,r){if(this._$cssResult$=!0,r!==F)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(B&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=q.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&q.set(t,e))}return e}toString(){return this.cssText}}const W=(e,...t)=>{const r=1===e.length?e[0]:t.reduce(((t,r,n)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[n+1]),e[0]);return new z(r,e,F)},H=B?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return(e=>new z("string"==typeof e?e:e+"",void 0,F))(t)})(e):e,{is:D,defineProperty:V,getOwnPropertyDescriptor:G,getOwnPropertyNames:Q,getOwnPropertySymbols:K,getPrototypeOf:X}=Object,Y=globalThis,J=Y.trustedTypes,Z=J?J.emptyScript:"",ee=Y.reactiveElementPolyfillSupport,te=(e,t)=>e,re={toAttribute(e,t){switch(t){case Boolean:e=e?Z:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},ne=(e,t)=>!D(e,t),se={attribute:!0,type:String,converter:re,reflect:!1,hasChanged:ne};Symbol.metadata??=Symbol("metadata"),Y.litPropertyMetadata??=new WeakMap;class oe extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=se){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(e,r,t);void 0!==n&&V(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){const{get:n,set:s}=G(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return n?.call(this)},set(t){const o=n?.call(this);s.call(this,t),this.requestUpdate(e,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??se}static _$Ei(){if(this.hasOwnProperty(te("elementProperties")))return;const e=X(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(te("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(te("properties"))){const e=this.properties,t=[...Q(e),...K(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(H(e))}else void 0!==e&&t.push(H(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(B)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const r of t){const t=document.createElement("style"),n=L.litNonce;void 0!==n&&t.setAttribute("nonce",n),t.textContent=r.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EC(e,t){const r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(void 0!==n&&!0===r.reflect){const s=(void 0!==r.converter?.toAttribute?r.converter:re).toAttribute(t,r.type);this._$Em=e,null==s?this.removeAttribute(n):this.setAttribute(n,s),this._$Em=null}}_$AK(e,t){const r=this.constructor,n=r._$Eh.get(e);if(void 0!==n&&this._$Em!==n){const e=r.getPropertyOptions(n),s="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:re;this._$Em=n,this[n]=s.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){if(r??=this.constructor.getPropertyOptions(e),!(r.hasChanged??ne)(this[e],t))return;this.P(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,r){this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e)!0!==r.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],r)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}}oe.elementStyles=[],oe.shadowRootOptions={mode:"open"},oe[te("elementProperties")]=new Map,oe[te("finalized")]=new Map,ee?.({ReactiveElement:oe}),(Y.reactiveElementVersions??=[]).push("2.0.4");const ie={attribute:!0,type:String,converter:re,reflect:!1,hasChanged:ne},ae=(e=ie,t,r)=>{const{kind:n,metadata:s}=r;let o=globalThis.litPropertyMetadata.get(s);if(void 0===o&&globalThis.litPropertyMetadata.set(s,o=new Map),o.set(r.name,e),"accessor"===n){const{name:n}=r;return{set(r){const s=t.get.call(this);t.set.call(this,r),this.requestUpdate(n,s,e)},init(t){return void 0!==t&&this.P(n,void 0,e),t}}}if("setter"===n){const{name:n}=r;return function(r){const s=this[n];t.call(this,r),this.requestUpdate(n,s,e)}}throw Error("Unsupported decorator location: "+n)};function le(e){return(t,r)=>"object"==typeof r?ae(e,t,r):((e,t,r)=>{const n=t.hasOwnProperty(r);return t.constructor.createProperty(r,n?{...e,wrapped:!0}:e),n?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}function ce(e){return le({...e,state:!0,attribute:!1})}const de=(e,t,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,r),r);function he(e,t){return(r,n,s)=>{const o=t=>t.renderRoot?.querySelector(e)??null;if(t){const{get:e,set:t}="object"==typeof n?r:s??(()=>{const e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return de(r,n,{get(){let r=e.call(this);return void 0===r&&(r=o(this),(null!==r||this.hasUpdated)&&t.call(this,r)),r}})}return de(r,n,{get(){return o(this)}})}}const pe=globalThis,ue=pe.trustedTypes,fe=ue?ue.createPolicy("lit-html",{createHTML:e=>e}):void 0,me="$lit$",be=`lit$${Math.random().toFixed(9).slice(2)}$`,ge="?"+be,ve=`<${ge}>`,ye=document,we=()=>ye.createComment(""),_e=e=>null===e||"object"!=typeof e&&"function"!=typeof e,Ae=Array.isArray,Se="[ \t\n\f\r]",Ce=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,xe=/-->/g,$e=/>/g,Ee=RegExp(`>|${Se}(?:([^\\s"'>=/]+)(${Se}*=${Se}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ke=/'/g,Pe=/"/g,Te=/^(?:script|style|textarea|title)$/i,Ie=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),Ne=Ie(1),Oe=(Ie(2),Ie(3),Symbol.for("lit-noChange")),Re=Symbol.for("lit-nothing"),Ue=new WeakMap,Me=ye.createTreeWalker(ye,129);function je(e,t){if(!Ae(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==fe?fe.createHTML(t):t}class Le{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let s=0,o=0;const i=e.length-1,a=this.parts,[l,c]=((e,t)=>{const r=e.length-1,n=[];let s,o=2===t?"":3===t?"":"",i=Ce;for(let t=0;t"===l[0]?(i=s??Ce,c=-1):void 0===l[1]?c=-2:(c=i.lastIndex-l[2].length,a=l[1],i=void 0===l[3]?Ee:'"'===l[3]?Pe:ke):i===Pe||i===ke?i=Ee:i===xe||i===$e?i=Ce:(i=Ee,s=void 0);const h=i===Ee&&e[t+1].startsWith("/>")?" ":"";o+=i===Ce?r+ve:c>=0?(n.push(a),r.slice(0,c)+me+r.slice(c)+be+h):r+be+(-2===c?t:h)}return[je(e,o+(e[r]||"")+(2===t?"":3===t?"":"")),n]})(e,t);if(this.el=Le.createElement(l,r),Me.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=Me.nextNode())&&a.length0){n.textContent=ue?ue.emptyScript:"";for(let r=0;rAe(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Re&&_e(this._$AH)?this._$AA.nextSibling.data=e:this.T(ye.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:r}=e,n="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=Le.createElement(je(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{const e=new Fe(n,this),r=e.u(this.options);e.p(t),this.T(r),this._$AH=e}}_$AC(e){let t=Ue.get(e.strings);return void 0===t&&Ue.set(e.strings,t=new Le(e)),t}k(e){Ae(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,n=0;for(const s of e)n===t.length?t.push(r=new qe(this.O(we()),this.O(we()),this,this.options)):r=t[n],r._$AI(s),n++;n2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=Re}_$AI(e,t=this,r,n){const s=this.strings;let o=!1;if(void 0===s)e=Be(this,e,t,0),o=!_e(e)||e!==this._$AH&&e!==Oe,o&&(this._$AH=e);else{const n=e;let i,a;for(e=s[0],i=0;i{const n=r?.renderBefore??t;let s=n._$litPart$;if(void 0===s){const e=r?.renderBefore??null;n._$litPart$=s=new qe(t.insertBefore(we(),e),e,void 0,r??{})}return s._$AI(e),s})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return Oe}}Qe._$litElement$=!0,Qe.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:Qe});const Ke=globalThis.litElementPolyfillSupport;Ke?.({LitElement:Qe}),(globalThis.litElementVersions??=[]).push("4.1.0");class Xe extends Qe{connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){return Ne``}}const Ye=W`:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute;transition-duration:inherit;transition-property:inherit;transition-timing-function:inherit}:host{display:flex;pointer-events:none;transition-property:box-shadow,opacity}.shadow::before,.shadow::after{content:"";transition-property:box-shadow,opacity;--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000))}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color);opacity:.15} +`;let Je=class extends Xe{};Je.styles=[Ye],Je=M([j("md-elevation")],Je);const Ze=Symbol("attachableController");let et;et=new MutationObserver((e=>{for(const t of e)t.target[Ze]?.hostConnected()}));class tt{get htmlFor(){return this.host.getAttribute("for")}set htmlFor(e){null===e?this.host.removeAttribute("for"):this.host.setAttribute("for",e)}get control(){return this.host.hasAttribute("for")?this.htmlFor&&this.host.isConnected?this.host.getRootNode().querySelector(`#${this.htmlFor}`):null:this.currentControl||this.host.parentElement}set control(e){e?this.attach(e):this.detach()}constructor(e,t){this.host=e,this.onControlChange=t,this.currentControl=null,e.addController(this),e[Ze]=this,et?.observe(e,{attributeFilter:["for"]})}attach(e){e!==this.currentControl&&(this.setCurrentControl(e),this.host.removeAttribute("for"))}detach(){this.setCurrentControl(null),this.host.setAttribute("for","")}hostConnected(){this.setCurrentControl(this.control)}hostDisconnected(){this.setCurrentControl(null)}setCurrentControl(e){this.onControlChange(this.currentControl,e),this.currentControl=e}}const rt=["focusin","focusout","pointerdown"];class nt extends Qe{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new tt(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}handleEvent(e){if(!e[st]){switch(e.type){default:return;case"focusin":this.visible=this.control?.matches(":focus-visible")??!1;break;case"focusout":case"pointerdown":this.visible=!1}e[st]=!0}}onControlChange(e,t){for(const r of rt)e?.removeEventListener(r,this),t?.addEventListener(r,this)}update(e){e.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(e)}}M([le({type:Boolean,reflect:!0})],nt.prototype,"visible",void 0),M([le({type:Boolean,reflect:!0})],nt.prototype,"inward",void 0);const st=Symbol("handledByFocusRing"),ot=W`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}} +`;let it=class extends nt{};it.styles=[ot],it=M([j("md-focus-ring")],it);class at{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this.t=e,this._$AM=t,this.i=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const lt=(e=>(...t)=>({_$litDirective$:e,values:t}))(class extends at{constructor(e){if(super(e),1!==e.type||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}const r=e.element.classList;for(const e of this.st)e in t||(r.remove(e),this.st.delete(e));for(const e in t){const n=!!t[e];n===this.st.has(e)||this.nt?.has(e)||(n?(r.add(e),this.st.add(e)):(r.remove(e),this.st.delete(e)))}return Oe}});var ct;!function(e){e[e.INACTIVE=0]="INACTIVE",e[e.TOUCH_DELAY=1]="TOUCH_DELAY",e[e.HOLDING=2]="HOLDING",e[e.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"}(ct||(ct={}));const dt=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],ht=window.matchMedia("(forced-colors: active)");class pt extends Qe{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=ct.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new tt(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const e={hovered:this.hovered,pressed:this.pressed};return Ne`
`}update(e){e.has("disabled")&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(e)}handlePointerenter(e){this.shouldReactToEvent(e)&&(this.hovered=!0)}handlePointerleave(e){this.shouldReactToEvent(e)&&(this.hovered=!1,this.state!==ct.INACTIVE&&this.endPressAnimation())}handlePointerup(e){if(this.shouldReactToEvent(e)){if(this.state!==ct.HOLDING)return this.state===ct.TOUCH_DELAY?(this.state=ct.WAITING_FOR_CLICK,void this.startPressAnimation(this.rippleStartEvent)):void 0;this.state=ct.WAITING_FOR_CLICK}}async handlePointerdown(e){if(this.shouldReactToEvent(e)){if(this.rippleStartEvent=e,!this.isTouch(e))return this.state=ct.WAITING_FOR_CLICK,void this.startPressAnimation(e);this.checkBoundsAfterContextMenu&&!this.inBounds(e)||(this.checkBoundsAfterContextMenu=!1,this.state=ct.TOUCH_DELAY,await new Promise((e=>{setTimeout(e,150)})),this.state===ct.TOUCH_DELAY&&(this.state=ct.HOLDING,this.startPressAnimation(e)))}}handleClick(){this.disabled||(this.state!==ct.WAITING_FOR_CLICK?this.state===ct.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation()):this.endPressAnimation())}handlePointercancel(e){this.shouldReactToEvent(e)&&this.endPressAnimation()}handleContextmenu(){this.disabled||(this.checkBoundsAfterContextMenu=!0,this.endPressAnimation())}determineRippleSize(){const{height:e,width:t}=this.getBoundingClientRect(),r=Math.max(e,t),n=Math.max(.35*r,75),s=Math.floor(.2*r),o=Math.sqrt(t**2+e**2)+10;this.initialSize=s,this.rippleScale=""+(o+n)/s,this.rippleSize=`${s}px`}getNormalizedPointerEventCoords(e){const{scrollX:t,scrollY:r}=window,{left:n,top:s}=this.getBoundingClientRect(),o=t+n,i=r+s,{pageX:a,pageY:l}=e;return{x:a-o,y:l-i}}getTranslationCoordinates(e){const{height:t,width:r}=this.getBoundingClientRect(),n={x:(r-this.initialSize)/2,y:(t-this.initialSize)/2};let s;return s=e instanceof PointerEvent?this.getNormalizedPointerEventCoords(e):{x:r/2,y:t/2},s={x:s.x-this.initialSize/2,y:s.y-this.initialSize/2},{startPoint:s,endPoint:n}}startPressAnimation(e){if(!this.mdRoot)return;this.pressed=!0,this.growAnimation?.cancel(),this.determineRippleSize();const{startPoint:t,endPoint:r}=this.getTranslationCoordinates(e),n=`${t.x}px, ${t.y}px`,s=`${r.x}px, ${r.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${n}) scale(1)`,`translate(${s}) scale(${this.rippleScale})`]},{pseudoElement:"::after",duration:450,easing:"cubic-bezier(0.2, 0, 0, 1)",fill:"forwards"})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=ct.INACTIVE;const e=this.growAnimation;let t=1/0;"number"==typeof e?.currentTime?t=e.currentTime:e?.currentTime&&(t=e.currentTime.to("ms").value),t>=225?this.pressed=!1:(await new Promise((e=>{setTimeout(e,225-t)})),this.growAnimation===e&&(this.pressed=!1))}shouldReactToEvent(e){if(this.disabled||!e.isPrimary)return!1;if(this.rippleStartEvent&&this.rippleStartEvent.pointerId!==e.pointerId)return!1;if("pointerenter"===e.type||"pointerleave"===e.type)return!this.isTouch(e);const t=1===e.buttons;return this.isTouch(e)||t}inBounds({x:e,y:t}){const{top:r,left:n,bottom:s,right:o}=this.getBoundingClientRect();return e>=n&&e<=o&&t>=r&&t<=s}isTouch({pointerType:e}){return"touch"===e}async handleEvent(e){if(!ht?.matches)switch(e.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(e);break;case"pointerdown":await this.handlePointerdown(e);break;case"pointerenter":this.handlePointerenter(e);break;case"pointerleave":this.handlePointerleave(e);break;case"pointerup":this.handlePointerup(e)}}onControlChange(e,t){for(const r of dt)e?.removeEventListener(r,this),t?.addEventListener(r,this)}}M([le({type:Boolean,reflect:!0})],pt.prototype,"disabled",void 0),M([ce()],pt.prototype,"hovered",void 0),M([ce()],pt.prototype,"pressed",void 0),M([he(".surface")],pt.prototype,"mdRoot",void 0);const ut=W`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms} +`;let ft=class extends pt{};ft.styles=[ut],ft=M([j("md-ripple")],ft);const mt=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText"],bt=mt.map(vt);function gt(e){return bt.includes(e)}function vt(e){return e.replace("aria","aria-").replace(/Elements?/g,"").toLowerCase()}const yt=Symbol("privateIgnoreAttributeChangesFor");function wt(e){return`data-${e}`}function _t(e){return e.replace(/-\w/,(e=>e[1].toUpperCase()))}const At=Symbol("internals"),St=Symbol("privateInternals");let Ct=!1;const xt=function(e){var t;class r extends e{constructor(){super(...arguments),this[t]=new Set}attributeChangedCallback(e,t,r){if(!gt(e))return void super.attributeChangedCallback(e,t,r);if(this[yt].has(e))return;this[yt].add(e),this.removeAttribute(e),this[yt].delete(e);const n=_t(e);null===r?delete this.dataset[n]:this.dataset[n]=r,this.requestUpdate(_t(e),t)}getAttribute(e){return gt(e)?super.getAttribute(wt(e)):super.getAttribute(e)}removeAttribute(e){super.removeAttribute(e),gt(e)&&(super.removeAttribute(wt(e)),this.requestUpdate())}}return t=yt,function(e){for(const t of mt){const r=vt(t),n=wt(r),s=_t(r);e.createProperty(t,{attribute:r,noAccessor:!0}),e.createProperty(Symbol(n),{attribute:n,noAccessor:!0}),Object.defineProperty(e.prototype,t,{configurable:!0,enumerable:!0,get(){return this.dataset[s]??null},set(e){const r=this.dataset[s]??null;e!==r&&(null===e?delete this.dataset[s]:this.dataset[s]=e,this.requestUpdate(t,r))}})}}(r),r}(($t=Qe,class extends $t{get[At](){return this[St]||(this[St]=this.attachInternals()),this[St]}}));var $t;class Et extends xt{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[At].form}constructor(){super(),this.disabled=!1,this.softDisabled=!1,this.href="",this.target="",this.trailingIcon=!1,this.hasIcon=!1,this.type="submit",this.value="",this.addEventListener("click",this.handleClick.bind(this))}focus(){this.buttonElement?.focus()}blur(){this.buttonElement?.blur()}render(){const e=!this.href&&(this.disabled||this.softDisabled),t=this.href?this.renderLink():this.renderButton(),r=this.href?"link":"button";return Ne` + ${this.renderElevationOrOutline?.()} +
+ + + ${t} + `}renderButton(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return Ne``}renderLink(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return Ne`${this.renderContent()} + `}renderContent(){const e=Ne``;return Ne` + + ${this.trailingIcon?Re:e} + + ${this.trailingIcon?e:Re} + `}handleClick(e){if(!this.href&&this.softDisabled)return e.stopImmediatePropagation(),void e.preventDefault();(function(e){return e.currentTarget===e.target&&e.composedPath()[0]===e.target&&!e.target.disabled&&!function(e){const t=Ct;return t&&(e.preventDefault(),e.stopImmediatePropagation()),async function(){Ct=!0,await null,Ct=!1}(),t}(e)})(e)&&this.buttonElement&&(this.focus(),function(e){const t=new MouseEvent("click",{bubbles:!0});e.dispatchEvent(t)}(this.buttonElement))}handleSlotChange(){this.hasIcon=this.assignedIcons.length>0}}Et.addInitializer((e=>{const t=e;t.addEventListener("click",(async e=>{const{type:r,[At]:n}=t,{form:s}=n;s&&"button"!==r&&(await new Promise((e=>{setTimeout(e)})),e.defaultPrevented||("reset"!==r?(s.addEventListener("submit",(e=>{Object.defineProperty(e,"submitter",{configurable:!0,enumerable:!0,get:()=>t})}),{capture:!0,once:!0}),n.setFormValue(t.value),s.requestSubmit()):s.reset()))}))})),Et.formAssociated=!0,Et.shadowRootOptions={mode:"open",delegatesFocus:!0},M([le({type:Boolean,reflect:!0})],Et.prototype,"disabled",void 0),M([le({type:Boolean,attribute:"soft-disabled",reflect:!0})],Et.prototype,"softDisabled",void 0),M([le()],Et.prototype,"href",void 0),M([le()],Et.prototype,"target",void 0),M([le({type:Boolean,attribute:"trailing-icon",reflect:!0})],Et.prototype,"trailingIcon",void 0),M([le({type:Boolean,attribute:"has-icon",reflect:!0})],Et.prototype,"hasIcon",void 0),M([le()],Et.prototype,"type",void 0),M([le({reflect:!0})],Et.prototype,"value",void 0),M([he(".button")],Et.prototype,"buttonElement",void 0),M([function(e){return(t,r)=>{const{slot:n,selector:s}=e??{},o="slot"+(n?`[name=${n}]`:":not([name])");return de(t,r,{get(){const t=this.renderRoot?.querySelector(o),r=t?.assignedElements(e)??[];return void 0===s?r:r.filter((e=>e.matches(s)))}})}}({slot:"icon",flatten:!0})],Et.prototype,"assignedIcons",void 0);class kt extends Et{renderElevationOrOutline(){return Ne``}}const Pt=W`:host{--_container-color: var(--md-filled-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-elevation: var(--md-filled-button-container-elevation, 0);--_container-height: var(--md-filled-button-container-height, 40px);--_container-shadow-color: var(--md-filled-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-button-focus-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-container-elevation: var(--md-filled-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-button-hover-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-button-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-filled-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-button-pressed-label-text-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-color: var(--md-filled-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_container-shape-start-start: var(--md-filled-button-container-shape-start-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-button-container-shape-start-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-button-container-shape-end-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-button-container-shape-end-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-button-leading-space, 24px);--_trailing-space: var(--md-filled-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-button-with-trailing-icon-trailing-space, 16px)} +`,Tt=W`md-elevation{transition-duration:280ms}:host(:is([disabled],[soft-disabled])) md-elevation{transition:none}md-elevation{--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}:host(:focus-within) md-elevation{--md-elevation-level: var(--_focus-container-elevation)}:host(:hover) md-elevation{--md-elevation-level: var(--_hover-container-elevation)}:host(:active) md-elevation{--md-elevation-level: var(--_pressed-container-elevation)}:host(:is([disabled],[soft-disabled])) md-elevation{--md-elevation-level: var(--_disabled-container-elevation)} +`,It=W`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background-color:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host(:is([disabled],[soft-disabled])) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host(:is([disabled],[soft-disabled])) .background{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host(:is([disabled],[soft-disabled])) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none} +`;let Nt=class extends kt{};Nt.styles=[It,Tt,Pt],Nt=M([j("md-filled-button")],Nt);var Ot,Rt=function(e,t,r,n){var s,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i};let Ut=class extends Qe{static{Ot=this}summary="tweetNoProblem";details=[];notes=[];isAlert=!1;isExpanded=!1;isFocalMode=!1;isTweetButtonShown=!1;isNoteShown=!1;onRenderedCallback;textColor="white";static styles=W` * { font-family: sans-serif; } @@ -128,44 +147,25 @@ opacity: 1; } } - `,s([(0,i.property)({reflect:!0})],l.prototype,"summary",void 0),s([(0,i.property)({reflect:!0,type:Array})],l.prototype,"details",void 0),s([(0,i.property)({reflect:!0,type:Array})],l.prototype,"notes",void 0),s([(0,i.property)({reflect:!0,type:Boolean})],l.prototype,"isAlert",void 0),s([(0,i.property)({reflect:!0,type:Boolean})],l.prototype,"isExpanded",void 0),s([(0,i.property)({reflect:!0,type:Boolean})],l.prototype,"isFocalMode",void 0),s([(0,i.property)({reflect:!0,type:Boolean})],l.prototype,"isTweetButtonShown",void 0),s([(0,i.property)({reflect:!0,type:Boolean})],l.prototype,"isNoteShown",void 0),s([(0,i.property)({attribute:!1,reflect:!0})],l.prototype,"onRenderedCallback",void 0),s([(0,i.property)({reflect:!0,type:String})],l.prototype,"textColor",void 0),t.SbsMessage=l=n=s([(0,i.customElement)("sbs-message")],l)},6911:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Core=void 0;const n=r(41),s=r(4114),o=r(1520),i=r(902),a=r(3114),l=r(8700),c=r(2634);t.Core=class{constructor(e,t){this.settings=e,this.onMessageCallback=t;const r=new s.Timeline;r.onNewTweet((e=>{this.checkTweet(e),this.timelineObserverCallback()})),r.onNewProfile((e=>{this.checkProfile(e)}))}checkProfile(e){if(Boolean(document.querySelector("[data-testid='editProfileButton']"))&&!this.settings.enableForOtherUsersProfiles)return;const t=i.PropsAnalyzer.analyzeProfileProps(e.props);if(!t.user.hasAnyProblem&&!this.settings.showMessagesInUnproblematicProfiles)return;const r=o.MessageDataGenerator.generateForProfile(t,this.onMessageCallback),n=new a.SbsMessageWrapper(r),s=document.querySelector("[data-testid='UserDescription']")||document.querySelector("[data-testid='UserName']");if(!s)throw new Error("Failed to get user description of profile");n.insertAdjacentElement(s,"afterend")}checkTweet(e){const t=i.PropsAnalyzer.analyzeTweetProps(new c.TweetParser(e));if(!e.metadata.isPostedByCurrentUser&&!this.settings.enableForOtherUsersTweets)return;if(!t.tweet.hasAnyProblem&&!this.settings.showMessagesInUnproblematicTweets)return;const r=o.MessageDataGenerator.generateForTweet(e,t,this.onMessageCallback,this.settings),n=new a.SbsMessageWrapper(r),s=e.element.querySelector("[data-testid='analyticsButton']")?.parentElement||e.element.querySelector("div[role='group'][id]");if(!s)throw new Error("Failed to get landmark element of tweet");n.insertAdjacentElement(s,"beforebegin")}necromancer(e){e.setAttribute(n.CHECKED_DATA_ATTRIBUTE,"true");const t=i.PropsAnalyzer.analyzeTombstoneProps(new l.TombstoneParser(e).parse());if(!t)return;const r=`https://twitter.com/i/status/${t}`,s=document.createElement("a");s.href=r,s.target="_blank",s.setAttribute(n.TRANSLATION_ATTRIBUTE,"viewTweet"),s.classList.add("shadowban-scanner-tombstone-necromancer");const o=e.querySelector("a");if(!o)throw new Error("Failed to get help link");s.style.color=getComputedStyle(o).color,o.insertAdjacentElement("afterend",s),this.onMessageCallback()}timelineObserverCallback(){const e=document.querySelectorAll(`[data-testid='cellInnerDiv']:not([${n.CHECKED_DATA_ATTRIBUTE}])`);for(const t of e)t.setAttribute(n.CHECKED_DATA_ATTRIBUTE,"true"),Boolean(t.querySelector("a[href='https://help.twitter.com/rules-and-policies/notices-on-twitter']"))&&this.necromancer(t)}}},1520:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MessageDataGenerator=void 0;const n=r(8197),s=r(6219);t.MessageDataGenerator=class{static generateForProfile(e,t){return{...s.TranslationKeyProvider.fromProfileAnalyzer(e),isAlert:e.user.hasAnyProblem,onRenderedCallback:t,type:"profile"}}static generateForTweet(e,t,r,o){const i=s.TranslationKeyProvider.fromTweetAnalyzer(t),a=n.ShareTextGenerator.generateShareText(t);return{...i,isAlert:t.tweet.hasAnyProblem,isExpanded:o.alwaysDetailedView,isNoteShown:o.showNotesInMessages,isTweetButtonShown:o.showTweetButton,notes:["falsePositivesAndFalseNegativesOccur","translatedByAI"],onRenderedCallback:r,tweet:e,tweetText:a,type:"tweet"}}}},8700:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TombstoneParser=void 0;const n=r(2632),s=r(543);t.TombstoneParser=class{constructor(e){this.element=e}parse(){const e=(0,s.getReactProps)(this.element);if(!(0,n.isCellInnerDivProps)(e))throw new Error("Type of props is invalid.");const t=this.element.querySelector("div > div");if(!t)throw new Error("Failed to get the tombstone's grandchild element.");const r=(0,s.getReactProps)(t);if(!(0,n.isTombstoneGrandchildProps)(r))throw new Error("Type of grandchild props is invalid.");return[e,r]}}},2634:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TweetParser=void 0,t.TweetParser=class{constructor(e){this.tweet=e}parse(){return this.tweet.props}}},543:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getReactProps=void 0,t.getReactProps=e=>e[Object.getOwnPropertyNames(e).filter((e=>e.startsWith("__reactProps$")))]},902:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropsAnalyzer=void 0;class r{static analyzeProfileProps(e){const t=Boolean(e.possibly_sensitive),r=Boolean(["sensitive_media","offensive_profile_content"].includes(e.profile_interstitial_type)),n=e.withheld_in_countries,s=t||r;return{user:{hasAnyProblem:s||n.length>0,sensitiveMediaInProfile:r,shadowbanned:s,withheldInCountries:n}}}static analyzeTweetProps(e){const t=e.parse(),n=r.analyzeProfileProps(t.user),s=Boolean(t.possibly_sensitive),o=!(!1===t.possibly_sensitive_editable),i=s&&!o;let a="searchable";return i||n.user.shadowbanned?a="unsearchable":s&&(a="possiblyUnsearchable"),{...n,tweet:{ageRestriction:i,hasAnyProblem:"searchable"!==a||n.user.hasAnyProblem,possiblySensitive:s,searchability:a}}}static analyzeTombstoneProps(e){const[t,r]=e;if(!t.children._owner)return;if(r.children[0].props.entry.conversationPosition.showReplyContext)return;const{key:n}=t.children._owner;return n.split("-")[3]}}t.PropsAnalyzer=r},3114:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SbsMessageWrapper=void 0,r(380);const n=r(41);class s{constructor(e){this.tweet=null;const t=document.createElement("sbs-message");if(t.textColor=s.getTextColor(),t.summary=e.summary,t.isAlert=e.isAlert,t.onRenderedCallback=e.onRenderedCallback,"tweet"===e.type){if(!e.tweet)throw new Error("Tweet data is missing");this.tweet=e.tweet,t.details=e.details,t.notes=e.notes,t.isFocalMode=e.tweet.metadata.isFocalMode,t.isExpanded=e.isExpanded,t.isTweetButtonShown=e.isTweetButtonShown,t.isNoteShown=e.isNoteShown,this.tweetText=e.tweetText}else t.isExpanded=!0;t.setAttribute(n.SHADOW_TRANSLATION_ATTRIBUTE,""),t.addEventListener("tweetButtonClick",this.onTweetButtonClick.bind(this)),this.sbsMessage=t}static getTextColor(){const e=["[data-testid='User-Name'] div:first-child span","[data-testid='UserName'] div:first-child span"].join(","),t=document.querySelector(e);if(!t)throw new Error("Failed to get user name span of tweet");const{color:r}=getComputedStyle(t);return r}onTweetButtonClick(){if(!this.tweet||!this.tweetText)throw new Error("Tweet button clicked without source tweet");this.tweet.quoteTweet(this.tweetText)}insertAdjacentElement(e,t){e.insertAdjacentElement(t,this.sbsMessage)}}t.SbsMessageWrapper=s},8197:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ShareTextGenerator=void 0,t.ShareTextGenerator=class{static generateShareText(e){const t="searchable"===e.tweet.searchability;return`\n${e.user.shadowbanned?"🚫Account flagged as sensitive or shadowbanned":"✅Account not flagged as sensitive"}\n${e.user.sensitiveMediaInProfile?"🚫Sensitive flag on profile media":"✅No sensitive flag on profile media"}\n${e.user.withheldInCountries.length?"🚫Account blocked in some countries":"✅Account not blocked in any countries"}\n${e.tweet.possiblySensitive?"🚫Sensitive flag on tweet":"✅No sensitive flag on tweet"}\n${e.tweet.ageRestriction?"🚫Age limit on tweet":"✅No age limit on tweet"}\n${t?"✅Tweet searchable":"🚫Tweet may not be searchable"}\n\nShadowban Scanner by ろぼいん\n${navigator.language.toLowerCase().startsWith("ja")?"https://shadowban-scanner.roboin.io/ja/":"https://shadowban-scanner.roboin.io/en/"}\n `.trim()}}},6219:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TranslationKeyProvider=void 0;class r{static fromProfileAnalyzer(e){let t=null;return t=e.user.shadowbanned?"thisUserIsShadowbanned":e.user.withheldInCountries.length?"accountIsBlockedInSomeCountries":"thisUserIsNotShadowbanned",{summary:t}}static summarizeForTweet(e){return e.user.shadowbanned||e.user.sensitiveMediaInProfile||Boolean(e.user.withheldInCountries.length)||e.tweet.possiblySensitive?e.user.withheldInCountries.length?"accountIsBlockedInSomeCountries":e.user.shadowbanned||e.user.sensitiveMediaInProfile?e.tweet.possiblySensitive?e.tweet.ageRestriction?"accountAndTweetShadowbanned":"accountShadowbannedAndTweetFlaggedAsSensitive":"accountShadowbanned":e.tweet.ageRestriction?"tweetShadowbanned":"tweetFlaggedAsSensitive":"tweetNoProblem"}static formatCountryList(e){const t=navigator.language,r=new Intl.ListFormat(t,{style:"narrow",type:"conjunction"}),n=new Intl.DisplayNames([t],{type:"region"}),s=e.map((e=>n.of(e)||""));return r.format(s)}static getAccountDetails(e){return[e.user.shadowbanned?"accountIsShadowbannedOrFlaggedAsSensitive":"accountIsNotFlaggedAsSensitive",e.user.sensitiveMediaInProfile?"profileContainsSensitiveMedia":"profileDoesNotContainSensitiveMedia",e.user.withheldInCountries.length?{messageName:"accountIsWithheldInCountries",substitutions:r.formatCountryList(e.user.withheldInCountries)}:"accountIsNotWithheldInCountries"]}static getTweetDetails(e){return[e.tweet.possiblySensitive?"tweetIsFlaggedAsSensitive":"tweetIsNotFlaggedAsSensitive",e.tweet.ageRestriction?"tweetIsAgeRestricted":"tweetIsNotAgeRestricted",{possiblyUnsearchable:"tweetMayNotBeSearchable",searchable:"tweetIsSearchable",unsearchable:"tweetIsNotSearchable"}[e.tweet.searchability]]}static fromTweetAnalyzer(e){const t=r.summarizeForTweet(e);return{details:[...r.getAccountDetails(e),...r.getTweetDetails(e)],summary:t}}}t.TranslationKeyProvider=r},5540:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UserScriptBase=void 0,r(5535);const n=r(6911),s=r(8140),o=r(7316);t.UserScriptBase=class{constructor(e){const t=new o.Translator(((t,r)=>{if(r){const n="string"==typeof r?[r]:r;let s=e[t].message;for(let e=0;e{t.translateElements()}))}}},8482:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(5540),o=n(r(6521));new s.UserScriptBase(o.default)},1497:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isTranslationSubstitutions=function(e){const t=e;return void 0===t||"string"==typeof t||Array.isArray(t)&&t.every((e=>"string"==typeof e))}},2632:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isCellInnerDivProps=function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&(null!==t.children&&"object"==typeof t.children||"function"==typeof t.children)&&(void 0===t.children._owner||(null!==t.children._owner&&"object"==typeof t.children._owner||"function"==typeof t.children._owner)&&"string"==typeof t.children._owner.key)},t.isTombstoneGrandchildProps=function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[0]&&"object"==typeof t.children[0]||"function"==typeof t.children[0])&&(null!==t.children[0].props&&"object"==typeof t.children[0].props||"function"==typeof t.children[0].props)&&(null!==t.children[0].props.entry&&"object"==typeof t.children[0].props.entry||"function"==typeof t.children[0].props.entry)&&"tombstone"===t.children[0].props.entry.type&&(null!==t.children[0].props.entry.conversationPosition&&"object"==typeof t.children[0].props.entry.conversationPosition||"function"==typeof t.children[0].props.entry.conversationPosition)&&"boolean"==typeof t.children[0].props.entry.conversationPosition.showReplyContext}},842:(e,t,r)=>{r.d(t,{BO:()=>a,mN:()=>C,Rf:()=>d,AH:()=>c,W3:()=>S,sk:()=>h,Ec:()=>T,qM:()=>s,iz:()=>l});const n=globalThis,s=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),i=new WeakMap;class a{constructor(e,t,r){if(this._$cssResult$=!0,r!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(s&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=i.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&i.set(t,e))}return e}toString(){return this.cssText}}const l=e=>new a("string"==typeof e?e:e+"",void 0,o),c=(e,...t)=>{const r=1===e.length?e[0]:t.reduce(((t,r,n)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[n+1]),e[0]);return new a(r,e,o)},d=(e,t)=>{if(s)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const r of t){const t=document.createElement("style"),s=n.litNonce;void 0!==s&&t.setAttribute("nonce",s),t.textContent=r.cssText,e.appendChild(t)}},h=s?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return l(t)})(e):e,{is:p,defineProperty:u,getOwnPropertyDescriptor:m,getOwnPropertyNames:f,getOwnPropertySymbols:b,getPrototypeOf:y}=Object,g=globalThis,v=g.trustedTypes,w=v?v.emptyScript:"",_=g.reactiveElementPolyfillSupport,A=(e,t)=>e,S={toAttribute(e,t){switch(t){case Boolean:e=e?w:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},T=(e,t)=>!p(e,t),E={attribute:!0,type:String,converter:S,reflect:!1,hasChanged:T};Symbol.metadata??=Symbol("metadata"),g.litPropertyMetadata??=new WeakMap;class C extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=E){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(e,r,t);void 0!==n&&u(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){const{get:n,set:s}=m(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return n?.call(this)},set(t){const o=n?.call(this);s.call(this,t),this.requestUpdate(e,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??E}static _$Ei(){if(this.hasOwnProperty(A("elementProperties")))return;const e=y(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(A("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(A("properties"))){const e=this.properties,t=[...f(e),...b(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(h(e))}else void 0!==e&&t.push(h(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return d(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EC(e,t){const r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(void 0!==n&&!0===r.reflect){const s=(void 0!==r.converter?.toAttribute?r.converter:S).toAttribute(t,r.type);this._$Em=e,null==s?this.removeAttribute(n):this.setAttribute(n,s),this._$Em=null}}_$AK(e,t){const r=this.constructor,n=r._$Eh.get(e);if(void 0!==n&&this._$Em!==n){const e=r.getPropertyOptions(n),s="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:S;this._$Em=n,this[n]=s.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){if(r??=this.constructor.getPropertyOptions(e),!(r.hasChanged??T)(this[e],t))return;this.P(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,r){this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e)!0!==r.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],r)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}}C.elementStyles=[],C.shadowRootOptions={mode:"open"},C[A("elementProperties")]=new Map,C[A("finalized")]=new Map,_?.({ReactiveElement:C}),(g.reactiveElementVersions??=[]).push("2.0.4")},919:(e,t,r)=>{function n(e,t,r,n){var s,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}r.r(t),r.d(t,{MdFilledButton:()=>W}),Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var s=r(2924),o=r(6337);class i extends o.LitElement{connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){return o.html``}}const a=o.css`:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute;transition-duration:inherit;transition-property:inherit;transition-timing-function:inherit}:host{display:flex;pointer-events:none;transition-property:box-shadow,opacity}.shadow::before,.shadow::after{content:"";transition-property:box-shadow,opacity;--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000))}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color);opacity:.15} -`;let l=class extends i{};l.styles=[a],l=n([(0,s.customElement)("md-elevation")],l);const c=Symbol("attachableController");let d;o.isServer||(d=new MutationObserver((e=>{for(const t of e)t.target[c]?.hostConnected()})));class h{get htmlFor(){return this.host.getAttribute("for")}set htmlFor(e){null===e?this.host.removeAttribute("for"):this.host.setAttribute("for",e)}get control(){return this.host.hasAttribute("for")?this.htmlFor&&this.host.isConnected?this.host.getRootNode().querySelector(`#${this.htmlFor}`):null:this.currentControl||this.host.parentElement}set control(e){e?this.attach(e):this.detach()}constructor(e,t){this.host=e,this.onControlChange=t,this.currentControl=null,e.addController(this),e[c]=this,d?.observe(e,{attributeFilter:["for"]})}attach(e){e!==this.currentControl&&(this.setCurrentControl(e),this.host.removeAttribute("for"))}detach(){this.setCurrentControl(null),this.host.setAttribute("for","")}hostConnected(){this.setCurrentControl(this.control)}hostDisconnected(){this.setCurrentControl(null)}setCurrentControl(e){this.onControlChange(this.currentControl,e),this.currentControl=e}}const p=["focusin","focusout","pointerdown"];class u extends o.LitElement{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new h(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}handleEvent(e){if(!e[m]){switch(e.type){default:return;case"focusin":this.visible=this.control?.matches(":focus-visible")??!1;break;case"focusout":case"pointerdown":this.visible=!1}e[m]=!0}}onControlChange(e,t){if(!o.isServer)for(const r of p)e?.removeEventListener(r,this),t?.addEventListener(r,this)}update(e){e.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(e)}}n([(0,s.property)({type:Boolean,reflect:!0})],u.prototype,"visible",void 0),n([(0,s.property)({type:Boolean,reflect:!0})],u.prototype,"inward",void 0);const m=Symbol("handledByFocusRing"),f=o.css`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}} -`;let b=class extends u{};b.styles=[f],b=n([(0,s.customElement)("md-focus-ring")],b);var y=r(2627);var g;!function(e){e[e.INACTIVE=0]="INACTIVE",e[e.TOUCH_DELAY=1]="TOUCH_DELAY",e[e.HOLDING=2]="HOLDING",e[e.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"}(g||(g={}));const v=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],w=o.isServer?null:window.matchMedia("(forced-colors: active)");class _ extends o.LitElement{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=g.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new h(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const e={hovered:this.hovered,pressed:this.pressed};return o.html`
`}update(e){e.has("disabled")&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(e)}handlePointerenter(e){this.shouldReactToEvent(e)&&(this.hovered=!0)}handlePointerleave(e){this.shouldReactToEvent(e)&&(this.hovered=!1,this.state!==g.INACTIVE&&this.endPressAnimation())}handlePointerup(e){if(this.shouldReactToEvent(e)){if(this.state!==g.HOLDING)return this.state===g.TOUCH_DELAY?(this.state=g.WAITING_FOR_CLICK,void this.startPressAnimation(this.rippleStartEvent)):void 0;this.state=g.WAITING_FOR_CLICK}}async handlePointerdown(e){if(this.shouldReactToEvent(e)){if(this.rippleStartEvent=e,!this.isTouch(e))return this.state=g.WAITING_FOR_CLICK,void this.startPressAnimation(e);this.checkBoundsAfterContextMenu&&!this.inBounds(e)||(this.checkBoundsAfterContextMenu=!1,this.state=g.TOUCH_DELAY,await new Promise((e=>{setTimeout(e,150)})),this.state===g.TOUCH_DELAY&&(this.state=g.HOLDING,this.startPressAnimation(e)))}}handleClick(){this.disabled||(this.state!==g.WAITING_FOR_CLICK?this.state===g.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation()):this.endPressAnimation())}handlePointercancel(e){this.shouldReactToEvent(e)&&this.endPressAnimation()}handleContextmenu(){this.disabled||(this.checkBoundsAfterContextMenu=!0,this.endPressAnimation())}determineRippleSize(){const{height:e,width:t}=this.getBoundingClientRect(),r=Math.max(e,t),n=Math.max(.35*r,75),s=Math.floor(.2*r),o=Math.sqrt(t**2+e**2)+10;this.initialSize=s,this.rippleScale=""+(o+n)/s,this.rippleSize=`${s}px`}getNormalizedPointerEventCoords(e){const{scrollX:t,scrollY:r}=window,{left:n,top:s}=this.getBoundingClientRect(),o=t+n,i=r+s,{pageX:a,pageY:l}=e;return{x:a-o,y:l-i}}getTranslationCoordinates(e){const{height:t,width:r}=this.getBoundingClientRect(),n={x:(r-this.initialSize)/2,y:(t-this.initialSize)/2};let s;return s=e instanceof PointerEvent?this.getNormalizedPointerEventCoords(e):{x:r/2,y:t/2},s={x:s.x-this.initialSize/2,y:s.y-this.initialSize/2},{startPoint:s,endPoint:n}}startPressAnimation(e){if(!this.mdRoot)return;this.pressed=!0,this.growAnimation?.cancel(),this.determineRippleSize();const{startPoint:t,endPoint:r}=this.getTranslationCoordinates(e),n=`${t.x}px, ${t.y}px`,s=`${r.x}px, ${r.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${n}) scale(1)`,`translate(${s}) scale(${this.rippleScale})`]},{pseudoElement:"::after",duration:450,easing:"cubic-bezier(0.2, 0, 0, 1)",fill:"forwards"})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=g.INACTIVE;const e=this.growAnimation;let t=1/0;"number"==typeof e?.currentTime?t=e.currentTime:e?.currentTime&&(t=e.currentTime.to("ms").value),t>=225?this.pressed=!1:(await new Promise((e=>{setTimeout(e,225-t)})),this.growAnimation===e&&(this.pressed=!1))}shouldReactToEvent(e){if(this.disabled||!e.isPrimary)return!1;if(this.rippleStartEvent&&this.rippleStartEvent.pointerId!==e.pointerId)return!1;if("pointerenter"===e.type||"pointerleave"===e.type)return!this.isTouch(e);const t=1===e.buttons;return this.isTouch(e)||t}inBounds({x:e,y:t}){const{top:r,left:n,bottom:s,right:o}=this.getBoundingClientRect();return e>=n&&e<=o&&t>=r&&t<=s}isTouch({pointerType:e}){return"touch"===e}async handleEvent(e){if(!w?.matches)switch(e.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(e);break;case"pointerdown":await this.handlePointerdown(e);break;case"pointerenter":this.handlePointerenter(e);break;case"pointerleave":this.handlePointerleave(e);break;case"pointerup":this.handlePointerup(e)}}onControlChange(e,t){if(!o.isServer)for(const r of v)e?.removeEventListener(r,this),t?.addEventListener(r,this)}}n([(0,s.property)({type:Boolean,reflect:!0})],_.prototype,"disabled",void 0),n([(0,s.state)()],_.prototype,"hovered",void 0),n([(0,s.state)()],_.prototype,"pressed",void 0),n([(0,s.query)(".surface")],_.prototype,"mdRoot",void 0);const A=o.css`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms} -`;let S=class extends _{};S.styles=[A],S=n([(0,s.customElement)("md-ripple")],S);const T=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText"],E=T.map($);function C(e){return E.includes(e)}function $(e){return e.replace("aria","aria-").replace(/Elements?/g,"").toLowerCase()}const x=Symbol("privateIgnoreAttributeChangesFor");function P(e){return`data-${e}`}function I(e){return e.replace(/-\w/,(e=>e[1].toUpperCase()))}const k=Symbol("internals"),R=Symbol("privateInternals");let O=!1;const N=function(e){var t;if(o.isServer)return e;class r extends e{constructor(){super(...arguments),this[t]=new Set}attributeChangedCallback(e,t,r){if(!C(e))return void super.attributeChangedCallback(e,t,r);if(this[x].has(e))return;this[x].add(e),this.removeAttribute(e),this[x].delete(e);const n=I(e);null===r?delete this.dataset[n]:this.dataset[n]=r,this.requestUpdate(I(e),t)}getAttribute(e){return C(e)?super.getAttribute(P(e)):super.getAttribute(e)}removeAttribute(e){super.removeAttribute(e),C(e)&&(super.removeAttribute(P(e)),this.requestUpdate())}}return t=x,function(e){for(const t of T){const r=$(t),n=P(r),s=I(r);e.createProperty(t,{attribute:r,noAccessor:!0}),e.createProperty(Symbol(n),{attribute:n,noAccessor:!0}),Object.defineProperty(e.prototype,t,{configurable:!0,enumerable:!0,get(){return this.dataset[s]??null},set(e){const r=this.dataset[s]??null;e!==r&&(null===e?delete this.dataset[s]:this.dataset[s]=e,this.requestUpdate(t,r))}})}}(r),r}((M=o.LitElement,class extends M{get[k](){return this[R]||(this[R]=this.attachInternals()),this[R]}}));var M,U;class L extends N{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[k].form}constructor(){super(),this.disabled=!1,this.softDisabled=!1,this.href="",this.target="",this.trailingIcon=!1,this.hasIcon=!1,this.type="submit",this.value="",o.isServer||this.addEventListener("click",this.handleClick.bind(this))}focus(){this.buttonElement?.focus()}blur(){this.buttonElement?.blur()}render(){const e=!this.href&&(this.disabled||this.softDisabled),t=this.href?this.renderLink():this.renderButton(),r=this.href?"link":"button";return o.html` - ${this.renderElevationOrOutline?.()} -
- - - ${t} - `}renderButton(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return o.html``}renderLink(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return o.html`${this.renderContent()} - `}renderContent(){const e=o.html``;return o.html` - - ${this.trailingIcon?o.nothing:e} - - ${this.trailingIcon?e:o.nothing} - `}handleClick(e){if(!this.href&&this.softDisabled)return e.stopImmediatePropagation(),void e.preventDefault();(function(e){return e.currentTarget===e.target&&e.composedPath()[0]===e.target&&!e.target.disabled&&!function(e){const t=O;return t&&(e.preventDefault(),e.stopImmediatePropagation()),async function(){O=!0,await null,O=!1}(),t}(e)})(e)&&this.buttonElement&&(this.focus(),function(e){const t=new MouseEvent("click",{bubbles:!0});e.dispatchEvent(t)}(this.buttonElement))}handleSlotChange(){this.hasIcon=this.assignedIcons.length>0}}U=L,o.isServer||U.addInitializer((e=>{const t=e;t.addEventListener("click",(async e=>{const{type:r,[k]:n}=t,{form:s}=n;s&&"button"!==r&&(await new Promise((e=>{setTimeout(e)})),e.defaultPrevented||("reset"!==r?(s.addEventListener("submit",(e=>{Object.defineProperty(e,"submitter",{configurable:!0,enumerable:!0,get:()=>t})}),{capture:!0,once:!0}),n.setFormValue(t.value),s.requestSubmit()):s.reset()))}))})),L.formAssociated=!0,L.shadowRootOptions={mode:"open",delegatesFocus:!0},n([(0,s.property)({type:Boolean,reflect:!0})],L.prototype,"disabled",void 0),n([(0,s.property)({type:Boolean,attribute:"soft-disabled",reflect:!0})],L.prototype,"softDisabled",void 0),n([(0,s.property)()],L.prototype,"href",void 0),n([(0,s.property)()],L.prototype,"target",void 0),n([(0,s.property)({type:Boolean,attribute:"trailing-icon",reflect:!0})],L.prototype,"trailingIcon",void 0),n([(0,s.property)({type:Boolean,attribute:"has-icon",reflect:!0})],L.prototype,"hasIcon",void 0),n([(0,s.property)()],L.prototype,"type",void 0),n([(0,s.property)({reflect:!0})],L.prototype,"value",void 0),n([(0,s.query)(".button")],L.prototype,"buttonElement",void 0),n([(0,s.queryAssignedElements)({slot:"icon",flatten:!0})],L.prototype,"assignedIcons",void 0);class j extends L{renderElevationOrOutline(){return o.html``}}const B=o.css`:host{--_container-color: var(--md-filled-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-elevation: var(--md-filled-button-container-elevation, 0);--_container-height: var(--md-filled-button-container-height, 40px);--_container-shadow-color: var(--md-filled-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-button-focus-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-container-elevation: var(--md-filled-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-button-hover-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-button-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-filled-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-button-pressed-label-text-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-color: var(--md-filled-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_container-shape-start-start: var(--md-filled-button-container-shape-start-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-button-container-shape-start-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-button-container-shape-end-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-button-container-shape-end-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-button-leading-space, 24px);--_trailing-space: var(--md-filled-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-button-with-trailing-icon-trailing-space, 16px)} -`,D=o.css`md-elevation{transition-duration:280ms}:host(:is([disabled],[soft-disabled])) md-elevation{transition:none}md-elevation{--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}:host(:focus-within) md-elevation{--md-elevation-level: var(--_focus-container-elevation)}:host(:hover) md-elevation{--md-elevation-level: var(--_hover-container-elevation)}:host(:active) md-elevation{--md-elevation-level: var(--_pressed-container-elevation)}:host(:is([disabled],[soft-disabled])) md-elevation{--md-elevation-level: var(--_disabled-container-elevation)} -`,F=o.css`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background-color:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host(:is([disabled],[soft-disabled])) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host(:is([disabled],[soft-disabled])) .background{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host(:is([disabled],[soft-disabled])) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none} -`;let W=class extends j{};W.styles=[F,D,B],W=n([(0,s.customElement)("md-filled-button")],W)},7804:(e,t,r)=>{r.d(t,{OA:()=>n,WL:()=>o,u$:()=>s});const n={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},s=e=>(...t)=>({_$litDirective$:e,values:t});class o{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}},6683:(e,t,r)=>{r.d(t,{H:()=>o});var n=r(6752),s=r(7804);const o=(0,s.u$)(class extends s.WL{constructor(e){if(super(e),e.type!==s.OA.ATTRIBUTE||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}const r=e.element.classList;for(const e of this.st)e in t||(r.remove(e),this.st.delete(e));for(const e in t){const n=!!t[e];n===this.st.has(e)||this.nt?.has(e)||(n?(r.add(e),this.st.add(e)):(r.remove(e),this.st.delete(e)))}return n.c0}})},6752:(e,t,r)=>{r.d(t,{JW:()=>E,XX:()=>q,c0:()=>C,ge:()=>F,qy:()=>T,s6:()=>$});const n=globalThis,s=n.trustedTypes,o=s?s.createPolicy("lit-html",{createHTML:e=>e}):void 0,i="$lit$",a=`lit$${(Math.random()+"").slice(9)}$`,l="?"+a,c=`<${l}>`,d=document,h=()=>d.createComment(""),p=e=>null===e||"object"!=typeof e&&"function"!=typeof e,u=Array.isArray,m=e=>u(e)||"function"==typeof e?.[Symbol.iterator],f="[ \t\n\f\r]",b=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,y=/-->/g,g=/>/g,v=RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),w=/'/g,_=/"/g,A=/^(?:script|style|textarea|title)$/i,S=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),T=S(1),E=S(2),C=Symbol.for("lit-noChange"),$=Symbol.for("lit-nothing"),x=new WeakMap,P=d.createTreeWalker(d,129);function I(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==o?o.createHTML(t):t}const k=(e,t)=>{const r=e.length-1,n=[];let s,o=2===t?"":"",l=b;for(let t=0;t"===h[0]?(l=s??b,p=-1):void 0===h[1]?p=-2:(p=l.lastIndex-h[2].length,d=h[1],l=void 0===h[3]?v:'"'===h[3]?_:w):l===_||l===w?l=v:l===y||l===g?l=b:(l=v,s=void 0);const m=l===v&&e[t+1].startsWith("/>")?" ":"";o+=l===b?r+c:p>=0?(n.push(d),r.slice(0,p)+i+r.slice(p)+a+m):r+a+(-2===p?t:m)}return[I(e,o+(e[r]||"")+(2===t?"":"")),n]};class R{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let o=0,c=0;const d=e.length-1,p=this.parts,[u,m]=k(e,t);if(this.el=R.createElement(u,r),P.currentNode=this.el.content,2===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=P.nextNode())&&p.length0){n.textContent=s?s.emptyScript:"";for(let r=0;r2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=$}_$AI(e,t=this,r,n){const s=this.strings;let o=!1;if(void 0===s)e=O(this,e,t,0),o=!p(e)||e!==this._$AH&&e!==C,o&&(this._$AH=e);else{const n=e;let i,a;for(e=s[0],i=0;i{const n=r?.renderBefore??t;let s=n._$litPart$;if(void 0===s){const e=r?.renderBefore??null;n._$litPart$=s=new M(t.insertBefore(h(),e),e,void 0,r??{})}return s._$AI(e),s}},2924:(e,t,r)=>{r.r(t),r.d(t,{customElement:()=>n,eventOptions:()=>c,property:()=>a,query:()=>h,queryAll:()=>u,queryAssignedElements:()=>f,queryAssignedNodes:()=>b,queryAsync:()=>m,standardProperty:()=>i,state:()=>l});const n=e=>(t,r)=>{void 0!==r?r.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)};var s=r(842);const o={attribute:!0,type:String,converter:s.W3,reflect:!1,hasChanged:s.Ec},i=(e=o,t,r)=>{const{kind:n,metadata:s}=r;let i=globalThis.litPropertyMetadata.get(s);if(void 0===i&&globalThis.litPropertyMetadata.set(s,i=new Map),i.set(r.name,e),"accessor"===n){const{name:n}=r;return{set(r){const s=t.get.call(this);t.set.call(this,r),this.requestUpdate(n,s,e)},init(t){return void 0!==t&&this.P(n,void 0,e),t}}}if("setter"===n){const{name:n}=r;return function(r){const s=this[n];t.call(this,r),this.requestUpdate(n,s,e)}}throw Error("Unsupported decorator location: "+n)};function a(e){return(t,r)=>"object"==typeof r?i(e,t,r):((e,t,r)=>{const n=t.hasOwnProperty(r);return t.constructor.createProperty(r,n?{...e,wrapped:!0}:e),n?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}function l(e){return a({...e,state:!0,attribute:!1})}function c(e){return(t,r)=>{const n="function"==typeof t?t:t[r];Object.assign(n,e)}}const d=(e,t,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,r),r);function h(e,t){return(r,n,s)=>{const o=t=>t.renderRoot?.querySelector(e)??null;if(t){const{get:e,set:t}="object"==typeof n?r:s??(()=>{const e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return d(r,n,{get(){let r=e.call(this);return void 0===r&&(r=o(this),(null!==r||this.hasUpdated)&&t.call(this,r)),r}})}return d(r,n,{get(){return o(this)}})}}let p;function u(e){return(t,r)=>d(t,r,{get(){return(this.renderRoot??(p??=document.createDocumentFragment())).querySelectorAll(e)}})}function m(e){return(t,r)=>d(t,r,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(e)??null}})}function f(e){return(t,r)=>{const{slot:n,selector:s}=e??{},o="slot"+(n?`[name=${n}]`:":not([name])");return d(t,r,{get(){const t=this.renderRoot?.querySelector(o),r=t?.assignedElements(e)??[];return void 0===s?r:r.filter((e=>e.matches(s)))}})}}function b(e){return(t,r)=>{const{slot:n}=e??{},s="slot"+(n?`[name=${n}]`:":not([name])");return d(t,r,{get(){const t=this.renderRoot?.querySelector(s);return t?.assignedNodes(e)??[]}})}}},2627:(e,t,r)=>{r.r(t),r.d(t,{classMap:()=>n.H});var n=r(6683)},6337:(e,t,r)=>{r.r(t),r.d(t,{CSSResult:()=>n.BO,LitElement:()=>o,ReactiveElement:()=>n.mN,_$LE:()=>a,_$LH:()=>s.ge,adoptStyles:()=>n.Rf,css:()=>n.AH,defaultConverter:()=>n.W3,getCompatibleStyle:()=>n.sk,html:()=>s.qy,isServer:()=>l,noChange:()=>s.c0,notEqual:()=>n.Ec,nothing:()=>s.s6,render:()=>s.XX,supportsAdoptingStyleSheets:()=>n.qM,svg:()=>s.JW,unsafeCSS:()=>n.iz});var n=r(842),s=r(6752);class o extends n.mN{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=(0,s.XX)(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return s.c0}}o._$litElement$=!0,o.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:o});const i=globalThis.litElementPolyfillSupport;i?.({LitElement:o});const a={_$AK:(e,t,r)=>{e._$AK(t,r)},_$AL:e=>e._$AL};(globalThis.litElementVersions??=[]).push("4.0.4");const l=!1},4114:(e,t,r)=>{r.r(t),r.d(t,{Profile:()=>s,Timeline:()=>m,Tweet:()=>i});const n=e=>{const t=Object.getOwnPropertyNames(e).filter((e=>e.startsWith("__reactProps$")));return t.length?e[t[0]]:null};class s{profileElement;constructor(e){this.profileElement=e}get props(){const e=n(this.profileElement);if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[0]&&"object"==typeof t.children[0]||"function"==typeof t.children[0])&&(null!==t.children[0].props&&"object"==typeof t.children[0].props||"function"==typeof t.children[0].props)&&Array.isArray(t.children[0].props.children)&&(null!==t.children[0].props.children[1]&&"object"==typeof t.children[0].props.children[1]||"function"==typeof t.children[0].props.children[1])&&(null!==t.children[0].props.children[1].props&&"object"==typeof t.children[0].props.children[1].props||"function"==typeof t.children[0].props.children[1].props)&&(null!==t.children[0].props.children[1].props.user&&"object"==typeof t.children[0].props.children[1].props.user||"function"==typeof t.children[0].props.children[1].props.user)&&(void 0===t.children[0].props.children[1].props.user.possibly_sensitive||null===t.children[0].props.children[1].props.user.possibly_sensitive||!1===t.children[0].props.children[1].props.user.possibly_sensitive||!0===t.children[0].props.children[1].props.user.possibly_sensitive)&&"string"==typeof t.children[0].props.children[1].props.user.screen_name&&(""===t.children[0].props.children[1].props.user.profile_interstitial_type||"sensitive_media"===t.children[0].props.children[1].props.user.profile_interstitial_type||"fake_account"===t.children[0].props.children[1].props.user.profile_interstitial_type||"offensive_profile_content"===t.children[0].props.children[1].props.user.profile_interstitial_type||"timeout"===t.children[0].props.children[1].props.user.profile_interstitial_type)&&Array.isArray(t.children[0].props.children[1].props.user.withheld_in_countries)&&t.children[0].props.children[1].props.user.withheld_in_countries.every((e=>"string"==typeof e))}(e))throw new Error("Failed to get React props of profile");return e.children[0].props.children[1].props.user}}var o=r(8531);class i{tweetElement;constructor(e){this.tweetElement=e}getMenuBar(){const e=this.tweetElement.querySelector("div[role='group'][id]");if(!e)throw new Error("Failed to get menu bar of tweet");return e}get element(){return this.tweetElement}get props(){const e=n(this.getMenuBar());if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[1]&&"object"==typeof t.children[1]||"function"==typeof t.children[1])&&(null!==t.children[1].props&&"object"==typeof t.children[1].props||"function"==typeof t.children[1].props)&&(null!==t.children[1].props.retweetWithCommentLink&&"object"==typeof t.children[1].props.retweetWithCommentLink||"function"==typeof t.children[1].props.retweetWithCommentLink)&&(null!==t.children[1].props.retweetWithCommentLink.state&&"object"==typeof t.children[1].props.retweetWithCommentLink.state||"function"==typeof t.children[1].props.retweetWithCommentLink.state)&&(null!==t.children[1].props.retweetWithCommentLink.state.quotedStatus&&"object"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus||"function"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.possibly_sensitive_editable)&&"string"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.permalink&&(null!==t.children[1].props.retweetWithCommentLink.state.quotedStatus.user&&"object"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user||"function"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user)&&(void 0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||null===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||!1===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive||!0===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.possibly_sensitive)&&"string"==typeof t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.screen_name&&(""===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"sensitive_media"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"fake_account"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"offensive_profile_content"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type||"timeout"===t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.profile_interstitial_type)&&Array.isArray(t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.withheld_in_countries)&&t.children[1].props.retweetWithCommentLink.state.quotedStatus.user.withheld_in_countries.every((e=>"string"==typeof e))}(e))throw new Error("Failed to get React props of tweet");return e.children[1].props.retweetWithCommentLink.state.quotedStatus}get metadata(){const e=this.props.user.screen_name,t=n(this.element);if(!t)throw new Error("Failed to get React props of tweet");let r=null;const s=function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&Array.isArray(t.children[0])&&(null!==t.children[0][1]&&"object"==typeof t.children[0][1]||"function"==typeof t.children[0][1])&&(null!==t.children[0][1].props&&"object"==typeof t.children[0][1].props||"function"==typeof t.children[0][1].props)&&Array.isArray(t.children[0][1].props.children)&&(null!==t.children[0][1].props.children[0]&&"object"==typeof t.children[0][1].props.children[0]||"function"==typeof t.children[0][1].props.children[0])&&(null!==t.children[0][1].props.children[0].props&&"object"==typeof t.children[0][1].props.children[0].props||"function"==typeof t.children[0][1].props.children[0].props)&&Array.isArray(t.children[0][1].props.children[0].props.children)&&(null!==t.children[0][1].props.children[0].props.children[2]&&"object"==typeof t.children[0][1].props.children[0].props.children[2]||"function"==typeof t.children[0][1].props.children[0].props.children[2])&&(null!==t.children[0][1].props.children[0].props.children[2].props&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props||"function"==typeof t.children[0][1].props.children[0].props.children[2].props)&&Array.isArray(t.children[0][1].props.children[0].props.children[2].props.children)&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7]&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7]||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7])&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7].props&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props)&&(null!==t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser&&"object"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser||"function"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser)&&"string"==typeof t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser.screen_name}(t);return function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&Array.isArray(t.children[0])&&(null!==t.children[0][1]&&"object"==typeof t.children[0][1]||"function"==typeof t.children[0][1])&&(null!==t.children[0][1].props&&"object"==typeof t.children[0][1].props||"function"==typeof t.children[0][1].props)&&Array.isArray(t.children[0][1].props.children)&&(null!==t.children[0][1].props.children[0]&&"object"==typeof t.children[0][1].props.children[0]||"function"==typeof t.children[0][1].props.children[0])&&(null!==t.children[0][1].props.children[0].props&&"object"==typeof t.children[0][1].props.children[0].props||"function"==typeof t.children[0][1].props.children[0].props)&&Array.isArray(t.children[0][1].props.children[0].props.children)&&(null!==t.children[0][1].props.children[0].props.children[1]&&"object"==typeof t.children[0][1].props.children[0].props.children[1]||"function"==typeof t.children[0][1].props.children[0].props.children[1])&&(null!==t.children[0][1].props.children[0].props.children[1].props&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props||"function"==typeof t.children[0][1].props.children[0].props.children[1].props)&&Array.isArray(t.children[0][1].props.children[0].props.children[1].props.children)&&Array.isArray(t.children[0][1].props.children[0].props.children[1].props.children[1])&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2]&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2]||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2])&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2].props&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props)&&(null!==t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser&&"object"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser||"function"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser)&&"string"==typeof t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser.screen_name}(t)&&(r=t.children[0][1].props.children[0].props.children[1].props.children[1][2].props.loggedInUser.screen_name),s&&(r=t.children[0][1].props.children[0].props.children[2].props.children[7].props.loggedInUser.screen_name),{isFocalMode:s,isPostedByCurrentUser:e===r}}async clickRetweetButton(e){const t=await(0,o.asyncQuerySelector)("[data-testid='unretweet'], [data-testid='retweet']",this.tweetElement,e);if(!t)throw new Error("Failed to get retweet button of tweet");t.click()}static async clickQuoteButton(e){const t=await(0,o.asyncQuerySelector)(["[data-testid='Dropdown'] [href='/compose/post']","[data-testid='sheetDialog'] [href='/compose/post']"].join(","),document,e);if(!t)throw new Error("Failed to get quote button of tweet");t.click()}static async getTweetTextBox(e){const t="pro.twitter.com"===location.hostname?"[role='dialog'] [data-text='true'], [role='dialog'] textarea[data-testid='tweetTextarea_0']":"[role='dialog'] [data-text='true'], textarea[data-testid='tweetTextarea_0']",r=await(0,o.asyncQuerySelector)(t,document,e);if(!r)throw new Error("Failed to get text box marker of tweet");const n="TEXTAREA"===r.tagName?r:r.parentElement;if(!n)throw new Error("Failed to get text box of tweet");return n}async quoteTweet(e,t=1e3){try{await this.clickRetweetButton(t),await i.clickQuoteButton(t);const r=await i.getTweetTextBox(t);r.innerHTML=e,r.dispatchEvent(new Event("input",{bubbles:!0}))}catch(t){const r=this.props.permalink;open(`https://twitter.com/intent/tweet?text=${encodeURIComponent(`${e}\nhttps://twitter.com${r}`)}`,"_blank")}}}const a={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var l,c=new Uint8Array(16);function d(){if(!l&&!(l="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return l(c)}for(var h=[],p=0;p<256;++p)h.push((p+256).toString(16).slice(1));const u=function(e,t,r){if(a.randomUUID&&!t&&!e)return a.randomUUID();var n=(e=e||{}).random||(e.rng||d)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var s=0;s<16;++s)t[r+s]=n[s];return t}return function(e,t=0){return(h[e[t+0]]+h[e[t+1]]+h[e[t+2]]+h[e[t+3]]+"-"+h[e[t+4]]+h[e[t+5]]+"-"+h[e[t+6]]+h[e[t+7]]+"-"+h[e[t+8]]+h[e[t+9]]+"-"+h[e[t+10]]+h[e[t+11]]+h[e[t+12]]+h[e[t+13]]+h[e[t+14]]+h[e[t+15]]).toLowerCase()}(n)};class m{OBSERVER_OPTIONS={childList:!0,subtree:!0};onNewTweetCallback=null;onNewProfileCallback=null;constructor(e){const t=`data-twi-ext-checked-${u()}`,r={timeoutMs:1e4,...e},n=new MutationObserver((()=>{if(this.onNewTweetCallback){const e=document.querySelectorAll(`[data-testid="tweet"]:not([${t}])`);for(const r of e)r.setAttribute(t,""),this.onNewTweetCallback(new i(r))}if(this.onNewProfileCallback){const e=document.querySelector(`:not([data-testid="tweet"]) [data-testid="UserName"]:not([${t}])`);e&&(e.setAttribute(t,""),this.onNewProfileCallback(new s(e)))}}));(0,o.asyncQuerySelector)("main",document,r.timeoutMs).then((e=>{if(!e)throw new Error("twi-ext: Failed to get main element");n.observe(e,this.OBSERVER_OPTIONS)})),(0,o.asyncQuerySelector)("#layers",document,r.timeoutMs).then((e=>{if(!e)throw new Error("twi-ext: Failed to get #layers element");n.observe(e,this.OBSERVER_OPTIONS)}))}onNewTweet(e){this.onNewTweetCallback=e}onNewProfile(e){this.onNewProfileCallback=e}}},6521:e=>{e.exports=JSON.parse('{"manifest_description":{"message":"這是一個用於檢查 Twitter/X 的 Shadowban 的擴充功能。"},"accountShadowbanned":{"message":"此使用者可能已被 Shadowban,因此他們的推文可能不會顯示在搜尋結果中。"},"accountShadowbannedAndTweetFlaggedAsSensitive":{"message":"此使用者可能已被 Shadowban,因此他們的推文可能不會顯示在搜尋結果中。此外,此推文已被標記為敏感內容。"},"accountAndTweetShadowbanned":{"message":"此推文有年齡限制,未滿 18 歲或未登入的使用者將不會看到。此外,它可能不會出現在搜尋結果中。"},"accountIsBlockedInSomeCountries":{"message":"此使用者在某些國家/地區被封鎖。"},"tweetFlaggedAsSensitive":{"message":"此推文已被標註為敏感內容,根據使用者的設定,它可能不會顯示在搜尋結果中。"},"thisUserIsNotShadowbanned":{"message":"此使用者沒有被 Shadowban。"},"thisUserIsShadowbanned":{"message":"此使用者可能已被 Shadowban,因此他們發佈的推文可能不會顯示在搜尋結果中。"},"tweetShadowbanned":{"message":"此推文有年齡限制,未滿 18 歲或未登入的使用者將不會看到。此外,它可能不會出現在搜尋結果中。"},"tweetNoProblem":{"message":"此推文沒有發現任何問題。"},"accountIsNotFlaggedAsSensitive":{"message":"✅此使用者沒有標記為敏感內容。"},"accountIsShadowbannedOrFlaggedAsSensitive":{"message":"🚫此使用者可能已被 Shadowban 或標記為敏感內容。"},"profileDoesNotContainSensitiveMedia":{"message":"✅此使用者的個人檔案媒體(頭像或標頭圖片)沒有標記為敏感內容。"},"profileContainsSensitiveMedia":{"message":"🚫此使用者的個人檔案媒體(頭像或標頭圖片)已被標記為敏感內容。"},"accountIsNotWithheldInCountries":{"message":"✅此使用者沒有被任何國家/地區封鎖(詳細說明)。"},"accountIsWithheldInCountries":{"message":"🚫此使用者被以下國家/地區封鎖(詳細說明):$1"},"tweetIsNotFlaggedAsSensitive":{"message":"✅此推文沒有標記為敏感內容。"},"tweetIsFlaggedAsSensitive":{"message":"🚫此推文已被標記為敏感內容。"},"tweetIsNotAgeRestricted":{"message":"✅此推文沒有年齡限制。"},"tweetIsAgeRestricted":{"message":"🚫此推文有年齡限制。"},"tweetIsSearchable":{"message":"✅此推文會顯示在搜尋結果中。"},"tweetMayNotBeSearchable":{"message":"⚠️根據使用者的設定,此推文可能不會顯示在搜尋結果中。"},"tweetIsNotSearchable":{"message":"🚫此推文可能不會顯示在搜尋結果中。"},"falsePositivesAndFalseNegativesOccur":{"message":"Shadowban Scanner 和其他功能類似的工具一樣,可能會產生誤判的情況。有關運作方式的詳細資訊,請參考這裡。"},"translatedByAI":{"message":"","description":"This field is used if the translation was done by AI. Otherwise, set this field to an empty string. Example sentence: \\"Translated from Japanese to by AI. Please notify @keita_roboin\'s DM or GitHub repository if there are any unnatural points.\\""},"showMore":{"message":"▶顯示更多"},"tweetTheResults":{"message":"分享結果"},"viewTweet":{"message":"查看推文"},"settingsWhereToDisplayCheckResults":{"message":"顯示檢查結果的位置"},"settingsShowMessagesInUnproblematicTweets":{"message":"在沒有問題的推文中顯示"},"settingsShowMessagesInUnproblematicProfiles":{"message":"在沒有問題的使用者的個人資料中顯示"},"settingsEnableForOtherUsersTweets":{"message":"在其他使用者的推文中顯示"},"settingsEnableForOtherUsersProfiles":{"message":"在其他使用者的個人資料中顯示"},"settingsOtherSettings":{"message":"其他設定"},"settingsAlwaysDetailedView":{"message":"永遠顯示詳細資訊"},"settingsShowNotesInMessages":{"message":"在訊息底部顯示註釋"},"settingsShowTweetButton":{"message":"顯示分享按鈕"},"settingsPleaseReload":{"message":"如更改過設定,請重新載入 Twitter/X"},"settingsPrivacyPolicy":{"message":"隱私政策"},"settingsPrivacyPolicyURL":{"message":"https://github.com/Robot-Inventor/shadowban-scanner/blob/main/README_zh_tw.md#privacy-policy"},"settingsOpenSourceLicenses":{"message":"開放原始碼授權"},"privacyPolicyPageTitle":{"message":"隱私政策 - Shadowban Scanner"},"privacyPolicy":{"message":"隱私政策"},"privacyPolicyText":{"message":"此擴充功能原則上會在使用者的電腦上處理所有資料,不會傳送到外部伺服器,而且此擴充功能不會在未經使用者許可的情況下使用登入認證存取 Twitter/X 的內部 API。對於此擴充功能沒有對應的網頁,將適用各自的使用條款和隱私政策。"},"initialSetup":{"message":"初始設定 - Shadowban Scanner"},"shadowbanScannerHasBeenInstalled":{"message":"已安裝 Shadowban Scanner"},"letsStartWithASimpleInitialSetup":{"message":"先從簡單的初始設定開始吧"},"pleaseSelectOneOfThem":{"message":"請選擇其中一個。這個設定之後可以再更改。"},"displayForAllTweetsAndAccounts":{"message":"顯示所有推文和使用者的檢查結果"},"displayOnlyForProblematicTweets":{"message":"僅顯示問題推文和使用者的檢查結果"},"displayOnlyInYourOwnTweets":{"message":"僅顯示我自己的推文的檢查結果"},"displayInAllUsersTweets":{"message":"顯示所有使用者推文的檢查結果"},"back":{"message":"返回"},"next":{"message":"下一步"},"initialSetupCompleted":{"message":"已完成初始設定!
是否要開啟使用說明?"},"open":{"message":"開啟"},"exitWithoutOpening":{"message":"不需要並關閉"}}')}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={id:n,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nc=void 0,r(8482)})(); \ No newline at end of file + `;expand(){this.isExpanded=!0}tweetButtonClicked(){const e=new Event("tweetButtonClick",{bubbles:!0,composed:!0});this.dispatchEvent(e)}firstUpdated(e){this.onRenderedCallback&&this.onRenderedCallback(),super.firstUpdated(e)}getShowMoreButton(){return this.isExpanded?"":Ne``}getDetails(){return this.details.length?Ne`
    + ${this.details.map((e=>"string"==typeof e?Ne`
  • `:Ne` +
  • + `))} +
`:""}getNotes(){if(!this.notes.length)return"";const e=lt({"shadowban-scanner-collapsed-content":!this.isExpanded,"shadowban-scanner-message-note":!0});return this.notes.map((t=>Ne`
`))}getTweetButton(){const e=lt({"shadowban-scanner-collapsed-content":!this.isExpanded});return this.isTweetButtonShown?Ne``:""}static cancelClickEvent(e){e.stopPropagation()}render(){const e=lt({"focal-mode":this.isFocalMode,"shadowban-scanner-message":!0,"shadowban-scanner-message-no-problem":!this.isAlert});return Ne` +
+ + ${this.getShowMoreButton()} ${this.getDetails()} ${this.getNotes()} ${this.getTweetButton()} +
+ `}};Rt([le({reflect:!0})],Ut.prototype,"summary",void 0),Rt([le({reflect:!0,type:Array})],Ut.prototype,"details",void 0),Rt([le({reflect:!0,type:Array})],Ut.prototype,"notes",void 0),Rt([le({reflect:!0,type:Boolean})],Ut.prototype,"isAlert",void 0),Rt([le({reflect:!0,type:Boolean})],Ut.prototype,"isExpanded",void 0),Rt([le({reflect:!0,type:Boolean})],Ut.prototype,"isFocalMode",void 0),Rt([le({reflect:!0,type:Boolean})],Ut.prototype,"isTweetButtonShown",void 0),Rt([le({reflect:!0,type:Boolean})],Ut.prototype,"isNoteShown",void 0),Rt([le({attribute:!1,reflect:!0})],Ut.prototype,"onRenderedCallback",void 0),Rt([le({reflect:!0,type:String})],Ut.prototype,"textColor",void 0),Ut=Ot=Rt([j("sbs-message")],Ut);class Mt{sbsMessage;tweet=null;tweetText;constructor(e){const t=document.createElement("sbs-message");t.textColor=Mt.getTextColor(),t.summary=e.summary,t.isAlert=e.isAlert,t.onRenderedCallback=e.onRenderedCallback,"tweet"===e.type?(this.tweet=e.tweet,t.details=e.details,t.notes=e.notes,t.isFocalMode=e.tweet.metadata.isFocalMode,t.isExpanded=e.isExpanded,t.isTweetButtonShown=e.isTweetButtonShown,t.isNoteShown=e.isNoteShown,this.tweetText=e.tweetText):t.isExpanded=!0,t.setAttribute(y,""),t.addEventListener("tweetButtonClick",this.onTweetButtonClick.bind(this)),this.sbsMessage=t}static getTextColor(){const e=["[data-testid='User-Name'] div:first-child span","[data-testid='UserName'] div:first-child span"].join(","),t=document.querySelector(e);if(!t)throw new Error("Failed to get user name span of tweet");const{color:r}=getComputedStyle(t);return r}onTweetButtonClick(){if(!this.tweet||!this.tweetText)throw new Error("Tweet button clicked without source tweet");this.tweet.quoteTweet(this.tweetText)}insertAdjacentElement(e,t){e.insertAdjacentElement(t,this.sbsMessage)}}const jt=e=>e[Object.getOwnPropertyNames(e).filter((e=>e.startsWith("__reactProps$")))];class Lt{element;constructor(e){this.element=e}parse(){const e=jt(this.element);if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&(null!==t.children&&"object"==typeof t.children||"function"==typeof t.children)&&(void 0===t.children._owner||(null!==t.children._owner&&"object"==typeof t.children._owner||"function"==typeof t.children._owner)&&"string"==typeof t.children._owner.key)}(e))throw new Error("Type of props is invalid.");const t=this.element.querySelector("div > div");if(!t)throw new Error("Failed to get the tombstone's grandchild element.");const r=jt(t);if(!function(e){const t=e;return(null!==t&&"object"==typeof t||"function"==typeof t)&&Array.isArray(t.children)&&(null!==t.children[0]&&"object"==typeof t.children[0]||"function"==typeof t.children[0])&&(null!==t.children[0].props&&"object"==typeof t.children[0].props||"function"==typeof t.children[0].props)&&(null!==t.children[0].props.entry&&"object"==typeof t.children[0].props.entry||"function"==typeof t.children[0].props.entry)&&"tombstone"===t.children[0].props.entry.type&&(null!==t.children[0].props.entry.conversationPosition&&"object"==typeof t.children[0].props.entry.conversationPosition||"function"==typeof t.children[0].props.entry.conversationPosition)&&"boolean"==typeof t.children[0].props.entry.conversationPosition.showReplyContext}(r))throw new Error("Type of grandchild props is invalid.");return[e,r]}}class Bt{tweet;constructor(e){this.tweet=e}parse(){return this.tweet.props}}class Ft{settings;onMessageCallback;constructor(e,t){this.settings=e,this.onMessageCallback=t;const r=new N;r.onNewTweet((e=>{this.checkTweet(e),this.timelineObserverCallback()})),r.onNewProfile((e=>{this.checkProfile(e)}))}checkProfile(e){if(Boolean(document.querySelector("[data-testid='editProfileButton']"))&&!this.settings.enableForOtherUsersProfiles)return;const t=O(e.props);if(!t.user.hasAnyProblem&&!this.settings.showMessagesInUnproblematicProfiles)return;const r=(n=t,s=this.onMessageCallback,{...(e=>{let t=null;return t=e.user.shadowbanned?"thisUserIsShadowbanned":e.user.withheldInCountries.length?"accountIsBlockedInSomeCountries":"thisUserIsNotShadowbanned",{summary:t}})(n),isAlert:n.user.hasAnyProblem,onRenderedCallback:s,type:"profile"});var n,s;const o=new Mt(r),i=document.querySelector("[data-testid='UserDescription']")||document.querySelector("[data-testid='UserName']");if(!i)throw new Error("Failed to get user description of profile");o.insertAdjacentElement(i,"afterend")}checkTweet(e){const t=(e=>{const t=e.parse(),r=O(t.user),n=Boolean(t.possibly_sensitive),s=!(!1===t.possibly_sensitive_editable),o=n&&!s;let i="searchable";return o||r.user.shadowbanned?i="unsearchable":n&&(i="possiblyUnsearchable"),{...r,tweet:{ageRestriction:o,hasAnyProblem:"searchable"!==i||r.user.hasAnyProblem,possiblySensitive:n,searchability:i}}})(new Bt(e));if(!e.metadata.isPostedByCurrentUser&&!this.settings.enableForOtherUsersTweets)return;if(!t.tweet.hasAnyProblem&&!this.settings.showMessagesInUnproblematicTweets)return;const r=U(e,t,this.onMessageCallback,this.settings),n=new Mt(r),s=e.element.querySelector("[data-testid='analyticsButton']")?.parentElement||e.element.querySelector("div[role='group'][id]");if(!s)throw new Error("Failed to get landmark element of tweet");n.insertAdjacentElement(s,"beforebegin")}necromancer(e){e.setAttribute(g,"true");const t=(e=>{const[t,r]=e;if(!t.children._owner)return;if(r.children[0].props.entry.conversationPosition.showReplyContext)return;const{key:n}=t.children._owner;return n.split("-")[3]})(new Lt(e).parse());if(!t)return;const r=`https://twitter.com/i/status/${t}`,n=document.createElement("a");n.href=r,n.target="_blank",n.setAttribute(v,"viewTweet"),n.classList.add("shadowban-scanner-tombstone-necromancer");const s=e.querySelector("a");if(!s)throw new Error("Failed to get help link");n.style.color=getComputedStyle(s).color,s.insertAdjacentElement("afterend",n),this.onMessageCallback()}timelineObserverCallback(){const e=document.querySelectorAll(`[data-testid='cellInnerDiv']:not([${g}])`);for(const t of e)t.setAttribute(g,"true"),Boolean(t.querySelector("a[href='https://help.twitter.com/rules-and-policies/notices-on-twitter']"))&&this.necromancer(t)}}const qt={alwaysDetailedView:!1,enableForOtherUsersProfiles:!0,enableForOtherUsersTweets:!0,enableOnXPro:!0,showMessagesInUnproblematicProfiles:!0,showMessagesInUnproblematicTweets:!1,showNotesInMessages:!0,showTweetButton:!0};class zt{translationFunction;twemojiEndpoint;constructor(e,t){this.translationFunction=e,this.twemojiEndpoint=t}convertEmojiToTwemoji(e){let t=e;for(const e of w){const r=[...e].map((e=>e.codePointAt(0)?.toString(16))).join("-"),n=`${e}`;t=t.replaceAll(e,n)}return t}translateElements(){const e=[...document.querySelectorAll(`[${v}]`)],t=document.querySelectorAll(`sbs-message[${y}]`);for(const r of t){const{shadowRoot:t}=r;if(!t)return;const n=t.querySelectorAll(`[${v}]`);e.push(...n),n.length&&r.removeAttribute(y)}e.forEach((e=>{const t=e.getAttribute(v),r=e.getAttribute("data-sb-translation-substitutions"),n=r?JSON.parse(r):null,s=function(e){const t=e;return void 0===t||"string"==typeof t||Array.isArray(t)&&t.every((e=>"string"==typeof e))}(n)?this.translationFunction(t,n):this.translationFunction(t);e.hasAttribute("data-sb-enable-twemoji")?e.innerHTML=this.convertEmojiToTwemoji(s):e.innerHTML=s,e.removeAttribute(v)}))}}(e=>{const t=new zt(((t,r)=>{if(r){const n="string"==typeof r?[r]:r;let s=e[t].message;for(let e=0;e{t.translateElements()}))})(JSON.parse('{"manifest_description":{"message":"這是一個用於檢查 Twitter/X 的 Shadowban 的擴充功能。"},"accountShadowbanned":{"message":"此使用者可能已被 Shadowban,因此他們的推文可能不會顯示在搜尋結果中。"},"accountShadowbannedAndTweetFlaggedAsSensitive":{"message":"此使用者可能已被 Shadowban,因此他們的推文可能不會顯示在搜尋結果中。此外,此推文已被標記為敏感內容。"},"accountAndTweetShadowbanned":{"message":"此推文有年齡限制,未滿 18 歲或未登入的使用者將不會看到。此外,它可能不會出現在搜尋結果中。"},"accountIsBlockedInSomeCountries":{"message":"此使用者在某些國家/地區被封鎖。"},"tweetFlaggedAsSensitive":{"message":"此推文已被標註為敏感內容,根據使用者的設定,它可能不會顯示在搜尋結果中。"},"thisUserIsNotShadowbanned":{"message":"此使用者沒有被 Shadowban。"},"thisUserIsShadowbanned":{"message":"此使用者可能已被 Shadowban,因此他們發佈的推文可能不會顯示在搜尋結果中。"},"tweetShadowbanned":{"message":"此推文有年齡限制,未滿 18 歲或未登入的使用者將不會看到。此外,它可能不會出現在搜尋結果中。"},"tweetNoProblem":{"message":"此推文沒有發現任何問題。"},"accountIsNotFlaggedAsSensitive":{"message":"✅此使用者沒有標記為敏感內容。"},"accountIsShadowbannedOrFlaggedAsSensitive":{"message":"🚫此使用者可能已被 Shadowban 或標記為敏感內容。"},"profileDoesNotContainSensitiveMedia":{"message":"✅此使用者的個人檔案媒體(頭像或標頭圖片)沒有標記為敏感內容。"},"profileContainsSensitiveMedia":{"message":"🚫此使用者的個人檔案媒體(頭像或標頭圖片)已被標記為敏感內容。"},"accountIsNotWithheldInCountries":{"message":"✅此使用者沒有被任何國家/地區封鎖(詳細說明)。"},"accountIsWithheldInCountries":{"message":"🚫此使用者被以下國家/地區封鎖(詳細說明):$1"},"tweetIsNotFlaggedAsSensitive":{"message":"✅此推文沒有標記為敏感內容。"},"tweetIsFlaggedAsSensitive":{"message":"🚫此推文已被標記為敏感內容。"},"tweetIsNotAgeRestricted":{"message":"✅此推文沒有年齡限制。"},"tweetIsAgeRestricted":{"message":"🚫此推文有年齡限制。"},"tweetIsSearchable":{"message":"✅此推文會顯示在搜尋結果中。"},"tweetMayNotBeSearchable":{"message":"⚠️根據使用者的設定,此推文可能不會顯示在搜尋結果中。"},"tweetIsNotSearchable":{"message":"🚫此推文可能不會顯示在搜尋結果中。"},"falsePositivesAndFalseNegativesOccur":{"message":"Shadowban Scanner 和其他功能類似的工具一樣,可能會產生誤判的情況。有關運作方式的詳細資訊,請參考這裡。"},"translatedByAI":{"message":"","description":"This field is used if the translation was done by AI. Otherwise, set this field to an empty string. Example sentence: \\"Translated from Japanese to by AI. Please notify @keita_roboin\'s DM or GitHub repository if there are any unnatural points.\\""},"showMore":{"message":"▶顯示更多"},"tweetTheResults":{"message":"分享結果"},"viewTweet":{"message":"查看推文"},"settingsWhereToDisplayCheckResults":{"message":"顯示檢查結果的位置"},"settingsShowMessagesInUnproblematicTweets":{"message":"在沒有問題的推文中顯示"},"settingsShowMessagesInUnproblematicProfiles":{"message":"在沒有問題的使用者的個人資料中顯示"},"settingsEnableForOtherUsersTweets":{"message":"在其他使用者的推文中顯示"},"settingsEnableForOtherUsersProfiles":{"message":"在其他使用者的個人資料中顯示"},"settingsOtherSettings":{"message":"其他設定"},"settingsAlwaysDetailedView":{"message":"永遠顯示詳細資訊"},"settingsShowNotesInMessages":{"message":"在訊息底部顯示註釋"},"settingsShowTweetButton":{"message":"顯示分享按鈕"},"settingsEnableOnXPro":{"message":"在 X Pro 上執行","description":"This field was translated by machine translation."},"settingsPleaseReload":{"message":"如更改過設定,請重新載入 Twitter/X"},"settingsPrivacyPolicy":{"message":"隱私政策"},"settingsPrivacyPolicyURL":{"message":"https://github.com/Robot-Inventor/shadowban-scanner/blob/main/README_zh_tw.md#privacy-policy"},"settingsOpenSourceLicenses":{"message":"開放原始碼授權"},"privacyPolicyPageTitle":{"message":"隱私政策 - Shadowban Scanner"},"privacyPolicy":{"message":"隱私政策"},"privacyPolicyText":{"message":"此擴充功能原則上會在使用者的電腦上處理所有資料,不會傳送到外部伺服器,而且此擴充功能不會在未經使用者許可的情況下使用登入認證存取 Twitter/X 的內部 API。對於此擴充功能沒有對應的網頁,將適用各自的使用條款和隱私政策。"},"initialSetup":{"message":"初始設定 - Shadowban Scanner"},"shadowbanScannerHasBeenInstalled":{"message":"已安裝 Shadowban Scanner"},"letsStartWithASimpleInitialSetup":{"message":"先從簡單的初始設定開始吧"},"pleaseSelectOneOfThem":{"message":"請選擇其中一個。這個設定之後可以再更改。"},"displayForAllTweetsAndAccounts":{"message":"顯示所有推文和使用者的檢查結果"},"displayOnlyForProblematicTweets":{"message":"僅顯示問題推文和使用者的檢查結果"},"displayOnlyInYourOwnTweets":{"message":"僅顯示我自己的推文的檢查結果"},"displayInAllUsersTweets":{"message":"顯示所有使用者推文的檢查結果"},"back":{"message":"返回"},"next":{"message":"下一步"},"initialSetupCompleted":{"message":"已完成初始設定!
是否要開啟使用說明?"},"open":{"message":"開啟"},"exitWithoutOpening":{"message":"不需要並關閉"}}'))})(); \ No newline at end of file diff --git a/userScript/zh_TW.user.js.LICENSE.txt b/userScript/zh_TW.user.js.LICENSE.txt index 6f070593..e243996e 100644 --- a/userScript/zh_TW.user.js.LICENSE.txt +++ b/userScript/zh_TW.user.js.LICENSE.txt @@ -20,12 +20,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -/** - * @license - * Copyright 2019 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ - /** * @license * Copyright 2021 Google LLC @@ -44,12 +38,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -/** - * @license - * Copyright 2022 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ - /** * @license * Copyright 2023 Google LLC