diff --git a/application/index.js b/application/index.js index f9f0b2e..27f47d4 100644 --- a/application/index.js +++ b/application/index.js @@ -88,14 +88,14 @@ if (userAgent && userAgent.includes("KAIOS")) { } let current_article = ""; -const proxy = "https://corsproxy.io/?"; +const proxy = "https://api.cors.lol/?url="; let default_settings = { "opml_url": "https://raw.githubusercontent.com/strukturart/feedolin/master/example.opml", "opml_local": "", - "proxy_url": "https://corsproxy.io/?", - "cache_time": 1000, + "proxy_url": "https://api.cors.lol/?url=", + "cache_time": 3600000, }; //store all articles id to compare let articlesID = []; @@ -120,14 +120,9 @@ localforage }); let reload_data = () => { - articles = []; localforage.setItem("last_channel_filter", channel_filter).then(() => { - side_toaster("load data", 3000); - start_loading(); }); - - setTimeout(() => {}, 3000); }; function add_read_article(id) { @@ -347,32 +342,55 @@ let raw = (i) => { const fetchOPML = (url) => { let t = url; - if (status.notKaiOS) t = settings.proxy_url + url; - - const xhr = new XMLHttpRequest({ "mozSystem": true }); + let xhr = null; + if (status.notKaiOS) { + t = settings.proxy_url + url; + xhr = new XMLHttpRequest(); + } else { + xhr = new XMLHttpRequest({ "mozSystem": true }); + } xhr.open("GET", t, true); xhr.setRequestHeader("Accept", "application/xml"); xhr.onload = function () { if (xhr.status >= 200 && xhr.status < 300) { - // Success + side_toaster("Data loaded successfully", 3000); load_feeds(xhr.responseText); } else { - // HTTP error handling - console.log(`HTTP error! Status: ${xhr.status}`); + handleHttpError(xhr.status); } }; - xhr.onerror = function (error) { - m.route.set("/start"); - - side_toaster("Error fetching the OPML file" + error, 4000); + xhr.onerror = function () { + handleRequestError(); }; xhr.send(); }; +const handleHttpError = (status) => { + console.error(`HTTP Error: Status ${status}`); + side_toaster("OPML file not reachable", 4000); + + // Route back to start if on intro + let r = m.route.get(); + if (r.startsWith("/intro")) { + m.route.set("/start"); + } +}; + +const handleRequestError = () => { + console.error("Network error occurred during the request."); + side_toaster("OPML file not reachable", 3000); + + // Route back to start if on intro + let r = m.route.get(); + if (r.startsWith("/intro")) { + m.route.set("/start"); + } +}; + const load_feeds = async (data) => { if (data) { let downloadList; @@ -392,7 +410,7 @@ const load_feeds = async (data) => { settings.last_update = new Date(); localforage.setItem("settings", settings); } catch (error) { - alert(error); + console.log(error); } } else { alert("Generated download list is empty."); @@ -456,8 +474,6 @@ const fetchContent = async (feed_download_list) => { const checkIfAllFeedsLoaded = () => { channel_filter = localStorage.getItem("last_channel_filter"); if (completedFeeds === totalFeeds) { - m.route.set("/start"); - console.log("All feeds are loaded"); // All feeds are done loading, you can proceed with further actions //cache data @@ -484,6 +500,9 @@ const fetchContent = async (feed_download_list) => { .catch((err) => { console.error("Feeds cached", err); }); + + let r = m.route.get(); + if (r.startsWith("/intro")) m.route.set("/start"); } }; @@ -561,7 +580,7 @@ const fetchContent = async (feed_download_list) => { }); } else { let xhr = new XMLHttpRequest({ "mozSystem": true }); - xhr.timeout = 5000; + xhr.timeout = 2000; let url = e.url; if (status.notKaiOS) { @@ -818,13 +837,12 @@ localforage .setItem("settings", settings) .then(function (value) {}) .catch(function (err) { - // This code runs if there were any errors console.log(err); }); } settings = value; - //todo set value in settings view, default is 1sec - settings.cache_time = settings.cache_time || 1000; + //todo set value in settings view, default is 1h + settings.cache_time = settings.cache_time || 3600000; if (settings.last_update) { status.last_update_duration = @@ -1534,6 +1552,9 @@ if ("b2g" in navigator) { console.log(e); } } +if (navigator.mozAlarms) { + globalAudioElement.mozAudioChannelType = "content"; +} let hasPlayedAudio = []; @@ -1642,7 +1663,6 @@ const AudioPlayerView = { document .querySelector("div.button-left") .addEventListener("click", function () { - alert("j"); status.sleepTimer ? stopTimer() : startTimer(settings.sleepTimer * 60 * 1000); @@ -2209,6 +2229,8 @@ var settingsView = { }, }, [ + m("option", { value: "1" }, "1"), + m("option", { value: "5" }, "5"), m("option", { value: "10" }, "10"), m("option", { value: "20" }, "20"), m("option", { value: "30" }, "30"), @@ -2805,6 +2827,7 @@ window.addEventListener("offline", () => { }); window.addEventListener("beforeunload", (event) => { + localforage.setItem("last_channel_filter", channel_filter).then(() => {}); const entries = window.performance.getEntriesByType("navigation"); // For older browsers (fallback) @@ -2874,6 +2897,12 @@ try { } catch (e) {} //worker sleep mode +if (navigator.mozAlarms) { + navigator.mozSetMessageHandler("alarm", function (mozAlarm) { + globalAudioElement.pause(); + status.sleepTimer = false; + }); +} let worker; @@ -2884,14 +2913,32 @@ try { } function startTimer(timerDuration) { - worker.postMessage({ action: "start", duration: timerDuration }); - side_toaster("sleep mode on", 3000); + //KaiOS2 + if (navigator.mozAlarms) { + let sleepDuration = settings.sleepTimer * 60 * 1000; // Convert minutes to milliseconds + let targetTime = new Date(Date.now() + sleepDuration); // Add duration to current time + + var request = navigator.mozAlarms.add(targetTime, "honorTimezone"); + + request.onsuccess = function () { + status.alarmId = this.result; + }; + } + status.sleepTimer = true; + side_toaster("sleep mode on", 3000); + + worker.postMessage({ action: "start", duration: timerDuration }); } function stopTimer() { - worker.postMessage({ action: "stop" }); + if (navigator.mozAlarms) { + navigator.mozAlarms.remove(status.alarmId); + } + status.sleepTimer = false; + side_toaster("sleep mode off", 3000); + worker.postMessage({ action: "stop" }); } worker.onmessage = function (event) { diff --git a/application/manifest.webapp b/application/manifest.webapp index 6cb4716..a040931 100644 --- a/application/manifest.webapp +++ b/application/manifest.webapp @@ -1,5 +1,5 @@ { - "version": "2.0.15", + "version": "2.0.17", "name": "feedolin", "description": "Feedolin is an RSS / Atom / Mastodon reader and podcast player. It is intended for users who already use an rss reader client and want to read their feeds on a kaios device. the list of subscribed websites / podcasts is managed locally or online in an opml file.", "launch_path": "/index.html", diff --git a/application/manifest.webmanifest b/application/manifest.webmanifest index f061393..1c634b4 100644 --- a/application/manifest.webmanifest +++ b/application/manifest.webmanifest @@ -24,14 +24,12 @@ ], "b2g_features": { - "version": "1.8.128", + "version": "1.8.132", "id": "feedolin", "subtitle": "RSS Reader and Mastodon Reader", "core": true, "type": "privileged", "display": "fullscreen", - "origin": "http://feedolin.localhost", - "developer": { "name": "strukturart", "url": "https://github.com/strukturart/feedolin" diff --git a/application/sw.js b/application/sw.js index 03ea870..02ce707 100644 --- a/application/sw.js +++ b/application/sw.js @@ -30,7 +30,7 @@ self.addEventListener("systemmessage", async (evt) => { const userAgent = navigator.userAgent || ""; if (userAgent && !userAgent.includes("KAIOS")) { - const CACHE_NAME = "pwa-cache-v0.1181"; + const CACHE_NAME = "pwa-cache-v0.1197"; const FILE_LIST_URL = "/file-list.json"; // URL of the JSON file containing the array of files self.addEventListener("install", (event) => { diff --git a/docs/index.339e55c4.js b/docs/index.339e55c4.js index c6d271f..d838dec 100644 --- a/docs/index.339e55c4.js +++ b/docs/index.339e55c4.js @@ -3,4 +3,4 @@ * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */function xX(t){return"[object Object]"===Object.prototype.toString.call(t)}xQ=function(t){if("string"!=typeof t)throw TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};var x0=function(t){var e,r;return!1!==xX(t)&&(void 0===(e=t.constructor)||!1!==xX(r=e.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))},x1={},x2=function(t){var e;return!!t&&"object"==typeof t&&"[object RegExp]"!==(e=Object.prototype.toString.call(t))&&"[object Date]"!==e&&t.$$typeof!==x3},x3="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function x5(t,e){return!1!==e.clone&&e.isMergeableObject(t)?x7(Array.isArray(t)?[]:{},t,e):t}function x8(t,e,r){return t.concat(e).map(function(t){return x5(t,r)})}function x6(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function x4(t,e){try{return e in t}catch(t){return!1}}function x7(t,e,r){(r=r||{}).arrayMerge=r.arrayMerge||x8,r.isMergeableObject=r.isMergeableObject||x2,r.cloneUnlessOtherwiseSpecified=x5;var n,i,o=Array.isArray(e);return o!==Array.isArray(t)?x5(e,r):o?r.arrayMerge(t,e,r):(i={},(n=r).isMergeableObject(t)&&x6(t).forEach(function(e){i[e]=x5(t[e],n)}),x6(e).forEach(function(r){x4(t,r)&&!(Object.hasOwnProperty.call(t,r)&&Object.propertyIsEnumerable.call(t,r))||(x4(t,r)&&n.isMergeableObject(e[r])?i[r]=(function(t,e){if(!e.customMerge)return x7;var r=e.customMerge(t);return"function"==typeof r?r:x7})(r,n)(t[r],e[r],n):i[r]=x5(e[r],n))}),i)}x7.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,r){return x7(t,r,e)},{})},x1=x7;var x9={};ti=x9,to=function(){return function(t){function e(t){return" "===t||" "===t||"\n"===t||"\f"===t||"\r"===t}function r(e){var r,n=e.exec(t.substring(v));if(n)return r=n[0],v+=r.length,r}for(var n,i,o,a,s,u=t.length,c=/^[ \t\n\r\u000c]+/,l=/^[, \t\n\r\u000c]+/,f=/^[^ \t\n\r\u000c]+/,h=/[,]+$/,d=/^\d+$/,p=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,v=0,g=[];;){if(r(l),v>=u)return g;n=r(f),i=[],","===n.slice(-1)?(n=n.replace(h,""),m()):function(){for(r(c),o="",a="in descriptor";;){if(s=t.charAt(v),"in descriptor"===a){if(e(s))o&&(i.push(o),o="",a="after descriptor");else if(","===s){v+=1,o&&i.push(o),m();return}else if("("===s)o+=s,a="in parens";else if(""===s){o&&i.push(o),m();return}else o+=s}else if("in parens"===a){if(")"===s)o+=s,a="in descriptor";else if(""===s){i.push(o),m();return}else o+=s}else if("after descriptor"===a){if(e(s));else if(""===s){m();return}else a="in descriptor",v-=1}v+=1}}()}function m(){var e,r,o,a,s,u,c,l,f,h=!1,v={};for(a=0;at.length)&&(e=t.length);for(var r=0,n=Array(e);r",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}},{key:"showSourceCode",value:function(t){var e=this;if(!this.source)return"";var r=this.source;null==t&&(t=Sl.isColorSupported);var n=function(t){return t},i=function(t){return t},o=function(t){return t};if(t){var a=Sl.createColors(!0),s=a.bold,u=a.gray,c=a.red;i=function(t){return s(c(t))},n=function(t){return u(t)},Sd&&(o=function(t){return Sd(t)})}var l=r.split(/\r?\n/),f=Math.max(this.line-3,0),h=Math.min(this.line+2,l.length),d=String(h).length;return l.slice(f,h).map(function(t,r){var a=f+1+r,s=" "+(" "+a).slice(-d)+" | ";if(a===e.line){if(t.length>160){var u=Math.max(0,e.column-20),c=Math.max(e.column+20,e.endColumn+20),l=t.slice(u,c),h=n(s.replace(/\d/g," "))+t.slice(0,Math.min(e.column-1,19)).replace(/[^\t]/g," ");return i(">")+n(s)+o(l)+"\n "+h+i("^")}var p=n(s.replace(/\d/g," "))+t.slice(0,e.column-1).replace(/[^\t]/g," ");return i(">")+n(s)+o(t)+"\n "+p+i("^")}return" "+n(s)+o(t)}).join("\n")}},{key:"toString",value:function(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}}]),r}(xT(Error));Sc=Sp,Sp.default=Sp;var Sv={},Sg={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1},Sm=/*#__PURE__*/function(){function t(e){wQ(this,t),this.builder=e}return w0(t,[{key:"atrule",value:function(t,e){var r="@"+t.name,n=t.params?this.rawValue(t,"params"):"";if(void 0!==t.raws.afterName?r+=t.raws.afterName:n&&(r+=" "),t.nodes)this.block(t,r+n);else{var i=(t.raws.between||"")+(e?";":"");this.builder(r+n+i,t)}}},{key:"beforeAfter",value:function(t,e){r="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose");for(var r,n=t.parent,i=0;n&&"root"!==n.type;)i+=1,n=n.parent;if(r.includes("\n")){var o=this.raw(t,null,"indent");if(o.length)for(var a=0;a0&&"comment"===t.nodes[e].type;)e-=1;for(var r=this.raw(t,"semicolon"),n=0;n0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}},{key:"rawBeforeComment",value:function(t,e){var r;return t.walkComments(function(t){if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}},{key:"rawBeforeDecl",value:function(t,e){var r;return t.walkDecls(function(t){if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}},{key:"rawBeforeOpen",value:function(t){var e;return t.walk(function(t){if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1}),e}},{key:"rawBeforeRule",value:function(t){var e;return t.walk(function(r){if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}},{key:"rawColon",value:function(t){var e;return t.walkDecls(function(t){if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}},{key:"rawEmptyBody",value:function(t){var e;return t.walk(function(t){if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1}),e}},{key:"rawIndent",value:function(t){var e;return t.raws.indent?t.raws.indent:(t.walk(function(r){var n=r.parent;if(n&&n!==t&&n.parent&&n.parent===t&&void 0!==r.raws.before){var i=r.raws.before.split("\n");return e=(e=i[i.length-1]).replace(/\S/g,""),!1}}),e)}},{key:"rawSemicolon",value:function(t){var e;return t.walk(function(t){if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1}),e}},{key:"rawValue",value:function(t,e){var r=t[e],n=t.raws[e];return n&&n.value===r?n.raw:r}},{key:"root",value:function(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}},{key:"rule",value:function(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}},{key:"stringify",value:function(t,e){if(!this[t.type])throw Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}}]),t}();Sv=Sm,Sm.default=Sm;var Sy={};function Sb(t,e){new Sv(e).stringify(t)}Sy=Sb,Sb.default=Sb,et=Symbol("isClean"),ee=Symbol("my");var Sw=/*#__PURE__*/function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var r in wQ(this,t),this.raws={},this[et]=!1,this[ee]=!0,e)if("nodes"===r){this.nodes=[];var n=!0,i=!1,o=void 0;try{for(var a,s=e[r][Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var u=a.value;"function"==typeof u.clone?this.append(u.clone()):this.append(u)}}catch(t){i=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}}else this[r]=e[r]}return w0(t,[{key:"addToError",value:function(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&".concat(e.input.from,":").concat(e.start.line,":").concat(e.start.column,"$&"))}return t}},{key:"after",value:function(t){return this.parent.insertAfter(this,t),this}},{key:"assign",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var e in t)this[e]=t[e];return this}},{key:"before",value:function(t){return this.parent.insertBefore(this,t),this}},{key:"cleanRaws",value:function(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}},{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=function t(e,r){var n=new e.constructor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&"proxyCache"!==i){var o=e[i],a=void 0===o?"undefined":(0,e_._)(o);"parent"===i&&"object"===a?r&&(n[i]=r):"source"===i?n[i]=o:Array.isArray(o)?n[i]=o.map(function(e){return t(e,n)}):("object"===a&&null!==o&&(o=t(o)),n[i]=o)}return n}(this);for(var r in t)e[r]=t[r];return e}},{key:"cloneAfter",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.clone(t);return this.parent.insertAfter(this,e),e}},{key:"cloneBefore",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.clone(t);return this.parent.insertBefore(this,e),e}},{key:"error",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.source){var r=this.rangeBy(e),n=r.end,i=r.start;return this.source.input.error(t,{column:i.column,line:i.line},{column:n.column,line:n.line},e)}return new Sc(t)}},{key:"getProxyProcessor",value:function(){return{get:function(t,e){return"proxyOf"===e?t:"root"===e?function(){return t.root().toProxy()}:t[e]},set:function(t,e,r){return t[e]===r||(t[e]=r,("prop"===e||"value"===e||"name"===e||"params"===e||"important"===e||"text"===e)&&t.markDirty(),!0)}}}},{key:"markClean",value:function(){this[et]=!0}},{key:"markDirty",value:function(){if(this[et]){this[et]=!1;for(var t=this;t=t.parent;)t[et]=!1}}},{key:"next",value:function(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}},{key:"positionBy",value:function(t,e){var r=this.source.start;if(t.index)r=this.positionInside(t.index,e);else if(t.word){var n=(e=this.toString()).indexOf(t.word);-1!==n&&(r=this.positionInside(n,e))}return r}},{key:"positionInside",value:function(t,e){for(var r=e||this.toString(),n=this.source.start.column,i=this.source.start.line,o=0;o0&&void 0!==arguments[0]?arguments[0]:Sy;t.stringify&&(t=t.stringify);var e="";return t(this,function(t){e+=t}),e}},{key:"warn",value:function(t,e,r){var n={node:this};for(var i in r)n[i]=r[i];return t.warn(e,n)}},{key:"proxyOf",get:function(){return this}}]),t}();Su=Sw,Sw.default=Sw;var Sx=/*#__PURE__*/function(t){xS(r,t);var e=x_(r);function r(t){var n;return wQ(this,r),(n=e.call(this,t)).type="comment",n}return r}(xT(Su));Ss=Sx,Sx.default=Sx;var SS={},SE=/*#__PURE__*/function(t){xS(r,t);var e=x_(r);function r(t){var n;return wQ(this,r),t&&void 0!==t.value&&"string"!=typeof t.value&&(t=xz(xk({},t),{value:String(t.value)})),(n=e.call(this,t)).type="decl",n}return w0(r,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),r}(xT(Su));SS=SE,SE.default=SE;var Sk=/*#__PURE__*/function(t){xS(r,t);var e=x_(r);function r(){return wQ(this,r),e.apply(this,arguments)}return w0(r,[{key:"append",value:function(){for(var t=arguments.length,e=Array(t),r=0;r1?e-1:0),i=1;i=t&&(this.indexes[r]=e-1);return this.markDirty(),this}},{key:"replaceValues",value:function(t,e,r){return r||(r=e,e={}),this.walkDecls(function(n){(!e.props||e.props.includes(n.prop))&&(!e.fast||n.value.includes(e.fast))&&(n.value=n.value.replace(t,r))}),this.markDirty(),this}},{key:"some",value:function(t){return this.nodes.some(t)}},{key:"walk",value:function(t){return this.each(function(e,r){var n;try{n=t(e,r)}catch(t){throw e.addToError(t)}return!1!==n&&e.walk&&(n=e.walk(t)),n})}},{key:"walkAtRules",value:function(t,e){return e?t instanceof RegExp?this.walk(function(r,n){if("atrule"===r.type&&t.test(r.name))return e(r,n)}):this.walk(function(r,n){if("atrule"===r.type&&r.name===t)return e(r,n)}):(e=t,this.walk(function(t,r){if("atrule"===t.type)return e(t,r)}))}},{key:"walkComments",value:function(t){return this.walk(function(e,r){if("comment"===e.type)return t(e,r)})}},{key:"walkDecls",value:function(t,e){return e?t instanceof RegExp?this.walk(function(r,n){if("decl"===r.type&&t.test(r.prop))return e(r,n)}):this.walk(function(r,n){if("decl"===r.type&&r.prop===t)return e(r,n)}):(e=t,this.walk(function(t,r){if("decl"===t.type)return e(t,r)}))}},{key:"walkRules",value:function(t,e){return e?t instanceof RegExp?this.walk(function(r,n){if("rule"===r.type&&t.test(r.selector))return e(r,n)}):this.walk(function(r,n){if("rule"===r.type&&r.selector===t)return e(r,n)}):(e=t,this.walk(function(t,r){if("rule"===t.type)return e(t,r)}))}},{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),r}(xT(Su));Sk.registerParse=function(t){en=t},Sk.registerRule=function(t){eo=t},Sk.registerAtRule=function(t){er=t},Sk.registerRoot=function(t){ei=t},Sa=Sk,Sk.default=Sk,Sk.rebuild=function(t){"atrule"===t.type?Object.setPrototypeOf(t,er.prototype):"rule"===t.type?Object.setPrototypeOf(t,eo.prototype):"decl"===t.type?Object.setPrototypeOf(t,SS.prototype):"comment"===t.type?Object.setPrototypeOf(t,Ss.prototype):"root"===t.type&&Object.setPrototypeOf(t,ei.prototype),t[ee]=!0,t.nodes&&t.nodes.forEach(function(t){Sk.rebuild(t)})};var SA=/*#__PURE__*/function(t){xS(r,t);var e=x_(r);function r(t){var n;return wQ(this,r),(n=e.call(this,t)).type="atrule",n}return w0(r,[{key:"append",value:function(){for(var t,e=arguments.length,n=Array(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:{};return new ea(new es,this,t).stringify()}}]),r}(Sa);SI.registerLazyResult=function(t){ea=t},SI.registerProcessor=function(t){es=t},SO=SI,SI.default=SI;var ST={};function SN(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n=0||(i[r]=t[r]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var S_={},SP=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21,e="",r=t;r--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},SC=Sd.isAbsolute,SR=Sd.resolve,SL=Sd.SourceMapConsumer,SM=Sd.SourceMapGenerator,SD=Sd.fileURLToPath,SB=Sd.pathToFileURL,Sj={},e_=ek("2L7Ke");eu=function(t){var e,r,n=function(t){var e=t.length;if(e%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var n=r===e?0:4-r%4;return[r,n]}(t),i=n[0],o=n[1],a=new SF((i+o)*3/4-o),s=0,u=o>0?i-4:i;for(r=0;r>16&255,a[s++]=e>>8&255,a[s++]=255&e;return 2===o&&(e=Sq[t.charCodeAt(r)]<<2|Sq[t.charCodeAt(r+1)]>>4,a[s++]=255&e),1===o&&(e=Sq[t.charCodeAt(r)]<<10|Sq[t.charCodeAt(r+1)]<<4|Sq[t.charCodeAt(r+2)]>>2,a[s++]=e>>8&255,a[s++]=255&e),a},ec=function(t){for(var e,r=t.length,n=r%3,i=[],o=0,a=r-n;o>18&63]+SU[n>>12&63]+SU[n>>6&63]+SU[63&n]);return i.join("")}(t,o,o+16383>a?a:o+16383));return 1===n?i.push(SU[(e=t[r-1])>>2]+SU[e<<4&63]+"=="):2===n&&i.push(SU[(e=(t[r-2]<<8)+t[r-1])>>10]+SU[e>>4&63]+SU[e<<2&63]+"="),i.join("")};for(var SU=[],Sq=[],SF="undefined"!=typeof Uint8Array?Uint8Array:Array,Sz="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",SV=0,S$=Sz.length;SV>1,l=-7,f=r?i-1:0,h=r?-1:1,d=t[e+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+t[e+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=c}return(d?-1:1)*a*Math.pow(2,o-n)},ef=function(t,e,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<>1,h=23===i?5960464477539062e-23:0,d=n?0:o-1,p=n?1:-1,v=e<0||0===e&&1/e<0?1:0;for(isNaN(e=Math.abs(e))||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+f>=1?e+=h/u:e+=h*Math.pow(2,1-f),e*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;t[r+d]=255&a,d+=p,a/=256,c-=8);t[r+d-p]|=128*v};var SH="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function SW(t){if(t>0x7fffffff)throw RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,SG.prototype),e}function SG(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return SZ(t)}return SY(t,e,r)}function SY(t,e,r){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!SG.isEncoding(e))throw TypeError("Unknown encoding: "+e);var r=0|S0(t,e),n=SW(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(Ed(t,Uint8Array)){var e=new Uint8Array(t);return SQ(e.buffer,e.byteOffset,e.byteLength)}return SJ(t)}(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(void 0===t?"undefined":(0,e_._)(t)));if(Ed(t,ArrayBuffer)||t&&Ed(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(Ed(t,SharedArrayBuffer)||t&&Ed(t.buffer,SharedArrayBuffer)))return SQ(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return SG.from(n,e,r);var i=function(t){if(SG.isBuffer(t)){var e,r=0|SX(t.length),n=SW(r);return 0===n.length||t.copy(n,0,0,r),n}return void 0!==t.length?"number"!=typeof t.length||(e=t.length)!=e?SW(0):SJ(t):"Buffer"===t.type&&Array.isArray(t.data)?SJ(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return SG.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(void 0===t?"undefined":(0,e_._)(t)))}function SK(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function SZ(t){return SK(t),SW(t<0?0:0|SX(t))}function SJ(t){for(var e=t.length<0?0:0|SX(t.length),r=SW(e),n=0;n=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function S0(t,e){if(SG.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Ed(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+(void 0===t?"undefined":(0,e_._)(t)));var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return El(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Ef(t).length;default:if(i)return n?-1:El(t).length;e=(""+e).toLowerCase(),i=!0}}function S1(t,e,r){var n,i,o=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(o=r=+r)!=o&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return -1;r=t.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof e&&(e=SG.from(e,n)),SG.isBuffer(e))return 0===e.length?-1:S5(t,e,r,n,i);if("number"==typeof e)return(e&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):S5(t,[e],r,n,i);throw TypeError("val must be string, number or Buffer")}function S5(t,e,r,n,i){var o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var l=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){for(var f=!0,h=0;h239?4:o>223?3:o>191?2:1;if(i+s<=r){var u=void 0,c=void 0,l=void 0,f=void 0;switch(s){case 1:o<128&&(a=o);break;case 2:(192&(u=t[i+1]))==128&&(f=(31&o)<<6|63&u)>127&&(a=f);break;case 3:u=t[i+1],c=t[i+2],(192&u)==128&&(192&c)==128&&(f=(15&o)<<12|(63&u)<<6|63&c)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:u=t[i+1],c=t[i+2],l=t[i+3],(192&u)==128&&(192&c)==128&&(192&l)==128&&(f=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var r="",n=0;nr)throw RangeError("Trying to access beyond buffer length")}function S4(t,e,r,n,i,o){if(!SG.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw RangeError("Index out of range")}function S7(t,e,r,n,i){Ea(e,n,i,t,r,7);var o=Number(e&BigInt(0xffffffff));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;var a=Number(e>>BigInt(32)&BigInt(0xffffffff));return t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,r}function S9(t,e,r,n,i){Ea(e,n,i,t,r,7);var o=Number(e&BigInt(0xffffffff));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;var a=Number(e>>BigInt(32)&BigInt(0xffffffff));return t[r+3]=a,a>>=8,t[r+2]=a,a>>=8,t[r+1]=a,a>>=8,t[r]=a,r+8}function Et(t,e,r,n,i,o){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function Ee(t,e,r,n,i){return e=+e,r>>>=0,i||Et(t,e,r,4,34028234663852886e22,-34028234663852886e22),ef(t,e,r,n,23,4),r+4}function Er(t,e,r,n,i){return e=+e,r>>>=0,i||Et(t,e,r,8,17976931348623157e292,-17976931348623157e292),ef(t,e,r,n,52,8),r+8}SG.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),SG.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(SG.prototype,"parent",{enumerable:!0,get:function(){if(SG.isBuffer(this))return this.buffer}}),Object.defineProperty(SG.prototype,"offset",{enumerable:!0,get:function(){if(SG.isBuffer(this))return this.byteOffset}}),SG.poolSize=8192,SG.from=function(t,e,r){return SY(t,e,r)},Object.setPrototypeOf(SG.prototype,Uint8Array.prototype),Object.setPrototypeOf(SG,Uint8Array),SG.alloc=function(t,e,r){return(SK(t),t<=0)?SW(t):void 0!==e?"string"==typeof r?SW(t).fill(e,r):SW(t).fill(e):SW(t)},SG.allocUnsafe=function(t){return SZ(t)},SG.allocUnsafeSlow=function(t){return SZ(t)},SG.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==SG.prototype},SG.compare=function(t,e){if(Ed(t,Uint8Array)&&(t=SG.from(t,t.offset,t.byteLength)),Ed(e,Uint8Array)&&(e=SG.from(e,e.offset,e.byteLength)),!SG.isBuffer(t)||!SG.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);in.length?(SG.isBuffer(o)||(o=SG.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(SG.isBuffer(o))o.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n},SG.byteLength=S0,SG.prototype._isBuffer=!0,SG.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e50&&(t+=" ... "),""},SH&&(SG.prototype[SH]=SG.prototype.inspect),SG.prototype.compare=function(t,e,r,n,i){if(Ed(t,Uint8Array)&&(t=SG.from(t,t.offset,t.byteLength)),!SG.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+(void 0===t?"undefined":(0,e_._)(t)));if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,a=r-e,s=Math.min(o,a),u=this.slice(n,i),c=t.slice(e,r),l=0;l>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,o,a,s,u,c,l,f,h=this.length-e;if((void 0===r||r>h)&&(r=h),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var d=!1;;)switch(n){case"hex":return function(t,e,r,n){r=Number(r)||0;var i,o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var a=e.length;for(n>a/2&&(n=a/2),i=0;i>8,i.push(r%256),i.push(n);return i}(t,this.length-l),this,l,f);default:if(d)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}},SG.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},SG.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||S6(t,e,this.length);for(var n=this[t],i=1,o=0;++o>>=0,e>>>=0,r||S6(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},SG.prototype.readUint8=SG.prototype.readUInt8=function(t,e){return t>>>=0,e||S6(t,1,this.length),this[t]},SG.prototype.readUint16LE=SG.prototype.readUInt16LE=function(t,e){return t>>>=0,e||S6(t,2,this.length),this[t]|this[t+1]<<8},SG.prototype.readUint16BE=SG.prototype.readUInt16BE=function(t,e){return t>>>=0,e||S6(t,2,this.length),this[t]<<8|this[t+1]},SG.prototype.readUint32LE=SG.prototype.readUInt32LE=function(t,e){return t>>>=0,e||S6(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+0x1000000*this[t+3]},SG.prototype.readUint32BE=SG.prototype.readUInt32BE=function(t,e){return t>>>=0,e||S6(t,4,this.length),0x1000000*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},SG.prototype.readBigUInt64LE=Ev(function(t){Es(t>>>=0,"offset");var e=this[t],r=this[t+7];(void 0===e||void 0===r)&&Eu(t,this.length-8);var n=e+256*this[++t]+65536*this[++t]+0x1000000*this[++t],i=this[++t]+256*this[++t]+65536*this[++t]+0x1000000*r;return BigInt(n)+(BigInt(i)<>>=0,"offset");var e=this[t],r=this[t+7];(void 0===e||void 0===r)&&Eu(t,this.length-8);var n=0x1000000*e+65536*this[++t]+256*this[++t]+this[++t],i=0x1000000*this[++t]+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<>>=0,e>>>=0,r||S6(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},SG.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||S6(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},SG.prototype.readInt8=function(t,e){return(t>>>=0,e||S6(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},SG.prototype.readInt16LE=function(t,e){t>>>=0,e||S6(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?0xffff0000|r:r},SG.prototype.readInt16BE=function(t,e){t>>>=0,e||S6(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?0xffff0000|r:r},SG.prototype.readInt32LE=function(t,e){return t>>>=0,e||S6(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},SG.prototype.readInt32BE=function(t,e){return t>>>=0,e||S6(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},SG.prototype.readBigInt64LE=Ev(function(t){Es(t>>>=0,"offset");var e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&Eu(t,this.length-8),(BigInt(this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24))<>>=0,"offset");var e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&Eu(t,this.length-8),(BigInt((e<<24)+65536*this[++t]+256*this[++t]+this[++t])<>>=0,e||S6(t,4,this.length),el(this,t,!0,23,4)},SG.prototype.readFloatBE=function(t,e){return t>>>=0,e||S6(t,4,this.length),el(this,t,!1,23,4)},SG.prototype.readDoubleLE=function(t,e){return t>>>=0,e||S6(t,8,this.length),el(this,t,!0,52,8)},SG.prototype.readDoubleBE=function(t,e){return t>>>=0,e||S6(t,8,this.length),el(this,t,!1,52,8)},SG.prototype.writeUintLE=SG.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;S4(this,t,e,r,i,0)}var o=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;S4(this,t,e,r,i,0)}var o=r-1,a=1;for(this[e+o]=255&t;--o>=0&&(a*=256);)this[e+o]=t/a&255;return e+r},SG.prototype.writeUint8=SG.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||S4(this,t,e,1,255,0),this[e]=255&t,e+1},SG.prototype.writeUint16LE=SG.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||S4(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},SG.prototype.writeUint16BE=SG.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||S4(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},SG.prototype.writeUint32LE=SG.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||S4(this,t,e,4,0xffffffff,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},SG.prototype.writeUint32BE=SG.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||S4(this,t,e,4,0xffffffff,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},SG.prototype.writeBigUInt64LE=Ev(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return S7(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),SG.prototype.writeBigUInt64BE=Ev(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return S9(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),SG.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);S4(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+r},SG.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);S4(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},SG.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||S4(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},SG.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||S4(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},SG.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||S4(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},SG.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||S4(this,t,e,4,0x7fffffff,-0x80000000),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},SG.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||S4(this,t,e,4,0x7fffffff,-0x80000000),t<0&&(t=0xffffffff+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},SG.prototype.writeBigInt64LE=Ev(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return S7(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),SG.prototype.writeBigInt64BE=Ev(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return S9(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),SG.prototype.writeFloatLE=function(t,e,r){return Ee(this,t,e,!0,r)},SG.prototype.writeFloatBE=function(t,e,r){return Ee(this,t,e,!1,r)},SG.prototype.writeDoubleLE=function(t,e,r){return Er(this,t,e,!0,r)},SG.prototype.writeDoubleBE=function(t,e,r){return Er(this,t,e,!1,r)},SG.prototype.copy=function(t,e,r,n){if(!SG.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i=n+4;r-=3)e="_".concat(t.slice(r-3,r)).concat(e);return"".concat(t.slice(0,r)).concat(e)}function Ea(t,e,r,n,i,o){if(t>r||t3?0===e||e===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat((o+1)*8).concat(s):">= -(2".concat(s," ** ").concat((o+1)*8-1).concat(s,") and < 2 ** ")+"".concat((o+1)*8-1).concat(s):">= ".concat(e).concat(s," and <= ").concat(r).concat(s),new En.ERR_OUT_OF_RANGE("value",a,t)}Es(i,"offset"),(void 0===n[i]||void 0===n[i+o])&&Eu(i,n.length-(o+1))}function Es(t,e){if("number"!=typeof t)throw new En.ERR_INVALID_ARG_TYPE(e,"number",t)}function Eu(t,e,r){if(Math.floor(t)!==t)throw Es(t,r),new En.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new En.ERR_BUFFER_OUT_OF_BOUNDS;throw new En.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(e),t)}Ei("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),Ei("ERR_INVALID_ARG_TYPE",function(t,e){return'The "'.concat(t,'" argument must be of type number. Received type ').concat(void 0===e?"undefined":(0,e_._)(e))},TypeError),Ei("ERR_OUT_OF_RANGE",function(t,e,r){var n='The value of "'.concat(t,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>0x100000000?i=Eo(String(r)):(void 0===r?"undefined":(0,e_._)(r))==="bigint"&&(i=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=Eo(i)),i+="n"),n+=" It must be ".concat(e,". Received ").concat(i)},RangeError);var Ec=/[^+/0-9A-Za-z-_]/g;function El(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],a=0;a55295&&r<57344){if(!i){if(r>56319||a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function Ef(t){return eu(function(t){if((t=(t=t.split("=")[0]).trim().replace(Ec,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Eh(t,e,r,n){var i;for(i=0;i=e.length)&&!(i>=t.length);++i)e[i+r]=t[i];return i}function Ed(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}var Ep=function(){for(var t="0123456789abcdef",e=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}();function Ev(t){return"undefined"==typeof BigInt?Eg:t}function Eg(){throw Error("BigInt not supported")}var Em=Sd.existsSync,Ey=Sd.readFileSync,Eb=Sd.dirname,Ew=Sd.join,Ex=Sd.SourceMapConsumer,ES=Sd.SourceMapGenerator,EE=/*#__PURE__*/function(){function t(e,r){if(wQ(this,t),!1!==r.map){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var n=r.map?r.map.prev:void 0,i=this.loadMap(r.from,n);!this.mapFile&&r.from&&(this.mapFile=r.from),this.mapFile&&(this.root=Eb(this.mapFile)),i&&(this.text=i)}}return w0(t,[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new Ex(this.text)),this.consumerCache}},{key:"decodeInline",value:function(t){var e,r=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(r)return decodeURIComponent(t.substr(r[0].length));var n=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(n)return e=t.substr(n[0].length),SG?SG.from(e,"base64").toString():window.atob(e);throw Error("Unsupported source map encoding "+t.match(/data:application\/json;([^,]+),/)[1])}},{key:"getAnnotationURL",value:function(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}},{key:"isMap",value:function(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}},{key:"loadAnnotation",value:function(t){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),n=t.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,n)))}}},{key:"loadFile",value:function(t){if(this.root=Eb(t),Em(t))return this.mapFile=t,Ey(t,"utf-8").toString().trim()}},{key:"loadMap",value:function(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"==typeof e){var r=e(t);if(r){var n=this.loadFile(r);if(!n)throw Error("Unable to load previous source map: "+r.toString());return n}}else if(e instanceof Ex)return ES.fromSourceMap(e).toString();else if(e instanceof ES)return e.toString();else if(this.isMap(e))return JSON.stringify(e);else throw Error("Unsupported previous source map format: "+e.toString())}else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){var i=this.annotation;return t&&(i=Ew(Eb(t),i)),this.loadFile(i)}}},{key:"startWith",value:function(t,e){return!!t&&t.substr(0,e.length)===e}},{key:"withContent",value:function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}]),t}();Sj=EE,EE.default=EE;var Ek=Symbol("fromOffsetCache"),EA=!!(SL&&SM),EO=!!(SR&&SC),EI=/*#__PURE__*/function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(wQ(this,t),null==e||"object"==typeof e&&!e.toString)throw Error("PostCSS received ".concat(e," instead of CSS string"));if(this.css=e.toString(),"\uFEFF"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,r.from&&(!EO||/^\w+:\/\//.test(r.from)||SC(r.from)?this.file=r.from:this.file=SR(r.from)),EO&&EA){var n=new Sj(this.css,r);if(n.text){this.map=n;var i=n.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}return w0(t,[{key:"error",value:function(t,e,r){var n,i,o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(e&&"object"==typeof e){var s=e,u=r;if("number"==typeof s.offset){var c=this.fromOffset(s.offset);e=c.line,r=c.col}else e=s.line,r=s.column;if("number"==typeof u.offset){var l=this.fromOffset(u.offset);i=l.line,n=l.col}else i=u.line,n=u.column}else if(!r){var f=this.fromOffset(e);e=f.line,r=f.col}var h=this.origin(e,r,i,n);return(o=h?new Sc(t,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,a.plugin):new Sc(t,void 0===i?e:{column:r,line:e},void 0===i?r:{column:n,line:i},this.css,this.file,a.plugin)).input={column:r,endColumn:n,endLine:i,line:e,source:this.css},this.file&&(SB&&(o.input.url=SB(this.file).toString()),o.input.file=this.file),o}},{key:"fromOffset",value:function(t){if(this[Ek])s=this[Ek];else{var e=this.css.split("\n");s=Array(e.length);for(var r=0,n=0,i=e.length;n=a)o=s.length-1;else for(var a,s,u,c=s.length-2;o>1)])c=u-1;else if(t>=s[u+1])o=u+1;else{o=u;break}return{col:t-s[o]+1,line:o+1}}},{key:"mapResolve",value:function(t){return/^\w+:\/\//.test(t)?t:SR(this.map.consumer().sourceRoot||this.map.root||".",t)}},{key:"origin",value:function(t,e,r,n){if(!this.map)return!1;var i,o,a=this.map.consumer(),s=a.originalPositionFor({column:e,line:t});if(!s.source)return!1;"number"==typeof r&&(i=a.originalPositionFor({column:n,line:r})),o=SC(s.source)?SB(s.source):new URL(s.source,this.map.consumer().sourceRoot||SB(this.map.mapFile));var u={column:s.column,endColumn:i&&i.column,endLine:i&&i.line,line:s.line,url:o.toString()};if("file:"===o.protocol){if(SD)u.file=SD(o);else throw Error("file: protocol is not available in this PostCSS build")}var c=a.sourceContentFor(s.source);return c&&(u.source=c),u}},{key:"toJSON",value:function(){for(var t={},e=0,r=["hasBOM","css","file","id"];e1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)try{for(var u,c=i[Symbol.iterator]();!(o=(u=c.next()).done);o=!0)u.value.raws.before=e.raws.before}catch(t){a=!0,s=t}finally{try{o||null==c.return||c.return()}finally{if(a)throw s}}}return i}},{key:"removeChild",value:function(t,e){var n=this.index(t);return!e&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),So(xI(r.prototype),"removeChild",this).call(this,t)}},{key:"toResult",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new eh(new ed,this,t).stringify()}}]),r}(Sa);EN.registerLazyResult=function(t){eh=t},EN.registerProcessor=function(t){ed=t},ET=EN,EN.default=EN,Sa.registerRoot(EN);var E_={},EP={},EC={comma:function(t){return EC.split(t,[","],!0)},space:function(t){return EC.split(t,[" ","\n"," "])},split:function(t,e,r){var n=[],i="",o=!1,a=0,s=!1,u="",c=!1,l=!0,f=!1,h=void 0;try{for(var d,p=t[Symbol.iterator]();!(l=(d=p.next()).done);l=!0){var v=d.value;c?c=!1:"\\"===v?c=!0:s?v===u&&(s=!1):'"'===v||"'"===v?(s=!0,u=v):"("===v?a+=1:")"===v?a>0&&(a-=1):0===a&&e.includes(v)&&(o=!0),o?(""!==i&&n.push(i.trim()),i="",o=!1):i+=v}}catch(t){f=!0,h=t}finally{try{l||null==p.return||p.return()}finally{if(f)throw h}}return(r||""!==i)&&n.push(i.trim()),n}};EP=EC,EC.default=EC;var ER=/*#__PURE__*/function(t){xS(r,t);var e=x_(r);function r(t){var n;return wQ(this,r),(n=e.call(this,t)).type="rule",n.nodes||(n.nodes=[]),n}return w0(r,[{key:"selectors",get:function(){return EP.comma(this.selector)},set:function(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}}]),r}(Sa);function EL(t,e){if(Array.isArray(t))return t.map(function(t){return EL(t)});var r=t.inputs,n=SN(t,["inputs"]);if(r){e=[];var i=!0,o=!1,a=void 0;try{for(var s,u=r[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value,l=xz(xk({},c),{__proto__:S_.prototype});l.map&&(l.map=xz(xk({},l.map),{__proto__:Sj.prototype})),e.push(l)}}catch(t){o=!0,a=t}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}}if(n.nodes&&(n.nodes=t.nodes.map(function(t){return EL(t,e)})),n.source){var f=n.source,h=f.inputId,d=SN(f,["inputId"]);n.source=d,null!=h&&(n.source.input=e[h])}if("root"===n.type)return new ET(n);if("decl"===n.type)return new SS(n);if("rule"===n.type)return new E_(n);if("comment"===n.type)return new Ss(n);if("atrule"===n.type)return new Si(n);throw Error("Unknown node type: "+t.type)}E_=ER,ER.default=ER,Sa.registerRule(ER),ST=EL,EL.default=EL;var EM={};function ED(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r,n,i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o=[],a=!0,s=!1;try{for(i=i.call(t);!(a=(r=i.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,n=t}finally{try{a||null==i.return||i.return()}finally{if(s)throw n}}return o}}(t,e)||Sr(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var eT=(ek("bgUiC"),ek("bgUiC")),EB={},Ej=Sd.dirname,EU=Sd.relative,Eq=Sd.resolve,EF=Sd.sep,Ez=Sd.SourceMapConsumer,EV=Sd.SourceMapGenerator,E$=Sd.pathToFileURL,EH=!!(Ez&&EV),EW=!!(Ej&&Eq&&EU&&EF);EB=/*#__PURE__*/function(){function t(e,r,n,i){wQ(this,t),this.stringify=e,this.mapOpts=n.map||{},this.root=r,this.opts=n,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}return w0(t,[{key:"addAnnotation",value:function(){t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var t,e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}},{key:"applyPrevMaps",value:function(){var t=!0,e=!1,r=void 0;try{for(var n,i=this.previous()[Symbol.iterator]();!(t=(n=i.next()).done);t=!0){var o=n.value,a=this.toUrl(this.path(o.file)),s=o.root||Ej(o.file),u=void 0;!1===this.mapOpts.sourcesContent?(u=new Ez(o.text)).sourcesContent&&(u.sourcesContent=null):u=o.consumer(),this.map.applySourceMap(u,a,this.toUrl(this.path(s)))}}catch(t){e=!0,r=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw r}}}},{key:"clearAnnotation",value:function(){if(!1!==this.mapOpts.annotation){if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}}},{key:"generate",value:function(){if(this.clearAnnotation(),EW&&EH&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,function(e){t+=e}),[t]}},{key:"generateMap",value:function(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=EV.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new EV({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return(this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline())?[this.css]:[this.css,this.map]}},{key:"generateString",value:function(){var t,e,r=this;this.css="",this.map=new EV({file:this.outputFile(),ignoreInvalidMapping:!0});var n=1,i=1,o="",a={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(s,u,c){if(r.css+=s,u&&"end"!==c&&(a.generated.line=n,a.generated.column=i-1,u.source&&u.source.start?(a.source=r.sourcePath(u),a.original.line=u.source.start.line,a.original.column=u.source.start.column-1):(a.source=o,a.original.line=1,a.original.column=0),r.map.addMapping(a)),(e=s.match(/\n/g))?(n+=e.length,t=s.lastIndexOf("\n"),i=s.length-t):i+=s.length,u&&"start"!==c){var l=u.parent||{raws:{}};(!("decl"===u.type||"atrule"===u.type&&!u.nodes)||u!==l.last||l.raws.semicolon)&&(u.source&&u.source.end?(a.source=r.sourcePath(u),a.original.line=u.source.end.line,a.original.column=u.source.end.column-1,a.generated.line=n,a.generated.column=i-2):(a.source=o,a.original.line=1,a.original.column=0,a.generated.line=n,a.generated.column=i-1),r.map.addMapping(a))}})}},{key:"isAnnotation",value:function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(t){return t.annotation}))}},{key:"isInline",value:function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some(function(t){return t.inline}))}},{key:"isMap",value:function(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}},{key:"isSourcesContent",value:function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(t){return t.withContent()})}},{key:"outputFile",value:function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}},{key:"path",value:function(t){if(this.mapOpts.absolute||60===t.charCodeAt(0)||/^\w+:\/\//.test(t))return t;var e=this.memoizedPaths.get(t);if(e)return e;var r=this.opts.to?Ej(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Ej(Eq(r,this.mapOpts.annotation)));var n=EU(r,t);return this.memoizedPaths.set(t,n),n}},{key:"previous",value:function(){var t=this;if(!this.previousMaps){if(this.previousMaps=[],this.root)this.root.walk(function(e){if(e.source&&e.source.input.map){var r=e.source.input.map;t.previousMaps.includes(r)||t.previousMaps.push(r)}});else{var e=new S_(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}}return this.previousMaps}},{key:"setSourcesContent",value:function(){var t=this,e={};if(this.root)this.root.walk(function(r){if(r.source){var n=r.source.input.from;if(n&&!e[n]){e[n]=!0;var i=t.usesFileUrls?t.toFileUrl(n):t.toUrl(t.path(n));t.map.setSourceContent(i,r.source.input.css)}}});else if(this.css){var r=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(r,this.css)}}},{key:"sourcePath",value:function(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}},{key:"toBase64",value:function(t){return SG?SG.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}},{key:"toFileUrl",value:function(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(E$){var r=E$(t).toString();return this.memoizedFileURLs.set(t,r),r}throw Error("`map.absolute` option is not available in this PostCSS build")}},{key:"toUrl",value:function(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===EF&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}}]),t}();var EG={},EY={},EK={},EZ=/[\t\n\f\r "#'()/;[\\\]{}]/g,EJ=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,EQ=/.[\r\n"'(/\\]/,EX=/[\da-f]/i;EK=function(t){var e,r,n,i,o,a,s,u,c,l,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=t.css.valueOf(),d=f.ignoreErrors,p=h.length,v=0,g=[],m=[];function y(e){throw t.error("Unclosed "+e,v)}return{back:function(t){m.push(t)},endOfFile:function(){return 0===m.length&&v>=p},nextToken:function(t){if(m.length)return m.pop();if(!(v>=p)){var f=!!t&&t.ignoreUnclosed;switch(e=h.charCodeAt(v)){case 10:case 32:case 9:case 13:case 12:i=v;do i+=1,e=h.charCodeAt(i);while(32===e||10===e||9===e||13===e||12===e)a=["space",h.slice(v,i)],v=i-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:var b=String.fromCharCode(e);a=[b,b,v];break;case 40:if(l=g.length?g.pop()[1]:"",c=h.charCodeAt(v+1),"url"===l&&39!==c&&34!==c&&32!==c&&10!==c&&9!==c&&12!==c&&13!==c){i=v;do{if(s=!1,-1===(i=h.indexOf(")",i+1))){if(d||f){i=v;break}y("bracket")}for(u=i;92===h.charCodeAt(u-1);)u-=1,s=!s}while(s)a=["brackets",h.slice(v,i+1),v,i],v=i}else i=h.indexOf(")",v+1),r=h.slice(v,i+1),-1===i||EQ.test(r)?a=["(","(",v]:(a=["brackets",r,v,i],v=i);break;case 39:case 34:o=39===e?"'":'"',i=v;do{if(s=!1,-1===(i=h.indexOf(o,i+1))){if(d||f){i=v+1;break}y("string")}for(u=i;92===h.charCodeAt(u-1);)u-=1,s=!s}while(s)a=["string",h.slice(v,i+1),v,i],v=i;break;case 64:EZ.lastIndex=v+1,EZ.test(h),i=0===EZ.lastIndex?h.length-1:EZ.lastIndex-2,a=["at-word",h.slice(v,i+1),v,i],v=i;break;case 92:for(i=v,n=!0;92===h.charCodeAt(i+1);)i+=1,n=!n;if(e=h.charCodeAt(i+1),n&&47!==e&&32!==e&&10!==e&&9!==e&&13!==e&&12!==e&&(i+=1,EX.test(h.charAt(i)))){for(;EX.test(h.charAt(i+1));)i+=1;32===h.charCodeAt(i+1)&&(i+=1)}a=["word",h.slice(v,i+1),v,i],v=i;break;default:47===e&&42===h.charCodeAt(v+1)?(0===(i=h.indexOf("*/",v+2)+1)&&(d||f?i=h.length:y("comment")),a=["comment",h.slice(v,i+1),v,i]):(EJ.lastIndex=v+1,EJ.test(h),i=0===EJ.lastIndex?h.length-1:EJ.lastIndex-2,a=["word",h.slice(v,i+1),v,i],g.push(a)),v=i}return v++,a}},position:function(){return v}}};var E0={empty:!0,space:!0};function E1(t,e){var r=new S_(t,e),n=new EY(r);try{n.parse()}catch(t){throw t}return n.root}EY=/*#__PURE__*/function(){function t(e){wQ(this,t),this.input=e,this.root=new ET,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}return w0(t,[{key:"atrule",value:function(t){var e,r,n,i=new Si;i.name=t[1].slice(1),""===i.name&&this.unnamedAtrule(i,t),this.init(i,t[2]);for(var o=!1,a=!1,s=[],u=[];!this.tokenizer.endOfFile();){if("("===(e=(t=this.tokenizer.nextToken())[0])||"["===e?u.push("("===e?")":"]"):"{"===e&&u.length>0?u.push("}"):e===u[u.length-1]&&u.pop(),0===u.length){if(";"===e){i.source.end=this.getPosition(t[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===e){a=!0;break}if("}"===e){if(s.length>0){for(n=s.length-1,r=s[n];r&&"space"===r[0];)r=s[--n];r&&(i.source.end=this.getPosition(r[3]||r[2]),i.source.end.offset++)}this.end(t);break}s.push(t)}else s.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(i.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(i,"params",s),o&&(t=s[s.length-1],i.source.end=this.getPosition(t[3]||t[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),a&&(i.nodes=[],this.current=i)}},{key:"checkMissedSemicolon",value:function(t){var e,r=this.colon(t);if(!1!==r){for(var n=0,i=r-1;i>=0&&("space"===(e=t[i])[0]||2!==(n+=1));i--);throw this.input.error("Missed semicolon","word"===e[0]?e[3]+1:e[2])}}},{key:"colon",value:function(t){var e=0,r=!0,n=!1,i=void 0;try{for(var o,a,s,u=t.entries()[Symbol.iterator]();!(r=(s=u.next()).done);r=!0){var c=ED(s.value,2),l=c[0],f=c[1];if(a=f[0],"("===a&&(e+=1),")"===a&&(e-=1),0===e&&":"===a){if(o){if("word"===o[0]&&"progid"===o[1])continue;return l}this.doubleColon(f)}o=f}}catch(t){n=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(n)throw i}}return!1}},{key:"comment",value:function(t){var e=new Ss;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;var r=t[1].slice(2,-2);if(/^\s*$/.test(r))e.text="",e.raws.left=r,e.raws.right="";else{var n=r.match(/^(\s*)([^]*\S)(\s*)$/);e.text=n[2],e.raws.left=n[1],e.raws.right=n[3]}}},{key:"createTokenizer",value:function(){this.tokenizer=EK(this.input)}},{key:"decl",value:function(t,e){var r,n,i=new SS;this.init(i,t[0][2]);var o=t[t.length-1];for(";"===o[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(o[3]||o[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],n=r[3]||r[2];if(n)return n}}(t)),i.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){var a=t[0][0];if(":"===a||"space"===a||"comment"===a)break;i.prop+=t.shift()[1]}for(i.raws.between="";t.length;){if(":"===(r=t.shift())[0]){i.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),i.raws.between+=r[1]}("_"===i.prop[0]||"*"===i.prop[0])&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var s=[];t.length&&("space"===(n=t[0][0])||"comment"===n);)s.push(t.shift());this.precheckMissedSemicolon(t);for(var u=t.length-1;u>=0;u--){if("!important"===(r=t[u])[1].toLowerCase()){i.important=!0;var c=this.stringFrom(t,u);" !important"!==(c=this.spacesFromEnd(t)+c)&&(i.raws.important=c);break}if("important"===r[1].toLowerCase()){for(var l=t.slice(0),f="",h=u;h>0;h--){var d=l[h][0];if(f.trim().startsWith("!")&&"space"!==d)break;f=l.pop()[1]+f}f.trim().startsWith("!")&&(i.important=!0,i.raws.important=f,t=l)}if("space"!==r[0]&&"comment"!==r[0])break}t.some(function(t){return"space"!==t[0]&&"comment"!==t[0]})&&(i.raws.between+=s.map(function(t){return t[1]}).join(""),s=[]),this.raw(i,"value",s.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}},{key:"doubleColon",value:function(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}},{key:"emptyRule",value:function(t){var e=new E_;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}},{key:"end",value:function(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}},{key:"endFile",value:function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}},{key:"freeSemicolon",value:function(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}},{key:"getPosition",value:function(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}},{key:"init",value:function(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}},{key:"other",value:function(t){for(var e=!1,r=null,n=!1,i=null,o=[],a=t[1].startsWith("--"),s=[],u=t;u;){if(r=u[0],s.push(u),"("===r||"["===r)i||(i=u),o.push("("===r?")":"]");else if(a&&n&&"{"===r)i||(i=u),o.push("}");else if(0===o.length){if(";"===r){if(n){this.decl(s,a);return}break}if("{"===r){this.rule(s);return}if("}"===r){this.tokenizer.back(s.pop()),e=!0;break}":"===r&&(n=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),o.length>0&&this.unclosedBracket(i),e&&n){if(!a)for(;s.length&&("space"===(u=s[s.length-1][0])||"comment"===u);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}},{key:"parse",value:function(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}},{key:"precheckMissedSemicolon",value:function(){}},{key:"raw",value:function(t,e,r,n){for(var i,o,a,s,u=r.length,c="",l=!0,f=0;f1&&void 0!==arguments[1]?arguments[1]:{};if(wQ(this,t),this.type="warning",this.text=e,r.node&&r.node.source){var n=r.node.rangeBy(r);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var i in r)this[i]=r[i]}return w0(t,[{key:"toString",value:function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}]),t}();E3=E5,E5.default=E5;var E8=/*#__PURE__*/function(){function t(e,r,n){wQ(this,t),this.processor=e,this.messages=[],this.root=r,this.opts=n,this.css=void 0,this.map=void 0}return w0(t,[{key:"toString",value:function(){return this.css}},{key:"warn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!e.plugin&&this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);var r=new E3(t,e);return this.messages.push(r),r}},{key:"warnings",value:function(){return this.messages.filter(function(t){return"warning"===t.type})}},{key:"content",get:function(){return this.css}}]),t}();E2=E8,E8.default=E8;var E6={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},E4={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},E7={Once:!0,postcssPlugin:!0,prepare:!0};function E9(t){return"object"==typeof t&&"function"==typeof t.then}function kt(t){var e=!1,r=E6[t.type];return("decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append)?[r,r+"-"+e,0,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function ke(t){return{eventIndex:0,events:"document"===t.type?["Document",0,"DocumentExit"]:"root"===t.type?["Root",0,"RootExit"]:kt(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function kr(t){return t[et]=!1,t.nodes&&t.nodes.forEach(function(t){return kr(t)}),t}var kn={},ki=/*#__PURE__*/function(){function t(e,r,n){var i,o=this;if(wQ(this,t),this.stringified=!1,this.processed=!1,"object"==typeof r&&null!==r&&("root"===r.type||"document"===r.type))i=kr(r);else if(r instanceof t||r instanceof E2)i=kr(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{var a=EG;n.syntax&&(a=n.syntax.parse),n.parser&&(a=n.parser),a.parse&&(a=a.parse);try{i=a(r,n)}catch(t){this.processed=!0,this.error=t}i&&!i[ee]&&Sa.rebuild(i)}this.result=new E2(e,i,n),this.helpers=xz(xk({},kn),{postcss:kn,result:this.result}),this.plugins=this.processor.plugins.map(function(t){return"object"==typeof t&&t.prepare?xk({},t,t.prepare(o.result)):t})}return w0(t,[{key:"async",value:function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}},{key:"catch",value:function(t){return this.async().catch(t)}},{key:"finally",value:function(t){return this.async().then(t,t)}},{key:"getAsyncError",value:function(){throw Error("Use process(css).then(cb) to work with async plugins")}},{key:"handleError",value:function(t,e){var r=this.result.lastPlugin;try{e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin?r.postcssVersion:(t.plugin=r.postcssPlugin,t.setMessage())}catch(t){console&&console.error&&console.error(t)}return t}},{key:"prepareVisitors",value:function(){var t=this;this.listeners={};var e=function(e,r,n){t.listeners[r]||(t.listeners[r]=[]),t.listeners[r].push([e,n])},r=!0,n=!1,i=void 0;try{for(var o,a=this.plugins[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){var s=o.value;if("object"==typeof s)for(var u in s){if(!E4[u]&&/^[A-Z]/.test(u))throw Error("Unknown event ".concat(u," in ").concat(s.postcssPlugin,". ")+"Try to update PostCSS (".concat(this.processor.version," now)."));if(!E7[u]){if("object"==typeof s[u])for(var c in s[u])e(s,"*"===c?u:u+"-"+c.toLowerCase(),s[u][c]);else"function"==typeof s[u]&&e(s,u,s[u])}}}}catch(t){n=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}this.hasListener=Object.keys(this.listeners).length>0}},{key:"runAsync",value:function(){var t=this;return eI(function(){var e,r,n,i,o,a,s,u,c,l,f,h,d,p,v,g;return(0,eT.__generator)(this,function(m){switch(m.label){case 0:t.plugin=0,e=0,m.label=1;case 1:if(!(e0))return[3,13];if(!E9(s=t.visitTick(a)))return[3,12];m.label=9;case 9:return m.trys.push([9,11,,12]),[4,s];case 10:return m.sent(),[3,12];case 11:throw u=m.sent(),c=a[a.length-1].node,t.handleError(u,c);case 12:return[3,8];case 13:return[3,7];case 14:if(l=!0,f=!1,h=void 0,!t.listeners.OnceExit)return[3,22];m.label=15;case 15:m.trys.push([15,20,21,22]),d=function(){var e,r,n,i;return(0,eT.__generator)(this,function(a){switch(a.label){case 0:r=(e=ED(v.value,2))[0],n=e[1],t.result.lastPlugin=r,a.label=1;case 1:if(a.trys.push([1,6,,7]),"document"!==o.type)return[3,3];return[4,Promise.all(o.nodes.map(function(e){return n(e,t.helpers)}))];case 2:return a.sent(),[3,5];case 3:return[4,n(o,t.helpers)];case 4:a.sent(),a.label=5;case 5:return[3,7];case 6:throw i=a.sent(),t.handleError(i);case 7:return[2]}})},p=t.listeners.OnceExit[Symbol.iterator](),m.label=16;case 16:if(l=(v=p.next()).done)return[3,19];return[5,(0,eT.__values)(d())];case 17:m.sent(),m.label=18;case 18:return l=!0,[3,16];case 19:return[3,22];case 20:return g=m.sent(),f=!0,h=g,[3,22];case 21:try{l||null==p.return||p.return()}finally{if(f)throw h}return[7];case 22:return t.processed=!0,[2,t.stringify()]}})})()}},{key:"runOnRoot",value:function(t){var e=this;this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var r=this.result.root.nodes.map(function(r){return t.Once(r,e.helpers)});if(E9(r[0]))return Promise.all(r);return r}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}},{key:"stringify",value:function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=Sy;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=new EB(e,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}},{key:"sync",value:function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();var t=!0,e=!1,r=void 0;try{for(var n,i=this.plugins[Symbol.iterator]();!(t=(n=i.next()).done);t=!0){var o=n.value,a=this.runOnRoot(o);if(E9(a))throw this.getAsyncError()}}catch(t){e=!0,r=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw r}}if(this.prepareVisitors(),this.hasListener){for(var s=this.result.root;!s[et];)s[et]=!0,this.walkSync(s);if(this.listeners.OnceExit){var u=!0,c=!1,l=void 0;if("document"===s.type)try{for(var f,h=s.nodes[Symbol.iterator]();!(u=(f=h.next()).done);u=!0){var d=f.value;this.visitSync(this.listeners.OnceExit,d)}}catch(t){c=!0,l=t}finally{try{u||null==h.return||h.return()}finally{if(c)throw l}}else this.visitSync(this.listeners.OnceExit,s)}}return this.result}},{key:"then",value:function(t,e){return this.async().then(t,e)}},{key:"toString",value:function(){return this.css}},{key:"visitSync",value:function(t,e){var r=!0,n=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){var s=ED(o.value,2),u=s[0],c=s[1];this.result.lastPlugin=u;var l=void 0;try{l=c(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(E9(l))throw this.getAsyncError()}}catch(t){n=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}}},{key:"visitTick",value:function(t){var e=t[t.length-1],r=e.node,n=e.visitors;if("root"!==r.type&&"document"!==r.type&&!r.parent){t.pop();return}if(n.length>0&&e.visitorIndex0&&void 0!==arguments[0]?arguments[0]:[];wQ(this,t),this.version="8.4.47",this.plugins=this.normalize(e)}return w0(t,[{key:"normalize",value:function(t){var e=[],r=!0,n=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){var s=o.value;if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))e=e.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)e.push(s);else if("function"==typeof s)e.push(s);else if("object"==typeof s&&(s.parse||s.stringify));else throw Error(s+" is not a PostCSS plugin")}}catch(t){n=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}return e}},{key:"process",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.plugins.length||e.parser||e.stringifier||e.syntax?new EM(this,t,e):new ka(this,t,e)}},{key:"use",value:function(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}}]),t}();function kc(){for(var t=arguments.length,e=Array(t),r=0;r]+$/;function km(t,e,r){if(null==t)return"";"number"==typeof t&&(t=t.toString());var n,i,o,a,s,u,c,l,f,h="",d="";function p(t,e){var r=this;this.tag=t,this.attribs=e||{},this.tagPosition=h.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(s.length){var t=s[s.length-1];t.text+=r.text}},this.updateParentNodeMediaChildren=function(){s.length&&kf.includes(this.tag)&&s[s.length-1].mediaChildren.push(this.tag)}}(e=Object.assign({},km.defaults,e)).parser=Object.assign({},ky,e.parser);var v=function(t){return!1===e.allowedTags||(e.allowedTags||[]).indexOf(t)>-1};kh.forEach(function(t){v(t)&&!e.allowVulnerableTags&&console.warn("\n\n⚠️ Your `allowedTags` option includes, `".concat(t,"`, which is inherently\nvulnerable to XSS attacks. Please remove it from `allowedTags`.\nOr, to disable this warning, add the `allowVulnerableTags` option\nand ensure you are accounting for this risk.\n\n"))});var g=e.nonTextTags||["script","style","textarea","option"];e.allowedAttributes&&(n={},i={},kd(e.allowedAttributes,function(t,e){n[e]=[];var r=[];t.forEach(function(t){"string"==typeof t&&t.indexOf("*")>=0?r.push(xQ(t).replace(/\\\*/g,".*")):n[e].push(t)}),r.length&&(i[e]=RegExp("^("+r.join("|")+")$"))}));var m={},y={},b={};kd(e.allowedClasses,function(t,e){if(n&&(kp(n,e)||(n[e]=[]),n[e].push("class")),m[e]=t,Array.isArray(t)){var r=[];m[e]=[],b[e]=[],t.forEach(function(t){"string"==typeof t&&t.indexOf("*")>=0?r.push(xQ(t).replace(/\\\*/g,".*")):t instanceof RegExp?b[e].push(t):m[e].push(t)}),r.length&&(y[e]=RegExp("^("+r.join("|")+")$"))}});var w={};kd(e.transformTags,function(t,e){var r;"function"==typeof t?r=t:"string"==typeof t&&(r=km.simpleTransform(t)),"*"===e?o=r:w[e]=r});var x=!1;E();var S=new xw({onopentag:function(t,r){if(e.enforceHtmlBoundary&&"html"===t&&E(),l){f++;return}var S,T=new p(t,r);s.push(T);var N=!1,_=!!T.text;if(kp(w,t)&&(S=w[t](t,r),T.attribs=r=S.attribs,void 0!==S.text&&(T.innerText=S.text),t!==S.tagName&&(T.name=t=S.tagName,c[a]=S.tagName)),o&&(S=o(t,r),T.attribs=r=S.attribs,t!==S.tagName&&(T.name=t=S.tagName,c[a]=S.tagName)),(!v(t)||"recursiveEscape"===e.disallowedTagsMode&&!function(t){for(var e in t)if(kp(t,e))return!1;return!0}(u)||null!=e.nestingLimit&&a>=e.nestingLimit)&&(N=!0,u[a]=!0,("discard"===e.disallowedTagsMode||"completelyDiscard"===e.disallowedTagsMode)&&-1!==g.indexOf(t)&&(l=!0,f=1),u[a]=!0),a++,N){if("discard"===e.disallowedTagsMode||"completelyDiscard"===e.disallowedTagsMode)return;d=h,h=""}h+="<"+t,"script"===t&&(e.allowedScriptHostnames||e.allowedScriptDomains)&&(T.innerText=""),(!n||kp(n,t)||n["*"])&&kd(r,function(r,o){if(!kg.test(o)||""===r&&!e.allowedEmptyAttributes.includes(o)&&(e.nonBooleanAttributes.includes(o)||e.nonBooleanAttributes.includes("*"))){delete T.attribs[o];return}var a=!1;if(!n||kp(n,t)&&-1!==n[t].indexOf(o)||n["*"]&&-1!==n["*"].indexOf(o)||kp(i,t)&&i[t].test(o)||i["*"]&&i["*"].test(o))a=!0;else if(n&&n[t]){var s=!0,u=!1,c=void 0;try{for(var l,f=n[t][Symbol.iterator]();!(s=(l=f.next()).done);s=!0){var d=l.value;if(x0(d)&&d.name&&d.name===o){a=!0;var p="";if(!0===d.multiple){var v=r.split(" "),g=!0,w=!1,x=void 0;try{for(var S,E=v[Symbol.iterator]();!(g=(S=E.next()).done);g=!0){var N=S.value;-1!==d.values.indexOf(N)&&(""===p?p=N:p+=" "+N)}}catch(t){w=!0,x=t}finally{try{g||null==E.return||E.return()}finally{if(w)throw x}}}else d.values.indexOf(r)>=0&&(p=r);r=p}}}catch(t){u=!0,c=t}finally{try{s||null==f.return||f.return()}finally{if(u)throw c}}}if(a){if(-1!==e.allowedSchemesAppliedToAttributes.indexOf(o)&&A(t,r)){delete T.attribs[o];return}if("script"===t&&"src"===o){var _=!0;try{var P=O(r);if(e.allowedScriptHostnames||e.allowedScriptDomains){var C=(e.allowedScriptHostnames||[]).find(function(t){return t===P.url.hostname}),R=(e.allowedScriptDomains||[]).find(function(t){return P.url.hostname===t||P.url.hostname.endsWith(".".concat(t))});_=C||R}}catch(t){_=!1}if(!_){delete T.attribs[o];return}}if("iframe"===t&&"src"===o){var L=!0;try{var M=O(r);if(M.isRelativeUrl)L=kp(e,"allowIframeRelativeUrls")?e.allowIframeRelativeUrls:!e.allowedIframeHostnames&&!e.allowedIframeDomains;else if(e.allowedIframeHostnames||e.allowedIframeDomains){var D=(e.allowedIframeHostnames||[]).find(function(t){return t===M.url.hostname}),B=(e.allowedIframeDomains||[]).find(function(t){return M.url.hostname===t||M.url.hostname.endsWith(".".concat(t))});L=D||B}}catch(t){L=!1}if(!L){delete T.attribs[o];return}}if("srcset"===o)try{var j=x9(r);if(j.forEach(function(t){A("srcset",t.url)&&(t.evil=!0)}),(j=kv(j,function(t){return!t.evil})).length)r=kv(j,function(t){return!t.evil}).map(function(t){if(!t.url)throw Error("URL missing");return t.url+(t.w?" ".concat(t.w,"w"):"")+(t.h?" ".concat(t.h,"h"):"")+(t.d?" ".concat(t.d,"x"):"")}).join(", "),T.attribs[o]=r;else{delete T.attribs[o];return}}catch(t){delete T.attribs[o];return}if("class"===o){var U=m[t],q=m["*"],F=y[t],z=b[t],V=b["*"],$=[F,y["*"]].concat(z,V).filter(function(t){return t});if(!(r=U&&q?I(r,x1(U,q),$):I(r,U||q,$)).length){delete T.attribs[o];return}}if("style"===o){if(e.parseStyleAttributes)try{var H=kl(t+" {"+r+"}",{map:!1});if(r=(function(t,e){if(!e)return t;var r,n=t.nodes[0];return(r=e[n.selector]&&e["*"]?x1(e[n.selector],e["*"]):e[n.selector]||e["*"])&&(t.nodes[0].nodes=n.nodes.reduce(function(t,e){return kp(r,e.prop)&&r[e.prop].some(function(t){return t.test(e.value)})&&t.push(e),t},[])),t})(H,e.allowedStyles).nodes[0].nodes.reduce(function(t,e){return t.push("".concat(e.prop,":").concat(e.value).concat(e.important?" !important":"")),t},[]).join(";"),0===r.length){delete T.attribs[o];return}}catch(e){"undefined"!=typeof window&&console.warn('Failed to parse "'+t+" {"+r+"}\", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547"),delete T.attribs[o];return}else if(e.allowedStyles)throw Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}h+=" "+o,r&&r.length?h+='="'+k(r,!0)+'"':e.allowedEmptyAttributes.includes(o)&&(h+='=""')}else delete T.attribs[o]}),-1!==e.selfClosing.indexOf(t)?h+=" />":(h+=">",!T.innerText||_||e.textFilter||(h+=k(T.innerText),x=!0)),N&&(h=d+k(h),d="")},ontext:function(t){if(!l){var r,n=s[s.length-1];if(n&&(r=n.tag,t=void 0!==n.innerText?n.innerText:t),"completelyDiscard"!==e.disallowedTagsMode||v(r)){if(("discard"===e.disallowedTagsMode||"completelyDiscard"===e.disallowedTagsMode)&&("script"===r||"style"===r))h+=t;else{var i=k(t,!1);e.textFilter&&!x?h+=e.textFilter(i,r):x||(h+=i)}}else t="";if(s.length){var o=s[s.length-1];o.text+=t}}},onclosetag:function(t,r){if(l){if(--f)return;l=!1}var n=s.pop();if(n){if(n.tag!==t){s.push(n);return}l=!!e.enforceHtmlBoundary&&"html"===t;var i=u[--a];if(i){if(delete u[a],"discard"===e.disallowedTagsMode||"completelyDiscard"===e.disallowedTagsMode){n.updateParentNodeText();return}d=h,h=""}if(c[a]&&(t=c[a],delete c[a]),e.exclusiveFilter&&e.exclusiveFilter(n)){h=h.substr(0,n.tagPosition);return}if(n.updateParentNodeMediaChildren(),n.updateParentNodeText(),-1!==e.selfClosing.indexOf(t)||r&&!v(t)&&["escape","recursiveEscape"].indexOf(e.disallowedTagsMode)>=0){i&&(h=d,d="");return}h+="",i&&(h=d+k(h),d=""),x=!1}}},e.parser);return S.write(t),S.end(),h;function E(){h="",a=0,s=[],u={},c={},l=!1,f=0}function k(t,r){return"string"!=typeof t&&(t+=""),e.parser.decodeEntities&&(t=t.replace(/&/g,"&").replace(//g,">"),r&&(t=t.replace(/"/g,"""))),t=t.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(//g,">"),r&&(t=t.replace(/"/g,""")),t}function A(t,r){for(r=r.replace(/[\x00-\x20]+/g,"");;){var n=r.indexOf("",n+4);if(-1===i)break;r=r.substring(0,n)+r.substring(i+3)}var o=r.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!o)return!!r.match(/^[/\\]{2}/)&&!e.allowProtocolRelative;var a=o[1].toLowerCase();return kp(e.allowedSchemesByTag,t)?-1===e.allowedSchemesByTag[t].indexOf(a):!e.allowedSchemes||-1===e.allowedSchemes.indexOf(a)}function O(t){if((t=t.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//")).startsWith("relative:"))throw Error("relative: exploit attempt");for(var e="relative://relative-site",r=0;r<100;r++)e+="/".concat(r);var n=new URL(t,e);return{isRelativeUrl:n&&"relative-site"===n.hostname&&"relative:"===n.protocol,url:n}}function I(t,e,r){return e?(t=t.split(/\s+/)).filter(function(t){return -1!==e.indexOf(t)||r.some(function(e){return e.test(t)})}).join(" "):t}}var ky={decodeEntities:!0};km.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0},km.simpleTransform=function(t,e,r){return r=void 0===r||r,e=e||{},function(n,i){var o;if(r)for(o in e)i[o]=e[o];else i=e;return{tagName:t,attribs:i}}};var kb={};r="millisecond",n="second",i="minute",o="hour",a="week",s="month",u="quarter",c="year",l="date",f="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p=function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},(g={})[v="en"]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||"th")+"]"}},m="$isDayjsObject",y=function(t){return t instanceof S||!(!t||!t[m])},b=function t(e,r,n){var i;if(!e)return v;if("string"==typeof e){var o=e.toLowerCase();g[o]&&(i=o),r&&(g[o]=r,i=o);var a=e.split("-");if(!i&&a.length>1)return t(a[0])}else{var s=e.name;g[s]=e,i=s}return!n&&i&&(v=i),i||!n&&v},w=function(t,e){if(y(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new S(r)},(x={s:p,z:function(t){var e=-t.utcOffset(),r=Math.abs(e);return(e<=0?"+":"-")+p(Math.floor(r/60),2,"0")+":"+p(r%60,2,"0")},m:function t(e,r){if(e.date()5&&"xml"===n)return kP("InvalidXml","XML declaration allowed only at the start of the document.",kC(t,e));if("?"!=t[e]||">"!=t[e+1])continue;e++;break}return e}function kT(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){var r=1;for(e+=8;e"===t[e]&&0==--r)break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7]){for(e+=8;e"===t[e+2]){e+=2;break}}return e}ep=function(t,e){e=Object.assign({},kA,e);var r=[],n=!1,i=!1;"\uFEFF"===t[0]&&(t=t.substr(1));for(var o=0;o"!==t[o]&&" "!==t[o]&&" "!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)u+=t[o];if("/"===(u=u.trim())[u.length-1]&&(u=u.substring(0,u.length-1),o--),!eg(u))return kP("InvalidTag",0===u.trim().length?"Invalid space after '<'.":"Tag '"+u+"' is an invalid name.",kC(t,o));var c=function(t,e){for(var r="",n="",i=!1;e"===t[e]&&""===n){i=!0;break}r+=t[e]}return""===n&&{value:r,index:e,tagClosed:i}}(t,o);if(!1===c)return kP("InvalidAttr","Attributes for '"+u+"' have open quote.",kC(t,o));var l=c.value;if(o=c.index,"/"===l[l.length-1]){var f=o-l.length,h=k_(l=l.substring(0,l.length-1),e);if(!0!==h)return kP(h.err.code,h.err.msg,kC(t,f+h.err.line));n=!0}else if(s){if(!c.tagClosed)return kP("InvalidTag","Closing tag '"+u+"' doesn't have proper closing.",kC(t,o));if(l.trim().length>0)return kP("InvalidTag","Closing tag '"+u+"' can't have attributes or invalid starting.",kC(t,a));if(0===r.length)return kP("InvalidTag","Closing tag '"+u+"' has not been opened.",kC(t,a));var d=r.pop();if(u!==d.tagName){var p=kC(t,d.tagStartPos);return kP("InvalidTag","Expected closing tag '"+d.tagName+"' (opened in line "+p.line+", col "+p.col+") instead of closing tag '"+u+"'.",kC(t,a))}0==r.length&&(i=!0)}else{var v=k_(l,e);if(!0!==v)return kP(v.err.code,v.err.msg,kC(t,o-l.length+v.err.line));if(!0===i)return kP("InvalidXml","Multiple possible root nodes found.",kC(t,o));-1!==e.unpairedTags.indexOf(u)||r.push({tagName:u,tagStartPos:a}),n=!0}for(o++;o0)||kP("InvalidXml","Invalid '"+JSON.stringify(r.map(function(t){return t.tagName}),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):kP("InvalidXml","Start tag expected.",1)};var kN=RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function k_(t,e){for(var r=em(t,kN),n={},i=0;i0?this.child.push((xE(e={},t.tagname,t.child),xE(e,":@",t[":@"]),e)):this.child.push(xE({},t.tagname,t.child))}}]),t}();var kj={};function kU(t,e){return"!"===t[e+1]&&"-"===t[e+2]&&"-"===t[e+3]}kj=function(t,e){var r={};if("O"===t[e+3]&&"C"===t[e+4]&&"T"===t[e+5]&&"Y"===t[e+6]&&"P"===t[e+7]&&"E"===t[e+8]){e+=9;for(var n,i,o,a,s,u,c,l,f,h=1,d=!1,p=!1;e"===t[e]){if(p?"-"===t[e-1]&&"-"===t[e-2]&&(p=!1,h--):h--,0===h)break}else"["===t[e]?d=!0:t[e]}else{if(d&&"!"===(n=t)[(i=e)+1]&&"E"===n[i+2]&&"N"===n[i+3]&&"T"===n[i+4]&&"I"===n[i+5]&&"T"===n[i+6]&&"Y"===n[i+7])e+=7,entityName=(f=ED(function(t,e){for(var r="";e1&&void 0!==arguments[1]?arguments[1]:{};if(r=Object.assign({},kV,r),!t||"string"!=typeof t)return t;var n=t.trim();if(void 0!==r.skipLike&&r.skipLike.test(n))return t;if(r.hex&&kF.test(n))return Number.parseInt(n,16);var i=kz.exec(n);if(!i)return t;var o=i[1],a=i[2],s=((e=i[3])&&-1!==e.indexOf(".")&&("."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1))),e),u=i[4]||i[6];if(!r.leadingZeros&&a.length>0&&o&&"."!==n[2]||!r.leadingZeros&&a.length>0&&!o&&"."!==n[1])return t;var c=Number(n),l=""+c;return -1!==l.search(/[eE]/)||u?r.eNotation?c:t:-1!==n.indexOf(".")?"0"===l&&""===s?c:l===s?c:o&&l==="-"+s?c:t:a?s===l?c:o+s===l?c:t:n===l?c:n===o+l?c:t};var k$={};function kH(t){for(var e=Object.keys(t),r=0;r0)){a||(t=this.replaceEntitiesValue(t));var s=this.options.tagValueProcessor(e,t,r,i,o);return null==s?t:(void 0===s?"undefined":(0,e_._)(s))!==(void 0===t?"undefined":(0,e_._)(t))||s!==t?s:this.options.trimValues?k5(t,this.options.parseTagValue,this.options.numberParseOptions):t.trim()===t?k5(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function kG(t){if(this.options.removeNSPrefix){var e=t.split(":"),r="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=r+e[1])}return t}k$=function(t){return"function"==typeof t?t:Array.isArray(t)?function(e){var r=!0,n=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){var s=o.value;if("string"==typeof s&&e===s||s instanceof RegExp&&s.test(e))return!0}}catch(t){n=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}}:function(){return!1}};var kY=RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function kK(t,e,r){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){for(var n=em(t,kY),i=n.length,o={},a=0;a",o,"Closing Tag is not closed."),s=t.substring(o+2,a).trim();if(this.options.removeNSPrefix){var u=s.indexOf(":");-1!==u&&(s=s.substr(u+1))}this.options.transformTagName&&(s=this.options.transformTagName(s)),r&&(n=this.saveTextToParentTag(n,r,i));var c=i.substring(i.lastIndexOf(".")+1);if(s&&-1!==this.options.unpairedTags.indexOf(s))throw Error("Unpaired tag can not be used as closing tag: "));var l=0;c&&-1!==this.options.unpairedTags.indexOf(c)?(l=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=i.lastIndexOf("."),i=i.substring(0,l),r=this.tagsNodeStack.pop(),n="",o=a}else if("?"===t[o+1]){var f=k2(t,o,!1,"?>");if(!f)throw Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,i),this.options.ignoreDeclaration&&"?xml"===f.tagName||this.options.ignorePiTags);else{var h=new kB(f.tagName);h.add(this.options.textNodeName,""),f.tagName!==f.tagExp&&f.attrExpPresent&&(h[":@"]=this.buildAttributesMap(f.tagExp,i,f.tagName)),this.addChild(r,h,i)}o=f.closeIndex+1}else if("!--"===t.substr(o+1,3)){var d=k1(t,"-->",o+4,"Comment is not closed.");if(this.options.commentPropName){var p=t.substring(o+4,d-2);n=this.saveTextToParentTag(n,r,i),r.add(this.options.commentPropName,[xE({},this.options.textNodeName,p)])}o=d}else if("!D"===t.substr(o+1,2)){var v=kj(t,o);this.docTypeEntities=v.entities,o=v.i}else if("!["===t.substr(o+1,2)){var g=k1(t,"]]>",o,"CDATA is not closed.")-2,m=t.substring(o+9,g);n=this.saveTextToParentTag(n,r,i);var y=this.parseTextData(m,r.tagname,i,!0,!1,!0,!0);void 0==y&&(y=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[xE({},this.options.textNodeName,m)]):r.add(this.options.textNodeName,y),o=g+2}else{var b=k2(t,o,this.options.removeNSPrefix),w=b.tagName,x=b.rawTagName,S=b.tagExp,E=b.attrExpPresent,k=b.closeIndex;this.options.transformTagName&&(w=this.options.transformTagName(w)),r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,i,!1));var A=r;if(A&&-1!==this.options.unpairedTags.indexOf(A.tagname)&&(r=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),w!==e.tagname&&(i+=i?"."+w:w),this.isItStopNode(this.options.stopNodes,i,w)){var O="";if(S.length>0&&S.lastIndexOf("/")===S.length-1)"/"===w[w.length-1]?(w=w.substr(0,w.length-1),i=i.substr(0,i.length-1),S=w):S=S.substr(0,S.length-1),o=b.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(w))o=b.closeIndex;else{var I=this.readStopNodeData(t,x,k+1);if(!I)throw Error("Unexpected end of ".concat(x));o=I.i,O=I.tagContent}var T=new kB(w);w!==S&&E&&(T[":@"]=this.buildAttributesMap(S,i,w)),O&&(O=this.parseTextData(O,w,i,!0,E,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),T.add(this.options.textNodeName,O),this.addChild(r,T,i)}else{if(S.length>0&&S.lastIndexOf("/")===S.length-1){"/"===w[w.length-1]?(w=w.substr(0,w.length-1),i=i.substr(0,i.length-1),S=w):S=S.substr(0,S.length-1),this.options.transformTagName&&(w=this.options.transformTagName(w));var N=new kB(w);w!==S&&E&&(N[":@"]=this.buildAttributesMap(S,i,w)),this.addChild(r,N,i),i=i.substr(0,i.lastIndexOf("."))}else{var _=new kB(w);this.tagsNodeStack.push(r),w!==S&&E&&(_[":@"]=this.buildAttributesMap(S,i,w)),this.addChild(r,_,i),r=_}n="",o=k}}}else n+=t[o];return e.child};function kJ(t,e,r){var n=this.options.updateTag(e.tagname,r,e[":@"]);!1===n||("string"==typeof n&&(e.tagname=n),t.addChild(e))}var kQ=function(t){if(this.options.processEntities){for(var e in this.docTypeEntities){var r=this.docTypeEntities[e];t=t.replace(r.regx,r.val)}for(var n in this.lastEntities){var i=this.lastEntities[n];t=t.replace(i.regex,i.val)}if(this.options.htmlEntities)for(var o in this.htmlEntities){var a=this.htmlEntities[o];t=t.replace(a.regex,a.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function kX(t,e,r,n){return t&&(void 0===n&&(n=0===Object.keys(e.child).length),void 0!==(t=this.parseTextData(t,e.tagname,r,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,n))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function k0(t,e,r){var n="*."+r;for(var i in t){var o=t[i];if(n===o||e===o)return!0}return!1}function k1(t,e,r,n){var i=t.indexOf(e,r);if(-1!==i)return i+e.length-1;throw Error(n)}function k2(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:">",i=function(t,e){for(var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:">",i="",o=e;o",r,"".concat(e," is not closed"));if(t.substring(r+2,o).trim()===e&&0==--i)return{tagContent:t.substring(n,r),i:o};r=o}else if("?"===t[r+1])r=k1(t,"?>",r+1,"StopNode is not closed.");else if("!--"===t.substr(r+1,3))r=k1(t,"-->",r+3,"StopNode is not closed.");else if("!["===t.substr(r+1,2))r=k1(t,"]]>",r,"StopNode is not closed.")-2;else{var a=k2(t,r,">");a&&((a&&a.tagName)===e&&"/"!==a.tagExp[a.tagExp.length-1]&&i++,r=a.closeIndex)}}}function k5(t,e,r){if(e&&"string"==typeof t){var n=t.trim();return"true"===n||"false"!==n&&kq(t,r)}return ev(t)?t:""}kD=function t(e){wQ(this,t),this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:function(t,e){return String.fromCharCode(Number.parseInt(e,10))}},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:function(t,e){return String.fromCharCode(Number.parseInt(e,16))}}},this.addExternalEntities=kH,this.parseXml=kZ,this.parseTextData=kW,this.resolveNameSpace=kG,this.buildAttributesMap=kK,this.isItStopNode=k0,this.replaceEntitiesValue=kQ,this.readStopNodeData=k3,this.saveTextToParentTag=kX,this.addChild=kJ,this.ignoreAttributesFn=k$(this.options.ignoreAttributes)},eb=function(t,e){return function t(e,r,n){for(var i,o={},a=0;a0&&(o[r.textNodeName]=i):void 0!==i&&(o[r.textNodeName]=i),o}(t,e)},kL=/*#__PURE__*/function(){function t(e){wQ(this,t),this.externalEntities={},this.options=ey(e)}return w0(t,[{key:"parse",value:function(t,e){if("string"==typeof t);else if(t.toString)t=t.toString();else throw Error("XML data is accepted in String or Bytes[] form.");if(e){!0===e&&(e={});var r=ep(t,e);if(!0!==r)throw Error("".concat(r.err.msg,":").concat(r.err.line,":").concat(r.err.col))}var n=new kD(this.options);n.addExternalEntities(this.externalEntities);var i=n.parseXml(t);return this.options.preserveOrder||void 0===i?i:eb(i,this.options)}},{key:"addEntity",value:function(t,e){if(-1!==e.indexOf("&"))throw Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");if("&"===e)throw Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}}]),t}();var k8={};function k6(t,e){var r="";if(t&&!e.ignoreAttributes){for(var n in t)if(t.hasOwnProperty(n)){var i=e.attributeValueProcessor(n,t[n]);!0===(i=k4(i,e))&&e.suppressBooleanAttributes?r+=" ".concat(n.substr(e.attributeNamePrefix.length)):r+=" ".concat(n.substr(e.attributeNamePrefix.length),'="').concat(i,'"')}}return r}function k4(t,e){if(t&&t.length>0&&e.processEntities)for(var r=0;r0&&(r="\n"),function t(e,r,n,i){for(var o="",a=!1,s=0;s"),a=!1;continue}if(c===r.commentPropName){o+=i+""),a=!0;continue}if("?"===c[0]){var h=k6(u[":@"],r),d="?xml"===c?"":i,p=u[c][0][r.textNodeName];p=0!==p.length?" "+p:"",o+=d+"<".concat(c).concat(p).concat(h,"?>"),a=!0;continue}var v=i;""!==v&&(v+=r.indentBy);var g=k6(u[":@"],r),m=i+"<".concat(c).concat(g),y=t(u[c],r,l,v);-1!==r.unpairedTags.indexOf(c)?r.suppressUnpairedNode?o+=m+">":o+=m+"/>":(!y||0===y.length)&&r.suppressEmptyNode?o+=m+"/>":y&&y.endsWith(">")?o+=m+">".concat(y).concat(i,""):(o+=m+">",y&&""!==i&&(y.includes("/>")||y.includes("")),a=!0}}return o}(t,e,"",r)};var k7={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:RegExp("&","g"),val:"&"},{regex:RegExp(">","g"),val:">"},{regex:RegExp("<","g"),val:"<"},{regex:RegExp("'","g"),val:"'"},{regex:RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function k9(t){this.options=Object.assign({},k7,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=k$(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Ar),this.processTextOrObjNode=At,this.options.format?(this.indentate=Ae,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function At(t,e,r,n){var i=this.j2x(t,r+1,n.concat(e));return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,i.attrStr,r):this.buildObjectNode(i.val,e,i.attrStr,r)}function Ae(t){return this.options.indentBy.repeat(t)}function Ar(t){return!!t.startsWith(this.options.attributeNamePrefix)&&t!==this.options.textNodeName&&t.substr(this.attrPrefixLen)}k9.prototype.build=function(t){return this.options.preserveOrder?k8(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t=xE({},this.options.arrayNodeName,t)),this.j2x(t,0,[]).val)},k9.prototype.j2x=function(t,e,r){var n="",i="",o=r.join(".");for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){if(void 0===t[a])this.isAttribute(a)&&(i+="");else if(null===t[a])this.isAttribute(a)?i+="":"?"===a[0]?i+=this.indentate(e)+"<"+a+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+a+"/"+this.tagEndChar;else if(t[a]instanceof Date)i+=this.buildTextValNode(t[a],a,"",e);else if("object"!=typeof t[a]){var s=this.isAttribute(a);if(s&&!this.ignoreAttributesFn(s,o))n+=this.buildAttrPairStr(s,""+t[a]);else if(!s){if(a===this.options.textNodeName){var u=this.options.tagValueProcessor(a,""+t[a]);i+=this.replaceEntitiesValue(u)}else i+=this.buildTextValNode(t[a],a,"",e)}}else if(Array.isArray(t[a])){for(var c=t[a].length,l="",f="",h=0;h"+t+i:!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===o.length?this.indentate(n)+"")+this.newLine:this.indentate(n)+"<"+e+r+o+this.tagEndChar+t+this.indentate(n)+i},k9.prototype.closeTag=function(t){var e="";return -1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":">")+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(n)+"")+this.newLine;if("?"===e[0])return this.indentate(n)+"<"+e+r+"?"+this.tagEndChar;var i=this.options.tagValueProcessor(e,t);return""===(i=this.replaceEntitiesValue(i))?this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+r+">"+i+"0&&this.options.processEntities)for(var e=0;eMath.abs(o)?Math.abs(i)>l&&d0?"swiped-left":"swiped-right"):Math.abs(o)>l&&d0?"swiped-up":"swiped-down"),""!==p){var g={dir:p.replace(/swiped-/,""),touchType:(v[0]||{}).touchType||"direct",fingers:u,xStart:parseInt(r,10),xEnd:parseInt((v[0]||{}).clientX||-1,10),yStart:parseInt(n,10),yEnd:parseInt((v[0]||{}).clientY||-1,10)};s.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:g})),s.dispatchEvent(new CustomEvent(p,{bubbles:!0,cancelable:!0,detail:g}))}r=null,n=null,a=null}},!1);var r=null,n=null,i=null,o=null,a=null,s=null,u=0;function c(t,r,n){for(;t&&t!==e.documentElement;){var i=t.getAttribute(r);if(i)return i;t=t.parentNode}return n}}(window,document);var e_=ek("2L7Ke"),Ao=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,r,n,o){var a,s,u=Object.create((r&&r.prototype instanceof g?r:g).prototype);return i(u,"_invoke",{value:(a=new I(o||[]),s=h,function(r,i){if(s===d)throw Error("Generator is already running");if(s===p){if("throw"===r)throw i;return{value:e,done:!0}}for(a.method=r,a.arg=i;;){var o=a.delegate;if(o){var u=function t(r,n){var i=n.method,o=r.iterator[i];if(o===e)return n.delegate=null,"throw"===i&&r.iterator.return&&(n.method="return",n.arg=e,t(r,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=TypeError("The iterator does not provide a '"+i+"' method")),v;var a=f(o,r.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var s=a.arg;return s?s.done?(n[r.resultName]=s.value,n.next=r.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):s:(n.method="throw",n.arg=TypeError("iterator result is not an object"),n.delegate=null,v)}(o,a);if(u){if(u===v)continue;return u}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(s===h)throw s=p,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s=d;var c=f(t,n,a);if("normal"===c.type){if(s=a.done?p:"suspendedYield",c.arg===v)continue;return{value:c.arg,done:a.done}}"throw"===c.type&&(s=p,a.method="throw",a.arg=c.arg)}})}),u}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var h="suspendedStart",d="executing",p="completed",v={};function g(){}function m(){}function y(){}var b={};c(b,a,function(){return this});var w=Object.getPrototypeOf,x=w&&w(w(T([])));x&&x!==r&&n.call(x,a)&&(b=x);var S=y.prototype=g.prototype=Object.create(b);function E(t){["next","throw","return"].forEach(function(e){c(t,e,function(t){return this._invoke(e,t)})})}function k(t,e){var r;i(this,"_invoke",{value:function(i,o){function a(){return new e(function(r,a){!function r(i,o,a,s){var u=f(t[i],t,o);if("throw"===u.type)s(u.arg);else{var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then(function(t){r("next",t,a,s)},function(t){r("throw",t,a,s)}):e.resolve(l).then(function(t){c.value=t,a(c)},function(t){return r("throw",t,a,s)})}}(i,o,r,a)})}return r=r?r.then(a,a):a()}})}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function T(t){if(null!=t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;O(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}({});try{regeneratorRuntime=Ao}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=Ao:Function("r","regeneratorRuntime = r")(Ao)}/*@__PURE__*/e(kb).extend(/*@__PURE__*/e(kw));var Aa=new BroadcastChannel("sw-messages"),As=new/*@__PURE__*/(e(kx)).XMLParser({ignoreAttributes:!1,parseAttributeValue:!0}),Au={};Au=ek("MMwCY").getBundleURL("5Waqz")+"sw.js";try{navigator.serviceWorker.register(Au).then(function(t){console.log("Service Worker registered successfully."),t.waiting&&(console.log("A waiting Service Worker is already in place."),t.update()),"b2g"in navigator&&(t.systemMessageManager?t.systemMessageManager.subscribe("activity").then(function(){console.log("Subscribed to general activity.")},function(t){alert("Error subscribing to activity:",t)}):alert("systemMessageManager is not available."))}).catch(function(t){alert("Service Worker registration failed:",t)})}catch(t){alert("Error during Service Worker setup:",t)}var Ac={visibility:!0,deviceOnline:!0,notKaiOS:!0,os:(ta=navigator.userAgent||navigator.vendor||window.opera,/iPad|iPhone|iPod/.test(ta)&&!window.MSStream?"iOS":!!/android/i.test(ta)&&"Android"),debug:!1,local_opml:[]},Al=navigator.userAgent||"";Al&&Al.includes("KAIOS")&&(Ac.notKaiOS=!1);var Af="",Ah={opml_url:"https://rss.strukturart.com/rss.opml",opml_local:"",proxy_url:"https://corsproxy.io/?",cache_time:1e3},Ad=[],Ap={},Av=[],Ag=[];/*@__PURE__*/e(wV).getItem("read_articles").then(function(t){if(null===t)return Ag=[],/*@__PURE__*/e(wV).setItem("read_articles",Ag).then(function(){});Ag=t}).catch(function(t){console.error("Error accessing localForage:",t)});var Am=function(){Aw=[],/*@__PURE__*/e(wV).setItem("last_channel_filter",AL).then(function(){wB("load data",3e3),AP()}),setTimeout(function(){},3e3)};function Ay(t){var r=[];Aw.map(function(t,e){r.push(t.id)}),(Ag=Ag.filter(function(e){return r.includes(t)})).push(t),/*@__PURE__*/e(wV).setItem("read_articles",Ag).then(function(){}).catch(function(t){console.error("Error updating localForage:",t)})}var Ab=new DOMParser;Ac.notKaiOS||["http://127.0.0.1/api/v1/shared/core.js","http://127.0.0.1/api/v1/shared/session.js","http://127.0.0.1/api/v1/apps/service.js","http://127.0.0.1/api/v1/audiovolumemanager/service.js","./assets/js/kaiads.v5.min.js"].forEach(function(t){var e=document.createElement("script");e.type="text/javascript",e.src=t,document.head.appendChild(e)});var Aw=[];Ac.debug&&(window.onerror=function(t,e,r){return alert("Error message: "+t+"\nURL: "+e+"\nLine Number: "+r),!0});var Ax=function(){/*@__PURE__*/e(wV).getItem("settings").then(function(t){Ap=t;var r=new URLSearchParams(window.location.href.split("?")[1]).get("code");if(r){var n=r.split("#")[0];if(r){/*@__PURE__*/e(wV).setItem("mastodon_code",n);var i=new Headers;i.append("Content-Type","application/x-www-form-urlencoded");var o=new URLSearchParams;o.append("code",n),o.append("scope","read"),o.append("grant_type","authorization_code"),o.append("redirect_uri","https://feedolin.strukturart.com"),o.append("client_id","HqIUbDiOkeIoDPoOJNLQOgVyPi1ZOkPMW29UVkhl3i8"),o.append("client_secret","R_9DvQ5V84yZQg3BEdDHjz5uGQGUN4qrPx9YgmrJ81Q"),fetch(Ap.mastodon_server_url+"/oauth/token",{method:"POST",headers:i,body:o,redirect:"follow"}).then(function(t){return t.json()}).then(function(t){Ap.mastodon_token=t.access_token,/*@__PURE__*/e(wV).setItem("settings",Ap),/*@__PURE__*/e(w$).route.set("/start?index=0"),wB("Successfully connected",1e4)}).catch(function(t){console.error("Error:",t),wB("Connection failed")})}}})};function AS(t){for(var e=0,r=0;r=200&&n.status<300?AI(n.responseText):console.log("HTTP error! Status: ".concat(n.status))},n.onerror=function(t){/*@__PURE__*/e(w$).route.set("/start"),wB("Error fetching the OPML file"+t,4e3)},n.send()},AI=(tu=eI(function(t){var r,n;return(0,eT.__generator)(this,function(i){switch(i.label){case 0:if(!t)return[3,7];if((n=AT(t)).error)return wB(n.error,3e3),[2,!1];if(!((r=n.downloadList).length>0))return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,AN(r)];case 2:return i.sent(),Ap.last_update=new Date,/*@__PURE__*/e(wV).setItem("settings",Ap),[3,4];case 3:return alert(i.sent()),[3,4];case 4:return[3,6];case 5:alert("Generated download list is empty."),i.label=6;case 6:return[3,8];case 7:console.error("No OPML content found."),i.label=8;case 8:return[2]}})}),function(t){return tu.apply(this,arguments)}),AT=function(t){var e=Ab.parseFromString(t,"text/xml");if(!e||e.getElementsByTagName("parsererror").length>0)return console.error("Invalid OPML data."),{error:"Invalid OPML data",downloadList:[]};var r=e.querySelector("body");if(!r)return console.error("No 'body' element found in the OPML data."),{error:"No 'body' element found",downloadList:[]};var n=0,i=r.querySelectorAll("outline"),o=[];return i.forEach(function(t){t.querySelectorAll("outline").forEach(function(e){var r=e.getAttribute("xmlUrl");r&&o.push({error:"",title:e.getAttribute("title")||"Untitled",url:r,index:n++,channel:t.getAttribute("text")||"Unknown",type:e.getAttribute("type")||"rss",maxEpisodes:e.getAttribute("maxEpisodes")||5})})}),{error:"",downloadList:o}},AN=(tc=eI(function(t){var r,n,i,o,a;return(0,eT.__generator)(this,function(s){return r=0,n=t.length,i=!1,o=function(){AL=localStorage.getItem("last_channel_filter"),r===n&&(/*@__PURE__*/e(w$).route.set("/start"),console.log("All feeds are loaded"),/*@__PURE__*/e(wV).setItem("articles",Aw).then(function(){Aw.sort(function(t,e){return new Date(e.isoDate)-new Date(t.isoDate)}),Aw.forEach(function(t){-1===Av.indexOf(t.channel)&&t.channel&&Av.push(t.channel)}),Av.length>0&&!i&&(AL=localStorage.getItem("last_channel_filter")||Av[0],i=!0),/*@__PURE__*/e(w$).route.set("/start")}).catch(function(t){console.error("Feeds cached",t)}))},a=[],t.forEach(function(t){if("mastodon"===t.type)fetch(t.url).then(function(t){return t.json()}).then(function(e){e.forEach(function(e,r){if(!(r>5)){var n={channel:t.channel,id:e.id,type:"mastodon",pubDate:e.created_at,isoDate:e.created_at,title:e.account.display_name||e.account.username,content:e.content,url:e.uri,reblog:!1};e.media_attachments.length>0&&("image"===e.media_attachments[0].type?n.content+="
"):"video"===e.media_attachments[0].type?n.enclosure={"@_type":"video",url:e.media_attachments[0].url}:"audio"===e.media_attachments[0].type&&(n.enclosure={"@_type":"audio",url:e.media_attachments[0].url})),""==e.content&&(n.content=e.reblog.content,n.reblog=!0,n.reblogUser=e.account.display_name||e.reblog.account.acct,e.reblog.media_attachments.length>0&&("image"===e.reblog.media_attachments[0].type?n.content+="
"):"video"===e.reblog.media_attachments[0].type?n.enclosure={"@_type":"video",url:e.reblog.media_attachments[0].url}:"audio"===e.reblog.media_attachments[0].type&&(n.enclosure={"@_type":"audio",url:e.reblog.media_attachments[0].url}))),Aw.push(n)}})}).catch(function(e){t.error=e}).finally(function(){r++,o()});else{var n=new XMLHttpRequest({mozSystem:!0});n.timeout=5e3;var i=t.url;Ac.notKaiOS?n.open("GET","https://corsproxy.io/?"+i,!0):n.open("GET",i,!0),n.ontimeout=function(){console.error("Request timed out"),r++,o()},n.onload=function(){if(200!==n.status){t.error=n.status,r++,o();return}var i=n.response;if(!i){t.error=n.status,r++,o();return}try{var s=As.parse(i);s.feed&&s.feed.entry.forEach(function(r,n){if(n15)){var r={channel:"Mastodon",id:t.id,type:"mastodon",pubDate:t.created_at,isoDate:t.created_at,title:t.account.display_name,content:t.content,url:t.uri,reblog:!1};t.media_attachments.length>0&&("image"===t.media_attachments[0].type?r.content+="
"):"video"===t.media_attachments[0].type?r.enclosure={"@_type":"video",url:t.media_attachments[0].url}:"audio"===t.media_attachments[0].type&&(r.enclosure={"@_type":"audio",url:t.media_attachments[0].url}));try{""==t.content&&(r.content=t.reblog.content,r.reblog=!0,r.reblogUser=t.reblog.account.display_name||t.reblog.account.acct,t.reblog.media_attachments.length>0&&("image"===t.reblog.media_attachments[0].type?r.content+="
"):"video"===t.reblog.media_attachments[0].type?r.enclosure={"@_type":"video",url:t.reblog.media_attachments[0].url}:"audio"===t.reblog.media_attachments[0].type&&(r.enclosure={"@_type":"audio",url:t.reblog.media_attachments[0].url})))}catch(t){console.log(t)}Aw.push(r)}}),Av.push("Mastodon"),wB("Logged in as "+Ac.mastodon_logged,4e3),/*@__PURE__*/e(wV).setItem("articles",Aw).then(function(){console.log("cached")})}),[2]})}),function(){return tl.apply(this,arguments)}),AP=function(){AO(Ap.opml_url),Ap.opml_local&&AI(Ap.opml_local),Ap.mastodon_token&&wz(Ap.mastodon_server_url,Ap.mastodon_token).then(function(t){Ac.mastodon_logged=t.display_name,A_()}).catch(function(t){}),AL=localStorage.getItem("last_channel_filter")};/*@__PURE__*/e(wV).getItem("settings").then(function(t){null==t&&(Ap=Ah,/*@__PURE__*/e(wV).setItem("settings",Ap).then(function(t){}).catch(function(t){console.log(t)})),(Ap=t).cache_time=Ap.cache_time||1e3,Ap.last_update?Ac.last_update_duration=new Date/1e3-Ap.last_update/1e3:Ac.last_update_duration=3600,Ap.opml_url||Ap.opml_local_filename||(wB("The feed could not be loaded because no OPML was defined in the settings.",6e3),Ap=Ah,/*@__PURE__*/e(wV).setItem("settings",Ap).then(function(t){}).catch(function(t){})),AE().then(function(t){t&&Ac.last_update_duration>Ap.cache_time?(AP(),wB("Load feeds",4e3)):/*@__PURE__*/e(wV).getItem("articles").then(function(t){(Aw=t).sort(function(t,e){return new Date(e.isoDate)-new Date(t.isoDate)}),Aw.forEach(function(t){-1===Av.indexOf(t.channel)&&t.channel&&Av.push(t.channel)}),Av.length&&(AL=localStorage.getItem("last_channel_filter")||Av[0]),/*@__PURE__*/e(w$).route.set("/start?index=0"),document.querySelector("body").classList.add("cache"),wB("Cached feeds loaded",4e3),Ap.mastodon_token&&wz(Ap.mastodon_server_url,Ap.mastodon_token).then(function(t){Ac.mastodon_logged=t.display_name}).catch(function(t){})}).catch(function(t){})})}).catch(function(t){wB("The default settings was loaded",3e3),AO((Ap=Ah).opml_url),/*@__PURE__*/e(wV).setItem("settings",Ap).then(function(t){}).catch(function(t){console.log(t)})});var AC=document.getElementById("app"),AR=-1,AL=localStorage.getItem("last_channel_filter")||"",AM=0,AD=function(t){return /*@__PURE__*/e(kb).duration(t,"seconds").format("mm:ss")},AB={videoElement:null,videoDuration:0,currentTime:0,isPlaying:!1,seekAmount:5,oncreate:function(t){var r=t.attrs;Ac.notKaiOS&&wq("","",""),AB.videoElement=document.createElement("video"),document.getElementById("video-container").appendChild(AB.videoElement);var n=r.url;n&&(AB.videoElement.src=n,AB.videoElement.play(),AB.isPlaying=!0),AB.videoElement.onloadedmetadata=function(){AB.videoDuration=AB.videoElement.duration,/*@__PURE__*/e(w$).redraw()},AB.videoElement.ontimeupdate=function(){AB.currentTime=AB.videoElement.currentTime,/*@__PURE__*/e(w$).redraw()},document.addEventListener("keydown",AB.handleKeydown)},onremove:function(){document.removeEventListener("keydown",AB.handleKeydown)},handleKeydown:function(t){"Enter"===t.key?AB.togglePlayPause():"ArrowLeft"===t.key?AB.seek("left"):"ArrowRight"===t.key&&AB.seek("right")},togglePlayPause:function(){AB.isPlaying?AB.videoElement.pause():AB.videoElement.play(),AB.isPlaying=!AB.isPlaying},seek:function(t){var e=AB.videoElement.currentTime;"left"===t?AB.videoElement.currentTime=Math.max(0,e-AB.seekAmount):"right"===t&&(AB.videoElement.currentTime=Math.min(AB.videoDuration,e+AB.seekAmount))},view:function(t){t.attrs;var r=AB.videoDuration>0?AB.currentTime/AB.videoDuration*100:0;return /*@__PURE__*/e(w$)("div",{class:"video-player"},[/*@__PURE__*/e(w$)("div",{id:"video-container",class:"video-container"}),/*@__PURE__*/e(w$)("div",{class:"video-info"},[" ".concat(AD(AB.currentTime)," / ").concat(AD(AB.videoDuration))]),/*@__PURE__*/e(w$)("div",{class:"progress-bar-container"},[/*@__PURE__*/e(w$)("div",{class:"progress-bar",style:{width:"".concat(r,"%")}})])])}},Aj={player:null,oncreate:function(t){var e=t.attrs;Ac.notKaiOS&&wq("","",""),wU("","",""),YT?Aj.player=new YT.Player("video-container",{videoId:e.videoId,events:{onReady:Aj.onPlayerReady}}):alert("YouTube player not loaded"),document.addEventListener("keydown",Aj.handleKeydown)},onPlayerReady:function(t){t.target.playVideo()},handleKeydown:function(t){"Enter"===t.key?Aj.togglePlayPause():"ArrowLeft"===t.key?Aj.seek("left"):"ArrowRight"===t.key&&Aj.seek("right")},togglePlayPause:function(){1===Aj.player.getPlayerState()?Aj.player.pauseVideo():Aj.player.playVideo()},seek:function(t){var e=Aj.player.getCurrentTime();"left"===t?Aj.player.seekTo(Math.max(0,e-5),!0):"right"===t&&Aj.player.seekTo(e+5,!0)},view:function(){return /*@__PURE__*/e(w$)("div",{class:"youtube-player"},[/*@__PURE__*/e(w$)("div",{id:"video-container",class:"video-container"})])}},AU=document.createElement("audio");if(AU.preload="auto",AU.src="","b2g"in navigator)try{AU.mozAudioChannelType="content",navigator.b2g.AudioChannelManager&&(navigator.b2g.AudioChannelManager.volumeControlChannel="content")}catch(t){console.log(t)}var Aq=[];try{/*@__PURE__*/e(wV).getItem("hasPlayedAudio").then(function(t){Aq=t||[]})}catch(t){console.error("Failed to load hasPlayedAudio:",t)}var AF=(tf=eI(function(t,r,n){var i;return(0,eT.__generator)(this,function(o){return -1!==(i=Aq.findIndex(function(e){return e.url===t}))?Aq[i].time=r:Aq.push({url:t,time:r,id:n}),Az(),/*@__PURE__*/e(wV).setItem("hasPlayedAudio",Aq).then(function(){}),[2]})}),function(t,e,r){return tf.apply(this,arguments)}),Az=function(){Aq=Aq.filter(function(t){return Ad.includes(t.id)})},AV=0,A$=0,AH=0,AW=0,AG=!1,AY=null,AK={audioDuration:0,currentTime:0,isPlaying:!1,seekAmount:5,oninit:function(t){var r=t.attrs;if(r.url&&AU.src!==r.url)try{AU.src=r.url,AU.play().catch(function(t){alert(t)}),AK.isPlaying=!0,Aq.map(function(t){t.url===AU.src&&!0==confirm("continue playing ?")&&(AU.currentTime=t.time)})}catch(t){AU.src=r.url}AU.onloadedmetadata=function(){AK.audioDuration=AU.duration,/*@__PURE__*/e(w$).redraw()},AU.ontimeupdate=function(){AK.currentTime=AU.currentTime,AF(AU.src,AU.currentTime,r.id),Ac.player=!0,/*@__PURE__*/e(w$).redraw()},AK.isPlaying=!AU.paused,document.addEventListener("keydown",AK.handleKeydown)},oncreate:function(){var t=function(t){AY||(AK.seek(t),AY=setInterval(function(){AK.seek(t),document.querySelector(".audio-info").style.padding="20px"},1e3))},e=function(){AY&&(clearInterval(AY),AY=null,document.querySelector(".audio-info").style.padding="10px")};wq("","",""),wU("","",""),Ap.sleepTimer&&(wU("","",""),document.querySelector("div.button-left").addEventListener("click",function(){alert("j"),Ac.sleepTimer?A3():A2(6e4*Ap.sleepTimer)})),Ac.notKaiOS&&wq("","",""),document.querySelector("div.button-center").addEventListener("click",function(t){AK.togglePlayPause()}),Ac.notKaiOS&&(document.addEventListener("touchstart",function(t){var e=t.touches[0];AV=e.clientX,A$=e.clientY}),document.addEventListener("touchmove",function(e){var r=e.touches[0];AH=r.clientX,AW=r.clientY;var n=AH-AV,i=AW-A$;Math.abs(n)>Math.abs(i)?n>30?(t("right"),AG=!0):n<-30&&(t("left"),AG=!0):i>30?console.log("Swiping down (not used in this context)"):i<-30&&console.log("Swiping up (not used in this context)")}),document.addEventListener("touchend",function(){AG&&(AG=!1,e())}))},onremove:function(){document.removeEventListener("keydown",AK.handleKeydown)},handleKeydown:function(t){"Enter"===t.key?AK.togglePlayPause():"ArrowLeft"===t.key?AK.seek("left"):"ArrowRight"===t.key&&AK.seek("right")},togglePlayPause:function(){AK.isPlaying?AU.pause():AU.play().catch(function(){}),AK.isPlaying=!AK.isPlaying},seek:function(t){var e=AU.currentTime;"left"===t?AU.currentTime=Math.max(0,e-AK.seekAmount):"right"===t&&(AU.currentTime=Math.min(AK.audioDuration,e+AK.seekAmount))},view:function(t){t.attrs;var r=AK.audioDuration>0?AK.currentTime/AK.audioDuration*100:0;return /*@__PURE__*/e(w$)("div",{class:"audio-player"},[/*@__PURE__*/e(w$)("div",{id:"audio-container",class:"audio-container"}),/*@__PURE__*/e(w$)("div",{class:"cover-container",style:{"background-color":"rgb(121, 71, 255)","background-image":"url(".concat(Af.cover,")")}}),/*@__PURE__*/e(w$)("div",{class:"audio-info",style:{background:"linear-gradient(to right, #3498db ".concat(r,"%, white ").concat(r,"%)")}},["".concat(AD(AK.currentTime)," / ").concat(AD(AK.audioDuration))]),/*@__PURE__*/e(w$)("div",{class:"progress-bar-container"},[/*@__PURE__*/e(w$)("div",{class:"progress-bar",style:{width:"".concat(r,"%")}})])])}};function AZ(){var t=document.activeElement;if(t){for(var e=t.getBoundingClientRect(),r=e.top+e.height/2,n=t.parentNode;n;){if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth){var i=n.getBoundingClientRect();r=e.top-i.top+e.height/2;break}n=n.parentNode}n?n.scrollBy({left:0,top:r-n.clientHeight/2,behavior:"smooth"}):document.body.scrollBy({left:0,top:r-window.innerHeight/2,behavior:"smooth"})}}/*@__PURE__*/e(w$).route(AC,"/intro",{"/article":{view:function(){var t=Aw.find(function(t){return /*@__PURE__*/e(w$).route.param("index")==t.id&&(Af=t,!0)});return /*@__PURE__*/e(w$)("div",{id:"article",class:"page",oncreate:function(){Ac.notKaiOS&&wq("","",""),wU("","","")}},t?/*@__PURE__*/e(w$)("article",{class:"item",tabindex:0,oncreate:function(e){e.dom.focus(),("audio"===t.type||"video"===t.type||"youtube"===t.type)&&wU("","","")}},[/*@__PURE__*/e(w$)("time",{id:"top",oncreate:function(){setTimeout(function(){document.querySelector("#top").scrollIntoView()},1e3)}},/*@__PURE__*/e(kb)(t.isoDate).format("DD MMM YYYY")),/*@__PURE__*/e(w$)("h2",{class:"article-title",oncreate:function(e){var r=e.dom;t.reblog&&r.classList.add("reblog")}},t.title),/*@__PURE__*/e(w$)("div",{class:"text"},[/*@__PURE__*/e(w$).trust(AA(t.content))]),t.reblog?/*@__PURE__*/e(w$)("div",{class:"text"},"reblogged from:"+t.reblogUser):""]):/*@__PURE__*/e(w$)("div","Article not found"))}},"/settingsView":{view:function(){return /*@__PURE__*/e(w$)("div",{class:"flex justify-content-center page",id:"settings-page",oncreate:function(){Ac.notKaiOS||(Ac.local_opml=[],wP("opml",function(t){Ac.local_opml.push(t)})),wU("","",""),Ac.notKaiOS&&wU("","",""),document.querySelectorAll(".item").forEach(function(t,e){t.setAttribute("tabindex",e)}),Ac.notKaiOS&&wq("","",""),Ac.notKaiOS&&wU("","","")}},[/*@__PURE__*/e(w$)("div",{class:"item input-parent flex",oncreate:function(){AJ()}},[/*@__PURE__*/e(w$)("label",{for:"url-opml"},"OPML"),/*@__PURE__*/e(w$)("input",{id:"url-opml",placeholder:"",value:Ap.opml_url||"",type:"url"})]),/*@__PURE__*/e(w$)("button",{class:"item",onclick:function(){Ap.opml_local_filename?(Ap.opml_local="",Ap.opml_local_filename="",/*@__PURE__*/e(wV).setItem("settings",Ap).then(function(){wB("OPML file removed",4e3),/*@__PURE__*/e(w$).redraw()})):Ac.notKaiOS?wF(function(t){var r=new FileReader;r.onload=function(){AT(r.result).error?wB("OPML file not valid",4e3):(Ap.opml_local=r.result,Ap.opml_local_filename=t.filename,/*@__PURE__*/e(wV).setItem("settings",Ap).then(function(){wB("OPML file added",4e3)}))},r.onerror=function(){wB("OPML file not valid",4e3)},r.readAsText(t.blob)}):Ac.local_opml.length>0?/*@__PURE__*/e(w$).route.set("/localOPML"):wB("no OPML file found",3e3)}},Ap.opml_local_filename?"Remove OPML file":"Upload OPML file"),/*@__PURE__*/e(w$)("div",Ap.opml_local_filename),/*@__PURE__*/e(w$)("div",{class:"seperation"}),Ac.notKaiOS?/*@__PURE__*/e(w$)("div",{class:"item input-parent flex "},[/*@__PURE__*/e(w$)("label",{for:"url-proxy"},"PROXY"),/*@__PURE__*/e(w$)("input",{id:"url-proxy",placeholder:"",value:Ap.proxy_url||"",type:"url"})]):null,/*@__PURE__*/e(w$)("div",{class:"seperation"}),/*@__PURE__*/e(w$)("h2",{class:"flex justify-content-spacearound"},"Mastodon Account"),Ac.mastodon_logged?/*@__PURE__*/e(w$)("div",{id:"account_info",class:"item"},"You have successfully logged in as ".concat(Ac.mastodon_logged," and the data is being loaded from server ").concat(Ap.mastodon_server_url,".")):null,Ac.mastodon_logged?/*@__PURE__*/e(w$)("button",{class:"item",onclick:function(){Ap.mastodon_server_url="",Ap.mastodon_token="",/*@__PURE__*/e(wV).setItem("settings",Ap),Ac.mastodon_logged="",/*@__PURE__*/e(w$).route.set("/settingsView")}},"Disconnect"):null,Ac.mastodon_logged?null:/*@__PURE__*/e(w$)("div",{class:"item input-parent flex justify-content-spacearound"},[/*@__PURE__*/e(w$)("label",{for:"mastodon-server-url"},"URL"),/*@__PURE__*/e(w$)("input",{id:"mastodon-server-url",placeholder:"Server URL",value:Ap.mastodon_server_url})]),Ac.mastodon_logged?null:/*@__PURE__*/e(w$)("button",{class:"item",onclick:function(){/*@__PURE__*/e(wV).setItem("settings",Ap),Ap.mastodon_server_url=document.getElementById("mastodon-server-url").value;var t=Ap.mastodon_server_url+"/oauth/authorize?client_id=HqIUbDiOkeIoDPoOJNLQOgVyPi1ZOkPMW29UVkhl3i8&scope=read&redirect_uri=https://feedolin.strukturart.com&response_type=code";window.open(t)}},"Connect"),/*@__PURE__*/e(w$)("div",{class:"seperation"}),/*@__PURE__*/e(w$)("div",{class:"item input-parent"},[/*@__PURE__*/e(w$)("label",{for:"sleep-timer"},"Sleep timer"),/*@__PURE__*/e(w$)("select",{name:"sleep-timer",class:"select-box",id:"sleep-timer",value:Ap.sleepTimer,onchange:function(t){Ap.sleepTimer=t.target.value,/*@__PURE__*/e(w$).redraw()}},[/*@__PURE__*/e(w$)("option",{value:"10"},"10"),/*@__PURE__*/e(w$)("option",{value:"20"},"20"),/*@__PURE__*/e(w$)("option",{value:"30"},"30"),/*@__PURE__*/e(w$)("option",{value:"30"},"40"),/*@__PURE__*/e(w$)("option",{value:"30"},"50"),/*@__PURE__*/e(w$)("option",{value:"30"},"60")])]),/*@__PURE__*/e(w$)("button",{class:"item",id:"button-save-settings",onclick:function(){""==document.getElementById("url-opml").value||(t=document.getElementById("url-opml").value,/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(t))||wB("URL not valid",4e3),Ap.opml_url=document.getElementById("url-opml").value,Ac.notKaiOS&&(Ap.proxy_url=document.getElementById("url-proxy").value);var t,r=document.getElementById("sleep-timer").value;r&&!isNaN(r)&&Number(r)>0?Ap.sleepTimer=parseInt(r,10):Ap.sleepTimer="",Ac.mastodon_logged||(Ap.mastodon_server_url=document.getElementById("mastodon-server-url").value),/*@__PURE__*/e(wV).setItem("settings",Ap).then(function(){wB("settings saved",2e3)}).catch(function(t){alert(t)})}},"save settings")])}},"/intro":{view:function(){return /*@__PURE__*/e(w$)("div",{class:"width-100 height-100",id:"intro",oninit:function(){Ac.notKaiOS&&Ax()},onremove:function(){localStorage.setItem("version",Ac.version),document.querySelector(".loading-spinner").style.display="none"}},[/*@__PURE__*/e(w$)("img",{src:"./assets/icons/intro.svg",oncreate:function(){document.querySelector(".loading-spinner").style.display="block",wL(function(t){try{Ac.version=t.manifest.version,document.querySelector("#version").textContent=t.manifest.version}catch(t){}("b2g"in navigator||Ac.notKaiOS)&&fetch("/manifest.webmanifest").then(function(t){return t.json()}).then(function(t){Ac.version=t.b2g_features.version})})}}),/*@__PURE__*/e(w$)("div",{class:"flex width-100 justify-content-center ",id:"version-box"},[/*@__PURE__*/e(w$)("kbd",{id:"version"},localStorage.getItem("version")||0)])])}},"/start":{view:function(){var t=Aw.filter(function(t){return""===AL||AL===t.channel});return Aw.forEach(function(t){Ad.push(t.id)}),/*@__PURE__*/e(w$)("div",{id:"start",oncreate:function(){AM=/*@__PURE__*/e(w$).route.param("index")||0,wU("","",""),Ac.notKaiOS&&wU("","",""),Ac.notKaiOS&&wq("","",""),Ac.notKaiOS&&Ac.player&&wq("","","")}},/*@__PURE__*/e(w$)("span",{class:"channel",oncreate:function(){}},AL),t.map(function(r,n){var i,o=Ag.includes(r.id)?"read":"";return /*@__PURE__*/e(w$)("article",{class:"item ".concat(o),"data-id":r.id,"data-type":r.type,oncreate:function(e){0==AM&&0==n?setTimeout(function(){e.dom.focus()},1200):r.id==AM&&setTimeout(function(){e.dom.focus(),AZ()},1200),n==t.length-1&&setTimeout(function(){document.querySelectorAll(".item").forEach(function(t,e){t.setAttribute("tabindex",e)})},1e3)},onclick:function(){/*@__PURE__*/e(w$).route.set("/article?index="+r.id),Ay(r.id)},onkeydown:function(t){"Enter"===t.key&&(/*@__PURE__*/e(w$).route.set("/article?index="+r.id),Ay(r.id))}},[/*@__PURE__*/e(w$)("span",{class:"type-indicator"},r.type),/*@__PURE__*/e(w$)("time",/*@__PURE__*/e(kb)(r.isoDate).format("DD MMM YYYY")),/*@__PURE__*/e(w$)("h2",{oncreate:function(t){var e=t.dom;!0===r.reblog&&e.classList.add("reblog")}},AA(r.feed_title)),/*@__PURE__*/e(w$)("h3",AA(r.title)),"mastodon"==r.type?/*@__PURE__*/e(w$)("h3",(i=r.content.substring(0,30),wJ(i,{allowedTags:[],allowedAttributes:{}})+"...")):null])}))}},"/options":{view:function(){return /*@__PURE__*/e(w$)("div",{id:"optionsView",class:"flex",oncreate:function(){wq("","",""),Ac.notKaiOS&&wq("","",""),wU("","",""),Ac.notKaiOS&&wU("","","")}},[/*@__PURE__*/e(w$)("button",{tabindex:0,class:"item",oncreate:function(t){t.dom.focus(),AZ()},onclick:function(){/*@__PURE__*/e(w$).route.set("/about")}},"About"),/*@__PURE__*/e(w$)("button",{tabindex:1,class:"item",onclick:function(){/*@__PURE__*/e(w$).route.set("/settingsView")}},"Settings"),/*@__PURE__*/e(w$)("button",{tabindex:2,class:"item",onclick:function(){/*@__PURE__*/e(w$).route.set("/privacy_policy")}},"Privacy Policy"),/*@__PURE__*/e(w$)("div",{id:"KaiOSads-Wrapper",class:"",oncreate:function(){!1==Ac.notKaiOS&&w_()}})])}},"/about":{view:function(){return /*@__PURE__*/e(w$)("div",{class:"page scrollable",oncreate:function(){wU("","","")}},/*@__PURE__*/e(w$)("p","Feedolin is an RSS/Atom reader and podcast player, available for both KaiOS and non-KaiOS users."),/*@__PURE__*/e(w$)("p","It supports connecting a Mastodon account to display articles alongside your RSS/Atom feeds."),/*@__PURE__*/e(w$)("p","The app allows you to listen to audio and watch videos directly if the feed provides the necessary URLs."),/*@__PURE__*/e(w$)("p","The list of subscribed websites and podcasts is managed either locally or via an OPML file from an external source, such as a public link in the cloud."),/*@__PURE__*/e(w$)("p","For non-KaiOS users, local files must be uploaded to the app."),/*@__PURE__*/e(w$)("h4",{style:"margin-top:20px; margin-bottom:10px;"},"Navigation:"),/*@__PURE__*/e(w$)("ul",[/*@__PURE__*/e(w$)("li",/*@__PURE__*/e(w$).trust("Use the up and down arrow keys to navigate between articles.

")),/*@__PURE__*/e(w$)("li",/*@__PURE__*/e(w$).trust("Use the left and right arrow keys to switch between categories.

")),/*@__PURE__*/e(w$)("li",/*@__PURE__*/e(w$).trust("Press Enter to view the content of an article.

")),/*@__PURE__*/e(w$)("li",{oncreate:function(t){Ac.notKaiOS||(t.dom.style.display="none")}},/*@__PURE__*/e(w$).trust("Use Alt to access various options.")),/*@__PURE__*/e(w$)("li",{oncreate:function(t){Ac.notKaiOS&&(t.dom.style.display="none")}},/*@__PURE__*/e(w$).trust("Use # Volume")),/*@__PURE__*/e(w$)("li",{oncreate:function(t){Ac.notKaiOS&&(t.dom.style.display="none")}},/*@__PURE__*/e(w$).trust("Use * Audioplayer

")),/*@__PURE__*/e(w$)("li","Version: "+Ac.version)]))}},"/privacy_policy":{view:function(){return /*@__PURE__*/e(w$)("div",{id:"privacy_policy",class:"page scrollable",oncreate:function(){wU("","","")}},[/*@__PURE__*/e(w$)("h1","Privacy Policy for Feedolin"),/*@__PURE__*/e(w$)("p","Feedolin is committed to protecting your privacy. This policy explains how data is handled within the app."),/*@__PURE__*/e(w$)("h2","Data Storage and Collection"),/*@__PURE__*/e(w$)("p",["All data related to your RSS/Atom feeds and Mastodon account is stored ",/*@__PURE__*/e(w$)("strong","locally")," in your device’s browser. Feedolin does ",/*@__PURE__*/e(w$)("strong","not")," collect or store any data on external servers. The following information is stored locally:"]),/*@__PURE__*/e(w$)("ul",[/*@__PURE__*/e(w$)("li","Your subscribed RSS/Atom feeds and podcasts."),/*@__PURE__*/e(w$)("li","OPML files you upload or manage."),/*@__PURE__*/e(w$)("li","Your Mastodon account information and related data.")]),/*@__PURE__*/e(w$)("p","No server-side data storage or collection is performed."),/*@__PURE__*/e(w$)("h2","KaiOS Users"),/*@__PURE__*/e(w$)("p",["If you are using Feedolin on a KaiOS device, the app uses ",/*@__PURE__*/e(w$)("strong","KaiOS Ads"),", which may collect data related to your usage. The data collected by KaiOS Ads is subject to the ",/*@__PURE__*/e(w$)("a",{href:"https://www.kaiostech.com/privacy-policy/",target:"_blank",rel:"noopener noreferrer"},"KaiOS privacy policy"),"."]),/*@__PURE__*/e(w$)("p",["For users on all other platforms, ",/*@__PURE__*/e(w$)("strong","no ads")," are used, and no external data collection occurs."]),/*@__PURE__*/e(w$)("h2","External Sources Responsibility"),/*@__PURE__*/e(w$)("p",["Feedolin enables you to add feeds and connect to external sources such as RSS/Atom feeds, podcasts, and Mastodon accounts. You are ",/*@__PURE__*/e(w$)("strong","solely responsible")," for the sources you choose to trust and subscribe to. Feedolin does not verify or control the content or data provided by these external sources."]),/*@__PURE__*/e(w$)("h2","Third-Party Services"),/*@__PURE__*/e(w$)("p","Feedolin integrates with third-party services such as Mastodon. These services have their own privacy policies, and you should review them to understand how your data is handled."),/*@__PURE__*/e(w$)("h2","Policy Updates"),/*@__PURE__*/e(w$)("p","This Privacy Policy may be updated periodically. Any changes will be communicated through updates to the app."),/*@__PURE__*/e(w$)("p","By using Feedolin, you acknowledge and agree to this Privacy Policy.")])}},"/localOPML":{view:function(){return /*@__PURE__*/e(w$)("div",{class:"flex",id:"index",oncreate:function(){Ac.notKaiOS&&wq("","",""),wU("","","")}},Ac.local_opml.map(function(t,r){var n=t.split("/");return n=n[n.length-1],/*@__PURE__*/e(w$)("button",{class:"item",tabindex:r,oncreate:function(t){0==r&&t.dom.focus()},onclick:function(){if("b2g"in navigator)try{var r=navigator.b2g.getDeviceStorage("sdcard").get(t);r.onsuccess=function(){var t=new FileReader;t.onload=function(){AT(t.result).error?wB("OPML file not valid",4e3):(Ap.opml_local=t.result,Ap.opml_local_filename=n,/*@__PURE__*/e(wV).setItem("settings",Ap).then(function(){wB("OPML file added",4e3),/*@__PURE__*/e(w$).route.set("/settingsView")}))},t.onerror=function(){wB("OPML file not valid",4e3)},t.readAsText(this.result)},r.onerror=function(t){}}catch(t){}else{var i=navigator.getDeviceStorage("sdcard").get(t);i.onsuccess=function(){var t=new FileReader;t.onload=function(){AT(t.result).error?wB("OPML file not valid",4e3):(Ap.opml_local=t.result,Ap.opml_local_filename=n,/*@__PURE__*/e(wV).setItem("settings",Ap).then(function(){wB("OPML file added",4e3),/*@__PURE__*/e(w$).route.set("/settingsView")}))},t.onerror=function(){wB("OPML file not valid",4e3)},t.readAsText(this.result)},i.onerror=function(t){}}}},n)}))}},"/AudioPlayerView":AK,"/VideoPlayerView":AB,"/YouTubePlayerView":Aj});var AJ=function(){document.body.scrollTo({left:0,top:0,behavior:"smooth"}),document.documentElement.scrollTo({left:0,top:0,behavior:"smooth"})};document.addEventListener("DOMContentLoaded",function(t){var r,n,i=function(t){if("SELECT"==document.activeElement.nodeName||"date"==document.activeElement.type||"time"==document.activeElement.type||"volume"==Ac.window_status)return!1;if(document.activeElement.classList.contains("scroll")){var e=document.querySelector(".scroll");1==t?e.scrollBy({left:0,top:10}):e.scrollBy({left:0,top:-10})}var r=document.activeElement.tabIndex+t,n=0;if(n=document.getElementById("app").querySelectorAll(".item"),document.activeElement.parentNode.classList.contains("input-parent"))return document.activeElement.parentNode.focus(),!0;r<=n.length&&(0,n[r]).focus(),r>=n.length&&(0,n[0]).focus(),AZ()};function o(t){c({key:t})}Ac.notKaiOS&&(r=0,document.addEventListener("touchstart",function(t){r=t.touches[0].pageX,document.querySelector("body").style.opacity=1},!1),document.addEventListener("touchmove",function(t){var n=1-Math.min(Math.abs(t.touches[0].pageX-r)/300,1);/*@__PURE__*/e(w$).route.get().startsWith("/article")&&(document.querySelector("body").style.opacity=n)},!1),document.addEventListener("touchend",function(t){document.querySelector("body").style.opacity=1},!1)),document.querySelector("div.button-left").addEventListener("click",function(t){o("SoftLeft")}),document.querySelector("div.button-right").addEventListener("click",function(t){o("SoftRight")}),document.querySelector("div.button-center").addEventListener("click",function(t){o("Enter")}),document.querySelector("#top-bar div div.button-left").addEventListener("click",function(t){o("Backspace")}),document.querySelector("#top-bar div div.button-right").addEventListener("click",function(t){o("*")});var a=!1;document.addEventListener("keydown",function(t){a||("Backspace"==t.key&&"INPUT"!=document.activeElement.tagName&&t.preventDefault(),"EndCall"===t.key&&(t.preventDefault(),window.close()),t.repeat||(u=!1,n=setTimeout(function(){u=!0,"Backspace"===t.key&&window.close()},2e3)),t.repeat&&("Backspace"==t.key&&t.preventDefault(),"Backspace"==t.key&&(u=!1),t.key),a=!0,setTimeout(function(){a=!1},300))});var s=!1;document.addEventListener("keyup",function(t){s||(function(t){if("Backspace"==t.key&&t.preventDefault(),!1===Ac.visibility)return 0;clearTimeout(n),u||c(t)}(t),s=!0,setTimeout(function(){s=!1},300))}),Ac.notKaiOS&&document.addEventListener("swiped",function(t){var r=/*@__PURE__*/e(w$).route.get(),n=t.detail.dir;if("right"==n&&r.startsWith("/start")){--AR<1&&(AR=Av.length-1),AL=Av[AR],/*@__PURE__*/e(w$).redraw();var i=/*@__PURE__*/e(w$).route.param();i.index=0,/*@__PURE__*/e(w$).route.set("/start",i)}if("left"==n&&r.startsWith("/start")){++AR>Av.length-1&&(AR=0),AL=Av[AR],/*@__PURE__*/e(w$).redraw();var o=/*@__PURE__*/e(w$).route.param();o.index=0,/*@__PURE__*/e(w$).route.set("/start",o)}});var u=!1;function c(t){var r=/*@__PURE__*/e(w$).route.get();switch(t.key){case"ArrowRight":if(r.startsWith("/start")){++AR>Av.length-1&&(AR=0),AL=Av[AR],/*@__PURE__*/e(w$).redraw();var n=/*@__PURE__*/e(w$).route.param();n.index=0,/*@__PURE__*/e(w$).route.set("/start",n),setTimeout(function(){document.querySelectorAll("article.item")[0].focus(),AZ()},500)}break;case"ArrowLeft":if(r.startsWith("/start")){--AR<0&&(AR=Av.length-1),AL=Av[AR],/*@__PURE__*/e(w$).redraw();var o=/*@__PURE__*/e(w$).route.param();o.index=0,/*@__PURE__*/e(w$).route.set("/start",o),setTimeout(function(){document.querySelectorAll("article.item")[0].focus(),AZ()},500)}break;case"ArrowUp":i(-1),"volume"==Ac.window_status&&(navigator.volumeManager.requestVolumeUp(),Ac.window_status="volume",setTimeout(function(){Ac.window_status=""},2e3));break;case"ArrowDown":i(1),"volume"==Ac.window_status&&(navigator.volumeManager.requestVolumeDown(),Ac.window_status="volume",setTimeout(function(){Ac.window_status=""},2e3));break;case"SoftRight":case"Alt":r.startsWith("/start")&&/*@__PURE__*/e(w$).route.set("/options"),r.startsWith("/article")&&("audio"==Af.type&&/*@__PURE__*/e(w$).route.set("/AudioPlayerView?url=".concat(encodeURIComponent(Af.enclosure["@_url"]),"&id=").concat(Af.id)),"video"==Af.type&&/*@__PURE__*/e(w$).route.set("/VideoPlayerView?url=".concat(encodeURIComponent(Af.enclosure["@_url"]))),"youtube"==Af.type&&/*@__PURE__*/e(w$).route.set("/YouTubePlayerView?videoId=".concat(encodeURIComponent(Af.youtubeid))));break;case"SoftLeft":case"Control":r.startsWith("/start")&&Am(),r.startsWith("/article")&&window.open(Af.url),r.startsWith("/AudioPlayerView")&&(Ac.sleepTimer?A3():A2(6e4*Ap.sleepTimer));break;case"Enter":document.activeElement.classList.contains("input-parent")&&document.activeElement.children[0].focus();break;case"*":/*@__PURE__*/e(w$).route.set("/AudioPlayerView");break;case"#":wC();break;case"Backspace":if(r.startsWith("/start")&&window.close(),r.startsWith("/article")){var a=/*@__PURE__*/e(w$).route.param("index");/*@__PURE__*/e(w$).route.set("/start?index="+a)}if(r.startsWith("/YouTubePlayerView")){var s=/*@__PURE__*/e(w$).route.param("index");/*@__PURE__*/e(w$).route.set("/start?index="+s)}if(r.startsWith("/localOPML")&&history.back(),r.startsWith("/index")&&/*@__PURE__*/e(w$).route.set("/start?index=0"),r.startsWith("/about")&&/*@__PURE__*/e(w$).route.set("/options"),r.startsWith("/privacy_policy")&&/*@__PURE__*/e(w$).route.set("/options"),r.startsWith("/options")&&/*@__PURE__*/e(w$).route.set("/start?index=0"),r.startsWith("/settingsView")){if("INPUT"==document.activeElement.tagName)return!1;/*@__PURE__*/e(w$).route.set("/options")}r.startsWith("/Video")&&history.back(),r.startsWith("/Audio")&&history.back()}}document.addEventListener("visibilitychange",function(){"visible"===document.visibilityState&&Ap.last_update?(Ac.visibility=!0,new Date/1e3-Ap.last_update/1e3>Ap.cache_time&&(Aw=[],wB("load new content",4e3),AP())):Ac.visibility=!1})}),window.addEventListener("online",function(){Ac.deviceOnline=!0}),window.addEventListener("offline",function(){Ac.deviceOnline=!1}),window.addEventListener("beforeunload",function(t){var r=window.performance.getEntriesByType("navigation"),n=window.performance.navigation?window.performance.navigation.type:null;(r.length&&"reload"===r[0].type||1===n)&&(t.preventDefault(),Aw=[],wB("load new content",4e3),AP(),/*@__PURE__*/e(w$).route.set("/intro"),t.returnValue="Are you sure you want to leave the page?")});try{Aa.addEventListener("message",function(t){var r=t.data.oauth_success;if(r){var n=new Headers;n.append("Content-Type","application/x-www-form-urlencoded");var i=new URLSearchParams;i.append("code",r),i.append("scope","read"),i.append("grant_type","authorization_code"),i.append("redirect_uri","https://feedolin.strukturart.com"),i.append("client_id","HqIUbDiOkeIoDPoOJNLQOgVyPi1ZOkPMW29UVkhl3i8"),i.append("client_secret","R_9DvQ5V84yZQg3BEdDHjz5uGQGUN4qrPx9YgmrJ81Q"),fetch(Ap.mastodon_server_url+"/oauth/token",{method:"POST",headers:n,body:i,redirect:"follow"}).then(function(t){return t.json()}).then(function(t){Ap.mastodon_token=t.access_token,/*@__PURE__*/e(wV).setItem("settings",Ap),/*@__PURE__*/e(w$).route.set("/start?index=0"),wB("Successfully connected",1e4)}).catch(function(t){console.error("Error:",t),wB("Connection failed")})}})}catch(t){}var AQ={},AX={};AX=function(t,e,r){if(e===self.location.origin)return t;var n=r?"import "+JSON.stringify(t)+";":"importScripts("+JSON.stringify(t)+");";return URL.createObjectURL(new Blob([n],{type:"application/javascript"}))};var A0=ek("MMwCY"),A1=A0.getBundleURL("5Waqz")+"worker.8ac5962b.js";AQ=AX(A1,A0.getOrigin(A1),!1);try{ew=new Worker(AQ)}catch(t){console.log(t)}function A2(t){ew.postMessage({action:"start",duration:t}),wB("sleep mode on",3e3),Ac.sleepTimer=!0}function A3(){ew.postMessage({action:"stop"}),wB("sleep mode off",3e3)}ew.onmessage=function(t){"stop"===t.data.action&&(AU.pause(),Ac.sleepTimer=!1)}}(); \ No newline at end of file + */function xX(t){return"[object Object]"===Object.prototype.toString.call(t)}xQ=function(t){if("string"!=typeof t)throw TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};var x0=function(t){var e,r;return!1!==xX(t)&&(void 0===(e=t.constructor)||!1!==xX(r=e.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))},x1={},x2=function(t){var e;return!!t&&"object"==typeof t&&"[object RegExp]"!==(e=Object.prototype.toString.call(t))&&"[object Date]"!==e&&t.$$typeof!==x3},x3="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function x5(t,e){return!1!==e.clone&&e.isMergeableObject(t)?x7(Array.isArray(t)?[]:{},t,e):t}function x8(t,e,r){return t.concat(e).map(function(t){return x5(t,r)})}function x6(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function x4(t,e){try{return e in t}catch(t){return!1}}function x7(t,e,r){(r=r||{}).arrayMerge=r.arrayMerge||x8,r.isMergeableObject=r.isMergeableObject||x2,r.cloneUnlessOtherwiseSpecified=x5;var n,i,o=Array.isArray(e);return o!==Array.isArray(t)?x5(e,r):o?r.arrayMerge(t,e,r):(i={},(n=r).isMergeableObject(t)&&x6(t).forEach(function(e){i[e]=x5(t[e],n)}),x6(e).forEach(function(r){x4(t,r)&&!(Object.hasOwnProperty.call(t,r)&&Object.propertyIsEnumerable.call(t,r))||(x4(t,r)&&n.isMergeableObject(e[r])?i[r]=(function(t,e){if(!e.customMerge)return x7;var r=e.customMerge(t);return"function"==typeof r?r:x7})(r,n)(t[r],e[r],n):i[r]=x5(e[r],n))}),i)}x7.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,r){return x7(t,r,e)},{})},x1=x7;var x9={};ti=x9,to=function(){return function(t){function e(t){return" "===t||" "===t||"\n"===t||"\f"===t||"\r"===t}function r(e){var r,n=e.exec(t.substring(v));if(n)return r=n[0],v+=r.length,r}for(var n,i,o,a,s,u=t.length,c=/^[ \t\n\r\u000c]+/,l=/^[, \t\n\r\u000c]+/,f=/^[^ \t\n\r\u000c]+/,h=/[,]+$/,d=/^\d+$/,p=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,v=0,g=[];;){if(r(l),v>=u)return g;n=r(f),i=[],","===n.slice(-1)?(n=n.replace(h,""),m()):function(){for(r(c),o="",a="in descriptor";;){if(s=t.charAt(v),"in descriptor"===a){if(e(s))o&&(i.push(o),o="",a="after descriptor");else if(","===s){v+=1,o&&i.push(o),m();return}else if("("===s)o+=s,a="in parens";else if(""===s){o&&i.push(o),m();return}else o+=s}else if("in parens"===a){if(")"===s)o+=s,a="in descriptor";else if(""===s){i.push(o),m();return}else o+=s}else if("after descriptor"===a){if(e(s));else if(""===s){m();return}else a="in descriptor",v-=1}v+=1}}()}function m(){var e,r,o,a,s,u,c,l,f,h=!1,v={};for(a=0;at.length)&&(e=t.length);for(var r=0,n=Array(e);r",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}},{key:"showSourceCode",value:function(t){var e=this;if(!this.source)return"";var r=this.source;null==t&&(t=Sl.isColorSupported);var n=function(t){return t},i=function(t){return t},o=function(t){return t};if(t){var a=Sl.createColors(!0),s=a.bold,u=a.gray,c=a.red;i=function(t){return s(c(t))},n=function(t){return u(t)},Sd&&(o=function(t){return Sd(t)})}var l=r.split(/\r?\n/),f=Math.max(this.line-3,0),h=Math.min(this.line+2,l.length),d=String(h).length;return l.slice(f,h).map(function(t,r){var a=f+1+r,s=" "+(" "+a).slice(-d)+" | ";if(a===e.line){if(t.length>160){var u=Math.max(0,e.column-20),c=Math.max(e.column+20,e.endColumn+20),l=t.slice(u,c),h=n(s.replace(/\d/g," "))+t.slice(0,Math.min(e.column-1,19)).replace(/[^\t]/g," ");return i(">")+n(s)+o(l)+"\n "+h+i("^")}var p=n(s.replace(/\d/g," "))+t.slice(0,e.column-1).replace(/[^\t]/g," ");return i(">")+n(s)+o(t)+"\n "+p+i("^")}return" "+n(s)+o(t)}).join("\n")}},{key:"toString",value:function(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}}]),r}(xT(Error));Sc=Sp,Sp.default=Sp;var Sv={},Sg={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1},Sm=/*#__PURE__*/function(){function t(e){wQ(this,t),this.builder=e}return w0(t,[{key:"atrule",value:function(t,e){var r="@"+t.name,n=t.params?this.rawValue(t,"params"):"";if(void 0!==t.raws.afterName?r+=t.raws.afterName:n&&(r+=" "),t.nodes)this.block(t,r+n);else{var i=(t.raws.between||"")+(e?";":"");this.builder(r+n+i,t)}}},{key:"beforeAfter",value:function(t,e){r="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose");for(var r,n=t.parent,i=0;n&&"root"!==n.type;)i+=1,n=n.parent;if(r.includes("\n")){var o=this.raw(t,null,"indent");if(o.length)for(var a=0;a0&&"comment"===t.nodes[e].type;)e-=1;for(var r=this.raw(t,"semicolon"),n=0;n0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}},{key:"rawBeforeComment",value:function(t,e){var r;return t.walkComments(function(t){if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}},{key:"rawBeforeDecl",value:function(t,e){var r;return t.walkDecls(function(t){if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}},{key:"rawBeforeOpen",value:function(t){var e;return t.walk(function(t){if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1}),e}},{key:"rawBeforeRule",value:function(t){var e;return t.walk(function(r){if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}},{key:"rawColon",value:function(t){var e;return t.walkDecls(function(t){if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}},{key:"rawEmptyBody",value:function(t){var e;return t.walk(function(t){if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1}),e}},{key:"rawIndent",value:function(t){var e;return t.raws.indent?t.raws.indent:(t.walk(function(r){var n=r.parent;if(n&&n!==t&&n.parent&&n.parent===t&&void 0!==r.raws.before){var i=r.raws.before.split("\n");return e=(e=i[i.length-1]).replace(/\S/g,""),!1}}),e)}},{key:"rawSemicolon",value:function(t){var e;return t.walk(function(t){if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1}),e}},{key:"rawValue",value:function(t,e){var r=t[e],n=t.raws[e];return n&&n.value===r?n.raw:r}},{key:"root",value:function(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}},{key:"rule",value:function(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}},{key:"stringify",value:function(t,e){if(!this[t.type])throw Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}}]),t}();Sv=Sm,Sm.default=Sm;var Sy={};function Sb(t,e){new Sv(e).stringify(t)}Sy=Sb,Sb.default=Sb,et=Symbol("isClean"),ee=Symbol("my");var Sw=/*#__PURE__*/function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var r in wQ(this,t),this.raws={},this[et]=!1,this[ee]=!0,e)if("nodes"===r){this.nodes=[];var n=!0,i=!1,o=void 0;try{for(var a,s=e[r][Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var u=a.value;"function"==typeof u.clone?this.append(u.clone()):this.append(u)}}catch(t){i=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}}else this[r]=e[r]}return w0(t,[{key:"addToError",value:function(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&".concat(e.input.from,":").concat(e.start.line,":").concat(e.start.column,"$&"))}return t}},{key:"after",value:function(t){return this.parent.insertAfter(this,t),this}},{key:"assign",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var e in t)this[e]=t[e];return this}},{key:"before",value:function(t){return this.parent.insertBefore(this,t),this}},{key:"cleanRaws",value:function(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}},{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=function t(e,r){var n=new e.constructor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&"proxyCache"!==i){var o=e[i],a=void 0===o?"undefined":(0,e_._)(o);"parent"===i&&"object"===a?r&&(n[i]=r):"source"===i?n[i]=o:Array.isArray(o)?n[i]=o.map(function(e){return t(e,n)}):("object"===a&&null!==o&&(o=t(o)),n[i]=o)}return n}(this);for(var r in t)e[r]=t[r];return e}},{key:"cloneAfter",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.clone(t);return this.parent.insertAfter(this,e),e}},{key:"cloneBefore",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.clone(t);return this.parent.insertBefore(this,e),e}},{key:"error",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.source){var r=this.rangeBy(e),n=r.end,i=r.start;return this.source.input.error(t,{column:i.column,line:i.line},{column:n.column,line:n.line},e)}return new Sc(t)}},{key:"getProxyProcessor",value:function(){return{get:function(t,e){return"proxyOf"===e?t:"root"===e?function(){return t.root().toProxy()}:t[e]},set:function(t,e,r){return t[e]===r||(t[e]=r,("prop"===e||"value"===e||"name"===e||"params"===e||"important"===e||"text"===e)&&t.markDirty(),!0)}}}},{key:"markClean",value:function(){this[et]=!0}},{key:"markDirty",value:function(){if(this[et]){this[et]=!1;for(var t=this;t=t.parent;)t[et]=!1}}},{key:"next",value:function(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}},{key:"positionBy",value:function(t,e){var r=this.source.start;if(t.index)r=this.positionInside(t.index,e);else if(t.word){var n=(e=this.toString()).indexOf(t.word);-1!==n&&(r=this.positionInside(n,e))}return r}},{key:"positionInside",value:function(t,e){for(var r=e||this.toString(),n=this.source.start.column,i=this.source.start.line,o=0;o0&&void 0!==arguments[0]?arguments[0]:Sy;t.stringify&&(t=t.stringify);var e="";return t(this,function(t){e+=t}),e}},{key:"warn",value:function(t,e,r){var n={node:this};for(var i in r)n[i]=r[i];return t.warn(e,n)}},{key:"proxyOf",get:function(){return this}}]),t}();Su=Sw,Sw.default=Sw;var Sx=/*#__PURE__*/function(t){xS(r,t);var e=x_(r);function r(t){var n;return wQ(this,r),(n=e.call(this,t)).type="comment",n}return r}(xT(Su));Ss=Sx,Sx.default=Sx;var SS={},SE=/*#__PURE__*/function(t){xS(r,t);var e=x_(r);function r(t){var n;return wQ(this,r),t&&void 0!==t.value&&"string"!=typeof t.value&&(t=xz(xk({},t),{value:String(t.value)})),(n=e.call(this,t)).type="decl",n}return w0(r,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),r}(xT(Su));SS=SE,SE.default=SE;var Sk=/*#__PURE__*/function(t){xS(r,t);var e=x_(r);function r(){return wQ(this,r),e.apply(this,arguments)}return w0(r,[{key:"append",value:function(){for(var t=arguments.length,e=Array(t),r=0;r1?e-1:0),i=1;i=t&&(this.indexes[r]=e-1);return this.markDirty(),this}},{key:"replaceValues",value:function(t,e,r){return r||(r=e,e={}),this.walkDecls(function(n){(!e.props||e.props.includes(n.prop))&&(!e.fast||n.value.includes(e.fast))&&(n.value=n.value.replace(t,r))}),this.markDirty(),this}},{key:"some",value:function(t){return this.nodes.some(t)}},{key:"walk",value:function(t){return this.each(function(e,r){var n;try{n=t(e,r)}catch(t){throw e.addToError(t)}return!1!==n&&e.walk&&(n=e.walk(t)),n})}},{key:"walkAtRules",value:function(t,e){return e?t instanceof RegExp?this.walk(function(r,n){if("atrule"===r.type&&t.test(r.name))return e(r,n)}):this.walk(function(r,n){if("atrule"===r.type&&r.name===t)return e(r,n)}):(e=t,this.walk(function(t,r){if("atrule"===t.type)return e(t,r)}))}},{key:"walkComments",value:function(t){return this.walk(function(e,r){if("comment"===e.type)return t(e,r)})}},{key:"walkDecls",value:function(t,e){return e?t instanceof RegExp?this.walk(function(r,n){if("decl"===r.type&&t.test(r.prop))return e(r,n)}):this.walk(function(r,n){if("decl"===r.type&&r.prop===t)return e(r,n)}):(e=t,this.walk(function(t,r){if("decl"===t.type)return e(t,r)}))}},{key:"walkRules",value:function(t,e){return e?t instanceof RegExp?this.walk(function(r,n){if("rule"===r.type&&t.test(r.selector))return e(r,n)}):this.walk(function(r,n){if("rule"===r.type&&r.selector===t)return e(r,n)}):(e=t,this.walk(function(t,r){if("rule"===t.type)return e(t,r)}))}},{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),r}(xT(Su));Sk.registerParse=function(t){en=t},Sk.registerRule=function(t){eo=t},Sk.registerAtRule=function(t){er=t},Sk.registerRoot=function(t){ei=t},Sa=Sk,Sk.default=Sk,Sk.rebuild=function(t){"atrule"===t.type?Object.setPrototypeOf(t,er.prototype):"rule"===t.type?Object.setPrototypeOf(t,eo.prototype):"decl"===t.type?Object.setPrototypeOf(t,SS.prototype):"comment"===t.type?Object.setPrototypeOf(t,Ss.prototype):"root"===t.type&&Object.setPrototypeOf(t,ei.prototype),t[ee]=!0,t.nodes&&t.nodes.forEach(function(t){Sk.rebuild(t)})};var SA=/*#__PURE__*/function(t){xS(r,t);var e=x_(r);function r(t){var n;return wQ(this,r),(n=e.call(this,t)).type="atrule",n}return w0(r,[{key:"append",value:function(){for(var t,e=arguments.length,n=Array(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:{};return new ea(new es,this,t).stringify()}}]),r}(Sa);SI.registerLazyResult=function(t){ea=t},SI.registerProcessor=function(t){es=t},SO=SI,SI.default=SI;var ST={};function SN(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n=0||(i[r]=t[r]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var S_={},SP=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21,e="",r=t;r--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},SC=Sd.isAbsolute,SR=Sd.resolve,SL=Sd.SourceMapConsumer,SM=Sd.SourceMapGenerator,SD=Sd.fileURLToPath,SB=Sd.pathToFileURL,Sj={},e_=ek("2L7Ke");eu=function(t){var e,r,n=function(t){var e=t.length;if(e%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var n=r===e?0:4-r%4;return[r,n]}(t),i=n[0],o=n[1],a=new SF((i+o)*3/4-o),s=0,u=o>0?i-4:i;for(r=0;r>16&255,a[s++]=e>>8&255,a[s++]=255&e;return 2===o&&(e=Sq[t.charCodeAt(r)]<<2|Sq[t.charCodeAt(r+1)]>>4,a[s++]=255&e),1===o&&(e=Sq[t.charCodeAt(r)]<<10|Sq[t.charCodeAt(r+1)]<<4|Sq[t.charCodeAt(r+2)]>>2,a[s++]=e>>8&255,a[s++]=255&e),a},ec=function(t){for(var e,r=t.length,n=r%3,i=[],o=0,a=r-n;o>18&63]+SU[n>>12&63]+SU[n>>6&63]+SU[63&n]);return i.join("")}(t,o,o+16383>a?a:o+16383));return 1===n?i.push(SU[(e=t[r-1])>>2]+SU[e<<4&63]+"=="):2===n&&i.push(SU[(e=(t[r-2]<<8)+t[r-1])>>10]+SU[e>>4&63]+SU[e<<2&63]+"="),i.join("")};for(var SU=[],Sq=[],SF="undefined"!=typeof Uint8Array?Uint8Array:Array,Sz="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",SV=0,S$=Sz.length;SV>1,l=-7,f=r?i-1:0,h=r?-1:1,d=t[e+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+t[e+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=c}return(d?-1:1)*a*Math.pow(2,o-n)},ef=function(t,e,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<>1,h=23===i?5960464477539062e-23:0,d=n?0:o-1,p=n?1:-1,v=e<0||0===e&&1/e<0?1:0;for(isNaN(e=Math.abs(e))||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+f>=1?e+=h/u:e+=h*Math.pow(2,1-f),e*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;t[r+d]=255&a,d+=p,a/=256,c-=8);t[r+d-p]|=128*v};var SH="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function SW(t){if(t>0x7fffffff)throw RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,SG.prototype),e}function SG(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return SZ(t)}return SY(t,e,r)}function SY(t,e,r){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!SG.isEncoding(e))throw TypeError("Unknown encoding: "+e);var r=0|S0(t,e),n=SW(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(Ed(t,Uint8Array)){var e=new Uint8Array(t);return SQ(e.buffer,e.byteOffset,e.byteLength)}return SJ(t)}(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(void 0===t?"undefined":(0,e_._)(t)));if(Ed(t,ArrayBuffer)||t&&Ed(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(Ed(t,SharedArrayBuffer)||t&&Ed(t.buffer,SharedArrayBuffer)))return SQ(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return SG.from(n,e,r);var i=function(t){if(SG.isBuffer(t)){var e,r=0|SX(t.length),n=SW(r);return 0===n.length||t.copy(n,0,0,r),n}return void 0!==t.length?"number"!=typeof t.length||(e=t.length)!=e?SW(0):SJ(t):"Buffer"===t.type&&Array.isArray(t.data)?SJ(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return SG.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(void 0===t?"undefined":(0,e_._)(t)))}function SK(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function SZ(t){return SK(t),SW(t<0?0:0|SX(t))}function SJ(t){for(var e=t.length<0?0:0|SX(t.length),r=SW(e),n=0;n=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function S0(t,e){if(SG.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Ed(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+(void 0===t?"undefined":(0,e_._)(t)));var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return El(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Ef(t).length;default:if(i)return n?-1:El(t).length;e=(""+e).toLowerCase(),i=!0}}function S1(t,e,r){var n,i,o=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(o=r=+r)!=o&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return -1;r=t.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof e&&(e=SG.from(e,n)),SG.isBuffer(e))return 0===e.length?-1:S5(t,e,r,n,i);if("number"==typeof e)return(e&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):S5(t,[e],r,n,i);throw TypeError("val must be string, number or Buffer")}function S5(t,e,r,n,i){var o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var l=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){for(var f=!0,h=0;h239?4:o>223?3:o>191?2:1;if(i+s<=r){var u=void 0,c=void 0,l=void 0,f=void 0;switch(s){case 1:o<128&&(a=o);break;case 2:(192&(u=t[i+1]))==128&&(f=(31&o)<<6|63&u)>127&&(a=f);break;case 3:u=t[i+1],c=t[i+2],(192&u)==128&&(192&c)==128&&(f=(15&o)<<12|(63&u)<<6|63&c)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:u=t[i+1],c=t[i+2],l=t[i+3],(192&u)==128&&(192&c)==128&&(192&l)==128&&(f=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var r="",n=0;nr)throw RangeError("Trying to access beyond buffer length")}function S4(t,e,r,n,i,o){if(!SG.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw RangeError("Index out of range")}function S7(t,e,r,n,i){Ea(e,n,i,t,r,7);var o=Number(e&BigInt(0xffffffff));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;var a=Number(e>>BigInt(32)&BigInt(0xffffffff));return t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,r}function S9(t,e,r,n,i){Ea(e,n,i,t,r,7);var o=Number(e&BigInt(0xffffffff));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;var a=Number(e>>BigInt(32)&BigInt(0xffffffff));return t[r+3]=a,a>>=8,t[r+2]=a,a>>=8,t[r+1]=a,a>>=8,t[r]=a,r+8}function Et(t,e,r,n,i,o){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function Ee(t,e,r,n,i){return e=+e,r>>>=0,i||Et(t,e,r,4,34028234663852886e22,-34028234663852886e22),ef(t,e,r,n,23,4),r+4}function Er(t,e,r,n,i){return e=+e,r>>>=0,i||Et(t,e,r,8,17976931348623157e292,-17976931348623157e292),ef(t,e,r,n,52,8),r+8}SG.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),SG.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(SG.prototype,"parent",{enumerable:!0,get:function(){if(SG.isBuffer(this))return this.buffer}}),Object.defineProperty(SG.prototype,"offset",{enumerable:!0,get:function(){if(SG.isBuffer(this))return this.byteOffset}}),SG.poolSize=8192,SG.from=function(t,e,r){return SY(t,e,r)},Object.setPrototypeOf(SG.prototype,Uint8Array.prototype),Object.setPrototypeOf(SG,Uint8Array),SG.alloc=function(t,e,r){return(SK(t),t<=0)?SW(t):void 0!==e?"string"==typeof r?SW(t).fill(e,r):SW(t).fill(e):SW(t)},SG.allocUnsafe=function(t){return SZ(t)},SG.allocUnsafeSlow=function(t){return SZ(t)},SG.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==SG.prototype},SG.compare=function(t,e){if(Ed(t,Uint8Array)&&(t=SG.from(t,t.offset,t.byteLength)),Ed(e,Uint8Array)&&(e=SG.from(e,e.offset,e.byteLength)),!SG.isBuffer(t)||!SG.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);in.length?(SG.isBuffer(o)||(o=SG.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(SG.isBuffer(o))o.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n},SG.byteLength=S0,SG.prototype._isBuffer=!0,SG.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e50&&(t+=" ... "),""},SH&&(SG.prototype[SH]=SG.prototype.inspect),SG.prototype.compare=function(t,e,r,n,i){if(Ed(t,Uint8Array)&&(t=SG.from(t,t.offset,t.byteLength)),!SG.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+(void 0===t?"undefined":(0,e_._)(t)));if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,a=r-e,s=Math.min(o,a),u=this.slice(n,i),c=t.slice(e,r),l=0;l>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,o,a,s,u,c,l,f,h=this.length-e;if((void 0===r||r>h)&&(r=h),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var d=!1;;)switch(n){case"hex":return function(t,e,r,n){r=Number(r)||0;var i,o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var a=e.length;for(n>a/2&&(n=a/2),i=0;i>8,i.push(r%256),i.push(n);return i}(t,this.length-l),this,l,f);default:if(d)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}},SG.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},SG.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||S6(t,e,this.length);for(var n=this[t],i=1,o=0;++o>>=0,e>>>=0,r||S6(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},SG.prototype.readUint8=SG.prototype.readUInt8=function(t,e){return t>>>=0,e||S6(t,1,this.length),this[t]},SG.prototype.readUint16LE=SG.prototype.readUInt16LE=function(t,e){return t>>>=0,e||S6(t,2,this.length),this[t]|this[t+1]<<8},SG.prototype.readUint16BE=SG.prototype.readUInt16BE=function(t,e){return t>>>=0,e||S6(t,2,this.length),this[t]<<8|this[t+1]},SG.prototype.readUint32LE=SG.prototype.readUInt32LE=function(t,e){return t>>>=0,e||S6(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+0x1000000*this[t+3]},SG.prototype.readUint32BE=SG.prototype.readUInt32BE=function(t,e){return t>>>=0,e||S6(t,4,this.length),0x1000000*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},SG.prototype.readBigUInt64LE=Ev(function(t){Es(t>>>=0,"offset");var e=this[t],r=this[t+7];(void 0===e||void 0===r)&&Eu(t,this.length-8);var n=e+256*this[++t]+65536*this[++t]+0x1000000*this[++t],i=this[++t]+256*this[++t]+65536*this[++t]+0x1000000*r;return BigInt(n)+(BigInt(i)<>>=0,"offset");var e=this[t],r=this[t+7];(void 0===e||void 0===r)&&Eu(t,this.length-8);var n=0x1000000*e+65536*this[++t]+256*this[++t]+this[++t],i=0x1000000*this[++t]+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<>>=0,e>>>=0,r||S6(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},SG.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||S6(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},SG.prototype.readInt8=function(t,e){return(t>>>=0,e||S6(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},SG.prototype.readInt16LE=function(t,e){t>>>=0,e||S6(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?0xffff0000|r:r},SG.prototype.readInt16BE=function(t,e){t>>>=0,e||S6(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?0xffff0000|r:r},SG.prototype.readInt32LE=function(t,e){return t>>>=0,e||S6(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},SG.prototype.readInt32BE=function(t,e){return t>>>=0,e||S6(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},SG.prototype.readBigInt64LE=Ev(function(t){Es(t>>>=0,"offset");var e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&Eu(t,this.length-8),(BigInt(this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24))<>>=0,"offset");var e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&Eu(t,this.length-8),(BigInt((e<<24)+65536*this[++t]+256*this[++t]+this[++t])<>>=0,e||S6(t,4,this.length),el(this,t,!0,23,4)},SG.prototype.readFloatBE=function(t,e){return t>>>=0,e||S6(t,4,this.length),el(this,t,!1,23,4)},SG.prototype.readDoubleLE=function(t,e){return t>>>=0,e||S6(t,8,this.length),el(this,t,!0,52,8)},SG.prototype.readDoubleBE=function(t,e){return t>>>=0,e||S6(t,8,this.length),el(this,t,!1,52,8)},SG.prototype.writeUintLE=SG.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;S4(this,t,e,r,i,0)}var o=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;S4(this,t,e,r,i,0)}var o=r-1,a=1;for(this[e+o]=255&t;--o>=0&&(a*=256);)this[e+o]=t/a&255;return e+r},SG.prototype.writeUint8=SG.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||S4(this,t,e,1,255,0),this[e]=255&t,e+1},SG.prototype.writeUint16LE=SG.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||S4(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},SG.prototype.writeUint16BE=SG.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||S4(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},SG.prototype.writeUint32LE=SG.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||S4(this,t,e,4,0xffffffff,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},SG.prototype.writeUint32BE=SG.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||S4(this,t,e,4,0xffffffff,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},SG.prototype.writeBigUInt64LE=Ev(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return S7(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),SG.prototype.writeBigUInt64BE=Ev(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return S9(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),SG.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);S4(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+r},SG.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);S4(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},SG.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||S4(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},SG.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||S4(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},SG.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||S4(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},SG.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||S4(this,t,e,4,0x7fffffff,-0x80000000),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},SG.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||S4(this,t,e,4,0x7fffffff,-0x80000000),t<0&&(t=0xffffffff+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},SG.prototype.writeBigInt64LE=Ev(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return S7(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),SG.prototype.writeBigInt64BE=Ev(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return S9(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),SG.prototype.writeFloatLE=function(t,e,r){return Ee(this,t,e,!0,r)},SG.prototype.writeFloatBE=function(t,e,r){return Ee(this,t,e,!1,r)},SG.prototype.writeDoubleLE=function(t,e,r){return Er(this,t,e,!0,r)},SG.prototype.writeDoubleBE=function(t,e,r){return Er(this,t,e,!1,r)},SG.prototype.copy=function(t,e,r,n){if(!SG.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i=n+4;r-=3)e="_".concat(t.slice(r-3,r)).concat(e);return"".concat(t.slice(0,r)).concat(e)}function Ea(t,e,r,n,i,o){if(t>r||t3?0===e||e===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat((o+1)*8).concat(s):">= -(2".concat(s," ** ").concat((o+1)*8-1).concat(s,") and < 2 ** ")+"".concat((o+1)*8-1).concat(s):">= ".concat(e).concat(s," and <= ").concat(r).concat(s),new En.ERR_OUT_OF_RANGE("value",a,t)}Es(i,"offset"),(void 0===n[i]||void 0===n[i+o])&&Eu(i,n.length-(o+1))}function Es(t,e){if("number"!=typeof t)throw new En.ERR_INVALID_ARG_TYPE(e,"number",t)}function Eu(t,e,r){if(Math.floor(t)!==t)throw Es(t,r),new En.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new En.ERR_BUFFER_OUT_OF_BOUNDS;throw new En.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(e),t)}Ei("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),Ei("ERR_INVALID_ARG_TYPE",function(t,e){return'The "'.concat(t,'" argument must be of type number. Received type ').concat(void 0===e?"undefined":(0,e_._)(e))},TypeError),Ei("ERR_OUT_OF_RANGE",function(t,e,r){var n='The value of "'.concat(t,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>0x100000000?i=Eo(String(r)):(void 0===r?"undefined":(0,e_._)(r))==="bigint"&&(i=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=Eo(i)),i+="n"),n+=" It must be ".concat(e,". Received ").concat(i)},RangeError);var Ec=/[^+/0-9A-Za-z-_]/g;function El(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],a=0;a55295&&r<57344){if(!i){if(r>56319||a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function Ef(t){return eu(function(t){if((t=(t=t.split("=")[0]).trim().replace(Ec,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Eh(t,e,r,n){var i;for(i=0;i=e.length)&&!(i>=t.length);++i)e[i+r]=t[i];return i}function Ed(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}var Ep=function(){for(var t="0123456789abcdef",e=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}();function Ev(t){return"undefined"==typeof BigInt?Eg:t}function Eg(){throw Error("BigInt not supported")}var Em=Sd.existsSync,Ey=Sd.readFileSync,Eb=Sd.dirname,Ew=Sd.join,Ex=Sd.SourceMapConsumer,ES=Sd.SourceMapGenerator,EE=/*#__PURE__*/function(){function t(e,r){if(wQ(this,t),!1!==r.map){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var n=r.map?r.map.prev:void 0,i=this.loadMap(r.from,n);!this.mapFile&&r.from&&(this.mapFile=r.from),this.mapFile&&(this.root=Eb(this.mapFile)),i&&(this.text=i)}}return w0(t,[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new Ex(this.text)),this.consumerCache}},{key:"decodeInline",value:function(t){var e,r=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(r)return decodeURIComponent(t.substr(r[0].length));var n=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(n)return e=t.substr(n[0].length),SG?SG.from(e,"base64").toString():window.atob(e);throw Error("Unsupported source map encoding "+t.match(/data:application\/json;([^,]+),/)[1])}},{key:"getAnnotationURL",value:function(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}},{key:"isMap",value:function(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}},{key:"loadAnnotation",value:function(t){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),n=t.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,n)))}}},{key:"loadFile",value:function(t){if(this.root=Eb(t),Em(t))return this.mapFile=t,Ey(t,"utf-8").toString().trim()}},{key:"loadMap",value:function(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"==typeof e){var r=e(t);if(r){var n=this.loadFile(r);if(!n)throw Error("Unable to load previous source map: "+r.toString());return n}}else if(e instanceof Ex)return ES.fromSourceMap(e).toString();else if(e instanceof ES)return e.toString();else if(this.isMap(e))return JSON.stringify(e);else throw Error("Unsupported previous source map format: "+e.toString())}else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){var i=this.annotation;return t&&(i=Ew(Eb(t),i)),this.loadFile(i)}}},{key:"startWith",value:function(t,e){return!!t&&t.substr(0,e.length)===e}},{key:"withContent",value:function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}]),t}();Sj=EE,EE.default=EE;var Ek=Symbol("fromOffsetCache"),EA=!!(SL&&SM),EO=!!(SR&&SC),EI=/*#__PURE__*/function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(wQ(this,t),null==e||"object"==typeof e&&!e.toString)throw Error("PostCSS received ".concat(e," instead of CSS string"));if(this.css=e.toString(),"\uFEFF"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,r.from&&(!EO||/^\w+:\/\//.test(r.from)||SC(r.from)?this.file=r.from:this.file=SR(r.from)),EO&&EA){var n=new Sj(this.css,r);if(n.text){this.map=n;var i=n.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}return w0(t,[{key:"error",value:function(t,e,r){var n,i,o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(e&&"object"==typeof e){var s=e,u=r;if("number"==typeof s.offset){var c=this.fromOffset(s.offset);e=c.line,r=c.col}else e=s.line,r=s.column;if("number"==typeof u.offset){var l=this.fromOffset(u.offset);i=l.line,n=l.col}else i=u.line,n=u.column}else if(!r){var f=this.fromOffset(e);e=f.line,r=f.col}var h=this.origin(e,r,i,n);return(o=h?new Sc(t,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,a.plugin):new Sc(t,void 0===i?e:{column:r,line:e},void 0===i?r:{column:n,line:i},this.css,this.file,a.plugin)).input={column:r,endColumn:n,endLine:i,line:e,source:this.css},this.file&&(SB&&(o.input.url=SB(this.file).toString()),o.input.file=this.file),o}},{key:"fromOffset",value:function(t){if(this[Ek])s=this[Ek];else{var e=this.css.split("\n");s=Array(e.length);for(var r=0,n=0,i=e.length;n=a)o=s.length-1;else for(var a,s,u,c=s.length-2;o>1)])c=u-1;else if(t>=s[u+1])o=u+1;else{o=u;break}return{col:t-s[o]+1,line:o+1}}},{key:"mapResolve",value:function(t){return/^\w+:\/\//.test(t)?t:SR(this.map.consumer().sourceRoot||this.map.root||".",t)}},{key:"origin",value:function(t,e,r,n){if(!this.map)return!1;var i,o,a=this.map.consumer(),s=a.originalPositionFor({column:e,line:t});if(!s.source)return!1;"number"==typeof r&&(i=a.originalPositionFor({column:n,line:r})),o=SC(s.source)?SB(s.source):new URL(s.source,this.map.consumer().sourceRoot||SB(this.map.mapFile));var u={column:s.column,endColumn:i&&i.column,endLine:i&&i.line,line:s.line,url:o.toString()};if("file:"===o.protocol){if(SD)u.file=SD(o);else throw Error("file: protocol is not available in this PostCSS build")}var c=a.sourceContentFor(s.source);return c&&(u.source=c),u}},{key:"toJSON",value:function(){for(var t={},e=0,r=["hasBOM","css","file","id"];e1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)try{for(var u,c=i[Symbol.iterator]();!(o=(u=c.next()).done);o=!0)u.value.raws.before=e.raws.before}catch(t){a=!0,s=t}finally{try{o||null==c.return||c.return()}finally{if(a)throw s}}}return i}},{key:"removeChild",value:function(t,e){var n=this.index(t);return!e&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),So(xI(r.prototype),"removeChild",this).call(this,t)}},{key:"toResult",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new eh(new ed,this,t).stringify()}}]),r}(Sa);EN.registerLazyResult=function(t){eh=t},EN.registerProcessor=function(t){ed=t},ET=EN,EN.default=EN,Sa.registerRoot(EN);var E_={},EP={},EC={comma:function(t){return EC.split(t,[","],!0)},space:function(t){return EC.split(t,[" ","\n"," "])},split:function(t,e,r){var n=[],i="",o=!1,a=0,s=!1,u="",c=!1,l=!0,f=!1,h=void 0;try{for(var d,p=t[Symbol.iterator]();!(l=(d=p.next()).done);l=!0){var v=d.value;c?c=!1:"\\"===v?c=!0:s?v===u&&(s=!1):'"'===v||"'"===v?(s=!0,u=v):"("===v?a+=1:")"===v?a>0&&(a-=1):0===a&&e.includes(v)&&(o=!0),o?(""!==i&&n.push(i.trim()),i="",o=!1):i+=v}}catch(t){f=!0,h=t}finally{try{l||null==p.return||p.return()}finally{if(f)throw h}}return(r||""!==i)&&n.push(i.trim()),n}};EP=EC,EC.default=EC;var ER=/*#__PURE__*/function(t){xS(r,t);var e=x_(r);function r(t){var n;return wQ(this,r),(n=e.call(this,t)).type="rule",n.nodes||(n.nodes=[]),n}return w0(r,[{key:"selectors",get:function(){return EP.comma(this.selector)},set:function(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}}]),r}(Sa);function EL(t,e){if(Array.isArray(t))return t.map(function(t){return EL(t)});var r=t.inputs,n=SN(t,["inputs"]);if(r){e=[];var i=!0,o=!1,a=void 0;try{for(var s,u=r[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value,l=xz(xk({},c),{__proto__:S_.prototype});l.map&&(l.map=xz(xk({},l.map),{__proto__:Sj.prototype})),e.push(l)}}catch(t){o=!0,a=t}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}}if(n.nodes&&(n.nodes=t.nodes.map(function(t){return EL(t,e)})),n.source){var f=n.source,h=f.inputId,d=SN(f,["inputId"]);n.source=d,null!=h&&(n.source.input=e[h])}if("root"===n.type)return new ET(n);if("decl"===n.type)return new SS(n);if("rule"===n.type)return new E_(n);if("comment"===n.type)return new Ss(n);if("atrule"===n.type)return new Si(n);throw Error("Unknown node type: "+t.type)}E_=ER,ER.default=ER,Sa.registerRule(ER),ST=EL,EL.default=EL;var EM={};function ED(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r,n,i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o=[],a=!0,s=!1;try{for(i=i.call(t);!(a=(r=i.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,n=t}finally{try{a||null==i.return||i.return()}finally{if(s)throw n}}return o}}(t,e)||Sr(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var eT=(ek("bgUiC"),ek("bgUiC")),EB={},Ej=Sd.dirname,EU=Sd.relative,Eq=Sd.resolve,EF=Sd.sep,Ez=Sd.SourceMapConsumer,EV=Sd.SourceMapGenerator,E$=Sd.pathToFileURL,EH=!!(Ez&&EV),EW=!!(Ej&&Eq&&EU&&EF);EB=/*#__PURE__*/function(){function t(e,r,n,i){wQ(this,t),this.stringify=e,this.mapOpts=n.map||{},this.root=r,this.opts=n,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}return w0(t,[{key:"addAnnotation",value:function(){t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var t,e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}},{key:"applyPrevMaps",value:function(){var t=!0,e=!1,r=void 0;try{for(var n,i=this.previous()[Symbol.iterator]();!(t=(n=i.next()).done);t=!0){var o=n.value,a=this.toUrl(this.path(o.file)),s=o.root||Ej(o.file),u=void 0;!1===this.mapOpts.sourcesContent?(u=new Ez(o.text)).sourcesContent&&(u.sourcesContent=null):u=o.consumer(),this.map.applySourceMap(u,a,this.toUrl(this.path(s)))}}catch(t){e=!0,r=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw r}}}},{key:"clearAnnotation",value:function(){if(!1!==this.mapOpts.annotation){if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}}},{key:"generate",value:function(){if(this.clearAnnotation(),EW&&EH&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,function(e){t+=e}),[t]}},{key:"generateMap",value:function(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=EV.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new EV({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return(this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline())?[this.css]:[this.css,this.map]}},{key:"generateString",value:function(){var t,e,r=this;this.css="",this.map=new EV({file:this.outputFile(),ignoreInvalidMapping:!0});var n=1,i=1,o="",a={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(s,u,c){if(r.css+=s,u&&"end"!==c&&(a.generated.line=n,a.generated.column=i-1,u.source&&u.source.start?(a.source=r.sourcePath(u),a.original.line=u.source.start.line,a.original.column=u.source.start.column-1):(a.source=o,a.original.line=1,a.original.column=0),r.map.addMapping(a)),(e=s.match(/\n/g))?(n+=e.length,t=s.lastIndexOf("\n"),i=s.length-t):i+=s.length,u&&"start"!==c){var l=u.parent||{raws:{}};(!("decl"===u.type||"atrule"===u.type&&!u.nodes)||u!==l.last||l.raws.semicolon)&&(u.source&&u.source.end?(a.source=r.sourcePath(u),a.original.line=u.source.end.line,a.original.column=u.source.end.column-1,a.generated.line=n,a.generated.column=i-2):(a.source=o,a.original.line=1,a.original.column=0,a.generated.line=n,a.generated.column=i-1),r.map.addMapping(a))}})}},{key:"isAnnotation",value:function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(t){return t.annotation}))}},{key:"isInline",value:function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some(function(t){return t.inline}))}},{key:"isMap",value:function(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}},{key:"isSourcesContent",value:function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(t){return t.withContent()})}},{key:"outputFile",value:function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}},{key:"path",value:function(t){if(this.mapOpts.absolute||60===t.charCodeAt(0)||/^\w+:\/\//.test(t))return t;var e=this.memoizedPaths.get(t);if(e)return e;var r=this.opts.to?Ej(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Ej(Eq(r,this.mapOpts.annotation)));var n=EU(r,t);return this.memoizedPaths.set(t,n),n}},{key:"previous",value:function(){var t=this;if(!this.previousMaps){if(this.previousMaps=[],this.root)this.root.walk(function(e){if(e.source&&e.source.input.map){var r=e.source.input.map;t.previousMaps.includes(r)||t.previousMaps.push(r)}});else{var e=new S_(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}}return this.previousMaps}},{key:"setSourcesContent",value:function(){var t=this,e={};if(this.root)this.root.walk(function(r){if(r.source){var n=r.source.input.from;if(n&&!e[n]){e[n]=!0;var i=t.usesFileUrls?t.toFileUrl(n):t.toUrl(t.path(n));t.map.setSourceContent(i,r.source.input.css)}}});else if(this.css){var r=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(r,this.css)}}},{key:"sourcePath",value:function(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}},{key:"toBase64",value:function(t){return SG?SG.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}},{key:"toFileUrl",value:function(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(E$){var r=E$(t).toString();return this.memoizedFileURLs.set(t,r),r}throw Error("`map.absolute` option is not available in this PostCSS build")}},{key:"toUrl",value:function(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===EF&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}}]),t}();var EG={},EY={},EK={},EZ=/[\t\n\f\r "#'()/;[\\\]{}]/g,EJ=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,EQ=/.[\r\n"'(/\\]/,EX=/[\da-f]/i;EK=function(t){var e,r,n,i,o,a,s,u,c,l,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=t.css.valueOf(),d=f.ignoreErrors,p=h.length,v=0,g=[],m=[];function y(e){throw t.error("Unclosed "+e,v)}return{back:function(t){m.push(t)},endOfFile:function(){return 0===m.length&&v>=p},nextToken:function(t){if(m.length)return m.pop();if(!(v>=p)){var f=!!t&&t.ignoreUnclosed;switch(e=h.charCodeAt(v)){case 10:case 32:case 9:case 13:case 12:i=v;do i+=1,e=h.charCodeAt(i);while(32===e||10===e||9===e||13===e||12===e)a=["space",h.slice(v,i)],v=i-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:var b=String.fromCharCode(e);a=[b,b,v];break;case 40:if(l=g.length?g.pop()[1]:"",c=h.charCodeAt(v+1),"url"===l&&39!==c&&34!==c&&32!==c&&10!==c&&9!==c&&12!==c&&13!==c){i=v;do{if(s=!1,-1===(i=h.indexOf(")",i+1))){if(d||f){i=v;break}y("bracket")}for(u=i;92===h.charCodeAt(u-1);)u-=1,s=!s}while(s)a=["brackets",h.slice(v,i+1),v,i],v=i}else i=h.indexOf(")",v+1),r=h.slice(v,i+1),-1===i||EQ.test(r)?a=["(","(",v]:(a=["brackets",r,v,i],v=i);break;case 39:case 34:o=39===e?"'":'"',i=v;do{if(s=!1,-1===(i=h.indexOf(o,i+1))){if(d||f){i=v+1;break}y("string")}for(u=i;92===h.charCodeAt(u-1);)u-=1,s=!s}while(s)a=["string",h.slice(v,i+1),v,i],v=i;break;case 64:EZ.lastIndex=v+1,EZ.test(h),i=0===EZ.lastIndex?h.length-1:EZ.lastIndex-2,a=["at-word",h.slice(v,i+1),v,i],v=i;break;case 92:for(i=v,n=!0;92===h.charCodeAt(i+1);)i+=1,n=!n;if(e=h.charCodeAt(i+1),n&&47!==e&&32!==e&&10!==e&&9!==e&&13!==e&&12!==e&&(i+=1,EX.test(h.charAt(i)))){for(;EX.test(h.charAt(i+1));)i+=1;32===h.charCodeAt(i+1)&&(i+=1)}a=["word",h.slice(v,i+1),v,i],v=i;break;default:47===e&&42===h.charCodeAt(v+1)?(0===(i=h.indexOf("*/",v+2)+1)&&(d||f?i=h.length:y("comment")),a=["comment",h.slice(v,i+1),v,i]):(EJ.lastIndex=v+1,EJ.test(h),i=0===EJ.lastIndex?h.length-1:EJ.lastIndex-2,a=["word",h.slice(v,i+1),v,i],g.push(a)),v=i}return v++,a}},position:function(){return v}}};var E0={empty:!0,space:!0};function E1(t,e){var r=new S_(t,e),n=new EY(r);try{n.parse()}catch(t){throw t}return n.root}EY=/*#__PURE__*/function(){function t(e){wQ(this,t),this.input=e,this.root=new ET,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}return w0(t,[{key:"atrule",value:function(t){var e,r,n,i=new Si;i.name=t[1].slice(1),""===i.name&&this.unnamedAtrule(i,t),this.init(i,t[2]);for(var o=!1,a=!1,s=[],u=[];!this.tokenizer.endOfFile();){if("("===(e=(t=this.tokenizer.nextToken())[0])||"["===e?u.push("("===e?")":"]"):"{"===e&&u.length>0?u.push("}"):e===u[u.length-1]&&u.pop(),0===u.length){if(";"===e){i.source.end=this.getPosition(t[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===e){a=!0;break}if("}"===e){if(s.length>0){for(n=s.length-1,r=s[n];r&&"space"===r[0];)r=s[--n];r&&(i.source.end=this.getPosition(r[3]||r[2]),i.source.end.offset++)}this.end(t);break}s.push(t)}else s.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(i.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(i,"params",s),o&&(t=s[s.length-1],i.source.end=this.getPosition(t[3]||t[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),a&&(i.nodes=[],this.current=i)}},{key:"checkMissedSemicolon",value:function(t){var e,r=this.colon(t);if(!1!==r){for(var n=0,i=r-1;i>=0&&("space"===(e=t[i])[0]||2!==(n+=1));i--);throw this.input.error("Missed semicolon","word"===e[0]?e[3]+1:e[2])}}},{key:"colon",value:function(t){var e=0,r=!0,n=!1,i=void 0;try{for(var o,a,s,u=t.entries()[Symbol.iterator]();!(r=(s=u.next()).done);r=!0){var c=ED(s.value,2),l=c[0],f=c[1];if(a=f[0],"("===a&&(e+=1),")"===a&&(e-=1),0===e&&":"===a){if(o){if("word"===o[0]&&"progid"===o[1])continue;return l}this.doubleColon(f)}o=f}}catch(t){n=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(n)throw i}}return!1}},{key:"comment",value:function(t){var e=new Ss;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;var r=t[1].slice(2,-2);if(/^\s*$/.test(r))e.text="",e.raws.left=r,e.raws.right="";else{var n=r.match(/^(\s*)([^]*\S)(\s*)$/);e.text=n[2],e.raws.left=n[1],e.raws.right=n[3]}}},{key:"createTokenizer",value:function(){this.tokenizer=EK(this.input)}},{key:"decl",value:function(t,e){var r,n,i=new SS;this.init(i,t[0][2]);var o=t[t.length-1];for(";"===o[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(o[3]||o[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],n=r[3]||r[2];if(n)return n}}(t)),i.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){var a=t[0][0];if(":"===a||"space"===a||"comment"===a)break;i.prop+=t.shift()[1]}for(i.raws.between="";t.length;){if(":"===(r=t.shift())[0]){i.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),i.raws.between+=r[1]}("_"===i.prop[0]||"*"===i.prop[0])&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var s=[];t.length&&("space"===(n=t[0][0])||"comment"===n);)s.push(t.shift());this.precheckMissedSemicolon(t);for(var u=t.length-1;u>=0;u--){if("!important"===(r=t[u])[1].toLowerCase()){i.important=!0;var c=this.stringFrom(t,u);" !important"!==(c=this.spacesFromEnd(t)+c)&&(i.raws.important=c);break}if("important"===r[1].toLowerCase()){for(var l=t.slice(0),f="",h=u;h>0;h--){var d=l[h][0];if(f.trim().startsWith("!")&&"space"!==d)break;f=l.pop()[1]+f}f.trim().startsWith("!")&&(i.important=!0,i.raws.important=f,t=l)}if("space"!==r[0]&&"comment"!==r[0])break}t.some(function(t){return"space"!==t[0]&&"comment"!==t[0]})&&(i.raws.between+=s.map(function(t){return t[1]}).join(""),s=[]),this.raw(i,"value",s.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}},{key:"doubleColon",value:function(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}},{key:"emptyRule",value:function(t){var e=new E_;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}},{key:"end",value:function(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}},{key:"endFile",value:function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}},{key:"freeSemicolon",value:function(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}},{key:"getPosition",value:function(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}},{key:"init",value:function(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}},{key:"other",value:function(t){for(var e=!1,r=null,n=!1,i=null,o=[],a=t[1].startsWith("--"),s=[],u=t;u;){if(r=u[0],s.push(u),"("===r||"["===r)i||(i=u),o.push("("===r?")":"]");else if(a&&n&&"{"===r)i||(i=u),o.push("}");else if(0===o.length){if(";"===r){if(n){this.decl(s,a);return}break}if("{"===r){this.rule(s);return}if("}"===r){this.tokenizer.back(s.pop()),e=!0;break}":"===r&&(n=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),o.length>0&&this.unclosedBracket(i),e&&n){if(!a)for(;s.length&&("space"===(u=s[s.length-1][0])||"comment"===u);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}},{key:"parse",value:function(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}},{key:"precheckMissedSemicolon",value:function(){}},{key:"raw",value:function(t,e,r,n){for(var i,o,a,s,u=r.length,c="",l=!0,f=0;f1&&void 0!==arguments[1]?arguments[1]:{};if(wQ(this,t),this.type="warning",this.text=e,r.node&&r.node.source){var n=r.node.rangeBy(r);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var i in r)this[i]=r[i]}return w0(t,[{key:"toString",value:function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}]),t}();E3=E5,E5.default=E5;var E8=/*#__PURE__*/function(){function t(e,r,n){wQ(this,t),this.processor=e,this.messages=[],this.root=r,this.opts=n,this.css=void 0,this.map=void 0}return w0(t,[{key:"toString",value:function(){return this.css}},{key:"warn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!e.plugin&&this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);var r=new E3(t,e);return this.messages.push(r),r}},{key:"warnings",value:function(){return this.messages.filter(function(t){return"warning"===t.type})}},{key:"content",get:function(){return this.css}}]),t}();E2=E8,E8.default=E8;var E6={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},E4={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},E7={Once:!0,postcssPlugin:!0,prepare:!0};function E9(t){return"object"==typeof t&&"function"==typeof t.then}function kt(t){var e=!1,r=E6[t.type];return("decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append)?[r,r+"-"+e,0,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function ke(t){return{eventIndex:0,events:"document"===t.type?["Document",0,"DocumentExit"]:"root"===t.type?["Root",0,"RootExit"]:kt(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function kr(t){return t[et]=!1,t.nodes&&t.nodes.forEach(function(t){return kr(t)}),t}var kn={},ki=/*#__PURE__*/function(){function t(e,r,n){var i,o=this;if(wQ(this,t),this.stringified=!1,this.processed=!1,"object"==typeof r&&null!==r&&("root"===r.type||"document"===r.type))i=kr(r);else if(r instanceof t||r instanceof E2)i=kr(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{var a=EG;n.syntax&&(a=n.syntax.parse),n.parser&&(a=n.parser),a.parse&&(a=a.parse);try{i=a(r,n)}catch(t){this.processed=!0,this.error=t}i&&!i[ee]&&Sa.rebuild(i)}this.result=new E2(e,i,n),this.helpers=xz(xk({},kn),{postcss:kn,result:this.result}),this.plugins=this.processor.plugins.map(function(t){return"object"==typeof t&&t.prepare?xk({},t,t.prepare(o.result)):t})}return w0(t,[{key:"async",value:function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}},{key:"catch",value:function(t){return this.async().catch(t)}},{key:"finally",value:function(t){return this.async().then(t,t)}},{key:"getAsyncError",value:function(){throw Error("Use process(css).then(cb) to work with async plugins")}},{key:"handleError",value:function(t,e){var r=this.result.lastPlugin;try{e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin?r.postcssVersion:(t.plugin=r.postcssPlugin,t.setMessage())}catch(t){console&&console.error&&console.error(t)}return t}},{key:"prepareVisitors",value:function(){var t=this;this.listeners={};var e=function(e,r,n){t.listeners[r]||(t.listeners[r]=[]),t.listeners[r].push([e,n])},r=!0,n=!1,i=void 0;try{for(var o,a=this.plugins[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){var s=o.value;if("object"==typeof s)for(var u in s){if(!E4[u]&&/^[A-Z]/.test(u))throw Error("Unknown event ".concat(u," in ").concat(s.postcssPlugin,". ")+"Try to update PostCSS (".concat(this.processor.version," now)."));if(!E7[u]){if("object"==typeof s[u])for(var c in s[u])e(s,"*"===c?u:u+"-"+c.toLowerCase(),s[u][c]);else"function"==typeof s[u]&&e(s,u,s[u])}}}}catch(t){n=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}this.hasListener=Object.keys(this.listeners).length>0}},{key:"runAsync",value:function(){var t=this;return eI(function(){var e,r,n,i,o,a,s,u,c,l,f,h,d,p,v,g;return(0,eT.__generator)(this,function(m){switch(m.label){case 0:t.plugin=0,e=0,m.label=1;case 1:if(!(e0))return[3,13];if(!E9(s=t.visitTick(a)))return[3,12];m.label=9;case 9:return m.trys.push([9,11,,12]),[4,s];case 10:return m.sent(),[3,12];case 11:throw u=m.sent(),c=a[a.length-1].node,t.handleError(u,c);case 12:return[3,8];case 13:return[3,7];case 14:if(l=!0,f=!1,h=void 0,!t.listeners.OnceExit)return[3,22];m.label=15;case 15:m.trys.push([15,20,21,22]),d=function(){var e,r,n,i;return(0,eT.__generator)(this,function(a){switch(a.label){case 0:r=(e=ED(v.value,2))[0],n=e[1],t.result.lastPlugin=r,a.label=1;case 1:if(a.trys.push([1,6,,7]),"document"!==o.type)return[3,3];return[4,Promise.all(o.nodes.map(function(e){return n(e,t.helpers)}))];case 2:return a.sent(),[3,5];case 3:return[4,n(o,t.helpers)];case 4:a.sent(),a.label=5;case 5:return[3,7];case 6:throw i=a.sent(),t.handleError(i);case 7:return[2]}})},p=t.listeners.OnceExit[Symbol.iterator](),m.label=16;case 16:if(l=(v=p.next()).done)return[3,19];return[5,(0,eT.__values)(d())];case 17:m.sent(),m.label=18;case 18:return l=!0,[3,16];case 19:return[3,22];case 20:return g=m.sent(),f=!0,h=g,[3,22];case 21:try{l||null==p.return||p.return()}finally{if(f)throw h}return[7];case 22:return t.processed=!0,[2,t.stringify()]}})})()}},{key:"runOnRoot",value:function(t){var e=this;this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var r=this.result.root.nodes.map(function(r){return t.Once(r,e.helpers)});if(E9(r[0]))return Promise.all(r);return r}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}},{key:"stringify",value:function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=Sy;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=new EB(e,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}},{key:"sync",value:function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();var t=!0,e=!1,r=void 0;try{for(var n,i=this.plugins[Symbol.iterator]();!(t=(n=i.next()).done);t=!0){var o=n.value,a=this.runOnRoot(o);if(E9(a))throw this.getAsyncError()}}catch(t){e=!0,r=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw r}}if(this.prepareVisitors(),this.hasListener){for(var s=this.result.root;!s[et];)s[et]=!0,this.walkSync(s);if(this.listeners.OnceExit){var u=!0,c=!1,l=void 0;if("document"===s.type)try{for(var f,h=s.nodes[Symbol.iterator]();!(u=(f=h.next()).done);u=!0){var d=f.value;this.visitSync(this.listeners.OnceExit,d)}}catch(t){c=!0,l=t}finally{try{u||null==h.return||h.return()}finally{if(c)throw l}}else this.visitSync(this.listeners.OnceExit,s)}}return this.result}},{key:"then",value:function(t,e){return this.async().then(t,e)}},{key:"toString",value:function(){return this.css}},{key:"visitSync",value:function(t,e){var r=!0,n=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){var s=ED(o.value,2),u=s[0],c=s[1];this.result.lastPlugin=u;var l=void 0;try{l=c(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(E9(l))throw this.getAsyncError()}}catch(t){n=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}}},{key:"visitTick",value:function(t){var e=t[t.length-1],r=e.node,n=e.visitors;if("root"!==r.type&&"document"!==r.type&&!r.parent){t.pop();return}if(n.length>0&&e.visitorIndex0&&void 0!==arguments[0]?arguments[0]:[];wQ(this,t),this.version="8.4.47",this.plugins=this.normalize(e)}return w0(t,[{key:"normalize",value:function(t){var e=[],r=!0,n=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){var s=o.value;if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))e=e.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)e.push(s);else if("function"==typeof s)e.push(s);else if("object"==typeof s&&(s.parse||s.stringify));else throw Error(s+" is not a PostCSS plugin")}}catch(t){n=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}return e}},{key:"process",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.plugins.length||e.parser||e.stringifier||e.syntax?new EM(this,t,e):new ka(this,t,e)}},{key:"use",value:function(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}}]),t}();function kc(){for(var t=arguments.length,e=Array(t),r=0;r]+$/;function km(t,e,r){if(null==t)return"";"number"==typeof t&&(t=t.toString());var n,i,o,a,s,u,c,l,f,h="",d="";function p(t,e){var r=this;this.tag=t,this.attribs=e||{},this.tagPosition=h.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(s.length){var t=s[s.length-1];t.text+=r.text}},this.updateParentNodeMediaChildren=function(){s.length&&kf.includes(this.tag)&&s[s.length-1].mediaChildren.push(this.tag)}}(e=Object.assign({},km.defaults,e)).parser=Object.assign({},ky,e.parser);var v=function(t){return!1===e.allowedTags||(e.allowedTags||[]).indexOf(t)>-1};kh.forEach(function(t){v(t)&&!e.allowVulnerableTags&&console.warn("\n\n⚠️ Your `allowedTags` option includes, `".concat(t,"`, which is inherently\nvulnerable to XSS attacks. Please remove it from `allowedTags`.\nOr, to disable this warning, add the `allowVulnerableTags` option\nand ensure you are accounting for this risk.\n\n"))});var g=e.nonTextTags||["script","style","textarea","option"];e.allowedAttributes&&(n={},i={},kd(e.allowedAttributes,function(t,e){n[e]=[];var r=[];t.forEach(function(t){"string"==typeof t&&t.indexOf("*")>=0?r.push(xQ(t).replace(/\\\*/g,".*")):n[e].push(t)}),r.length&&(i[e]=RegExp("^("+r.join("|")+")$"))}));var m={},y={},b={};kd(e.allowedClasses,function(t,e){if(n&&(kp(n,e)||(n[e]=[]),n[e].push("class")),m[e]=t,Array.isArray(t)){var r=[];m[e]=[],b[e]=[],t.forEach(function(t){"string"==typeof t&&t.indexOf("*")>=0?r.push(xQ(t).replace(/\\\*/g,".*")):t instanceof RegExp?b[e].push(t):m[e].push(t)}),r.length&&(y[e]=RegExp("^("+r.join("|")+")$"))}});var w={};kd(e.transformTags,function(t,e){var r;"function"==typeof t?r=t:"string"==typeof t&&(r=km.simpleTransform(t)),"*"===e?o=r:w[e]=r});var x=!1;E();var S=new xw({onopentag:function(t,r){if(e.enforceHtmlBoundary&&"html"===t&&E(),l){f++;return}var S,T=new p(t,r);s.push(T);var N=!1,_=!!T.text;if(kp(w,t)&&(S=w[t](t,r),T.attribs=r=S.attribs,void 0!==S.text&&(T.innerText=S.text),t!==S.tagName&&(T.name=t=S.tagName,c[a]=S.tagName)),o&&(S=o(t,r),T.attribs=r=S.attribs,t!==S.tagName&&(T.name=t=S.tagName,c[a]=S.tagName)),(!v(t)||"recursiveEscape"===e.disallowedTagsMode&&!function(t){for(var e in t)if(kp(t,e))return!1;return!0}(u)||null!=e.nestingLimit&&a>=e.nestingLimit)&&(N=!0,u[a]=!0,("discard"===e.disallowedTagsMode||"completelyDiscard"===e.disallowedTagsMode)&&-1!==g.indexOf(t)&&(l=!0,f=1),u[a]=!0),a++,N){if("discard"===e.disallowedTagsMode||"completelyDiscard"===e.disallowedTagsMode)return;d=h,h=""}h+="<"+t,"script"===t&&(e.allowedScriptHostnames||e.allowedScriptDomains)&&(T.innerText=""),(!n||kp(n,t)||n["*"])&&kd(r,function(r,o){if(!kg.test(o)||""===r&&!e.allowedEmptyAttributes.includes(o)&&(e.nonBooleanAttributes.includes(o)||e.nonBooleanAttributes.includes("*"))){delete T.attribs[o];return}var a=!1;if(!n||kp(n,t)&&-1!==n[t].indexOf(o)||n["*"]&&-1!==n["*"].indexOf(o)||kp(i,t)&&i[t].test(o)||i["*"]&&i["*"].test(o))a=!0;else if(n&&n[t]){var s=!0,u=!1,c=void 0;try{for(var l,f=n[t][Symbol.iterator]();!(s=(l=f.next()).done);s=!0){var d=l.value;if(x0(d)&&d.name&&d.name===o){a=!0;var p="";if(!0===d.multiple){var v=r.split(" "),g=!0,w=!1,x=void 0;try{for(var S,E=v[Symbol.iterator]();!(g=(S=E.next()).done);g=!0){var N=S.value;-1!==d.values.indexOf(N)&&(""===p?p=N:p+=" "+N)}}catch(t){w=!0,x=t}finally{try{g||null==E.return||E.return()}finally{if(w)throw x}}}else d.values.indexOf(r)>=0&&(p=r);r=p}}}catch(t){u=!0,c=t}finally{try{s||null==f.return||f.return()}finally{if(u)throw c}}}if(a){if(-1!==e.allowedSchemesAppliedToAttributes.indexOf(o)&&A(t,r)){delete T.attribs[o];return}if("script"===t&&"src"===o){var _=!0;try{var P=O(r);if(e.allowedScriptHostnames||e.allowedScriptDomains){var C=(e.allowedScriptHostnames||[]).find(function(t){return t===P.url.hostname}),R=(e.allowedScriptDomains||[]).find(function(t){return P.url.hostname===t||P.url.hostname.endsWith(".".concat(t))});_=C||R}}catch(t){_=!1}if(!_){delete T.attribs[o];return}}if("iframe"===t&&"src"===o){var L=!0;try{var M=O(r);if(M.isRelativeUrl)L=kp(e,"allowIframeRelativeUrls")?e.allowIframeRelativeUrls:!e.allowedIframeHostnames&&!e.allowedIframeDomains;else if(e.allowedIframeHostnames||e.allowedIframeDomains){var D=(e.allowedIframeHostnames||[]).find(function(t){return t===M.url.hostname}),B=(e.allowedIframeDomains||[]).find(function(t){return M.url.hostname===t||M.url.hostname.endsWith(".".concat(t))});L=D||B}}catch(t){L=!1}if(!L){delete T.attribs[o];return}}if("srcset"===o)try{var j=x9(r);if(j.forEach(function(t){A("srcset",t.url)&&(t.evil=!0)}),(j=kv(j,function(t){return!t.evil})).length)r=kv(j,function(t){return!t.evil}).map(function(t){if(!t.url)throw Error("URL missing");return t.url+(t.w?" ".concat(t.w,"w"):"")+(t.h?" ".concat(t.h,"h"):"")+(t.d?" ".concat(t.d,"x"):"")}).join(", "),T.attribs[o]=r;else{delete T.attribs[o];return}}catch(t){delete T.attribs[o];return}if("class"===o){var U=m[t],q=m["*"],F=y[t],z=b[t],V=b["*"],$=[F,y["*"]].concat(z,V).filter(function(t){return t});if(!(r=U&&q?I(r,x1(U,q),$):I(r,U||q,$)).length){delete T.attribs[o];return}}if("style"===o){if(e.parseStyleAttributes)try{var H=kl(t+" {"+r+"}",{map:!1});if(r=(function(t,e){if(!e)return t;var r,n=t.nodes[0];return(r=e[n.selector]&&e["*"]?x1(e[n.selector],e["*"]):e[n.selector]||e["*"])&&(t.nodes[0].nodes=n.nodes.reduce(function(t,e){return kp(r,e.prop)&&r[e.prop].some(function(t){return t.test(e.value)})&&t.push(e),t},[])),t})(H,e.allowedStyles).nodes[0].nodes.reduce(function(t,e){return t.push("".concat(e.prop,":").concat(e.value).concat(e.important?" !important":"")),t},[]).join(";"),0===r.length){delete T.attribs[o];return}}catch(e){"undefined"!=typeof window&&console.warn('Failed to parse "'+t+" {"+r+"}\", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547"),delete T.attribs[o];return}else if(e.allowedStyles)throw Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}h+=" "+o,r&&r.length?h+='="'+k(r,!0)+'"':e.allowedEmptyAttributes.includes(o)&&(h+='=""')}else delete T.attribs[o]}),-1!==e.selfClosing.indexOf(t)?h+=" />":(h+=">",!T.innerText||_||e.textFilter||(h+=k(T.innerText),x=!0)),N&&(h=d+k(h),d="")},ontext:function(t){if(!l){var r,n=s[s.length-1];if(n&&(r=n.tag,t=void 0!==n.innerText?n.innerText:t),"completelyDiscard"!==e.disallowedTagsMode||v(r)){if(("discard"===e.disallowedTagsMode||"completelyDiscard"===e.disallowedTagsMode)&&("script"===r||"style"===r))h+=t;else{var i=k(t,!1);e.textFilter&&!x?h+=e.textFilter(i,r):x||(h+=i)}}else t="";if(s.length){var o=s[s.length-1];o.text+=t}}},onclosetag:function(t,r){if(l){if(--f)return;l=!1}var n=s.pop();if(n){if(n.tag!==t){s.push(n);return}l=!!e.enforceHtmlBoundary&&"html"===t;var i=u[--a];if(i){if(delete u[a],"discard"===e.disallowedTagsMode||"completelyDiscard"===e.disallowedTagsMode){n.updateParentNodeText();return}d=h,h=""}if(c[a]&&(t=c[a],delete c[a]),e.exclusiveFilter&&e.exclusiveFilter(n)){h=h.substr(0,n.tagPosition);return}if(n.updateParentNodeMediaChildren(),n.updateParentNodeText(),-1!==e.selfClosing.indexOf(t)||r&&!v(t)&&["escape","recursiveEscape"].indexOf(e.disallowedTagsMode)>=0){i&&(h=d,d="");return}h+="",i&&(h=d+k(h),d=""),x=!1}}},e.parser);return S.write(t),S.end(),h;function E(){h="",a=0,s=[],u={},c={},l=!1,f=0}function k(t,r){return"string"!=typeof t&&(t+=""),e.parser.decodeEntities&&(t=t.replace(/&/g,"&").replace(//g,">"),r&&(t=t.replace(/"/g,"""))),t=t.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(//g,">"),r&&(t=t.replace(/"/g,""")),t}function A(t,r){for(r=r.replace(/[\x00-\x20]+/g,"");;){var n=r.indexOf("",n+4);if(-1===i)break;r=r.substring(0,n)+r.substring(i+3)}var o=r.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!o)return!!r.match(/^[/\\]{2}/)&&!e.allowProtocolRelative;var a=o[1].toLowerCase();return kp(e.allowedSchemesByTag,t)?-1===e.allowedSchemesByTag[t].indexOf(a):!e.allowedSchemes||-1===e.allowedSchemes.indexOf(a)}function O(t){if((t=t.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//")).startsWith("relative:"))throw Error("relative: exploit attempt");for(var e="relative://relative-site",r=0;r<100;r++)e+="/".concat(r);var n=new URL(t,e);return{isRelativeUrl:n&&"relative-site"===n.hostname&&"relative:"===n.protocol,url:n}}function I(t,e,r){return e?(t=t.split(/\s+/)).filter(function(t){return -1!==e.indexOf(t)||r.some(function(e){return e.test(t)})}).join(" "):t}}var ky={decodeEntities:!0};km.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0},km.simpleTransform=function(t,e,r){return r=void 0===r||r,e=e||{},function(n,i){var o;if(r)for(o in e)i[o]=e[o];else i=e;return{tagName:t,attribs:i}}};var kb={};r="millisecond",n="second",i="minute",o="hour",a="week",s="month",u="quarter",c="year",l="date",f="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p=function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},(g={})[v="en"]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||"th")+"]"}},m="$isDayjsObject",y=function(t){return t instanceof S||!(!t||!t[m])},b=function t(e,r,n){var i;if(!e)return v;if("string"==typeof e){var o=e.toLowerCase();g[o]&&(i=o),r&&(g[o]=r,i=o);var a=e.split("-");if(!i&&a.length>1)return t(a[0])}else{var s=e.name;g[s]=e,i=s}return!n&&i&&(v=i),i||!n&&v},w=function(t,e){if(y(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new S(r)},(x={s:p,z:function(t){var e=-t.utcOffset(),r=Math.abs(e);return(e<=0?"+":"-")+p(Math.floor(r/60),2,"0")+":"+p(r%60,2,"0")},m:function t(e,r){if(e.date()5&&"xml"===n)return kP("InvalidXml","XML declaration allowed only at the start of the document.",kC(t,e));if("?"!=t[e]||">"!=t[e+1])continue;e++;break}return e}function kT(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){var r=1;for(e+=8;e"===t[e]&&0==--r)break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7]){for(e+=8;e"===t[e+2]){e+=2;break}}return e}ep=function(t,e){e=Object.assign({},kA,e);var r=[],n=!1,i=!1;"\uFEFF"===t[0]&&(t=t.substr(1));for(var o=0;o"!==t[o]&&" "!==t[o]&&" "!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)u+=t[o];if("/"===(u=u.trim())[u.length-1]&&(u=u.substring(0,u.length-1),o--),!eg(u))return kP("InvalidTag",0===u.trim().length?"Invalid space after '<'.":"Tag '"+u+"' is an invalid name.",kC(t,o));var c=function(t,e){for(var r="",n="",i=!1;e"===t[e]&&""===n){i=!0;break}r+=t[e]}return""===n&&{value:r,index:e,tagClosed:i}}(t,o);if(!1===c)return kP("InvalidAttr","Attributes for '"+u+"' have open quote.",kC(t,o));var l=c.value;if(o=c.index,"/"===l[l.length-1]){var f=o-l.length,h=k_(l=l.substring(0,l.length-1),e);if(!0!==h)return kP(h.err.code,h.err.msg,kC(t,f+h.err.line));n=!0}else if(s){if(!c.tagClosed)return kP("InvalidTag","Closing tag '"+u+"' doesn't have proper closing.",kC(t,o));if(l.trim().length>0)return kP("InvalidTag","Closing tag '"+u+"' can't have attributes or invalid starting.",kC(t,a));if(0===r.length)return kP("InvalidTag","Closing tag '"+u+"' has not been opened.",kC(t,a));var d=r.pop();if(u!==d.tagName){var p=kC(t,d.tagStartPos);return kP("InvalidTag","Expected closing tag '"+d.tagName+"' (opened in line "+p.line+", col "+p.col+") instead of closing tag '"+u+"'.",kC(t,a))}0==r.length&&(i=!0)}else{var v=k_(l,e);if(!0!==v)return kP(v.err.code,v.err.msg,kC(t,o-l.length+v.err.line));if(!0===i)return kP("InvalidXml","Multiple possible root nodes found.",kC(t,o));-1!==e.unpairedTags.indexOf(u)||r.push({tagName:u,tagStartPos:a}),n=!0}for(o++;o0)||kP("InvalidXml","Invalid '"+JSON.stringify(r.map(function(t){return t.tagName}),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):kP("InvalidXml","Start tag expected.",1)};var kN=RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function k_(t,e){for(var r=em(t,kN),n={},i=0;i0?this.child.push((xE(e={},t.tagname,t.child),xE(e,":@",t[":@"]),e)):this.child.push(xE({},t.tagname,t.child))}}]),t}();var kj={};function kU(t,e){return"!"===t[e+1]&&"-"===t[e+2]&&"-"===t[e+3]}kj=function(t,e){var r={};if("O"===t[e+3]&&"C"===t[e+4]&&"T"===t[e+5]&&"Y"===t[e+6]&&"P"===t[e+7]&&"E"===t[e+8]){e+=9;for(var n,i,o,a,s,u,c,l,f,h=1,d=!1,p=!1;e"===t[e]){if(p?"-"===t[e-1]&&"-"===t[e-2]&&(p=!1,h--):h--,0===h)break}else"["===t[e]?d=!0:t[e]}else{if(d&&"!"===(n=t)[(i=e)+1]&&"E"===n[i+2]&&"N"===n[i+3]&&"T"===n[i+4]&&"I"===n[i+5]&&"T"===n[i+6]&&"Y"===n[i+7])e+=7,entityName=(f=ED(function(t,e){for(var r="";e1&&void 0!==arguments[1]?arguments[1]:{};if(r=Object.assign({},kV,r),!t||"string"!=typeof t)return t;var n=t.trim();if(void 0!==r.skipLike&&r.skipLike.test(n))return t;if(r.hex&&kF.test(n))return Number.parseInt(n,16);var i=kz.exec(n);if(!i)return t;var o=i[1],a=i[2],s=((e=i[3])&&-1!==e.indexOf(".")&&("."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1))),e),u=i[4]||i[6];if(!r.leadingZeros&&a.length>0&&o&&"."!==n[2]||!r.leadingZeros&&a.length>0&&!o&&"."!==n[1])return t;var c=Number(n),l=""+c;return -1!==l.search(/[eE]/)||u?r.eNotation?c:t:-1!==n.indexOf(".")?"0"===l&&""===s?c:l===s?c:o&&l==="-"+s?c:t:a?s===l?c:o+s===l?c:t:n===l?c:n===o+l?c:t};var k$={};function kH(t){for(var e=Object.keys(t),r=0;r0)){a||(t=this.replaceEntitiesValue(t));var s=this.options.tagValueProcessor(e,t,r,i,o);return null==s?t:(void 0===s?"undefined":(0,e_._)(s))!==(void 0===t?"undefined":(0,e_._)(t))||s!==t?s:this.options.trimValues?k5(t,this.options.parseTagValue,this.options.numberParseOptions):t.trim()===t?k5(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function kG(t){if(this.options.removeNSPrefix){var e=t.split(":"),r="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=r+e[1])}return t}k$=function(t){return"function"==typeof t?t:Array.isArray(t)?function(e){var r=!0,n=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){var s=o.value;if("string"==typeof s&&e===s||s instanceof RegExp&&s.test(e))return!0}}catch(t){n=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}}:function(){return!1}};var kY=RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function kK(t,e,r){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){for(var n=em(t,kY),i=n.length,o={},a=0;a",o,"Closing Tag is not closed."),s=t.substring(o+2,a).trim();if(this.options.removeNSPrefix){var u=s.indexOf(":");-1!==u&&(s=s.substr(u+1))}this.options.transformTagName&&(s=this.options.transformTagName(s)),r&&(n=this.saveTextToParentTag(n,r,i));var c=i.substring(i.lastIndexOf(".")+1);if(s&&-1!==this.options.unpairedTags.indexOf(s))throw Error("Unpaired tag can not be used as closing tag: "));var l=0;c&&-1!==this.options.unpairedTags.indexOf(c)?(l=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=i.lastIndexOf("."),i=i.substring(0,l),r=this.tagsNodeStack.pop(),n="",o=a}else if("?"===t[o+1]){var f=k2(t,o,!1,"?>");if(!f)throw Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,i),this.options.ignoreDeclaration&&"?xml"===f.tagName||this.options.ignorePiTags);else{var h=new kB(f.tagName);h.add(this.options.textNodeName,""),f.tagName!==f.tagExp&&f.attrExpPresent&&(h[":@"]=this.buildAttributesMap(f.tagExp,i,f.tagName)),this.addChild(r,h,i)}o=f.closeIndex+1}else if("!--"===t.substr(o+1,3)){var d=k1(t,"-->",o+4,"Comment is not closed.");if(this.options.commentPropName){var p=t.substring(o+4,d-2);n=this.saveTextToParentTag(n,r,i),r.add(this.options.commentPropName,[xE({},this.options.textNodeName,p)])}o=d}else if("!D"===t.substr(o+1,2)){var v=kj(t,o);this.docTypeEntities=v.entities,o=v.i}else if("!["===t.substr(o+1,2)){var g=k1(t,"]]>",o,"CDATA is not closed.")-2,m=t.substring(o+9,g);n=this.saveTextToParentTag(n,r,i);var y=this.parseTextData(m,r.tagname,i,!0,!1,!0,!0);void 0==y&&(y=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[xE({},this.options.textNodeName,m)]):r.add(this.options.textNodeName,y),o=g+2}else{var b=k2(t,o,this.options.removeNSPrefix),w=b.tagName,x=b.rawTagName,S=b.tagExp,E=b.attrExpPresent,k=b.closeIndex;this.options.transformTagName&&(w=this.options.transformTagName(w)),r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,i,!1));var A=r;if(A&&-1!==this.options.unpairedTags.indexOf(A.tagname)&&(r=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),w!==e.tagname&&(i+=i?"."+w:w),this.isItStopNode(this.options.stopNodes,i,w)){var O="";if(S.length>0&&S.lastIndexOf("/")===S.length-1)"/"===w[w.length-1]?(w=w.substr(0,w.length-1),i=i.substr(0,i.length-1),S=w):S=S.substr(0,S.length-1),o=b.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(w))o=b.closeIndex;else{var I=this.readStopNodeData(t,x,k+1);if(!I)throw Error("Unexpected end of ".concat(x));o=I.i,O=I.tagContent}var T=new kB(w);w!==S&&E&&(T[":@"]=this.buildAttributesMap(S,i,w)),O&&(O=this.parseTextData(O,w,i,!0,E,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),T.add(this.options.textNodeName,O),this.addChild(r,T,i)}else{if(S.length>0&&S.lastIndexOf("/")===S.length-1){"/"===w[w.length-1]?(w=w.substr(0,w.length-1),i=i.substr(0,i.length-1),S=w):S=S.substr(0,S.length-1),this.options.transformTagName&&(w=this.options.transformTagName(w));var N=new kB(w);w!==S&&E&&(N[":@"]=this.buildAttributesMap(S,i,w)),this.addChild(r,N,i),i=i.substr(0,i.lastIndexOf("."))}else{var _=new kB(w);this.tagsNodeStack.push(r),w!==S&&E&&(_[":@"]=this.buildAttributesMap(S,i,w)),this.addChild(r,_,i),r=_}n="",o=k}}}else n+=t[o];return e.child};function kJ(t,e,r){var n=this.options.updateTag(e.tagname,r,e[":@"]);!1===n||("string"==typeof n&&(e.tagname=n),t.addChild(e))}var kQ=function(t){if(this.options.processEntities){for(var e in this.docTypeEntities){var r=this.docTypeEntities[e];t=t.replace(r.regx,r.val)}for(var n in this.lastEntities){var i=this.lastEntities[n];t=t.replace(i.regex,i.val)}if(this.options.htmlEntities)for(var o in this.htmlEntities){var a=this.htmlEntities[o];t=t.replace(a.regex,a.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function kX(t,e,r,n){return t&&(void 0===n&&(n=0===Object.keys(e.child).length),void 0!==(t=this.parseTextData(t,e.tagname,r,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,n))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function k0(t,e,r){var n="*."+r;for(var i in t){var o=t[i];if(n===o||e===o)return!0}return!1}function k1(t,e,r,n){var i=t.indexOf(e,r);if(-1!==i)return i+e.length-1;throw Error(n)}function k2(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:">",i=function(t,e){for(var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:">",i="",o=e;o",r,"".concat(e," is not closed"));if(t.substring(r+2,o).trim()===e&&0==--i)return{tagContent:t.substring(n,r),i:o};r=o}else if("?"===t[r+1])r=k1(t,"?>",r+1,"StopNode is not closed.");else if("!--"===t.substr(r+1,3))r=k1(t,"-->",r+3,"StopNode is not closed.");else if("!["===t.substr(r+1,2))r=k1(t,"]]>",r,"StopNode is not closed.")-2;else{var a=k2(t,r,">");a&&((a&&a.tagName)===e&&"/"!==a.tagExp[a.tagExp.length-1]&&i++,r=a.closeIndex)}}}function k5(t,e,r){if(e&&"string"==typeof t){var n=t.trim();return"true"===n||"false"!==n&&kq(t,r)}return ev(t)?t:""}kD=function t(e){wQ(this,t),this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:function(t,e){return String.fromCharCode(Number.parseInt(e,10))}},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:function(t,e){return String.fromCharCode(Number.parseInt(e,16))}}},this.addExternalEntities=kH,this.parseXml=kZ,this.parseTextData=kW,this.resolveNameSpace=kG,this.buildAttributesMap=kK,this.isItStopNode=k0,this.replaceEntitiesValue=kQ,this.readStopNodeData=k3,this.saveTextToParentTag=kX,this.addChild=kJ,this.ignoreAttributesFn=k$(this.options.ignoreAttributes)},eb=function(t,e){return function t(e,r,n){for(var i,o={},a=0;a0&&(o[r.textNodeName]=i):void 0!==i&&(o[r.textNodeName]=i),o}(t,e)},kL=/*#__PURE__*/function(){function t(e){wQ(this,t),this.externalEntities={},this.options=ey(e)}return w0(t,[{key:"parse",value:function(t,e){if("string"==typeof t);else if(t.toString)t=t.toString();else throw Error("XML data is accepted in String or Bytes[] form.");if(e){!0===e&&(e={});var r=ep(t,e);if(!0!==r)throw Error("".concat(r.err.msg,":").concat(r.err.line,":").concat(r.err.col))}var n=new kD(this.options);n.addExternalEntities(this.externalEntities);var i=n.parseXml(t);return this.options.preserveOrder||void 0===i?i:eb(i,this.options)}},{key:"addEntity",value:function(t,e){if(-1!==e.indexOf("&"))throw Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");if("&"===e)throw Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}}]),t}();var k8={};function k6(t,e){var r="";if(t&&!e.ignoreAttributes){for(var n in t)if(t.hasOwnProperty(n)){var i=e.attributeValueProcessor(n,t[n]);!0===(i=k4(i,e))&&e.suppressBooleanAttributes?r+=" ".concat(n.substr(e.attributeNamePrefix.length)):r+=" ".concat(n.substr(e.attributeNamePrefix.length),'="').concat(i,'"')}}return r}function k4(t,e){if(t&&t.length>0&&e.processEntities)for(var r=0;r0&&(r="\n"),function t(e,r,n,i){for(var o="",a=!1,s=0;s"),a=!1;continue}if(c===r.commentPropName){o+=i+""),a=!0;continue}if("?"===c[0]){var h=k6(u[":@"],r),d="?xml"===c?"":i,p=u[c][0][r.textNodeName];p=0!==p.length?" "+p:"",o+=d+"<".concat(c).concat(p).concat(h,"?>"),a=!0;continue}var v=i;""!==v&&(v+=r.indentBy);var g=k6(u[":@"],r),m=i+"<".concat(c).concat(g),y=t(u[c],r,l,v);-1!==r.unpairedTags.indexOf(c)?r.suppressUnpairedNode?o+=m+">":o+=m+"/>":(!y||0===y.length)&&r.suppressEmptyNode?o+=m+"/>":y&&y.endsWith(">")?o+=m+">".concat(y).concat(i,""):(o+=m+">",y&&""!==i&&(y.includes("/>")||y.includes("")),a=!0}}return o}(t,e,"",r)};var k7={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:RegExp("&","g"),val:"&"},{regex:RegExp(">","g"),val:">"},{regex:RegExp("<","g"),val:"<"},{regex:RegExp("'","g"),val:"'"},{regex:RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function k9(t){this.options=Object.assign({},k7,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=k$(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Ar),this.processTextOrObjNode=At,this.options.format?(this.indentate=Ae,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function At(t,e,r,n){var i=this.j2x(t,r+1,n.concat(e));return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,i.attrStr,r):this.buildObjectNode(i.val,e,i.attrStr,r)}function Ae(t){return this.options.indentBy.repeat(t)}function Ar(t){return!!t.startsWith(this.options.attributeNamePrefix)&&t!==this.options.textNodeName&&t.substr(this.attrPrefixLen)}k9.prototype.build=function(t){return this.options.preserveOrder?k8(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t=xE({},this.options.arrayNodeName,t)),this.j2x(t,0,[]).val)},k9.prototype.j2x=function(t,e,r){var n="",i="",o=r.join(".");for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){if(void 0===t[a])this.isAttribute(a)&&(i+="");else if(null===t[a])this.isAttribute(a)?i+="":"?"===a[0]?i+=this.indentate(e)+"<"+a+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+a+"/"+this.tagEndChar;else if(t[a]instanceof Date)i+=this.buildTextValNode(t[a],a,"",e);else if("object"!=typeof t[a]){var s=this.isAttribute(a);if(s&&!this.ignoreAttributesFn(s,o))n+=this.buildAttrPairStr(s,""+t[a]);else if(!s){if(a===this.options.textNodeName){var u=this.options.tagValueProcessor(a,""+t[a]);i+=this.replaceEntitiesValue(u)}else i+=this.buildTextValNode(t[a],a,"",e)}}else if(Array.isArray(t[a])){for(var c=t[a].length,l="",f="",h=0;h"+t+i:!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===o.length?this.indentate(n)+"")+this.newLine:this.indentate(n)+"<"+e+r+o+this.tagEndChar+t+this.indentate(n)+i},k9.prototype.closeTag=function(t){var e="";return -1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":">")+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(n)+"")+this.newLine;if("?"===e[0])return this.indentate(n)+"<"+e+r+"?"+this.tagEndChar;var i=this.options.tagValueProcessor(e,t);return""===(i=this.replaceEntitiesValue(i))?this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+r+">"+i+"0&&this.options.processEntities)for(var e=0;eMath.abs(o)?Math.abs(i)>l&&d0?"swiped-left":"swiped-right"):Math.abs(o)>l&&d0?"swiped-up":"swiped-down"),""!==p){var g={dir:p.replace(/swiped-/,""),touchType:(v[0]||{}).touchType||"direct",fingers:u,xStart:parseInt(r,10),xEnd:parseInt((v[0]||{}).clientX||-1,10),yStart:parseInt(n,10),yEnd:parseInt((v[0]||{}).clientY||-1,10)};s.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:g})),s.dispatchEvent(new CustomEvent(p,{bubbles:!0,cancelable:!0,detail:g}))}r=null,n=null,a=null}},!1);var r=null,n=null,i=null,o=null,a=null,s=null,u=0;function c(t,r,n){for(;t&&t!==e.documentElement;){var i=t.getAttribute(r);if(i)return i;t=t.parentNode}return n}}(window,document);var e_=ek("2L7Ke"),Ao=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,r,n,o){var a,s,u=Object.create((r&&r.prototype instanceof g?r:g).prototype);return i(u,"_invoke",{value:(a=new I(o||[]),s=h,function(r,i){if(s===d)throw Error("Generator is already running");if(s===p){if("throw"===r)throw i;return{value:e,done:!0}}for(a.method=r,a.arg=i;;){var o=a.delegate;if(o){var u=function t(r,n){var i=n.method,o=r.iterator[i];if(o===e)return n.delegate=null,"throw"===i&&r.iterator.return&&(n.method="return",n.arg=e,t(r,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=TypeError("The iterator does not provide a '"+i+"' method")),v;var a=f(o,r.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var s=a.arg;return s?s.done?(n[r.resultName]=s.value,n.next=r.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):s:(n.method="throw",n.arg=TypeError("iterator result is not an object"),n.delegate=null,v)}(o,a);if(u){if(u===v)continue;return u}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(s===h)throw s=p,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s=d;var c=f(t,n,a);if("normal"===c.type){if(s=a.done?p:"suspendedYield",c.arg===v)continue;return{value:c.arg,done:a.done}}"throw"===c.type&&(s=p,a.method="throw",a.arg=c.arg)}})}),u}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var h="suspendedStart",d="executing",p="completed",v={};function g(){}function m(){}function y(){}var b={};c(b,a,function(){return this});var w=Object.getPrototypeOf,x=w&&w(w(T([])));x&&x!==r&&n.call(x,a)&&(b=x);var S=y.prototype=g.prototype=Object.create(b);function E(t){["next","throw","return"].forEach(function(e){c(t,e,function(t){return this._invoke(e,t)})})}function k(t,e){var r;i(this,"_invoke",{value:function(i,o){function a(){return new e(function(r,a){!function r(i,o,a,s){var u=f(t[i],t,o);if("throw"===u.type)s(u.arg);else{var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then(function(t){r("next",t,a,s)},function(t){r("throw",t,a,s)}):e.resolve(l).then(function(t){c.value=t,a(c)},function(t){return r("throw",t,a,s)})}}(i,o,r,a)})}return r=r?r.then(a,a):a()}})}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function T(t){if(null!=t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;O(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}({});try{regeneratorRuntime=Ao}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=Ao:Function("r","regeneratorRuntime = r")(Ao)}/*@__PURE__*/e(kb).extend(/*@__PURE__*/e(kw));var Aa=new BroadcastChannel("sw-messages"),As=new/*@__PURE__*/(e(kx)).XMLParser({ignoreAttributes:!1,parseAttributeValue:!0}),Au={};Au=ek("MMwCY").getBundleURL("5Waqz")+"sw.js";try{navigator.serviceWorker.register(Au).then(function(t){console.log("Service Worker registered successfully."),t.waiting&&(console.log("A waiting Service Worker is already in place."),t.update()),"b2g"in navigator&&(t.systemMessageManager?t.systemMessageManager.subscribe("activity").then(function(){console.log("Subscribed to general activity.")},function(t){alert("Error subscribing to activity:",t)}):alert("systemMessageManager is not available."))}).catch(function(t){alert("Service Worker registration failed:",t)})}catch(t){alert("Error during Service Worker setup:",t)}var Ac={visibility:!0,deviceOnline:!0,notKaiOS:!0,os:(ta=navigator.userAgent||navigator.vendor||window.opera,/iPad|iPhone|iPod/.test(ta)&&!window.MSStream?"iOS":!!/android/i.test(ta)&&"Android"),debug:!1,local_opml:[]},Al=navigator.userAgent||"";Al&&Al.includes("KAIOS")&&(Ac.notKaiOS=!1);var Af="",Ah={opml_url:"https://raw.githubusercontent.com/strukturart/feedolin/master/example.opml",opml_local:"",proxy_url:"https://api.cors.lol/?url=",cache_time:36e5},Ad=[],Ap={},Av=[],Ag=[];/*@__PURE__*/e(wV).getItem("read_articles").then(function(t){if(null===t)return Ag=[],/*@__PURE__*/e(wV).setItem("read_articles",Ag).then(function(){});Ag=t}).catch(function(t){console.error("Error accessing localForage:",t)});var Am=function(){/*@__PURE__*/e(wV).setItem("last_channel_filter",AD).then(function(){AR()})};function Ay(t){var r=[];Aw.map(function(t,e){r.push(t.id)}),(Ag=Ag.filter(function(e){return r.includes(t)})).push(t),/*@__PURE__*/e(wV).setItem("read_articles",Ag).then(function(){}).catch(function(t){console.error("Error updating localForage:",t)})}var Ab=new DOMParser;Ac.notKaiOS||["http://127.0.0.1/api/v1/shared/core.js","http://127.0.0.1/api/v1/shared/session.js","http://127.0.0.1/api/v1/apps/service.js","http://127.0.0.1/api/v1/audiovolumemanager/service.js","./assets/js/kaiads.v5.min.js"].forEach(function(t){var e=document.createElement("script");e.type="text/javascript",e.src=t,document.head.appendChild(e)});var Aw=[];Ac.debug&&(window.onerror=function(t,e,r){return alert("Error message: "+t+"\nURL: "+e+"\nLine Number: "+r),!0});var Ax=function(){/*@__PURE__*/e(wV).getItem("settings").then(function(t){Ap=t;var r=new URLSearchParams(window.location.href.split("?")[1]).get("code");if(r){var n=r.split("#")[0];if(r){/*@__PURE__*/e(wV).setItem("mastodon_code",n);var i=new Headers;i.append("Content-Type","application/x-www-form-urlencoded");var o=new URLSearchParams;o.append("code",n),o.append("scope","read"),o.append("grant_type","authorization_code"),o.append("redirect_uri","https://feedolin.strukturart.com"),o.append("client_id","HqIUbDiOkeIoDPoOJNLQOgVyPi1ZOkPMW29UVkhl3i8"),o.append("client_secret","R_9DvQ5V84yZQg3BEdDHjz5uGQGUN4qrPx9YgmrJ81Q"),fetch(Ap.mastodon_server_url+"/oauth/token",{method:"POST",headers:i,body:o,redirect:"follow"}).then(function(t){return t.json()}).then(function(t){Ap.mastodon_token=t.access_token,/*@__PURE__*/e(wV).setItem("settings",Ap),/*@__PURE__*/e(w$).route.set("/start?index=0"),wB("Successfully connected",1e4)}).catch(function(t){console.error("Error:",t),wB("Connection failed")})}}})};function AS(t){for(var e=0,r=0;r=200&&r.status<300?(wB("Data loaded successfully",3e3),AN(r.responseText)):AI(r.status)},r.onerror=function(){AT()},r.send()},AI=function(t){console.error("HTTP Error: Status ".concat(t)),wB("OPML file not reachable",4e3),/*@__PURE__*/e(w$).route.get().startsWith("/intro")&&/*@__PURE__*/e(w$).route.set("/start")},AT=function(){console.error("Network error occurred during the request."),wB("OPML file not reachable",3e3),/*@__PURE__*/e(w$).route.get().startsWith("/intro")&&/*@__PURE__*/e(w$).route.set("/start")},AN=(tu=eI(function(t){var r,n;return(0,eT.__generator)(this,function(i){switch(i.label){case 0:if(!t)return[3,7];if((n=A_(t)).error)return wB(n.error,3e3),[2,!1];if(!((r=n.downloadList).length>0))return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,AP(r)];case 2:return i.sent(),Ap.last_update=new Date,/*@__PURE__*/e(wV).setItem("settings",Ap),[3,4];case 3:return console.log(i.sent()),[3,4];case 4:return[3,6];case 5:alert("Generated download list is empty."),i.label=6;case 6:return[3,8];case 7:console.error("No OPML content found."),i.label=8;case 8:return[2]}})}),function(t){return tu.apply(this,arguments)}),A_=function(t){var e=Ab.parseFromString(t,"text/xml");if(!e||e.getElementsByTagName("parsererror").length>0)return console.error("Invalid OPML data."),{error:"Invalid OPML data",downloadList:[]};var r=e.querySelector("body");if(!r)return console.error("No 'body' element found in the OPML data."),{error:"No 'body' element found",downloadList:[]};var n=0,i=r.querySelectorAll("outline"),o=[];return i.forEach(function(t){t.querySelectorAll("outline").forEach(function(e){var r=e.getAttribute("xmlUrl");r&&o.push({error:"",title:e.getAttribute("title")||"Untitled",url:r,index:n++,channel:t.getAttribute("text")||"Unknown",type:e.getAttribute("type")||"rss",maxEpisodes:e.getAttribute("maxEpisodes")||5})})}),{error:"",downloadList:o}},AP=(tc=eI(function(t){var r,n,i,o,a;return(0,eT.__generator)(this,function(s){return r=0,n=t.length,i=!1,o=function(){AD=localStorage.getItem("last_channel_filter"),r===n&&(console.log("All feeds are loaded"),/*@__PURE__*/e(wV).setItem("articles",Aw).then(function(){Aw.sort(function(t,e){return new Date(e.isoDate)-new Date(t.isoDate)}),Aw.forEach(function(t){-1===Av.indexOf(t.channel)&&t.channel&&Av.push(t.channel)}),Av.length>0&&!i&&(AD=localStorage.getItem("last_channel_filter")||Av[0],i=!0),/*@__PURE__*/e(w$).route.set("/start")}).catch(function(t){console.error("Feeds cached",t)}),/*@__PURE__*/e(w$).route.get().startsWith("/intro")&&/*@__PURE__*/e(w$).route.set("/start"))},a=[],t.forEach(function(t){if("mastodon"===t.type)fetch(t.url).then(function(t){return t.json()}).then(function(e){e.forEach(function(e,r){if(!(r>5)){var n={channel:t.channel,id:e.id,type:"mastodon",pubDate:e.created_at,isoDate:e.created_at,title:e.account.display_name||e.account.username,content:e.content,url:e.uri,reblog:!1};e.media_attachments.length>0&&("image"===e.media_attachments[0].type?n.content+="
"):"video"===e.media_attachments[0].type?n.enclosure={"@_type":"video",url:e.media_attachments[0].url}:"audio"===e.media_attachments[0].type&&(n.enclosure={"@_type":"audio",url:e.media_attachments[0].url})),""==e.content&&(n.content=e.reblog.content,n.reblog=!0,n.reblogUser=e.account.display_name||e.reblog.account.acct,e.reblog.media_attachments.length>0&&("image"===e.reblog.media_attachments[0].type?n.content+="
"):"video"===e.reblog.media_attachments[0].type?n.enclosure={"@_type":"video",url:e.reblog.media_attachments[0].url}:"audio"===e.reblog.media_attachments[0].type&&(n.enclosure={"@_type":"audio",url:e.reblog.media_attachments[0].url}))),Aw.push(n)}})}).catch(function(e){t.error=e}).finally(function(){r++,o()});else{var n=new XMLHttpRequest({mozSystem:!0});n.timeout=2e3;var i=t.url;Ac.notKaiOS?n.open("GET","https://api.cors.lol/?url="+i,!0):n.open("GET",i,!0),n.ontimeout=function(){console.error("Request timed out"),r++,o()},n.onload=function(){if(200!==n.status){t.error=n.status,r++,o();return}var i=n.response;if(!i){t.error=n.status,r++,o();return}try{var s=As.parse(i);s.feed&&s.feed.entry.forEach(function(r,n){if(n15)){var r={channel:"Mastodon",id:t.id,type:"mastodon",pubDate:t.created_at,isoDate:t.created_at,title:t.account.display_name,content:t.content,url:t.uri,reblog:!1};t.media_attachments.length>0&&("image"===t.media_attachments[0].type?r.content+="
"):"video"===t.media_attachments[0].type?r.enclosure={"@_type":"video",url:t.media_attachments[0].url}:"audio"===t.media_attachments[0].type&&(r.enclosure={"@_type":"audio",url:t.media_attachments[0].url}));try{""==t.content&&(r.content=t.reblog.content,r.reblog=!0,r.reblogUser=t.reblog.account.display_name||t.reblog.account.acct,t.reblog.media_attachments.length>0&&("image"===t.reblog.media_attachments[0].type?r.content+="
"):"video"===t.reblog.media_attachments[0].type?r.enclosure={"@_type":"video",url:t.reblog.media_attachments[0].url}:"audio"===t.reblog.media_attachments[0].type&&(r.enclosure={"@_type":"audio",url:t.reblog.media_attachments[0].url})))}catch(t){console.log(t)}Aw.push(r)}}),Av.push("Mastodon"),wB("Logged in as "+Ac.mastodon_logged,4e3),/*@__PURE__*/e(wV).setItem("articles",Aw).then(function(){console.log("cached")})}),[2]})}),function(){return tl.apply(this,arguments)}),AR=function(){AO(Ap.opml_url),Ap.opml_local&&AN(Ap.opml_local),Ap.mastodon_token&&wz(Ap.mastodon_server_url,Ap.mastodon_token).then(function(t){Ac.mastodon_logged=t.display_name,AC()}).catch(function(t){}),AD=localStorage.getItem("last_channel_filter")};/*@__PURE__*/e(wV).getItem("settings").then(function(t){null==t&&(Ap=Ah,/*@__PURE__*/e(wV).setItem("settings",Ap).then(function(t){}).catch(function(t){console.log(t)})),(Ap=t).cache_time=Ap.cache_time||36e5,Ap.last_update?Ac.last_update_duration=new Date/1e3-Ap.last_update/1e3:Ac.last_update_duration=3600,Ap.opml_url||Ap.opml_local_filename||(wB("The feed could not be loaded because no OPML was defined in the settings.",6e3),Ap=Ah,/*@__PURE__*/e(wV).setItem("settings",Ap).then(function(t){}).catch(function(t){})),AE().then(function(t){t&&Ac.last_update_duration>Ap.cache_time?(AR(),wB("Load feeds",4e3)):/*@__PURE__*/e(wV).getItem("articles").then(function(t){(Aw=t).sort(function(t,e){return new Date(e.isoDate)-new Date(t.isoDate)}),Aw.forEach(function(t){-1===Av.indexOf(t.channel)&&t.channel&&Av.push(t.channel)}),Av.length&&(AD=localStorage.getItem("last_channel_filter")||Av[0]),/*@__PURE__*/e(w$).route.set("/start?index=0"),document.querySelector("body").classList.add("cache"),wB("Cached feeds loaded",4e3),Ap.mastodon_token&&wz(Ap.mastodon_server_url,Ap.mastodon_token).then(function(t){Ac.mastodon_logged=t.display_name}).catch(function(t){})}).catch(function(t){})})}).catch(function(t){wB("The default settings was loaded",3e3),AO((Ap=Ah).opml_url),/*@__PURE__*/e(wV).setItem("settings",Ap).then(function(t){}).catch(function(t){console.log(t)})});var AL=document.getElementById("app"),AM=-1,AD=localStorage.getItem("last_channel_filter")||"",AB=0,Aj=function(t){return /*@__PURE__*/e(kb).duration(t,"seconds").format("mm:ss")},AU={videoElement:null,videoDuration:0,currentTime:0,isPlaying:!1,seekAmount:5,oncreate:function(t){var r=t.attrs;Ac.notKaiOS&&wq("","",""),AU.videoElement=document.createElement("video"),document.getElementById("video-container").appendChild(AU.videoElement);var n=r.url;n&&(AU.videoElement.src=n,AU.videoElement.play(),AU.isPlaying=!0),AU.videoElement.onloadedmetadata=function(){AU.videoDuration=AU.videoElement.duration,/*@__PURE__*/e(w$).redraw()},AU.videoElement.ontimeupdate=function(){AU.currentTime=AU.videoElement.currentTime,/*@__PURE__*/e(w$).redraw()},document.addEventListener("keydown",AU.handleKeydown)},onremove:function(){document.removeEventListener("keydown",AU.handleKeydown)},handleKeydown:function(t){"Enter"===t.key?AU.togglePlayPause():"ArrowLeft"===t.key?AU.seek("left"):"ArrowRight"===t.key&&AU.seek("right")},togglePlayPause:function(){AU.isPlaying?AU.videoElement.pause():AU.videoElement.play(),AU.isPlaying=!AU.isPlaying},seek:function(t){var e=AU.videoElement.currentTime;"left"===t?AU.videoElement.currentTime=Math.max(0,e-AU.seekAmount):"right"===t&&(AU.videoElement.currentTime=Math.min(AU.videoDuration,e+AU.seekAmount))},view:function(t){t.attrs;var r=AU.videoDuration>0?AU.currentTime/AU.videoDuration*100:0;return /*@__PURE__*/e(w$)("div",{class:"video-player"},[/*@__PURE__*/e(w$)("div",{id:"video-container",class:"video-container"}),/*@__PURE__*/e(w$)("div",{class:"video-info"},[" ".concat(Aj(AU.currentTime)," / ").concat(Aj(AU.videoDuration))]),/*@__PURE__*/e(w$)("div",{class:"progress-bar-container"},[/*@__PURE__*/e(w$)("div",{class:"progress-bar",style:{width:"".concat(r,"%")}})])])}},Aq={player:null,oncreate:function(t){var e=t.attrs;Ac.notKaiOS&&wq("","",""),wU("","",""),YT?Aq.player=new YT.Player("video-container",{videoId:e.videoId,events:{onReady:Aq.onPlayerReady}}):alert("YouTube player not loaded"),document.addEventListener("keydown",Aq.handleKeydown)},onPlayerReady:function(t){t.target.playVideo()},handleKeydown:function(t){"Enter"===t.key?Aq.togglePlayPause():"ArrowLeft"===t.key?Aq.seek("left"):"ArrowRight"===t.key&&Aq.seek("right")},togglePlayPause:function(){1===Aq.player.getPlayerState()?Aq.player.pauseVideo():Aq.player.playVideo()},seek:function(t){var e=Aq.player.getCurrentTime();"left"===t?Aq.player.seekTo(Math.max(0,e-5),!0):"right"===t&&Aq.player.seekTo(e+5,!0)},view:function(){return /*@__PURE__*/e(w$)("div",{class:"youtube-player"},[/*@__PURE__*/e(w$)("div",{id:"video-container",class:"video-container"})])}},AF=document.createElement("audio");if(AF.preload="auto",AF.src="","b2g"in navigator)try{AF.mozAudioChannelType="content",navigator.b2g.AudioChannelManager&&(navigator.b2g.AudioChannelManager.volumeControlChannel="content")}catch(t){console.log(t)}navigator.mozAlarms&&(AF.mozAudioChannelType="content");var Az=[];try{/*@__PURE__*/e(wV).getItem("hasPlayedAudio").then(function(t){Az=t||[]})}catch(t){console.error("Failed to load hasPlayedAudio:",t)}var AV=(tf=eI(function(t,r,n){var i;return(0,eT.__generator)(this,function(o){return -1!==(i=Az.findIndex(function(e){return e.url===t}))?Az[i].time=r:Az.push({url:t,time:r,id:n}),A$(),/*@__PURE__*/e(wV).setItem("hasPlayedAudio",Az).then(function(){}),[2]})}),function(t,e,r){return tf.apply(this,arguments)}),A$=function(){Az=Az.filter(function(t){return Ad.includes(t.id)})},AH=0,AW=0,AG=0,AY=0,AK=!1,AZ=null,AJ={audioDuration:0,currentTime:0,isPlaying:!1,seekAmount:5,oninit:function(t){var r=t.attrs;if(r.url&&AF.src!==r.url)try{AF.src=r.url,AF.play().catch(function(t){alert(t)}),AJ.isPlaying=!0,Az.map(function(t){t.url===AF.src&&!0==confirm("continue playing ?")&&(AF.currentTime=t.time)})}catch(t){AF.src=r.url}AF.onloadedmetadata=function(){AJ.audioDuration=AF.duration,/*@__PURE__*/e(w$).redraw()},AF.ontimeupdate=function(){AJ.currentTime=AF.currentTime,AV(AF.src,AF.currentTime,r.id),Ac.player=!0,/*@__PURE__*/e(w$).redraw()},AJ.isPlaying=!AF.paused,document.addEventListener("keydown",AJ.handleKeydown)},oncreate:function(){var t=function(t){AZ||(AJ.seek(t),AZ=setInterval(function(){AJ.seek(t),document.querySelector(".audio-info").style.padding="20px"},1e3))},e=function(){AZ&&(clearInterval(AZ),AZ=null,document.querySelector(".audio-info").style.padding="10px")};wq("","",""),wU("","",""),Ap.sleepTimer&&(wU("","",""),document.querySelector("div.button-left").addEventListener("click",function(){Ac.sleepTimer?A8():A5(6e4*Ap.sleepTimer)})),Ac.notKaiOS&&wq("","",""),document.querySelector("div.button-center").addEventListener("click",function(t){AJ.togglePlayPause()}),Ac.notKaiOS&&(document.addEventListener("touchstart",function(t){var e=t.touches[0];AH=e.clientX,AW=e.clientY}),document.addEventListener("touchmove",function(e){var r=e.touches[0];AG=r.clientX,AY=r.clientY;var n=AG-AH,i=AY-AW;Math.abs(n)>Math.abs(i)?n>30?(t("right"),AK=!0):n<-30&&(t("left"),AK=!0):i>30?console.log("Swiping down (not used in this context)"):i<-30&&console.log("Swiping up (not used in this context)")}),document.addEventListener("touchend",function(){AK&&(AK=!1,e())}))},onremove:function(){document.removeEventListener("keydown",AJ.handleKeydown)},handleKeydown:function(t){"Enter"===t.key?AJ.togglePlayPause():"ArrowLeft"===t.key?AJ.seek("left"):"ArrowRight"===t.key&&AJ.seek("right")},togglePlayPause:function(){AJ.isPlaying?AF.pause():AF.play().catch(function(){}),AJ.isPlaying=!AJ.isPlaying},seek:function(t){var e=AF.currentTime;"left"===t?AF.currentTime=Math.max(0,e-AJ.seekAmount):"right"===t&&(AF.currentTime=Math.min(AJ.audioDuration,e+AJ.seekAmount))},view:function(t){t.attrs;var r=AJ.audioDuration>0?AJ.currentTime/AJ.audioDuration*100:0;return /*@__PURE__*/e(w$)("div",{class:"audio-player"},[/*@__PURE__*/e(w$)("div",{id:"audio-container",class:"audio-container"}),/*@__PURE__*/e(w$)("div",{class:"cover-container",style:{"background-color":"rgb(121, 71, 255)","background-image":"url(".concat(Af.cover,")")}}),/*@__PURE__*/e(w$)("div",{class:"audio-info",style:{background:"linear-gradient(to right, #3498db ".concat(r,"%, white ").concat(r,"%)")}},["".concat(Aj(AJ.currentTime)," / ").concat(Aj(AJ.audioDuration))]),/*@__PURE__*/e(w$)("div",{class:"progress-bar-container"},[/*@__PURE__*/e(w$)("div",{class:"progress-bar",style:{width:"".concat(r,"%")}})])])}};function AQ(){var t=document.activeElement;if(t){for(var e=t.getBoundingClientRect(),r=e.top+e.height/2,n=t.parentNode;n;){if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth){var i=n.getBoundingClientRect();r=e.top-i.top+e.height/2;break}n=n.parentNode}n?n.scrollBy({left:0,top:r-n.clientHeight/2,behavior:"smooth"}):document.body.scrollBy({left:0,top:r-window.innerHeight/2,behavior:"smooth"})}}/*@__PURE__*/e(w$).route(AL,"/intro",{"/article":{view:function(){var t=Aw.find(function(t){return /*@__PURE__*/e(w$).route.param("index")==t.id&&(Af=t,!0)});return /*@__PURE__*/e(w$)("div",{id:"article",class:"page",oncreate:function(){Ac.notKaiOS&&wq("","",""),wU("","","")}},t?/*@__PURE__*/e(w$)("article",{class:"item",tabindex:0,oncreate:function(e){e.dom.focus(),("audio"===t.type||"video"===t.type||"youtube"===t.type)&&wU("","","")}},[/*@__PURE__*/e(w$)("time",{id:"top",oncreate:function(){setTimeout(function(){document.querySelector("#top").scrollIntoView()},1e3)}},/*@__PURE__*/e(kb)(t.isoDate).format("DD MMM YYYY")),/*@__PURE__*/e(w$)("h2",{class:"article-title",oncreate:function(e){var r=e.dom;t.reblog&&r.classList.add("reblog")}},t.title),/*@__PURE__*/e(w$)("div",{class:"text"},[/*@__PURE__*/e(w$).trust(AA(t.content))]),t.reblog?/*@__PURE__*/e(w$)("div",{class:"text"},"reblogged from:"+t.reblogUser):""]):/*@__PURE__*/e(w$)("div","Article not found"))}},"/settingsView":{view:function(){return /*@__PURE__*/e(w$)("div",{class:"flex justify-content-center page",id:"settings-page",oncreate:function(){Ac.notKaiOS||(Ac.local_opml=[],wP("opml",function(t){Ac.local_opml.push(t)})),wU("","",""),Ac.notKaiOS&&wU("","",""),document.querySelectorAll(".item").forEach(function(t,e){t.setAttribute("tabindex",e)}),Ac.notKaiOS&&wq("","",""),Ac.notKaiOS&&wU("","","")}},[/*@__PURE__*/e(w$)("div",{class:"item input-parent flex",oncreate:function(){AX()}},[/*@__PURE__*/e(w$)("label",{for:"url-opml"},"OPML"),/*@__PURE__*/e(w$)("input",{id:"url-opml",placeholder:"",value:Ap.opml_url||"",type:"url"})]),/*@__PURE__*/e(w$)("button",{class:"item",onclick:function(){Ap.opml_local_filename?(Ap.opml_local="",Ap.opml_local_filename="",/*@__PURE__*/e(wV).setItem("settings",Ap).then(function(){wB("OPML file removed",4e3),/*@__PURE__*/e(w$).redraw()})):Ac.notKaiOS?wF(function(t){var r=new FileReader;r.onload=function(){A_(r.result).error?wB("OPML file not valid",4e3):(Ap.opml_local=r.result,Ap.opml_local_filename=t.filename,/*@__PURE__*/e(wV).setItem("settings",Ap).then(function(){wB("OPML file added",4e3)}))},r.onerror=function(){wB("OPML file not valid",4e3)},r.readAsText(t.blob)}):Ac.local_opml.length>0?/*@__PURE__*/e(w$).route.set("/localOPML"):wB("no OPML file found",3e3)}},Ap.opml_local_filename?"Remove OPML file":"Upload OPML file"),/*@__PURE__*/e(w$)("div",Ap.opml_local_filename),/*@__PURE__*/e(w$)("div",{class:"seperation"}),Ac.notKaiOS?/*@__PURE__*/e(w$)("div",{class:"item input-parent flex "},[/*@__PURE__*/e(w$)("label",{for:"url-proxy"},"PROXY"),/*@__PURE__*/e(w$)("input",{id:"url-proxy",placeholder:"",value:Ap.proxy_url||"",type:"url"})]):null,/*@__PURE__*/e(w$)("div",{class:"seperation"}),/*@__PURE__*/e(w$)("h2",{class:"flex justify-content-spacearound"},"Mastodon Account"),Ac.mastodon_logged?/*@__PURE__*/e(w$)("div",{id:"account_info",class:"item"},"You have successfully logged in as ".concat(Ac.mastodon_logged," and the data is being loaded from server ").concat(Ap.mastodon_server_url,".")):null,Ac.mastodon_logged?/*@__PURE__*/e(w$)("button",{class:"item",onclick:function(){Ap.mastodon_server_url="",Ap.mastodon_token="",/*@__PURE__*/e(wV).setItem("settings",Ap),Ac.mastodon_logged="",/*@__PURE__*/e(w$).route.set("/settingsView")}},"Disconnect"):null,Ac.mastodon_logged?null:/*@__PURE__*/e(w$)("div",{class:"item input-parent flex justify-content-spacearound"},[/*@__PURE__*/e(w$)("label",{for:"mastodon-server-url"},"URL"),/*@__PURE__*/e(w$)("input",{id:"mastodon-server-url",placeholder:"Server URL",value:Ap.mastodon_server_url})]),Ac.mastodon_logged?null:/*@__PURE__*/e(w$)("button",{class:"item",onclick:function(){/*@__PURE__*/e(wV).setItem("settings",Ap),Ap.mastodon_server_url=document.getElementById("mastodon-server-url").value;var t=Ap.mastodon_server_url+"/oauth/authorize?client_id=HqIUbDiOkeIoDPoOJNLQOgVyPi1ZOkPMW29UVkhl3i8&scope=read&redirect_uri=https://feedolin.strukturart.com&response_type=code";window.open(t)}},"Connect"),/*@__PURE__*/e(w$)("div",{class:"seperation"}),/*@__PURE__*/e(w$)("div",{class:"item input-parent"},[/*@__PURE__*/e(w$)("label",{for:"sleep-timer"},"Sleep timer"),/*@__PURE__*/e(w$)("select",{name:"sleep-timer",class:"select-box",id:"sleep-timer",value:Ap.sleepTimer,onchange:function(t){Ap.sleepTimer=t.target.value,/*@__PURE__*/e(w$).redraw()}},[/*@__PURE__*/e(w$)("option",{value:"1"},"1"),/*@__PURE__*/e(w$)("option",{value:"5"},"5"),/*@__PURE__*/e(w$)("option",{value:"10"},"10"),/*@__PURE__*/e(w$)("option",{value:"20"},"20"),/*@__PURE__*/e(w$)("option",{value:"30"},"30"),/*@__PURE__*/e(w$)("option",{value:"30"},"40"),/*@__PURE__*/e(w$)("option",{value:"30"},"50"),/*@__PURE__*/e(w$)("option",{value:"30"},"60")])]),/*@__PURE__*/e(w$)("button",{class:"item",id:"button-save-settings",onclick:function(){""==document.getElementById("url-opml").value||(t=document.getElementById("url-opml").value,/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(t))||wB("URL not valid",4e3),Ap.opml_url=document.getElementById("url-opml").value,Ac.notKaiOS&&(Ap.proxy_url=document.getElementById("url-proxy").value);var t,r=document.getElementById("sleep-timer").value;r&&!isNaN(r)&&Number(r)>0?Ap.sleepTimer=parseInt(r,10):Ap.sleepTimer="",Ac.mastodon_logged||(Ap.mastodon_server_url=document.getElementById("mastodon-server-url").value),/*@__PURE__*/e(wV).setItem("settings",Ap).then(function(){wB("settings saved",2e3)}).catch(function(t){alert(t)})}},"save settings")])}},"/intro":{view:function(){return /*@__PURE__*/e(w$)("div",{class:"width-100 height-100",id:"intro",oninit:function(){Ac.notKaiOS&&Ax()},onremove:function(){localStorage.setItem("version",Ac.version),document.querySelector(".loading-spinner").style.display="none"}},[/*@__PURE__*/e(w$)("img",{src:"./assets/icons/intro.svg",oncreate:function(){document.querySelector(".loading-spinner").style.display="block",wL(function(t){try{Ac.version=t.manifest.version,document.querySelector("#version").textContent=t.manifest.version}catch(t){}("b2g"in navigator||Ac.notKaiOS)&&fetch("/manifest.webmanifest").then(function(t){return t.json()}).then(function(t){Ac.version=t.b2g_features.version})})}}),/*@__PURE__*/e(w$)("div",{class:"flex width-100 justify-content-center ",id:"version-box"},[/*@__PURE__*/e(w$)("kbd",{id:"version"},localStorage.getItem("version")||0)])])}},"/start":{view:function(){var t=Aw.filter(function(t){return""===AD||AD===t.channel});return Aw.forEach(function(t){Ad.push(t.id)}),/*@__PURE__*/e(w$)("div",{id:"start",oncreate:function(){AB=/*@__PURE__*/e(w$).route.param("index")||0,wU("","",""),Ac.notKaiOS&&wU("","",""),Ac.notKaiOS&&wq("","",""),Ac.notKaiOS&&Ac.player&&wq("","","")}},/*@__PURE__*/e(w$)("span",{class:"channel",oncreate:function(){}},AD),t.map(function(r,n){var i,o=Ag.includes(r.id)?"read":"";return /*@__PURE__*/e(w$)("article",{class:"item ".concat(o),"data-id":r.id,"data-type":r.type,oncreate:function(e){0==AB&&0==n?setTimeout(function(){e.dom.focus()},1200):r.id==AB&&setTimeout(function(){e.dom.focus(),AQ()},1200),n==t.length-1&&setTimeout(function(){document.querySelectorAll(".item").forEach(function(t,e){t.setAttribute("tabindex",e)})},1e3)},onclick:function(){/*@__PURE__*/e(w$).route.set("/article?index="+r.id),Ay(r.id)},onkeydown:function(t){"Enter"===t.key&&(/*@__PURE__*/e(w$).route.set("/article?index="+r.id),Ay(r.id))}},[/*@__PURE__*/e(w$)("span",{class:"type-indicator"},r.type),/*@__PURE__*/e(w$)("time",/*@__PURE__*/e(kb)(r.isoDate).format("DD MMM YYYY")),/*@__PURE__*/e(w$)("h2",{oncreate:function(t){var e=t.dom;!0===r.reblog&&e.classList.add("reblog")}},AA(r.feed_title)),/*@__PURE__*/e(w$)("h3",AA(r.title)),"mastodon"==r.type?/*@__PURE__*/e(w$)("h3",(i=r.content.substring(0,30),wJ(i,{allowedTags:[],allowedAttributes:{}})+"...")):null])}))}},"/options":{view:function(){return /*@__PURE__*/e(w$)("div",{id:"optionsView",class:"flex",oncreate:function(){wq("","",""),Ac.notKaiOS&&wq("","",""),wU("","",""),Ac.notKaiOS&&wU("","","")}},[/*@__PURE__*/e(w$)("button",{tabindex:0,class:"item",oncreate:function(t){t.dom.focus(),AQ()},onclick:function(){/*@__PURE__*/e(w$).route.set("/about")}},"About"),/*@__PURE__*/e(w$)("button",{tabindex:1,class:"item",onclick:function(){/*@__PURE__*/e(w$).route.set("/settingsView")}},"Settings"),/*@__PURE__*/e(w$)("button",{tabindex:2,class:"item",onclick:function(){/*@__PURE__*/e(w$).route.set("/privacy_policy")}},"Privacy Policy"),/*@__PURE__*/e(w$)("div",{id:"KaiOSads-Wrapper",class:"",oncreate:function(){!1==Ac.notKaiOS&&w_()}})])}},"/about":{view:function(){return /*@__PURE__*/e(w$)("div",{class:"page scrollable",oncreate:function(){wU("","","")}},/*@__PURE__*/e(w$)("p","Feedolin is an RSS/Atom reader and podcast player, available for both KaiOS and non-KaiOS users."),/*@__PURE__*/e(w$)("p","It supports connecting a Mastodon account to display articles alongside your RSS/Atom feeds."),/*@__PURE__*/e(w$)("p","The app allows you to listen to audio and watch videos directly if the feed provides the necessary URLs."),/*@__PURE__*/e(w$)("p","The list of subscribed websites and podcasts is managed either locally or via an OPML file from an external source, such as a public link in the cloud."),/*@__PURE__*/e(w$)("p","For non-KaiOS users, local files must be uploaded to the app."),/*@__PURE__*/e(w$)("h4",{style:"margin-top:20px; margin-bottom:10px;"},"Navigation:"),/*@__PURE__*/e(w$)("ul",[/*@__PURE__*/e(w$)("li",/*@__PURE__*/e(w$).trust("Use the up and down arrow keys to navigate between articles.

")),/*@__PURE__*/e(w$)("li",/*@__PURE__*/e(w$).trust("Use the left and right arrow keys to switch between categories.

")),/*@__PURE__*/e(w$)("li",/*@__PURE__*/e(w$).trust("Press Enter to view the content of an article.

")),/*@__PURE__*/e(w$)("li",{oncreate:function(t){Ac.notKaiOS||(t.dom.style.display="none")}},/*@__PURE__*/e(w$).trust("Use Alt to access various options.")),/*@__PURE__*/e(w$)("li",{oncreate:function(t){Ac.notKaiOS&&(t.dom.style.display="none")}},/*@__PURE__*/e(w$).trust("Use # Volume")),/*@__PURE__*/e(w$)("li",{oncreate:function(t){Ac.notKaiOS&&(t.dom.style.display="none")}},/*@__PURE__*/e(w$).trust("Use * Audioplayer

")),/*@__PURE__*/e(w$)("li","Version: "+Ac.version)]))}},"/privacy_policy":{view:function(){return /*@__PURE__*/e(w$)("div",{id:"privacy_policy",class:"page scrollable",oncreate:function(){wU("","","")}},[/*@__PURE__*/e(w$)("h1","Privacy Policy for Feedolin"),/*@__PURE__*/e(w$)("p","Feedolin is committed to protecting your privacy. This policy explains how data is handled within the app."),/*@__PURE__*/e(w$)("h2","Data Storage and Collection"),/*@__PURE__*/e(w$)("p",["All data related to your RSS/Atom feeds and Mastodon account is stored ",/*@__PURE__*/e(w$)("strong","locally")," in your device’s browser. Feedolin does ",/*@__PURE__*/e(w$)("strong","not")," collect or store any data on external servers. The following information is stored locally:"]),/*@__PURE__*/e(w$)("ul",[/*@__PURE__*/e(w$)("li","Your subscribed RSS/Atom feeds and podcasts."),/*@__PURE__*/e(w$)("li","OPML files you upload or manage."),/*@__PURE__*/e(w$)("li","Your Mastodon account information and related data.")]),/*@__PURE__*/e(w$)("p","No server-side data storage or collection is performed."),/*@__PURE__*/e(w$)("h2","KaiOS Users"),/*@__PURE__*/e(w$)("p",["If you are using Feedolin on a KaiOS device, the app uses ",/*@__PURE__*/e(w$)("strong","KaiOS Ads"),", which may collect data related to your usage. The data collected by KaiOS Ads is subject to the ",/*@__PURE__*/e(w$)("a",{href:"https://www.kaiostech.com/privacy-policy/",target:"_blank",rel:"noopener noreferrer"},"KaiOS privacy policy"),"."]),/*@__PURE__*/e(w$)("p",["For users on all other platforms, ",/*@__PURE__*/e(w$)("strong","no ads")," are used, and no external data collection occurs."]),/*@__PURE__*/e(w$)("h2","External Sources Responsibility"),/*@__PURE__*/e(w$)("p",["Feedolin enables you to add feeds and connect to external sources such as RSS/Atom feeds, podcasts, and Mastodon accounts. You are ",/*@__PURE__*/e(w$)("strong","solely responsible")," for the sources you choose to trust and subscribe to. Feedolin does not verify or control the content or data provided by these external sources."]),/*@__PURE__*/e(w$)("h2","Third-Party Services"),/*@__PURE__*/e(w$)("p","Feedolin integrates with third-party services such as Mastodon. These services have their own privacy policies, and you should review them to understand how your data is handled."),/*@__PURE__*/e(w$)("h2","Policy Updates"),/*@__PURE__*/e(w$)("p","This Privacy Policy may be updated periodically. Any changes will be communicated through updates to the app."),/*@__PURE__*/e(w$)("p","By using Feedolin, you acknowledge and agree to this Privacy Policy.")])}},"/localOPML":{view:function(){return /*@__PURE__*/e(w$)("div",{class:"flex",id:"index",oncreate:function(){Ac.notKaiOS&&wq("","",""),wU("","","")}},Ac.local_opml.map(function(t,r){var n=t.split("/");return n=n[n.length-1],/*@__PURE__*/e(w$)("button",{class:"item",tabindex:r,oncreate:function(t){0==r&&t.dom.focus()},onclick:function(){if("b2g"in navigator)try{var r=navigator.b2g.getDeviceStorage("sdcard").get(t);r.onsuccess=function(){var t=new FileReader;t.onload=function(){A_(t.result).error?wB("OPML file not valid",4e3):(Ap.opml_local=t.result,Ap.opml_local_filename=n,/*@__PURE__*/e(wV).setItem("settings",Ap).then(function(){wB("OPML file added",4e3),/*@__PURE__*/e(w$).route.set("/settingsView")}))},t.onerror=function(){wB("OPML file not valid",4e3)},t.readAsText(this.result)},r.onerror=function(t){}}catch(t){}else{var i=navigator.getDeviceStorage("sdcard").get(t);i.onsuccess=function(){var t=new FileReader;t.onload=function(){A_(t.result).error?wB("OPML file not valid",4e3):(Ap.opml_local=t.result,Ap.opml_local_filename=n,/*@__PURE__*/e(wV).setItem("settings",Ap).then(function(){wB("OPML file added",4e3),/*@__PURE__*/e(w$).route.set("/settingsView")}))},t.onerror=function(){wB("OPML file not valid",4e3)},t.readAsText(this.result)},i.onerror=function(t){}}}},n)}))}},"/AudioPlayerView":AJ,"/VideoPlayerView":AU,"/YouTubePlayerView":Aq});var AX=function(){document.body.scrollTo({left:0,top:0,behavior:"smooth"}),document.documentElement.scrollTo({left:0,top:0,behavior:"smooth"})};document.addEventListener("DOMContentLoaded",function(t){var r,n,i=function(t){if("SELECT"==document.activeElement.nodeName||"date"==document.activeElement.type||"time"==document.activeElement.type||"volume"==Ac.window_status)return!1;if(document.activeElement.classList.contains("scroll")){var e=document.querySelector(".scroll");1==t?e.scrollBy({left:0,top:10}):e.scrollBy({left:0,top:-10})}var r=document.activeElement.tabIndex+t,n=0;if(n=document.getElementById("app").querySelectorAll(".item"),document.activeElement.parentNode.classList.contains("input-parent"))return document.activeElement.parentNode.focus(),!0;r<=n.length&&(0,n[r]).focus(),r>=n.length&&(0,n[0]).focus(),AQ()};function o(t){c({key:t})}Ac.notKaiOS&&(r=0,document.addEventListener("touchstart",function(t){r=t.touches[0].pageX,document.querySelector("body").style.opacity=1},!1),document.addEventListener("touchmove",function(t){var n=1-Math.min(Math.abs(t.touches[0].pageX-r)/300,1);/*@__PURE__*/e(w$).route.get().startsWith("/article")&&(document.querySelector("body").style.opacity=n)},!1),document.addEventListener("touchend",function(t){document.querySelector("body").style.opacity=1},!1)),document.querySelector("div.button-left").addEventListener("click",function(t){o("SoftLeft")}),document.querySelector("div.button-right").addEventListener("click",function(t){o("SoftRight")}),document.querySelector("div.button-center").addEventListener("click",function(t){o("Enter")}),document.querySelector("#top-bar div div.button-left").addEventListener("click",function(t){o("Backspace")}),document.querySelector("#top-bar div div.button-right").addEventListener("click",function(t){o("*")});var a=!1;document.addEventListener("keydown",function(t){a||("Backspace"==t.key&&"INPUT"!=document.activeElement.tagName&&t.preventDefault(),"EndCall"===t.key&&(t.preventDefault(),window.close()),t.repeat||(u=!1,n=setTimeout(function(){u=!0,"Backspace"===t.key&&window.close()},2e3)),t.repeat&&("Backspace"==t.key&&t.preventDefault(),"Backspace"==t.key&&(u=!1),t.key),a=!0,setTimeout(function(){a=!1},300))});var s=!1;document.addEventListener("keyup",function(t){s||(function(t){if("Backspace"==t.key&&t.preventDefault(),!1===Ac.visibility)return 0;clearTimeout(n),u||c(t)}(t),s=!0,setTimeout(function(){s=!1},300))}),Ac.notKaiOS&&document.addEventListener("swiped",function(t){var r=/*@__PURE__*/e(w$).route.get(),n=t.detail.dir;if("right"==n&&r.startsWith("/start")){--AM<1&&(AM=Av.length-1),AD=Av[AM],/*@__PURE__*/e(w$).redraw();var i=/*@__PURE__*/e(w$).route.param();i.index=0,/*@__PURE__*/e(w$).route.set("/start",i)}if("left"==n&&r.startsWith("/start")){++AM>Av.length-1&&(AM=0),AD=Av[AM],/*@__PURE__*/e(w$).redraw();var o=/*@__PURE__*/e(w$).route.param();o.index=0,/*@__PURE__*/e(w$).route.set("/start",o)}});var u=!1;function c(t){var r=/*@__PURE__*/e(w$).route.get();switch(t.key){case"ArrowRight":if(r.startsWith("/start")){++AM>Av.length-1&&(AM=0),AD=Av[AM],/*@__PURE__*/e(w$).redraw();var n=/*@__PURE__*/e(w$).route.param();n.index=0,/*@__PURE__*/e(w$).route.set("/start",n),setTimeout(function(){document.querySelectorAll("article.item")[0].focus(),AQ()},500)}break;case"ArrowLeft":if(r.startsWith("/start")){--AM<0&&(AM=Av.length-1),AD=Av[AM],/*@__PURE__*/e(w$).redraw();var o=/*@__PURE__*/e(w$).route.param();o.index=0,/*@__PURE__*/e(w$).route.set("/start",o),setTimeout(function(){document.querySelectorAll("article.item")[0].focus(),AQ()},500)}break;case"ArrowUp":i(-1),"volume"==Ac.window_status&&(navigator.volumeManager.requestVolumeUp(),Ac.window_status="volume",setTimeout(function(){Ac.window_status=""},2e3));break;case"ArrowDown":i(1),"volume"==Ac.window_status&&(navigator.volumeManager.requestVolumeDown(),Ac.window_status="volume",setTimeout(function(){Ac.window_status=""},2e3));break;case"SoftRight":case"Alt":r.startsWith("/start")&&/*@__PURE__*/e(w$).route.set("/options"),r.startsWith("/article")&&("audio"==Af.type&&/*@__PURE__*/e(w$).route.set("/AudioPlayerView?url=".concat(encodeURIComponent(Af.enclosure["@_url"]),"&id=").concat(Af.id)),"video"==Af.type&&/*@__PURE__*/e(w$).route.set("/VideoPlayerView?url=".concat(encodeURIComponent(Af.enclosure["@_url"]))),"youtube"==Af.type&&/*@__PURE__*/e(w$).route.set("/YouTubePlayerView?videoId=".concat(encodeURIComponent(Af.youtubeid))));break;case"SoftLeft":case"Control":r.startsWith("/start")&&Am(),r.startsWith("/article")&&window.open(Af.url),r.startsWith("/AudioPlayerView")&&(Ac.sleepTimer?A8():A5(6e4*Ap.sleepTimer));break;case"Enter":document.activeElement.classList.contains("input-parent")&&document.activeElement.children[0].focus();break;case"*":/*@__PURE__*/e(w$).route.set("/AudioPlayerView");break;case"#":wC();break;case"Backspace":if(r.startsWith("/start")&&window.close(),r.startsWith("/article")){var a=/*@__PURE__*/e(w$).route.param("index");/*@__PURE__*/e(w$).route.set("/start?index="+a)}if(r.startsWith("/YouTubePlayerView")){var s=/*@__PURE__*/e(w$).route.param("index");/*@__PURE__*/e(w$).route.set("/start?index="+s)}if(r.startsWith("/localOPML")&&history.back(),r.startsWith("/index")&&/*@__PURE__*/e(w$).route.set("/start?index=0"),r.startsWith("/about")&&/*@__PURE__*/e(w$).route.set("/options"),r.startsWith("/privacy_policy")&&/*@__PURE__*/e(w$).route.set("/options"),r.startsWith("/options")&&/*@__PURE__*/e(w$).route.set("/start?index=0"),r.startsWith("/settingsView")){if("INPUT"==document.activeElement.tagName)return!1;/*@__PURE__*/e(w$).route.set("/options")}r.startsWith("/Video")&&history.back(),r.startsWith("/Audio")&&history.back()}}document.addEventListener("visibilitychange",function(){"visible"===document.visibilityState&&Ap.last_update?(Ac.visibility=!0,new Date/1e3-Ap.last_update/1e3>Ap.cache_time&&(Aw=[],wB("load new content",4e3),AR())):Ac.visibility=!1})}),window.addEventListener("online",function(){Ac.deviceOnline=!0}),window.addEventListener("offline",function(){Ac.deviceOnline=!1}),window.addEventListener("beforeunload",function(t){/*@__PURE__*/e(wV).setItem("last_channel_filter",AD).then(function(){});var r=window.performance.getEntriesByType("navigation"),n=window.performance.navigation?window.performance.navigation.type:null;(r.length&&"reload"===r[0].type||1===n)&&(t.preventDefault(),Aw=[],wB("load new content",4e3),AR(),/*@__PURE__*/e(w$).route.set("/intro"),t.returnValue="Are you sure you want to leave the page?")});try{Aa.addEventListener("message",function(t){var r=t.data.oauth_success;if(r){var n=new Headers;n.append("Content-Type","application/x-www-form-urlencoded");var i=new URLSearchParams;i.append("code",r),i.append("scope","read"),i.append("grant_type","authorization_code"),i.append("redirect_uri","https://feedolin.strukturart.com"),i.append("client_id","HqIUbDiOkeIoDPoOJNLQOgVyPi1ZOkPMW29UVkhl3i8"),i.append("client_secret","R_9DvQ5V84yZQg3BEdDHjz5uGQGUN4qrPx9YgmrJ81Q"),fetch(Ap.mastodon_server_url+"/oauth/token",{method:"POST",headers:n,body:i,redirect:"follow"}).then(function(t){return t.json()}).then(function(t){Ap.mastodon_token=t.access_token,/*@__PURE__*/e(wV).setItem("settings",Ap),/*@__PURE__*/e(w$).route.set("/start?index=0"),wB("Successfully connected",1e4)}).catch(function(t){console.error("Error:",t),wB("Connection failed")})}})}catch(t){}navigator.mozAlarms&&navigator.mozSetMessageHandler("alarm",function(t){AF.pause(),Ac.sleepTimer=!1});var A0={},A1={};A1=function(t,e,r){if(e===self.location.origin)return t;var n=r?"import "+JSON.stringify(t)+";":"importScripts("+JSON.stringify(t)+");";return URL.createObjectURL(new Blob([n],{type:"application/javascript"}))};var A2=ek("MMwCY"),A3=A2.getBundleURL("5Waqz")+"worker.8ac5962b.js";A0=A1(A3,A2.getOrigin(A3),!1);try{ew=new Worker(A0)}catch(t){console.log(t)}function A5(t){if(navigator.mozAlarms){var e=6e4*Ap.sleepTimer,r=new Date(Date.now()+e);navigator.mozAlarms.add(r,"honorTimezone").onsuccess=function(){Ac.alarmId=this.result}}Ac.sleepTimer=!0,wB("sleep mode on",3e3),ew.postMessage({action:"start",duration:t})}function A8(){navigator.mozAlarms&&navigator.mozAlarms.remove(Ac.alarmId),Ac.sleepTimer=!1,wB("sleep mode off",3e3),ew.postMessage({action:"stop"})}ew.onmessage=function(t){"stop"===t.data.action&&(AF.pause(),Ac.sleepTimer=!1)}}(); \ No newline at end of file diff --git a/docs/index.f0337e49.js b/docs/index.f0337e49.js index 104025b..7b3730f 100644 --- a/docs/index.f0337e49.js +++ b/docs/index.f0337e49.js @@ -3,4 +3,4 @@ function t(t,e,r,n){Object.defineProperty(t,e,{get:r,set:n,enumerable:!0,configu * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */function So(t){return"[object Object]"===Object.prototype.toString.call(t)}Si=function(t){if("string"!=typeof t)throw TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};var Sa=function(t){var e,r;return!1!==So(t)&&(void 0===(e=t.constructor)||!1!==So(r=e.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))},Ss={},Su=function(t){var e;return!!t&&"object"==typeof t&&"[object RegExp]"!==(e=Object.prototype.toString.call(t))&&"[object Date]"!==e&&t.$$typeof!==Sc},Sc="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function Sl(t,e){return!1!==e.clone&&e.isMergeableObject(t)?Sp(Array.isArray(t)?[]:{},t,e):t}function Sf(t,e,r){return t.concat(e).map(function(t){return Sl(t,r)})}function Sh(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function Sd(t,e){try{return e in t}catch(t){return!1}}function Sp(t,e,r){(r=r||{}).arrayMerge=r.arrayMerge||Sf,r.isMergeableObject=r.isMergeableObject||Su,r.cloneUnlessOtherwiseSpecified=Sl;var n,i,o=Array.isArray(e);return o!==Array.isArray(t)?Sl(e,r):o?r.arrayMerge(t,e,r):(i={},(n=r).isMergeableObject(t)&&Sh(t).forEach(function(e){i[e]=Sl(t[e],n)}),Sh(e).forEach(function(r){Sd(t,r)&&!(Object.hasOwnProperty.call(t,r)&&Object.propertyIsEnumerable.call(t,r))||(Sd(t,r)&&n.isMergeableObject(e[r])?i[r]=(function(t,e){if(!e.customMerge)return Sp;var r=e.customMerge(t);return"function"==typeof r?r:Sp})(r,n)(t[r],e[r],n):i[r]=Sl(e[r],n))}),i)}Sp.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,r){return Sp(t,r,e)},{})},Ss=Sp;var Sv={};ti=Sv,to=function(){return function(t){function e(t){return" "===t||" "===t||"\n"===t||"\f"===t||"\r"===t}function r(e){var r,n=e.exec(t.substring(v));if(n)return r=n[0],v+=r.length,r}for(var n,i,o,a,s,u=t.length,c=/^[ \t\n\r\u000c]+/,l=/^[, \t\n\r\u000c]+/,f=/^[^ \t\n\r\u000c]+/,h=/[,]+$/,d=/^\d+$/,p=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,v=0,g=[];;){if(r(l),v>=u)return g;n=r(f),i=[],","===n.slice(-1)?(n=n.replace(h,""),m()):function(){for(r(c),o="",a="in descriptor";;){if(s=t.charAt(v),"in descriptor"===a){if(e(s))o&&(i.push(o),o="",a="after descriptor");else if(","===s){v+=1,o&&i.push(o),m();return}else if("("===s)o+=s,a="in parens";else if(""===s){o&&i.push(o),m();return}else o+=s}else if("in parens"===a){if(")"===s)o+=s,a="in descriptor";else if(""===s){i.push(o),m();return}else o+=s}else if("after descriptor"===a){if(e(s));else if(""===s){m();return}else a="in descriptor",v-=1}v+=1}}()}function m(){var e,r,o,a,s,u,c,l,f,h=!1,v={};for(a=0;at.length)&&(e=t.length);for(var r=0,n=Array(e);r",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}},{key:"showSourceCode",value:function(t){var e=this;if(!this.source)return"";var r=this.source;null==t&&(t=SO.isColorSupported);var n=function(t){return t},i=function(t){return t},o=function(t){return t};if(t){var a=SO.createColors(!0),s=a.bold,u=a.gray,c=a.red;i=function(t){return s(c(t))},n=function(t){return u(t)},SN&&(o=function(t){return SN(t)})}var l=r.split(/\r?\n/),f=Math.max(this.line-3,0),h=Math.min(this.line+2,l.length),d=String(h).length;return l.slice(f,h).map(function(t,r){var a=f+1+r,s=" "+(" "+a).slice(-d)+" | ";if(a===e.line){if(t.length>160){var u=Math.max(0,e.column-20),c=Math.max(e.column+20,e.endColumn+20),l=t.slice(u,c),h=n(s.replace(/\d/g," "))+t.slice(0,Math.min(e.column-1,19)).replace(/[^\t]/g," ");return i(">")+n(s)+o(l)+"\n "+h+i("^")}var p=n(s.replace(/\d/g," "))+t.slice(0,e.column-1).replace(/[^\t]/g," ");return i(">")+n(s)+o(t)+"\n "+p+i("^")}return" "+n(s)+o(t)}).join("\n")}},{key:"toString",value:function(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}}]),r}(xH(Error));SA=S_,S_.default=S_;var SC={},SP={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1},SR=/*#__PURE__*/function(){function t(e){xi(this,t),this.builder=e}return xa(t,[{key:"atrule",value:function(t,e){var r="@"+t.name,n=t.params?this.rawValue(t,"params"):"";if(void 0!==t.raws.afterName?r+=t.raws.afterName:n&&(r+=" "),t.nodes)this.block(t,r+n);else{var i=(t.raws.between||"")+(e?";":"");this.builder(r+n+i,t)}}},{key:"beforeAfter",value:function(t,e){r="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose");for(var r,n=t.parent,i=0;n&&"root"!==n.type;)i+=1,n=n.parent;if(r.includes("\n")){var o=this.raw(t,null,"indent");if(o.length)for(var a=0;a0&&"comment"===t.nodes[e].type;)e-=1;for(var r=this.raw(t,"semicolon"),n=0;n0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}},{key:"rawBeforeComment",value:function(t,e){var r;return t.walkComments(function(t){if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}},{key:"rawBeforeDecl",value:function(t,e){var r;return t.walkDecls(function(t){if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}},{key:"rawBeforeOpen",value:function(t){var e;return t.walk(function(t){if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1}),e}},{key:"rawBeforeRule",value:function(t){var e;return t.walk(function(r){if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}},{key:"rawColon",value:function(t){var e;return t.walkDecls(function(t){if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}},{key:"rawEmptyBody",value:function(t){var e;return t.walk(function(t){if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1}),e}},{key:"rawIndent",value:function(t){var e;return t.raws.indent?t.raws.indent:(t.walk(function(r){var n=r.parent;if(n&&n!==t&&n.parent&&n.parent===t&&void 0!==r.raws.before){var i=r.raws.before.split("\n");return e=(e=i[i.length-1]).replace(/\S/g,""),!1}}),e)}},{key:"rawSemicolon",value:function(t){var e;return t.walk(function(t){if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1}),e}},{key:"rawValue",value:function(t,e){var r=t[e],n=t.raws[e];return n&&n.value===r?n.raw:r}},{key:"root",value:function(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}},{key:"rule",value:function(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}},{key:"stringify",value:function(t,e){if(!this[t.type])throw Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}}]),t}();SC=SR,SR.default=SR;var SL={};function SM(t,e){new SC(e).stringify(t)}SL=SM,SM.default=SM,et=Symbol("isClean"),ee=Symbol("my");var SD=/*#__PURE__*/function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var r in xi(this,t),this.raws={},this[et]=!1,this[ee]=!0,e)if("nodes"===r){this.nodes=[];var n=!0,i=!1,o=void 0;try{for(var a,s=e[r][Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var u=a.value;"function"==typeof u.clone?this.append(u.clone()):this.append(u)}}catch(t){i=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}}else this[r]=e[r]}return xa(t,[{key:"addToError",value:function(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&".concat(e.input.from,":").concat(e.start.line,":").concat(e.start.column,"$&"))}return t}},{key:"after",value:function(t){return this.parent.insertAfter(this,t),this}},{key:"assign",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var e in t)this[e]=t[e];return this}},{key:"before",value:function(t){return this.parent.insertBefore(this,t),this}},{key:"cleanRaws",value:function(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}},{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=function t(e,r){var n=new e.constructor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&"proxyCache"!==i){var o=e[i],a=void 0===o?"undefined":(0,e_._)(o);"parent"===i&&"object"===a?r&&(n[i]=r):"source"===i?n[i]=o:Array.isArray(o)?n[i]=o.map(function(e){return t(e,n)}):("object"===a&&null!==o&&(o=t(o)),n[i]=o)}return n}(this);for(var r in t)e[r]=t[r];return e}},{key:"cloneAfter",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.clone(t);return this.parent.insertAfter(this,e),e}},{key:"cloneBefore",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.clone(t);return this.parent.insertBefore(this,e),e}},{key:"error",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.source){var r=this.rangeBy(e),n=r.end,i=r.start;return this.source.input.error(t,{column:i.column,line:i.line},{column:n.column,line:n.line},e)}return new SA(t)}},{key:"getProxyProcessor",value:function(){return{get:function(t,e){return"proxyOf"===e?t:"root"===e?function(){return t.root().toProxy()}:t[e]},set:function(t,e,r){return t[e]===r||(t[e]=r,("prop"===e||"value"===e||"name"===e||"params"===e||"important"===e||"text"===e)&&t.markDirty(),!0)}}}},{key:"markClean",value:function(){this[et]=!0}},{key:"markDirty",value:function(){if(this[et]){this[et]=!1;for(var t=this;t=t.parent;)t[et]=!1}}},{key:"next",value:function(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}},{key:"positionBy",value:function(t,e){var r=this.source.start;if(t.index)r=this.positionInside(t.index,e);else if(t.word){var n=(e=this.toString()).indexOf(t.word);-1!==n&&(r=this.positionInside(n,e))}return r}},{key:"positionInside",value:function(t,e){for(var r=e||this.toString(),n=this.source.start.column,i=this.source.start.line,o=0;o0&&void 0!==arguments[0]?arguments[0]:SL;t.stringify&&(t=t.stringify);var e="";return t(this,function(t){e+=t}),e}},{key:"warn",value:function(t,e,r){var n={node:this};for(var i in r)n[i]=r[i];return t.warn(e,n)}},{key:"proxyOf",get:function(){return this}}]),t}();Sk=SD,SD.default=SD;var SB=/*#__PURE__*/function(t){xj(r,t);var e=xW(r);function r(t){var n;return xi(this,r),(n=e.call(this,t)).type="comment",n}return r}(xH(Sk));SE=SB,SB.default=SB;var Sj={},Sq=/*#__PURE__*/function(t){xj(r,t);var e=xW(r);function r(t){var n;return xi(this,r),t&&void 0!==t.value&&"string"!=typeof t.value&&(t=x5(xU({},t),{value:String(t.value)})),(n=e.call(this,t)).type="decl",n}return xa(r,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),r}(xH(Sk));Sj=Sq,Sq.default=Sq;var SU=/*#__PURE__*/function(t){xj(r,t);var e=xW(r);function r(){return xi(this,r),e.apply(this,arguments)}return xa(r,[{key:"append",value:function(){for(var t=arguments.length,e=Array(t),r=0;r1?e-1:0),i=1;i=t&&(this.indexes[r]=e-1);return this.markDirty(),this}},{key:"replaceValues",value:function(t,e,r){return r||(r=e,e={}),this.walkDecls(function(n){(!e.props||e.props.includes(n.prop))&&(!e.fast||n.value.includes(e.fast))&&(n.value=n.value.replace(t,r))}),this.markDirty(),this}},{key:"some",value:function(t){return this.nodes.some(t)}},{key:"walk",value:function(t){return this.each(function(e,r){var n;try{n=t(e,r)}catch(t){throw e.addToError(t)}return!1!==n&&e.walk&&(n=e.walk(t)),n})}},{key:"walkAtRules",value:function(t,e){return e?t instanceof RegExp?this.walk(function(r,n){if("atrule"===r.type&&t.test(r.name))return e(r,n)}):this.walk(function(r,n){if("atrule"===r.type&&r.name===t)return e(r,n)}):(e=t,this.walk(function(t,r){if("atrule"===t.type)return e(t,r)}))}},{key:"walkComments",value:function(t){return this.walk(function(e,r){if("comment"===e.type)return t(e,r)})}},{key:"walkDecls",value:function(t,e){return e?t instanceof RegExp?this.walk(function(r,n){if("decl"===r.type&&t.test(r.prop))return e(r,n)}):this.walk(function(r,n){if("decl"===r.type&&r.prop===t)return e(r,n)}):(e=t,this.walk(function(t,r){if("decl"===t.type)return e(t,r)}))}},{key:"walkRules",value:function(t,e){return e?t instanceof RegExp?this.walk(function(r,n){if("rule"===r.type&&t.test(r.selector))return e(r,n)}):this.walk(function(r,n){if("rule"===r.type&&r.selector===t)return e(r,n)}):(e=t,this.walk(function(t,r){if("rule"===t.type)return e(t,r)}))}},{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),r}(xH(Sk));SU.registerParse=function(t){en=t},SU.registerRule=function(t){eo=t},SU.registerAtRule=function(t){er=t},SU.registerRoot=function(t){ei=t},SS=SU,SU.default=SU,SU.rebuild=function(t){"atrule"===t.type?Object.setPrototypeOf(t,er.prototype):"rule"===t.type?Object.setPrototypeOf(t,eo.prototype):"decl"===t.type?Object.setPrototypeOf(t,Sj.prototype):"comment"===t.type?Object.setPrototypeOf(t,SE.prototype):"root"===t.type&&Object.setPrototypeOf(t,ei.prototype),t[ee]=!0,t.nodes&&t.nodes.forEach(function(t){SU.rebuild(t)})};var SF=/*#__PURE__*/function(t){xj(r,t);var e=xW(r);function r(t){var n;return xi(this,r),(n=e.call(this,t)).type="atrule",n}return xa(r,[{key:"append",value:function(){for(var t,e=arguments.length,n=Array(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:{};return new ea(new es,this,t).stringify()}}]),r}(SS);Sz.registerLazyResult=function(t){ea=t},Sz.registerProcessor=function(t){es=t},SV=Sz,Sz.default=Sz;var SH={};function S$(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n=0||(i[r]=t[r]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var SW={},SG=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21,e="",r=t;r--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},SY=SN.isAbsolute,SK=SN.resolve,SJ=SN.SourceMapConsumer,SQ=SN.SourceMapGenerator,SZ=SN.fileURLToPath,SX=SN.pathToFileURL,S0={},e_=ek("bbrsO");eu=function(t){var e,r,n=function(t){var e=t.length;if(e%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var n=r===e?0:4-r%4;return[r,n]}(t),i=n[0],o=n[1],a=new S3((i+o)*3/4-o),s=0,u=o>0?i-4:i;for(r=0;r>16&255,a[s++]=e>>8&255,a[s++]=255&e;return 2===o&&(e=S2[t.charCodeAt(r)]<<2|S2[t.charCodeAt(r+1)]>>4,a[s++]=255&e),1===o&&(e=S2[t.charCodeAt(r)]<<10|S2[t.charCodeAt(r+1)]<<4|S2[t.charCodeAt(r+2)]>>2,a[s++]=e>>8&255,a[s++]=255&e),a},ec=function(t){for(var e,r=t.length,n=r%3,i=[],o=0,a=r-n;o>18&63]+S1[n>>12&63]+S1[n>>6&63]+S1[63&n]);return i.join("")}(t,o,o+16383>a?a:o+16383));return 1===n?i.push(S1[(e=t[r-1])>>2]+S1[e<<4&63]+"=="):2===n&&i.push(S1[(e=(t[r-2]<<8)+t[r-1])>>10]+S1[e>>4&63]+S1[e<<2&63]+"="),i.join("")};for(var S1=[],S2=[],S3="undefined"!=typeof Uint8Array?Uint8Array:Array,S5="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S8=0,S6=S5.length;S8>1,l=-7,f=r?i-1:0,h=r?-1:1,d=t[e+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+t[e+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=c}return(d?-1:1)*a*Math.pow(2,o-n)},ef=function(t,e,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<>1,h=23===i?5960464477539062e-23:0,d=n?0:o-1,p=n?1:-1,v=e<0||0===e&&1/e<0?1:0;for(isNaN(e=Math.abs(e))||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+f>=1?e+=h/u:e+=h*Math.pow(2,1-f),e*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;t[r+d]=255&a,d+=p,a/=256,c-=8);t[r+d-p]|=128*v};var S4="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function S9(t){if(t>0x7fffffff)throw RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,S7.prototype),e}function S7(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return Er(t)}return Et(t,e,r)}function Et(t,e,r){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!S7.isEncoding(e))throw TypeError("Unknown encoding: "+e);var r=0|Ea(t,e),n=S9(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(EN(t,Uint8Array)){var e=new Uint8Array(t);return Ei(e.buffer,e.byteOffset,e.byteLength)}return En(t)}(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(void 0===t?"undefined":(0,e_._)(t)));if(EN(t,ArrayBuffer)||t&&EN(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(EN(t,SharedArrayBuffer)||t&&EN(t.buffer,SharedArrayBuffer)))return Ei(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return S7.from(n,e,r);var i=function(t){if(S7.isBuffer(t)){var e,r=0|Eo(t.length),n=S9(r);return 0===n.length||t.copy(n,0,0,r),n}return void 0!==t.length?"number"!=typeof t.length||(e=t.length)!=e?S9(0):En(t):"Buffer"===t.type&&Array.isArray(t.data)?En(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return S7.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(void 0===t?"undefined":(0,e_._)(t)))}function Ee(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function Er(t){return Ee(t),S9(t<0?0:0|Eo(t))}function En(t){for(var e=t.length<0?0:0|Eo(t.length),r=S9(e),n=0;n=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function Ea(t,e){if(S7.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||EN(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+(void 0===t?"undefined":(0,e_._)(t)));var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return EO(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return EI(t).length;default:if(i)return n?-1:EO(t).length;e=(""+e).toLowerCase(),i=!0}}function Es(t,e,r){var n,i,o=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(o=r=+r)!=o&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return -1;r=t.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof e&&(e=S7.from(e,n)),S7.isBuffer(e))return 0===e.length?-1:El(t,e,r,n,i);if("number"==typeof e)return(e&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):El(t,[e],r,n,i);throw TypeError("val must be string, number or Buffer")}function El(t,e,r,n,i){var o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var l=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){for(var f=!0,h=0;h239?4:o>223?3:o>191?2:1;if(i+s<=r){var u=void 0,c=void 0,l=void 0,f=void 0;switch(s){case 1:o<128&&(a=o);break;case 2:(192&(u=t[i+1]))==128&&(f=(31&o)<<6|63&u)>127&&(a=f);break;case 3:u=t[i+1],c=t[i+2],(192&u)==128&&(192&c)==128&&(f=(15&o)<<12|(63&u)<<6|63&c)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:u=t[i+1],c=t[i+2],l=t[i+3],(192&u)==128&&(192&c)==128&&(192&l)==128&&(f=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var r="",n=0;nr)throw RangeError("Trying to access beyond buffer length")}function Ed(t,e,r,n,i,o){if(!S7.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw RangeError("Index out of range")}function Ep(t,e,r,n,i){ES(e,n,i,t,r,7);var o=Number(e&BigInt(0xffffffff));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;var a=Number(e>>BigInt(32)&BigInt(0xffffffff));return t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,r}function Ev(t,e,r,n,i){ES(e,n,i,t,r,7);var o=Number(e&BigInt(0xffffffff));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;var a=Number(e>>BigInt(32)&BigInt(0xffffffff));return t[r+3]=a,a>>=8,t[r+2]=a,a>>=8,t[r+1]=a,a>>=8,t[r]=a,r+8}function Eg(t,e,r,n,i,o){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function Em(t,e,r,n,i){return e=+e,r>>>=0,i||Eg(t,e,r,4,34028234663852886e22,-34028234663852886e22),ef(t,e,r,n,23,4),r+4}function Ey(t,e,r,n,i){return e=+e,r>>>=0,i||Eg(t,e,r,8,17976931348623157e292,-17976931348623157e292),ef(t,e,r,n,52,8),r+8}S7.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),S7.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(S7.prototype,"parent",{enumerable:!0,get:function(){if(S7.isBuffer(this))return this.buffer}}),Object.defineProperty(S7.prototype,"offset",{enumerable:!0,get:function(){if(S7.isBuffer(this))return this.byteOffset}}),S7.poolSize=8192,S7.from=function(t,e,r){return Et(t,e,r)},Object.setPrototypeOf(S7.prototype,Uint8Array.prototype),Object.setPrototypeOf(S7,Uint8Array),S7.alloc=function(t,e,r){return(Ee(t),t<=0)?S9(t):void 0!==e?"string"==typeof r?S9(t).fill(e,r):S9(t).fill(e):S9(t)},S7.allocUnsafe=function(t){return Er(t)},S7.allocUnsafeSlow=function(t){return Er(t)},S7.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==S7.prototype},S7.compare=function(t,e){if(EN(t,Uint8Array)&&(t=S7.from(t,t.offset,t.byteLength)),EN(e,Uint8Array)&&(e=S7.from(e,e.offset,e.byteLength)),!S7.isBuffer(t)||!S7.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);in.length?(S7.isBuffer(o)||(o=S7.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(S7.isBuffer(o))o.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n},S7.byteLength=Ea,S7.prototype._isBuffer=!0,S7.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e50&&(t+=" ... "),""},S4&&(S7.prototype[S4]=S7.prototype.inspect),S7.prototype.compare=function(t,e,r,n,i){if(EN(t,Uint8Array)&&(t=S7.from(t,t.offset,t.byteLength)),!S7.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+(void 0===t?"undefined":(0,e_._)(t)));if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,a=r-e,s=Math.min(o,a),u=this.slice(n,i),c=t.slice(e,r),l=0;l>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,o,a,s,u,c,l,f,h=this.length-e;if((void 0===r||r>h)&&(r=h),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var d=!1;;)switch(n){case"hex":return function(t,e,r,n){r=Number(r)||0;var i,o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var a=e.length;for(n>a/2&&(n=a/2),i=0;i>8,i.push(r%256),i.push(n);return i}(t,this.length-l),this,l,f);default:if(d)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}},S7.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},S7.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||Eh(t,e,this.length);for(var n=this[t],i=1,o=0;++o>>=0,e>>>=0,r||Eh(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},S7.prototype.readUint8=S7.prototype.readUInt8=function(t,e){return t>>>=0,e||Eh(t,1,this.length),this[t]},S7.prototype.readUint16LE=S7.prototype.readUInt16LE=function(t,e){return t>>>=0,e||Eh(t,2,this.length),this[t]|this[t+1]<<8},S7.prototype.readUint16BE=S7.prototype.readUInt16BE=function(t,e){return t>>>=0,e||Eh(t,2,this.length),this[t]<<8|this[t+1]},S7.prototype.readUint32LE=S7.prototype.readUInt32LE=function(t,e){return t>>>=0,e||Eh(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+0x1000000*this[t+3]},S7.prototype.readUint32BE=S7.prototype.readUInt32BE=function(t,e){return t>>>=0,e||Eh(t,4,this.length),0x1000000*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},S7.prototype.readBigUInt64LE=EC(function(t){EE(t>>>=0,"offset");var e=this[t],r=this[t+7];(void 0===e||void 0===r)&&Ek(t,this.length-8);var n=e+256*this[++t]+65536*this[++t]+0x1000000*this[++t],i=this[++t]+256*this[++t]+65536*this[++t]+0x1000000*r;return BigInt(n)+(BigInt(i)<>>=0,"offset");var e=this[t],r=this[t+7];(void 0===e||void 0===r)&&Ek(t,this.length-8);var n=0x1000000*e+65536*this[++t]+256*this[++t]+this[++t],i=0x1000000*this[++t]+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<>>=0,e>>>=0,r||Eh(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},S7.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||Eh(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},S7.prototype.readInt8=function(t,e){return(t>>>=0,e||Eh(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},S7.prototype.readInt16LE=function(t,e){t>>>=0,e||Eh(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?0xffff0000|r:r},S7.prototype.readInt16BE=function(t,e){t>>>=0,e||Eh(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?0xffff0000|r:r},S7.prototype.readInt32LE=function(t,e){return t>>>=0,e||Eh(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},S7.prototype.readInt32BE=function(t,e){return t>>>=0,e||Eh(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},S7.prototype.readBigInt64LE=EC(function(t){EE(t>>>=0,"offset");var e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&Ek(t,this.length-8),(BigInt(this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24))<>>=0,"offset");var e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&Ek(t,this.length-8),(BigInt((e<<24)+65536*this[++t]+256*this[++t]+this[++t])<>>=0,e||Eh(t,4,this.length),el(this,t,!0,23,4)},S7.prototype.readFloatBE=function(t,e){return t>>>=0,e||Eh(t,4,this.length),el(this,t,!1,23,4)},S7.prototype.readDoubleLE=function(t,e){return t>>>=0,e||Eh(t,8,this.length),el(this,t,!0,52,8)},S7.prototype.readDoubleBE=function(t,e){return t>>>=0,e||Eh(t,8,this.length),el(this,t,!1,52,8)},S7.prototype.writeUintLE=S7.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;Ed(this,t,e,r,i,0)}var o=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;Ed(this,t,e,r,i,0)}var o=r-1,a=1;for(this[e+o]=255&t;--o>=0&&(a*=256);)this[e+o]=t/a&255;return e+r},S7.prototype.writeUint8=S7.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||Ed(this,t,e,1,255,0),this[e]=255&t,e+1},S7.prototype.writeUint16LE=S7.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||Ed(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},S7.prototype.writeUint16BE=S7.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||Ed(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},S7.prototype.writeUint32LE=S7.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||Ed(this,t,e,4,0xffffffff,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},S7.prototype.writeUint32BE=S7.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||Ed(this,t,e,4,0xffffffff,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},S7.prototype.writeBigUInt64LE=EC(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Ep(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),S7.prototype.writeBigUInt64BE=EC(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Ev(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),S7.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);Ed(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+r},S7.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);Ed(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},S7.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||Ed(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},S7.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||Ed(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},S7.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||Ed(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},S7.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||Ed(this,t,e,4,0x7fffffff,-0x80000000),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},S7.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||Ed(this,t,e,4,0x7fffffff,-0x80000000),t<0&&(t=0xffffffff+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},S7.prototype.writeBigInt64LE=EC(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Ep(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),S7.prototype.writeBigInt64BE=EC(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Ev(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),S7.prototype.writeFloatLE=function(t,e,r){return Em(this,t,e,!0,r)},S7.prototype.writeFloatBE=function(t,e,r){return Em(this,t,e,!1,r)},S7.prototype.writeDoubleLE=function(t,e,r){return Ey(this,t,e,!0,r)},S7.prototype.writeDoubleBE=function(t,e,r){return Ey(this,t,e,!1,r)},S7.prototype.copy=function(t,e,r,n){if(!S7.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i=n+4;r-=3)e="_".concat(t.slice(r-3,r)).concat(e);return"".concat(t.slice(0,r)).concat(e)}function ES(t,e,r,n,i,o){if(t>r||t3?0===e||e===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat((o+1)*8).concat(s):">= -(2".concat(s," ** ").concat((o+1)*8-1).concat(s,") and < 2 ** ")+"".concat((o+1)*8-1).concat(s):">= ".concat(e).concat(s," and <= ").concat(r).concat(s),new Eb.ERR_OUT_OF_RANGE("value",a,t)}EE(i,"offset"),(void 0===n[i]||void 0===n[i+o])&&Ek(i,n.length-(o+1))}function EE(t,e){if("number"!=typeof t)throw new Eb.ERR_INVALID_ARG_TYPE(e,"number",t)}function Ek(t,e,r){if(Math.floor(t)!==t)throw EE(t,r),new Eb.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new Eb.ERR_BUFFER_OUT_OF_BOUNDS;throw new Eb.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(e),t)}Ew("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),Ew("ERR_INVALID_ARG_TYPE",function(t,e){return'The "'.concat(t,'" argument must be of type number. Received type ').concat(void 0===e?"undefined":(0,e_._)(e))},TypeError),Ew("ERR_OUT_OF_RANGE",function(t,e,r){var n='The value of "'.concat(t,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>0x100000000?i=Ex(String(r)):(void 0===r?"undefined":(0,e_._)(r))==="bigint"&&(i=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=Ex(i)),i+="n"),n+=" It must be ".concat(e,". Received ").concat(i)},RangeError);var EA=/[^+/0-9A-Za-z-_]/g;function EO(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],a=0;a55295&&r<57344){if(!i){if(r>56319||a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function EI(t){return eu(function(t){if((t=(t=t.split("=")[0]).trim().replace(EA,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function ET(t,e,r,n){var i;for(i=0;i=e.length)&&!(i>=t.length);++i)e[i+r]=t[i];return i}function EN(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}var E_=function(){for(var t="0123456789abcdef",e=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}();function EC(t){return"undefined"==typeof BigInt?EP:t}function EP(){throw Error("BigInt not supported")}var ER=SN.existsSync,EL=SN.readFileSync,EM=SN.dirname,ED=SN.join,EB=SN.SourceMapConsumer,Ej=SN.SourceMapGenerator,Eq=/*#__PURE__*/function(){function t(e,r){if(xi(this,t),!1!==r.map){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var n=r.map?r.map.prev:void 0,i=this.loadMap(r.from,n);!this.mapFile&&r.from&&(this.mapFile=r.from),this.mapFile&&(this.root=EM(this.mapFile)),i&&(this.text=i)}}return xa(t,[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new EB(this.text)),this.consumerCache}},{key:"decodeInline",value:function(t){var e,r=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(r)return decodeURIComponent(t.substr(r[0].length));var n=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(n)return e=t.substr(n[0].length),S7?S7.from(e,"base64").toString():window.atob(e);throw Error("Unsupported source map encoding "+t.match(/data:application\/json;([^,]+),/)[1])}},{key:"getAnnotationURL",value:function(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}},{key:"isMap",value:function(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}},{key:"loadAnnotation",value:function(t){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),n=t.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,n)))}}},{key:"loadFile",value:function(t){if(this.root=EM(t),ER(t))return this.mapFile=t,EL(t,"utf-8").toString().trim()}},{key:"loadMap",value:function(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"==typeof e){var r=e(t);if(r){var n=this.loadFile(r);if(!n)throw Error("Unable to load previous source map: "+r.toString());return n}}else if(e instanceof EB)return Ej.fromSourceMap(e).toString();else if(e instanceof Ej)return e.toString();else if(this.isMap(e))return JSON.stringify(e);else throw Error("Unsupported previous source map format: "+e.toString())}else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){var i=this.annotation;return t&&(i=ED(EM(t),i)),this.loadFile(i)}}},{key:"startWith",value:function(t,e){return!!t&&t.substr(0,e.length)===e}},{key:"withContent",value:function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}]),t}();S0=Eq,Eq.default=Eq;var EU=Symbol("fromOffsetCache"),EF=!!(SJ&&SQ),EV=!!(SK&&SY),Ez=/*#__PURE__*/function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(xi(this,t),null==e||"object"==typeof e&&!e.toString)throw Error("PostCSS received ".concat(e," instead of CSS string"));if(this.css=e.toString(),"\uFEFF"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,r.from&&(!EV||/^\w+:\/\//.test(r.from)||SY(r.from)?this.file=r.from:this.file=SK(r.from)),EV&&EF){var n=new S0(this.css,r);if(n.text){this.map=n;var i=n.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}return xa(t,[{key:"error",value:function(t,e,r){var n,i,o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(e&&"object"==typeof e){var s=e,u=r;if("number"==typeof s.offset){var c=this.fromOffset(s.offset);e=c.line,r=c.col}else e=s.line,r=s.column;if("number"==typeof u.offset){var l=this.fromOffset(u.offset);i=l.line,n=l.col}else i=u.line,n=u.column}else if(!r){var f=this.fromOffset(e);e=f.line,r=f.col}var h=this.origin(e,r,i,n);return(o=h?new SA(t,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,a.plugin):new SA(t,void 0===i?e:{column:r,line:e},void 0===i?r:{column:n,line:i},this.css,this.file,a.plugin)).input={column:r,endColumn:n,endLine:i,line:e,source:this.css},this.file&&(SX&&(o.input.url=SX(this.file).toString()),o.input.file=this.file),o}},{key:"fromOffset",value:function(t){if(this[EU])s=this[EU];else{var e=this.css.split("\n");s=Array(e.length);for(var r=0,n=0,i=e.length;n=a)o=s.length-1;else for(var a,s,u,c=s.length-2;o>1)])c=u-1;else if(t>=s[u+1])o=u+1;else{o=u;break}return{col:t-s[o]+1,line:o+1}}},{key:"mapResolve",value:function(t){return/^\w+:\/\//.test(t)?t:SK(this.map.consumer().sourceRoot||this.map.root||".",t)}},{key:"origin",value:function(t,e,r,n){if(!this.map)return!1;var i,o,a=this.map.consumer(),s=a.originalPositionFor({column:e,line:t});if(!s.source)return!1;"number"==typeof r&&(i=a.originalPositionFor({column:n,line:r})),o=SY(s.source)?SX(s.source):new URL(s.source,this.map.consumer().sourceRoot||SX(this.map.mapFile));var u={column:s.column,endColumn:i&&i.column,endLine:i&&i.line,line:s.line,url:o.toString()};if("file:"===o.protocol){if(SZ)u.file=SZ(o);else throw Error("file: protocol is not available in this PostCSS build")}var c=a.sourceContentFor(s.source);return c&&(u.source=c),u}},{key:"toJSON",value:function(){for(var t={},e=0,r=["hasBOM","css","file","id"];e1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)try{for(var u,c=i[Symbol.iterator]();!(o=(u=c.next()).done);o=!0)u.value.raws.before=e.raws.before}catch(t){a=!0,s=t}finally{try{o||null==c.return||c.return()}finally{if(a)throw s}}}return i}},{key:"removeChild",value:function(t,e){var n=this.index(t);return!e&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),Sx(xz(r.prototype),"removeChild",this).call(this,t)}},{key:"toResult",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new eh(new ed,this,t).stringify()}}]),r}(SS);E$.registerLazyResult=function(t){eh=t},E$.registerProcessor=function(t){ed=t},EH=E$,E$.default=E$,SS.registerRoot(E$);var EW={},EG={},EY={comma:function(t){return EY.split(t,[","],!0)},space:function(t){return EY.split(t,[" ","\n"," "])},split:function(t,e,r){var n=[],i="",o=!1,a=0,s=!1,u="",c=!1,l=!0,f=!1,h=void 0;try{for(var d,p=t[Symbol.iterator]();!(l=(d=p.next()).done);l=!0){var v=d.value;c?c=!1:"\\"===v?c=!0:s?v===u&&(s=!1):'"'===v||"'"===v?(s=!0,u=v):"("===v?a+=1:")"===v?a>0&&(a-=1):0===a&&e.includes(v)&&(o=!0),o?(""!==i&&n.push(i.trim()),i="",o=!1):i+=v}}catch(t){f=!0,h=t}finally{try{l||null==p.return||p.return()}finally{if(f)throw h}}return(r||""!==i)&&n.push(i.trim()),n}};EG=EY,EY.default=EY;var EK=/*#__PURE__*/function(t){xj(r,t);var e=xW(r);function r(t){var n;return xi(this,r),(n=e.call(this,t)).type="rule",n.nodes||(n.nodes=[]),n}return xa(r,[{key:"selectors",get:function(){return EG.comma(this.selector)},set:function(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}}]),r}(SS);function EJ(t,e){if(Array.isArray(t))return t.map(function(t){return EJ(t)});var r=t.inputs,n=S$(t,["inputs"]);if(r){e=[];var i=!0,o=!1,a=void 0;try{for(var s,u=r[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value,l=x5(xU({},c),{__proto__:SW.prototype});l.map&&(l.map=x5(xU({},l.map),{__proto__:S0.prototype})),e.push(l)}}catch(t){o=!0,a=t}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}}if(n.nodes&&(n.nodes=t.nodes.map(function(t){return EJ(t,e)})),n.source){var f=n.source,h=f.inputId,d=S$(f,["inputId"]);n.source=d,null!=h&&(n.source.input=e[h])}if("root"===n.type)return new EH(n);if("decl"===n.type)return new Sj(n);if("rule"===n.type)return new EW(n);if("comment"===n.type)return new SE(n);if("atrule"===n.type)return new Sw(n);throw Error("Unknown node type: "+t.type)}EW=EK,EK.default=EK,SS.registerRule(EK),SH=EJ,EJ.default=EJ;var EQ={};function EZ(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r,n,i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o=[],a=!0,s=!1;try{for(i=i.call(t);!(a=(r=i.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,n=t}finally{try{a||null==i.return||i.return()}finally{if(s)throw n}}return o}}(t,e)||Sy(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var eT=(ek("h7Cmf"),ek("h7Cmf")),EX={},E0=SN.dirname,E1=SN.relative,E2=SN.resolve,E3=SN.sep,E5=SN.SourceMapConsumer,E8=SN.SourceMapGenerator,E6=SN.pathToFileURL,E4=!!(E5&&E8),E9=!!(E0&&E2&&E1&&E3);EX=/*#__PURE__*/function(){function t(e,r,n,i){xi(this,t),this.stringify=e,this.mapOpts=n.map||{},this.root=r,this.opts=n,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}return xa(t,[{key:"addAnnotation",value:function(){t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var t,e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}},{key:"applyPrevMaps",value:function(){var t=!0,e=!1,r=void 0;try{for(var n,i=this.previous()[Symbol.iterator]();!(t=(n=i.next()).done);t=!0){var o=n.value,a=this.toUrl(this.path(o.file)),s=o.root||E0(o.file),u=void 0;!1===this.mapOpts.sourcesContent?(u=new E5(o.text)).sourcesContent&&(u.sourcesContent=null):u=o.consumer(),this.map.applySourceMap(u,a,this.toUrl(this.path(s)))}}catch(t){e=!0,r=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw r}}}},{key:"clearAnnotation",value:function(){if(!1!==this.mapOpts.annotation){if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}}},{key:"generate",value:function(){if(this.clearAnnotation(),E9&&E4&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,function(e){t+=e}),[t]}},{key:"generateMap",value:function(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=E8.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new E8({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return(this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline())?[this.css]:[this.css,this.map]}},{key:"generateString",value:function(){var t,e,r=this;this.css="",this.map=new E8({file:this.outputFile(),ignoreInvalidMapping:!0});var n=1,i=1,o="",a={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(s,u,c){if(r.css+=s,u&&"end"!==c&&(a.generated.line=n,a.generated.column=i-1,u.source&&u.source.start?(a.source=r.sourcePath(u),a.original.line=u.source.start.line,a.original.column=u.source.start.column-1):(a.source=o,a.original.line=1,a.original.column=0),r.map.addMapping(a)),(e=s.match(/\n/g))?(n+=e.length,t=s.lastIndexOf("\n"),i=s.length-t):i+=s.length,u&&"start"!==c){var l=u.parent||{raws:{}};(!("decl"===u.type||"atrule"===u.type&&!u.nodes)||u!==l.last||l.raws.semicolon)&&(u.source&&u.source.end?(a.source=r.sourcePath(u),a.original.line=u.source.end.line,a.original.column=u.source.end.column-1,a.generated.line=n,a.generated.column=i-2):(a.source=o,a.original.line=1,a.original.column=0,a.generated.line=n,a.generated.column=i-1),r.map.addMapping(a))}})}},{key:"isAnnotation",value:function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(t){return t.annotation}))}},{key:"isInline",value:function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some(function(t){return t.inline}))}},{key:"isMap",value:function(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}},{key:"isSourcesContent",value:function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(t){return t.withContent()})}},{key:"outputFile",value:function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}},{key:"path",value:function(t){if(this.mapOpts.absolute||60===t.charCodeAt(0)||/^\w+:\/\//.test(t))return t;var e=this.memoizedPaths.get(t);if(e)return e;var r=this.opts.to?E0(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=E0(E2(r,this.mapOpts.annotation)));var n=E1(r,t);return this.memoizedPaths.set(t,n),n}},{key:"previous",value:function(){var t=this;if(!this.previousMaps){if(this.previousMaps=[],this.root)this.root.walk(function(e){if(e.source&&e.source.input.map){var r=e.source.input.map;t.previousMaps.includes(r)||t.previousMaps.push(r)}});else{var e=new SW(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}}return this.previousMaps}},{key:"setSourcesContent",value:function(){var t=this,e={};if(this.root)this.root.walk(function(r){if(r.source){var n=r.source.input.from;if(n&&!e[n]){e[n]=!0;var i=t.usesFileUrls?t.toFileUrl(n):t.toUrl(t.path(n));t.map.setSourceContent(i,r.source.input.css)}}});else if(this.css){var r=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(r,this.css)}}},{key:"sourcePath",value:function(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}},{key:"toBase64",value:function(t){return S7?S7.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}},{key:"toFileUrl",value:function(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(E6){var r=E6(t).toString();return this.memoizedFileURLs.set(t,r),r}throw Error("`map.absolute` option is not available in this PostCSS build")}},{key:"toUrl",value:function(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===E3&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}}]),t}();var E7={},kt={},ke={},kr=/[\t\n\f\r "#'()/;[\\\]{}]/g,kn=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ki=/.[\r\n"'(/\\]/,ko=/[\da-f]/i;ke=function(t){var e,r,n,i,o,a,s,u,c,l,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=t.css.valueOf(),d=f.ignoreErrors,p=h.length,v=0,g=[],m=[];function y(e){throw t.error("Unclosed "+e,v)}return{back:function(t){m.push(t)},endOfFile:function(){return 0===m.length&&v>=p},nextToken:function(t){if(m.length)return m.pop();if(!(v>=p)){var f=!!t&&t.ignoreUnclosed;switch(e=h.charCodeAt(v)){case 10:case 32:case 9:case 13:case 12:i=v;do i+=1,e=h.charCodeAt(i);while(32===e||10===e||9===e||13===e||12===e)a=["space",h.slice(v,i)],v=i-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:var b=String.fromCharCode(e);a=[b,b,v];break;case 40:if(l=g.length?g.pop()[1]:"",c=h.charCodeAt(v+1),"url"===l&&39!==c&&34!==c&&32!==c&&10!==c&&9!==c&&12!==c&&13!==c){i=v;do{if(s=!1,-1===(i=h.indexOf(")",i+1))){if(d||f){i=v;break}y("bracket")}for(u=i;92===h.charCodeAt(u-1);)u-=1,s=!s}while(s)a=["brackets",h.slice(v,i+1),v,i],v=i}else i=h.indexOf(")",v+1),r=h.slice(v,i+1),-1===i||ki.test(r)?a=["(","(",v]:(a=["brackets",r,v,i],v=i);break;case 39:case 34:o=39===e?"'":'"',i=v;do{if(s=!1,-1===(i=h.indexOf(o,i+1))){if(d||f){i=v+1;break}y("string")}for(u=i;92===h.charCodeAt(u-1);)u-=1,s=!s}while(s)a=["string",h.slice(v,i+1),v,i],v=i;break;case 64:kr.lastIndex=v+1,kr.test(h),i=0===kr.lastIndex?h.length-1:kr.lastIndex-2,a=["at-word",h.slice(v,i+1),v,i],v=i;break;case 92:for(i=v,n=!0;92===h.charCodeAt(i+1);)i+=1,n=!n;if(e=h.charCodeAt(i+1),n&&47!==e&&32!==e&&10!==e&&9!==e&&13!==e&&12!==e&&(i+=1,ko.test(h.charAt(i)))){for(;ko.test(h.charAt(i+1));)i+=1;32===h.charCodeAt(i+1)&&(i+=1)}a=["word",h.slice(v,i+1),v,i],v=i;break;default:47===e&&42===h.charCodeAt(v+1)?(0===(i=h.indexOf("*/",v+2)+1)&&(d||f?i=h.length:y("comment")),a=["comment",h.slice(v,i+1),v,i]):(kn.lastIndex=v+1,kn.test(h),i=0===kn.lastIndex?h.length-1:kn.lastIndex-2,a=["word",h.slice(v,i+1),v,i],g.push(a)),v=i}return v++,a}},position:function(){return v}}};var ka={empty:!0,space:!0};function ks(t,e){var r=new SW(t,e),n=new kt(r);try{n.parse()}catch(t){throw t}return n.root}kt=/*#__PURE__*/function(){function t(e){xi(this,t),this.input=e,this.root=new EH,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}return xa(t,[{key:"atrule",value:function(t){var e,r,n,i=new Sw;i.name=t[1].slice(1),""===i.name&&this.unnamedAtrule(i,t),this.init(i,t[2]);for(var o=!1,a=!1,s=[],u=[];!this.tokenizer.endOfFile();){if("("===(e=(t=this.tokenizer.nextToken())[0])||"["===e?u.push("("===e?")":"]"):"{"===e&&u.length>0?u.push("}"):e===u[u.length-1]&&u.pop(),0===u.length){if(";"===e){i.source.end=this.getPosition(t[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===e){a=!0;break}if("}"===e){if(s.length>0){for(n=s.length-1,r=s[n];r&&"space"===r[0];)r=s[--n];r&&(i.source.end=this.getPosition(r[3]||r[2]),i.source.end.offset++)}this.end(t);break}s.push(t)}else s.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(i.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(i,"params",s),o&&(t=s[s.length-1],i.source.end=this.getPosition(t[3]||t[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),a&&(i.nodes=[],this.current=i)}},{key:"checkMissedSemicolon",value:function(t){var e,r=this.colon(t);if(!1!==r){for(var n=0,i=r-1;i>=0&&("space"===(e=t[i])[0]||2!==(n+=1));i--);throw this.input.error("Missed semicolon","word"===e[0]?e[3]+1:e[2])}}},{key:"colon",value:function(t){var e=0,r=!0,n=!1,i=void 0;try{for(var o,a,s,u=t.entries()[Symbol.iterator]();!(r=(s=u.next()).done);r=!0){var c=EZ(s.value,2),l=c[0],f=c[1];if(a=f[0],"("===a&&(e+=1),")"===a&&(e-=1),0===e&&":"===a){if(o){if("word"===o[0]&&"progid"===o[1])continue;return l}this.doubleColon(f)}o=f}}catch(t){n=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(n)throw i}}return!1}},{key:"comment",value:function(t){var e=new SE;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;var r=t[1].slice(2,-2);if(/^\s*$/.test(r))e.text="",e.raws.left=r,e.raws.right="";else{var n=r.match(/^(\s*)([^]*\S)(\s*)$/);e.text=n[2],e.raws.left=n[1],e.raws.right=n[3]}}},{key:"createTokenizer",value:function(){this.tokenizer=ke(this.input)}},{key:"decl",value:function(t,e){var r,n,i=new Sj;this.init(i,t[0][2]);var o=t[t.length-1];for(";"===o[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(o[3]||o[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],n=r[3]||r[2];if(n)return n}}(t)),i.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){var a=t[0][0];if(":"===a||"space"===a||"comment"===a)break;i.prop+=t.shift()[1]}for(i.raws.between="";t.length;){if(":"===(r=t.shift())[0]){i.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),i.raws.between+=r[1]}("_"===i.prop[0]||"*"===i.prop[0])&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var s=[];t.length&&("space"===(n=t[0][0])||"comment"===n);)s.push(t.shift());this.precheckMissedSemicolon(t);for(var u=t.length-1;u>=0;u--){if("!important"===(r=t[u])[1].toLowerCase()){i.important=!0;var c=this.stringFrom(t,u);" !important"!==(c=this.spacesFromEnd(t)+c)&&(i.raws.important=c);break}if("important"===r[1].toLowerCase()){for(var l=t.slice(0),f="",h=u;h>0;h--){var d=l[h][0];if(f.trim().startsWith("!")&&"space"!==d)break;f=l.pop()[1]+f}f.trim().startsWith("!")&&(i.important=!0,i.raws.important=f,t=l)}if("space"!==r[0]&&"comment"!==r[0])break}t.some(function(t){return"space"!==t[0]&&"comment"!==t[0]})&&(i.raws.between+=s.map(function(t){return t[1]}).join(""),s=[]),this.raw(i,"value",s.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}},{key:"doubleColon",value:function(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}},{key:"emptyRule",value:function(t){var e=new EW;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}},{key:"end",value:function(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}},{key:"endFile",value:function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}},{key:"freeSemicolon",value:function(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}},{key:"getPosition",value:function(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}},{key:"init",value:function(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}},{key:"other",value:function(t){for(var e=!1,r=null,n=!1,i=null,o=[],a=t[1].startsWith("--"),s=[],u=t;u;){if(r=u[0],s.push(u),"("===r||"["===r)i||(i=u),o.push("("===r?")":"]");else if(a&&n&&"{"===r)i||(i=u),o.push("}");else if(0===o.length){if(";"===r){if(n){this.decl(s,a);return}break}if("{"===r){this.rule(s);return}if("}"===r){this.tokenizer.back(s.pop()),e=!0;break}":"===r&&(n=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),o.length>0&&this.unclosedBracket(i),e&&n){if(!a)for(;s.length&&("space"===(u=s[s.length-1][0])||"comment"===u);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}},{key:"parse",value:function(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}},{key:"precheckMissedSemicolon",value:function(){}},{key:"raw",value:function(t,e,r,n){for(var i,o,a,s,u=r.length,c="",l=!0,f=0;f1&&void 0!==arguments[1]?arguments[1]:{};if(xi(this,t),this.type="warning",this.text=e,r.node&&r.node.source){var n=r.node.rangeBy(r);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var i in r)this[i]=r[i]}return xa(t,[{key:"toString",value:function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}]),t}();kc=kl,kl.default=kl;var kf=/*#__PURE__*/function(){function t(e,r,n){xi(this,t),this.processor=e,this.messages=[],this.root=r,this.opts=n,this.css=void 0,this.map=void 0}return xa(t,[{key:"toString",value:function(){return this.css}},{key:"warn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!e.plugin&&this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);var r=new kc(t,e);return this.messages.push(r),r}},{key:"warnings",value:function(){return this.messages.filter(function(t){return"warning"===t.type})}},{key:"content",get:function(){return this.css}}]),t}();ku=kf,kf.default=kf;var kh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},kd={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},kp={Once:!0,postcssPlugin:!0,prepare:!0};function kv(t){return"object"==typeof t&&"function"==typeof t.then}function kg(t){var e=!1,r=kh[t.type];return("decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append)?[r,r+"-"+e,0,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function km(t){return{eventIndex:0,events:"document"===t.type?["Document",0,"DocumentExit"]:"root"===t.type?["Root",0,"RootExit"]:kg(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function ky(t){return t[et]=!1,t.nodes&&t.nodes.forEach(function(t){return ky(t)}),t}var kb={},kw=/*#__PURE__*/function(){function t(e,r,n){var i,o=this;if(xi(this,t),this.stringified=!1,this.processed=!1,"object"==typeof r&&null!==r&&("root"===r.type||"document"===r.type))i=ky(r);else if(r instanceof t||r instanceof ku)i=ky(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{var a=E7;n.syntax&&(a=n.syntax.parse),n.parser&&(a=n.parser),a.parse&&(a=a.parse);try{i=a(r,n)}catch(t){this.processed=!0,this.error=t}i&&!i[ee]&&SS.rebuild(i)}this.result=new ku(e,i,n),this.helpers=x5(xU({},kb),{postcss:kb,result:this.result}),this.plugins=this.processor.plugins.map(function(t){return"object"==typeof t&&t.prepare?xU({},t,t.prepare(o.result)):t})}return xa(t,[{key:"async",value:function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}},{key:"catch",value:function(t){return this.async().catch(t)}},{key:"finally",value:function(t){return this.async().then(t,t)}},{key:"getAsyncError",value:function(){throw Error("Use process(css).then(cb) to work with async plugins")}},{key:"handleError",value:function(t,e){var r=this.result.lastPlugin;try{e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin?r.postcssVersion:(t.plugin=r.postcssPlugin,t.setMessage())}catch(t){console&&console.error&&console.error(t)}return t}},{key:"prepareVisitors",value:function(){var t=this;this.listeners={};var e=function(e,r,n){t.listeners[r]||(t.listeners[r]=[]),t.listeners[r].push([e,n])},r=!0,n=!1,i=void 0;try{for(var o,a=this.plugins[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){var s=o.value;if("object"==typeof s)for(var u in s){if(!kd[u]&&/^[A-Z]/.test(u))throw Error("Unknown event ".concat(u," in ").concat(s.postcssPlugin,". ")+"Try to update PostCSS (".concat(this.processor.version," now)."));if(!kp[u]){if("object"==typeof s[u])for(var c in s[u])e(s,"*"===c?u:u+"-"+c.toLowerCase(),s[u][c]);else"function"==typeof s[u]&&e(s,u,s[u])}}}}catch(t){n=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}this.hasListener=Object.keys(this.listeners).length>0}},{key:"runAsync",value:function(){var t=this;return eI(function(){var e,r,n,i,o,a,s,u,c,l,f,h,d,p,v,g;return(0,eT.__generator)(this,function(m){switch(m.label){case 0:t.plugin=0,e=0,m.label=1;case 1:if(!(e0))return[3,13];if(!kv(s=t.visitTick(a)))return[3,12];m.label=9;case 9:return m.trys.push([9,11,,12]),[4,s];case 10:return m.sent(),[3,12];case 11:throw u=m.sent(),c=a[a.length-1].node,t.handleError(u,c);case 12:return[3,8];case 13:return[3,7];case 14:if(l=!0,f=!1,h=void 0,!t.listeners.OnceExit)return[3,22];m.label=15;case 15:m.trys.push([15,20,21,22]),d=function(){var e,r,n,i;return(0,eT.__generator)(this,function(a){switch(a.label){case 0:r=(e=EZ(v.value,2))[0],n=e[1],t.result.lastPlugin=r,a.label=1;case 1:if(a.trys.push([1,6,,7]),"document"!==o.type)return[3,3];return[4,Promise.all(o.nodes.map(function(e){return n(e,t.helpers)}))];case 2:return a.sent(),[3,5];case 3:return[4,n(o,t.helpers)];case 4:a.sent(),a.label=5;case 5:return[3,7];case 6:throw i=a.sent(),t.handleError(i);case 7:return[2]}})},p=t.listeners.OnceExit[Symbol.iterator](),m.label=16;case 16:if(l=(v=p.next()).done)return[3,19];return[5,(0,eT.__values)(d())];case 17:m.sent(),m.label=18;case 18:return l=!0,[3,16];case 19:return[3,22];case 20:return g=m.sent(),f=!0,h=g,[3,22];case 21:try{l||null==p.return||p.return()}finally{if(f)throw h}return[7];case 22:return t.processed=!0,[2,t.stringify()]}})})()}},{key:"runOnRoot",value:function(t){var e=this;this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var r=this.result.root.nodes.map(function(r){return t.Once(r,e.helpers)});if(kv(r[0]))return Promise.all(r);return r}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}},{key:"stringify",value:function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=SL;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=new EX(e,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}},{key:"sync",value:function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();var t=!0,e=!1,r=void 0;try{for(var n,i=this.plugins[Symbol.iterator]();!(t=(n=i.next()).done);t=!0){var o=n.value,a=this.runOnRoot(o);if(kv(a))throw this.getAsyncError()}}catch(t){e=!0,r=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw r}}if(this.prepareVisitors(),this.hasListener){for(var s=this.result.root;!s[et];)s[et]=!0,this.walkSync(s);if(this.listeners.OnceExit){var u=!0,c=!1,l=void 0;if("document"===s.type)try{for(var f,h=s.nodes[Symbol.iterator]();!(u=(f=h.next()).done);u=!0){var d=f.value;this.visitSync(this.listeners.OnceExit,d)}}catch(t){c=!0,l=t}finally{try{u||null==h.return||h.return()}finally{if(c)throw l}}else this.visitSync(this.listeners.OnceExit,s)}}return this.result}},{key:"then",value:function(t,e){return this.async().then(t,e)}},{key:"toString",value:function(){return this.css}},{key:"visitSync",value:function(t,e){var r=!0,n=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){var s=EZ(o.value,2),u=s[0],c=s[1];this.result.lastPlugin=u;var l=void 0;try{l=c(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(kv(l))throw this.getAsyncError()}}catch(t){n=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}}},{key:"visitTick",value:function(t){var e=t[t.length-1],r=e.node,n=e.visitors;if("root"!==r.type&&"document"!==r.type&&!r.parent){t.pop();return}if(n.length>0&&e.visitorIndex0&&void 0!==arguments[0]?arguments[0]:[];xi(this,t),this.version="8.4.47",this.plugins=this.normalize(e)}return xa(t,[{key:"normalize",value:function(t){var e=[],r=!0,n=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){var s=o.value;if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))e=e.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)e.push(s);else if("function"==typeof s)e.push(s);else if("object"==typeof s&&(s.parse||s.stringify));else throw Error(s+" is not a PostCSS plugin")}}catch(t){n=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}return e}},{key:"process",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.plugins.length||e.parser||e.stringifier||e.syntax?new EQ(this,t,e):new kS(this,t,e)}},{key:"use",value:function(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}}]),t}();function kA(){for(var t=arguments.length,e=Array(t),r=0;r]+$/;function kR(t,e,r){if(null==t)return"";"number"==typeof t&&(t=t.toString());var n,i,o,a,s,u,c,l,f,h="",d="";function p(t,e){var r=this;this.tag=t,this.attribs=e||{},this.tagPosition=h.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(s.length){var t=s[s.length-1];t.text+=r.text}},this.updateParentNodeMediaChildren=function(){s.length&&kI.includes(this.tag)&&s[s.length-1].mediaChildren.push(this.tag)}}(e=Object.assign({},kR.defaults,e)).parser=Object.assign({},kL,e.parser);var v=function(t){return!1===e.allowedTags||(e.allowedTags||[]).indexOf(t)>-1};kT.forEach(function(t){v(t)&&!e.allowVulnerableTags&&console.warn("\n\n⚠️ Your `allowedTags` option includes, `".concat(t,"`, which is inherently\nvulnerable to XSS attacks. Please remove it from `allowedTags`.\nOr, to disable this warning, add the `allowVulnerableTags` option\nand ensure you are accounting for this risk.\n\n"))});var g=e.nonTextTags||["script","style","textarea","option"];e.allowedAttributes&&(n={},i={},kN(e.allowedAttributes,function(t,e){n[e]=[];var r=[];t.forEach(function(t){"string"==typeof t&&t.indexOf("*")>=0?r.push(Si(t).replace(/\\\*/g,".*")):n[e].push(t)}),r.length&&(i[e]=RegExp("^("+r.join("|")+")$"))}));var m={},y={},b={};kN(e.allowedClasses,function(t,e){if(n&&(k_(n,e)||(n[e]=[]),n[e].push("class")),m[e]=t,Array.isArray(t)){var r=[];m[e]=[],b[e]=[],t.forEach(function(t){"string"==typeof t&&t.indexOf("*")>=0?r.push(Si(t).replace(/\\\*/g,".*")):t instanceof RegExp?b[e].push(t):m[e].push(t)}),r.length&&(y[e]=RegExp("^("+r.join("|")+")$"))}});var w={};kN(e.transformTags,function(t,e){var r;"function"==typeof t?r=t:"string"==typeof t&&(r=kR.simpleTransform(t)),"*"===e?o=r:w[e]=r});var x=!1;E();var S=new xD({onopentag:function(t,r){if(e.enforceHtmlBoundary&&"html"===t&&E(),l){f++;return}var S,T=new p(t,r);s.push(T);var N=!1,_=!!T.text;if(k_(w,t)&&(S=w[t](t,r),T.attribs=r=S.attribs,void 0!==S.text&&(T.innerText=S.text),t!==S.tagName&&(T.name=t=S.tagName,c[a]=S.tagName)),o&&(S=o(t,r),T.attribs=r=S.attribs,t!==S.tagName&&(T.name=t=S.tagName,c[a]=S.tagName)),(!v(t)||"recursiveEscape"===e.disallowedTagsMode&&!function(t){for(var e in t)if(k_(t,e))return!1;return!0}(u)||null!=e.nestingLimit&&a>=e.nestingLimit)&&(N=!0,u[a]=!0,("discard"===e.disallowedTagsMode||"completelyDiscard"===e.disallowedTagsMode)&&-1!==g.indexOf(t)&&(l=!0,f=1),u[a]=!0),a++,N){if("discard"===e.disallowedTagsMode||"completelyDiscard"===e.disallowedTagsMode)return;d=h,h=""}h+="<"+t,"script"===t&&(e.allowedScriptHostnames||e.allowedScriptDomains)&&(T.innerText=""),(!n||k_(n,t)||n["*"])&&kN(r,function(r,o){if(!kP.test(o)||""===r&&!e.allowedEmptyAttributes.includes(o)&&(e.nonBooleanAttributes.includes(o)||e.nonBooleanAttributes.includes("*"))){delete T.attribs[o];return}var a=!1;if(!n||k_(n,t)&&-1!==n[t].indexOf(o)||n["*"]&&-1!==n["*"].indexOf(o)||k_(i,t)&&i[t].test(o)||i["*"]&&i["*"].test(o))a=!0;else if(n&&n[t]){var s=!0,u=!1,c=void 0;try{for(var l,f=n[t][Symbol.iterator]();!(s=(l=f.next()).done);s=!0){var d=l.value;if(Sa(d)&&d.name&&d.name===o){a=!0;var p="";if(!0===d.multiple){var v=r.split(" "),g=!0,w=!1,x=void 0;try{for(var S,E=v[Symbol.iterator]();!(g=(S=E.next()).done);g=!0){var N=S.value;-1!==d.values.indexOf(N)&&(""===p?p=N:p+=" "+N)}}catch(t){w=!0,x=t}finally{try{g||null==E.return||E.return()}finally{if(w)throw x}}}else d.values.indexOf(r)>=0&&(p=r);r=p}}}catch(t){u=!0,c=t}finally{try{s||null==f.return||f.return()}finally{if(u)throw c}}}if(a){if(-1!==e.allowedSchemesAppliedToAttributes.indexOf(o)&&A(t,r)){delete T.attribs[o];return}if("script"===t&&"src"===o){var _=!0;try{var C=O(r);if(e.allowedScriptHostnames||e.allowedScriptDomains){var P=(e.allowedScriptHostnames||[]).find(function(t){return t===C.url.hostname}),R=(e.allowedScriptDomains||[]).find(function(t){return C.url.hostname===t||C.url.hostname.endsWith(".".concat(t))});_=P||R}}catch(t){_=!1}if(!_){delete T.attribs[o];return}}if("iframe"===t&&"src"===o){var L=!0;try{var M=O(r);if(M.isRelativeUrl)L=k_(e,"allowIframeRelativeUrls")?e.allowIframeRelativeUrls:!e.allowedIframeHostnames&&!e.allowedIframeDomains;else if(e.allowedIframeHostnames||e.allowedIframeDomains){var D=(e.allowedIframeHostnames||[]).find(function(t){return t===M.url.hostname}),B=(e.allowedIframeDomains||[]).find(function(t){return M.url.hostname===t||M.url.hostname.endsWith(".".concat(t))});L=D||B}}catch(t){L=!1}if(!L){delete T.attribs[o];return}}if("srcset"===o)try{var j=Sv(r);if(j.forEach(function(t){A("srcset",t.url)&&(t.evil=!0)}),(j=kC(j,function(t){return!t.evil})).length)r=kC(j,function(t){return!t.evil}).map(function(t){if(!t.url)throw Error("URL missing");return t.url+(t.w?" ".concat(t.w,"w"):"")+(t.h?" ".concat(t.h,"h"):"")+(t.d?" ".concat(t.d,"x"):"")}).join(", "),T.attribs[o]=r;else{delete T.attribs[o];return}}catch(t){delete T.attribs[o];return}if("class"===o){var q=m[t],U=m["*"],F=y[t],V=b[t],z=b["*"],H=[F,y["*"]].concat(V,z).filter(function(t){return t});if(!(r=q&&U?I(r,Ss(q,U),H):I(r,q||U,H)).length){delete T.attribs[o];return}}if("style"===o){if(e.parseStyleAttributes)try{var $=kO(t+" {"+r+"}",{map:!1});if(r=(function(t,e){if(!e)return t;var r,n=t.nodes[0];return(r=e[n.selector]&&e["*"]?Ss(e[n.selector],e["*"]):e[n.selector]||e["*"])&&(t.nodes[0].nodes=n.nodes.reduce(function(t,e){return k_(r,e.prop)&&r[e.prop].some(function(t){return t.test(e.value)})&&t.push(e),t},[])),t})($,e.allowedStyles).nodes[0].nodes.reduce(function(t,e){return t.push("".concat(e.prop,":").concat(e.value).concat(e.important?" !important":"")),t},[]).join(";"),0===r.length){delete T.attribs[o];return}}catch(e){"undefined"!=typeof window&&console.warn('Failed to parse "'+t+" {"+r+"}\", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547"),delete T.attribs[o];return}else if(e.allowedStyles)throw Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}h+=" "+o,r&&r.length?h+='="'+k(r,!0)+'"':e.allowedEmptyAttributes.includes(o)&&(h+='=""')}else delete T.attribs[o]}),-1!==e.selfClosing.indexOf(t)?h+=" />":(h+=">",!T.innerText||_||e.textFilter||(h+=k(T.innerText),x=!0)),N&&(h=d+k(h),d="")},ontext:function(t){if(!l){var r,n=s[s.length-1];if(n&&(r=n.tag,t=void 0!==n.innerText?n.innerText:t),"completelyDiscard"!==e.disallowedTagsMode||v(r)){if(("discard"===e.disallowedTagsMode||"completelyDiscard"===e.disallowedTagsMode)&&("script"===r||"style"===r))h+=t;else{var i=k(t,!1);e.textFilter&&!x?h+=e.textFilter(i,r):x||(h+=i)}}else t="";if(s.length){var o=s[s.length-1];o.text+=t}}},onclosetag:function(t,r){if(l){if(--f)return;l=!1}var n=s.pop();if(n){if(n.tag!==t){s.push(n);return}l=!!e.enforceHtmlBoundary&&"html"===t;var i=u[--a];if(i){if(delete u[a],"discard"===e.disallowedTagsMode||"completelyDiscard"===e.disallowedTagsMode){n.updateParentNodeText();return}d=h,h=""}if(c[a]&&(t=c[a],delete c[a]),e.exclusiveFilter&&e.exclusiveFilter(n)){h=h.substr(0,n.tagPosition);return}if(n.updateParentNodeMediaChildren(),n.updateParentNodeText(),-1!==e.selfClosing.indexOf(t)||r&&!v(t)&&["escape","recursiveEscape"].indexOf(e.disallowedTagsMode)>=0){i&&(h=d,d="");return}h+="",i&&(h=d+k(h),d=""),x=!1}}},e.parser);return S.write(t),S.end(),h;function E(){h="",a=0,s=[],u={},c={},l=!1,f=0}function k(t,r){return"string"!=typeof t&&(t+=""),e.parser.decodeEntities&&(t=t.replace(/&/g,"&").replace(//g,">"),r&&(t=t.replace(/"/g,"""))),t=t.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(//g,">"),r&&(t=t.replace(/"/g,""")),t}function A(t,r){for(r=r.replace(/[\x00-\x20]+/g,"");;){var n=r.indexOf("",n+4);if(-1===i)break;r=r.substring(0,n)+r.substring(i+3)}var o=r.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!o)return!!r.match(/^[/\\]{2}/)&&!e.allowProtocolRelative;var a=o[1].toLowerCase();return k_(e.allowedSchemesByTag,t)?-1===e.allowedSchemesByTag[t].indexOf(a):!e.allowedSchemes||-1===e.allowedSchemes.indexOf(a)}function O(t){if((t=t.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//")).startsWith("relative:"))throw Error("relative: exploit attempt");for(var e="relative://relative-site",r=0;r<100;r++)e+="/".concat(r);var n=new URL(t,e);return{isRelativeUrl:n&&"relative-site"===n.hostname&&"relative:"===n.protocol,url:n}}function I(t,e,r){return e?(t=t.split(/\s+/)).filter(function(t){return -1!==e.indexOf(t)||r.some(function(e){return e.test(t)})}).join(" "):t}}var kL={decodeEntities:!0};kR.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0},kR.simpleTransform=function(t,e,r){return r=void 0===r||r,e=e||{},function(n,i){var o;if(r)for(o in e)i[o]=e[o];else i=e;return{tagName:t,attribs:i}}};var kM={};r="millisecond",n="second",i="minute",o="hour",a="week",s="month",u="quarter",c="year",l="date",f="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p=function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},(g={})[v="en"]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||"th")+"]"}},m="$isDayjsObject",y=function(t){return t instanceof S||!(!t||!t[m])},b=function t(e,r,n){var i;if(!e)return v;if("string"==typeof e){var o=e.toLowerCase();g[o]&&(i=o),r&&(g[o]=r,i=o);var a=e.split("-");if(!i&&a.length>1)return t(a[0])}else{var s=e.name;g[s]=e,i=s}return!n&&i&&(v=i),i||!n&&v},w=function(t,e){if(y(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new S(r)},(x={s:p,z:function(t){var e=-t.utcOffset(),r=Math.abs(e);return(e<=0?"+":"-")+p(Math.floor(r/60),2,"0")+":"+p(r%60,2,"0")},m:function t(e,r){if(e.date()5&&"xml"===n)return kG("InvalidXml","XML declaration allowed only at the start of the document.",kY(t,e));if("?"!=t[e]||">"!=t[e+1])continue;e++;break}return e}function kH(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){var r=1;for(e+=8;e"===t[e]&&0==--r)break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7]){for(e+=8;e"===t[e+2]){e+=2;break}}return e}ep=function(t,e){e=Object.assign({},kF,e);var r=[],n=!1,i=!1;"\uFEFF"===t[0]&&(t=t.substr(1));for(var o=0;o"!==t[o]&&" "!==t[o]&&" "!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)u+=t[o];if("/"===(u=u.trim())[u.length-1]&&(u=u.substring(0,u.length-1),o--),!eg(u))return kG("InvalidTag",0===u.trim().length?"Invalid space after '<'.":"Tag '"+u+"' is an invalid name.",kY(t,o));var c=function(t,e){for(var r="",n="",i=!1;e"===t[e]&&""===n){i=!0;break}r+=t[e]}return""===n&&{value:r,index:e,tagClosed:i}}(t,o);if(!1===c)return kG("InvalidAttr","Attributes for '"+u+"' have open quote.",kY(t,o));var l=c.value;if(o=c.index,"/"===l[l.length-1]){var f=o-l.length,h=kW(l=l.substring(0,l.length-1),e);if(!0!==h)return kG(h.err.code,h.err.msg,kY(t,f+h.err.line));n=!0}else if(s){if(!c.tagClosed)return kG("InvalidTag","Closing tag '"+u+"' doesn't have proper closing.",kY(t,o));if(l.trim().length>0)return kG("InvalidTag","Closing tag '"+u+"' can't have attributes or invalid starting.",kY(t,a));if(0===r.length)return kG("InvalidTag","Closing tag '"+u+"' has not been opened.",kY(t,a));var d=r.pop();if(u!==d.tagName){var p=kY(t,d.tagStartPos);return kG("InvalidTag","Expected closing tag '"+d.tagName+"' (opened in line "+p.line+", col "+p.col+") instead of closing tag '"+u+"'.",kY(t,a))}0==r.length&&(i=!0)}else{var v=kW(l,e);if(!0!==v)return kG(v.err.code,v.err.msg,kY(t,o-l.length+v.err.line));if(!0===i)return kG("InvalidXml","Multiple possible root nodes found.",kY(t,o));-1!==e.unpairedTags.indexOf(u)||r.push({tagName:u,tagStartPos:a}),n=!0}for(o++;o0)||kG("InvalidXml","Invalid '"+JSON.stringify(r.map(function(t){return t.tagName}),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):kG("InvalidXml","Start tag expected.",1)};var k$=RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function kW(t,e){for(var r=em(t,k$),n={},i=0;i0?this.child.push((xq(e={},t.tagname,t.child),xq(e,":@",t[":@"]),e)):this.child.push(xq({},t.tagname,t.child))}}]),t}();var k0={};function k1(t,e){return"!"===t[e+1]&&"-"===t[e+2]&&"-"===t[e+3]}k0=function(t,e){var r={};if("O"===t[e+3]&&"C"===t[e+4]&&"T"===t[e+5]&&"Y"===t[e+6]&&"P"===t[e+7]&&"E"===t[e+8]){e+=9;for(var n,i,o,a,s,u,c,l,f,h=1,d=!1,p=!1;e"===t[e]){if(p?"-"===t[e-1]&&"-"===t[e-2]&&(p=!1,h--):h--,0===h)break}else"["===t[e]?d=!0:t[e]}else{if(d&&"!"===(n=t)[(i=e)+1]&&"E"===n[i+2]&&"N"===n[i+3]&&"T"===n[i+4]&&"I"===n[i+5]&&"T"===n[i+6]&&"Y"===n[i+7])e+=7,entityName=(f=EZ(function(t,e){for(var r="";e1&&void 0!==arguments[1]?arguments[1]:{};if(r=Object.assign({},k8,r),!t||"string"!=typeof t)return t;var n=t.trim();if(void 0!==r.skipLike&&r.skipLike.test(n))return t;if(r.hex&&k3.test(n))return Number.parseInt(n,16);var i=k5.exec(n);if(!i)return t;var o=i[1],a=i[2],s=((e=i[3])&&-1!==e.indexOf(".")&&("."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1))),e),u=i[4]||i[6];if(!r.leadingZeros&&a.length>0&&o&&"."!==n[2]||!r.leadingZeros&&a.length>0&&!o&&"."!==n[1])return t;var c=Number(n),l=""+c;return -1!==l.search(/[eE]/)||u?r.eNotation?c:t:-1!==n.indexOf(".")?"0"===l&&""===s?c:l===s?c:o&&l==="-"+s?c:t:a?s===l?c:o+s===l?c:t:n===l?c:n===o+l?c:t};var k6={};function k4(t){for(var e=Object.keys(t),r=0;r0)){a||(t=this.replaceEntitiesValue(t));var s=this.options.tagValueProcessor(e,t,r,i,o);return null==s?t:(void 0===s?"undefined":(0,e_._)(s))!==(void 0===t?"undefined":(0,e_._)(t))||s!==t?s:this.options.trimValues?Al(t,this.options.parseTagValue,this.options.numberParseOptions):t.trim()===t?Al(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function k7(t){if(this.options.removeNSPrefix){var e=t.split(":"),r="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=r+e[1])}return t}k6=function(t){return"function"==typeof t?t:Array.isArray(t)?function(e){var r=!0,n=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){var s=o.value;if("string"==typeof s&&e===s||s instanceof RegExp&&s.test(e))return!0}}catch(t){n=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}}:function(){return!1}};var At=RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function Ae(t,e,r){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){for(var n=em(t,At),i=n.length,o={},a=0;a",o,"Closing Tag is not closed."),s=t.substring(o+2,a).trim();if(this.options.removeNSPrefix){var u=s.indexOf(":");-1!==u&&(s=s.substr(u+1))}this.options.transformTagName&&(s=this.options.transformTagName(s)),r&&(n=this.saveTextToParentTag(n,r,i));var c=i.substring(i.lastIndexOf(".")+1);if(s&&-1!==this.options.unpairedTags.indexOf(s))throw Error("Unpaired tag can not be used as closing tag: "));var l=0;c&&-1!==this.options.unpairedTags.indexOf(c)?(l=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=i.lastIndexOf("."),i=i.substring(0,l),r=this.tagsNodeStack.pop(),n="",o=a}else if("?"===t[o+1]){var f=Au(t,o,!1,"?>");if(!f)throw Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,i),this.options.ignoreDeclaration&&"?xml"===f.tagName||this.options.ignorePiTags);else{var h=new kX(f.tagName);h.add(this.options.textNodeName,""),f.tagName!==f.tagExp&&f.attrExpPresent&&(h[":@"]=this.buildAttributesMap(f.tagExp,i,f.tagName)),this.addChild(r,h,i)}o=f.closeIndex+1}else if("!--"===t.substr(o+1,3)){var d=As(t,"-->",o+4,"Comment is not closed.");if(this.options.commentPropName){var p=t.substring(o+4,d-2);n=this.saveTextToParentTag(n,r,i),r.add(this.options.commentPropName,[xq({},this.options.textNodeName,p)])}o=d}else if("!D"===t.substr(o+1,2)){var v=k0(t,o);this.docTypeEntities=v.entities,o=v.i}else if("!["===t.substr(o+1,2)){var g=As(t,"]]>",o,"CDATA is not closed.")-2,m=t.substring(o+9,g);n=this.saveTextToParentTag(n,r,i);var y=this.parseTextData(m,r.tagname,i,!0,!1,!0,!0);void 0==y&&(y=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[xq({},this.options.textNodeName,m)]):r.add(this.options.textNodeName,y),o=g+2}else{var b=Au(t,o,this.options.removeNSPrefix),w=b.tagName,x=b.rawTagName,S=b.tagExp,E=b.attrExpPresent,k=b.closeIndex;this.options.transformTagName&&(w=this.options.transformTagName(w)),r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,i,!1));var A=r;if(A&&-1!==this.options.unpairedTags.indexOf(A.tagname)&&(r=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),w!==e.tagname&&(i+=i?"."+w:w),this.isItStopNode(this.options.stopNodes,i,w)){var O="";if(S.length>0&&S.lastIndexOf("/")===S.length-1)"/"===w[w.length-1]?(w=w.substr(0,w.length-1),i=i.substr(0,i.length-1),S=w):S=S.substr(0,S.length-1),o=b.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(w))o=b.closeIndex;else{var I=this.readStopNodeData(t,x,k+1);if(!I)throw Error("Unexpected end of ".concat(x));o=I.i,O=I.tagContent}var T=new kX(w);w!==S&&E&&(T[":@"]=this.buildAttributesMap(S,i,w)),O&&(O=this.parseTextData(O,w,i,!0,E,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),T.add(this.options.textNodeName,O),this.addChild(r,T,i)}else{if(S.length>0&&S.lastIndexOf("/")===S.length-1){"/"===w[w.length-1]?(w=w.substr(0,w.length-1),i=i.substr(0,i.length-1),S=w):S=S.substr(0,S.length-1),this.options.transformTagName&&(w=this.options.transformTagName(w));var N=new kX(w);w!==S&&E&&(N[":@"]=this.buildAttributesMap(S,i,w)),this.addChild(r,N,i),i=i.substr(0,i.lastIndexOf("."))}else{var _=new kX(w);this.tagsNodeStack.push(r),w!==S&&E&&(_[":@"]=this.buildAttributesMap(S,i,w)),this.addChild(r,_,i),r=_}n="",o=k}}}else n+=t[o];return e.child};function An(t,e,r){var n=this.options.updateTag(e.tagname,r,e[":@"]);!1===n||("string"==typeof n&&(e.tagname=n),t.addChild(e))}var Ai=function(t){if(this.options.processEntities){for(var e in this.docTypeEntities){var r=this.docTypeEntities[e];t=t.replace(r.regx,r.val)}for(var n in this.lastEntities){var i=this.lastEntities[n];t=t.replace(i.regex,i.val)}if(this.options.htmlEntities)for(var o in this.htmlEntities){var a=this.htmlEntities[o];t=t.replace(a.regex,a.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function Ao(t,e,r,n){return t&&(void 0===n&&(n=0===Object.keys(e.child).length),void 0!==(t=this.parseTextData(t,e.tagname,r,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,n))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function Aa(t,e,r){var n="*."+r;for(var i in t){var o=t[i];if(n===o||e===o)return!0}return!1}function As(t,e,r,n){var i=t.indexOf(e,r);if(-1!==i)return i+e.length-1;throw Error(n)}function Au(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:">",i=function(t,e){for(var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:">",i="",o=e;o",r,"".concat(e," is not closed"));if(t.substring(r+2,o).trim()===e&&0==--i)return{tagContent:t.substring(n,r),i:o};r=o}else if("?"===t[r+1])r=As(t,"?>",r+1,"StopNode is not closed.");else if("!--"===t.substr(r+1,3))r=As(t,"-->",r+3,"StopNode is not closed.");else if("!["===t.substr(r+1,2))r=As(t,"]]>",r,"StopNode is not closed.")-2;else{var a=Au(t,r,">");a&&((a&&a.tagName)===e&&"/"!==a.tagExp[a.tagExp.length-1]&&i++,r=a.closeIndex)}}}function Al(t,e,r){if(e&&"string"==typeof t){var n=t.trim();return"true"===n||"false"!==n&&k2(t,r)}return ev(t)?t:""}kZ=function t(e){xi(this,t),this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:function(t,e){return String.fromCharCode(Number.parseInt(e,10))}},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:function(t,e){return String.fromCharCode(Number.parseInt(e,16))}}},this.addExternalEntities=k4,this.parseXml=Ar,this.parseTextData=k9,this.resolveNameSpace=k7,this.buildAttributesMap=Ae,this.isItStopNode=Aa,this.replaceEntitiesValue=Ai,this.readStopNodeData=Ac,this.saveTextToParentTag=Ao,this.addChild=An,this.ignoreAttributesFn=k6(this.options.ignoreAttributes)},eb=function(t,e){return function t(e,r,n){for(var i,o={},a=0;a0&&(o[r.textNodeName]=i):void 0!==i&&(o[r.textNodeName]=i),o}(t,e)},kJ=/*#__PURE__*/function(){function t(e){xi(this,t),this.externalEntities={},this.options=ey(e)}return xa(t,[{key:"parse",value:function(t,e){if("string"==typeof t);else if(t.toString)t=t.toString();else throw Error("XML data is accepted in String or Bytes[] form.");if(e){!0===e&&(e={});var r=ep(t,e);if(!0!==r)throw Error("".concat(r.err.msg,":").concat(r.err.line,":").concat(r.err.col))}var n=new kZ(this.options);n.addExternalEntities(this.externalEntities);var i=n.parseXml(t);return this.options.preserveOrder||void 0===i?i:eb(i,this.options)}},{key:"addEntity",value:function(t,e){if(-1!==e.indexOf("&"))throw Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");if("&"===e)throw Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}}]),t}();var Af={};function Ah(t,e){var r="";if(t&&!e.ignoreAttributes){for(var n in t)if(t.hasOwnProperty(n)){var i=e.attributeValueProcessor(n,t[n]);!0===(i=Ad(i,e))&&e.suppressBooleanAttributes?r+=" ".concat(n.substr(e.attributeNamePrefix.length)):r+=" ".concat(n.substr(e.attributeNamePrefix.length),'="').concat(i,'"')}}return r}function Ad(t,e){if(t&&t.length>0&&e.processEntities)for(var r=0;r0&&(r="\n"),function t(e,r,n,i){for(var o="",a=!1,s=0;s"),a=!1;continue}if(c===r.commentPropName){o+=i+""),a=!0;continue}if("?"===c[0]){var h=Ah(u[":@"],r),d="?xml"===c?"":i,p=u[c][0][r.textNodeName];p=0!==p.length?" "+p:"",o+=d+"<".concat(c).concat(p).concat(h,"?>"),a=!0;continue}var v=i;""!==v&&(v+=r.indentBy);var g=Ah(u[":@"],r),m=i+"<".concat(c).concat(g),y=t(u[c],r,l,v);-1!==r.unpairedTags.indexOf(c)?r.suppressUnpairedNode?o+=m+">":o+=m+"/>":(!y||0===y.length)&&r.suppressEmptyNode?o+=m+"/>":y&&y.endsWith(">")?o+=m+">".concat(y).concat(i,""):(o+=m+">",y&&""!==i&&(y.includes("/>")||y.includes("")),a=!0}}return o}(t,e,"",r)};var Ap={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:RegExp("&","g"),val:"&"},{regex:RegExp(">","g"),val:">"},{regex:RegExp("<","g"),val:"<"},{regex:RegExp("'","g"),val:"'"},{regex:RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Av(t){this.options=Object.assign({},Ap,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=k6(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Ay),this.processTextOrObjNode=Ag,this.options.format?(this.indentate=Am,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function Ag(t,e,r,n){var i=this.j2x(t,r+1,n.concat(e));return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,i.attrStr,r):this.buildObjectNode(i.val,e,i.attrStr,r)}function Am(t){return this.options.indentBy.repeat(t)}function Ay(t){return!!t.startsWith(this.options.attributeNamePrefix)&&t!==this.options.textNodeName&&t.substr(this.attrPrefixLen)}Av.prototype.build=function(t){return this.options.preserveOrder?Af(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t=xq({},this.options.arrayNodeName,t)),this.j2x(t,0,[]).val)},Av.prototype.j2x=function(t,e,r){var n="",i="",o=r.join(".");for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){if(void 0===t[a])this.isAttribute(a)&&(i+="");else if(null===t[a])this.isAttribute(a)?i+="":"?"===a[0]?i+=this.indentate(e)+"<"+a+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+a+"/"+this.tagEndChar;else if(t[a]instanceof Date)i+=this.buildTextValNode(t[a],a,"",e);else if("object"!=typeof t[a]){var s=this.isAttribute(a);if(s&&!this.ignoreAttributesFn(s,o))n+=this.buildAttrPairStr(s,""+t[a]);else if(!s){if(a===this.options.textNodeName){var u=this.options.tagValueProcessor(a,""+t[a]);i+=this.replaceEntitiesValue(u)}else i+=this.buildTextValNode(t[a],a,"",e)}}else if(Array.isArray(t[a])){for(var c=t[a].length,l="",f="",h=0;h"+t+i:!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===o.length?this.indentate(n)+"")+this.newLine:this.indentate(n)+"<"+e+r+o+this.tagEndChar+t+this.indentate(n)+i},Av.prototype.closeTag=function(t){var e="";return -1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":">")+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(n)+"")+this.newLine;if("?"===e[0])return this.indentate(n)+"<"+e+r+"?"+this.tagEndChar;var i=this.options.tagValueProcessor(e,t);return""===(i=this.replaceEntitiesValue(i))?this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+r+">"+i+"0&&this.options.processEntities)for(var e=0;eMath.abs(o)?Math.abs(i)>l&&d0?"swiped-left":"swiped-right"):Math.abs(o)>l&&d0?"swiped-up":"swiped-down"),""!==p){var g={dir:p.replace(/swiped-/,""),touchType:(v[0]||{}).touchType||"direct",fingers:u,xStart:parseInt(r,10),xEnd:parseInt((v[0]||{}).clientX||-1,10),yStart:parseInt(n,10),yEnd:parseInt((v[0]||{}).clientY||-1,10)};s.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:g})),s.dispatchEvent(new CustomEvent(p,{bubbles:!0,cancelable:!0,detail:g}))}r=null,n=null,a=null}},!1);var r=null,n=null,i=null,o=null,a=null,s=null,u=0;function c(t,r,n){for(;t&&t!==e.documentElement;){var i=t.getAttribute(r);if(i)return i;t=t.parentNode}return n}}(window,document);var e_=ek("bbrsO"),Ax=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,r,n,o){var a,s,u=Object.create((r&&r.prototype instanceof g?r:g).prototype);return i(u,"_invoke",{value:(a=new I(o||[]),s=h,function(r,i){if(s===d)throw Error("Generator is already running");if(s===p){if("throw"===r)throw i;return{value:e,done:!0}}for(a.method=r,a.arg=i;;){var o=a.delegate;if(o){var u=function t(r,n){var i=n.method,o=r.iterator[i];if(o===e)return n.delegate=null,"throw"===i&&r.iterator.return&&(n.method="return",n.arg=e,t(r,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=TypeError("The iterator does not provide a '"+i+"' method")),v;var a=f(o,r.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var s=a.arg;return s?s.done?(n[r.resultName]=s.value,n.next=r.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):s:(n.method="throw",n.arg=TypeError("iterator result is not an object"),n.delegate=null,v)}(o,a);if(u){if(u===v)continue;return u}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(s===h)throw s=p,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s=d;var c=f(t,n,a);if("normal"===c.type){if(s=a.done?p:"suspendedYield",c.arg===v)continue;return{value:c.arg,done:a.done}}"throw"===c.type&&(s=p,a.method="throw",a.arg=c.arg)}})}),u}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var h="suspendedStart",d="executing",p="completed",v={};function g(){}function m(){}function y(){}var b={};c(b,a,function(){return this});var w=Object.getPrototypeOf,x=w&&w(w(T([])));x&&x!==r&&n.call(x,a)&&(b=x);var S=y.prototype=g.prototype=Object.create(b);function E(t){["next","throw","return"].forEach(function(e){c(t,e,function(t){return this._invoke(e,t)})})}function k(t,e){var r;i(this,"_invoke",{value:function(i,o){function a(){return new e(function(r,a){!function r(i,o,a,s){var u=f(t[i],t,o);if("throw"===u.type)s(u.arg);else{var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then(function(t){r("next",t,a,s)},function(t){r("throw",t,a,s)}):e.resolve(l).then(function(t){c.value=t,a(c)},function(t){return r("throw",t,a,s)})}}(i,o,r,a)})}return r=r?r.then(a,a):a()}})}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function T(t){if(null!=t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;O(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}({});try{regeneratorRuntime=Ax}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=Ax:Function("r","regeneratorRuntime = r")(Ax)}/*@__PURE__*/e(kM).extend(/*@__PURE__*/e(kD));var AS=new BroadcastChannel("sw-messages"),AE=new/*@__PURE__*/(e(kB)).XMLParser({ignoreAttributes:!1,parseAttributeValue:!0}),Ak={};Ak=ek("e6gnT").getBundleURL("3BHab")+"sw.js";try{navigator.serviceWorker.register(Ak).then(function(t){console.log("Service Worker registered successfully."),t.waiting&&(console.log("A waiting Service Worker is already in place."),t.update()),"b2g"in navigator&&(t.systemMessageManager?t.systemMessageManager.subscribe("activity").then(function(){console.log("Subscribed to general activity.")},function(t){alert("Error subscribing to activity:",t)}):alert("systemMessageManager is not available."))}).catch(function(t){alert("Service Worker registration failed:",t)})}catch(t){alert("Error during Service Worker setup:",t)}var AA={visibility:!0,deviceOnline:!0,notKaiOS:!0,os:(ta=navigator.userAgent||navigator.vendor||window.opera,/iPad|iPhone|iPod/.test(ta)&&!window.MSStream?"iOS":!!/android/i.test(ta)&&"Android"),debug:!1,local_opml:[]},AO=navigator.userAgent||"";AO&&AO.includes("KAIOS")&&(AA.notKaiOS=!1);var AI="",AT={opml_url:"https://rss.strukturart.com/rss.opml",opml_local:"",proxy_url:"https://corsproxy.io/?",cache_time:1e3},AN=[],A_={},AC=[],AP=[];/*@__PURE__*/e(w8).getItem("read_articles").then(function(t){if(null===t)return AP=[],/*@__PURE__*/e(w8).setItem("read_articles",AP).then(function(){});AP=t}).catch(function(t){console.error("Error accessing localForage:",t)});var AR=function(){AD=[],/*@__PURE__*/e(w8).setItem("last_channel_filter",AJ).then(function(){wX("load data",3e3),AG()}),setTimeout(function(){},3e3)};function AL(t){var r=[];AD.map(function(t,e){r.push(t.id)}),(AP=AP.filter(function(e){return r.includes(t)})).push(t),/*@__PURE__*/e(w8).setItem("read_articles",AP).then(function(){}).catch(function(t){console.error("Error updating localForage:",t)})}var AM=new DOMParser;AA.notKaiOS||["http://127.0.0.1/api/v1/shared/core.js","http://127.0.0.1/api/v1/shared/session.js","http://127.0.0.1/api/v1/apps/service.js","http://127.0.0.1/api/v1/audiovolumemanager/service.js","./assets/js/kaiads.v5.min.js"].forEach(function(t){var e=document.createElement("script");e.type="text/javascript",e.src=t,document.head.appendChild(e)});var AD=[];AA.debug&&(window.onerror=function(t,e,r){return alert("Error message: "+t+"\nURL: "+e+"\nLine Number: "+r),!0});var AB=function(){/*@__PURE__*/e(w8).getItem("settings").then(function(t){A_=t;var r=new URLSearchParams(window.location.href.split("?")[1]).get("code");if(r){var n=r.split("#")[0];if(r){/*@__PURE__*/e(w8).setItem("mastodon_code",n);var i=new Headers;i.append("Content-Type","application/x-www-form-urlencoded");var o=new URLSearchParams;o.append("code",n),o.append("scope","read"),o.append("grant_type","authorization_code"),o.append("redirect_uri","https://feedolin.strukturart.com"),o.append("client_id","HqIUbDiOkeIoDPoOJNLQOgVyPi1ZOkPMW29UVkhl3i8"),o.append("client_secret","R_9DvQ5V84yZQg3BEdDHjz5uGQGUN4qrPx9YgmrJ81Q"),fetch(A_.mastodon_server_url+"/oauth/token",{method:"POST",headers:i,body:o,redirect:"follow"}).then(function(t){return t.json()}).then(function(t){A_.mastodon_token=t.access_token,/*@__PURE__*/e(w8).setItem("settings",A_),/*@__PURE__*/e(w6).route.set("/start?index=0"),wX("Successfully connected",1e4)}).catch(function(t){console.error("Error:",t),wX("Connection failed")})}}})};function Aj(t){for(var e=0,r=0;r=200&&n.status<300?Az(n.responseText):console.log("HTTP error! Status: ".concat(n.status))},n.onerror=function(t){/*@__PURE__*/e(w6).route.set("/start"),wX("Error fetching the OPML file"+t,4e3)},n.send()},Az=(tu=eI(function(t){var r,n;return(0,eT.__generator)(this,function(i){switch(i.label){case 0:if(!t)return[3,7];if((n=AH(t)).error)return wX(n.error,3e3),[2,!1];if(!((r=n.downloadList).length>0))return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,A$(r)];case 2:return i.sent(),A_.last_update=new Date,/*@__PURE__*/e(w8).setItem("settings",A_),[3,4];case 3:return alert(i.sent()),[3,4];case 4:return[3,6];case 5:alert("Generated download list is empty."),i.label=6;case 6:return[3,8];case 7:console.error("No OPML content found."),i.label=8;case 8:return[2]}})}),function(t){return tu.apply(this,arguments)}),AH=function(t){var e=AM.parseFromString(t,"text/xml");if(!e||e.getElementsByTagName("parsererror").length>0)return console.error("Invalid OPML data."),{error:"Invalid OPML data",downloadList:[]};var r=e.querySelector("body");if(!r)return console.error("No 'body' element found in the OPML data."),{error:"No 'body' element found",downloadList:[]};var n=0,i=r.querySelectorAll("outline"),o=[];return i.forEach(function(t){t.querySelectorAll("outline").forEach(function(e){var r=e.getAttribute("xmlUrl");r&&o.push({error:"",title:e.getAttribute("title")||"Untitled",url:r,index:n++,channel:t.getAttribute("text")||"Unknown",type:e.getAttribute("type")||"rss",maxEpisodes:e.getAttribute("maxEpisodes")||5})})}),{error:"",downloadList:o}},A$=(tc=eI(function(t){var r,n,i,o,a;return(0,eT.__generator)(this,function(s){return r=0,n=t.length,i=!1,o=function(){AJ=localStorage.getItem("last_channel_filter"),r===n&&(/*@__PURE__*/e(w6).route.set("/start"),console.log("All feeds are loaded"),/*@__PURE__*/e(w8).setItem("articles",AD).then(function(){AD.sort(function(t,e){return new Date(e.isoDate)-new Date(t.isoDate)}),AD.forEach(function(t){-1===AC.indexOf(t.channel)&&t.channel&&AC.push(t.channel)}),AC.length>0&&!i&&(AJ=localStorage.getItem("last_channel_filter")||AC[0],i=!0),/*@__PURE__*/e(w6).route.set("/start")}).catch(function(t){console.error("Feeds cached",t)}))},a=[],t.forEach(function(t){if("mastodon"===t.type)fetch(t.url).then(function(t){return t.json()}).then(function(e){e.forEach(function(e,r){if(!(r>5)){var n={channel:t.channel,id:e.id,type:"mastodon",pubDate:e.created_at,isoDate:e.created_at,title:e.account.display_name||e.account.username,content:e.content,url:e.uri,reblog:!1};e.media_attachments.length>0&&("image"===e.media_attachments[0].type?n.content+="
"):"video"===e.media_attachments[0].type?n.enclosure={"@_type":"video",url:e.media_attachments[0].url}:"audio"===e.media_attachments[0].type&&(n.enclosure={"@_type":"audio",url:e.media_attachments[0].url})),""==e.content&&(n.content=e.reblog.content,n.reblog=!0,n.reblogUser=e.account.display_name||e.reblog.account.acct,e.reblog.media_attachments.length>0&&("image"===e.reblog.media_attachments[0].type?n.content+="
"):"video"===e.reblog.media_attachments[0].type?n.enclosure={"@_type":"video",url:e.reblog.media_attachments[0].url}:"audio"===e.reblog.media_attachments[0].type&&(n.enclosure={"@_type":"audio",url:e.reblog.media_attachments[0].url}))),AD.push(n)}})}).catch(function(e){t.error=e}).finally(function(){r++,o()});else{var n=new XMLHttpRequest({mozSystem:!0});n.timeout=5e3;var i=t.url;AA.notKaiOS?n.open("GET","https://corsproxy.io/?"+i,!0):n.open("GET",i,!0),n.ontimeout=function(){console.error("Request timed out"),r++,o()},n.onload=function(){if(200!==n.status){t.error=n.status,r++,o();return}var i=n.response;if(!i){t.error=n.status,r++,o();return}try{var s=AE.parse(i);s.feed&&s.feed.entry.forEach(function(r,n){if(n15)){var r={channel:"Mastodon",id:t.id,type:"mastodon",pubDate:t.created_at,isoDate:t.created_at,title:t.account.display_name,content:t.content,url:t.uri,reblog:!1};t.media_attachments.length>0&&("image"===t.media_attachments[0].type?r.content+="
"):"video"===t.media_attachments[0].type?r.enclosure={"@_type":"video",url:t.media_attachments[0].url}:"audio"===t.media_attachments[0].type&&(r.enclosure={"@_type":"audio",url:t.media_attachments[0].url}));try{""==t.content&&(r.content=t.reblog.content,r.reblog=!0,r.reblogUser=t.reblog.account.display_name||t.reblog.account.acct,t.reblog.media_attachments.length>0&&("image"===t.reblog.media_attachments[0].type?r.content+="
"):"video"===t.reblog.media_attachments[0].type?r.enclosure={"@_type":"video",url:t.reblog.media_attachments[0].url}:"audio"===t.reblog.media_attachments[0].type&&(r.enclosure={"@_type":"audio",url:t.reblog.media_attachments[0].url})))}catch(t){console.log(t)}AD.push(r)}}),AC.push("Mastodon"),wX("Logged in as "+AA.mastodon_logged,4e3),/*@__PURE__*/e(w8).setItem("articles",AD).then(function(){console.log("cached")})}),[2]})}),function(){return tl.apply(this,arguments)}),AG=function(){AV(A_.opml_url),A_.opml_local&&Az(A_.opml_local),A_.mastodon_token&&w5(A_.mastodon_server_url,A_.mastodon_token).then(function(t){AA.mastodon_logged=t.display_name,AW()}).catch(function(t){}),AJ=localStorage.getItem("last_channel_filter")};/*@__PURE__*/e(w8).getItem("settings").then(function(t){null==t&&(A_=AT,/*@__PURE__*/e(w8).setItem("settings",A_).then(function(t){}).catch(function(t){console.log(t)})),(A_=t).cache_time=A_.cache_time||1e3,A_.last_update?AA.last_update_duration=new Date/1e3-A_.last_update/1e3:AA.last_update_duration=3600,A_.opml_url||A_.opml_local_filename||(wX("The feed could not be loaded because no OPML was defined in the settings.",6e3),A_=AT,/*@__PURE__*/e(w8).setItem("settings",A_).then(function(t){}).catch(function(t){})),Aq().then(function(t){t&&AA.last_update_duration>A_.cache_time?(AG(),wX("Load feeds",4e3)):/*@__PURE__*/e(w8).getItem("articles").then(function(t){(AD=t).sort(function(t,e){return new Date(e.isoDate)-new Date(t.isoDate)}),AD.forEach(function(t){-1===AC.indexOf(t.channel)&&t.channel&&AC.push(t.channel)}),AC.length&&(AJ=localStorage.getItem("last_channel_filter")||AC[0]),/*@__PURE__*/e(w6).route.set("/start?index=0"),document.querySelector("body").classList.add("cache"),wX("Cached feeds loaded",4e3),A_.mastodon_token&&w5(A_.mastodon_server_url,A_.mastodon_token).then(function(t){AA.mastodon_logged=t.display_name}).catch(function(t){})}).catch(function(t){})})}).catch(function(t){wX("The default settings was loaded",3e3),AV((A_=AT).opml_url),/*@__PURE__*/e(w8).setItem("settings",A_).then(function(t){}).catch(function(t){console.log(t)})});var AY=document.getElementById("app"),AK=-1,AJ=localStorage.getItem("last_channel_filter")||"",AQ=0,AZ=function(t){return /*@__PURE__*/e(kM).duration(t,"seconds").format("mm:ss")},AX={videoElement:null,videoDuration:0,currentTime:0,isPlaying:!1,seekAmount:5,oncreate:function(t){var r=t.attrs;AA.notKaiOS&&w2("","",""),AX.videoElement=document.createElement("video"),document.getElementById("video-container").appendChild(AX.videoElement);var n=r.url;n&&(AX.videoElement.src=n,AX.videoElement.play(),AX.isPlaying=!0),AX.videoElement.onloadedmetadata=function(){AX.videoDuration=AX.videoElement.duration,/*@__PURE__*/e(w6).redraw()},AX.videoElement.ontimeupdate=function(){AX.currentTime=AX.videoElement.currentTime,/*@__PURE__*/e(w6).redraw()},document.addEventListener("keydown",AX.handleKeydown)},onremove:function(){document.removeEventListener("keydown",AX.handleKeydown)},handleKeydown:function(t){"Enter"===t.key?AX.togglePlayPause():"ArrowLeft"===t.key?AX.seek("left"):"ArrowRight"===t.key&&AX.seek("right")},togglePlayPause:function(){AX.isPlaying?AX.videoElement.pause():AX.videoElement.play(),AX.isPlaying=!AX.isPlaying},seek:function(t){var e=AX.videoElement.currentTime;"left"===t?AX.videoElement.currentTime=Math.max(0,e-AX.seekAmount):"right"===t&&(AX.videoElement.currentTime=Math.min(AX.videoDuration,e+AX.seekAmount))},view:function(t){t.attrs;var r=AX.videoDuration>0?AX.currentTime/AX.videoDuration*100:0;return /*@__PURE__*/e(w6)("div",{class:"video-player"},[/*@__PURE__*/e(w6)("div",{id:"video-container",class:"video-container"}),/*@__PURE__*/e(w6)("div",{class:"video-info"},[" ".concat(AZ(AX.currentTime)," / ").concat(AZ(AX.videoDuration))]),/*@__PURE__*/e(w6)("div",{class:"progress-bar-container"},[/*@__PURE__*/e(w6)("div",{class:"progress-bar",style:{width:"".concat(r,"%")}})])])}},A0={player:null,oncreate:function(t){var e=t.attrs;AA.notKaiOS&&w2("","",""),w1("","",""),YT?A0.player=new YT.Player("video-container",{videoId:e.videoId,events:{onReady:A0.onPlayerReady}}):alert("YouTube player not loaded"),document.addEventListener("keydown",A0.handleKeydown)},onPlayerReady:function(t){t.target.playVideo()},handleKeydown:function(t){"Enter"===t.key?A0.togglePlayPause():"ArrowLeft"===t.key?A0.seek("left"):"ArrowRight"===t.key&&A0.seek("right")},togglePlayPause:function(){1===A0.player.getPlayerState()?A0.player.pauseVideo():A0.player.playVideo()},seek:function(t){var e=A0.player.getCurrentTime();"left"===t?A0.player.seekTo(Math.max(0,e-5),!0):"right"===t&&A0.player.seekTo(e+5,!0)},view:function(){return /*@__PURE__*/e(w6)("div",{class:"youtube-player"},[/*@__PURE__*/e(w6)("div",{id:"video-container",class:"video-container"})])}},A1=document.createElement("audio");if(A1.preload="auto",A1.src="","b2g"in navigator)try{A1.mozAudioChannelType="content",navigator.b2g.AudioChannelManager&&(navigator.b2g.AudioChannelManager.volumeControlChannel="content")}catch(t){console.log(t)}var A2=[];try{/*@__PURE__*/e(w8).getItem("hasPlayedAudio").then(function(t){A2=t||[]})}catch(t){console.error("Failed to load hasPlayedAudio:",t)}var A3=(tf=eI(function(t,r,n){var i;return(0,eT.__generator)(this,function(o){return -1!==(i=A2.findIndex(function(e){return e.url===t}))?A2[i].time=r:A2.push({url:t,time:r,id:n}),A5(),/*@__PURE__*/e(w8).setItem("hasPlayedAudio",A2).then(function(){}),[2]})}),function(t,e,r){return tf.apply(this,arguments)}),A5=function(){A2=A2.filter(function(t){return AN.includes(t.id)})},A8=0,A6=0,A4=0,A9=0,A7=!1,Ot=null,Oe={audioDuration:0,currentTime:0,isPlaying:!1,seekAmount:5,oninit:function(t){var r=t.attrs;if(r.url&&A1.src!==r.url)try{A1.src=r.url,A1.play().catch(function(t){alert(t)}),Oe.isPlaying=!0,A2.map(function(t){t.url===A1.src&&!0==confirm("continue playing ?")&&(A1.currentTime=t.time)})}catch(t){A1.src=r.url}A1.onloadedmetadata=function(){Oe.audioDuration=A1.duration,/*@__PURE__*/e(w6).redraw()},A1.ontimeupdate=function(){Oe.currentTime=A1.currentTime,A3(A1.src,A1.currentTime,r.id),AA.player=!0,/*@__PURE__*/e(w6).redraw()},Oe.isPlaying=!A1.paused,document.addEventListener("keydown",Oe.handleKeydown)},oncreate:function(){var t=function(t){Ot||(Oe.seek(t),Ot=setInterval(function(){Oe.seek(t),document.querySelector(".audio-info").style.padding="20px"},1e3))},e=function(){Ot&&(clearInterval(Ot),Ot=null,document.querySelector(".audio-info").style.padding="10px")};w2("","",""),w1("","",""),A_.sleepTimer&&(w1("","",""),document.querySelector("div.button-left").addEventListener("click",function(){alert("j"),AA.sleepTimer?Oc():Ou(6e4*A_.sleepTimer)})),AA.notKaiOS&&w2("","",""),document.querySelector("div.button-center").addEventListener("click",function(t){Oe.togglePlayPause()}),AA.notKaiOS&&(document.addEventListener("touchstart",function(t){var e=t.touches[0];A8=e.clientX,A6=e.clientY}),document.addEventListener("touchmove",function(e){var r=e.touches[0];A4=r.clientX,A9=r.clientY;var n=A4-A8,i=A9-A6;Math.abs(n)>Math.abs(i)?n>30?(t("right"),A7=!0):n<-30&&(t("left"),A7=!0):i>30?console.log("Swiping down (not used in this context)"):i<-30&&console.log("Swiping up (not used in this context)")}),document.addEventListener("touchend",function(){A7&&(A7=!1,e())}))},onremove:function(){document.removeEventListener("keydown",Oe.handleKeydown)},handleKeydown:function(t){"Enter"===t.key?Oe.togglePlayPause():"ArrowLeft"===t.key?Oe.seek("left"):"ArrowRight"===t.key&&Oe.seek("right")},togglePlayPause:function(){Oe.isPlaying?A1.pause():A1.play().catch(function(){}),Oe.isPlaying=!Oe.isPlaying},seek:function(t){var e=A1.currentTime;"left"===t?A1.currentTime=Math.max(0,e-Oe.seekAmount):"right"===t&&(A1.currentTime=Math.min(Oe.audioDuration,e+Oe.seekAmount))},view:function(t){t.attrs;var r=Oe.audioDuration>0?Oe.currentTime/Oe.audioDuration*100:0;return /*@__PURE__*/e(w6)("div",{class:"audio-player"},[/*@__PURE__*/e(w6)("div",{id:"audio-container",class:"audio-container"}),/*@__PURE__*/e(w6)("div",{class:"cover-container",style:{"background-color":"rgb(121, 71, 255)","background-image":"url(".concat(AI.cover,")")}}),/*@__PURE__*/e(w6)("div",{class:"audio-info",style:{background:"linear-gradient(to right, #3498db ".concat(r,"%, white ").concat(r,"%)")}},["".concat(AZ(Oe.currentTime)," / ").concat(AZ(Oe.audioDuration))]),/*@__PURE__*/e(w6)("div",{class:"progress-bar-container"},[/*@__PURE__*/e(w6)("div",{class:"progress-bar",style:{width:"".concat(r,"%")}})])])}};function Or(){var t=document.activeElement;if(t){for(var e=t.getBoundingClientRect(),r=e.top+e.height/2,n=t.parentNode;n;){if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth){var i=n.getBoundingClientRect();r=e.top-i.top+e.height/2;break}n=n.parentNode}n?n.scrollBy({left:0,top:r-n.clientHeight/2,behavior:"smooth"}):document.body.scrollBy({left:0,top:r-window.innerHeight/2,behavior:"smooth"})}}/*@__PURE__*/e(w6).route(AY,"/intro",{"/article":{view:function(){var t=AD.find(function(t){return /*@__PURE__*/e(w6).route.param("index")==t.id&&(AI=t,!0)});return /*@__PURE__*/e(w6)("div",{id:"article",class:"page",oncreate:function(){AA.notKaiOS&&w2("","",""),w1("","","")}},t?/*@__PURE__*/e(w6)("article",{class:"item",tabindex:0,oncreate:function(e){e.dom.focus(),("audio"===t.type||"video"===t.type||"youtube"===t.type)&&w1("","","")}},[/*@__PURE__*/e(w6)("time",{id:"top",oncreate:function(){setTimeout(function(){document.querySelector("#top").scrollIntoView()},1e3)}},/*@__PURE__*/e(kM)(t.isoDate).format("DD MMM YYYY")),/*@__PURE__*/e(w6)("h2",{class:"article-title",oncreate:function(e){var r=e.dom;t.reblog&&r.classList.add("reblog")}},t.title),/*@__PURE__*/e(w6)("div",{class:"text"},[/*@__PURE__*/e(w6).trust(AF(t.content))]),t.reblog?/*@__PURE__*/e(w6)("div",{class:"text"},"reblogged from:"+t.reblogUser):""]):/*@__PURE__*/e(w6)("div","Article not found"))}},"/settingsView":{view:function(){return /*@__PURE__*/e(w6)("div",{class:"flex justify-content-center page",id:"settings-page",oncreate:function(){AA.notKaiOS||(AA.local_opml=[],wG("opml",function(t){AA.local_opml.push(t)})),w1("","",""),AA.notKaiOS&&w1("","",""),document.querySelectorAll(".item").forEach(function(t,e){t.setAttribute("tabindex",e)}),AA.notKaiOS&&w2("","",""),AA.notKaiOS&&w1("","","")}},[/*@__PURE__*/e(w6)("div",{class:"item input-parent flex",oncreate:function(){On()}},[/*@__PURE__*/e(w6)("label",{for:"url-opml"},"OPML"),/*@__PURE__*/e(w6)("input",{id:"url-opml",placeholder:"",value:A_.opml_url||"",type:"url"})]),/*@__PURE__*/e(w6)("button",{class:"item",onclick:function(){A_.opml_local_filename?(A_.opml_local="",A_.opml_local_filename="",/*@__PURE__*/e(w8).setItem("settings",A_).then(function(){wX("OPML file removed",4e3),/*@__PURE__*/e(w6).redraw()})):AA.notKaiOS?w3(function(t){var r=new FileReader;r.onload=function(){AH(r.result).error?wX("OPML file not valid",4e3):(A_.opml_local=r.result,A_.opml_local_filename=t.filename,/*@__PURE__*/e(w8).setItem("settings",A_).then(function(){wX("OPML file added",4e3)}))},r.onerror=function(){wX("OPML file not valid",4e3)},r.readAsText(t.blob)}):AA.local_opml.length>0?/*@__PURE__*/e(w6).route.set("/localOPML"):wX("no OPML file found",3e3)}},A_.opml_local_filename?"Remove OPML file":"Upload OPML file"),/*@__PURE__*/e(w6)("div",A_.opml_local_filename),/*@__PURE__*/e(w6)("div",{class:"seperation"}),AA.notKaiOS?/*@__PURE__*/e(w6)("div",{class:"item input-parent flex "},[/*@__PURE__*/e(w6)("label",{for:"url-proxy"},"PROXY"),/*@__PURE__*/e(w6)("input",{id:"url-proxy",placeholder:"",value:A_.proxy_url||"",type:"url"})]):null,/*@__PURE__*/e(w6)("div",{class:"seperation"}),/*@__PURE__*/e(w6)("h2",{class:"flex justify-content-spacearound"},"Mastodon Account"),AA.mastodon_logged?/*@__PURE__*/e(w6)("div",{id:"account_info",class:"item"},"You have successfully logged in as ".concat(AA.mastodon_logged," and the data is being loaded from server ").concat(A_.mastodon_server_url,".")):null,AA.mastodon_logged?/*@__PURE__*/e(w6)("button",{class:"item",onclick:function(){A_.mastodon_server_url="",A_.mastodon_token="",/*@__PURE__*/e(w8).setItem("settings",A_),AA.mastodon_logged="",/*@__PURE__*/e(w6).route.set("/settingsView")}},"Disconnect"):null,AA.mastodon_logged?null:/*@__PURE__*/e(w6)("div",{class:"item input-parent flex justify-content-spacearound"},[/*@__PURE__*/e(w6)("label",{for:"mastodon-server-url"},"URL"),/*@__PURE__*/e(w6)("input",{id:"mastodon-server-url",placeholder:"Server URL",value:A_.mastodon_server_url})]),AA.mastodon_logged?null:/*@__PURE__*/e(w6)("button",{class:"item",onclick:function(){/*@__PURE__*/e(w8).setItem("settings",A_),A_.mastodon_server_url=document.getElementById("mastodon-server-url").value;var t=A_.mastodon_server_url+"/oauth/authorize?client_id=HqIUbDiOkeIoDPoOJNLQOgVyPi1ZOkPMW29UVkhl3i8&scope=read&redirect_uri=https://feedolin.strukturart.com&response_type=code";window.open(t)}},"Connect"),/*@__PURE__*/e(w6)("div",{class:"seperation"}),/*@__PURE__*/e(w6)("div",{class:"item input-parent"},[/*@__PURE__*/e(w6)("label",{for:"sleep-timer"},"Sleep timer"),/*@__PURE__*/e(w6)("select",{name:"sleep-timer",class:"select-box",id:"sleep-timer",value:A_.sleepTimer,onchange:function(t){A_.sleepTimer=t.target.value,/*@__PURE__*/e(w6).redraw()}},[/*@__PURE__*/e(w6)("option",{value:"10"},"10"),/*@__PURE__*/e(w6)("option",{value:"20"},"20"),/*@__PURE__*/e(w6)("option",{value:"30"},"30"),/*@__PURE__*/e(w6)("option",{value:"30"},"40"),/*@__PURE__*/e(w6)("option",{value:"30"},"50"),/*@__PURE__*/e(w6)("option",{value:"30"},"60")])]),/*@__PURE__*/e(w6)("button",{class:"item",id:"button-save-settings",onclick:function(){""==document.getElementById("url-opml").value||(t=document.getElementById("url-opml").value,/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(t))||wX("URL not valid",4e3),A_.opml_url=document.getElementById("url-opml").value,AA.notKaiOS&&(A_.proxy_url=document.getElementById("url-proxy").value);var t,r=document.getElementById("sleep-timer").value;r&&!isNaN(r)&&Number(r)>0?A_.sleepTimer=parseInt(r,10):A_.sleepTimer="",AA.mastodon_logged||(A_.mastodon_server_url=document.getElementById("mastodon-server-url").value),/*@__PURE__*/e(w8).setItem("settings",A_).then(function(){wX("settings saved",2e3)}).catch(function(t){alert(t)})}},"save settings")])}},"/intro":{view:function(){return /*@__PURE__*/e(w6)("div",{class:"width-100 height-100",id:"intro",oninit:function(){AA.notKaiOS&&AB()},onremove:function(){localStorage.setItem("version",AA.version),document.querySelector(".loading-spinner").style.display="none"}},[/*@__PURE__*/e(w6)("img",{src:"./assets/icons/intro.svg",oncreate:function(){document.querySelector(".loading-spinner").style.display="block",wJ(function(t){try{AA.version=t.manifest.version,document.querySelector("#version").textContent=t.manifest.version}catch(t){}("b2g"in navigator||AA.notKaiOS)&&fetch("/manifest.webmanifest").then(function(t){return t.json()}).then(function(t){AA.version=t.b2g_features.version})})}}),/*@__PURE__*/e(w6)("div",{class:"flex width-100 justify-content-center ",id:"version-box"},[/*@__PURE__*/e(w6)("kbd",{id:"version"},localStorage.getItem("version")||0)])])}},"/start":{view:function(){var t=AD.filter(function(t){return""===AJ||AJ===t.channel});return AD.forEach(function(t){AN.push(t.id)}),/*@__PURE__*/e(w6)("div",{id:"start",oncreate:function(){AQ=/*@__PURE__*/e(w6).route.param("index")||0,w1("","",""),AA.notKaiOS&&w1("","",""),AA.notKaiOS&&w2("","",""),AA.notKaiOS&&AA.player&&w2("","","")}},/*@__PURE__*/e(w6)("span",{class:"channel",oncreate:function(){}},AJ),t.map(function(r,n){var i,o=AP.includes(r.id)?"read":"";return /*@__PURE__*/e(w6)("article",{class:"item ".concat(o),"data-id":r.id,"data-type":r.type,oncreate:function(e){0==AQ&&0==n?setTimeout(function(){e.dom.focus()},1200):r.id==AQ&&setTimeout(function(){e.dom.focus(),Or()},1200),n==t.length-1&&setTimeout(function(){document.querySelectorAll(".item").forEach(function(t,e){t.setAttribute("tabindex",e)})},1e3)},onclick:function(){/*@__PURE__*/e(w6).route.set("/article?index="+r.id),AL(r.id)},onkeydown:function(t){"Enter"===t.key&&(/*@__PURE__*/e(w6).route.set("/article?index="+r.id),AL(r.id))}},[/*@__PURE__*/e(w6)("span",{class:"type-indicator"},r.type),/*@__PURE__*/e(w6)("time",/*@__PURE__*/e(kM)(r.isoDate).format("DD MMM YYYY")),/*@__PURE__*/e(w6)("h2",{oncreate:function(t){var e=t.dom;!0===r.reblog&&e.classList.add("reblog")}},AF(r.feed_title)),/*@__PURE__*/e(w6)("h3",AF(r.title)),"mastodon"==r.type?/*@__PURE__*/e(w6)("h3",(i=r.content.substring(0,30),xn(i,{allowedTags:[],allowedAttributes:{}})+"...")):null])}))}},"/options":{view:function(){return /*@__PURE__*/e(w6)("div",{id:"optionsView",class:"flex",oncreate:function(){w2("","",""),AA.notKaiOS&&w2("","",""),w1("","",""),AA.notKaiOS&&w1("","","")}},[/*@__PURE__*/e(w6)("button",{tabindex:0,class:"item",oncreate:function(t){t.dom.focus(),Or()},onclick:function(){/*@__PURE__*/e(w6).route.set("/about")}},"About"),/*@__PURE__*/e(w6)("button",{tabindex:1,class:"item",onclick:function(){/*@__PURE__*/e(w6).route.set("/settingsView")}},"Settings"),/*@__PURE__*/e(w6)("button",{tabindex:2,class:"item",onclick:function(){/*@__PURE__*/e(w6).route.set("/privacy_policy")}},"Privacy Policy"),/*@__PURE__*/e(w6)("div",{id:"KaiOSads-Wrapper",class:"",oncreate:function(){!1==AA.notKaiOS&&wW()}})])}},"/about":{view:function(){return /*@__PURE__*/e(w6)("div",{class:"page scrollable",oncreate:function(){w1("","","")}},/*@__PURE__*/e(w6)("p","Feedolin is an RSS/Atom reader and podcast player, available for both KaiOS and non-KaiOS users."),/*@__PURE__*/e(w6)("p","It supports connecting a Mastodon account to display articles alongside your RSS/Atom feeds."),/*@__PURE__*/e(w6)("p","The app allows you to listen to audio and watch videos directly if the feed provides the necessary URLs."),/*@__PURE__*/e(w6)("p","The list of subscribed websites and podcasts is managed either locally or via an OPML file from an external source, such as a public link in the cloud."),/*@__PURE__*/e(w6)("p","For non-KaiOS users, local files must be uploaded to the app."),/*@__PURE__*/e(w6)("h4",{style:"margin-top:20px; margin-bottom:10px;"},"Navigation:"),/*@__PURE__*/e(w6)("ul",[/*@__PURE__*/e(w6)("li",/*@__PURE__*/e(w6).trust("Use the up and down arrow keys to navigate between articles.

")),/*@__PURE__*/e(w6)("li",/*@__PURE__*/e(w6).trust("Use the left and right arrow keys to switch between categories.

")),/*@__PURE__*/e(w6)("li",/*@__PURE__*/e(w6).trust("Press Enter to view the content of an article.

")),/*@__PURE__*/e(w6)("li",{oncreate:function(t){AA.notKaiOS||(t.dom.style.display="none")}},/*@__PURE__*/e(w6).trust("Use Alt to access various options.")),/*@__PURE__*/e(w6)("li",{oncreate:function(t){AA.notKaiOS&&(t.dom.style.display="none")}},/*@__PURE__*/e(w6).trust("Use # Volume")),/*@__PURE__*/e(w6)("li",{oncreate:function(t){AA.notKaiOS&&(t.dom.style.display="none")}},/*@__PURE__*/e(w6).trust("Use * Audioplayer

")),/*@__PURE__*/e(w6)("li","Version: "+AA.version)]))}},"/privacy_policy":{view:function(){return /*@__PURE__*/e(w6)("div",{id:"privacy_policy",class:"page scrollable",oncreate:function(){w1("","","")}},[/*@__PURE__*/e(w6)("h1","Privacy Policy for Feedolin"),/*@__PURE__*/e(w6)("p","Feedolin is committed to protecting your privacy. This policy explains how data is handled within the app."),/*@__PURE__*/e(w6)("h2","Data Storage and Collection"),/*@__PURE__*/e(w6)("p",["All data related to your RSS/Atom feeds and Mastodon account is stored ",/*@__PURE__*/e(w6)("strong","locally")," in your device’s browser. Feedolin does ",/*@__PURE__*/e(w6)("strong","not")," collect or store any data on external servers. The following information is stored locally:"]),/*@__PURE__*/e(w6)("ul",[/*@__PURE__*/e(w6)("li","Your subscribed RSS/Atom feeds and podcasts."),/*@__PURE__*/e(w6)("li","OPML files you upload or manage."),/*@__PURE__*/e(w6)("li","Your Mastodon account information and related data.")]),/*@__PURE__*/e(w6)("p","No server-side data storage or collection is performed."),/*@__PURE__*/e(w6)("h2","KaiOS Users"),/*@__PURE__*/e(w6)("p",["If you are using Feedolin on a KaiOS device, the app uses ",/*@__PURE__*/e(w6)("strong","KaiOS Ads"),", which may collect data related to your usage. The data collected by KaiOS Ads is subject to the ",/*@__PURE__*/e(w6)("a",{href:"https://www.kaiostech.com/privacy-policy/",target:"_blank",rel:"noopener noreferrer"},"KaiOS privacy policy"),"."]),/*@__PURE__*/e(w6)("p",["For users on all other platforms, ",/*@__PURE__*/e(w6)("strong","no ads")," are used, and no external data collection occurs."]),/*@__PURE__*/e(w6)("h2","External Sources Responsibility"),/*@__PURE__*/e(w6)("p",["Feedolin enables you to add feeds and connect to external sources such as RSS/Atom feeds, podcasts, and Mastodon accounts. You are ",/*@__PURE__*/e(w6)("strong","solely responsible")," for the sources you choose to trust and subscribe to. Feedolin does not verify or control the content or data provided by these external sources."]),/*@__PURE__*/e(w6)("h2","Third-Party Services"),/*@__PURE__*/e(w6)("p","Feedolin integrates with third-party services such as Mastodon. These services have their own privacy policies, and you should review them to understand how your data is handled."),/*@__PURE__*/e(w6)("h2","Policy Updates"),/*@__PURE__*/e(w6)("p","This Privacy Policy may be updated periodically. Any changes will be communicated through updates to the app."),/*@__PURE__*/e(w6)("p","By using Feedolin, you acknowledge and agree to this Privacy Policy.")])}},"/localOPML":{view:function(){return /*@__PURE__*/e(w6)("div",{class:"flex",id:"index",oncreate:function(){AA.notKaiOS&&w2("","",""),w1("","","")}},AA.local_opml.map(function(t,r){var n=t.split("/");return n=n[n.length-1],/*@__PURE__*/e(w6)("button",{class:"item",tabindex:r,oncreate:function(t){0==r&&t.dom.focus()},onclick:function(){if("b2g"in navigator)try{var r=navigator.b2g.getDeviceStorage("sdcard").get(t);r.onsuccess=function(){var t=new FileReader;t.onload=function(){AH(t.result).error?wX("OPML file not valid",4e3):(A_.opml_local=t.result,A_.opml_local_filename=n,/*@__PURE__*/e(w8).setItem("settings",A_).then(function(){wX("OPML file added",4e3),/*@__PURE__*/e(w6).route.set("/settingsView")}))},t.onerror=function(){wX("OPML file not valid",4e3)},t.readAsText(this.result)},r.onerror=function(t){}}catch(t){}else{var i=navigator.getDeviceStorage("sdcard").get(t);i.onsuccess=function(){var t=new FileReader;t.onload=function(){AH(t.result).error?wX("OPML file not valid",4e3):(A_.opml_local=t.result,A_.opml_local_filename=n,/*@__PURE__*/e(w8).setItem("settings",A_).then(function(){wX("OPML file added",4e3),/*@__PURE__*/e(w6).route.set("/settingsView")}))},t.onerror=function(){wX("OPML file not valid",4e3)},t.readAsText(this.result)},i.onerror=function(t){}}}},n)}))}},"/AudioPlayerView":Oe,"/VideoPlayerView":AX,"/YouTubePlayerView":A0});var On=function(){document.body.scrollTo({left:0,top:0,behavior:"smooth"}),document.documentElement.scrollTo({left:0,top:0,behavior:"smooth"})};document.addEventListener("DOMContentLoaded",function(t){var r,n,i=function(t){if("SELECT"==document.activeElement.nodeName||"date"==document.activeElement.type||"time"==document.activeElement.type||"volume"==AA.window_status)return!1;if(document.activeElement.classList.contains("scroll")){var e=document.querySelector(".scroll");1==t?e.scrollBy({left:0,top:10}):e.scrollBy({left:0,top:-10})}var r=document.activeElement.tabIndex+t,n=0;if(n=document.getElementById("app").querySelectorAll(".item"),document.activeElement.parentNode.classList.contains("input-parent"))return document.activeElement.parentNode.focus(),!0;r<=n.length&&(0,n[r]).focus(),r>=n.length&&(0,n[0]).focus(),Or()};function o(t){c({key:t})}AA.notKaiOS&&(r=0,document.addEventListener("touchstart",function(t){r=t.touches[0].pageX,document.querySelector("body").style.opacity=1},!1),document.addEventListener("touchmove",function(t){var n=1-Math.min(Math.abs(t.touches[0].pageX-r)/300,1);/*@__PURE__*/e(w6).route.get().startsWith("/article")&&(document.querySelector("body").style.opacity=n)},!1),document.addEventListener("touchend",function(t){document.querySelector("body").style.opacity=1},!1)),document.querySelector("div.button-left").addEventListener("click",function(t){o("SoftLeft")}),document.querySelector("div.button-right").addEventListener("click",function(t){o("SoftRight")}),document.querySelector("div.button-center").addEventListener("click",function(t){o("Enter")}),document.querySelector("#top-bar div div.button-left").addEventListener("click",function(t){o("Backspace")}),document.querySelector("#top-bar div div.button-right").addEventListener("click",function(t){o("*")});var a=!1;document.addEventListener("keydown",function(t){a||("Backspace"==t.key&&"INPUT"!=document.activeElement.tagName&&t.preventDefault(),"EndCall"===t.key&&(t.preventDefault(),window.close()),t.repeat||(u=!1,n=setTimeout(function(){u=!0,"Backspace"===t.key&&window.close()},2e3)),t.repeat&&("Backspace"==t.key&&t.preventDefault(),"Backspace"==t.key&&(u=!1),t.key),a=!0,setTimeout(function(){a=!1},300))});var s=!1;document.addEventListener("keyup",function(t){s||(function(t){if("Backspace"==t.key&&t.preventDefault(),!1===AA.visibility)return 0;clearTimeout(n),u||c(t)}(t),s=!0,setTimeout(function(){s=!1},300))}),AA.notKaiOS&&document.addEventListener("swiped",function(t){var r=/*@__PURE__*/e(w6).route.get(),n=t.detail.dir;if("right"==n&&r.startsWith("/start")){--AK<1&&(AK=AC.length-1),AJ=AC[AK],/*@__PURE__*/e(w6).redraw();var i=/*@__PURE__*/e(w6).route.param();i.index=0,/*@__PURE__*/e(w6).route.set("/start",i)}if("left"==n&&r.startsWith("/start")){++AK>AC.length-1&&(AK=0),AJ=AC[AK],/*@__PURE__*/e(w6).redraw();var o=/*@__PURE__*/e(w6).route.param();o.index=0,/*@__PURE__*/e(w6).route.set("/start",o)}});var u=!1;function c(t){var r=/*@__PURE__*/e(w6).route.get();switch(t.key){case"ArrowRight":if(r.startsWith("/start")){++AK>AC.length-1&&(AK=0),AJ=AC[AK],/*@__PURE__*/e(w6).redraw();var n=/*@__PURE__*/e(w6).route.param();n.index=0,/*@__PURE__*/e(w6).route.set("/start",n),setTimeout(function(){document.querySelectorAll("article.item")[0].focus(),Or()},500)}break;case"ArrowLeft":if(r.startsWith("/start")){--AK<0&&(AK=AC.length-1),AJ=AC[AK],/*@__PURE__*/e(w6).redraw();var o=/*@__PURE__*/e(w6).route.param();o.index=0,/*@__PURE__*/e(w6).route.set("/start",o),setTimeout(function(){document.querySelectorAll("article.item")[0].focus(),Or()},500)}break;case"ArrowUp":i(-1),"volume"==AA.window_status&&(navigator.volumeManager.requestVolumeUp(),AA.window_status="volume",setTimeout(function(){AA.window_status=""},2e3));break;case"ArrowDown":i(1),"volume"==AA.window_status&&(navigator.volumeManager.requestVolumeDown(),AA.window_status="volume",setTimeout(function(){AA.window_status=""},2e3));break;case"SoftRight":case"Alt":r.startsWith("/start")&&/*@__PURE__*/e(w6).route.set("/options"),r.startsWith("/article")&&("audio"==AI.type&&/*@__PURE__*/e(w6).route.set("/AudioPlayerView?url=".concat(encodeURIComponent(AI.enclosure["@_url"]),"&id=").concat(AI.id)),"video"==AI.type&&/*@__PURE__*/e(w6).route.set("/VideoPlayerView?url=".concat(encodeURIComponent(AI.enclosure["@_url"]))),"youtube"==AI.type&&/*@__PURE__*/e(w6).route.set("/YouTubePlayerView?videoId=".concat(encodeURIComponent(AI.youtubeid))));break;case"SoftLeft":case"Control":r.startsWith("/start")&&AR(),r.startsWith("/article")&&window.open(AI.url),r.startsWith("/AudioPlayerView")&&(AA.sleepTimer?Oc():Ou(6e4*A_.sleepTimer));break;case"Enter":document.activeElement.classList.contains("input-parent")&&document.activeElement.children[0].focus();break;case"*":/*@__PURE__*/e(w6).route.set("/AudioPlayerView");break;case"#":wY();break;case"Backspace":if(r.startsWith("/start")&&window.close(),r.startsWith("/article")){var a=/*@__PURE__*/e(w6).route.param("index");/*@__PURE__*/e(w6).route.set("/start?index="+a)}if(r.startsWith("/YouTubePlayerView")){var s=/*@__PURE__*/e(w6).route.param("index");/*@__PURE__*/e(w6).route.set("/start?index="+s)}if(r.startsWith("/localOPML")&&history.back(),r.startsWith("/index")&&/*@__PURE__*/e(w6).route.set("/start?index=0"),r.startsWith("/about")&&/*@__PURE__*/e(w6).route.set("/options"),r.startsWith("/privacy_policy")&&/*@__PURE__*/e(w6).route.set("/options"),r.startsWith("/options")&&/*@__PURE__*/e(w6).route.set("/start?index=0"),r.startsWith("/settingsView")){if("INPUT"==document.activeElement.tagName)return!1;/*@__PURE__*/e(w6).route.set("/options")}r.startsWith("/Video")&&history.back(),r.startsWith("/Audio")&&history.back()}}document.addEventListener("visibilitychange",function(){"visible"===document.visibilityState&&A_.last_update?(AA.visibility=!0,new Date/1e3-A_.last_update/1e3>A_.cache_time&&(AD=[],wX("load new content",4e3),AG())):AA.visibility=!1})}),window.addEventListener("online",function(){AA.deviceOnline=!0}),window.addEventListener("offline",function(){AA.deviceOnline=!1}),window.addEventListener("beforeunload",function(t){var r=window.performance.getEntriesByType("navigation"),n=window.performance.navigation?window.performance.navigation.type:null;(r.length&&"reload"===r[0].type||1===n)&&(t.preventDefault(),AD=[],wX("load new content",4e3),AG(),/*@__PURE__*/e(w6).route.set("/intro"),t.returnValue="Are you sure you want to leave the page?")});try{AS.addEventListener("message",function(t){var r=t.data.oauth_success;if(r){var n=new Headers;n.append("Content-Type","application/x-www-form-urlencoded");var i=new URLSearchParams;i.append("code",r),i.append("scope","read"),i.append("grant_type","authorization_code"),i.append("redirect_uri","https://feedolin.strukturart.com"),i.append("client_id","HqIUbDiOkeIoDPoOJNLQOgVyPi1ZOkPMW29UVkhl3i8"),i.append("client_secret","R_9DvQ5V84yZQg3BEdDHjz5uGQGUN4qrPx9YgmrJ81Q"),fetch(A_.mastodon_server_url+"/oauth/token",{method:"POST",headers:n,body:i,redirect:"follow"}).then(function(t){return t.json()}).then(function(t){A_.mastodon_token=t.access_token,/*@__PURE__*/e(w8).setItem("settings",A_),/*@__PURE__*/e(w6).route.set("/start?index=0"),wX("Successfully connected",1e4)}).catch(function(t){console.error("Error:",t),wX("Connection failed")})}})}catch(t){}var Oi={},Oo={};Oo=function(t,e,r){if(e===self.location.origin)return t;var n=r?"import "+JSON.stringify(t)+";":"importScripts("+JSON.stringify(t)+");";return URL.createObjectURL(new Blob([n],{type:"application/javascript"}))};var Oa=ek("e6gnT"),Os=Oa.getBundleURL("3BHab")+"worker.8ac5962b.js";Oi=Oo(Os,Oa.getOrigin(Os),!0);try{ew=new Worker(Oi)}catch(t){console.log(t)}function Ou(t){ew.postMessage({action:"start",duration:t}),wX("sleep mode on",3e3),AA.sleepTimer=!0}function Oc(){ew.postMessage({action:"stop"}),wX("sleep mode off",3e3)}ew.onmessage=function(t){"stop"===t.data.action&&(A1.pause(),AA.sleepTimer=!1)}; \ No newline at end of file + */function So(t){return"[object Object]"===Object.prototype.toString.call(t)}Si=function(t){if("string"!=typeof t)throw TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};var Sa=function(t){var e,r;return!1!==So(t)&&(void 0===(e=t.constructor)||!1!==So(r=e.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))},Ss={},Su=function(t){var e;return!!t&&"object"==typeof t&&"[object RegExp]"!==(e=Object.prototype.toString.call(t))&&"[object Date]"!==e&&t.$$typeof!==Sc},Sc="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function Sl(t,e){return!1!==e.clone&&e.isMergeableObject(t)?Sp(Array.isArray(t)?[]:{},t,e):t}function Sf(t,e,r){return t.concat(e).map(function(t){return Sl(t,r)})}function Sh(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function Sd(t,e){try{return e in t}catch(t){return!1}}function Sp(t,e,r){(r=r||{}).arrayMerge=r.arrayMerge||Sf,r.isMergeableObject=r.isMergeableObject||Su,r.cloneUnlessOtherwiseSpecified=Sl;var n,i,o=Array.isArray(e);return o!==Array.isArray(t)?Sl(e,r):o?r.arrayMerge(t,e,r):(i={},(n=r).isMergeableObject(t)&&Sh(t).forEach(function(e){i[e]=Sl(t[e],n)}),Sh(e).forEach(function(r){Sd(t,r)&&!(Object.hasOwnProperty.call(t,r)&&Object.propertyIsEnumerable.call(t,r))||(Sd(t,r)&&n.isMergeableObject(e[r])?i[r]=(function(t,e){if(!e.customMerge)return Sp;var r=e.customMerge(t);return"function"==typeof r?r:Sp})(r,n)(t[r],e[r],n):i[r]=Sl(e[r],n))}),i)}Sp.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,r){return Sp(t,r,e)},{})},Ss=Sp;var Sv={};ti=Sv,to=function(){return function(t){function e(t){return" "===t||" "===t||"\n"===t||"\f"===t||"\r"===t}function r(e){var r,n=e.exec(t.substring(v));if(n)return r=n[0],v+=r.length,r}for(var n,i,o,a,s,u=t.length,c=/^[ \t\n\r\u000c]+/,l=/^[, \t\n\r\u000c]+/,f=/^[^ \t\n\r\u000c]+/,h=/[,]+$/,d=/^\d+$/,p=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,v=0,g=[];;){if(r(l),v>=u)return g;n=r(f),i=[],","===n.slice(-1)?(n=n.replace(h,""),m()):function(){for(r(c),o="",a="in descriptor";;){if(s=t.charAt(v),"in descriptor"===a){if(e(s))o&&(i.push(o),o="",a="after descriptor");else if(","===s){v+=1,o&&i.push(o),m();return}else if("("===s)o+=s,a="in parens";else if(""===s){o&&i.push(o),m();return}else o+=s}else if("in parens"===a){if(")"===s)o+=s,a="in descriptor";else if(""===s){i.push(o),m();return}else o+=s}else if("after descriptor"===a){if(e(s));else if(""===s){m();return}else a="in descriptor",v-=1}v+=1}}()}function m(){var e,r,o,a,s,u,c,l,f,h=!1,v={};for(a=0;at.length)&&(e=t.length);for(var r=0,n=Array(e);r",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}},{key:"showSourceCode",value:function(t){var e=this;if(!this.source)return"";var r=this.source;null==t&&(t=SO.isColorSupported);var n=function(t){return t},i=function(t){return t},o=function(t){return t};if(t){var a=SO.createColors(!0),s=a.bold,u=a.gray,c=a.red;i=function(t){return s(c(t))},n=function(t){return u(t)},SN&&(o=function(t){return SN(t)})}var l=r.split(/\r?\n/),f=Math.max(this.line-3,0),h=Math.min(this.line+2,l.length),d=String(h).length;return l.slice(f,h).map(function(t,r){var a=f+1+r,s=" "+(" "+a).slice(-d)+" | ";if(a===e.line){if(t.length>160){var u=Math.max(0,e.column-20),c=Math.max(e.column+20,e.endColumn+20),l=t.slice(u,c),h=n(s.replace(/\d/g," "))+t.slice(0,Math.min(e.column-1,19)).replace(/[^\t]/g," ");return i(">")+n(s)+o(l)+"\n "+h+i("^")}var p=n(s.replace(/\d/g," "))+t.slice(0,e.column-1).replace(/[^\t]/g," ");return i(">")+n(s)+o(t)+"\n "+p+i("^")}return" "+n(s)+o(t)}).join("\n")}},{key:"toString",value:function(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}}]),r}(xH(Error));SA=S_,S_.default=S_;var SC={},SP={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1},SR=/*#__PURE__*/function(){function t(e){xi(this,t),this.builder=e}return xa(t,[{key:"atrule",value:function(t,e){var r="@"+t.name,n=t.params?this.rawValue(t,"params"):"";if(void 0!==t.raws.afterName?r+=t.raws.afterName:n&&(r+=" "),t.nodes)this.block(t,r+n);else{var i=(t.raws.between||"")+(e?";":"");this.builder(r+n+i,t)}}},{key:"beforeAfter",value:function(t,e){r="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose");for(var r,n=t.parent,i=0;n&&"root"!==n.type;)i+=1,n=n.parent;if(r.includes("\n")){var o=this.raw(t,null,"indent");if(o.length)for(var a=0;a0&&"comment"===t.nodes[e].type;)e-=1;for(var r=this.raw(t,"semicolon"),n=0;n0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}},{key:"rawBeforeComment",value:function(t,e){var r;return t.walkComments(function(t){if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}},{key:"rawBeforeDecl",value:function(t,e){var r;return t.walkDecls(function(t){if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}},{key:"rawBeforeOpen",value:function(t){var e;return t.walk(function(t){if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1}),e}},{key:"rawBeforeRule",value:function(t){var e;return t.walk(function(r){if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}},{key:"rawColon",value:function(t){var e;return t.walkDecls(function(t){if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}},{key:"rawEmptyBody",value:function(t){var e;return t.walk(function(t){if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1}),e}},{key:"rawIndent",value:function(t){var e;return t.raws.indent?t.raws.indent:(t.walk(function(r){var n=r.parent;if(n&&n!==t&&n.parent&&n.parent===t&&void 0!==r.raws.before){var i=r.raws.before.split("\n");return e=(e=i[i.length-1]).replace(/\S/g,""),!1}}),e)}},{key:"rawSemicolon",value:function(t){var e;return t.walk(function(t){if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1}),e}},{key:"rawValue",value:function(t,e){var r=t[e],n=t.raws[e];return n&&n.value===r?n.raw:r}},{key:"root",value:function(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}},{key:"rule",value:function(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}},{key:"stringify",value:function(t,e){if(!this[t.type])throw Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}}]),t}();SC=SR,SR.default=SR;var SL={};function SM(t,e){new SC(e).stringify(t)}SL=SM,SM.default=SM,et=Symbol("isClean"),ee=Symbol("my");var SD=/*#__PURE__*/function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var r in xi(this,t),this.raws={},this[et]=!1,this[ee]=!0,e)if("nodes"===r){this.nodes=[];var n=!0,i=!1,o=void 0;try{for(var a,s=e[r][Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var u=a.value;"function"==typeof u.clone?this.append(u.clone()):this.append(u)}}catch(t){i=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}}else this[r]=e[r]}return xa(t,[{key:"addToError",value:function(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&".concat(e.input.from,":").concat(e.start.line,":").concat(e.start.column,"$&"))}return t}},{key:"after",value:function(t){return this.parent.insertAfter(this,t),this}},{key:"assign",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var e in t)this[e]=t[e];return this}},{key:"before",value:function(t){return this.parent.insertBefore(this,t),this}},{key:"cleanRaws",value:function(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}},{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=function t(e,r){var n=new e.constructor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&"proxyCache"!==i){var o=e[i],a=void 0===o?"undefined":(0,e_._)(o);"parent"===i&&"object"===a?r&&(n[i]=r):"source"===i?n[i]=o:Array.isArray(o)?n[i]=o.map(function(e){return t(e,n)}):("object"===a&&null!==o&&(o=t(o)),n[i]=o)}return n}(this);for(var r in t)e[r]=t[r];return e}},{key:"cloneAfter",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.clone(t);return this.parent.insertAfter(this,e),e}},{key:"cloneBefore",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.clone(t);return this.parent.insertBefore(this,e),e}},{key:"error",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.source){var r=this.rangeBy(e),n=r.end,i=r.start;return this.source.input.error(t,{column:i.column,line:i.line},{column:n.column,line:n.line},e)}return new SA(t)}},{key:"getProxyProcessor",value:function(){return{get:function(t,e){return"proxyOf"===e?t:"root"===e?function(){return t.root().toProxy()}:t[e]},set:function(t,e,r){return t[e]===r||(t[e]=r,("prop"===e||"value"===e||"name"===e||"params"===e||"important"===e||"text"===e)&&t.markDirty(),!0)}}}},{key:"markClean",value:function(){this[et]=!0}},{key:"markDirty",value:function(){if(this[et]){this[et]=!1;for(var t=this;t=t.parent;)t[et]=!1}}},{key:"next",value:function(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}},{key:"positionBy",value:function(t,e){var r=this.source.start;if(t.index)r=this.positionInside(t.index,e);else if(t.word){var n=(e=this.toString()).indexOf(t.word);-1!==n&&(r=this.positionInside(n,e))}return r}},{key:"positionInside",value:function(t,e){for(var r=e||this.toString(),n=this.source.start.column,i=this.source.start.line,o=0;o0&&void 0!==arguments[0]?arguments[0]:SL;t.stringify&&(t=t.stringify);var e="";return t(this,function(t){e+=t}),e}},{key:"warn",value:function(t,e,r){var n={node:this};for(var i in r)n[i]=r[i];return t.warn(e,n)}},{key:"proxyOf",get:function(){return this}}]),t}();Sk=SD,SD.default=SD;var SB=/*#__PURE__*/function(t){xj(r,t);var e=xW(r);function r(t){var n;return xi(this,r),(n=e.call(this,t)).type="comment",n}return r}(xH(Sk));SE=SB,SB.default=SB;var Sj={},Sq=/*#__PURE__*/function(t){xj(r,t);var e=xW(r);function r(t){var n;return xi(this,r),t&&void 0!==t.value&&"string"!=typeof t.value&&(t=x5(xU({},t),{value:String(t.value)})),(n=e.call(this,t)).type="decl",n}return xa(r,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),r}(xH(Sk));Sj=Sq,Sq.default=Sq;var SU=/*#__PURE__*/function(t){xj(r,t);var e=xW(r);function r(){return xi(this,r),e.apply(this,arguments)}return xa(r,[{key:"append",value:function(){for(var t=arguments.length,e=Array(t),r=0;r1?e-1:0),i=1;i=t&&(this.indexes[r]=e-1);return this.markDirty(),this}},{key:"replaceValues",value:function(t,e,r){return r||(r=e,e={}),this.walkDecls(function(n){(!e.props||e.props.includes(n.prop))&&(!e.fast||n.value.includes(e.fast))&&(n.value=n.value.replace(t,r))}),this.markDirty(),this}},{key:"some",value:function(t){return this.nodes.some(t)}},{key:"walk",value:function(t){return this.each(function(e,r){var n;try{n=t(e,r)}catch(t){throw e.addToError(t)}return!1!==n&&e.walk&&(n=e.walk(t)),n})}},{key:"walkAtRules",value:function(t,e){return e?t instanceof RegExp?this.walk(function(r,n){if("atrule"===r.type&&t.test(r.name))return e(r,n)}):this.walk(function(r,n){if("atrule"===r.type&&r.name===t)return e(r,n)}):(e=t,this.walk(function(t,r){if("atrule"===t.type)return e(t,r)}))}},{key:"walkComments",value:function(t){return this.walk(function(e,r){if("comment"===e.type)return t(e,r)})}},{key:"walkDecls",value:function(t,e){return e?t instanceof RegExp?this.walk(function(r,n){if("decl"===r.type&&t.test(r.prop))return e(r,n)}):this.walk(function(r,n){if("decl"===r.type&&r.prop===t)return e(r,n)}):(e=t,this.walk(function(t,r){if("decl"===t.type)return e(t,r)}))}},{key:"walkRules",value:function(t,e){return e?t instanceof RegExp?this.walk(function(r,n){if("rule"===r.type&&t.test(r.selector))return e(r,n)}):this.walk(function(r,n){if("rule"===r.type&&r.selector===t)return e(r,n)}):(e=t,this.walk(function(t,r){if("rule"===t.type)return e(t,r)}))}},{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),r}(xH(Sk));SU.registerParse=function(t){en=t},SU.registerRule=function(t){eo=t},SU.registerAtRule=function(t){er=t},SU.registerRoot=function(t){ei=t},SS=SU,SU.default=SU,SU.rebuild=function(t){"atrule"===t.type?Object.setPrototypeOf(t,er.prototype):"rule"===t.type?Object.setPrototypeOf(t,eo.prototype):"decl"===t.type?Object.setPrototypeOf(t,Sj.prototype):"comment"===t.type?Object.setPrototypeOf(t,SE.prototype):"root"===t.type&&Object.setPrototypeOf(t,ei.prototype),t[ee]=!0,t.nodes&&t.nodes.forEach(function(t){SU.rebuild(t)})};var SF=/*#__PURE__*/function(t){xj(r,t);var e=xW(r);function r(t){var n;return xi(this,r),(n=e.call(this,t)).type="atrule",n}return xa(r,[{key:"append",value:function(){for(var t,e=arguments.length,n=Array(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:{};return new ea(new es,this,t).stringify()}}]),r}(SS);Sz.registerLazyResult=function(t){ea=t},Sz.registerProcessor=function(t){es=t},SV=Sz,Sz.default=Sz;var SH={};function S$(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n=0||(i[r]=t[r]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var SW={},SG=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21,e="",r=t;r--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},SY=SN.isAbsolute,SK=SN.resolve,SJ=SN.SourceMapConsumer,SQ=SN.SourceMapGenerator,SZ=SN.fileURLToPath,SX=SN.pathToFileURL,S0={},e_=ek("bbrsO");eu=function(t){var e,r,n=function(t){var e=t.length;if(e%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var n=r===e?0:4-r%4;return[r,n]}(t),i=n[0],o=n[1],a=new S3((i+o)*3/4-o),s=0,u=o>0?i-4:i;for(r=0;r>16&255,a[s++]=e>>8&255,a[s++]=255&e;return 2===o&&(e=S2[t.charCodeAt(r)]<<2|S2[t.charCodeAt(r+1)]>>4,a[s++]=255&e),1===o&&(e=S2[t.charCodeAt(r)]<<10|S2[t.charCodeAt(r+1)]<<4|S2[t.charCodeAt(r+2)]>>2,a[s++]=e>>8&255,a[s++]=255&e),a},ec=function(t){for(var e,r=t.length,n=r%3,i=[],o=0,a=r-n;o>18&63]+S1[n>>12&63]+S1[n>>6&63]+S1[63&n]);return i.join("")}(t,o,o+16383>a?a:o+16383));return 1===n?i.push(S1[(e=t[r-1])>>2]+S1[e<<4&63]+"=="):2===n&&i.push(S1[(e=(t[r-2]<<8)+t[r-1])>>10]+S1[e>>4&63]+S1[e<<2&63]+"="),i.join("")};for(var S1=[],S2=[],S3="undefined"!=typeof Uint8Array?Uint8Array:Array,S5="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S8=0,S6=S5.length;S8>1,l=-7,f=r?i-1:0,h=r?-1:1,d=t[e+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+t[e+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=c}return(d?-1:1)*a*Math.pow(2,o-n)},ef=function(t,e,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<>1,h=23===i?5960464477539062e-23:0,d=n?0:o-1,p=n?1:-1,v=e<0||0===e&&1/e<0?1:0;for(isNaN(e=Math.abs(e))||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+f>=1?e+=h/u:e+=h*Math.pow(2,1-f),e*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;t[r+d]=255&a,d+=p,a/=256,c-=8);t[r+d-p]|=128*v};var S4="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function S9(t){if(t>0x7fffffff)throw RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,S7.prototype),e}function S7(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return Er(t)}return Et(t,e,r)}function Et(t,e,r){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!S7.isEncoding(e))throw TypeError("Unknown encoding: "+e);var r=0|Ea(t,e),n=S9(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(EN(t,Uint8Array)){var e=new Uint8Array(t);return Ei(e.buffer,e.byteOffset,e.byteLength)}return En(t)}(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(void 0===t?"undefined":(0,e_._)(t)));if(EN(t,ArrayBuffer)||t&&EN(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(EN(t,SharedArrayBuffer)||t&&EN(t.buffer,SharedArrayBuffer)))return Ei(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return S7.from(n,e,r);var i=function(t){if(S7.isBuffer(t)){var e,r=0|Eo(t.length),n=S9(r);return 0===n.length||t.copy(n,0,0,r),n}return void 0!==t.length?"number"!=typeof t.length||(e=t.length)!=e?S9(0):En(t):"Buffer"===t.type&&Array.isArray(t.data)?En(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return S7.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(void 0===t?"undefined":(0,e_._)(t)))}function Ee(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function Er(t){return Ee(t),S9(t<0?0:0|Eo(t))}function En(t){for(var e=t.length<0?0:0|Eo(t.length),r=S9(e),n=0;n=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function Ea(t,e){if(S7.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||EN(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+(void 0===t?"undefined":(0,e_._)(t)));var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return EO(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return EI(t).length;default:if(i)return n?-1:EO(t).length;e=(""+e).toLowerCase(),i=!0}}function Es(t,e,r){var n,i,o=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(o=r=+r)!=o&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return -1;r=t.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof e&&(e=S7.from(e,n)),S7.isBuffer(e))return 0===e.length?-1:El(t,e,r,n,i);if("number"==typeof e)return(e&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):El(t,[e],r,n,i);throw TypeError("val must be string, number or Buffer")}function El(t,e,r,n,i){var o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var l=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){for(var f=!0,h=0;h239?4:o>223?3:o>191?2:1;if(i+s<=r){var u=void 0,c=void 0,l=void 0,f=void 0;switch(s){case 1:o<128&&(a=o);break;case 2:(192&(u=t[i+1]))==128&&(f=(31&o)<<6|63&u)>127&&(a=f);break;case 3:u=t[i+1],c=t[i+2],(192&u)==128&&(192&c)==128&&(f=(15&o)<<12|(63&u)<<6|63&c)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:u=t[i+1],c=t[i+2],l=t[i+3],(192&u)==128&&(192&c)==128&&(192&l)==128&&(f=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var r="",n=0;nr)throw RangeError("Trying to access beyond buffer length")}function Ed(t,e,r,n,i,o){if(!S7.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw RangeError("Index out of range")}function Ep(t,e,r,n,i){ES(e,n,i,t,r,7);var o=Number(e&BigInt(0xffffffff));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;var a=Number(e>>BigInt(32)&BigInt(0xffffffff));return t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,r}function Ev(t,e,r,n,i){ES(e,n,i,t,r,7);var o=Number(e&BigInt(0xffffffff));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;var a=Number(e>>BigInt(32)&BigInt(0xffffffff));return t[r+3]=a,a>>=8,t[r+2]=a,a>>=8,t[r+1]=a,a>>=8,t[r]=a,r+8}function Eg(t,e,r,n,i,o){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function Em(t,e,r,n,i){return e=+e,r>>>=0,i||Eg(t,e,r,4,34028234663852886e22,-34028234663852886e22),ef(t,e,r,n,23,4),r+4}function Ey(t,e,r,n,i){return e=+e,r>>>=0,i||Eg(t,e,r,8,17976931348623157e292,-17976931348623157e292),ef(t,e,r,n,52,8),r+8}S7.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),S7.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(S7.prototype,"parent",{enumerable:!0,get:function(){if(S7.isBuffer(this))return this.buffer}}),Object.defineProperty(S7.prototype,"offset",{enumerable:!0,get:function(){if(S7.isBuffer(this))return this.byteOffset}}),S7.poolSize=8192,S7.from=function(t,e,r){return Et(t,e,r)},Object.setPrototypeOf(S7.prototype,Uint8Array.prototype),Object.setPrototypeOf(S7,Uint8Array),S7.alloc=function(t,e,r){return(Ee(t),t<=0)?S9(t):void 0!==e?"string"==typeof r?S9(t).fill(e,r):S9(t).fill(e):S9(t)},S7.allocUnsafe=function(t){return Er(t)},S7.allocUnsafeSlow=function(t){return Er(t)},S7.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==S7.prototype},S7.compare=function(t,e){if(EN(t,Uint8Array)&&(t=S7.from(t,t.offset,t.byteLength)),EN(e,Uint8Array)&&(e=S7.from(e,e.offset,e.byteLength)),!S7.isBuffer(t)||!S7.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);in.length?(S7.isBuffer(o)||(o=S7.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(S7.isBuffer(o))o.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n},S7.byteLength=Ea,S7.prototype._isBuffer=!0,S7.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e50&&(t+=" ... "),""},S4&&(S7.prototype[S4]=S7.prototype.inspect),S7.prototype.compare=function(t,e,r,n,i){if(EN(t,Uint8Array)&&(t=S7.from(t,t.offset,t.byteLength)),!S7.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+(void 0===t?"undefined":(0,e_._)(t)));if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,a=r-e,s=Math.min(o,a),u=this.slice(n,i),c=t.slice(e,r),l=0;l>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,o,a,s,u,c,l,f,h=this.length-e;if((void 0===r||r>h)&&(r=h),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var d=!1;;)switch(n){case"hex":return function(t,e,r,n){r=Number(r)||0;var i,o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var a=e.length;for(n>a/2&&(n=a/2),i=0;i>8,i.push(r%256),i.push(n);return i}(t,this.length-l),this,l,f);default:if(d)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}},S7.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},S7.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||Eh(t,e,this.length);for(var n=this[t],i=1,o=0;++o>>=0,e>>>=0,r||Eh(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},S7.prototype.readUint8=S7.prototype.readUInt8=function(t,e){return t>>>=0,e||Eh(t,1,this.length),this[t]},S7.prototype.readUint16LE=S7.prototype.readUInt16LE=function(t,e){return t>>>=0,e||Eh(t,2,this.length),this[t]|this[t+1]<<8},S7.prototype.readUint16BE=S7.prototype.readUInt16BE=function(t,e){return t>>>=0,e||Eh(t,2,this.length),this[t]<<8|this[t+1]},S7.prototype.readUint32LE=S7.prototype.readUInt32LE=function(t,e){return t>>>=0,e||Eh(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+0x1000000*this[t+3]},S7.prototype.readUint32BE=S7.prototype.readUInt32BE=function(t,e){return t>>>=0,e||Eh(t,4,this.length),0x1000000*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},S7.prototype.readBigUInt64LE=EC(function(t){EE(t>>>=0,"offset");var e=this[t],r=this[t+7];(void 0===e||void 0===r)&&Ek(t,this.length-8);var n=e+256*this[++t]+65536*this[++t]+0x1000000*this[++t],i=this[++t]+256*this[++t]+65536*this[++t]+0x1000000*r;return BigInt(n)+(BigInt(i)<>>=0,"offset");var e=this[t],r=this[t+7];(void 0===e||void 0===r)&&Ek(t,this.length-8);var n=0x1000000*e+65536*this[++t]+256*this[++t]+this[++t],i=0x1000000*this[++t]+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<>>=0,e>>>=0,r||Eh(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},S7.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||Eh(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},S7.prototype.readInt8=function(t,e){return(t>>>=0,e||Eh(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},S7.prototype.readInt16LE=function(t,e){t>>>=0,e||Eh(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?0xffff0000|r:r},S7.prototype.readInt16BE=function(t,e){t>>>=0,e||Eh(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?0xffff0000|r:r},S7.prototype.readInt32LE=function(t,e){return t>>>=0,e||Eh(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},S7.prototype.readInt32BE=function(t,e){return t>>>=0,e||Eh(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},S7.prototype.readBigInt64LE=EC(function(t){EE(t>>>=0,"offset");var e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&Ek(t,this.length-8),(BigInt(this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24))<>>=0,"offset");var e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&Ek(t,this.length-8),(BigInt((e<<24)+65536*this[++t]+256*this[++t]+this[++t])<>>=0,e||Eh(t,4,this.length),el(this,t,!0,23,4)},S7.prototype.readFloatBE=function(t,e){return t>>>=0,e||Eh(t,4,this.length),el(this,t,!1,23,4)},S7.prototype.readDoubleLE=function(t,e){return t>>>=0,e||Eh(t,8,this.length),el(this,t,!0,52,8)},S7.prototype.readDoubleBE=function(t,e){return t>>>=0,e||Eh(t,8,this.length),el(this,t,!1,52,8)},S7.prototype.writeUintLE=S7.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;Ed(this,t,e,r,i,0)}var o=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;Ed(this,t,e,r,i,0)}var o=r-1,a=1;for(this[e+o]=255&t;--o>=0&&(a*=256);)this[e+o]=t/a&255;return e+r},S7.prototype.writeUint8=S7.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||Ed(this,t,e,1,255,0),this[e]=255&t,e+1},S7.prototype.writeUint16LE=S7.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||Ed(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},S7.prototype.writeUint16BE=S7.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||Ed(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},S7.prototype.writeUint32LE=S7.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||Ed(this,t,e,4,0xffffffff,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},S7.prototype.writeUint32BE=S7.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||Ed(this,t,e,4,0xffffffff,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},S7.prototype.writeBigUInt64LE=EC(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Ep(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),S7.prototype.writeBigUInt64BE=EC(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Ev(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),S7.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);Ed(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+r},S7.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);Ed(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},S7.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||Ed(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},S7.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||Ed(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},S7.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||Ed(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},S7.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||Ed(this,t,e,4,0x7fffffff,-0x80000000),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},S7.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||Ed(this,t,e,4,0x7fffffff,-0x80000000),t<0&&(t=0xffffffff+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},S7.prototype.writeBigInt64LE=EC(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Ep(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),S7.prototype.writeBigInt64BE=EC(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Ev(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),S7.prototype.writeFloatLE=function(t,e,r){return Em(this,t,e,!0,r)},S7.prototype.writeFloatBE=function(t,e,r){return Em(this,t,e,!1,r)},S7.prototype.writeDoubleLE=function(t,e,r){return Ey(this,t,e,!0,r)},S7.prototype.writeDoubleBE=function(t,e,r){return Ey(this,t,e,!1,r)},S7.prototype.copy=function(t,e,r,n){if(!S7.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i=n+4;r-=3)e="_".concat(t.slice(r-3,r)).concat(e);return"".concat(t.slice(0,r)).concat(e)}function ES(t,e,r,n,i,o){if(t>r||t3?0===e||e===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat((o+1)*8).concat(s):">= -(2".concat(s," ** ").concat((o+1)*8-1).concat(s,") and < 2 ** ")+"".concat((o+1)*8-1).concat(s):">= ".concat(e).concat(s," and <= ").concat(r).concat(s),new Eb.ERR_OUT_OF_RANGE("value",a,t)}EE(i,"offset"),(void 0===n[i]||void 0===n[i+o])&&Ek(i,n.length-(o+1))}function EE(t,e){if("number"!=typeof t)throw new Eb.ERR_INVALID_ARG_TYPE(e,"number",t)}function Ek(t,e,r){if(Math.floor(t)!==t)throw EE(t,r),new Eb.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new Eb.ERR_BUFFER_OUT_OF_BOUNDS;throw new Eb.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(e),t)}Ew("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),Ew("ERR_INVALID_ARG_TYPE",function(t,e){return'The "'.concat(t,'" argument must be of type number. Received type ').concat(void 0===e?"undefined":(0,e_._)(e))},TypeError),Ew("ERR_OUT_OF_RANGE",function(t,e,r){var n='The value of "'.concat(t,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>0x100000000?i=Ex(String(r)):(void 0===r?"undefined":(0,e_._)(r))==="bigint"&&(i=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=Ex(i)),i+="n"),n+=" It must be ".concat(e,". Received ").concat(i)},RangeError);var EA=/[^+/0-9A-Za-z-_]/g;function EO(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],a=0;a55295&&r<57344){if(!i){if(r>56319||a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function EI(t){return eu(function(t){if((t=(t=t.split("=")[0]).trim().replace(EA,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function ET(t,e,r,n){var i;for(i=0;i=e.length)&&!(i>=t.length);++i)e[i+r]=t[i];return i}function EN(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}var E_=function(){for(var t="0123456789abcdef",e=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}();function EC(t){return"undefined"==typeof BigInt?EP:t}function EP(){throw Error("BigInt not supported")}var ER=SN.existsSync,EL=SN.readFileSync,EM=SN.dirname,ED=SN.join,EB=SN.SourceMapConsumer,Ej=SN.SourceMapGenerator,Eq=/*#__PURE__*/function(){function t(e,r){if(xi(this,t),!1!==r.map){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var n=r.map?r.map.prev:void 0,i=this.loadMap(r.from,n);!this.mapFile&&r.from&&(this.mapFile=r.from),this.mapFile&&(this.root=EM(this.mapFile)),i&&(this.text=i)}}return xa(t,[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new EB(this.text)),this.consumerCache}},{key:"decodeInline",value:function(t){var e,r=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(r)return decodeURIComponent(t.substr(r[0].length));var n=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(n)return e=t.substr(n[0].length),S7?S7.from(e,"base64").toString():window.atob(e);throw Error("Unsupported source map encoding "+t.match(/data:application\/json;([^,]+),/)[1])}},{key:"getAnnotationURL",value:function(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}},{key:"isMap",value:function(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}},{key:"loadAnnotation",value:function(t){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),n=t.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,n)))}}},{key:"loadFile",value:function(t){if(this.root=EM(t),ER(t))return this.mapFile=t,EL(t,"utf-8").toString().trim()}},{key:"loadMap",value:function(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"==typeof e){var r=e(t);if(r){var n=this.loadFile(r);if(!n)throw Error("Unable to load previous source map: "+r.toString());return n}}else if(e instanceof EB)return Ej.fromSourceMap(e).toString();else if(e instanceof Ej)return e.toString();else if(this.isMap(e))return JSON.stringify(e);else throw Error("Unsupported previous source map format: "+e.toString())}else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){var i=this.annotation;return t&&(i=ED(EM(t),i)),this.loadFile(i)}}},{key:"startWith",value:function(t,e){return!!t&&t.substr(0,e.length)===e}},{key:"withContent",value:function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}]),t}();S0=Eq,Eq.default=Eq;var EU=Symbol("fromOffsetCache"),EF=!!(SJ&&SQ),EV=!!(SK&&SY),Ez=/*#__PURE__*/function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(xi(this,t),null==e||"object"==typeof e&&!e.toString)throw Error("PostCSS received ".concat(e," instead of CSS string"));if(this.css=e.toString(),"\uFEFF"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,r.from&&(!EV||/^\w+:\/\//.test(r.from)||SY(r.from)?this.file=r.from:this.file=SK(r.from)),EV&&EF){var n=new S0(this.css,r);if(n.text){this.map=n;var i=n.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}return xa(t,[{key:"error",value:function(t,e,r){var n,i,o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(e&&"object"==typeof e){var s=e,u=r;if("number"==typeof s.offset){var c=this.fromOffset(s.offset);e=c.line,r=c.col}else e=s.line,r=s.column;if("number"==typeof u.offset){var l=this.fromOffset(u.offset);i=l.line,n=l.col}else i=u.line,n=u.column}else if(!r){var f=this.fromOffset(e);e=f.line,r=f.col}var h=this.origin(e,r,i,n);return(o=h?new SA(t,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,a.plugin):new SA(t,void 0===i?e:{column:r,line:e},void 0===i?r:{column:n,line:i},this.css,this.file,a.plugin)).input={column:r,endColumn:n,endLine:i,line:e,source:this.css},this.file&&(SX&&(o.input.url=SX(this.file).toString()),o.input.file=this.file),o}},{key:"fromOffset",value:function(t){if(this[EU])s=this[EU];else{var e=this.css.split("\n");s=Array(e.length);for(var r=0,n=0,i=e.length;n=a)o=s.length-1;else for(var a,s,u,c=s.length-2;o>1)])c=u-1;else if(t>=s[u+1])o=u+1;else{o=u;break}return{col:t-s[o]+1,line:o+1}}},{key:"mapResolve",value:function(t){return/^\w+:\/\//.test(t)?t:SK(this.map.consumer().sourceRoot||this.map.root||".",t)}},{key:"origin",value:function(t,e,r,n){if(!this.map)return!1;var i,o,a=this.map.consumer(),s=a.originalPositionFor({column:e,line:t});if(!s.source)return!1;"number"==typeof r&&(i=a.originalPositionFor({column:n,line:r})),o=SY(s.source)?SX(s.source):new URL(s.source,this.map.consumer().sourceRoot||SX(this.map.mapFile));var u={column:s.column,endColumn:i&&i.column,endLine:i&&i.line,line:s.line,url:o.toString()};if("file:"===o.protocol){if(SZ)u.file=SZ(o);else throw Error("file: protocol is not available in this PostCSS build")}var c=a.sourceContentFor(s.source);return c&&(u.source=c),u}},{key:"toJSON",value:function(){for(var t={},e=0,r=["hasBOM","css","file","id"];e1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)try{for(var u,c=i[Symbol.iterator]();!(o=(u=c.next()).done);o=!0)u.value.raws.before=e.raws.before}catch(t){a=!0,s=t}finally{try{o||null==c.return||c.return()}finally{if(a)throw s}}}return i}},{key:"removeChild",value:function(t,e){var n=this.index(t);return!e&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),Sx(xz(r.prototype),"removeChild",this).call(this,t)}},{key:"toResult",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new eh(new ed,this,t).stringify()}}]),r}(SS);E$.registerLazyResult=function(t){eh=t},E$.registerProcessor=function(t){ed=t},EH=E$,E$.default=E$,SS.registerRoot(E$);var EW={},EG={},EY={comma:function(t){return EY.split(t,[","],!0)},space:function(t){return EY.split(t,[" ","\n"," "])},split:function(t,e,r){var n=[],i="",o=!1,a=0,s=!1,u="",c=!1,l=!0,f=!1,h=void 0;try{for(var d,p=t[Symbol.iterator]();!(l=(d=p.next()).done);l=!0){var v=d.value;c?c=!1:"\\"===v?c=!0:s?v===u&&(s=!1):'"'===v||"'"===v?(s=!0,u=v):"("===v?a+=1:")"===v?a>0&&(a-=1):0===a&&e.includes(v)&&(o=!0),o?(""!==i&&n.push(i.trim()),i="",o=!1):i+=v}}catch(t){f=!0,h=t}finally{try{l||null==p.return||p.return()}finally{if(f)throw h}}return(r||""!==i)&&n.push(i.trim()),n}};EG=EY,EY.default=EY;var EK=/*#__PURE__*/function(t){xj(r,t);var e=xW(r);function r(t){var n;return xi(this,r),(n=e.call(this,t)).type="rule",n.nodes||(n.nodes=[]),n}return xa(r,[{key:"selectors",get:function(){return EG.comma(this.selector)},set:function(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}}]),r}(SS);function EJ(t,e){if(Array.isArray(t))return t.map(function(t){return EJ(t)});var r=t.inputs,n=S$(t,["inputs"]);if(r){e=[];var i=!0,o=!1,a=void 0;try{for(var s,u=r[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value,l=x5(xU({},c),{__proto__:SW.prototype});l.map&&(l.map=x5(xU({},l.map),{__proto__:S0.prototype})),e.push(l)}}catch(t){o=!0,a=t}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}}if(n.nodes&&(n.nodes=t.nodes.map(function(t){return EJ(t,e)})),n.source){var f=n.source,h=f.inputId,d=S$(f,["inputId"]);n.source=d,null!=h&&(n.source.input=e[h])}if("root"===n.type)return new EH(n);if("decl"===n.type)return new Sj(n);if("rule"===n.type)return new EW(n);if("comment"===n.type)return new SE(n);if("atrule"===n.type)return new Sw(n);throw Error("Unknown node type: "+t.type)}EW=EK,EK.default=EK,SS.registerRule(EK),SH=EJ,EJ.default=EJ;var EQ={};function EZ(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r,n,i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o=[],a=!0,s=!1;try{for(i=i.call(t);!(a=(r=i.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,n=t}finally{try{a||null==i.return||i.return()}finally{if(s)throw n}}return o}}(t,e)||Sy(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var eT=(ek("h7Cmf"),ek("h7Cmf")),EX={},E0=SN.dirname,E1=SN.relative,E2=SN.resolve,E3=SN.sep,E5=SN.SourceMapConsumer,E8=SN.SourceMapGenerator,E6=SN.pathToFileURL,E4=!!(E5&&E8),E9=!!(E0&&E2&&E1&&E3);EX=/*#__PURE__*/function(){function t(e,r,n,i){xi(this,t),this.stringify=e,this.mapOpts=n.map||{},this.root=r,this.opts=n,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}return xa(t,[{key:"addAnnotation",value:function(){t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var t,e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}},{key:"applyPrevMaps",value:function(){var t=!0,e=!1,r=void 0;try{for(var n,i=this.previous()[Symbol.iterator]();!(t=(n=i.next()).done);t=!0){var o=n.value,a=this.toUrl(this.path(o.file)),s=o.root||E0(o.file),u=void 0;!1===this.mapOpts.sourcesContent?(u=new E5(o.text)).sourcesContent&&(u.sourcesContent=null):u=o.consumer(),this.map.applySourceMap(u,a,this.toUrl(this.path(s)))}}catch(t){e=!0,r=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw r}}}},{key:"clearAnnotation",value:function(){if(!1!==this.mapOpts.annotation){if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}}},{key:"generate",value:function(){if(this.clearAnnotation(),E9&&E4&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,function(e){t+=e}),[t]}},{key:"generateMap",value:function(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=E8.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new E8({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return(this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline())?[this.css]:[this.css,this.map]}},{key:"generateString",value:function(){var t,e,r=this;this.css="",this.map=new E8({file:this.outputFile(),ignoreInvalidMapping:!0});var n=1,i=1,o="",a={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(s,u,c){if(r.css+=s,u&&"end"!==c&&(a.generated.line=n,a.generated.column=i-1,u.source&&u.source.start?(a.source=r.sourcePath(u),a.original.line=u.source.start.line,a.original.column=u.source.start.column-1):(a.source=o,a.original.line=1,a.original.column=0),r.map.addMapping(a)),(e=s.match(/\n/g))?(n+=e.length,t=s.lastIndexOf("\n"),i=s.length-t):i+=s.length,u&&"start"!==c){var l=u.parent||{raws:{}};(!("decl"===u.type||"atrule"===u.type&&!u.nodes)||u!==l.last||l.raws.semicolon)&&(u.source&&u.source.end?(a.source=r.sourcePath(u),a.original.line=u.source.end.line,a.original.column=u.source.end.column-1,a.generated.line=n,a.generated.column=i-2):(a.source=o,a.original.line=1,a.original.column=0,a.generated.line=n,a.generated.column=i-1),r.map.addMapping(a))}})}},{key:"isAnnotation",value:function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(t){return t.annotation}))}},{key:"isInline",value:function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some(function(t){return t.inline}))}},{key:"isMap",value:function(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}},{key:"isSourcesContent",value:function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(t){return t.withContent()})}},{key:"outputFile",value:function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}},{key:"path",value:function(t){if(this.mapOpts.absolute||60===t.charCodeAt(0)||/^\w+:\/\//.test(t))return t;var e=this.memoizedPaths.get(t);if(e)return e;var r=this.opts.to?E0(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=E0(E2(r,this.mapOpts.annotation)));var n=E1(r,t);return this.memoizedPaths.set(t,n),n}},{key:"previous",value:function(){var t=this;if(!this.previousMaps){if(this.previousMaps=[],this.root)this.root.walk(function(e){if(e.source&&e.source.input.map){var r=e.source.input.map;t.previousMaps.includes(r)||t.previousMaps.push(r)}});else{var e=new SW(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}}return this.previousMaps}},{key:"setSourcesContent",value:function(){var t=this,e={};if(this.root)this.root.walk(function(r){if(r.source){var n=r.source.input.from;if(n&&!e[n]){e[n]=!0;var i=t.usesFileUrls?t.toFileUrl(n):t.toUrl(t.path(n));t.map.setSourceContent(i,r.source.input.css)}}});else if(this.css){var r=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(r,this.css)}}},{key:"sourcePath",value:function(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}},{key:"toBase64",value:function(t){return S7?S7.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}},{key:"toFileUrl",value:function(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(E6){var r=E6(t).toString();return this.memoizedFileURLs.set(t,r),r}throw Error("`map.absolute` option is not available in this PostCSS build")}},{key:"toUrl",value:function(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===E3&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}}]),t}();var E7={},kt={},ke={},kr=/[\t\n\f\r "#'()/;[\\\]{}]/g,kn=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ki=/.[\r\n"'(/\\]/,ko=/[\da-f]/i;ke=function(t){var e,r,n,i,o,a,s,u,c,l,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=t.css.valueOf(),d=f.ignoreErrors,p=h.length,v=0,g=[],m=[];function y(e){throw t.error("Unclosed "+e,v)}return{back:function(t){m.push(t)},endOfFile:function(){return 0===m.length&&v>=p},nextToken:function(t){if(m.length)return m.pop();if(!(v>=p)){var f=!!t&&t.ignoreUnclosed;switch(e=h.charCodeAt(v)){case 10:case 32:case 9:case 13:case 12:i=v;do i+=1,e=h.charCodeAt(i);while(32===e||10===e||9===e||13===e||12===e)a=["space",h.slice(v,i)],v=i-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:var b=String.fromCharCode(e);a=[b,b,v];break;case 40:if(l=g.length?g.pop()[1]:"",c=h.charCodeAt(v+1),"url"===l&&39!==c&&34!==c&&32!==c&&10!==c&&9!==c&&12!==c&&13!==c){i=v;do{if(s=!1,-1===(i=h.indexOf(")",i+1))){if(d||f){i=v;break}y("bracket")}for(u=i;92===h.charCodeAt(u-1);)u-=1,s=!s}while(s)a=["brackets",h.slice(v,i+1),v,i],v=i}else i=h.indexOf(")",v+1),r=h.slice(v,i+1),-1===i||ki.test(r)?a=["(","(",v]:(a=["brackets",r,v,i],v=i);break;case 39:case 34:o=39===e?"'":'"',i=v;do{if(s=!1,-1===(i=h.indexOf(o,i+1))){if(d||f){i=v+1;break}y("string")}for(u=i;92===h.charCodeAt(u-1);)u-=1,s=!s}while(s)a=["string",h.slice(v,i+1),v,i],v=i;break;case 64:kr.lastIndex=v+1,kr.test(h),i=0===kr.lastIndex?h.length-1:kr.lastIndex-2,a=["at-word",h.slice(v,i+1),v,i],v=i;break;case 92:for(i=v,n=!0;92===h.charCodeAt(i+1);)i+=1,n=!n;if(e=h.charCodeAt(i+1),n&&47!==e&&32!==e&&10!==e&&9!==e&&13!==e&&12!==e&&(i+=1,ko.test(h.charAt(i)))){for(;ko.test(h.charAt(i+1));)i+=1;32===h.charCodeAt(i+1)&&(i+=1)}a=["word",h.slice(v,i+1),v,i],v=i;break;default:47===e&&42===h.charCodeAt(v+1)?(0===(i=h.indexOf("*/",v+2)+1)&&(d||f?i=h.length:y("comment")),a=["comment",h.slice(v,i+1),v,i]):(kn.lastIndex=v+1,kn.test(h),i=0===kn.lastIndex?h.length-1:kn.lastIndex-2,a=["word",h.slice(v,i+1),v,i],g.push(a)),v=i}return v++,a}},position:function(){return v}}};var ka={empty:!0,space:!0};function ks(t,e){var r=new SW(t,e),n=new kt(r);try{n.parse()}catch(t){throw t}return n.root}kt=/*#__PURE__*/function(){function t(e){xi(this,t),this.input=e,this.root=new EH,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}return xa(t,[{key:"atrule",value:function(t){var e,r,n,i=new Sw;i.name=t[1].slice(1),""===i.name&&this.unnamedAtrule(i,t),this.init(i,t[2]);for(var o=!1,a=!1,s=[],u=[];!this.tokenizer.endOfFile();){if("("===(e=(t=this.tokenizer.nextToken())[0])||"["===e?u.push("("===e?")":"]"):"{"===e&&u.length>0?u.push("}"):e===u[u.length-1]&&u.pop(),0===u.length){if(";"===e){i.source.end=this.getPosition(t[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===e){a=!0;break}if("}"===e){if(s.length>0){for(n=s.length-1,r=s[n];r&&"space"===r[0];)r=s[--n];r&&(i.source.end=this.getPosition(r[3]||r[2]),i.source.end.offset++)}this.end(t);break}s.push(t)}else s.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(i.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(i,"params",s),o&&(t=s[s.length-1],i.source.end=this.getPosition(t[3]||t[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),a&&(i.nodes=[],this.current=i)}},{key:"checkMissedSemicolon",value:function(t){var e,r=this.colon(t);if(!1!==r){for(var n=0,i=r-1;i>=0&&("space"===(e=t[i])[0]||2!==(n+=1));i--);throw this.input.error("Missed semicolon","word"===e[0]?e[3]+1:e[2])}}},{key:"colon",value:function(t){var e=0,r=!0,n=!1,i=void 0;try{for(var o,a,s,u=t.entries()[Symbol.iterator]();!(r=(s=u.next()).done);r=!0){var c=EZ(s.value,2),l=c[0],f=c[1];if(a=f[0],"("===a&&(e+=1),")"===a&&(e-=1),0===e&&":"===a){if(o){if("word"===o[0]&&"progid"===o[1])continue;return l}this.doubleColon(f)}o=f}}catch(t){n=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(n)throw i}}return!1}},{key:"comment",value:function(t){var e=new SE;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;var r=t[1].slice(2,-2);if(/^\s*$/.test(r))e.text="",e.raws.left=r,e.raws.right="";else{var n=r.match(/^(\s*)([^]*\S)(\s*)$/);e.text=n[2],e.raws.left=n[1],e.raws.right=n[3]}}},{key:"createTokenizer",value:function(){this.tokenizer=ke(this.input)}},{key:"decl",value:function(t,e){var r,n,i=new Sj;this.init(i,t[0][2]);var o=t[t.length-1];for(";"===o[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(o[3]||o[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],n=r[3]||r[2];if(n)return n}}(t)),i.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){var a=t[0][0];if(":"===a||"space"===a||"comment"===a)break;i.prop+=t.shift()[1]}for(i.raws.between="";t.length;){if(":"===(r=t.shift())[0]){i.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),i.raws.between+=r[1]}("_"===i.prop[0]||"*"===i.prop[0])&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var s=[];t.length&&("space"===(n=t[0][0])||"comment"===n);)s.push(t.shift());this.precheckMissedSemicolon(t);for(var u=t.length-1;u>=0;u--){if("!important"===(r=t[u])[1].toLowerCase()){i.important=!0;var c=this.stringFrom(t,u);" !important"!==(c=this.spacesFromEnd(t)+c)&&(i.raws.important=c);break}if("important"===r[1].toLowerCase()){for(var l=t.slice(0),f="",h=u;h>0;h--){var d=l[h][0];if(f.trim().startsWith("!")&&"space"!==d)break;f=l.pop()[1]+f}f.trim().startsWith("!")&&(i.important=!0,i.raws.important=f,t=l)}if("space"!==r[0]&&"comment"!==r[0])break}t.some(function(t){return"space"!==t[0]&&"comment"!==t[0]})&&(i.raws.between+=s.map(function(t){return t[1]}).join(""),s=[]),this.raw(i,"value",s.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}},{key:"doubleColon",value:function(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}},{key:"emptyRule",value:function(t){var e=new EW;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}},{key:"end",value:function(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}},{key:"endFile",value:function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}},{key:"freeSemicolon",value:function(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}},{key:"getPosition",value:function(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}},{key:"init",value:function(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}},{key:"other",value:function(t){for(var e=!1,r=null,n=!1,i=null,o=[],a=t[1].startsWith("--"),s=[],u=t;u;){if(r=u[0],s.push(u),"("===r||"["===r)i||(i=u),o.push("("===r?")":"]");else if(a&&n&&"{"===r)i||(i=u),o.push("}");else if(0===o.length){if(";"===r){if(n){this.decl(s,a);return}break}if("{"===r){this.rule(s);return}if("}"===r){this.tokenizer.back(s.pop()),e=!0;break}":"===r&&(n=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),o.length>0&&this.unclosedBracket(i),e&&n){if(!a)for(;s.length&&("space"===(u=s[s.length-1][0])||"comment"===u);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}},{key:"parse",value:function(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}},{key:"precheckMissedSemicolon",value:function(){}},{key:"raw",value:function(t,e,r,n){for(var i,o,a,s,u=r.length,c="",l=!0,f=0;f1&&void 0!==arguments[1]?arguments[1]:{};if(xi(this,t),this.type="warning",this.text=e,r.node&&r.node.source){var n=r.node.rangeBy(r);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var i in r)this[i]=r[i]}return xa(t,[{key:"toString",value:function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}]),t}();kc=kl,kl.default=kl;var kf=/*#__PURE__*/function(){function t(e,r,n){xi(this,t),this.processor=e,this.messages=[],this.root=r,this.opts=n,this.css=void 0,this.map=void 0}return xa(t,[{key:"toString",value:function(){return this.css}},{key:"warn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!e.plugin&&this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);var r=new kc(t,e);return this.messages.push(r),r}},{key:"warnings",value:function(){return this.messages.filter(function(t){return"warning"===t.type})}},{key:"content",get:function(){return this.css}}]),t}();ku=kf,kf.default=kf;var kh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},kd={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},kp={Once:!0,postcssPlugin:!0,prepare:!0};function kv(t){return"object"==typeof t&&"function"==typeof t.then}function kg(t){var e=!1,r=kh[t.type];return("decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append)?[r,r+"-"+e,0,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function km(t){return{eventIndex:0,events:"document"===t.type?["Document",0,"DocumentExit"]:"root"===t.type?["Root",0,"RootExit"]:kg(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function ky(t){return t[et]=!1,t.nodes&&t.nodes.forEach(function(t){return ky(t)}),t}var kb={},kw=/*#__PURE__*/function(){function t(e,r,n){var i,o=this;if(xi(this,t),this.stringified=!1,this.processed=!1,"object"==typeof r&&null!==r&&("root"===r.type||"document"===r.type))i=ky(r);else if(r instanceof t||r instanceof ku)i=ky(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{var a=E7;n.syntax&&(a=n.syntax.parse),n.parser&&(a=n.parser),a.parse&&(a=a.parse);try{i=a(r,n)}catch(t){this.processed=!0,this.error=t}i&&!i[ee]&&SS.rebuild(i)}this.result=new ku(e,i,n),this.helpers=x5(xU({},kb),{postcss:kb,result:this.result}),this.plugins=this.processor.plugins.map(function(t){return"object"==typeof t&&t.prepare?xU({},t,t.prepare(o.result)):t})}return xa(t,[{key:"async",value:function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}},{key:"catch",value:function(t){return this.async().catch(t)}},{key:"finally",value:function(t){return this.async().then(t,t)}},{key:"getAsyncError",value:function(){throw Error("Use process(css).then(cb) to work with async plugins")}},{key:"handleError",value:function(t,e){var r=this.result.lastPlugin;try{e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin?r.postcssVersion:(t.plugin=r.postcssPlugin,t.setMessage())}catch(t){console&&console.error&&console.error(t)}return t}},{key:"prepareVisitors",value:function(){var t=this;this.listeners={};var e=function(e,r,n){t.listeners[r]||(t.listeners[r]=[]),t.listeners[r].push([e,n])},r=!0,n=!1,i=void 0;try{for(var o,a=this.plugins[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){var s=o.value;if("object"==typeof s)for(var u in s){if(!kd[u]&&/^[A-Z]/.test(u))throw Error("Unknown event ".concat(u," in ").concat(s.postcssPlugin,". ")+"Try to update PostCSS (".concat(this.processor.version," now)."));if(!kp[u]){if("object"==typeof s[u])for(var c in s[u])e(s,"*"===c?u:u+"-"+c.toLowerCase(),s[u][c]);else"function"==typeof s[u]&&e(s,u,s[u])}}}}catch(t){n=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}this.hasListener=Object.keys(this.listeners).length>0}},{key:"runAsync",value:function(){var t=this;return eI(function(){var e,r,n,i,o,a,s,u,c,l,f,h,d,p,v,g;return(0,eT.__generator)(this,function(m){switch(m.label){case 0:t.plugin=0,e=0,m.label=1;case 1:if(!(e0))return[3,13];if(!kv(s=t.visitTick(a)))return[3,12];m.label=9;case 9:return m.trys.push([9,11,,12]),[4,s];case 10:return m.sent(),[3,12];case 11:throw u=m.sent(),c=a[a.length-1].node,t.handleError(u,c);case 12:return[3,8];case 13:return[3,7];case 14:if(l=!0,f=!1,h=void 0,!t.listeners.OnceExit)return[3,22];m.label=15;case 15:m.trys.push([15,20,21,22]),d=function(){var e,r,n,i;return(0,eT.__generator)(this,function(a){switch(a.label){case 0:r=(e=EZ(v.value,2))[0],n=e[1],t.result.lastPlugin=r,a.label=1;case 1:if(a.trys.push([1,6,,7]),"document"!==o.type)return[3,3];return[4,Promise.all(o.nodes.map(function(e){return n(e,t.helpers)}))];case 2:return a.sent(),[3,5];case 3:return[4,n(o,t.helpers)];case 4:a.sent(),a.label=5;case 5:return[3,7];case 6:throw i=a.sent(),t.handleError(i);case 7:return[2]}})},p=t.listeners.OnceExit[Symbol.iterator](),m.label=16;case 16:if(l=(v=p.next()).done)return[3,19];return[5,(0,eT.__values)(d())];case 17:m.sent(),m.label=18;case 18:return l=!0,[3,16];case 19:return[3,22];case 20:return g=m.sent(),f=!0,h=g,[3,22];case 21:try{l||null==p.return||p.return()}finally{if(f)throw h}return[7];case 22:return t.processed=!0,[2,t.stringify()]}})})()}},{key:"runOnRoot",value:function(t){var e=this;this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var r=this.result.root.nodes.map(function(r){return t.Once(r,e.helpers)});if(kv(r[0]))return Promise.all(r);return r}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}},{key:"stringify",value:function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=SL;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=new EX(e,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}},{key:"sync",value:function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();var t=!0,e=!1,r=void 0;try{for(var n,i=this.plugins[Symbol.iterator]();!(t=(n=i.next()).done);t=!0){var o=n.value,a=this.runOnRoot(o);if(kv(a))throw this.getAsyncError()}}catch(t){e=!0,r=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw r}}if(this.prepareVisitors(),this.hasListener){for(var s=this.result.root;!s[et];)s[et]=!0,this.walkSync(s);if(this.listeners.OnceExit){var u=!0,c=!1,l=void 0;if("document"===s.type)try{for(var f,h=s.nodes[Symbol.iterator]();!(u=(f=h.next()).done);u=!0){var d=f.value;this.visitSync(this.listeners.OnceExit,d)}}catch(t){c=!0,l=t}finally{try{u||null==h.return||h.return()}finally{if(c)throw l}}else this.visitSync(this.listeners.OnceExit,s)}}return this.result}},{key:"then",value:function(t,e){return this.async().then(t,e)}},{key:"toString",value:function(){return this.css}},{key:"visitSync",value:function(t,e){var r=!0,n=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){var s=EZ(o.value,2),u=s[0],c=s[1];this.result.lastPlugin=u;var l=void 0;try{l=c(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(kv(l))throw this.getAsyncError()}}catch(t){n=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}}},{key:"visitTick",value:function(t){var e=t[t.length-1],r=e.node,n=e.visitors;if("root"!==r.type&&"document"!==r.type&&!r.parent){t.pop();return}if(n.length>0&&e.visitorIndex0&&void 0!==arguments[0]?arguments[0]:[];xi(this,t),this.version="8.4.47",this.plugins=this.normalize(e)}return xa(t,[{key:"normalize",value:function(t){var e=[],r=!0,n=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){var s=o.value;if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))e=e.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)e.push(s);else if("function"==typeof s)e.push(s);else if("object"==typeof s&&(s.parse||s.stringify));else throw Error(s+" is not a PostCSS plugin")}}catch(t){n=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}return e}},{key:"process",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.plugins.length||e.parser||e.stringifier||e.syntax?new EQ(this,t,e):new kS(this,t,e)}},{key:"use",value:function(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}}]),t}();function kA(){for(var t=arguments.length,e=Array(t),r=0;r]+$/;function kR(t,e,r){if(null==t)return"";"number"==typeof t&&(t=t.toString());var n,i,o,a,s,u,c,l,f,h="",d="";function p(t,e){var r=this;this.tag=t,this.attribs=e||{},this.tagPosition=h.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(s.length){var t=s[s.length-1];t.text+=r.text}},this.updateParentNodeMediaChildren=function(){s.length&&kI.includes(this.tag)&&s[s.length-1].mediaChildren.push(this.tag)}}(e=Object.assign({},kR.defaults,e)).parser=Object.assign({},kL,e.parser);var v=function(t){return!1===e.allowedTags||(e.allowedTags||[]).indexOf(t)>-1};kT.forEach(function(t){v(t)&&!e.allowVulnerableTags&&console.warn("\n\n⚠️ Your `allowedTags` option includes, `".concat(t,"`, which is inherently\nvulnerable to XSS attacks. Please remove it from `allowedTags`.\nOr, to disable this warning, add the `allowVulnerableTags` option\nand ensure you are accounting for this risk.\n\n"))});var g=e.nonTextTags||["script","style","textarea","option"];e.allowedAttributes&&(n={},i={},kN(e.allowedAttributes,function(t,e){n[e]=[];var r=[];t.forEach(function(t){"string"==typeof t&&t.indexOf("*")>=0?r.push(Si(t).replace(/\\\*/g,".*")):n[e].push(t)}),r.length&&(i[e]=RegExp("^("+r.join("|")+")$"))}));var m={},y={},b={};kN(e.allowedClasses,function(t,e){if(n&&(k_(n,e)||(n[e]=[]),n[e].push("class")),m[e]=t,Array.isArray(t)){var r=[];m[e]=[],b[e]=[],t.forEach(function(t){"string"==typeof t&&t.indexOf("*")>=0?r.push(Si(t).replace(/\\\*/g,".*")):t instanceof RegExp?b[e].push(t):m[e].push(t)}),r.length&&(y[e]=RegExp("^("+r.join("|")+")$"))}});var w={};kN(e.transformTags,function(t,e){var r;"function"==typeof t?r=t:"string"==typeof t&&(r=kR.simpleTransform(t)),"*"===e?o=r:w[e]=r});var x=!1;E();var S=new xD({onopentag:function(t,r){if(e.enforceHtmlBoundary&&"html"===t&&E(),l){f++;return}var S,T=new p(t,r);s.push(T);var N=!1,_=!!T.text;if(k_(w,t)&&(S=w[t](t,r),T.attribs=r=S.attribs,void 0!==S.text&&(T.innerText=S.text),t!==S.tagName&&(T.name=t=S.tagName,c[a]=S.tagName)),o&&(S=o(t,r),T.attribs=r=S.attribs,t!==S.tagName&&(T.name=t=S.tagName,c[a]=S.tagName)),(!v(t)||"recursiveEscape"===e.disallowedTagsMode&&!function(t){for(var e in t)if(k_(t,e))return!1;return!0}(u)||null!=e.nestingLimit&&a>=e.nestingLimit)&&(N=!0,u[a]=!0,("discard"===e.disallowedTagsMode||"completelyDiscard"===e.disallowedTagsMode)&&-1!==g.indexOf(t)&&(l=!0,f=1),u[a]=!0),a++,N){if("discard"===e.disallowedTagsMode||"completelyDiscard"===e.disallowedTagsMode)return;d=h,h=""}h+="<"+t,"script"===t&&(e.allowedScriptHostnames||e.allowedScriptDomains)&&(T.innerText=""),(!n||k_(n,t)||n["*"])&&kN(r,function(r,o){if(!kP.test(o)||""===r&&!e.allowedEmptyAttributes.includes(o)&&(e.nonBooleanAttributes.includes(o)||e.nonBooleanAttributes.includes("*"))){delete T.attribs[o];return}var a=!1;if(!n||k_(n,t)&&-1!==n[t].indexOf(o)||n["*"]&&-1!==n["*"].indexOf(o)||k_(i,t)&&i[t].test(o)||i["*"]&&i["*"].test(o))a=!0;else if(n&&n[t]){var s=!0,u=!1,c=void 0;try{for(var l,f=n[t][Symbol.iterator]();!(s=(l=f.next()).done);s=!0){var d=l.value;if(Sa(d)&&d.name&&d.name===o){a=!0;var p="";if(!0===d.multiple){var v=r.split(" "),g=!0,w=!1,x=void 0;try{for(var S,E=v[Symbol.iterator]();!(g=(S=E.next()).done);g=!0){var N=S.value;-1!==d.values.indexOf(N)&&(""===p?p=N:p+=" "+N)}}catch(t){w=!0,x=t}finally{try{g||null==E.return||E.return()}finally{if(w)throw x}}}else d.values.indexOf(r)>=0&&(p=r);r=p}}}catch(t){u=!0,c=t}finally{try{s||null==f.return||f.return()}finally{if(u)throw c}}}if(a){if(-1!==e.allowedSchemesAppliedToAttributes.indexOf(o)&&A(t,r)){delete T.attribs[o];return}if("script"===t&&"src"===o){var _=!0;try{var C=O(r);if(e.allowedScriptHostnames||e.allowedScriptDomains){var P=(e.allowedScriptHostnames||[]).find(function(t){return t===C.url.hostname}),R=(e.allowedScriptDomains||[]).find(function(t){return C.url.hostname===t||C.url.hostname.endsWith(".".concat(t))});_=P||R}}catch(t){_=!1}if(!_){delete T.attribs[o];return}}if("iframe"===t&&"src"===o){var L=!0;try{var M=O(r);if(M.isRelativeUrl)L=k_(e,"allowIframeRelativeUrls")?e.allowIframeRelativeUrls:!e.allowedIframeHostnames&&!e.allowedIframeDomains;else if(e.allowedIframeHostnames||e.allowedIframeDomains){var D=(e.allowedIframeHostnames||[]).find(function(t){return t===M.url.hostname}),B=(e.allowedIframeDomains||[]).find(function(t){return M.url.hostname===t||M.url.hostname.endsWith(".".concat(t))});L=D||B}}catch(t){L=!1}if(!L){delete T.attribs[o];return}}if("srcset"===o)try{var j=Sv(r);if(j.forEach(function(t){A("srcset",t.url)&&(t.evil=!0)}),(j=kC(j,function(t){return!t.evil})).length)r=kC(j,function(t){return!t.evil}).map(function(t){if(!t.url)throw Error("URL missing");return t.url+(t.w?" ".concat(t.w,"w"):"")+(t.h?" ".concat(t.h,"h"):"")+(t.d?" ".concat(t.d,"x"):"")}).join(", "),T.attribs[o]=r;else{delete T.attribs[o];return}}catch(t){delete T.attribs[o];return}if("class"===o){var q=m[t],U=m["*"],F=y[t],V=b[t],z=b["*"],H=[F,y["*"]].concat(V,z).filter(function(t){return t});if(!(r=q&&U?I(r,Ss(q,U),H):I(r,q||U,H)).length){delete T.attribs[o];return}}if("style"===o){if(e.parseStyleAttributes)try{var $=kO(t+" {"+r+"}",{map:!1});if(r=(function(t,e){if(!e)return t;var r,n=t.nodes[0];return(r=e[n.selector]&&e["*"]?Ss(e[n.selector],e["*"]):e[n.selector]||e["*"])&&(t.nodes[0].nodes=n.nodes.reduce(function(t,e){return k_(r,e.prop)&&r[e.prop].some(function(t){return t.test(e.value)})&&t.push(e),t},[])),t})($,e.allowedStyles).nodes[0].nodes.reduce(function(t,e){return t.push("".concat(e.prop,":").concat(e.value).concat(e.important?" !important":"")),t},[]).join(";"),0===r.length){delete T.attribs[o];return}}catch(e){"undefined"!=typeof window&&console.warn('Failed to parse "'+t+" {"+r+"}\", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547"),delete T.attribs[o];return}else if(e.allowedStyles)throw Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}h+=" "+o,r&&r.length?h+='="'+k(r,!0)+'"':e.allowedEmptyAttributes.includes(o)&&(h+='=""')}else delete T.attribs[o]}),-1!==e.selfClosing.indexOf(t)?h+=" />":(h+=">",!T.innerText||_||e.textFilter||(h+=k(T.innerText),x=!0)),N&&(h=d+k(h),d="")},ontext:function(t){if(!l){var r,n=s[s.length-1];if(n&&(r=n.tag,t=void 0!==n.innerText?n.innerText:t),"completelyDiscard"!==e.disallowedTagsMode||v(r)){if(("discard"===e.disallowedTagsMode||"completelyDiscard"===e.disallowedTagsMode)&&("script"===r||"style"===r))h+=t;else{var i=k(t,!1);e.textFilter&&!x?h+=e.textFilter(i,r):x||(h+=i)}}else t="";if(s.length){var o=s[s.length-1];o.text+=t}}},onclosetag:function(t,r){if(l){if(--f)return;l=!1}var n=s.pop();if(n){if(n.tag!==t){s.push(n);return}l=!!e.enforceHtmlBoundary&&"html"===t;var i=u[--a];if(i){if(delete u[a],"discard"===e.disallowedTagsMode||"completelyDiscard"===e.disallowedTagsMode){n.updateParentNodeText();return}d=h,h=""}if(c[a]&&(t=c[a],delete c[a]),e.exclusiveFilter&&e.exclusiveFilter(n)){h=h.substr(0,n.tagPosition);return}if(n.updateParentNodeMediaChildren(),n.updateParentNodeText(),-1!==e.selfClosing.indexOf(t)||r&&!v(t)&&["escape","recursiveEscape"].indexOf(e.disallowedTagsMode)>=0){i&&(h=d,d="");return}h+="",i&&(h=d+k(h),d=""),x=!1}}},e.parser);return S.write(t),S.end(),h;function E(){h="",a=0,s=[],u={},c={},l=!1,f=0}function k(t,r){return"string"!=typeof t&&(t+=""),e.parser.decodeEntities&&(t=t.replace(/&/g,"&").replace(//g,">"),r&&(t=t.replace(/"/g,"""))),t=t.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(//g,">"),r&&(t=t.replace(/"/g,""")),t}function A(t,r){for(r=r.replace(/[\x00-\x20]+/g,"");;){var n=r.indexOf("",n+4);if(-1===i)break;r=r.substring(0,n)+r.substring(i+3)}var o=r.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!o)return!!r.match(/^[/\\]{2}/)&&!e.allowProtocolRelative;var a=o[1].toLowerCase();return k_(e.allowedSchemesByTag,t)?-1===e.allowedSchemesByTag[t].indexOf(a):!e.allowedSchemes||-1===e.allowedSchemes.indexOf(a)}function O(t){if((t=t.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//")).startsWith("relative:"))throw Error("relative: exploit attempt");for(var e="relative://relative-site",r=0;r<100;r++)e+="/".concat(r);var n=new URL(t,e);return{isRelativeUrl:n&&"relative-site"===n.hostname&&"relative:"===n.protocol,url:n}}function I(t,e,r){return e?(t=t.split(/\s+/)).filter(function(t){return -1!==e.indexOf(t)||r.some(function(e){return e.test(t)})}).join(" "):t}}var kL={decodeEntities:!0};kR.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0},kR.simpleTransform=function(t,e,r){return r=void 0===r||r,e=e||{},function(n,i){var o;if(r)for(o in e)i[o]=e[o];else i=e;return{tagName:t,attribs:i}}};var kM={};r="millisecond",n="second",i="minute",o="hour",a="week",s="month",u="quarter",c="year",l="date",f="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p=function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},(g={})[v="en"]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||"th")+"]"}},m="$isDayjsObject",y=function(t){return t instanceof S||!(!t||!t[m])},b=function t(e,r,n){var i;if(!e)return v;if("string"==typeof e){var o=e.toLowerCase();g[o]&&(i=o),r&&(g[o]=r,i=o);var a=e.split("-");if(!i&&a.length>1)return t(a[0])}else{var s=e.name;g[s]=e,i=s}return!n&&i&&(v=i),i||!n&&v},w=function(t,e){if(y(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new S(r)},(x={s:p,z:function(t){var e=-t.utcOffset(),r=Math.abs(e);return(e<=0?"+":"-")+p(Math.floor(r/60),2,"0")+":"+p(r%60,2,"0")},m:function t(e,r){if(e.date()5&&"xml"===n)return kG("InvalidXml","XML declaration allowed only at the start of the document.",kY(t,e));if("?"!=t[e]||">"!=t[e+1])continue;e++;break}return e}function kH(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){var r=1;for(e+=8;e"===t[e]&&0==--r)break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7]){for(e+=8;e"===t[e+2]){e+=2;break}}return e}ep=function(t,e){e=Object.assign({},kF,e);var r=[],n=!1,i=!1;"\uFEFF"===t[0]&&(t=t.substr(1));for(var o=0;o"!==t[o]&&" "!==t[o]&&" "!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)u+=t[o];if("/"===(u=u.trim())[u.length-1]&&(u=u.substring(0,u.length-1),o--),!eg(u))return kG("InvalidTag",0===u.trim().length?"Invalid space after '<'.":"Tag '"+u+"' is an invalid name.",kY(t,o));var c=function(t,e){for(var r="",n="",i=!1;e"===t[e]&&""===n){i=!0;break}r+=t[e]}return""===n&&{value:r,index:e,tagClosed:i}}(t,o);if(!1===c)return kG("InvalidAttr","Attributes for '"+u+"' have open quote.",kY(t,o));var l=c.value;if(o=c.index,"/"===l[l.length-1]){var f=o-l.length,h=kW(l=l.substring(0,l.length-1),e);if(!0!==h)return kG(h.err.code,h.err.msg,kY(t,f+h.err.line));n=!0}else if(s){if(!c.tagClosed)return kG("InvalidTag","Closing tag '"+u+"' doesn't have proper closing.",kY(t,o));if(l.trim().length>0)return kG("InvalidTag","Closing tag '"+u+"' can't have attributes or invalid starting.",kY(t,a));if(0===r.length)return kG("InvalidTag","Closing tag '"+u+"' has not been opened.",kY(t,a));var d=r.pop();if(u!==d.tagName){var p=kY(t,d.tagStartPos);return kG("InvalidTag","Expected closing tag '"+d.tagName+"' (opened in line "+p.line+", col "+p.col+") instead of closing tag '"+u+"'.",kY(t,a))}0==r.length&&(i=!0)}else{var v=kW(l,e);if(!0!==v)return kG(v.err.code,v.err.msg,kY(t,o-l.length+v.err.line));if(!0===i)return kG("InvalidXml","Multiple possible root nodes found.",kY(t,o));-1!==e.unpairedTags.indexOf(u)||r.push({tagName:u,tagStartPos:a}),n=!0}for(o++;o0)||kG("InvalidXml","Invalid '"+JSON.stringify(r.map(function(t){return t.tagName}),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):kG("InvalidXml","Start tag expected.",1)};var k$=RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function kW(t,e){for(var r=em(t,k$),n={},i=0;i0?this.child.push((xq(e={},t.tagname,t.child),xq(e,":@",t[":@"]),e)):this.child.push(xq({},t.tagname,t.child))}}]),t}();var k0={};function k1(t,e){return"!"===t[e+1]&&"-"===t[e+2]&&"-"===t[e+3]}k0=function(t,e){var r={};if("O"===t[e+3]&&"C"===t[e+4]&&"T"===t[e+5]&&"Y"===t[e+6]&&"P"===t[e+7]&&"E"===t[e+8]){e+=9;for(var n,i,o,a,s,u,c,l,f,h=1,d=!1,p=!1;e"===t[e]){if(p?"-"===t[e-1]&&"-"===t[e-2]&&(p=!1,h--):h--,0===h)break}else"["===t[e]?d=!0:t[e]}else{if(d&&"!"===(n=t)[(i=e)+1]&&"E"===n[i+2]&&"N"===n[i+3]&&"T"===n[i+4]&&"I"===n[i+5]&&"T"===n[i+6]&&"Y"===n[i+7])e+=7,entityName=(f=EZ(function(t,e){for(var r="";e1&&void 0!==arguments[1]?arguments[1]:{};if(r=Object.assign({},k8,r),!t||"string"!=typeof t)return t;var n=t.trim();if(void 0!==r.skipLike&&r.skipLike.test(n))return t;if(r.hex&&k3.test(n))return Number.parseInt(n,16);var i=k5.exec(n);if(!i)return t;var o=i[1],a=i[2],s=((e=i[3])&&-1!==e.indexOf(".")&&("."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1))),e),u=i[4]||i[6];if(!r.leadingZeros&&a.length>0&&o&&"."!==n[2]||!r.leadingZeros&&a.length>0&&!o&&"."!==n[1])return t;var c=Number(n),l=""+c;return -1!==l.search(/[eE]/)||u?r.eNotation?c:t:-1!==n.indexOf(".")?"0"===l&&""===s?c:l===s?c:o&&l==="-"+s?c:t:a?s===l?c:o+s===l?c:t:n===l?c:n===o+l?c:t};var k6={};function k4(t){for(var e=Object.keys(t),r=0;r0)){a||(t=this.replaceEntitiesValue(t));var s=this.options.tagValueProcessor(e,t,r,i,o);return null==s?t:(void 0===s?"undefined":(0,e_._)(s))!==(void 0===t?"undefined":(0,e_._)(t))||s!==t?s:this.options.trimValues?Al(t,this.options.parseTagValue,this.options.numberParseOptions):t.trim()===t?Al(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function k7(t){if(this.options.removeNSPrefix){var e=t.split(":"),r="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=r+e[1])}return t}k6=function(t){return"function"==typeof t?t:Array.isArray(t)?function(e){var r=!0,n=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){var s=o.value;if("string"==typeof s&&e===s||s instanceof RegExp&&s.test(e))return!0}}catch(t){n=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}}:function(){return!1}};var At=RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function Ae(t,e,r){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){for(var n=em(t,At),i=n.length,o={},a=0;a",o,"Closing Tag is not closed."),s=t.substring(o+2,a).trim();if(this.options.removeNSPrefix){var u=s.indexOf(":");-1!==u&&(s=s.substr(u+1))}this.options.transformTagName&&(s=this.options.transformTagName(s)),r&&(n=this.saveTextToParentTag(n,r,i));var c=i.substring(i.lastIndexOf(".")+1);if(s&&-1!==this.options.unpairedTags.indexOf(s))throw Error("Unpaired tag can not be used as closing tag: "));var l=0;c&&-1!==this.options.unpairedTags.indexOf(c)?(l=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=i.lastIndexOf("."),i=i.substring(0,l),r=this.tagsNodeStack.pop(),n="",o=a}else if("?"===t[o+1]){var f=Au(t,o,!1,"?>");if(!f)throw Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,i),this.options.ignoreDeclaration&&"?xml"===f.tagName||this.options.ignorePiTags);else{var h=new kX(f.tagName);h.add(this.options.textNodeName,""),f.tagName!==f.tagExp&&f.attrExpPresent&&(h[":@"]=this.buildAttributesMap(f.tagExp,i,f.tagName)),this.addChild(r,h,i)}o=f.closeIndex+1}else if("!--"===t.substr(o+1,3)){var d=As(t,"-->",o+4,"Comment is not closed.");if(this.options.commentPropName){var p=t.substring(o+4,d-2);n=this.saveTextToParentTag(n,r,i),r.add(this.options.commentPropName,[xq({},this.options.textNodeName,p)])}o=d}else if("!D"===t.substr(o+1,2)){var v=k0(t,o);this.docTypeEntities=v.entities,o=v.i}else if("!["===t.substr(o+1,2)){var g=As(t,"]]>",o,"CDATA is not closed.")-2,m=t.substring(o+9,g);n=this.saveTextToParentTag(n,r,i);var y=this.parseTextData(m,r.tagname,i,!0,!1,!0,!0);void 0==y&&(y=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[xq({},this.options.textNodeName,m)]):r.add(this.options.textNodeName,y),o=g+2}else{var b=Au(t,o,this.options.removeNSPrefix),w=b.tagName,x=b.rawTagName,S=b.tagExp,E=b.attrExpPresent,k=b.closeIndex;this.options.transformTagName&&(w=this.options.transformTagName(w)),r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,i,!1));var A=r;if(A&&-1!==this.options.unpairedTags.indexOf(A.tagname)&&(r=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),w!==e.tagname&&(i+=i?"."+w:w),this.isItStopNode(this.options.stopNodes,i,w)){var O="";if(S.length>0&&S.lastIndexOf("/")===S.length-1)"/"===w[w.length-1]?(w=w.substr(0,w.length-1),i=i.substr(0,i.length-1),S=w):S=S.substr(0,S.length-1),o=b.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(w))o=b.closeIndex;else{var I=this.readStopNodeData(t,x,k+1);if(!I)throw Error("Unexpected end of ".concat(x));o=I.i,O=I.tagContent}var T=new kX(w);w!==S&&E&&(T[":@"]=this.buildAttributesMap(S,i,w)),O&&(O=this.parseTextData(O,w,i,!0,E,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),T.add(this.options.textNodeName,O),this.addChild(r,T,i)}else{if(S.length>0&&S.lastIndexOf("/")===S.length-1){"/"===w[w.length-1]?(w=w.substr(0,w.length-1),i=i.substr(0,i.length-1),S=w):S=S.substr(0,S.length-1),this.options.transformTagName&&(w=this.options.transformTagName(w));var N=new kX(w);w!==S&&E&&(N[":@"]=this.buildAttributesMap(S,i,w)),this.addChild(r,N,i),i=i.substr(0,i.lastIndexOf("."))}else{var _=new kX(w);this.tagsNodeStack.push(r),w!==S&&E&&(_[":@"]=this.buildAttributesMap(S,i,w)),this.addChild(r,_,i),r=_}n="",o=k}}}else n+=t[o];return e.child};function An(t,e,r){var n=this.options.updateTag(e.tagname,r,e[":@"]);!1===n||("string"==typeof n&&(e.tagname=n),t.addChild(e))}var Ai=function(t){if(this.options.processEntities){for(var e in this.docTypeEntities){var r=this.docTypeEntities[e];t=t.replace(r.regx,r.val)}for(var n in this.lastEntities){var i=this.lastEntities[n];t=t.replace(i.regex,i.val)}if(this.options.htmlEntities)for(var o in this.htmlEntities){var a=this.htmlEntities[o];t=t.replace(a.regex,a.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function Ao(t,e,r,n){return t&&(void 0===n&&(n=0===Object.keys(e.child).length),void 0!==(t=this.parseTextData(t,e.tagname,r,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,n))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function Aa(t,e,r){var n="*."+r;for(var i in t){var o=t[i];if(n===o||e===o)return!0}return!1}function As(t,e,r,n){var i=t.indexOf(e,r);if(-1!==i)return i+e.length-1;throw Error(n)}function Au(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:">",i=function(t,e){for(var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:">",i="",o=e;o",r,"".concat(e," is not closed"));if(t.substring(r+2,o).trim()===e&&0==--i)return{tagContent:t.substring(n,r),i:o};r=o}else if("?"===t[r+1])r=As(t,"?>",r+1,"StopNode is not closed.");else if("!--"===t.substr(r+1,3))r=As(t,"-->",r+3,"StopNode is not closed.");else if("!["===t.substr(r+1,2))r=As(t,"]]>",r,"StopNode is not closed.")-2;else{var a=Au(t,r,">");a&&((a&&a.tagName)===e&&"/"!==a.tagExp[a.tagExp.length-1]&&i++,r=a.closeIndex)}}}function Al(t,e,r){if(e&&"string"==typeof t){var n=t.trim();return"true"===n||"false"!==n&&k2(t,r)}return ev(t)?t:""}kZ=function t(e){xi(this,t),this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:function(t,e){return String.fromCharCode(Number.parseInt(e,10))}},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:function(t,e){return String.fromCharCode(Number.parseInt(e,16))}}},this.addExternalEntities=k4,this.parseXml=Ar,this.parseTextData=k9,this.resolveNameSpace=k7,this.buildAttributesMap=Ae,this.isItStopNode=Aa,this.replaceEntitiesValue=Ai,this.readStopNodeData=Ac,this.saveTextToParentTag=Ao,this.addChild=An,this.ignoreAttributesFn=k6(this.options.ignoreAttributes)},eb=function(t,e){return function t(e,r,n){for(var i,o={},a=0;a0&&(o[r.textNodeName]=i):void 0!==i&&(o[r.textNodeName]=i),o}(t,e)},kJ=/*#__PURE__*/function(){function t(e){xi(this,t),this.externalEntities={},this.options=ey(e)}return xa(t,[{key:"parse",value:function(t,e){if("string"==typeof t);else if(t.toString)t=t.toString();else throw Error("XML data is accepted in String or Bytes[] form.");if(e){!0===e&&(e={});var r=ep(t,e);if(!0!==r)throw Error("".concat(r.err.msg,":").concat(r.err.line,":").concat(r.err.col))}var n=new kZ(this.options);n.addExternalEntities(this.externalEntities);var i=n.parseXml(t);return this.options.preserveOrder||void 0===i?i:eb(i,this.options)}},{key:"addEntity",value:function(t,e){if(-1!==e.indexOf("&"))throw Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");if("&"===e)throw Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}}]),t}();var Af={};function Ah(t,e){var r="";if(t&&!e.ignoreAttributes){for(var n in t)if(t.hasOwnProperty(n)){var i=e.attributeValueProcessor(n,t[n]);!0===(i=Ad(i,e))&&e.suppressBooleanAttributes?r+=" ".concat(n.substr(e.attributeNamePrefix.length)):r+=" ".concat(n.substr(e.attributeNamePrefix.length),'="').concat(i,'"')}}return r}function Ad(t,e){if(t&&t.length>0&&e.processEntities)for(var r=0;r0&&(r="\n"),function t(e,r,n,i){for(var o="",a=!1,s=0;s"),a=!1;continue}if(c===r.commentPropName){o+=i+""),a=!0;continue}if("?"===c[0]){var h=Ah(u[":@"],r),d="?xml"===c?"":i,p=u[c][0][r.textNodeName];p=0!==p.length?" "+p:"",o+=d+"<".concat(c).concat(p).concat(h,"?>"),a=!0;continue}var v=i;""!==v&&(v+=r.indentBy);var g=Ah(u[":@"],r),m=i+"<".concat(c).concat(g),y=t(u[c],r,l,v);-1!==r.unpairedTags.indexOf(c)?r.suppressUnpairedNode?o+=m+">":o+=m+"/>":(!y||0===y.length)&&r.suppressEmptyNode?o+=m+"/>":y&&y.endsWith(">")?o+=m+">".concat(y).concat(i,""):(o+=m+">",y&&""!==i&&(y.includes("/>")||y.includes("")),a=!0}}return o}(t,e,"",r)};var Ap={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:RegExp("&","g"),val:"&"},{regex:RegExp(">","g"),val:">"},{regex:RegExp("<","g"),val:"<"},{regex:RegExp("'","g"),val:"'"},{regex:RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Av(t){this.options=Object.assign({},Ap,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=k6(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Ay),this.processTextOrObjNode=Ag,this.options.format?(this.indentate=Am,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function Ag(t,e,r,n){var i=this.j2x(t,r+1,n.concat(e));return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,i.attrStr,r):this.buildObjectNode(i.val,e,i.attrStr,r)}function Am(t){return this.options.indentBy.repeat(t)}function Ay(t){return!!t.startsWith(this.options.attributeNamePrefix)&&t!==this.options.textNodeName&&t.substr(this.attrPrefixLen)}Av.prototype.build=function(t){return this.options.preserveOrder?Af(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t=xq({},this.options.arrayNodeName,t)),this.j2x(t,0,[]).val)},Av.prototype.j2x=function(t,e,r){var n="",i="",o=r.join(".");for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){if(void 0===t[a])this.isAttribute(a)&&(i+="");else if(null===t[a])this.isAttribute(a)?i+="":"?"===a[0]?i+=this.indentate(e)+"<"+a+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+a+"/"+this.tagEndChar;else if(t[a]instanceof Date)i+=this.buildTextValNode(t[a],a,"",e);else if("object"!=typeof t[a]){var s=this.isAttribute(a);if(s&&!this.ignoreAttributesFn(s,o))n+=this.buildAttrPairStr(s,""+t[a]);else if(!s){if(a===this.options.textNodeName){var u=this.options.tagValueProcessor(a,""+t[a]);i+=this.replaceEntitiesValue(u)}else i+=this.buildTextValNode(t[a],a,"",e)}}else if(Array.isArray(t[a])){for(var c=t[a].length,l="",f="",h=0;h"+t+i:!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===o.length?this.indentate(n)+"")+this.newLine:this.indentate(n)+"<"+e+r+o+this.tagEndChar+t+this.indentate(n)+i},Av.prototype.closeTag=function(t){var e="";return -1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":">")+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(n)+"")+this.newLine;if("?"===e[0])return this.indentate(n)+"<"+e+r+"?"+this.tagEndChar;var i=this.options.tagValueProcessor(e,t);return""===(i=this.replaceEntitiesValue(i))?this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+r+">"+i+"0&&this.options.processEntities)for(var e=0;eMath.abs(o)?Math.abs(i)>l&&d0?"swiped-left":"swiped-right"):Math.abs(o)>l&&d0?"swiped-up":"swiped-down"),""!==p){var g={dir:p.replace(/swiped-/,""),touchType:(v[0]||{}).touchType||"direct",fingers:u,xStart:parseInt(r,10),xEnd:parseInt((v[0]||{}).clientX||-1,10),yStart:parseInt(n,10),yEnd:parseInt((v[0]||{}).clientY||-1,10)};s.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:g})),s.dispatchEvent(new CustomEvent(p,{bubbles:!0,cancelable:!0,detail:g}))}r=null,n=null,a=null}},!1);var r=null,n=null,i=null,o=null,a=null,s=null,u=0;function c(t,r,n){for(;t&&t!==e.documentElement;){var i=t.getAttribute(r);if(i)return i;t=t.parentNode}return n}}(window,document);var e_=ek("bbrsO"),Ax=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,r,n,o){var a,s,u=Object.create((r&&r.prototype instanceof g?r:g).prototype);return i(u,"_invoke",{value:(a=new I(o||[]),s=h,function(r,i){if(s===d)throw Error("Generator is already running");if(s===p){if("throw"===r)throw i;return{value:e,done:!0}}for(a.method=r,a.arg=i;;){var o=a.delegate;if(o){var u=function t(r,n){var i=n.method,o=r.iterator[i];if(o===e)return n.delegate=null,"throw"===i&&r.iterator.return&&(n.method="return",n.arg=e,t(r,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=TypeError("The iterator does not provide a '"+i+"' method")),v;var a=f(o,r.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var s=a.arg;return s?s.done?(n[r.resultName]=s.value,n.next=r.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):s:(n.method="throw",n.arg=TypeError("iterator result is not an object"),n.delegate=null,v)}(o,a);if(u){if(u===v)continue;return u}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(s===h)throw s=p,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s=d;var c=f(t,n,a);if("normal"===c.type){if(s=a.done?p:"suspendedYield",c.arg===v)continue;return{value:c.arg,done:a.done}}"throw"===c.type&&(s=p,a.method="throw",a.arg=c.arg)}})}),u}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var h="suspendedStart",d="executing",p="completed",v={};function g(){}function m(){}function y(){}var b={};c(b,a,function(){return this});var w=Object.getPrototypeOf,x=w&&w(w(T([])));x&&x!==r&&n.call(x,a)&&(b=x);var S=y.prototype=g.prototype=Object.create(b);function E(t){["next","throw","return"].forEach(function(e){c(t,e,function(t){return this._invoke(e,t)})})}function k(t,e){var r;i(this,"_invoke",{value:function(i,o){function a(){return new e(function(r,a){!function r(i,o,a,s){var u=f(t[i],t,o);if("throw"===u.type)s(u.arg);else{var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then(function(t){r("next",t,a,s)},function(t){r("throw",t,a,s)}):e.resolve(l).then(function(t){c.value=t,a(c)},function(t){return r("throw",t,a,s)})}}(i,o,r,a)})}return r=r?r.then(a,a):a()}})}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function T(t){if(null!=t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;O(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}({});try{regeneratorRuntime=Ax}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=Ax:Function("r","regeneratorRuntime = r")(Ax)}/*@__PURE__*/e(kM).extend(/*@__PURE__*/e(kD));var AS=new BroadcastChannel("sw-messages"),AE=new/*@__PURE__*/(e(kB)).XMLParser({ignoreAttributes:!1,parseAttributeValue:!0}),Ak={};Ak=ek("e6gnT").getBundleURL("3BHab")+"sw.js";try{navigator.serviceWorker.register(Ak).then(function(t){console.log("Service Worker registered successfully."),t.waiting&&(console.log("A waiting Service Worker is already in place."),t.update()),"b2g"in navigator&&(t.systemMessageManager?t.systemMessageManager.subscribe("activity").then(function(){console.log("Subscribed to general activity.")},function(t){alert("Error subscribing to activity:",t)}):alert("systemMessageManager is not available."))}).catch(function(t){alert("Service Worker registration failed:",t)})}catch(t){alert("Error during Service Worker setup:",t)}var AA={visibility:!0,deviceOnline:!0,notKaiOS:!0,os:(ta=navigator.userAgent||navigator.vendor||window.opera,/iPad|iPhone|iPod/.test(ta)&&!window.MSStream?"iOS":!!/android/i.test(ta)&&"Android"),debug:!1,local_opml:[]},AO=navigator.userAgent||"";AO&&AO.includes("KAIOS")&&(AA.notKaiOS=!1);var AI="",AT={opml_url:"https://raw.githubusercontent.com/strukturart/feedolin/master/example.opml",opml_local:"",proxy_url:"https://api.cors.lol/?url=",cache_time:36e5},AN=[],A_={},AC=[],AP=[];/*@__PURE__*/e(w8).getItem("read_articles").then(function(t){if(null===t)return AP=[],/*@__PURE__*/e(w8).setItem("read_articles",AP).then(function(){});AP=t}).catch(function(t){console.error("Error accessing localForage:",t)});var AR=function(){/*@__PURE__*/e(w8).setItem("last_channel_filter",AZ).then(function(){AK()})};function AL(t){var r=[];AD.map(function(t,e){r.push(t.id)}),(AP=AP.filter(function(e){return r.includes(t)})).push(t),/*@__PURE__*/e(w8).setItem("read_articles",AP).then(function(){}).catch(function(t){console.error("Error updating localForage:",t)})}var AM=new DOMParser;AA.notKaiOS||["http://127.0.0.1/api/v1/shared/core.js","http://127.0.0.1/api/v1/shared/session.js","http://127.0.0.1/api/v1/apps/service.js","http://127.0.0.1/api/v1/audiovolumemanager/service.js","./assets/js/kaiads.v5.min.js"].forEach(function(t){var e=document.createElement("script");e.type="text/javascript",e.src=t,document.head.appendChild(e)});var AD=[];AA.debug&&(window.onerror=function(t,e,r){return alert("Error message: "+t+"\nURL: "+e+"\nLine Number: "+r),!0});var AB=function(){/*@__PURE__*/e(w8).getItem("settings").then(function(t){A_=t;var r=new URLSearchParams(window.location.href.split("?")[1]).get("code");if(r){var n=r.split("#")[0];if(r){/*@__PURE__*/e(w8).setItem("mastodon_code",n);var i=new Headers;i.append("Content-Type","application/x-www-form-urlencoded");var o=new URLSearchParams;o.append("code",n),o.append("scope","read"),o.append("grant_type","authorization_code"),o.append("redirect_uri","https://feedolin.strukturart.com"),o.append("client_id","HqIUbDiOkeIoDPoOJNLQOgVyPi1ZOkPMW29UVkhl3i8"),o.append("client_secret","R_9DvQ5V84yZQg3BEdDHjz5uGQGUN4qrPx9YgmrJ81Q"),fetch(A_.mastodon_server_url+"/oauth/token",{method:"POST",headers:i,body:o,redirect:"follow"}).then(function(t){return t.json()}).then(function(t){A_.mastodon_token=t.access_token,/*@__PURE__*/e(w8).setItem("settings",A_),/*@__PURE__*/e(w6).route.set("/start?index=0"),wX("Successfully connected",1e4)}).catch(function(t){console.error("Error:",t),wX("Connection failed")})}}})};function Aj(t){for(var e=0,r=0;r=200&&r.status<300?(wX("Data loaded successfully",3e3),A$(r.responseText)):Az(r.status)},r.onerror=function(){AH()},r.send()},Az=function(t){console.error("HTTP Error: Status ".concat(t)),wX("OPML file not reachable",4e3),/*@__PURE__*/e(w6).route.get().startsWith("/intro")&&/*@__PURE__*/e(w6).route.set("/start")},AH=function(){console.error("Network error occurred during the request."),wX("OPML file not reachable",3e3),/*@__PURE__*/e(w6).route.get().startsWith("/intro")&&/*@__PURE__*/e(w6).route.set("/start")},A$=(tu=eI(function(t){var r,n;return(0,eT.__generator)(this,function(i){switch(i.label){case 0:if(!t)return[3,7];if((n=AW(t)).error)return wX(n.error,3e3),[2,!1];if(!((r=n.downloadList).length>0))return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,AG(r)];case 2:return i.sent(),A_.last_update=new Date,/*@__PURE__*/e(w8).setItem("settings",A_),[3,4];case 3:return console.log(i.sent()),[3,4];case 4:return[3,6];case 5:alert("Generated download list is empty."),i.label=6;case 6:return[3,8];case 7:console.error("No OPML content found."),i.label=8;case 8:return[2]}})}),function(t){return tu.apply(this,arguments)}),AW=function(t){var e=AM.parseFromString(t,"text/xml");if(!e||e.getElementsByTagName("parsererror").length>0)return console.error("Invalid OPML data."),{error:"Invalid OPML data",downloadList:[]};var r=e.querySelector("body");if(!r)return console.error("No 'body' element found in the OPML data."),{error:"No 'body' element found",downloadList:[]};var n=0,i=r.querySelectorAll("outline"),o=[];return i.forEach(function(t){t.querySelectorAll("outline").forEach(function(e){var r=e.getAttribute("xmlUrl");r&&o.push({error:"",title:e.getAttribute("title")||"Untitled",url:r,index:n++,channel:t.getAttribute("text")||"Unknown",type:e.getAttribute("type")||"rss",maxEpisodes:e.getAttribute("maxEpisodes")||5})})}),{error:"",downloadList:o}},AG=(tc=eI(function(t){var r,n,i,o,a;return(0,eT.__generator)(this,function(s){return r=0,n=t.length,i=!1,o=function(){AZ=localStorage.getItem("last_channel_filter"),r===n&&(console.log("All feeds are loaded"),/*@__PURE__*/e(w8).setItem("articles",AD).then(function(){AD.sort(function(t,e){return new Date(e.isoDate)-new Date(t.isoDate)}),AD.forEach(function(t){-1===AC.indexOf(t.channel)&&t.channel&&AC.push(t.channel)}),AC.length>0&&!i&&(AZ=localStorage.getItem("last_channel_filter")||AC[0],i=!0),/*@__PURE__*/e(w6).route.set("/start")}).catch(function(t){console.error("Feeds cached",t)}),/*@__PURE__*/e(w6).route.get().startsWith("/intro")&&/*@__PURE__*/e(w6).route.set("/start"))},a=[],t.forEach(function(t){if("mastodon"===t.type)fetch(t.url).then(function(t){return t.json()}).then(function(e){e.forEach(function(e,r){if(!(r>5)){var n={channel:t.channel,id:e.id,type:"mastodon",pubDate:e.created_at,isoDate:e.created_at,title:e.account.display_name||e.account.username,content:e.content,url:e.uri,reblog:!1};e.media_attachments.length>0&&("image"===e.media_attachments[0].type?n.content+="
"):"video"===e.media_attachments[0].type?n.enclosure={"@_type":"video",url:e.media_attachments[0].url}:"audio"===e.media_attachments[0].type&&(n.enclosure={"@_type":"audio",url:e.media_attachments[0].url})),""==e.content&&(n.content=e.reblog.content,n.reblog=!0,n.reblogUser=e.account.display_name||e.reblog.account.acct,e.reblog.media_attachments.length>0&&("image"===e.reblog.media_attachments[0].type?n.content+="
"):"video"===e.reblog.media_attachments[0].type?n.enclosure={"@_type":"video",url:e.reblog.media_attachments[0].url}:"audio"===e.reblog.media_attachments[0].type&&(n.enclosure={"@_type":"audio",url:e.reblog.media_attachments[0].url}))),AD.push(n)}})}).catch(function(e){t.error=e}).finally(function(){r++,o()});else{var n=new XMLHttpRequest({mozSystem:!0});n.timeout=2e3;var i=t.url;AA.notKaiOS?n.open("GET","https://api.cors.lol/?url="+i,!0):n.open("GET",i,!0),n.ontimeout=function(){console.error("Request timed out"),r++,o()},n.onload=function(){if(200!==n.status){t.error=n.status,r++,o();return}var i=n.response;if(!i){t.error=n.status,r++,o();return}try{var s=AE.parse(i);s.feed&&s.feed.entry.forEach(function(r,n){if(n15)){var r={channel:"Mastodon",id:t.id,type:"mastodon",pubDate:t.created_at,isoDate:t.created_at,title:t.account.display_name,content:t.content,url:t.uri,reblog:!1};t.media_attachments.length>0&&("image"===t.media_attachments[0].type?r.content+="
"):"video"===t.media_attachments[0].type?r.enclosure={"@_type":"video",url:t.media_attachments[0].url}:"audio"===t.media_attachments[0].type&&(r.enclosure={"@_type":"audio",url:t.media_attachments[0].url}));try{""==t.content&&(r.content=t.reblog.content,r.reblog=!0,r.reblogUser=t.reblog.account.display_name||t.reblog.account.acct,t.reblog.media_attachments.length>0&&("image"===t.reblog.media_attachments[0].type?r.content+="
"):"video"===t.reblog.media_attachments[0].type?r.enclosure={"@_type":"video",url:t.reblog.media_attachments[0].url}:"audio"===t.reblog.media_attachments[0].type&&(r.enclosure={"@_type":"audio",url:t.reblog.media_attachments[0].url})))}catch(t){console.log(t)}AD.push(r)}}),AC.push("Mastodon"),wX("Logged in as "+AA.mastodon_logged,4e3),/*@__PURE__*/e(w8).setItem("articles",AD).then(function(){console.log("cached")})}),[2]})}),function(){return tl.apply(this,arguments)}),AK=function(){AV(A_.opml_url),A_.opml_local&&A$(A_.opml_local),A_.mastodon_token&&w5(A_.mastodon_server_url,A_.mastodon_token).then(function(t){AA.mastodon_logged=t.display_name,AY()}).catch(function(t){}),AZ=localStorage.getItem("last_channel_filter")};/*@__PURE__*/e(w8).getItem("settings").then(function(t){null==t&&(A_=AT,/*@__PURE__*/e(w8).setItem("settings",A_).then(function(t){}).catch(function(t){console.log(t)})),(A_=t).cache_time=A_.cache_time||36e5,A_.last_update?AA.last_update_duration=new Date/1e3-A_.last_update/1e3:AA.last_update_duration=3600,A_.opml_url||A_.opml_local_filename||(wX("The feed could not be loaded because no OPML was defined in the settings.",6e3),A_=AT,/*@__PURE__*/e(w8).setItem("settings",A_).then(function(t){}).catch(function(t){})),Aq().then(function(t){t&&AA.last_update_duration>A_.cache_time?(AK(),wX("Load feeds",4e3)):/*@__PURE__*/e(w8).getItem("articles").then(function(t){(AD=t).sort(function(t,e){return new Date(e.isoDate)-new Date(t.isoDate)}),AD.forEach(function(t){-1===AC.indexOf(t.channel)&&t.channel&&AC.push(t.channel)}),AC.length&&(AZ=localStorage.getItem("last_channel_filter")||AC[0]),/*@__PURE__*/e(w6).route.set("/start?index=0"),document.querySelector("body").classList.add("cache"),wX("Cached feeds loaded",4e3),A_.mastodon_token&&w5(A_.mastodon_server_url,A_.mastodon_token).then(function(t){AA.mastodon_logged=t.display_name}).catch(function(t){})}).catch(function(t){})})}).catch(function(t){wX("The default settings was loaded",3e3),AV((A_=AT).opml_url),/*@__PURE__*/e(w8).setItem("settings",A_).then(function(t){}).catch(function(t){console.log(t)})});var AJ=document.getElementById("app"),AQ=-1,AZ=localStorage.getItem("last_channel_filter")||"",AX=0,A0=function(t){return /*@__PURE__*/e(kM).duration(t,"seconds").format("mm:ss")},A1={videoElement:null,videoDuration:0,currentTime:0,isPlaying:!1,seekAmount:5,oncreate:function(t){var r=t.attrs;AA.notKaiOS&&w2("","",""),A1.videoElement=document.createElement("video"),document.getElementById("video-container").appendChild(A1.videoElement);var n=r.url;n&&(A1.videoElement.src=n,A1.videoElement.play(),A1.isPlaying=!0),A1.videoElement.onloadedmetadata=function(){A1.videoDuration=A1.videoElement.duration,/*@__PURE__*/e(w6).redraw()},A1.videoElement.ontimeupdate=function(){A1.currentTime=A1.videoElement.currentTime,/*@__PURE__*/e(w6).redraw()},document.addEventListener("keydown",A1.handleKeydown)},onremove:function(){document.removeEventListener("keydown",A1.handleKeydown)},handleKeydown:function(t){"Enter"===t.key?A1.togglePlayPause():"ArrowLeft"===t.key?A1.seek("left"):"ArrowRight"===t.key&&A1.seek("right")},togglePlayPause:function(){A1.isPlaying?A1.videoElement.pause():A1.videoElement.play(),A1.isPlaying=!A1.isPlaying},seek:function(t){var e=A1.videoElement.currentTime;"left"===t?A1.videoElement.currentTime=Math.max(0,e-A1.seekAmount):"right"===t&&(A1.videoElement.currentTime=Math.min(A1.videoDuration,e+A1.seekAmount))},view:function(t){t.attrs;var r=A1.videoDuration>0?A1.currentTime/A1.videoDuration*100:0;return /*@__PURE__*/e(w6)("div",{class:"video-player"},[/*@__PURE__*/e(w6)("div",{id:"video-container",class:"video-container"}),/*@__PURE__*/e(w6)("div",{class:"video-info"},[" ".concat(A0(A1.currentTime)," / ").concat(A0(A1.videoDuration))]),/*@__PURE__*/e(w6)("div",{class:"progress-bar-container"},[/*@__PURE__*/e(w6)("div",{class:"progress-bar",style:{width:"".concat(r,"%")}})])])}},A2={player:null,oncreate:function(t){var e=t.attrs;AA.notKaiOS&&w2("","",""),w1("","",""),YT?A2.player=new YT.Player("video-container",{videoId:e.videoId,events:{onReady:A2.onPlayerReady}}):alert("YouTube player not loaded"),document.addEventListener("keydown",A2.handleKeydown)},onPlayerReady:function(t){t.target.playVideo()},handleKeydown:function(t){"Enter"===t.key?A2.togglePlayPause():"ArrowLeft"===t.key?A2.seek("left"):"ArrowRight"===t.key&&A2.seek("right")},togglePlayPause:function(){1===A2.player.getPlayerState()?A2.player.pauseVideo():A2.player.playVideo()},seek:function(t){var e=A2.player.getCurrentTime();"left"===t?A2.player.seekTo(Math.max(0,e-5),!0):"right"===t&&A2.player.seekTo(e+5,!0)},view:function(){return /*@__PURE__*/e(w6)("div",{class:"youtube-player"},[/*@__PURE__*/e(w6)("div",{id:"video-container",class:"video-container"})])}},A3=document.createElement("audio");if(A3.preload="auto",A3.src="","b2g"in navigator)try{A3.mozAudioChannelType="content",navigator.b2g.AudioChannelManager&&(navigator.b2g.AudioChannelManager.volumeControlChannel="content")}catch(t){console.log(t)}navigator.mozAlarms&&(A3.mozAudioChannelType="content");var A5=[];try{/*@__PURE__*/e(w8).getItem("hasPlayedAudio").then(function(t){A5=t||[]})}catch(t){console.error("Failed to load hasPlayedAudio:",t)}var A8=(tf=eI(function(t,r,n){var i;return(0,eT.__generator)(this,function(o){return -1!==(i=A5.findIndex(function(e){return e.url===t}))?A5[i].time=r:A5.push({url:t,time:r,id:n}),A6(),/*@__PURE__*/e(w8).setItem("hasPlayedAudio",A5).then(function(){}),[2]})}),function(t,e,r){return tf.apply(this,arguments)}),A6=function(){A5=A5.filter(function(t){return AN.includes(t.id)})},A4=0,A9=0,A7=0,Ot=0,Oe=!1,Or=null,On={audioDuration:0,currentTime:0,isPlaying:!1,seekAmount:5,oninit:function(t){var r=t.attrs;if(r.url&&A3.src!==r.url)try{A3.src=r.url,A3.play().catch(function(t){alert(t)}),On.isPlaying=!0,A5.map(function(t){t.url===A3.src&&!0==confirm("continue playing ?")&&(A3.currentTime=t.time)})}catch(t){A3.src=r.url}A3.onloadedmetadata=function(){On.audioDuration=A3.duration,/*@__PURE__*/e(w6).redraw()},A3.ontimeupdate=function(){On.currentTime=A3.currentTime,A8(A3.src,A3.currentTime,r.id),AA.player=!0,/*@__PURE__*/e(w6).redraw()},On.isPlaying=!A3.paused,document.addEventListener("keydown",On.handleKeydown)},oncreate:function(){var t=function(t){Or||(On.seek(t),Or=setInterval(function(){On.seek(t),document.querySelector(".audio-info").style.padding="20px"},1e3))},e=function(){Or&&(clearInterval(Or),Or=null,document.querySelector(".audio-info").style.padding="10px")};w2("","",""),w1("","",""),A_.sleepTimer&&(w1("","",""),document.querySelector("div.button-left").addEventListener("click",function(){AA.sleepTimer?Of():Ol(6e4*A_.sleepTimer)})),AA.notKaiOS&&w2("","",""),document.querySelector("div.button-center").addEventListener("click",function(t){On.togglePlayPause()}),AA.notKaiOS&&(document.addEventListener("touchstart",function(t){var e=t.touches[0];A4=e.clientX,A9=e.clientY}),document.addEventListener("touchmove",function(e){var r=e.touches[0];A7=r.clientX,Ot=r.clientY;var n=A7-A4,i=Ot-A9;Math.abs(n)>Math.abs(i)?n>30?(t("right"),Oe=!0):n<-30&&(t("left"),Oe=!0):i>30?console.log("Swiping down (not used in this context)"):i<-30&&console.log("Swiping up (not used in this context)")}),document.addEventListener("touchend",function(){Oe&&(Oe=!1,e())}))},onremove:function(){document.removeEventListener("keydown",On.handleKeydown)},handleKeydown:function(t){"Enter"===t.key?On.togglePlayPause():"ArrowLeft"===t.key?On.seek("left"):"ArrowRight"===t.key&&On.seek("right")},togglePlayPause:function(){On.isPlaying?A3.pause():A3.play().catch(function(){}),On.isPlaying=!On.isPlaying},seek:function(t){var e=A3.currentTime;"left"===t?A3.currentTime=Math.max(0,e-On.seekAmount):"right"===t&&(A3.currentTime=Math.min(On.audioDuration,e+On.seekAmount))},view:function(t){t.attrs;var r=On.audioDuration>0?On.currentTime/On.audioDuration*100:0;return /*@__PURE__*/e(w6)("div",{class:"audio-player"},[/*@__PURE__*/e(w6)("div",{id:"audio-container",class:"audio-container"}),/*@__PURE__*/e(w6)("div",{class:"cover-container",style:{"background-color":"rgb(121, 71, 255)","background-image":"url(".concat(AI.cover,")")}}),/*@__PURE__*/e(w6)("div",{class:"audio-info",style:{background:"linear-gradient(to right, #3498db ".concat(r,"%, white ").concat(r,"%)")}},["".concat(A0(On.currentTime)," / ").concat(A0(On.audioDuration))]),/*@__PURE__*/e(w6)("div",{class:"progress-bar-container"},[/*@__PURE__*/e(w6)("div",{class:"progress-bar",style:{width:"".concat(r,"%")}})])])}};function Oi(){var t=document.activeElement;if(t){for(var e=t.getBoundingClientRect(),r=e.top+e.height/2,n=t.parentNode;n;){if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth){var i=n.getBoundingClientRect();r=e.top-i.top+e.height/2;break}n=n.parentNode}n?n.scrollBy({left:0,top:r-n.clientHeight/2,behavior:"smooth"}):document.body.scrollBy({left:0,top:r-window.innerHeight/2,behavior:"smooth"})}}/*@__PURE__*/e(w6).route(AJ,"/intro",{"/article":{view:function(){var t=AD.find(function(t){return /*@__PURE__*/e(w6).route.param("index")==t.id&&(AI=t,!0)});return /*@__PURE__*/e(w6)("div",{id:"article",class:"page",oncreate:function(){AA.notKaiOS&&w2("","",""),w1("","","")}},t?/*@__PURE__*/e(w6)("article",{class:"item",tabindex:0,oncreate:function(e){e.dom.focus(),("audio"===t.type||"video"===t.type||"youtube"===t.type)&&w1("","","")}},[/*@__PURE__*/e(w6)("time",{id:"top",oncreate:function(){setTimeout(function(){document.querySelector("#top").scrollIntoView()},1e3)}},/*@__PURE__*/e(kM)(t.isoDate).format("DD MMM YYYY")),/*@__PURE__*/e(w6)("h2",{class:"article-title",oncreate:function(e){var r=e.dom;t.reblog&&r.classList.add("reblog")}},t.title),/*@__PURE__*/e(w6)("div",{class:"text"},[/*@__PURE__*/e(w6).trust(AF(t.content))]),t.reblog?/*@__PURE__*/e(w6)("div",{class:"text"},"reblogged from:"+t.reblogUser):""]):/*@__PURE__*/e(w6)("div","Article not found"))}},"/settingsView":{view:function(){return /*@__PURE__*/e(w6)("div",{class:"flex justify-content-center page",id:"settings-page",oncreate:function(){AA.notKaiOS||(AA.local_opml=[],wG("opml",function(t){AA.local_opml.push(t)})),w1("","",""),AA.notKaiOS&&w1("","",""),document.querySelectorAll(".item").forEach(function(t,e){t.setAttribute("tabindex",e)}),AA.notKaiOS&&w2("","",""),AA.notKaiOS&&w1("","","")}},[/*@__PURE__*/e(w6)("div",{class:"item input-parent flex",oncreate:function(){Oo()}},[/*@__PURE__*/e(w6)("label",{for:"url-opml"},"OPML"),/*@__PURE__*/e(w6)("input",{id:"url-opml",placeholder:"",value:A_.opml_url||"",type:"url"})]),/*@__PURE__*/e(w6)("button",{class:"item",onclick:function(){A_.opml_local_filename?(A_.opml_local="",A_.opml_local_filename="",/*@__PURE__*/e(w8).setItem("settings",A_).then(function(){wX("OPML file removed",4e3),/*@__PURE__*/e(w6).redraw()})):AA.notKaiOS?w3(function(t){var r=new FileReader;r.onload=function(){AW(r.result).error?wX("OPML file not valid",4e3):(A_.opml_local=r.result,A_.opml_local_filename=t.filename,/*@__PURE__*/e(w8).setItem("settings",A_).then(function(){wX("OPML file added",4e3)}))},r.onerror=function(){wX("OPML file not valid",4e3)},r.readAsText(t.blob)}):AA.local_opml.length>0?/*@__PURE__*/e(w6).route.set("/localOPML"):wX("no OPML file found",3e3)}},A_.opml_local_filename?"Remove OPML file":"Upload OPML file"),/*@__PURE__*/e(w6)("div",A_.opml_local_filename),/*@__PURE__*/e(w6)("div",{class:"seperation"}),AA.notKaiOS?/*@__PURE__*/e(w6)("div",{class:"item input-parent flex "},[/*@__PURE__*/e(w6)("label",{for:"url-proxy"},"PROXY"),/*@__PURE__*/e(w6)("input",{id:"url-proxy",placeholder:"",value:A_.proxy_url||"",type:"url"})]):null,/*@__PURE__*/e(w6)("div",{class:"seperation"}),/*@__PURE__*/e(w6)("h2",{class:"flex justify-content-spacearound"},"Mastodon Account"),AA.mastodon_logged?/*@__PURE__*/e(w6)("div",{id:"account_info",class:"item"},"You have successfully logged in as ".concat(AA.mastodon_logged," and the data is being loaded from server ").concat(A_.mastodon_server_url,".")):null,AA.mastodon_logged?/*@__PURE__*/e(w6)("button",{class:"item",onclick:function(){A_.mastodon_server_url="",A_.mastodon_token="",/*@__PURE__*/e(w8).setItem("settings",A_),AA.mastodon_logged="",/*@__PURE__*/e(w6).route.set("/settingsView")}},"Disconnect"):null,AA.mastodon_logged?null:/*@__PURE__*/e(w6)("div",{class:"item input-parent flex justify-content-spacearound"},[/*@__PURE__*/e(w6)("label",{for:"mastodon-server-url"},"URL"),/*@__PURE__*/e(w6)("input",{id:"mastodon-server-url",placeholder:"Server URL",value:A_.mastodon_server_url})]),AA.mastodon_logged?null:/*@__PURE__*/e(w6)("button",{class:"item",onclick:function(){/*@__PURE__*/e(w8).setItem("settings",A_),A_.mastodon_server_url=document.getElementById("mastodon-server-url").value;var t=A_.mastodon_server_url+"/oauth/authorize?client_id=HqIUbDiOkeIoDPoOJNLQOgVyPi1ZOkPMW29UVkhl3i8&scope=read&redirect_uri=https://feedolin.strukturart.com&response_type=code";window.open(t)}},"Connect"),/*@__PURE__*/e(w6)("div",{class:"seperation"}),/*@__PURE__*/e(w6)("div",{class:"item input-parent"},[/*@__PURE__*/e(w6)("label",{for:"sleep-timer"},"Sleep timer"),/*@__PURE__*/e(w6)("select",{name:"sleep-timer",class:"select-box",id:"sleep-timer",value:A_.sleepTimer,onchange:function(t){A_.sleepTimer=t.target.value,/*@__PURE__*/e(w6).redraw()}},[/*@__PURE__*/e(w6)("option",{value:"1"},"1"),/*@__PURE__*/e(w6)("option",{value:"5"},"5"),/*@__PURE__*/e(w6)("option",{value:"10"},"10"),/*@__PURE__*/e(w6)("option",{value:"20"},"20"),/*@__PURE__*/e(w6)("option",{value:"30"},"30"),/*@__PURE__*/e(w6)("option",{value:"30"},"40"),/*@__PURE__*/e(w6)("option",{value:"30"},"50"),/*@__PURE__*/e(w6)("option",{value:"30"},"60")])]),/*@__PURE__*/e(w6)("button",{class:"item",id:"button-save-settings",onclick:function(){""==document.getElementById("url-opml").value||(t=document.getElementById("url-opml").value,/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(t))||wX("URL not valid",4e3),A_.opml_url=document.getElementById("url-opml").value,AA.notKaiOS&&(A_.proxy_url=document.getElementById("url-proxy").value);var t,r=document.getElementById("sleep-timer").value;r&&!isNaN(r)&&Number(r)>0?A_.sleepTimer=parseInt(r,10):A_.sleepTimer="",AA.mastodon_logged||(A_.mastodon_server_url=document.getElementById("mastodon-server-url").value),/*@__PURE__*/e(w8).setItem("settings",A_).then(function(){wX("settings saved",2e3)}).catch(function(t){alert(t)})}},"save settings")])}},"/intro":{view:function(){return /*@__PURE__*/e(w6)("div",{class:"width-100 height-100",id:"intro",oninit:function(){AA.notKaiOS&&AB()},onremove:function(){localStorage.setItem("version",AA.version),document.querySelector(".loading-spinner").style.display="none"}},[/*@__PURE__*/e(w6)("img",{src:"./assets/icons/intro.svg",oncreate:function(){document.querySelector(".loading-spinner").style.display="block",wJ(function(t){try{AA.version=t.manifest.version,document.querySelector("#version").textContent=t.manifest.version}catch(t){}("b2g"in navigator||AA.notKaiOS)&&fetch("/manifest.webmanifest").then(function(t){return t.json()}).then(function(t){AA.version=t.b2g_features.version})})}}),/*@__PURE__*/e(w6)("div",{class:"flex width-100 justify-content-center ",id:"version-box"},[/*@__PURE__*/e(w6)("kbd",{id:"version"},localStorage.getItem("version")||0)])])}},"/start":{view:function(){var t=AD.filter(function(t){return""===AZ||AZ===t.channel});return AD.forEach(function(t){AN.push(t.id)}),/*@__PURE__*/e(w6)("div",{id:"start",oncreate:function(){AX=/*@__PURE__*/e(w6).route.param("index")||0,w1("","",""),AA.notKaiOS&&w1("","",""),AA.notKaiOS&&w2("","",""),AA.notKaiOS&&AA.player&&w2("","","")}},/*@__PURE__*/e(w6)("span",{class:"channel",oncreate:function(){}},AZ),t.map(function(r,n){var i,o=AP.includes(r.id)?"read":"";return /*@__PURE__*/e(w6)("article",{class:"item ".concat(o),"data-id":r.id,"data-type":r.type,oncreate:function(e){0==AX&&0==n?setTimeout(function(){e.dom.focus()},1200):r.id==AX&&setTimeout(function(){e.dom.focus(),Oi()},1200),n==t.length-1&&setTimeout(function(){document.querySelectorAll(".item").forEach(function(t,e){t.setAttribute("tabindex",e)})},1e3)},onclick:function(){/*@__PURE__*/e(w6).route.set("/article?index="+r.id),AL(r.id)},onkeydown:function(t){"Enter"===t.key&&(/*@__PURE__*/e(w6).route.set("/article?index="+r.id),AL(r.id))}},[/*@__PURE__*/e(w6)("span",{class:"type-indicator"},r.type),/*@__PURE__*/e(w6)("time",/*@__PURE__*/e(kM)(r.isoDate).format("DD MMM YYYY")),/*@__PURE__*/e(w6)("h2",{oncreate:function(t){var e=t.dom;!0===r.reblog&&e.classList.add("reblog")}},AF(r.feed_title)),/*@__PURE__*/e(w6)("h3",AF(r.title)),"mastodon"==r.type?/*@__PURE__*/e(w6)("h3",(i=r.content.substring(0,30),xn(i,{allowedTags:[],allowedAttributes:{}})+"...")):null])}))}},"/options":{view:function(){return /*@__PURE__*/e(w6)("div",{id:"optionsView",class:"flex",oncreate:function(){w2("","",""),AA.notKaiOS&&w2("","",""),w1("","",""),AA.notKaiOS&&w1("","","")}},[/*@__PURE__*/e(w6)("button",{tabindex:0,class:"item",oncreate:function(t){t.dom.focus(),Oi()},onclick:function(){/*@__PURE__*/e(w6).route.set("/about")}},"About"),/*@__PURE__*/e(w6)("button",{tabindex:1,class:"item",onclick:function(){/*@__PURE__*/e(w6).route.set("/settingsView")}},"Settings"),/*@__PURE__*/e(w6)("button",{tabindex:2,class:"item",onclick:function(){/*@__PURE__*/e(w6).route.set("/privacy_policy")}},"Privacy Policy"),/*@__PURE__*/e(w6)("div",{id:"KaiOSads-Wrapper",class:"",oncreate:function(){!1==AA.notKaiOS&&wW()}})])}},"/about":{view:function(){return /*@__PURE__*/e(w6)("div",{class:"page scrollable",oncreate:function(){w1("","","")}},/*@__PURE__*/e(w6)("p","Feedolin is an RSS/Atom reader and podcast player, available for both KaiOS and non-KaiOS users."),/*@__PURE__*/e(w6)("p","It supports connecting a Mastodon account to display articles alongside your RSS/Atom feeds."),/*@__PURE__*/e(w6)("p","The app allows you to listen to audio and watch videos directly if the feed provides the necessary URLs."),/*@__PURE__*/e(w6)("p","The list of subscribed websites and podcasts is managed either locally or via an OPML file from an external source, such as a public link in the cloud."),/*@__PURE__*/e(w6)("p","For non-KaiOS users, local files must be uploaded to the app."),/*@__PURE__*/e(w6)("h4",{style:"margin-top:20px; margin-bottom:10px;"},"Navigation:"),/*@__PURE__*/e(w6)("ul",[/*@__PURE__*/e(w6)("li",/*@__PURE__*/e(w6).trust("Use the up and down arrow keys to navigate between articles.

")),/*@__PURE__*/e(w6)("li",/*@__PURE__*/e(w6).trust("Use the left and right arrow keys to switch between categories.

")),/*@__PURE__*/e(w6)("li",/*@__PURE__*/e(w6).trust("Press Enter to view the content of an article.

")),/*@__PURE__*/e(w6)("li",{oncreate:function(t){AA.notKaiOS||(t.dom.style.display="none")}},/*@__PURE__*/e(w6).trust("Use Alt to access various options.")),/*@__PURE__*/e(w6)("li",{oncreate:function(t){AA.notKaiOS&&(t.dom.style.display="none")}},/*@__PURE__*/e(w6).trust("Use # Volume")),/*@__PURE__*/e(w6)("li",{oncreate:function(t){AA.notKaiOS&&(t.dom.style.display="none")}},/*@__PURE__*/e(w6).trust("Use * Audioplayer

")),/*@__PURE__*/e(w6)("li","Version: "+AA.version)]))}},"/privacy_policy":{view:function(){return /*@__PURE__*/e(w6)("div",{id:"privacy_policy",class:"page scrollable",oncreate:function(){w1("","","")}},[/*@__PURE__*/e(w6)("h1","Privacy Policy for Feedolin"),/*@__PURE__*/e(w6)("p","Feedolin is committed to protecting your privacy. This policy explains how data is handled within the app."),/*@__PURE__*/e(w6)("h2","Data Storage and Collection"),/*@__PURE__*/e(w6)("p",["All data related to your RSS/Atom feeds and Mastodon account is stored ",/*@__PURE__*/e(w6)("strong","locally")," in your device’s browser. Feedolin does ",/*@__PURE__*/e(w6)("strong","not")," collect or store any data on external servers. The following information is stored locally:"]),/*@__PURE__*/e(w6)("ul",[/*@__PURE__*/e(w6)("li","Your subscribed RSS/Atom feeds and podcasts."),/*@__PURE__*/e(w6)("li","OPML files you upload or manage."),/*@__PURE__*/e(w6)("li","Your Mastodon account information and related data.")]),/*@__PURE__*/e(w6)("p","No server-side data storage or collection is performed."),/*@__PURE__*/e(w6)("h2","KaiOS Users"),/*@__PURE__*/e(w6)("p",["If you are using Feedolin on a KaiOS device, the app uses ",/*@__PURE__*/e(w6)("strong","KaiOS Ads"),", which may collect data related to your usage. The data collected by KaiOS Ads is subject to the ",/*@__PURE__*/e(w6)("a",{href:"https://www.kaiostech.com/privacy-policy/",target:"_blank",rel:"noopener noreferrer"},"KaiOS privacy policy"),"."]),/*@__PURE__*/e(w6)("p",["For users on all other platforms, ",/*@__PURE__*/e(w6)("strong","no ads")," are used, and no external data collection occurs."]),/*@__PURE__*/e(w6)("h2","External Sources Responsibility"),/*@__PURE__*/e(w6)("p",["Feedolin enables you to add feeds and connect to external sources such as RSS/Atom feeds, podcasts, and Mastodon accounts. You are ",/*@__PURE__*/e(w6)("strong","solely responsible")," for the sources you choose to trust and subscribe to. Feedolin does not verify or control the content or data provided by these external sources."]),/*@__PURE__*/e(w6)("h2","Third-Party Services"),/*@__PURE__*/e(w6)("p","Feedolin integrates with third-party services such as Mastodon. These services have their own privacy policies, and you should review them to understand how your data is handled."),/*@__PURE__*/e(w6)("h2","Policy Updates"),/*@__PURE__*/e(w6)("p","This Privacy Policy may be updated periodically. Any changes will be communicated through updates to the app."),/*@__PURE__*/e(w6)("p","By using Feedolin, you acknowledge and agree to this Privacy Policy.")])}},"/localOPML":{view:function(){return /*@__PURE__*/e(w6)("div",{class:"flex",id:"index",oncreate:function(){AA.notKaiOS&&w2("","",""),w1("","","")}},AA.local_opml.map(function(t,r){var n=t.split("/");return n=n[n.length-1],/*@__PURE__*/e(w6)("button",{class:"item",tabindex:r,oncreate:function(t){0==r&&t.dom.focus()},onclick:function(){if("b2g"in navigator)try{var r=navigator.b2g.getDeviceStorage("sdcard").get(t);r.onsuccess=function(){var t=new FileReader;t.onload=function(){AW(t.result).error?wX("OPML file not valid",4e3):(A_.opml_local=t.result,A_.opml_local_filename=n,/*@__PURE__*/e(w8).setItem("settings",A_).then(function(){wX("OPML file added",4e3),/*@__PURE__*/e(w6).route.set("/settingsView")}))},t.onerror=function(){wX("OPML file not valid",4e3)},t.readAsText(this.result)},r.onerror=function(t){}}catch(t){}else{var i=navigator.getDeviceStorage("sdcard").get(t);i.onsuccess=function(){var t=new FileReader;t.onload=function(){AW(t.result).error?wX("OPML file not valid",4e3):(A_.opml_local=t.result,A_.opml_local_filename=n,/*@__PURE__*/e(w8).setItem("settings",A_).then(function(){wX("OPML file added",4e3),/*@__PURE__*/e(w6).route.set("/settingsView")}))},t.onerror=function(){wX("OPML file not valid",4e3)},t.readAsText(this.result)},i.onerror=function(t){}}}},n)}))}},"/AudioPlayerView":On,"/VideoPlayerView":A1,"/YouTubePlayerView":A2});var Oo=function(){document.body.scrollTo({left:0,top:0,behavior:"smooth"}),document.documentElement.scrollTo({left:0,top:0,behavior:"smooth"})};document.addEventListener("DOMContentLoaded",function(t){var r,n,i=function(t){if("SELECT"==document.activeElement.nodeName||"date"==document.activeElement.type||"time"==document.activeElement.type||"volume"==AA.window_status)return!1;if(document.activeElement.classList.contains("scroll")){var e=document.querySelector(".scroll");1==t?e.scrollBy({left:0,top:10}):e.scrollBy({left:0,top:-10})}var r=document.activeElement.tabIndex+t,n=0;if(n=document.getElementById("app").querySelectorAll(".item"),document.activeElement.parentNode.classList.contains("input-parent"))return document.activeElement.parentNode.focus(),!0;r<=n.length&&(0,n[r]).focus(),r>=n.length&&(0,n[0]).focus(),Oi()};function o(t){c({key:t})}AA.notKaiOS&&(r=0,document.addEventListener("touchstart",function(t){r=t.touches[0].pageX,document.querySelector("body").style.opacity=1},!1),document.addEventListener("touchmove",function(t){var n=1-Math.min(Math.abs(t.touches[0].pageX-r)/300,1);/*@__PURE__*/e(w6).route.get().startsWith("/article")&&(document.querySelector("body").style.opacity=n)},!1),document.addEventListener("touchend",function(t){document.querySelector("body").style.opacity=1},!1)),document.querySelector("div.button-left").addEventListener("click",function(t){o("SoftLeft")}),document.querySelector("div.button-right").addEventListener("click",function(t){o("SoftRight")}),document.querySelector("div.button-center").addEventListener("click",function(t){o("Enter")}),document.querySelector("#top-bar div div.button-left").addEventListener("click",function(t){o("Backspace")}),document.querySelector("#top-bar div div.button-right").addEventListener("click",function(t){o("*")});var a=!1;document.addEventListener("keydown",function(t){a||("Backspace"==t.key&&"INPUT"!=document.activeElement.tagName&&t.preventDefault(),"EndCall"===t.key&&(t.preventDefault(),window.close()),t.repeat||(u=!1,n=setTimeout(function(){u=!0,"Backspace"===t.key&&window.close()},2e3)),t.repeat&&("Backspace"==t.key&&t.preventDefault(),"Backspace"==t.key&&(u=!1),t.key),a=!0,setTimeout(function(){a=!1},300))});var s=!1;document.addEventListener("keyup",function(t){s||(function(t){if("Backspace"==t.key&&t.preventDefault(),!1===AA.visibility)return 0;clearTimeout(n),u||c(t)}(t),s=!0,setTimeout(function(){s=!1},300))}),AA.notKaiOS&&document.addEventListener("swiped",function(t){var r=/*@__PURE__*/e(w6).route.get(),n=t.detail.dir;if("right"==n&&r.startsWith("/start")){--AQ<1&&(AQ=AC.length-1),AZ=AC[AQ],/*@__PURE__*/e(w6).redraw();var i=/*@__PURE__*/e(w6).route.param();i.index=0,/*@__PURE__*/e(w6).route.set("/start",i)}if("left"==n&&r.startsWith("/start")){++AQ>AC.length-1&&(AQ=0),AZ=AC[AQ],/*@__PURE__*/e(w6).redraw();var o=/*@__PURE__*/e(w6).route.param();o.index=0,/*@__PURE__*/e(w6).route.set("/start",o)}});var u=!1;function c(t){var r=/*@__PURE__*/e(w6).route.get();switch(t.key){case"ArrowRight":if(r.startsWith("/start")){++AQ>AC.length-1&&(AQ=0),AZ=AC[AQ],/*@__PURE__*/e(w6).redraw();var n=/*@__PURE__*/e(w6).route.param();n.index=0,/*@__PURE__*/e(w6).route.set("/start",n),setTimeout(function(){document.querySelectorAll("article.item")[0].focus(),Oi()},500)}break;case"ArrowLeft":if(r.startsWith("/start")){--AQ<0&&(AQ=AC.length-1),AZ=AC[AQ],/*@__PURE__*/e(w6).redraw();var o=/*@__PURE__*/e(w6).route.param();o.index=0,/*@__PURE__*/e(w6).route.set("/start",o),setTimeout(function(){document.querySelectorAll("article.item")[0].focus(),Oi()},500)}break;case"ArrowUp":i(-1),"volume"==AA.window_status&&(navigator.volumeManager.requestVolumeUp(),AA.window_status="volume",setTimeout(function(){AA.window_status=""},2e3));break;case"ArrowDown":i(1),"volume"==AA.window_status&&(navigator.volumeManager.requestVolumeDown(),AA.window_status="volume",setTimeout(function(){AA.window_status=""},2e3));break;case"SoftRight":case"Alt":r.startsWith("/start")&&/*@__PURE__*/e(w6).route.set("/options"),r.startsWith("/article")&&("audio"==AI.type&&/*@__PURE__*/e(w6).route.set("/AudioPlayerView?url=".concat(encodeURIComponent(AI.enclosure["@_url"]),"&id=").concat(AI.id)),"video"==AI.type&&/*@__PURE__*/e(w6).route.set("/VideoPlayerView?url=".concat(encodeURIComponent(AI.enclosure["@_url"]))),"youtube"==AI.type&&/*@__PURE__*/e(w6).route.set("/YouTubePlayerView?videoId=".concat(encodeURIComponent(AI.youtubeid))));break;case"SoftLeft":case"Control":r.startsWith("/start")&&AR(),r.startsWith("/article")&&window.open(AI.url),r.startsWith("/AudioPlayerView")&&(AA.sleepTimer?Of():Ol(6e4*A_.sleepTimer));break;case"Enter":document.activeElement.classList.contains("input-parent")&&document.activeElement.children[0].focus();break;case"*":/*@__PURE__*/e(w6).route.set("/AudioPlayerView");break;case"#":wY();break;case"Backspace":if(r.startsWith("/start")&&window.close(),r.startsWith("/article")){var a=/*@__PURE__*/e(w6).route.param("index");/*@__PURE__*/e(w6).route.set("/start?index="+a)}if(r.startsWith("/YouTubePlayerView")){var s=/*@__PURE__*/e(w6).route.param("index");/*@__PURE__*/e(w6).route.set("/start?index="+s)}if(r.startsWith("/localOPML")&&history.back(),r.startsWith("/index")&&/*@__PURE__*/e(w6).route.set("/start?index=0"),r.startsWith("/about")&&/*@__PURE__*/e(w6).route.set("/options"),r.startsWith("/privacy_policy")&&/*@__PURE__*/e(w6).route.set("/options"),r.startsWith("/options")&&/*@__PURE__*/e(w6).route.set("/start?index=0"),r.startsWith("/settingsView")){if("INPUT"==document.activeElement.tagName)return!1;/*@__PURE__*/e(w6).route.set("/options")}r.startsWith("/Video")&&history.back(),r.startsWith("/Audio")&&history.back()}}document.addEventListener("visibilitychange",function(){"visible"===document.visibilityState&&A_.last_update?(AA.visibility=!0,new Date/1e3-A_.last_update/1e3>A_.cache_time&&(AD=[],wX("load new content",4e3),AK())):AA.visibility=!1})}),window.addEventListener("online",function(){AA.deviceOnline=!0}),window.addEventListener("offline",function(){AA.deviceOnline=!1}),window.addEventListener("beforeunload",function(t){/*@__PURE__*/e(w8).setItem("last_channel_filter",AZ).then(function(){});var r=window.performance.getEntriesByType("navigation"),n=window.performance.navigation?window.performance.navigation.type:null;(r.length&&"reload"===r[0].type||1===n)&&(t.preventDefault(),AD=[],wX("load new content",4e3),AK(),/*@__PURE__*/e(w6).route.set("/intro"),t.returnValue="Are you sure you want to leave the page?")});try{AS.addEventListener("message",function(t){var r=t.data.oauth_success;if(r){var n=new Headers;n.append("Content-Type","application/x-www-form-urlencoded");var i=new URLSearchParams;i.append("code",r),i.append("scope","read"),i.append("grant_type","authorization_code"),i.append("redirect_uri","https://feedolin.strukturart.com"),i.append("client_id","HqIUbDiOkeIoDPoOJNLQOgVyPi1ZOkPMW29UVkhl3i8"),i.append("client_secret","R_9DvQ5V84yZQg3BEdDHjz5uGQGUN4qrPx9YgmrJ81Q"),fetch(A_.mastodon_server_url+"/oauth/token",{method:"POST",headers:n,body:i,redirect:"follow"}).then(function(t){return t.json()}).then(function(t){A_.mastodon_token=t.access_token,/*@__PURE__*/e(w8).setItem("settings",A_),/*@__PURE__*/e(w6).route.set("/start?index=0"),wX("Successfully connected",1e4)}).catch(function(t){console.error("Error:",t),wX("Connection failed")})}})}catch(t){}navigator.mozAlarms&&navigator.mozSetMessageHandler("alarm",function(t){A3.pause(),AA.sleepTimer=!1});var Oa={},Os={};Os=function(t,e,r){if(e===self.location.origin)return t;var n=r?"import "+JSON.stringify(t)+";":"importScripts("+JSON.stringify(t)+");";return URL.createObjectURL(new Blob([n],{type:"application/javascript"}))};var Ou=ek("e6gnT"),Oc=Ou.getBundleURL("3BHab")+"worker.8ac5962b.js";Oa=Os(Oc,Ou.getOrigin(Oc),!0);try{ew=new Worker(Oa)}catch(t){console.log(t)}function Ol(t){if(navigator.mozAlarms){var e=6e4*A_.sleepTimer,r=new Date(Date.now()+e);navigator.mozAlarms.add(r,"honorTimezone").onsuccess=function(){AA.alarmId=this.result}}AA.sleepTimer=!0,wX("sleep mode on",3e3),ew.postMessage({action:"start",duration:t})}function Of(){navigator.mozAlarms&&navigator.mozAlarms.remove(AA.alarmId),AA.sleepTimer=!1,wX("sleep mode off",3e3),ew.postMessage({action:"stop"})}ew.onmessage=function(t){"stop"===t.data.action&&(A3.pause(),AA.sleepTimer=!1)}; \ No newline at end of file diff --git a/docs/manifest.webapp b/docs/manifest.webapp index 6cb4716..a040931 100644 --- a/docs/manifest.webapp +++ b/docs/manifest.webapp @@ -1,5 +1,5 @@ { - "version": "2.0.15", + "version": "2.0.17", "name": "feedolin", "description": "Feedolin is an RSS / Atom / Mastodon reader and podcast player. It is intended for users who already use an rss reader client and want to read their feeds on a kaios device. the list of subscribed websites / podcasts is managed locally or online in an opml file.", "launch_path": "/index.html", diff --git a/docs/manifest.webmanifest b/docs/manifest.webmanifest index 55e719c..1c634b4 100644 --- a/docs/manifest.webmanifest +++ b/docs/manifest.webmanifest @@ -24,14 +24,12 @@ ], "b2g_features": { - "version": "1.8.125", + "version": "1.8.132", "id": "feedolin", "subtitle": "RSS Reader and Mastodon Reader", "core": true, "type": "privileged", "display": "fullscreen", - "origin": "http://feedolin.localhost", - "developer": { "name": "strukturart", "url": "https://github.com/strukturart/feedolin" @@ -58,9 +56,7 @@ "desktop-notification": { "description": "Needed to fire system notifications" }, - "alarms": { - "description": "Required to schedule alarms" - }, + "feature-detection": { "description": "query which keys are available" }, diff --git a/docs/sw.js b/docs/sw.js index 93eb5e1..3a18000 100644 --- a/docs/sw.js +++ b/docs/sw.js @@ -1 +1 @@ -!function(){function e(e,t,n,r,a,o,s){try{var c=e[o](s),i=c.value}catch(e){n(e);return}c.done?t(i):Promise.resolve(i).then(r,a)}"function"==typeof SuppressedError&&SuppressedError;var t,n,r=new BroadcastChannel("sw-messages");r.addEventListener("message",function(e){r.postMessage({test:e.data.test})}),self.addEventListener("systemmessage",(t=function(e){var t,n;return function(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=c(0),s.throw=c(1),s.return=c(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function c(c){return function(i){return function(c){if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1] "PROXY ACCESS DENIED! URL not specified"]); + exit(); +} + +// Prepare headers +$headers = []; +foreach (getallheaders() as $key => $value) { + if (in_array(strtolower($key), ['content-type', 'authorization', 'x-requested-with'])) { + $headers[] = "$key: $value"; + } +} + +// Prepare CURL options +$curl = curl_init(); +switch (strtoupper($method)) { + case 'POST': + $postData = $isJsonRequest ? $requestData : $_POST; + unset($postData['method'], $postData['cors']); + curl_setopt_array($curl, [ + CURLOPT_URL => $url, + CURLOPT_POST => true, + CURLOPT_POSTFIELDS => $isJsonRequest ? json_encode($postData) : http_build_query($postData), + ]); + break; + + case 'GET': + $getData = $isJsonRequest ? $requestData : $_GET; + unset($getData['method'], $getData['cors']); + $queryString = http_build_query($getData); + curl_setopt($curl, CURLOPT_URL, $url . ($queryString ? "?$queryString" : "")); + break; + + default: + echo json_encode(["message" => "Proxy only supports POST and GET requests"]); + exit(); +} + +curl_setopt_array($curl, [ + CURLOPT_RETURNTRANSFER => true, + CURLOPT_SSL_VERIFYPEER => false, // Disable for development, enable in production + CURLOPT_HTTPHEADER => $headers, +]); + +// Execute CURL request +$response = curl_exec($curl); +$error = curl_error($curl); +curl_close($curl); + +if ($error) { + echo json_encode(["error" => $error]); + exit(); +} + +// Set response content type if possible +if (json_decode($response) !== null) { + header('Content-Type: application/json'); +} elseif (strpos($response, '